diff --git a/Makefile b/Makefile index 93183a95..3df92a4b 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ check-program = $(foreach exec,$(1),$(if $(shell PATH="$(PATH)" which $(exec)),, # Get the temporary directory of the system TEMPDIR := $(shell dirname $(shell mktemp -u)) -APP_NAME := gnoboard +APP_NAME ?= gnoboard # Define the directory that contains the current Makefile make_dir := $(realpath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))) @@ -70,8 +70,8 @@ fclean: # - API : Handle API generation and cleaning -api.generate: _api.generate.protocol -api.clean: _api.clean.protocol +api.generate: _api.generate.protocol _api.generate.modules +api.clean: _api.clean.protocol _api.clean.modules # - API - rpc @@ -97,7 +97,14 @@ $(gen_sum): $(gen_src) go mod tidy \ ) -.PHONY: api.generate _api.generate.protocol _api.clean.protocol +_api.generate.modules: + $(call check-program, yarn) + cd api; yarn + +_api.clean.modules: + cd api; rm -fr node_modules + +.PHONY: api.generate _api.generate.protocol _api.generate.modules _api.clean.protocol _api.clean.modules # - Bind : Handle gomobile bind @@ -168,6 +175,7 @@ asdf.install_tools: asdf.add_plugins # Script to create a new app yarn_basic_dependencies := @bufbuild/protobuf @connectrpc/connect @connectrpc/connect-web react-native-polyfill-globals react-native-url-polyfill web-streams-polyfill react-native-get-random-values text-encoding base-64 react-native-fetch-api +yarn_basic_dev_dependencies = @tsconfig/react-native babel-plugin-module-resolver OUTPUT_DIR := $(make_dir)/examples/react-native new-app: @@ -189,7 +197,7 @@ new-react-native-app: @echo "Creating ios and android folders" cd $(OUTPUT_DIR)/$(APP_NAME) && yarn expo prebuild @echo "Installing yarn dependencies" - cd $(OUTPUT_DIR)/$(APP_NAME) && yarn add ${yarn_basic_dependencies} + cd $(OUTPUT_DIR)/$(APP_NAME) && yarn add ${yarn_basic_dependencies} && yarn add -D ${yarn_basic_dev_dependencies} @echo "Building GnoCore.xcframework for the new app" $(MAKE) build.ios APP_NAME=$(APP_NAME) APP_OUTPUT_DIR=$(OUTPUT_DIR)/$(APP_NAME) @@ -197,10 +205,8 @@ new-react-native-app: copy-js-files: $(call check-program, jq) @echo "Copying js files" - @mkdir -p $(OUTPUT_DIR)/$(APP_NAME)/src/api @mkdir -p $(OUTPUT_DIR)/$(APP_NAME)/src/grpc @mkdir -p $(OUTPUT_DIR)/$(APP_NAME)/src/hooks - @cp -r $(gnoboard_dir)/src/api $(OUTPUT_DIR)/$(APP_NAME)/src @cp -r $(gnoboard_dir)/src/grpc $(OUTPUT_DIR)/$(APP_NAME)/src @cp -r $(gnoboard_dir)/src/hooks $(OUTPUT_DIR)/$(APP_NAME)/src @cp -r $(gnoboard_dir)/src/native_modules $(OUTPUT_DIR)/$(APP_NAME)/src @@ -208,6 +214,8 @@ copy-js-files: @cp -r $(gnoboard_dir)/android/.gitignore $(OUTPUT_DIR)/$(APP_NAME)/android @cp -r $(gnoboard_dir)/ios/.gitignore $(OUTPUT_DIR)/$(APP_NAME)/ios @cp $(make_dir)/templates/tsconfig.json $(OUTPUT_DIR)/$(APP_NAME)/tsconfig.json + @cp $(make_dir)/templates/babel.config.js $(OUTPUT_DIR)/$(APP_NAME)/babel.config.js + @cp $(make_dir)/templates/metro.config.js $(OUTPUT_DIR)/$(APP_NAME)/metro.config.js @cp $(make_dir)/templates/App.tsx $(OUTPUT_DIR)/$(APP_NAME)/App.tsx # build GnoCore.xcframework for the new app @@ -217,6 +225,7 @@ new-app-build-ios: @cp -r $(gnoboard_dir)/ios/gnoboard/Sources $(OUTPUT_DIR)/$(APP_NAME)/ios/$(APP_NAME)/ @cp $(gnoboard_dir)/ios/gnoboard/gnoboard-Bridging-Header.h $(OUTPUT_DIR)/$(APP_NAME)/ios/$(APP_NAME)/$(APP_NAME)-Bridging-Header.h @cp -r $(gnoboard_dir)/ios/Sources $(OUTPUT_DIR)/$(APP_NAME)/ios/ + @cd $(OUTPUT_DIR)/$(APP_NAME) && $(MAKE) ios/$(APP_NAME).xcworkspace TEMPLATE_PROJECT=$(APP_NAME) JSON_FILE := $(OUTPUT_DIR)/$(APP_NAME)/app.json # add tsconfigPaths entry to app.json diff --git a/api/.gitignore b/api/.gitignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/api/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/api/gen/es/rpc_pb.d.ts b/api/gen/es/rpc_pb.d.ts index f39e7b78..f1e27894 100644 --- a/api/gen/es/rpc_pb.d.ts +++ b/api/gen/es/rpc_pb.d.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.6.0 +// @generated by protoc-gen-es v1.7.2 // @generated from file rpc.proto (package land.gno.gnonative.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/api/gen/es/rpc_pb.js b/api/gen/es/rpc_pb.js index e73075e5..4958f34c 100644 --- a/api/gen/es/rpc_pb.js +++ b/api/gen/es/rpc_pb.js @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.6.0 +// @generated by protoc-gen-es v1.7.2 // @generated from file rpc.proto (package land.gno.gnonative.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/api/gen/go/_goconnect/rpc.connect.go b/api/gen/go/_goconnect/rpc.connect.go index e84483d4..615942c5 100644 --- a/api/gen/go/_goconnect/rpc.connect.go +++ b/api/gen/go/_goconnect/rpc.connect.go @@ -5,13 +5,12 @@ package _goconnect import ( + connect "connectrpc.com/connect" context "context" errors "errors" + _go "github.com/gnolang/gnonative/api/gen/go" http "net/http" strings "strings" - - connect "connectrpc.com/connect" - _go "github.com/gnolang/gnonative/api/gen/go" ) // This is a compile-time assertion to ensure that this generated file and the connect package are diff --git a/api/package.json b/api/package.json new file mode 100644 index 00000000..c5ec504e --- /dev/null +++ b/api/package.json @@ -0,0 +1,10 @@ +{ + "name": "api", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.6", + "@bufbuild/protobuf": "^1.6.0" + } +} diff --git a/api/yarn.lock b/api/yarn.lock new file mode 100644 index 00000000..498e3c4e --- /dev/null +++ b/api/yarn.lock @@ -0,0 +1,20 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/runtime@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.6.tgz#c05e610dc228855dc92ef1b53d07389ed8ab521d" + integrity sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ== + dependencies: + regenerator-runtime "^0.14.0" + +"@bufbuild/protobuf@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-1.6.0.tgz#c33128f70330312e2bd78fd7e988576595b8f74d" + integrity sha512-hp19vSFgNw3wBBcVBx5qo5pufCqjaJ0Cfk5H/pfjNOfNWU+4/w0QVOmfAOZNRrNWRrVuaJWxcN8P2vhOkkzbBQ== + +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== diff --git a/examples/electron/README.md b/examples/electron/README.md deleted file mode 100644 index 2fe1850e..00000000 --- a/examples/electron/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Installing GNO and Electron - -To make our setup easier, let's use the Electron TypeScript boilerplate. It's a simple Electron app that uses TypeScript and TSC compiler. - -### Get the boilerplate from GitHub: - -```bash -cd gnonative/examples - -curl -LO https://github.com/electron/electron-quick-start-typescript/archive/refs/heads/main.zip -``` - -### Unzip the file: - -```bash -unzip main.zip -``` - -### Go to the directory and install the dependencies: - -```bash -cd electron-quick-start-typescript-main - -npm install @connectrpc/connect @connectrpc/connect-node @connectrpc/protoc-gen-connect-es @bufbuild/protobuf @bufbuild/buf @bufbuild/protoc-gen-es -``` - -### Enable the Electron-Nodejs integration: - -Open the `src/main.ts` file and add the line `nodeIntegration: true` to `webPreferences`. -More details about Electron-Nodejs integration can be found [here](https://www.electronjs.org/docs/latest/tutorial/sandbox#disabling-the-sandbox-for-a-single-process). - -```bash -webPreferences: { - preload: path.join(__dirname, "preload.js"), - nodeIntegration: true, -}, -``` - -### Update the `package.json` file: - -In order to allow the TSC compiler to compile the JS files, we need to add the `--AllowJs` flag to the build script: - -```bash -"scripts": { - "build": "tsc --AllowJs", - ... -``` - -### Copy the GNO files to the boilerplate directory: - -Now we need to copy the GNO files to the boilerplate directory. We will copy the `gnonative/api/gen/es` directory and the `templates/es/use-gno.ts` file to the `src/api` directory. - -```bash -cp -r ../../api/gen/es ./src/api -cp ../../templates/es/use-gno.ts ./src/api/use-gno.ts -``` - -### Communicating with the Blockchain: - -Let's open the `src/preload.ts` file and add change it a little bit. - -We'll use the GnoNative Javascript GRPC Client wrapper (aka: `useGno`) to communicate with the GnoNative GRPC Server. - -At the top of the `src/preload.ts` file add `import { useGno } from "./api/use-gno"`. - -And use the `useGno` function to create a "gno service instance" and become able to call the RPC methods already available. - -Check out this sample code bellow. - -```bash -import { useGno } from "./api/use-gno"; - - -window.addEventListener("DOMContentLoaded", () => { - - const replaceText = (selector: string, text: string) => { - const element = document.getElementById(selector); - if (element) { - element.innerText = text; - } - }; - - const gno = useGno(); - gno.getRemote().then((res) => { - replaceText("gnoRemoteAddress", res); - }); -}); -``` - -In the `index.html` file, add the following line to the `````` element to display the **Gno Remote Address**: - -```html - GNO Remote Address: . -``` - -### Run: - -In a separate terminal, from the root of the repo, enter the bellow command to start the GnoNative GRPC Server: - -```bash -cd gnonative/gnoserver -go run . tcp -``` - -and in the Electron boilerplate folder, enter: - -```bash -npm start -``` diff --git a/examples/react-native/gnoboard/babel.config.js b/examples/react-native/gnoboard/babel.config.js index 885ebfe4..3cb997d7 100644 --- a/examples/react-native/gnoboard/babel.config.js +++ b/examples/react-native/gnoboard/babel.config.js @@ -10,6 +10,7 @@ module.exports = function (api) { extensions: ['.ios.js', '.android.js', '.js', '.ts', '.tsx', '.json'], alias: { '@gno': './src/', + '@api': '../../../api/gen/es', }, }, ], diff --git a/examples/react-native/gnoboard/ios/gnoboard.xcodeproj/project.pbxproj b/examples/react-native/gnoboard/ios/gnoboard.xcodeproj/project.pbxproj index 18345cbb..36c3722c 100644 --- a/examples/react-native/gnoboard/ios/gnoboard.xcodeproj/project.pbxproj +++ b/examples/react-native/gnoboard/ios/gnoboard.xcodeproj/project.pbxproj @@ -404,7 +404,7 @@ "FB_SONARKIT_ENABLED=1", ); INFOPLIST_FILE = gnoboard/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -436,7 +436,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = gnoboard/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -526,8 +526,8 @@ OTHER_CPLUSPLUSFLAGS = "$(inherited)"; OTHER_LDFLAGS = ( "$(inherited)", - " ", - "-Wl -ld_classic ", + "-Wl", + "-ld_classic", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; @@ -598,8 +598,8 @@ OTHER_CPLUSPLUSFLAGS = "$(inherited)"; OTHER_LDFLAGS = ( "$(inherited)", - " ", - "-Wl -ld_classic ", + "-Wl", + "-ld_classic", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; diff --git a/examples/react-native/gnoboard/metro.config.js b/examples/react-native/gnoboard/metro.config.js new file mode 100644 index 00000000..956bcb74 --- /dev/null +++ b/examples/react-native/gnoboard/metro.config.js @@ -0,0 +1,14 @@ +// Learn more https://docs.expo.io/guides/customizing-metro +const { getDefaultConfig } = require('expo/metro-config'); +const { mergeConfig } = require('metro-config'); +const path = require('path'); + +/** @type {import('expo/metro-config').MetroConfig} */ +// const config = getDefaultConfig(__dirname); +// +// module.exports = config; +const config = { + watchFolders: [path.resolve(__dirname + '/../../../api')], +}; + +module.exports = mergeConfig(getDefaultConfig(__dirname), config); diff --git a/examples/react-native/gnoboard/src/api/gnonativetypes_pb.d.ts b/examples/react-native/gnoboard/src/api/gnonativetypes_pb.d.ts deleted file mode 100644 index d4108712..00000000 --- a/examples/react-native/gnoboard/src/api/gnonativetypes_pb.d.ts +++ /dev/null @@ -1,1639 +0,0 @@ -// @generated by protoc-gen-es v1.7.2 -// @generated from file gnonativetypes.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * messages - * - * @generated from message land.gno.gnonative.v1.SetRemoteRequest - */ -export declare class SetRemoteRequest extends Message { - /** - * @generated from field: string remote = 1; - */ - remote: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetRemoteRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetRemoteRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetRemoteRequest; - - static fromJsonString(jsonString: string, options?: Partial): SetRemoteRequest; - - static equals(a: SetRemoteRequest | PlainMessage | undefined, b: SetRemoteRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SetRemoteResponse - */ -export declare class SetRemoteResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetRemoteResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetRemoteResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetRemoteResponse; - - static fromJsonString(jsonString: string, options?: Partial): SetRemoteResponse; - - static equals(a: SetRemoteResponse | PlainMessage | undefined, b: SetRemoteResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetRemoteRequest - */ -export declare class GetRemoteRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetRemoteRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetRemoteRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetRemoteRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetRemoteRequest; - - static equals(a: GetRemoteRequest | PlainMessage | undefined, b: GetRemoteRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetRemoteResponse - */ -export declare class GetRemoteResponse extends Message { - /** - * @generated from field: string remote = 1; - */ - remote: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetRemoteResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetRemoteResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetRemoteResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetRemoteResponse; - - static equals(a: GetRemoteResponse | PlainMessage | undefined, b: GetRemoteResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SetChainIDRequest - */ -export declare class SetChainIDRequest extends Message { - /** - * @generated from field: string chain_id = 1; - */ - chainId: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetChainIDRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetChainIDRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetChainIDRequest; - - static fromJsonString(jsonString: string, options?: Partial): SetChainIDRequest; - - static equals(a: SetChainIDRequest | PlainMessage | undefined, b: SetChainIDRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SetChainIDResponse - */ -export declare class SetChainIDResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetChainIDResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetChainIDResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetChainIDResponse; - - static fromJsonString(jsonString: string, options?: Partial): SetChainIDResponse; - - static equals(a: SetChainIDResponse | PlainMessage | undefined, b: SetChainIDResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetChainIDRequest - */ -export declare class GetChainIDRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetChainIDRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetChainIDRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetChainIDRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetChainIDRequest; - - static equals(a: GetChainIDRequest | PlainMessage | undefined, b: GetChainIDRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetChainIDResponse - */ -export declare class GetChainIDResponse extends Message { - /** - * @generated from field: string chain_id = 1; - */ - chainId: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetChainIDResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetChainIDResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetChainIDResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetChainIDResponse; - - static equals(a: GetChainIDResponse | PlainMessage | undefined, b: GetChainIDResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SetPasswordRequest - */ -export declare class SetPasswordRequest extends Message { - /** - * @generated from field: string password = 1; - */ - password: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetPasswordRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetPasswordRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetPasswordRequest; - - static fromJsonString(jsonString: string, options?: Partial): SetPasswordRequest; - - static equals(a: SetPasswordRequest | PlainMessage | undefined, b: SetPasswordRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SetPasswordResponse - */ -export declare class SetPasswordResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetPasswordResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetPasswordResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetPasswordResponse; - - static fromJsonString(jsonString: string, options?: Partial): SetPasswordResponse; - - static equals(a: SetPasswordResponse | PlainMessage | undefined, b: SetPasswordResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GenerateRecoveryPhraseRequest - */ -export declare class GenerateRecoveryPhraseRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GenerateRecoveryPhraseRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateRecoveryPhraseRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateRecoveryPhraseRequest; - - static fromJsonString(jsonString: string, options?: Partial): GenerateRecoveryPhraseRequest; - - static equals(a: GenerateRecoveryPhraseRequest | PlainMessage | undefined, b: GenerateRecoveryPhraseRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GenerateRecoveryPhraseResponse - */ -export declare class GenerateRecoveryPhraseResponse extends Message { - /** - * @generated from field: string phrase = 1; - */ - phrase: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GenerateRecoveryPhraseResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateRecoveryPhraseResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateRecoveryPhraseResponse; - - static fromJsonString(jsonString: string, options?: Partial): GenerateRecoveryPhraseResponse; - - static equals(a: GenerateRecoveryPhraseResponse | PlainMessage | undefined, b: GenerateRecoveryPhraseResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.KeyInfo - */ -export declare class KeyInfo extends Message { - /** - * 0: local, 1: ledger, 2: offline, 3: multi - * - * @generated from field: uint32 type = 1; - */ - type: number; - - /** - * @generated from field: string name = 2; - */ - name: string; - - /** - * @generated from field: bytes pub_key = 3; - */ - pubKey: Uint8Array; - - /** - * @generated from field: bytes address = 4; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.KeyInfo"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): KeyInfo; - - static fromJson(jsonValue: JsonValue, options?: Partial): KeyInfo; - - static fromJsonString(jsonString: string, options?: Partial): KeyInfo; - - static equals(a: KeyInfo | PlainMessage | undefined, b: KeyInfo | PlainMessage | undefined): boolean; -} - -/** - * Coin holds some amount of one currency. - * A negative amount is invalid. - * - * @generated from message land.gno.gnonative.v1.Coin - */ -export declare class Coin extends Message { - /** - * @generated from field: string denom = 1; - */ - denom: string; - - /** - * @generated from field: sint64 amount = 2; - */ - amount: bigint; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.Coin"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Coin; - - static fromJson(jsonValue: JsonValue, options?: Partial): Coin; - - static fromJsonString(jsonString: string, options?: Partial): Coin; - - static equals(a: Coin | PlainMessage | undefined, b: Coin | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.BaseAccount - */ -export declare class BaseAccount extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - /** - * @generated from field: repeated land.gno.gnonative.v1.Coin coins = 2; - */ - coins: Coin[]; - - /** - * @generated from field: bytes pub_key = 3; - */ - pubKey: Uint8Array; - - /** - * @generated from field: uint64 account_number = 4; - */ - accountNumber: bigint; - - /** - * @generated from field: uint64 sequence = 5; - */ - sequence: bigint; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.BaseAccount"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): BaseAccount; - - static fromJson(jsonValue: JsonValue, options?: Partial): BaseAccount; - - static fromJsonString(jsonString: string, options?: Partial): BaseAccount; - - static equals(a: BaseAccount | PlainMessage | undefined, b: BaseAccount | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.ListKeyInfoRequest - */ -export declare class ListKeyInfoRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.ListKeyInfoRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListKeyInfoRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListKeyInfoRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListKeyInfoRequest; - - static equals(a: ListKeyInfoRequest | PlainMessage | undefined, b: ListKeyInfoRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.ListKeyInfoResponse - */ -export declare class ListKeyInfoResponse extends Message { - /** - * @generated from field: repeated land.gno.gnonative.v1.KeyInfo keys = 1 [json_name = "key_info"]; - */ - keys: KeyInfo[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.ListKeyInfoResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListKeyInfoResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListKeyInfoResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListKeyInfoResponse; - - static equals(a: ListKeyInfoResponse | PlainMessage | undefined, b: ListKeyInfoResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameRequest - */ -export declare class HasKeyByNameRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByNameRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByNameRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByNameRequest; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByNameRequest; - - static equals(a: HasKeyByNameRequest | PlainMessage | undefined, b: HasKeyByNameRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameResponse - */ -export declare class HasKeyByNameResponse extends Message { - /** - * @generated from field: bool has = 1; - */ - has: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByNameResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByNameResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByNameResponse; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByNameResponse; - - static equals(a: HasKeyByNameResponse | PlainMessage | undefined, b: HasKeyByNameResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByAddressRequest - */ -export declare class HasKeyByAddressRequest extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByAddressRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByAddressRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByAddressRequest; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByAddressRequest; - - static equals(a: HasKeyByAddressRequest | PlainMessage | undefined, b: HasKeyByAddressRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByAddressResponse - */ -export declare class HasKeyByAddressResponse extends Message { - /** - * @generated from field: bool has = 1; - */ - has: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByAddressResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByAddressResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByAddressResponse; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByAddressResponse; - - static equals(a: HasKeyByAddressResponse | PlainMessage | undefined, b: HasKeyByAddressResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameOrAddressRequest - */ -export declare class HasKeyByNameOrAddressRequest extends Message { - /** - * @generated from field: string name_or_bech32 = 1; - */ - nameOrBech32: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByNameOrAddressRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByNameOrAddressRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByNameOrAddressRequest; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByNameOrAddressRequest; - - static equals(a: HasKeyByNameOrAddressRequest | PlainMessage | undefined, b: HasKeyByNameOrAddressRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameOrAddressResponse - */ -export declare class HasKeyByNameOrAddressResponse extends Message { - /** - * @generated from field: bool has = 1; - */ - has: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByNameOrAddressResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByNameOrAddressResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByNameOrAddressResponse; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByNameOrAddressResponse; - - static equals(a: HasKeyByNameOrAddressResponse | PlainMessage | undefined, b: HasKeyByNameOrAddressResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameRequest - */ -export declare class GetKeyInfoByNameRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByNameRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByNameRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByNameRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByNameRequest; - - static equals(a: GetKeyInfoByNameRequest | PlainMessage | undefined, b: GetKeyInfoByNameRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameResponse - */ -export declare class GetKeyInfoByNameResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByNameResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByNameResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByNameResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByNameResponse; - - static equals(a: GetKeyInfoByNameResponse | PlainMessage | undefined, b: GetKeyInfoByNameResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByAddressRequest - */ -export declare class GetKeyInfoByAddressRequest extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByAddressRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByAddressRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByAddressRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByAddressRequest; - - static equals(a: GetKeyInfoByAddressRequest | PlainMessage | undefined, b: GetKeyInfoByAddressRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByAddressResponse - */ -export declare class GetKeyInfoByAddressResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByAddressResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByAddressResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByAddressResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByAddressResponse; - - static equals(a: GetKeyInfoByAddressResponse | PlainMessage | undefined, b: GetKeyInfoByAddressResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameOrAddressRequest - */ -export declare class GetKeyInfoByNameOrAddressRequest extends Message { - /** - * @generated from field: string name_or_bech32 = 1; - */ - nameOrBech32: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByNameOrAddressRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByNameOrAddressRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByNameOrAddressRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByNameOrAddressRequest; - - static equals(a: GetKeyInfoByNameOrAddressRequest | PlainMessage | undefined, b: GetKeyInfoByNameOrAddressRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameOrAddressResponse - */ -export declare class GetKeyInfoByNameOrAddressResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByNameOrAddressResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByNameOrAddressResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByNameOrAddressResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByNameOrAddressResponse; - - static equals(a: GetKeyInfoByNameOrAddressResponse | PlainMessage | undefined, b: GetKeyInfoByNameOrAddressResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.CreateAccountRequest - */ -export declare class CreateAccountRequest extends Message { - /** - * @generated from field: string name_or_bech32 = 1; - */ - nameOrBech32: string; - - /** - * @generated from field: string mnemonic = 2; - */ - mnemonic: string; - - /** - * @generated from field: string bip39_passwd = 3; - */ - bip39Passwd: string; - - /** - * @generated from field: string password = 4; - */ - password: string; - - /** - * @generated from field: uint32 account = 5; - */ - account: number; - - /** - * @generated from field: uint32 index = 6; - */ - index: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.CreateAccountRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAccountRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAccountRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateAccountRequest; - - static equals(a: CreateAccountRequest | PlainMessage | undefined, b: CreateAccountRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.CreateAccountResponse - */ -export declare class CreateAccountResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.CreateAccountResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAccountResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAccountResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateAccountResponse; - - static equals(a: CreateAccountResponse | PlainMessage | undefined, b: CreateAccountResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SelectAccountRequest - */ -export declare class SelectAccountRequest extends Message { - /** - * @generated from field: string name_or_bech32 = 1; - */ - nameOrBech32: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SelectAccountRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SelectAccountRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): SelectAccountRequest; - - static fromJsonString(jsonString: string, options?: Partial): SelectAccountRequest; - - static equals(a: SelectAccountRequest | PlainMessage | undefined, b: SelectAccountRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SelectAccountResponse - */ -export declare class SelectAccountResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - /** - * True if the password has been set. If false, then call SetPassword. - * - * @generated from field: bool has_password = 2; - */ - hasPassword: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SelectAccountResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SelectAccountResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): SelectAccountResponse; - - static fromJsonString(jsonString: string, options?: Partial): SelectAccountResponse; - - static equals(a: SelectAccountResponse | PlainMessage | undefined, b: SelectAccountResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetActiveAccountRequest - */ -export declare class GetActiveAccountRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetActiveAccountRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetActiveAccountRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetActiveAccountRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetActiveAccountRequest; - - static equals(a: GetActiveAccountRequest | PlainMessage | undefined, b: GetActiveAccountRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetActiveAccountResponse - */ -export declare class GetActiveAccountResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - /** - * True if the password has been set. If false, then call SetPassword. - * - * @generated from field: bool has_password = 2; - */ - hasPassword: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetActiveAccountResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetActiveAccountResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetActiveAccountResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetActiveAccountResponse; - - static equals(a: GetActiveAccountResponse | PlainMessage | undefined, b: GetActiveAccountResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QueryAccountRequest - */ -export declare class QueryAccountRequest extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QueryAccountRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QueryAccountRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): QueryAccountRequest; - - static fromJsonString(jsonString: string, options?: Partial): QueryAccountRequest; - - static equals(a: QueryAccountRequest | PlainMessage | undefined, b: QueryAccountRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QueryAccountResponse - */ -export declare class QueryAccountResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.BaseAccount account_info = 1; - */ - accountInfo?: BaseAccount; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QueryAccountResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QueryAccountResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): QueryAccountResponse; - - static fromJsonString(jsonString: string, options?: Partial): QueryAccountResponse; - - static equals(a: QueryAccountResponse | PlainMessage | undefined, b: QueryAccountResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.DeleteAccountRequest - */ -export declare class DeleteAccountRequest extends Message { - /** - * @generated from field: string name_or_bech32 = 1; - */ - nameOrBech32: string; - - /** - * @generated from field: string password = 2; - */ - password: string; - - /** - * @generated from field: bool skip_password = 3; - */ - skipPassword: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.DeleteAccountRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteAccountRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteAccountRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteAccountRequest; - - static equals(a: DeleteAccountRequest | PlainMessage | undefined, b: DeleteAccountRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.DeleteAccountResponse - */ -export declare class DeleteAccountResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.DeleteAccountResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteAccountResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteAccountResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteAccountResponse; - - static equals(a: DeleteAccountResponse | PlainMessage | undefined, b: DeleteAccountResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QueryRequest - */ -export declare class QueryRequest extends Message { - /** - * Example: "vm/qrender" - * - * @generated from field: string path = 1; - */ - path: string; - - /** - * Example: "gno.land/r/demo/boards\ntestboard" - * - * @generated from field: bytes data = 2; - */ - data: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QueryRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QueryRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): QueryRequest; - - static fromJsonString(jsonString: string, options?: Partial): QueryRequest; - - static equals(a: QueryRequest | PlainMessage | undefined, b: QueryRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QueryResponse - */ -export declare class QueryResponse extends Message { - /** - * @generated from field: bytes result = 1; - */ - result: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QueryResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QueryResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): QueryResponse; - - static fromJsonString(jsonString: string, options?: Partial): QueryResponse; - - static equals(a: QueryResponse | PlainMessage | undefined, b: QueryResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.RenderRequest - */ -export declare class RenderRequest extends Message { - /** - * Example: "gno.land/r/demo/boards" - * - * @generated from field: string package_path = 1; - */ - packagePath: string; - - /** - * Example: "testboard/1" - * - * @generated from field: string args = 2; - */ - args: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.RenderRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RenderRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): RenderRequest; - - static fromJsonString(jsonString: string, options?: Partial): RenderRequest; - - static equals(a: RenderRequest | PlainMessage | undefined, b: RenderRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.RenderResponse - */ -export declare class RenderResponse extends Message { - /** - * The Render function result (typically markdown) - * - * @generated from field: string result = 1; - */ - result: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.RenderResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RenderResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): RenderResponse; - - static fromJsonString(jsonString: string, options?: Partial): RenderResponse; - - static equals(a: RenderResponse | PlainMessage | undefined, b: RenderResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QEvalRequest - */ -export declare class QEvalRequest extends Message { - /** - * Example: "gno.land/r/demo/boards" - * - * @generated from field: string package_path = 1; - */ - packagePath: string; - - /** - * Example: "GetBoardIDFromName(\"testboard\")" - * - * @generated from field: string expression = 2; - */ - expression: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QEvalRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QEvalRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): QEvalRequest; - - static fromJsonString(jsonString: string, options?: Partial): QEvalRequest; - - static equals(a: QEvalRequest | PlainMessage | undefined, b: QEvalRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QEvalResponse - */ -export declare class QEvalResponse extends Message { - /** - * A typed expression like "(1 gno.land/r/demo/boards.BoardID)\n(true bool)" - * - * @generated from field: string result = 1; - */ - result: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QEvalResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QEvalResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): QEvalResponse; - - static fromJsonString(jsonString: string, options?: Partial): QEvalResponse; - - static equals(a: QEvalResponse | PlainMessage | undefined, b: QEvalResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.MsgCall - */ -export declare class MsgCall extends Message { - /** - * Example: "gno.land/r/demo/boards" - * - * @generated from field: string package_path = 1; - */ - packagePath: string; - - /** - * Example: "CreateReply" - * - * @generated from field: string fnc = 2; - */ - fnc: string; - - /** - * list of arguments specific to the function - * Example: ["1", "1", "2", "my reply"] - * - * @generated from field: repeated string args = 3; - */ - args: string[]; - - /** - * @generated from field: string send = 4; - */ - send: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.MsgCall"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): MsgCall; - - static fromJson(jsonValue: JsonValue, options?: Partial): MsgCall; - - static fromJsonString(jsonString: string, options?: Partial): MsgCall; - - static equals(a: MsgCall | PlainMessage | undefined, b: MsgCall | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.CallRequest - */ -export declare class CallRequest extends Message { - /** - * @generated from field: string gas_fee = 1; - */ - gasFee: string; - - /** - * @generated from field: sint64 gas_wanted = 2; - */ - gasWanted: bigint; - - /** - * @generated from field: string memo = 3; - */ - memo: string; - - /** - * list of calls to make in one transaction - * - * @generated from field: repeated land.gno.gnonative.v1.MsgCall msgs = 4 [json_name = "Msgs"]; - */ - msgs: MsgCall[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.CallRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CallRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CallRequest; - - static fromJsonString(jsonString: string, options?: Partial): CallRequest; - - static equals(a: CallRequest | PlainMessage | undefined, b: CallRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.CallResponse - */ -export declare class CallResponse extends Message { - /** - * @generated from field: bytes result = 1; - */ - result: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.CallResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CallResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CallResponse; - - static fromJsonString(jsonString: string, options?: Partial): CallResponse; - - static equals(a: CallResponse | PlainMessage | undefined, b: CallResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.MsgSend - */ -export declare class MsgSend extends Message { - /** - * Example: The response of calling AddressFromBech32 with - * "g1juz2yxmdsa6audkp6ep9vfv80c8p5u76e03vvh" - * - * @generated from field: bytes to_address = 1; - */ - toAddress: Uint8Array; - - /** - * Example: "1000ugnot" - * - * @generated from field: string send = 2; - */ - send: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.MsgSend"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): MsgSend; - - static fromJson(jsonValue: JsonValue, options?: Partial): MsgSend; - - static fromJsonString(jsonString: string, options?: Partial): MsgSend; - - static equals(a: MsgSend | PlainMessage | undefined, b: MsgSend | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SendRequest - */ -export declare class SendRequest extends Message { - /** - * @generated from field: string gas_fee = 1; - */ - gasFee: string; - - /** - * @generated from field: sint64 gas_wanted = 2; - */ - gasWanted: bigint; - - /** - * Memo is optional - * - * @generated from field: string memo = 3; - */ - memo: string; - - /** - * list of send operations to make in one transaction - * - * @generated from field: repeated land.gno.gnonative.v1.MsgSend msgs = 4 [json_name = "Msgs"]; - */ - msgs: MsgSend[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SendRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SendRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): SendRequest; - - static fromJsonString(jsonString: string, options?: Partial): SendRequest; - - static equals(a: SendRequest | PlainMessage | undefined, b: SendRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SendResponse - */ -export declare class SendResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SendResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SendResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): SendResponse; - - static fromJsonString(jsonString: string, options?: Partial): SendResponse; - - static equals(a: SendResponse | PlainMessage | undefined, b: SendResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.RunRequest - */ -export declare class RunRequest extends Message { - /** - * The code for the script package. Must have main(). - * Example: "package main\nfunc main() {\n println(\"Hello\")\n}" - * - * @generated from field: string package = 1; - */ - package: string; - - /** - * @generated from field: string gas_fee = 2; - */ - gasFee: string; - - /** - * @generated from field: sint64 gas_wanted = 3; - */ - gasWanted: bigint; - - /** - * Memo is optional - * - * @generated from field: string memo = 4; - */ - memo: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.RunRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RunRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): RunRequest; - - static fromJsonString(jsonString: string, options?: Partial): RunRequest; - - static equals(a: RunRequest | PlainMessage | undefined, b: RunRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.RunResponse - */ -export declare class RunResponse extends Message { - /** - * The "console" output from the run - * - * @generated from field: string result = 1; - */ - result: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.RunResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RunResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): RunResponse; - - static fromJsonString(jsonString: string, options?: Partial): RunResponse; - - static equals(a: RunResponse | PlainMessage | undefined, b: RunResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.AddressToBech32Request - */ -export declare class AddressToBech32Request extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.AddressToBech32Request"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AddressToBech32Request; - - static fromJson(jsonValue: JsonValue, options?: Partial): AddressToBech32Request; - - static fromJsonString(jsonString: string, options?: Partial): AddressToBech32Request; - - static equals(a: AddressToBech32Request | PlainMessage | undefined, b: AddressToBech32Request | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.AddressToBech32Response - */ -export declare class AddressToBech32Response extends Message { - /** - * @generated from field: string bech32_address = 1; - */ - bech32Address: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.AddressToBech32Response"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AddressToBech32Response; - - static fromJson(jsonValue: JsonValue, options?: Partial): AddressToBech32Response; - - static fromJsonString(jsonString: string, options?: Partial): AddressToBech32Response; - - static equals(a: AddressToBech32Response | PlainMessage | undefined, b: AddressToBech32Response | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.AddressFromBech32Request - */ -export declare class AddressFromBech32Request extends Message { - /** - * @generated from field: string bech32_address = 1; - */ - bech32Address: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.AddressFromBech32Request"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AddressFromBech32Request; - - static fromJson(jsonValue: JsonValue, options?: Partial): AddressFromBech32Request; - - static fromJsonString(jsonString: string, options?: Partial): AddressFromBech32Request; - - static equals(a: AddressFromBech32Request | PlainMessage | undefined, b: AddressFromBech32Request | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.AddressFromBech32Response - */ -export declare class AddressFromBech32Response extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.AddressFromBech32Response"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AddressFromBech32Response; - - static fromJson(jsonValue: JsonValue, options?: Partial): AddressFromBech32Response; - - static fromJsonString(jsonString: string, options?: Partial): AddressFromBech32Response; - - static equals(a: AddressFromBech32Response | PlainMessage | undefined, b: AddressFromBech32Response | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HelloRequest - */ -export declare class HelloRequest extends Message { - /** - * @generated from field: string name = 1 [json_name = "Name"]; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HelloRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HelloRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): HelloRequest; - - static fromJsonString(jsonString: string, options?: Partial): HelloRequest; - - static equals(a: HelloRequest | PlainMessage | undefined, b: HelloRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HelloResponse - */ -export declare class HelloResponse extends Message { - /** - * @generated from field: string greeting = 1 [json_name = "Greeting"]; - */ - greeting: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HelloResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HelloResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): HelloResponse; - - static fromJsonString(jsonString: string, options?: Partial): HelloResponse; - - static equals(a: HelloResponse | PlainMessage | undefined, b: HelloResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HelloStreamRequest - */ -export declare class HelloStreamRequest extends Message { - /** - * @generated from field: string name = 1 [json_name = "Name"]; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HelloStreamRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HelloStreamRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): HelloStreamRequest; - - static fromJsonString(jsonString: string, options?: Partial): HelloStreamRequest; - - static equals(a: HelloStreamRequest | PlainMessage | undefined, b: HelloStreamRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HelloStreamResponse - */ -export declare class HelloStreamResponse extends Message { - /** - * @generated from field: string greeting = 1 [json_name = "Greeting"]; - */ - greeting: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HelloStreamResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HelloStreamResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): HelloStreamResponse; - - static fromJsonString(jsonString: string, options?: Partial): HelloStreamResponse; - - static equals(a: HelloStreamResponse | PlainMessage | undefined, b: HelloStreamResponse | PlainMessage | undefined): boolean; -} - diff --git a/examples/react-native/gnoboard/src/api/gnonativetypes_pb.js b/examples/react-native/gnoboard/src/api/gnonativetypes_pb.js deleted file mode 100644 index bdc24aac..00000000 --- a/examples/react-native/gnoboard/src/api/gnonativetypes_pb.js +++ /dev/null @@ -1,635 +0,0 @@ -// @generated by protoc-gen-es v1.7.2 -// @generated from file gnonativetypes.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * messages - * - * @generated from message land.gno.gnonative.v1.SetRemoteRequest - */ -export const SetRemoteRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.SetRemoteRequest", - () => [ - { no: 1, name: "remote", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SetRemoteResponse - */ -export const SetRemoteResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.SetRemoteResponse", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GetRemoteRequest - */ -export const GetRemoteRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetRemoteRequest", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GetRemoteResponse - */ -export const GetRemoteResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetRemoteResponse", - () => [ - { no: 1, name: "remote", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SetChainIDRequest - */ -export const SetChainIDRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.SetChainIDRequest", - () => [ - { no: 1, name: "chain_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SetChainIDResponse - */ -export const SetChainIDResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.SetChainIDResponse", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GetChainIDRequest - */ -export const GetChainIDRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetChainIDRequest", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GetChainIDResponse - */ -export const GetChainIDResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetChainIDResponse", - () => [ - { no: 1, name: "chain_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SetPasswordRequest - */ -export const SetPasswordRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.SetPasswordRequest", - () => [ - { no: 1, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SetPasswordResponse - */ -export const SetPasswordResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.SetPasswordResponse", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GenerateRecoveryPhraseRequest - */ -export const GenerateRecoveryPhraseRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GenerateRecoveryPhraseRequest", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GenerateRecoveryPhraseResponse - */ -export const GenerateRecoveryPhraseResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GenerateRecoveryPhraseResponse", - () => [ - { no: 1, name: "phrase", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.KeyInfo - */ -export const KeyInfo = proto3.makeMessageType( - "land.gno.gnonative.v1.KeyInfo", - () => [ - { no: 1, name: "type", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "pub_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 4, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * Coin holds some amount of one currency. - * A negative amount is invalid. - * - * @generated from message land.gno.gnonative.v1.Coin - */ -export const Coin = proto3.makeMessageType( - "land.gno.gnonative.v1.Coin", - () => [ - { no: 1, name: "denom", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "amount", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.BaseAccount - */ -export const BaseAccount = proto3.makeMessageType( - "land.gno.gnonative.v1.BaseAccount", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "coins", kind: "message", T: Coin, repeated: true }, - { no: 3, name: "pub_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 4, name: "account_number", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 5, name: "sequence", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.ListKeyInfoRequest - */ -export const ListKeyInfoRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.ListKeyInfoRequest", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.ListKeyInfoResponse - */ -export const ListKeyInfoResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.ListKeyInfoResponse", - () => [ - { no: 1, name: "keys", jsonName: "key_info", kind: "message", T: KeyInfo, repeated: true }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameRequest - */ -export const HasKeyByNameRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByNameRequest", - () => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameResponse - */ -export const HasKeyByNameResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByNameResponse", - () => [ - { no: 1, name: "has", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByAddressRequest - */ -export const HasKeyByAddressRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByAddressRequest", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByAddressResponse - */ -export const HasKeyByAddressResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByAddressResponse", - () => [ - { no: 1, name: "has", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameOrAddressRequest - */ -export const HasKeyByNameOrAddressRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByNameOrAddressRequest", - () => [ - { no: 1, name: "name_or_bech32", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameOrAddressResponse - */ -export const HasKeyByNameOrAddressResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByNameOrAddressResponse", - () => [ - { no: 1, name: "has", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameRequest - */ -export const GetKeyInfoByNameRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByNameRequest", - () => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameResponse - */ -export const GetKeyInfoByNameResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByNameResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByAddressRequest - */ -export const GetKeyInfoByAddressRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByAddressRequest", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByAddressResponse - */ -export const GetKeyInfoByAddressResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByAddressResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameOrAddressRequest - */ -export const GetKeyInfoByNameOrAddressRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByNameOrAddressRequest", - () => [ - { no: 1, name: "name_or_bech32", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameOrAddressResponse - */ -export const GetKeyInfoByNameOrAddressResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByNameOrAddressResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.CreateAccountRequest - */ -export const CreateAccountRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.CreateAccountRequest", - () => [ - { no: 1, name: "name_or_bech32", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "mnemonic", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "bip39_passwd", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "account", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 6, name: "index", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.CreateAccountResponse - */ -export const CreateAccountResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.CreateAccountResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SelectAccountRequest - */ -export const SelectAccountRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.SelectAccountRequest", - () => [ - { no: 1, name: "name_or_bech32", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SelectAccountResponse - */ -export const SelectAccountResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.SelectAccountResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - { no: 2, name: "has_password", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetActiveAccountRequest - */ -export const GetActiveAccountRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetActiveAccountRequest", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GetActiveAccountResponse - */ -export const GetActiveAccountResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetActiveAccountResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - { no: 2, name: "has_password", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.QueryAccountRequest - */ -export const QueryAccountRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.QueryAccountRequest", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.QueryAccountResponse - */ -export const QueryAccountResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.QueryAccountResponse", - () => [ - { no: 1, name: "account_info", kind: "message", T: BaseAccount }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.DeleteAccountRequest - */ -export const DeleteAccountRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.DeleteAccountRequest", - () => [ - { no: 1, name: "name_or_bech32", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "skip_password", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.DeleteAccountResponse - */ -export const DeleteAccountResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.DeleteAccountResponse", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.QueryRequest - */ -export const QueryRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.QueryRequest", - () => [ - { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.QueryResponse - */ -export const QueryResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.QueryResponse", - () => [ - { no: 1, name: "result", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.RenderRequest - */ -export const RenderRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.RenderRequest", - () => [ - { no: 1, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "args", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.RenderResponse - */ -export const RenderResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.RenderResponse", - () => [ - { no: 1, name: "result", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.QEvalRequest - */ -export const QEvalRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.QEvalRequest", - () => [ - { no: 1, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "expression", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.QEvalResponse - */ -export const QEvalResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.QEvalResponse", - () => [ - { no: 1, name: "result", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.MsgCall - */ -export const MsgCall = proto3.makeMessageType( - "land.gno.gnonative.v1.MsgCall", - () => [ - { no: 1, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "fnc", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "args", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "send", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.CallRequest - */ -export const CallRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.CallRequest", - () => [ - { no: 1, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, - { no: 3, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "msgs", jsonName: "Msgs", kind: "message", T: MsgCall, repeated: true }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.CallResponse - */ -export const CallResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.CallResponse", - () => [ - { no: 1, name: "result", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.MsgSend - */ -export const MsgSend = proto3.makeMessageType( - "land.gno.gnonative.v1.MsgSend", - () => [ - { no: 1, name: "to_address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "send", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SendRequest - */ -export const SendRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.SendRequest", - () => [ - { no: 1, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, - { no: 3, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "msgs", jsonName: "Msgs", kind: "message", T: MsgSend, repeated: true }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SendResponse - */ -export const SendResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.SendResponse", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.RunRequest - */ -export const RunRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.RunRequest", - () => [ - { no: 1, name: "package", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, - { no: 4, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.RunResponse - */ -export const RunResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.RunResponse", - () => [ - { no: 1, name: "result", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.AddressToBech32Request - */ -export const AddressToBech32Request = proto3.makeMessageType( - "land.gno.gnonative.v1.AddressToBech32Request", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.AddressToBech32Response - */ -export const AddressToBech32Response = proto3.makeMessageType( - "land.gno.gnonative.v1.AddressToBech32Response", - () => [ - { no: 1, name: "bech32_address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.AddressFromBech32Request - */ -export const AddressFromBech32Request = proto3.makeMessageType( - "land.gno.gnonative.v1.AddressFromBech32Request", - () => [ - { no: 1, name: "bech32_address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.AddressFromBech32Response - */ -export const AddressFromBech32Response = proto3.makeMessageType( - "land.gno.gnonative.v1.AddressFromBech32Response", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HelloRequest - */ -export const HelloRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.HelloRequest", - () => [ - { no: 1, name: "name", jsonName: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HelloResponse - */ -export const HelloResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.HelloResponse", - () => [ - { no: 1, name: "greeting", jsonName: "Greeting", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HelloStreamRequest - */ -export const HelloStreamRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.HelloStreamRequest", - () => [ - { no: 1, name: "name", jsonName: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HelloStreamResponse - */ -export const HelloStreamResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.HelloStreamResponse", - () => [ - { no: 1, name: "greeting", jsonName: "Greeting", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - diff --git a/examples/react-native/gnoboard/src/api/rpc_connect.d.ts b/examples/react-native/gnoboard/src/api/rpc_connect.d.ts deleted file mode 100644 index 05b25297..00000000 --- a/examples/react-native/gnoboard/src/api/rpc_connect.d.ts +++ /dev/null @@ -1,367 +0,0 @@ -// @generated by protoc-gen-connect-es v1.3.0 -// @generated from file rpc.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { AddressFromBech32Request, AddressFromBech32Response, AddressToBech32Request, AddressToBech32Response, CallRequest, CallResponse, CreateAccountRequest, CreateAccountResponse, DeleteAccountRequest, DeleteAccountResponse, GenerateRecoveryPhraseRequest, GenerateRecoveryPhraseResponse, GetActiveAccountRequest, GetActiveAccountResponse, GetChainIDRequest, GetChainIDResponse, GetKeyInfoByAddressRequest, GetKeyInfoByAddressResponse, GetKeyInfoByNameOrAddressRequest, GetKeyInfoByNameOrAddressResponse, GetKeyInfoByNameRequest, GetKeyInfoByNameResponse, GetRemoteRequest, GetRemoteResponse, HasKeyByAddressRequest, HasKeyByAddressResponse, HasKeyByNameOrAddressRequest, HasKeyByNameOrAddressResponse, HasKeyByNameRequest, HasKeyByNameResponse, HelloRequest, HelloResponse, HelloStreamRequest, HelloStreamResponse, ListKeyInfoRequest, ListKeyInfoResponse, QEvalRequest, QEvalResponse, QueryAccountRequest, QueryAccountResponse, QueryRequest, QueryResponse, RenderRequest, RenderResponse, RunRequest, RunResponse, SelectAccountRequest, SelectAccountResponse, SendRequest, SendResponse, SetChainIDRequest, SetChainIDResponse, SetPasswordRequest, SetPasswordResponse, SetRemoteRequest, SetRemoteResponse } from "./gnonativetypes_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * GnoNativeService is the service to interact with the Gno blockchain - * - * @generated from service land.gno.gnonative.v1.GnoNativeService - */ -export declare const GnoNativeService: { - readonly typeName: "land.gno.gnonative.v1.GnoNativeService", - readonly methods: { - /** - * Set the connection address for the remote node. If you don't call this, - * the default is "127.0.0.1:26657" - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetRemote - */ - readonly setRemote: { - readonly name: "SetRemote", - readonly I: typeof SetRemoteRequest, - readonly O: typeof SetRemoteResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the connection address for the remote node. The response is either - * the initial default, or the value which was set with SetRemote - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetRemote - */ - readonly getRemote: { - readonly name: "GetRemote", - readonly I: typeof GetRemoteRequest, - readonly O: typeof GetRemoteResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Set the chain ID for the remote node. If you don't call this, the default - * is "dev" - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetChainID - */ - readonly setChainID: { - readonly name: "SetChainID", - readonly I: typeof SetChainIDRequest, - readonly O: typeof SetChainIDResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the chain ID for the remote node. The response is either - * the initial default, or the value which was set with SetChainID - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetChainID - */ - readonly getChainID: { - readonly name: "GetChainID", - readonly I: typeof GetChainIDRequest, - readonly O: typeof GetChainIDResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Generate a recovery phrase of BIP39 mnemonic words using entropy from the - * crypto library random number generator. This can be used as the mnemonic in - * CreateAccount. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GenerateRecoveryPhrase - */ - readonly generateRecoveryPhrase: { - readonly name: "GenerateRecoveryPhrase", - readonly I: typeof GenerateRecoveryPhraseRequest, - readonly O: typeof GenerateRecoveryPhraseResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the information for all keys in the keybase - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.ListKeyInfo - */ - readonly listKeyInfo: { - readonly name: "ListKeyInfo", - readonly I: typeof ListKeyInfoRequest, - readonly O: typeof ListKeyInfoResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given name. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByName - */ - readonly hasKeyByName: { - readonly name: "HasKeyByName", - readonly I: typeof HasKeyByNameRequest, - readonly O: typeof HasKeyByNameResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given address. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByAddress - */ - readonly hasKeyByAddress: { - readonly name: "HasKeyByAddress", - readonly I: typeof HasKeyByAddressRequest, - readonly O: typeof HasKeyByAddressResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given name or bech32 string address. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByNameOrAddress - */ - readonly hasKeyByNameOrAddress: { - readonly name: "HasKeyByNameOrAddress", - readonly I: typeof HasKeyByNameOrAddressRequest, - readonly O: typeof HasKeyByNameOrAddressResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given name. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByName - */ - readonly getKeyInfoByName: { - readonly name: "GetKeyInfoByName", - readonly I: typeof GetKeyInfoByNameRequest, - readonly O: typeof GetKeyInfoByNameResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given address. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByAddress - */ - readonly getKeyInfoByAddress: { - readonly name: "GetKeyInfoByAddress", - readonly I: typeof GetKeyInfoByAddressRequest, - readonly O: typeof GetKeyInfoByAddressResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given name or bech32 string address. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByNameOrAddress - */ - readonly getKeyInfoByNameOrAddress: { - readonly name: "GetKeyInfoByNameOrAddress", - readonly I: typeof GetKeyInfoByNameOrAddressRequest, - readonly O: typeof GetKeyInfoByNameOrAddressResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Create a new account the keybase using the name an password specified by SetAccount. - * If an account with the same name already exists in the keybase, - * this replaces it. (If you don't want to replace it, then it's your responsibility - * to use GetKeyInfoByName to check if it exists before calling this.) - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.CreateAccount - */ - readonly createAccount: { - readonly name: "CreateAccount", - readonly I: typeof CreateAccountRequest, - readonly O: typeof CreateAccountResponse, - readonly kind: MethodKind.Unary, - }, - /** - * SelectAccount selects the active account to use for later operations - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SelectAccount - */ - readonly selectAccount: { - readonly name: "SelectAccount", - readonly I: typeof SelectAccountRequest, - readonly O: typeof SelectAccountResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Set the password for the active account in the keybase, used for later operations. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetPassword - */ - readonly setPassword: { - readonly name: "SetPassword", - readonly I: typeof SetPasswordRequest, - readonly O: typeof SetPasswordResponse, - readonly kind: MethodKind.Unary, - }, - /** - * GetActiveAccount gets the active account which was set by SelectAccount. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * (To check if there is an active account, use ListKeyInfo and check the - * length of the result.) - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetActiveAccount - */ - readonly getActiveAccount: { - readonly name: "GetActiveAccount", - readonly I: typeof GetActiveAccountRequest, - readonly O: typeof GetActiveAccountResponse, - readonly kind: MethodKind.Unary, - }, - /** - * QueryAccount retrieves account information from the blockchain for a given - * address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.QueryAccount - */ - readonly queryAccount: { - readonly name: "QueryAccount", - readonly I: typeof QueryAccountRequest, - readonly O: typeof QueryAccountResponse, - readonly kind: MethodKind.Unary, - }, - /** - * DeleteAccount deletes the account with the given name, using the password - * to ensure access. However, if skip_password is true, then ignore the - * password. - * If the account doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.DeleteAccount - */ - readonly deleteAccount: { - readonly name: "DeleteAccount", - readonly I: typeof DeleteAccountRequest, - readonly O: typeof DeleteAccountResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Make an ABCI query to the remote node. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Query - */ - readonly query: { - readonly name: "Query", - readonly I: typeof QueryRequest, - readonly O: typeof QueryResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Render calls the Render function for package_path with optional args. The - * package path should include the prefix like "gno.land/". This is similar to - * using a browser URL /: where doesn't have - * the prefix like "gno.land/". - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Render - */ - readonly render: { - readonly name: "Render", - readonly I: typeof RenderRequest, - readonly O: typeof RenderResponse, - readonly kind: MethodKind.Unary, - }, - /** - * QEval evaluates the given expression with the realm code at package_path. - * The package path should include the prefix like "gno.land/". The expression - * is usually a function call like "GetBoardIDFromName(\"testboard\")". The - * return value is a typed expression like - * "(1 gno.land/r/demo/boards.BoardID)\n(true bool)". - * If the path of a realm function call is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrUnknownRequest. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.QEval - */ - readonly qEval: { - readonly name: "QEval", - readonly I: typeof QEvalRequest, - readonly O: typeof QEvalResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Call a specific realm function. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * If the path of a realm function call is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrUnknownRequest. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Call - */ - readonly call: { - readonly name: "Call", - readonly I: typeof CallRequest, - readonly O: typeof CallResponse, - readonly kind: MethodKind.ServerStreaming, - }, - /** - * Send currency from the active account to an account on the blockchain. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Send - */ - readonly send: { - readonly name: "Send", - readonly I: typeof SendRequest, - readonly O: typeof SendResponse, - readonly kind: MethodKind.ServerStreaming, - }, - /** - * Temporarily load the code in package on the blockchain and run main() which can - * call realm functions and use println() to output to the "console". - * This returns the "console" output. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Run - */ - readonly run: { - readonly name: "Run", - readonly I: typeof RunRequest, - readonly O: typeof RunResponse, - readonly kind: MethodKind.ServerStreaming, - }, - /** - * Convert a byte array address to a bech32 string address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.AddressToBech32 - */ - readonly addressToBech32: { - readonly name: "AddressToBech32", - readonly I: typeof AddressToBech32Request, - readonly O: typeof AddressToBech32Response, - readonly kind: MethodKind.Unary, - }, - /** - * Convert a bech32 string address to a byte array address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.AddressFromBech32 - */ - readonly addressFromBech32: { - readonly name: "AddressFromBech32", - readonly I: typeof AddressFromBech32Request, - readonly O: typeof AddressFromBech32Response, - readonly kind: MethodKind.Unary, - }, - /** - * Hello is for debug purposes - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Hello - */ - readonly hello: { - readonly name: "Hello", - readonly I: typeof HelloRequest, - readonly O: typeof HelloResponse, - readonly kind: MethodKind.Unary, - }, - /** - * HelloStream is for debug purposes - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HelloStream - */ - readonly helloStream: { - readonly name: "HelloStream", - readonly I: typeof HelloStreamRequest, - readonly O: typeof HelloStreamResponse, - readonly kind: MethodKind.ServerStreaming, - }, - } -}; - diff --git a/examples/react-native/gnoboard/src/api/rpc_connect.js b/examples/react-native/gnoboard/src/api/rpc_connect.js deleted file mode 100644 index 671bb831..00000000 --- a/examples/react-native/gnoboard/src/api/rpc_connect.js +++ /dev/null @@ -1,367 +0,0 @@ -// @generated by protoc-gen-connect-es v1.3.0 -// @generated from file rpc.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { AddressFromBech32Request, AddressFromBech32Response, AddressToBech32Request, AddressToBech32Response, CallRequest, CallResponse, CreateAccountRequest, CreateAccountResponse, DeleteAccountRequest, DeleteAccountResponse, GenerateRecoveryPhraseRequest, GenerateRecoveryPhraseResponse, GetActiveAccountRequest, GetActiveAccountResponse, GetChainIDRequest, GetChainIDResponse, GetKeyInfoByAddressRequest, GetKeyInfoByAddressResponse, GetKeyInfoByNameOrAddressRequest, GetKeyInfoByNameOrAddressResponse, GetKeyInfoByNameRequest, GetKeyInfoByNameResponse, GetRemoteRequest, GetRemoteResponse, HasKeyByAddressRequest, HasKeyByAddressResponse, HasKeyByNameOrAddressRequest, HasKeyByNameOrAddressResponse, HasKeyByNameRequest, HasKeyByNameResponse, HelloRequest, HelloResponse, HelloStreamRequest, HelloStreamResponse, ListKeyInfoRequest, ListKeyInfoResponse, QEvalRequest, QEvalResponse, QueryAccountRequest, QueryAccountResponse, QueryRequest, QueryResponse, RenderRequest, RenderResponse, RunRequest, RunResponse, SelectAccountRequest, SelectAccountResponse, SendRequest, SendResponse, SetChainIDRequest, SetChainIDResponse, SetPasswordRequest, SetPasswordResponse, SetRemoteRequest, SetRemoteResponse } from "./gnonativetypes_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * GnoNativeService is the service to interact with the Gno blockchain - * - * @generated from service land.gno.gnonative.v1.GnoNativeService - */ -export const GnoNativeService = { - typeName: "land.gno.gnonative.v1.GnoNativeService", - methods: { - /** - * Set the connection address for the remote node. If you don't call this, - * the default is "127.0.0.1:26657" - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetRemote - */ - setRemote: { - name: "SetRemote", - I: SetRemoteRequest, - O: SetRemoteResponse, - kind: MethodKind.Unary, - }, - /** - * Get the connection address for the remote node. The response is either - * the initial default, or the value which was set with SetRemote - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetRemote - */ - getRemote: { - name: "GetRemote", - I: GetRemoteRequest, - O: GetRemoteResponse, - kind: MethodKind.Unary, - }, - /** - * Set the chain ID for the remote node. If you don't call this, the default - * is "dev" - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetChainID - */ - setChainID: { - name: "SetChainID", - I: SetChainIDRequest, - O: SetChainIDResponse, - kind: MethodKind.Unary, - }, - /** - * Get the chain ID for the remote node. The response is either - * the initial default, or the value which was set with SetChainID - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetChainID - */ - getChainID: { - name: "GetChainID", - I: GetChainIDRequest, - O: GetChainIDResponse, - kind: MethodKind.Unary, - }, - /** - * Generate a recovery phrase of BIP39 mnemonic words using entropy from the - * crypto library random number generator. This can be used as the mnemonic in - * CreateAccount. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GenerateRecoveryPhrase - */ - generateRecoveryPhrase: { - name: "GenerateRecoveryPhrase", - I: GenerateRecoveryPhraseRequest, - O: GenerateRecoveryPhraseResponse, - kind: MethodKind.Unary, - }, - /** - * Get the information for all keys in the keybase - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.ListKeyInfo - */ - listKeyInfo: { - name: "ListKeyInfo", - I: ListKeyInfoRequest, - O: ListKeyInfoResponse, - kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given name. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByName - */ - hasKeyByName: { - name: "HasKeyByName", - I: HasKeyByNameRequest, - O: HasKeyByNameResponse, - kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given address. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByAddress - */ - hasKeyByAddress: { - name: "HasKeyByAddress", - I: HasKeyByAddressRequest, - O: HasKeyByAddressResponse, - kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given name or bech32 string address. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByNameOrAddress - */ - hasKeyByNameOrAddress: { - name: "HasKeyByNameOrAddress", - I: HasKeyByNameOrAddressRequest, - O: HasKeyByNameOrAddressResponse, - kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given name. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByName - */ - getKeyInfoByName: { - name: "GetKeyInfoByName", - I: GetKeyInfoByNameRequest, - O: GetKeyInfoByNameResponse, - kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given address. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByAddress - */ - getKeyInfoByAddress: { - name: "GetKeyInfoByAddress", - I: GetKeyInfoByAddressRequest, - O: GetKeyInfoByAddressResponse, - kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given name or bech32 string address. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByNameOrAddress - */ - getKeyInfoByNameOrAddress: { - name: "GetKeyInfoByNameOrAddress", - I: GetKeyInfoByNameOrAddressRequest, - O: GetKeyInfoByNameOrAddressResponse, - kind: MethodKind.Unary, - }, - /** - * Create a new account the keybase using the name an password specified by SetAccount. - * If an account with the same name already exists in the keybase, - * this replaces it. (If you don't want to replace it, then it's your responsibility - * to use GetKeyInfoByName to check if it exists before calling this.) - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.CreateAccount - */ - createAccount: { - name: "CreateAccount", - I: CreateAccountRequest, - O: CreateAccountResponse, - kind: MethodKind.Unary, - }, - /** - * SelectAccount selects the active account to use for later operations - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SelectAccount - */ - selectAccount: { - name: "SelectAccount", - I: SelectAccountRequest, - O: SelectAccountResponse, - kind: MethodKind.Unary, - }, - /** - * Set the password for the active account in the keybase, used for later operations. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetPassword - */ - setPassword: { - name: "SetPassword", - I: SetPasswordRequest, - O: SetPasswordResponse, - kind: MethodKind.Unary, - }, - /** - * GetActiveAccount gets the active account which was set by SelectAccount. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * (To check if there is an active account, use ListKeyInfo and check the - * length of the result.) - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetActiveAccount - */ - getActiveAccount: { - name: "GetActiveAccount", - I: GetActiveAccountRequest, - O: GetActiveAccountResponse, - kind: MethodKind.Unary, - }, - /** - * QueryAccount retrieves account information from the blockchain for a given - * address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.QueryAccount - */ - queryAccount: { - name: "QueryAccount", - I: QueryAccountRequest, - O: QueryAccountResponse, - kind: MethodKind.Unary, - }, - /** - * DeleteAccount deletes the account with the given name, using the password - * to ensure access. However, if skip_password is true, then ignore the - * password. - * If the account doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.DeleteAccount - */ - deleteAccount: { - name: "DeleteAccount", - I: DeleteAccountRequest, - O: DeleteAccountResponse, - kind: MethodKind.Unary, - }, - /** - * Make an ABCI query to the remote node. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Query - */ - query: { - name: "Query", - I: QueryRequest, - O: QueryResponse, - kind: MethodKind.Unary, - }, - /** - * Render calls the Render function for package_path with optional args. The - * package path should include the prefix like "gno.land/". This is similar to - * using a browser URL /: where doesn't have - * the prefix like "gno.land/". - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Render - */ - render: { - name: "Render", - I: RenderRequest, - O: RenderResponse, - kind: MethodKind.Unary, - }, - /** - * QEval evaluates the given expression with the realm code at package_path. - * The package path should include the prefix like "gno.land/". The expression - * is usually a function call like "GetBoardIDFromName(\"testboard\")". The - * return value is a typed expression like - * "(1 gno.land/r/demo/boards.BoardID)\n(true bool)". - * If the path of a realm function call is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrUnknownRequest. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.QEval - */ - qEval: { - name: "QEval", - I: QEvalRequest, - O: QEvalResponse, - kind: MethodKind.Unary, - }, - /** - * Call a specific realm function. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * If the path of a realm function call is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrUnknownRequest. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Call - */ - call: { - name: "Call", - I: CallRequest, - O: CallResponse, - kind: MethodKind.ServerStreaming, - }, - /** - * Send currency from the active account to an account on the blockchain. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Send - */ - send: { - name: "Send", - I: SendRequest, - O: SendResponse, - kind: MethodKind.ServerStreaming, - }, - /** - * Temporarily load the code in package on the blockchain and run main() which can - * call realm functions and use println() to output to the "console". - * This returns the "console" output. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Run - */ - run: { - name: "Run", - I: RunRequest, - O: RunResponse, - kind: MethodKind.ServerStreaming, - }, - /** - * Convert a byte array address to a bech32 string address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.AddressToBech32 - */ - addressToBech32: { - name: "AddressToBech32", - I: AddressToBech32Request, - O: AddressToBech32Response, - kind: MethodKind.Unary, - }, - /** - * Convert a bech32 string address to a byte array address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.AddressFromBech32 - */ - addressFromBech32: { - name: "AddressFromBech32", - I: AddressFromBech32Request, - O: AddressFromBech32Response, - kind: MethodKind.Unary, - }, - /** - * Hello is for debug purposes - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Hello - */ - hello: { - name: "Hello", - I: HelloRequest, - O: HelloResponse, - kind: MethodKind.Unary, - }, - /** - * HelloStream is for debug purposes - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HelloStream - */ - helloStream: { - name: "HelloStream", - I: HelloStreamRequest, - O: HelloStreamResponse, - kind: MethodKind.ServerStreaming, - }, - } -}; - diff --git a/examples/react-native/gnoboard/src/api/rpc_pb.d.ts b/examples/react-native/gnoboard/src/api/rpc_pb.d.ts deleted file mode 100644 index ac974d77..00000000 --- a/examples/react-native/gnoboard/src/api/rpc_pb.d.ts +++ /dev/null @@ -1,247 +0,0 @@ -// @generated by protoc-gen-es v1.5.1 -// @generated from file rpc.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * The ErrCode enum defines errors for gRPC API functions. These are converted - * from the Go error types returned by gnoclient. - * - * ---------------- - * Special errors - * ---------------- - * - * @generated from enum land.gno.gnonative.v1.ErrCode - */ -export declare enum ErrCode { - /** - * Undefined is the default value. It should never be set manually - * - * @generated from enum value: Undefined = 0; - */ - Undefined = 0, - - /** - * TODO indicates that you plan to create an error later - * - * @generated from enum value: TODO = 1; - */ - TODO = 1, - - /** - * ErrNotImplemented indicates that a method is not implemented yet - * - * @generated from enum value: ErrNotImplemented = 2; - */ - ErrNotImplemented = 2, - - /** - * ErrInternal indicates an unknown error (without Code), i.e. in gRPC - * - * @generated from enum value: ErrInternal = 3; - */ - ErrInternal = 3, - - /** - * @generated from enum value: ErrInvalidInput = 100; - */ - ErrInvalidInput = 100, - - /** - * @generated from enum value: ErrBridgeInterrupted = 101; - */ - ErrBridgeInterrupted = 101, - - /** - * @generated from enum value: ErrMissingInput = 102; - */ - ErrMissingInput = 102, - - /** - * @generated from enum value: ErrSerialization = 103; - */ - ErrSerialization = 103, - - /** - * @generated from enum value: ErrDeserialization = 104; - */ - ErrDeserialization = 104, - - /** - * @generated from enum value: ErrInitService = 105; - */ - ErrInitService = 105, - - /** - * @generated from enum value: ErrCryptoKeyTypeUnknown = 150; - */ - ErrCryptoKeyTypeUnknown = 150, - - /** - * ErrCryptoKeyNotFound indicates that the doesn't exist in the keybase - * - * @generated from enum value: ErrCryptoKeyNotFound = 151; - */ - ErrCryptoKeyNotFound = 151, - - /** - * ErrNoActiveAccount indicates that no active account has been set with SelectAccount - * - * @generated from enum value: ErrNoActiveAccount = 152; - */ - ErrNoActiveAccount = 152, - - /** - * @generated from enum value: ErrRunGRPCServer = 153; - */ - ErrRunGRPCServer = 153, - - /** - * ErrDecryptionFailed indicates a decryption failure including a wrong password - * - * @generated from enum value: ErrDecryptionFailed = 154; - */ - ErrDecryptionFailed = 154, - - /** - * @generated from enum value: ErrTxDecode = 200; - */ - ErrTxDecode = 200, - - /** - * @generated from enum value: ErrInvalidSequence = 201; - */ - ErrInvalidSequence = 201, - - /** - * @generated from enum value: ErrUnauthorized = 202; - */ - ErrUnauthorized = 202, - - /** - * ErrInsufficientFunds indicates that there are insufficient funds to pay for fees - * - * @generated from enum value: ErrInsufficientFunds = 203; - */ - ErrInsufficientFunds = 203, - - /** - * ErrUnknownRequest indicates that the path of a realm function call is unrecognized - * - * @generated from enum value: ErrUnknownRequest = 204; - */ - ErrUnknownRequest = 204, - - /** - * ErrInvalidAddress indicates that an account address is blank or the bech32 can't be decoded - * - * @generated from enum value: ErrInvalidAddress = 205; - */ - ErrInvalidAddress = 205, - - /** - * ErrUnknownAddress indicates that the address is unknown on the blockchain - * - * @generated from enum value: ErrUnknownAddress = 206; - */ - ErrUnknownAddress = 206, - - /** - * ErrInvalidPubKey indicates that the public key was not found or has an invalid algorithm or format - * - * @generated from enum value: ErrInvalidPubKey = 207; - */ - ErrInvalidPubKey = 207, - - /** - * ErrInsufficientCoins indicates that the transaction has insufficient account funds to send - * - * @generated from enum value: ErrInsufficientCoins = 208; - */ - ErrInsufficientCoins = 208, - - /** - * ErrInvalidCoins indicates that the transaction Coins are not sorted, or don't have a - * positive amount, or the coin Denom contains upper case characters - * - * @generated from enum value: ErrInvalidCoins = 209; - */ - ErrInvalidCoins = 209, - - /** - * ErrInvalidGasWanted indicates that the transaction gas wanted is too large or otherwise invalid - * - * @generated from enum value: ErrInvalidGasWanted = 210; - */ - ErrInvalidGasWanted = 210, - - /** - * ErrOutOfGas indicates that the transaction doesn't have enough gas - * - * @generated from enum value: ErrOutOfGas = 211; - */ - ErrOutOfGas = 211, - - /** - * ErrMemoTooLarge indicates that the transaction memo is too large - * - * @generated from enum value: ErrMemoTooLarge = 212; - */ - ErrMemoTooLarge = 212, - - /** - * ErrInsufficientFee indicates that the gas fee is insufficient - * - * @generated from enum value: ErrInsufficientFee = 213; - */ - ErrInsufficientFee = 213, - - /** - * ErrTooManySignatures indicates that the transaction has too many signatures - * - * @generated from enum value: ErrTooManySignatures = 214; - */ - ErrTooManySignatures = 214, - - /** - * ErrNoSignatures indicates that the transaction has no signatures - * - * @generated from enum value: ErrNoSignatures = 215; - */ - ErrNoSignatures = 215, - - /** - * ErrGasOverflow that an action results in a gas consumption unsigned integer overflow - * - * @generated from enum value: ErrGasOverflow = 216; - */ - ErrGasOverflow = 216, -} - -/** - * @generated from message land.gno.gnonative.v1.ErrDetails - */ -export declare class ErrDetails extends Message { - /** - * @generated from field: repeated land.gno.gnonative.v1.ErrCode codes = 1; - */ - codes: ErrCode[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.ErrDetails"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ErrDetails; - - static fromJson(jsonValue: JsonValue, options?: Partial): ErrDetails; - - static fromJsonString(jsonString: string, options?: Partial): ErrDetails; - - static equals(a: ErrDetails | PlainMessage | undefined, b: ErrDetails | PlainMessage | undefined): boolean; -} - diff --git a/examples/react-native/gnoboard/src/api/rpc_pb.js b/examples/react-native/gnoboard/src/api/rpc_pb.js deleted file mode 100644 index e326cfb3..00000000 --- a/examples/react-native/gnoboard/src/api/rpc_pb.js +++ /dev/null @@ -1,65 +0,0 @@ -// @generated by protoc-gen-es v1.5.1 -// @generated from file rpc.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * The ErrCode enum defines errors for gRPC API functions. These are converted - * from the Go error types returned by gnoclient. - * - * ---------------- - * Special errors - * ---------------- - * - * @generated from enum land.gno.gnonative.v1.ErrCode - */ -export const ErrCode = proto3.makeEnum( - "land.gno.gnonative.v1.ErrCode", - [ - {no: 0, name: "Undefined"}, - {no: 1, name: "TODO"}, - {no: 2, name: "ErrNotImplemented"}, - {no: 3, name: "ErrInternal"}, - {no: 100, name: "ErrInvalidInput"}, - {no: 101, name: "ErrBridgeInterrupted"}, - {no: 102, name: "ErrMissingInput"}, - {no: 103, name: "ErrSerialization"}, - {no: 104, name: "ErrDeserialization"}, - {no: 105, name: "ErrInitService"}, - {no: 150, name: "ErrCryptoKeyTypeUnknown"}, - {no: 151, name: "ErrCryptoKeyNotFound"}, - {no: 152, name: "ErrNoActiveAccount"}, - {no: 153, name: "ErrRunGRPCServer"}, - {no: 154, name: "ErrDecryptionFailed"}, - {no: 200, name: "ErrTxDecode"}, - {no: 201, name: "ErrInvalidSequence"}, - {no: 202, name: "ErrUnauthorized"}, - {no: 203, name: "ErrInsufficientFunds"}, - {no: 204, name: "ErrUnknownRequest"}, - {no: 205, name: "ErrInvalidAddress"}, - {no: 206, name: "ErrUnknownAddress"}, - {no: 207, name: "ErrInvalidPubKey"}, - {no: 208, name: "ErrInsufficientCoins"}, - {no: 209, name: "ErrInvalidCoins"}, - {no: 210, name: "ErrInvalidGasWanted"}, - {no: 211, name: "ErrOutOfGas"}, - {no: 212, name: "ErrMemoTooLarge"}, - {no: 213, name: "ErrInsufficientFee"}, - {no: 214, name: "ErrTooManySignatures"}, - {no: 215, name: "ErrNoSignatures"}, - {no: 216, name: "ErrGasOverflow"}, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.ErrDetails - */ -export const ErrDetails = proto3.makeMessageType( - "land.gno.gnonative.v1.ErrDetails", - () => [ - { no: 1, name: "codes", kind: "enum", T: proto3.getEnumType(ErrCode), repeated: true }, - ], -); - diff --git a/examples/react-native/gnoboard/src/components/account/AccountBalance.tsx b/examples/react-native/gnoboard/src/components/account/AccountBalance.tsx index 66dda152..2243daa3 100644 --- a/examples/react-native/gnoboard/src/components/account/AccountBalance.tsx +++ b/examples/react-native/gnoboard/src/components/account/AccountBalance.tsx @@ -1,7 +1,7 @@ import Text from '../texts'; import styled from 'styled-components/native'; import { colors } from '@gno/styles'; -import { BaseAccount } from '@gno/api/gnonativetypes_pb'; +import { BaseAccount } from '@api/gnonativetypes_pb'; import Row from '../row'; export type Props = { diff --git a/examples/react-native/gnoboard/src/grpc/client.ts b/examples/react-native/gnoboard/src/grpc/client.ts index cd85d75c..228c7d08 100644 --- a/examples/react-native/gnoboard/src/grpc/client.ts +++ b/examples/react-native/gnoboard/src/grpc/client.ts @@ -1,6 +1,6 @@ import { createPromiseClient } from '@connectrpc/connect'; import { createNativeGrpcTransport } from './transport_native'; -import { GnoNativeService } from '@gno/api/rpc_connect'; +import { GnoNativeService } from '@api/rpc_connect'; // Create a GnoNativeService client export function createClient(_port: number) { diff --git a/examples/react-native/gnoboard/src/grpc/error.ts b/examples/react-native/gnoboard/src/grpc/error.ts index 4d2160d5..0d9c945d 100644 --- a/examples/react-native/gnoboard/src/grpc/error.ts +++ b/examples/react-native/gnoboard/src/grpc/error.ts @@ -1,4 +1,4 @@ -import { ErrCode } from '@gno/api/rpc_pb'; +import { ErrCode } from '@api/rpc_pb'; import { Code, ConnectError } from '@connectrpc/connect'; class GRPCError extends Error { diff --git a/examples/react-native/gnoboard/src/hooks/use-gno.ts b/examples/react-native/gnoboard/src/hooks/use-gno.ts index 334bcfeb..e9e71a57 100644 --- a/examples/react-native/gnoboard/src/hooks/use-gno.ts +++ b/examples/react-native/gnoboard/src/hooks/use-gno.ts @@ -1,41 +1,41 @@ -import { SetRemoteRequest, SetRemoteResponse } from '@gno/api/gnonativetypes_pb'; -import { GetRemoteRequest } from '@gno/api/gnonativetypes_pb'; -import { SetChainIDRequest, SetChainIDResponse } from '@gno/api/gnonativetypes_pb'; -import { GetChainIDRequest } from '@gno/api/gnonativetypes_pb'; -import { SetPasswordRequest, SetPasswordResponse } from '@gno/api/gnonativetypes_pb'; -import { SelectAccountRequest } from '@gno/api/gnonativetypes_pb'; -import { SelectAccountResponse } from '@gno/api/gnonativetypes_pb'; -import { CreateAccountRequest } from '@gno/api/gnonativetypes_pb'; -import { GenerateRecoveryPhraseRequest } from '@gno/api/gnonativetypes_pb'; -import { ListKeyInfoRequest } from '@gno/api/gnonativetypes_pb'; -import { HasKeyByNameRequest } from '@gno/api/gnonativetypes_pb'; -import { HasKeyByAddressRequest } from '@gno/api/gnonativetypes_pb'; -import { HasKeyByNameOrAddressRequest } from '@gno/api/gnonativetypes_pb'; -import { GetKeyInfoByNameRequest } from '@gno/api/gnonativetypes_pb'; -import { GetKeyInfoByAddressRequest } from '@gno/api/gnonativetypes_pb'; -import { GetKeyInfoByNameOrAddressRequest } from '@gno/api/gnonativetypes_pb'; -import { GetActiveAccountRequest } from '@gno/api/gnonativetypes_pb'; -import { GetActiveAccountResponse } from '@gno/api/gnonativetypes_pb'; -import { QueryAccountRequest } from '@gno/api/gnonativetypes_pb'; -import { QueryAccountResponse } from '@gno/api/gnonativetypes_pb'; -import { DeleteAccountRequest, DeleteAccountResponse } from '@gno/api/gnonativetypes_pb'; -import { QueryRequest } from '@gno/api/gnonativetypes_pb'; -import { QueryResponse } from '@gno/api/gnonativetypes_pb'; -import { RenderRequest } from '@gno/api/gnonativetypes_pb'; -import { QEvalRequest } from '@gno/api/gnonativetypes_pb'; -import { MsgCall } from '@gno/api/gnonativetypes_pb'; -import { CallRequest } from '@gno/api/gnonativetypes_pb'; -import { CallResponse } from '@gno/api/gnonativetypes_pb'; -import { MsgSend } from '@gno/api/gnonativetypes_pb'; -import { SendRequest } from '@gno/api/gnonativetypes_pb'; -import { SendResponse } from '@gno/api/gnonativetypes_pb'; -import { AddressToBech32Request } from '@gno/api/gnonativetypes_pb'; -import { AddressFromBech32Request } from '@gno/api/gnonativetypes_pb'; +import { SetRemoteRequest, SetRemoteResponse } from '@api/gnonativetypes_pb'; +import { GetRemoteRequest } from '@api/gnonativetypes_pb'; +import { SetChainIDRequest, SetChainIDResponse } from '@api/gnonativetypes_pb'; +import { GetChainIDRequest } from '@api/gnonativetypes_pb'; +import { SetPasswordRequest, SetPasswordResponse } from '@api/gnonativetypes_pb'; +import { SelectAccountRequest } from '@api/gnonativetypes_pb'; +import { SelectAccountResponse } from '@api/gnonativetypes_pb'; +import { CreateAccountRequest } from '@api/gnonativetypes_pb'; +import { GenerateRecoveryPhraseRequest } from '@api/gnonativetypes_pb'; +import { ListKeyInfoRequest } from '@api/gnonativetypes_pb'; +import { HasKeyByNameRequest } from '@api/gnonativetypes_pb'; +import { HasKeyByAddressRequest } from '@api/gnonativetypes_pb'; +import { HasKeyByNameOrAddressRequest } from '@api/gnonativetypes_pb'; +import { GetKeyInfoByNameRequest } from '@api/gnonativetypes_pb'; +import { GetKeyInfoByAddressRequest } from '@api/gnonativetypes_pb'; +import { GetKeyInfoByNameOrAddressRequest } from '@api/gnonativetypes_pb'; +import { GetActiveAccountRequest } from '@api/gnonativetypes_pb'; +import { GetActiveAccountResponse } from '@api/gnonativetypes_pb'; +import { QueryAccountRequest } from '@api/gnonativetypes_pb'; +import { QueryAccountResponse } from '@api/gnonativetypes_pb'; +import { DeleteAccountRequest, DeleteAccountResponse } from '@api/gnonativetypes_pb'; +import { QueryRequest } from '@api/gnonativetypes_pb'; +import { QueryResponse } from '@api/gnonativetypes_pb'; +import { RenderRequest } from '@api/gnonativetypes_pb'; +import { QEvalRequest } from '@api/gnonativetypes_pb'; +import { MsgCall } from '@api/gnonativetypes_pb'; +import { CallRequest } from '@api/gnonativetypes_pb'; +import { CallResponse } from '@api/gnonativetypes_pb'; +import { MsgSend } from '@api/gnonativetypes_pb'; +import { SendRequest } from '@api/gnonativetypes_pb'; +import { SendResponse } from '@api/gnonativetypes_pb'; +import { AddressToBech32Request } from '@api/gnonativetypes_pb'; +import { AddressFromBech32Request } from '@api/gnonativetypes_pb'; import * as Grpc from '@gno/grpc/client'; import { GnoAccount } from '@gno/native_modules/types'; import { GoBridge } from '@gno/native_modules'; import { PromiseClient } from '@connectrpc/connect'; -import { GnoNativeService } from '@gno/api/rpc_connect'; +import { GnoNativeService } from '@api/rpc_connect'; export interface GnoResponse { setRemote: (remote: string) => Promise; diff --git a/examples/react-native/gnoboard/src/native_modules/types.ts b/examples/react-native/gnoboard/src/native_modules/types.ts index 8f4150f1..8e7e8674 100644 --- a/examples/react-native/gnoboard/src/native_modules/types.ts +++ b/examples/react-native/gnoboard/src/native_modules/types.ts @@ -1,4 +1,4 @@ -import { KeyInfo } from '@gno/api/gnonativetypes_pb'; +import { KeyInfo } from '@api/gnonativetypes_pb'; export type GnoConfig = { Remote: string; diff --git a/examples/react-native/gnoboard/src/screens/devmode/index.tsx b/examples/react-native/gnoboard/src/screens/devmode/index.tsx index b3c6b5a5..5315b32d 100644 --- a/examples/react-native/gnoboard/src/screens/devmode/index.tsx +++ b/examples/react-native/gnoboard/src/screens/devmode/index.tsx @@ -8,7 +8,7 @@ import Layout from '@gno/components/pages'; import { useGno } from '@gno/hooks/use-gno'; import { Buffer } from 'buffer'; import ReenterPassword from '../switch-accounts/ReenterPassword'; -import { ErrCode } from '@gno/api/rpc_pb'; +import { ErrCode } from '@api/rpc_pb'; import { GRPCError } from '@gno/grpc/error'; import { Spacer } from '@gno/components/row'; import Text from '@gno/components/texts'; diff --git a/examples/react-native/gnoboard/src/screens/switch-accounts/ReenterPassword.tsx b/examples/react-native/gnoboard/src/screens/switch-accounts/ReenterPassword.tsx index 4d332111..a693db39 100644 --- a/examples/react-native/gnoboard/src/screens/switch-accounts/ReenterPassword.tsx +++ b/examples/react-native/gnoboard/src/screens/switch-accounts/ReenterPassword.tsx @@ -1,5 +1,5 @@ import { GRPCError } from '@gno/grpc/error'; -import { ErrCode } from '@gno/api/rpc_pb'; +import { ErrCode } from '@api/rpc_pb'; import Alert from '@gno/components/alert'; import Button from '@gno/components/buttons'; import { Modal } from '@gno/components/modal'; diff --git a/examples/react-native/gnoboard/src/screens/wallet/home/index.tsx b/examples/react-native/gnoboard/src/screens/wallet/home/index.tsx index fcea6c1d..1574c3e1 100644 --- a/examples/react-native/gnoboard/src/screens/wallet/home/index.tsx +++ b/examples/react-native/gnoboard/src/screens/wallet/home/index.tsx @@ -10,11 +10,11 @@ import CurrentAccount from '@gno/components/account/CurrentAccoutn'; import { useGno } from '@gno/hooks/use-gno'; import Loading from '@gno/screens/loading'; import { GnoAccount } from '@gno/native_modules/types'; -import { QueryAccountResponse } from '@gno/api/gnonativetypes_pb'; +import { QueryAccountResponse } from '@api/gnonativetypes_pb'; import { AccountBalance } from '@gno/components/account'; import { Spacer } from '@gno/components/row'; import { ConnectError } from '@connectrpc/connect'; -import { ErrCode } from '@gno/api/rpc_pb'; +import { ErrCode } from '@api/rpc_pb'; import { GRPCError } from '@gno/grpc/error'; export const Home: React.FC = () => { diff --git a/examples/react-native/gnoboard/tsconfig.json b/examples/react-native/gnoboard/tsconfig.json index 96e4044c..f636e724 100644 --- a/examples/react-native/gnoboard/tsconfig.json +++ b/examples/react-native/gnoboard/tsconfig.json @@ -4,7 +4,8 @@ "baseUrl": ".", "paths": { "@gno/*": ["src/*"], - "@styles/*": ["src/styles/*"] + "@styles/*": ["src/styles/*"], + "@api/*": ["../../../api/gen/es/*"] } } } diff --git a/examples/react-native/hello/ios/hello.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/react-native/hello/ios/hello.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/react-native/hello/ios/hello.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/react-native/hello/src/api/gnonativetypes_pb.d.ts b/examples/react-native/hello/src/api/gnonativetypes_pb.d.ts deleted file mode 100644 index d4108712..00000000 --- a/examples/react-native/hello/src/api/gnonativetypes_pb.d.ts +++ /dev/null @@ -1,1639 +0,0 @@ -// @generated by protoc-gen-es v1.7.2 -// @generated from file gnonativetypes.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * messages - * - * @generated from message land.gno.gnonative.v1.SetRemoteRequest - */ -export declare class SetRemoteRequest extends Message { - /** - * @generated from field: string remote = 1; - */ - remote: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetRemoteRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetRemoteRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetRemoteRequest; - - static fromJsonString(jsonString: string, options?: Partial): SetRemoteRequest; - - static equals(a: SetRemoteRequest | PlainMessage | undefined, b: SetRemoteRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SetRemoteResponse - */ -export declare class SetRemoteResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetRemoteResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetRemoteResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetRemoteResponse; - - static fromJsonString(jsonString: string, options?: Partial): SetRemoteResponse; - - static equals(a: SetRemoteResponse | PlainMessage | undefined, b: SetRemoteResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetRemoteRequest - */ -export declare class GetRemoteRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetRemoteRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetRemoteRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetRemoteRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetRemoteRequest; - - static equals(a: GetRemoteRequest | PlainMessage | undefined, b: GetRemoteRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetRemoteResponse - */ -export declare class GetRemoteResponse extends Message { - /** - * @generated from field: string remote = 1; - */ - remote: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetRemoteResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetRemoteResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetRemoteResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetRemoteResponse; - - static equals(a: GetRemoteResponse | PlainMessage | undefined, b: GetRemoteResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SetChainIDRequest - */ -export declare class SetChainIDRequest extends Message { - /** - * @generated from field: string chain_id = 1; - */ - chainId: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetChainIDRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetChainIDRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetChainIDRequest; - - static fromJsonString(jsonString: string, options?: Partial): SetChainIDRequest; - - static equals(a: SetChainIDRequest | PlainMessage | undefined, b: SetChainIDRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SetChainIDResponse - */ -export declare class SetChainIDResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetChainIDResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetChainIDResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetChainIDResponse; - - static fromJsonString(jsonString: string, options?: Partial): SetChainIDResponse; - - static equals(a: SetChainIDResponse | PlainMessage | undefined, b: SetChainIDResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetChainIDRequest - */ -export declare class GetChainIDRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetChainIDRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetChainIDRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetChainIDRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetChainIDRequest; - - static equals(a: GetChainIDRequest | PlainMessage | undefined, b: GetChainIDRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetChainIDResponse - */ -export declare class GetChainIDResponse extends Message { - /** - * @generated from field: string chain_id = 1; - */ - chainId: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetChainIDResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetChainIDResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetChainIDResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetChainIDResponse; - - static equals(a: GetChainIDResponse | PlainMessage | undefined, b: GetChainIDResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SetPasswordRequest - */ -export declare class SetPasswordRequest extends Message { - /** - * @generated from field: string password = 1; - */ - password: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetPasswordRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetPasswordRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetPasswordRequest; - - static fromJsonString(jsonString: string, options?: Partial): SetPasswordRequest; - - static equals(a: SetPasswordRequest | PlainMessage | undefined, b: SetPasswordRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SetPasswordResponse - */ -export declare class SetPasswordResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SetPasswordResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SetPasswordResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): SetPasswordResponse; - - static fromJsonString(jsonString: string, options?: Partial): SetPasswordResponse; - - static equals(a: SetPasswordResponse | PlainMessage | undefined, b: SetPasswordResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GenerateRecoveryPhraseRequest - */ -export declare class GenerateRecoveryPhraseRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GenerateRecoveryPhraseRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateRecoveryPhraseRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateRecoveryPhraseRequest; - - static fromJsonString(jsonString: string, options?: Partial): GenerateRecoveryPhraseRequest; - - static equals(a: GenerateRecoveryPhraseRequest | PlainMessage | undefined, b: GenerateRecoveryPhraseRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GenerateRecoveryPhraseResponse - */ -export declare class GenerateRecoveryPhraseResponse extends Message { - /** - * @generated from field: string phrase = 1; - */ - phrase: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GenerateRecoveryPhraseResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GenerateRecoveryPhraseResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GenerateRecoveryPhraseResponse; - - static fromJsonString(jsonString: string, options?: Partial): GenerateRecoveryPhraseResponse; - - static equals(a: GenerateRecoveryPhraseResponse | PlainMessage | undefined, b: GenerateRecoveryPhraseResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.KeyInfo - */ -export declare class KeyInfo extends Message { - /** - * 0: local, 1: ledger, 2: offline, 3: multi - * - * @generated from field: uint32 type = 1; - */ - type: number; - - /** - * @generated from field: string name = 2; - */ - name: string; - - /** - * @generated from field: bytes pub_key = 3; - */ - pubKey: Uint8Array; - - /** - * @generated from field: bytes address = 4; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.KeyInfo"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): KeyInfo; - - static fromJson(jsonValue: JsonValue, options?: Partial): KeyInfo; - - static fromJsonString(jsonString: string, options?: Partial): KeyInfo; - - static equals(a: KeyInfo | PlainMessage | undefined, b: KeyInfo | PlainMessage | undefined): boolean; -} - -/** - * Coin holds some amount of one currency. - * A negative amount is invalid. - * - * @generated from message land.gno.gnonative.v1.Coin - */ -export declare class Coin extends Message { - /** - * @generated from field: string denom = 1; - */ - denom: string; - - /** - * @generated from field: sint64 amount = 2; - */ - amount: bigint; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.Coin"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Coin; - - static fromJson(jsonValue: JsonValue, options?: Partial): Coin; - - static fromJsonString(jsonString: string, options?: Partial): Coin; - - static equals(a: Coin | PlainMessage | undefined, b: Coin | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.BaseAccount - */ -export declare class BaseAccount extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - /** - * @generated from field: repeated land.gno.gnonative.v1.Coin coins = 2; - */ - coins: Coin[]; - - /** - * @generated from field: bytes pub_key = 3; - */ - pubKey: Uint8Array; - - /** - * @generated from field: uint64 account_number = 4; - */ - accountNumber: bigint; - - /** - * @generated from field: uint64 sequence = 5; - */ - sequence: bigint; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.BaseAccount"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): BaseAccount; - - static fromJson(jsonValue: JsonValue, options?: Partial): BaseAccount; - - static fromJsonString(jsonString: string, options?: Partial): BaseAccount; - - static equals(a: BaseAccount | PlainMessage | undefined, b: BaseAccount | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.ListKeyInfoRequest - */ -export declare class ListKeyInfoRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.ListKeyInfoRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListKeyInfoRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListKeyInfoRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListKeyInfoRequest; - - static equals(a: ListKeyInfoRequest | PlainMessage | undefined, b: ListKeyInfoRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.ListKeyInfoResponse - */ -export declare class ListKeyInfoResponse extends Message { - /** - * @generated from field: repeated land.gno.gnonative.v1.KeyInfo keys = 1 [json_name = "key_info"]; - */ - keys: KeyInfo[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.ListKeyInfoResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListKeyInfoResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListKeyInfoResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListKeyInfoResponse; - - static equals(a: ListKeyInfoResponse | PlainMessage | undefined, b: ListKeyInfoResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameRequest - */ -export declare class HasKeyByNameRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByNameRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByNameRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByNameRequest; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByNameRequest; - - static equals(a: HasKeyByNameRequest | PlainMessage | undefined, b: HasKeyByNameRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameResponse - */ -export declare class HasKeyByNameResponse extends Message { - /** - * @generated from field: bool has = 1; - */ - has: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByNameResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByNameResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByNameResponse; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByNameResponse; - - static equals(a: HasKeyByNameResponse | PlainMessage | undefined, b: HasKeyByNameResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByAddressRequest - */ -export declare class HasKeyByAddressRequest extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByAddressRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByAddressRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByAddressRequest; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByAddressRequest; - - static equals(a: HasKeyByAddressRequest | PlainMessage | undefined, b: HasKeyByAddressRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByAddressResponse - */ -export declare class HasKeyByAddressResponse extends Message { - /** - * @generated from field: bool has = 1; - */ - has: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByAddressResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByAddressResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByAddressResponse; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByAddressResponse; - - static equals(a: HasKeyByAddressResponse | PlainMessage | undefined, b: HasKeyByAddressResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameOrAddressRequest - */ -export declare class HasKeyByNameOrAddressRequest extends Message { - /** - * @generated from field: string name_or_bech32 = 1; - */ - nameOrBech32: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByNameOrAddressRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByNameOrAddressRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByNameOrAddressRequest; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByNameOrAddressRequest; - - static equals(a: HasKeyByNameOrAddressRequest | PlainMessage | undefined, b: HasKeyByNameOrAddressRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameOrAddressResponse - */ -export declare class HasKeyByNameOrAddressResponse extends Message { - /** - * @generated from field: bool has = 1; - */ - has: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HasKeyByNameOrAddressResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeyByNameOrAddressResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeyByNameOrAddressResponse; - - static fromJsonString(jsonString: string, options?: Partial): HasKeyByNameOrAddressResponse; - - static equals(a: HasKeyByNameOrAddressResponse | PlainMessage | undefined, b: HasKeyByNameOrAddressResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameRequest - */ -export declare class GetKeyInfoByNameRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByNameRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByNameRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByNameRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByNameRequest; - - static equals(a: GetKeyInfoByNameRequest | PlainMessage | undefined, b: GetKeyInfoByNameRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameResponse - */ -export declare class GetKeyInfoByNameResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByNameResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByNameResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByNameResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByNameResponse; - - static equals(a: GetKeyInfoByNameResponse | PlainMessage | undefined, b: GetKeyInfoByNameResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByAddressRequest - */ -export declare class GetKeyInfoByAddressRequest extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByAddressRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByAddressRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByAddressRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByAddressRequest; - - static equals(a: GetKeyInfoByAddressRequest | PlainMessage | undefined, b: GetKeyInfoByAddressRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByAddressResponse - */ -export declare class GetKeyInfoByAddressResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByAddressResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByAddressResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByAddressResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByAddressResponse; - - static equals(a: GetKeyInfoByAddressResponse | PlainMessage | undefined, b: GetKeyInfoByAddressResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameOrAddressRequest - */ -export declare class GetKeyInfoByNameOrAddressRequest extends Message { - /** - * @generated from field: string name_or_bech32 = 1; - */ - nameOrBech32: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByNameOrAddressRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByNameOrAddressRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByNameOrAddressRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByNameOrAddressRequest; - - static equals(a: GetKeyInfoByNameOrAddressRequest | PlainMessage | undefined, b: GetKeyInfoByNameOrAddressRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameOrAddressResponse - */ -export declare class GetKeyInfoByNameOrAddressResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetKeyInfoByNameOrAddressResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeyInfoByNameOrAddressResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeyInfoByNameOrAddressResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetKeyInfoByNameOrAddressResponse; - - static equals(a: GetKeyInfoByNameOrAddressResponse | PlainMessage | undefined, b: GetKeyInfoByNameOrAddressResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.CreateAccountRequest - */ -export declare class CreateAccountRequest extends Message { - /** - * @generated from field: string name_or_bech32 = 1; - */ - nameOrBech32: string; - - /** - * @generated from field: string mnemonic = 2; - */ - mnemonic: string; - - /** - * @generated from field: string bip39_passwd = 3; - */ - bip39Passwd: string; - - /** - * @generated from field: string password = 4; - */ - password: string; - - /** - * @generated from field: uint32 account = 5; - */ - account: number; - - /** - * @generated from field: uint32 index = 6; - */ - index: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.CreateAccountRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAccountRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAccountRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateAccountRequest; - - static equals(a: CreateAccountRequest | PlainMessage | undefined, b: CreateAccountRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.CreateAccountResponse - */ -export declare class CreateAccountResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.CreateAccountResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateAccountResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateAccountResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateAccountResponse; - - static equals(a: CreateAccountResponse | PlainMessage | undefined, b: CreateAccountResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SelectAccountRequest - */ -export declare class SelectAccountRequest extends Message { - /** - * @generated from field: string name_or_bech32 = 1; - */ - nameOrBech32: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SelectAccountRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SelectAccountRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): SelectAccountRequest; - - static fromJsonString(jsonString: string, options?: Partial): SelectAccountRequest; - - static equals(a: SelectAccountRequest | PlainMessage | undefined, b: SelectAccountRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SelectAccountResponse - */ -export declare class SelectAccountResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - /** - * True if the password has been set. If false, then call SetPassword. - * - * @generated from field: bool has_password = 2; - */ - hasPassword: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SelectAccountResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SelectAccountResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): SelectAccountResponse; - - static fromJsonString(jsonString: string, options?: Partial): SelectAccountResponse; - - static equals(a: SelectAccountResponse | PlainMessage | undefined, b: SelectAccountResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetActiveAccountRequest - */ -export declare class GetActiveAccountRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetActiveAccountRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetActiveAccountRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetActiveAccountRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetActiveAccountRequest; - - static equals(a: GetActiveAccountRequest | PlainMessage | undefined, b: GetActiveAccountRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.GetActiveAccountResponse - */ -export declare class GetActiveAccountResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.KeyInfo key = 1 [json_name = "key_info"]; - */ - key?: KeyInfo; - - /** - * True if the password has been set. If false, then call SetPassword. - * - * @generated from field: bool has_password = 2; - */ - hasPassword: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.GetActiveAccountResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetActiveAccountResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetActiveAccountResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetActiveAccountResponse; - - static equals(a: GetActiveAccountResponse | PlainMessage | undefined, b: GetActiveAccountResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QueryAccountRequest - */ -export declare class QueryAccountRequest extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QueryAccountRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QueryAccountRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): QueryAccountRequest; - - static fromJsonString(jsonString: string, options?: Partial): QueryAccountRequest; - - static equals(a: QueryAccountRequest | PlainMessage | undefined, b: QueryAccountRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QueryAccountResponse - */ -export declare class QueryAccountResponse extends Message { - /** - * @generated from field: land.gno.gnonative.v1.BaseAccount account_info = 1; - */ - accountInfo?: BaseAccount; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QueryAccountResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QueryAccountResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): QueryAccountResponse; - - static fromJsonString(jsonString: string, options?: Partial): QueryAccountResponse; - - static equals(a: QueryAccountResponse | PlainMessage | undefined, b: QueryAccountResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.DeleteAccountRequest - */ -export declare class DeleteAccountRequest extends Message { - /** - * @generated from field: string name_or_bech32 = 1; - */ - nameOrBech32: string; - - /** - * @generated from field: string password = 2; - */ - password: string; - - /** - * @generated from field: bool skip_password = 3; - */ - skipPassword: boolean; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.DeleteAccountRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteAccountRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteAccountRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteAccountRequest; - - static equals(a: DeleteAccountRequest | PlainMessage | undefined, b: DeleteAccountRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.DeleteAccountResponse - */ -export declare class DeleteAccountResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.DeleteAccountResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteAccountResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteAccountResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteAccountResponse; - - static equals(a: DeleteAccountResponse | PlainMessage | undefined, b: DeleteAccountResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QueryRequest - */ -export declare class QueryRequest extends Message { - /** - * Example: "vm/qrender" - * - * @generated from field: string path = 1; - */ - path: string; - - /** - * Example: "gno.land/r/demo/boards\ntestboard" - * - * @generated from field: bytes data = 2; - */ - data: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QueryRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QueryRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): QueryRequest; - - static fromJsonString(jsonString: string, options?: Partial): QueryRequest; - - static equals(a: QueryRequest | PlainMessage | undefined, b: QueryRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QueryResponse - */ -export declare class QueryResponse extends Message { - /** - * @generated from field: bytes result = 1; - */ - result: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QueryResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QueryResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): QueryResponse; - - static fromJsonString(jsonString: string, options?: Partial): QueryResponse; - - static equals(a: QueryResponse | PlainMessage | undefined, b: QueryResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.RenderRequest - */ -export declare class RenderRequest extends Message { - /** - * Example: "gno.land/r/demo/boards" - * - * @generated from field: string package_path = 1; - */ - packagePath: string; - - /** - * Example: "testboard/1" - * - * @generated from field: string args = 2; - */ - args: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.RenderRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RenderRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): RenderRequest; - - static fromJsonString(jsonString: string, options?: Partial): RenderRequest; - - static equals(a: RenderRequest | PlainMessage | undefined, b: RenderRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.RenderResponse - */ -export declare class RenderResponse extends Message { - /** - * The Render function result (typically markdown) - * - * @generated from field: string result = 1; - */ - result: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.RenderResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RenderResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): RenderResponse; - - static fromJsonString(jsonString: string, options?: Partial): RenderResponse; - - static equals(a: RenderResponse | PlainMessage | undefined, b: RenderResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QEvalRequest - */ -export declare class QEvalRequest extends Message { - /** - * Example: "gno.land/r/demo/boards" - * - * @generated from field: string package_path = 1; - */ - packagePath: string; - - /** - * Example: "GetBoardIDFromName(\"testboard\")" - * - * @generated from field: string expression = 2; - */ - expression: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QEvalRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QEvalRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): QEvalRequest; - - static fromJsonString(jsonString: string, options?: Partial): QEvalRequest; - - static equals(a: QEvalRequest | PlainMessage | undefined, b: QEvalRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.QEvalResponse - */ -export declare class QEvalResponse extends Message { - /** - * A typed expression like "(1 gno.land/r/demo/boards.BoardID)\n(true bool)" - * - * @generated from field: string result = 1; - */ - result: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.QEvalResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): QEvalResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): QEvalResponse; - - static fromJsonString(jsonString: string, options?: Partial): QEvalResponse; - - static equals(a: QEvalResponse | PlainMessage | undefined, b: QEvalResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.MsgCall - */ -export declare class MsgCall extends Message { - /** - * Example: "gno.land/r/demo/boards" - * - * @generated from field: string package_path = 1; - */ - packagePath: string; - - /** - * Example: "CreateReply" - * - * @generated from field: string fnc = 2; - */ - fnc: string; - - /** - * list of arguments specific to the function - * Example: ["1", "1", "2", "my reply"] - * - * @generated from field: repeated string args = 3; - */ - args: string[]; - - /** - * @generated from field: string send = 4; - */ - send: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.MsgCall"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): MsgCall; - - static fromJson(jsonValue: JsonValue, options?: Partial): MsgCall; - - static fromJsonString(jsonString: string, options?: Partial): MsgCall; - - static equals(a: MsgCall | PlainMessage | undefined, b: MsgCall | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.CallRequest - */ -export declare class CallRequest extends Message { - /** - * @generated from field: string gas_fee = 1; - */ - gasFee: string; - - /** - * @generated from field: sint64 gas_wanted = 2; - */ - gasWanted: bigint; - - /** - * @generated from field: string memo = 3; - */ - memo: string; - - /** - * list of calls to make in one transaction - * - * @generated from field: repeated land.gno.gnonative.v1.MsgCall msgs = 4 [json_name = "Msgs"]; - */ - msgs: MsgCall[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.CallRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CallRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CallRequest; - - static fromJsonString(jsonString: string, options?: Partial): CallRequest; - - static equals(a: CallRequest | PlainMessage | undefined, b: CallRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.CallResponse - */ -export declare class CallResponse extends Message { - /** - * @generated from field: bytes result = 1; - */ - result: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.CallResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CallResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CallResponse; - - static fromJsonString(jsonString: string, options?: Partial): CallResponse; - - static equals(a: CallResponse | PlainMessage | undefined, b: CallResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.MsgSend - */ -export declare class MsgSend extends Message { - /** - * Example: The response of calling AddressFromBech32 with - * "g1juz2yxmdsa6audkp6ep9vfv80c8p5u76e03vvh" - * - * @generated from field: bytes to_address = 1; - */ - toAddress: Uint8Array; - - /** - * Example: "1000ugnot" - * - * @generated from field: string send = 2; - */ - send: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.MsgSend"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): MsgSend; - - static fromJson(jsonValue: JsonValue, options?: Partial): MsgSend; - - static fromJsonString(jsonString: string, options?: Partial): MsgSend; - - static equals(a: MsgSend | PlainMessage | undefined, b: MsgSend | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SendRequest - */ -export declare class SendRequest extends Message { - /** - * @generated from field: string gas_fee = 1; - */ - gasFee: string; - - /** - * @generated from field: sint64 gas_wanted = 2; - */ - gasWanted: bigint; - - /** - * Memo is optional - * - * @generated from field: string memo = 3; - */ - memo: string; - - /** - * list of send operations to make in one transaction - * - * @generated from field: repeated land.gno.gnonative.v1.MsgSend msgs = 4 [json_name = "Msgs"]; - */ - msgs: MsgSend[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SendRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SendRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): SendRequest; - - static fromJsonString(jsonString: string, options?: Partial): SendRequest; - - static equals(a: SendRequest | PlainMessage | undefined, b: SendRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.SendResponse - */ -export declare class SendResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.SendResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): SendResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): SendResponse; - - static fromJsonString(jsonString: string, options?: Partial): SendResponse; - - static equals(a: SendResponse | PlainMessage | undefined, b: SendResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.RunRequest - */ -export declare class RunRequest extends Message { - /** - * The code for the script package. Must have main(). - * Example: "package main\nfunc main() {\n println(\"Hello\")\n}" - * - * @generated from field: string package = 1; - */ - package: string; - - /** - * @generated from field: string gas_fee = 2; - */ - gasFee: string; - - /** - * @generated from field: sint64 gas_wanted = 3; - */ - gasWanted: bigint; - - /** - * Memo is optional - * - * @generated from field: string memo = 4; - */ - memo: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.RunRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RunRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): RunRequest; - - static fromJsonString(jsonString: string, options?: Partial): RunRequest; - - static equals(a: RunRequest | PlainMessage | undefined, b: RunRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.RunResponse - */ -export declare class RunResponse extends Message { - /** - * The "console" output from the run - * - * @generated from field: string result = 1; - */ - result: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.RunResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): RunResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): RunResponse; - - static fromJsonString(jsonString: string, options?: Partial): RunResponse; - - static equals(a: RunResponse | PlainMessage | undefined, b: RunResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.AddressToBech32Request - */ -export declare class AddressToBech32Request extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.AddressToBech32Request"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AddressToBech32Request; - - static fromJson(jsonValue: JsonValue, options?: Partial): AddressToBech32Request; - - static fromJsonString(jsonString: string, options?: Partial): AddressToBech32Request; - - static equals(a: AddressToBech32Request | PlainMessage | undefined, b: AddressToBech32Request | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.AddressToBech32Response - */ -export declare class AddressToBech32Response extends Message { - /** - * @generated from field: string bech32_address = 1; - */ - bech32Address: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.AddressToBech32Response"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AddressToBech32Response; - - static fromJson(jsonValue: JsonValue, options?: Partial): AddressToBech32Response; - - static fromJsonString(jsonString: string, options?: Partial): AddressToBech32Response; - - static equals(a: AddressToBech32Response | PlainMessage | undefined, b: AddressToBech32Response | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.AddressFromBech32Request - */ -export declare class AddressFromBech32Request extends Message { - /** - * @generated from field: string bech32_address = 1; - */ - bech32Address: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.AddressFromBech32Request"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AddressFromBech32Request; - - static fromJson(jsonValue: JsonValue, options?: Partial): AddressFromBech32Request; - - static fromJsonString(jsonString: string, options?: Partial): AddressFromBech32Request; - - static equals(a: AddressFromBech32Request | PlainMessage | undefined, b: AddressFromBech32Request | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.AddressFromBech32Response - */ -export declare class AddressFromBech32Response extends Message { - /** - * @generated from field: bytes address = 1; - */ - address: Uint8Array; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.AddressFromBech32Response"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AddressFromBech32Response; - - static fromJson(jsonValue: JsonValue, options?: Partial): AddressFromBech32Response; - - static fromJsonString(jsonString: string, options?: Partial): AddressFromBech32Response; - - static equals(a: AddressFromBech32Response | PlainMessage | undefined, b: AddressFromBech32Response | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HelloRequest - */ -export declare class HelloRequest extends Message { - /** - * @generated from field: string name = 1 [json_name = "Name"]; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HelloRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HelloRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): HelloRequest; - - static fromJsonString(jsonString: string, options?: Partial): HelloRequest; - - static equals(a: HelloRequest | PlainMessage | undefined, b: HelloRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HelloResponse - */ -export declare class HelloResponse extends Message { - /** - * @generated from field: string greeting = 1 [json_name = "Greeting"]; - */ - greeting: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HelloResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HelloResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): HelloResponse; - - static fromJsonString(jsonString: string, options?: Partial): HelloResponse; - - static equals(a: HelloResponse | PlainMessage | undefined, b: HelloResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HelloStreamRequest - */ -export declare class HelloStreamRequest extends Message { - /** - * @generated from field: string name = 1 [json_name = "Name"]; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HelloStreamRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HelloStreamRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): HelloStreamRequest; - - static fromJsonString(jsonString: string, options?: Partial): HelloStreamRequest; - - static equals(a: HelloStreamRequest | PlainMessage | undefined, b: HelloStreamRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message land.gno.gnonative.v1.HelloStreamResponse - */ -export declare class HelloStreamResponse extends Message { - /** - * @generated from field: string greeting = 1 [json_name = "Greeting"]; - */ - greeting: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.HelloStreamResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HelloStreamResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): HelloStreamResponse; - - static fromJsonString(jsonString: string, options?: Partial): HelloStreamResponse; - - static equals(a: HelloStreamResponse | PlainMessage | undefined, b: HelloStreamResponse | PlainMessage | undefined): boolean; -} - diff --git a/examples/react-native/hello/src/api/gnonativetypes_pb.js b/examples/react-native/hello/src/api/gnonativetypes_pb.js deleted file mode 100644 index bdc24aac..00000000 --- a/examples/react-native/hello/src/api/gnonativetypes_pb.js +++ /dev/null @@ -1,635 +0,0 @@ -// @generated by protoc-gen-es v1.7.2 -// @generated from file gnonativetypes.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * messages - * - * @generated from message land.gno.gnonative.v1.SetRemoteRequest - */ -export const SetRemoteRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.SetRemoteRequest", - () => [ - { no: 1, name: "remote", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SetRemoteResponse - */ -export const SetRemoteResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.SetRemoteResponse", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GetRemoteRequest - */ -export const GetRemoteRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetRemoteRequest", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GetRemoteResponse - */ -export const GetRemoteResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetRemoteResponse", - () => [ - { no: 1, name: "remote", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SetChainIDRequest - */ -export const SetChainIDRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.SetChainIDRequest", - () => [ - { no: 1, name: "chain_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SetChainIDResponse - */ -export const SetChainIDResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.SetChainIDResponse", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GetChainIDRequest - */ -export const GetChainIDRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetChainIDRequest", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GetChainIDResponse - */ -export const GetChainIDResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetChainIDResponse", - () => [ - { no: 1, name: "chain_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SetPasswordRequest - */ -export const SetPasswordRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.SetPasswordRequest", - () => [ - { no: 1, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SetPasswordResponse - */ -export const SetPasswordResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.SetPasswordResponse", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GenerateRecoveryPhraseRequest - */ -export const GenerateRecoveryPhraseRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GenerateRecoveryPhraseRequest", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GenerateRecoveryPhraseResponse - */ -export const GenerateRecoveryPhraseResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GenerateRecoveryPhraseResponse", - () => [ - { no: 1, name: "phrase", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.KeyInfo - */ -export const KeyInfo = proto3.makeMessageType( - "land.gno.gnonative.v1.KeyInfo", - () => [ - { no: 1, name: "type", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "pub_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 4, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * Coin holds some amount of one currency. - * A negative amount is invalid. - * - * @generated from message land.gno.gnonative.v1.Coin - */ -export const Coin = proto3.makeMessageType( - "land.gno.gnonative.v1.Coin", - () => [ - { no: 1, name: "denom", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "amount", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.BaseAccount - */ -export const BaseAccount = proto3.makeMessageType( - "land.gno.gnonative.v1.BaseAccount", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "coins", kind: "message", T: Coin, repeated: true }, - { no: 3, name: "pub_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 4, name: "account_number", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 5, name: "sequence", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.ListKeyInfoRequest - */ -export const ListKeyInfoRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.ListKeyInfoRequest", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.ListKeyInfoResponse - */ -export const ListKeyInfoResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.ListKeyInfoResponse", - () => [ - { no: 1, name: "keys", jsonName: "key_info", kind: "message", T: KeyInfo, repeated: true }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameRequest - */ -export const HasKeyByNameRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByNameRequest", - () => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameResponse - */ -export const HasKeyByNameResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByNameResponse", - () => [ - { no: 1, name: "has", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByAddressRequest - */ -export const HasKeyByAddressRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByAddressRequest", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByAddressResponse - */ -export const HasKeyByAddressResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByAddressResponse", - () => [ - { no: 1, name: "has", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameOrAddressRequest - */ -export const HasKeyByNameOrAddressRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByNameOrAddressRequest", - () => [ - { no: 1, name: "name_or_bech32", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HasKeyByNameOrAddressResponse - */ -export const HasKeyByNameOrAddressResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.HasKeyByNameOrAddressResponse", - () => [ - { no: 1, name: "has", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameRequest - */ -export const GetKeyInfoByNameRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByNameRequest", - () => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameResponse - */ -export const GetKeyInfoByNameResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByNameResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByAddressRequest - */ -export const GetKeyInfoByAddressRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByAddressRequest", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByAddressResponse - */ -export const GetKeyInfoByAddressResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByAddressResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameOrAddressRequest - */ -export const GetKeyInfoByNameOrAddressRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByNameOrAddressRequest", - () => [ - { no: 1, name: "name_or_bech32", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetKeyInfoByNameOrAddressResponse - */ -export const GetKeyInfoByNameOrAddressResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetKeyInfoByNameOrAddressResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.CreateAccountRequest - */ -export const CreateAccountRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.CreateAccountRequest", - () => [ - { no: 1, name: "name_or_bech32", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "mnemonic", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "bip39_passwd", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "account", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 6, name: "index", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.CreateAccountResponse - */ -export const CreateAccountResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.CreateAccountResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SelectAccountRequest - */ -export const SelectAccountRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.SelectAccountRequest", - () => [ - { no: 1, name: "name_or_bech32", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SelectAccountResponse - */ -export const SelectAccountResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.SelectAccountResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - { no: 2, name: "has_password", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.GetActiveAccountRequest - */ -export const GetActiveAccountRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.GetActiveAccountRequest", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.GetActiveAccountResponse - */ -export const GetActiveAccountResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.GetActiveAccountResponse", - () => [ - { no: 1, name: "key", jsonName: "key_info", kind: "message", T: KeyInfo }, - { no: 2, name: "has_password", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.QueryAccountRequest - */ -export const QueryAccountRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.QueryAccountRequest", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.QueryAccountResponse - */ -export const QueryAccountResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.QueryAccountResponse", - () => [ - { no: 1, name: "account_info", kind: "message", T: BaseAccount }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.DeleteAccountRequest - */ -export const DeleteAccountRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.DeleteAccountRequest", - () => [ - { no: 1, name: "name_or_bech32", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "skip_password", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.DeleteAccountResponse - */ -export const DeleteAccountResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.DeleteAccountResponse", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.QueryRequest - */ -export const QueryRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.QueryRequest", - () => [ - { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.QueryResponse - */ -export const QueryResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.QueryResponse", - () => [ - { no: 1, name: "result", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.RenderRequest - */ -export const RenderRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.RenderRequest", - () => [ - { no: 1, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "args", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.RenderResponse - */ -export const RenderResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.RenderResponse", - () => [ - { no: 1, name: "result", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.QEvalRequest - */ -export const QEvalRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.QEvalRequest", - () => [ - { no: 1, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "expression", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.QEvalResponse - */ -export const QEvalResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.QEvalResponse", - () => [ - { no: 1, name: "result", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.MsgCall - */ -export const MsgCall = proto3.makeMessageType( - "land.gno.gnonative.v1.MsgCall", - () => [ - { no: 1, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "fnc", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "args", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "send", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.CallRequest - */ -export const CallRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.CallRequest", - () => [ - { no: 1, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, - { no: 3, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "msgs", jsonName: "Msgs", kind: "message", T: MsgCall, repeated: true }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.CallResponse - */ -export const CallResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.CallResponse", - () => [ - { no: 1, name: "result", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.MsgSend - */ -export const MsgSend = proto3.makeMessageType( - "land.gno.gnonative.v1.MsgSend", - () => [ - { no: 1, name: "to_address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: "send", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SendRequest - */ -export const SendRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.SendRequest", - () => [ - { no: 1, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, - { no: 3, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "msgs", jsonName: "Msgs", kind: "message", T: MsgSend, repeated: true }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.SendResponse - */ -export const SendResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.SendResponse", - [], -); - -/** - * @generated from message land.gno.gnonative.v1.RunRequest - */ -export const RunRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.RunRequest", - () => [ - { no: 1, name: "package", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, - { no: 4, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.RunResponse - */ -export const RunResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.RunResponse", - () => [ - { no: 1, name: "result", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.AddressToBech32Request - */ -export const AddressToBech32Request = proto3.makeMessageType( - "land.gno.gnonative.v1.AddressToBech32Request", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.AddressToBech32Response - */ -export const AddressToBech32Response = proto3.makeMessageType( - "land.gno.gnonative.v1.AddressToBech32Response", - () => [ - { no: 1, name: "bech32_address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.AddressFromBech32Request - */ -export const AddressFromBech32Request = proto3.makeMessageType( - "land.gno.gnonative.v1.AddressFromBech32Request", - () => [ - { no: 1, name: "bech32_address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.AddressFromBech32Response - */ -export const AddressFromBech32Response = proto3.makeMessageType( - "land.gno.gnonative.v1.AddressFromBech32Response", - () => [ - { no: 1, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HelloRequest - */ -export const HelloRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.HelloRequest", - () => [ - { no: 1, name: "name", jsonName: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HelloResponse - */ -export const HelloResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.HelloResponse", - () => [ - { no: 1, name: "greeting", jsonName: "Greeting", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HelloStreamRequest - */ -export const HelloStreamRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.HelloStreamRequest", - () => [ - { no: 1, name: "name", jsonName: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.HelloStreamResponse - */ -export const HelloStreamResponse = proto3.makeMessageType( - "land.gno.gnonative.v1.HelloStreamResponse", - () => [ - { no: 1, name: "greeting", jsonName: "Greeting", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - diff --git a/examples/react-native/hello/src/api/rpc_connect.d.ts b/examples/react-native/hello/src/api/rpc_connect.d.ts deleted file mode 100644 index 05b25297..00000000 --- a/examples/react-native/hello/src/api/rpc_connect.d.ts +++ /dev/null @@ -1,367 +0,0 @@ -// @generated by protoc-gen-connect-es v1.3.0 -// @generated from file rpc.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { AddressFromBech32Request, AddressFromBech32Response, AddressToBech32Request, AddressToBech32Response, CallRequest, CallResponse, CreateAccountRequest, CreateAccountResponse, DeleteAccountRequest, DeleteAccountResponse, GenerateRecoveryPhraseRequest, GenerateRecoveryPhraseResponse, GetActiveAccountRequest, GetActiveAccountResponse, GetChainIDRequest, GetChainIDResponse, GetKeyInfoByAddressRequest, GetKeyInfoByAddressResponse, GetKeyInfoByNameOrAddressRequest, GetKeyInfoByNameOrAddressResponse, GetKeyInfoByNameRequest, GetKeyInfoByNameResponse, GetRemoteRequest, GetRemoteResponse, HasKeyByAddressRequest, HasKeyByAddressResponse, HasKeyByNameOrAddressRequest, HasKeyByNameOrAddressResponse, HasKeyByNameRequest, HasKeyByNameResponse, HelloRequest, HelloResponse, HelloStreamRequest, HelloStreamResponse, ListKeyInfoRequest, ListKeyInfoResponse, QEvalRequest, QEvalResponse, QueryAccountRequest, QueryAccountResponse, QueryRequest, QueryResponse, RenderRequest, RenderResponse, RunRequest, RunResponse, SelectAccountRequest, SelectAccountResponse, SendRequest, SendResponse, SetChainIDRequest, SetChainIDResponse, SetPasswordRequest, SetPasswordResponse, SetRemoteRequest, SetRemoteResponse } from "./gnonativetypes_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * GnoNativeService is the service to interact with the Gno blockchain - * - * @generated from service land.gno.gnonative.v1.GnoNativeService - */ -export declare const GnoNativeService: { - readonly typeName: "land.gno.gnonative.v1.GnoNativeService", - readonly methods: { - /** - * Set the connection address for the remote node. If you don't call this, - * the default is "127.0.0.1:26657" - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetRemote - */ - readonly setRemote: { - readonly name: "SetRemote", - readonly I: typeof SetRemoteRequest, - readonly O: typeof SetRemoteResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the connection address for the remote node. The response is either - * the initial default, or the value which was set with SetRemote - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetRemote - */ - readonly getRemote: { - readonly name: "GetRemote", - readonly I: typeof GetRemoteRequest, - readonly O: typeof GetRemoteResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Set the chain ID for the remote node. If you don't call this, the default - * is "dev" - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetChainID - */ - readonly setChainID: { - readonly name: "SetChainID", - readonly I: typeof SetChainIDRequest, - readonly O: typeof SetChainIDResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the chain ID for the remote node. The response is either - * the initial default, or the value which was set with SetChainID - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetChainID - */ - readonly getChainID: { - readonly name: "GetChainID", - readonly I: typeof GetChainIDRequest, - readonly O: typeof GetChainIDResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Generate a recovery phrase of BIP39 mnemonic words using entropy from the - * crypto library random number generator. This can be used as the mnemonic in - * CreateAccount. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GenerateRecoveryPhrase - */ - readonly generateRecoveryPhrase: { - readonly name: "GenerateRecoveryPhrase", - readonly I: typeof GenerateRecoveryPhraseRequest, - readonly O: typeof GenerateRecoveryPhraseResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the information for all keys in the keybase - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.ListKeyInfo - */ - readonly listKeyInfo: { - readonly name: "ListKeyInfo", - readonly I: typeof ListKeyInfoRequest, - readonly O: typeof ListKeyInfoResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given name. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByName - */ - readonly hasKeyByName: { - readonly name: "HasKeyByName", - readonly I: typeof HasKeyByNameRequest, - readonly O: typeof HasKeyByNameResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given address. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByAddress - */ - readonly hasKeyByAddress: { - readonly name: "HasKeyByAddress", - readonly I: typeof HasKeyByAddressRequest, - readonly O: typeof HasKeyByAddressResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given name or bech32 string address. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByNameOrAddress - */ - readonly hasKeyByNameOrAddress: { - readonly name: "HasKeyByNameOrAddress", - readonly I: typeof HasKeyByNameOrAddressRequest, - readonly O: typeof HasKeyByNameOrAddressResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given name. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByName - */ - readonly getKeyInfoByName: { - readonly name: "GetKeyInfoByName", - readonly I: typeof GetKeyInfoByNameRequest, - readonly O: typeof GetKeyInfoByNameResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given address. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByAddress - */ - readonly getKeyInfoByAddress: { - readonly name: "GetKeyInfoByAddress", - readonly I: typeof GetKeyInfoByAddressRequest, - readonly O: typeof GetKeyInfoByAddressResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given name or bech32 string address. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByNameOrAddress - */ - readonly getKeyInfoByNameOrAddress: { - readonly name: "GetKeyInfoByNameOrAddress", - readonly I: typeof GetKeyInfoByNameOrAddressRequest, - readonly O: typeof GetKeyInfoByNameOrAddressResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Create a new account the keybase using the name an password specified by SetAccount. - * If an account with the same name already exists in the keybase, - * this replaces it. (If you don't want to replace it, then it's your responsibility - * to use GetKeyInfoByName to check if it exists before calling this.) - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.CreateAccount - */ - readonly createAccount: { - readonly name: "CreateAccount", - readonly I: typeof CreateAccountRequest, - readonly O: typeof CreateAccountResponse, - readonly kind: MethodKind.Unary, - }, - /** - * SelectAccount selects the active account to use for later operations - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SelectAccount - */ - readonly selectAccount: { - readonly name: "SelectAccount", - readonly I: typeof SelectAccountRequest, - readonly O: typeof SelectAccountResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Set the password for the active account in the keybase, used for later operations. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetPassword - */ - readonly setPassword: { - readonly name: "SetPassword", - readonly I: typeof SetPasswordRequest, - readonly O: typeof SetPasswordResponse, - readonly kind: MethodKind.Unary, - }, - /** - * GetActiveAccount gets the active account which was set by SelectAccount. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * (To check if there is an active account, use ListKeyInfo and check the - * length of the result.) - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetActiveAccount - */ - readonly getActiveAccount: { - readonly name: "GetActiveAccount", - readonly I: typeof GetActiveAccountRequest, - readonly O: typeof GetActiveAccountResponse, - readonly kind: MethodKind.Unary, - }, - /** - * QueryAccount retrieves account information from the blockchain for a given - * address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.QueryAccount - */ - readonly queryAccount: { - readonly name: "QueryAccount", - readonly I: typeof QueryAccountRequest, - readonly O: typeof QueryAccountResponse, - readonly kind: MethodKind.Unary, - }, - /** - * DeleteAccount deletes the account with the given name, using the password - * to ensure access. However, if skip_password is true, then ignore the - * password. - * If the account doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.DeleteAccount - */ - readonly deleteAccount: { - readonly name: "DeleteAccount", - readonly I: typeof DeleteAccountRequest, - readonly O: typeof DeleteAccountResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Make an ABCI query to the remote node. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Query - */ - readonly query: { - readonly name: "Query", - readonly I: typeof QueryRequest, - readonly O: typeof QueryResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Render calls the Render function for package_path with optional args. The - * package path should include the prefix like "gno.land/". This is similar to - * using a browser URL /: where doesn't have - * the prefix like "gno.land/". - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Render - */ - readonly render: { - readonly name: "Render", - readonly I: typeof RenderRequest, - readonly O: typeof RenderResponse, - readonly kind: MethodKind.Unary, - }, - /** - * QEval evaluates the given expression with the realm code at package_path. - * The package path should include the prefix like "gno.land/". The expression - * is usually a function call like "GetBoardIDFromName(\"testboard\")". The - * return value is a typed expression like - * "(1 gno.land/r/demo/boards.BoardID)\n(true bool)". - * If the path of a realm function call is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrUnknownRequest. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.QEval - */ - readonly qEval: { - readonly name: "QEval", - readonly I: typeof QEvalRequest, - readonly O: typeof QEvalResponse, - readonly kind: MethodKind.Unary, - }, - /** - * Call a specific realm function. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * If the path of a realm function call is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrUnknownRequest. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Call - */ - readonly call: { - readonly name: "Call", - readonly I: typeof CallRequest, - readonly O: typeof CallResponse, - readonly kind: MethodKind.ServerStreaming, - }, - /** - * Send currency from the active account to an account on the blockchain. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Send - */ - readonly send: { - readonly name: "Send", - readonly I: typeof SendRequest, - readonly O: typeof SendResponse, - readonly kind: MethodKind.ServerStreaming, - }, - /** - * Temporarily load the code in package on the blockchain and run main() which can - * call realm functions and use println() to output to the "console". - * This returns the "console" output. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Run - */ - readonly run: { - readonly name: "Run", - readonly I: typeof RunRequest, - readonly O: typeof RunResponse, - readonly kind: MethodKind.ServerStreaming, - }, - /** - * Convert a byte array address to a bech32 string address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.AddressToBech32 - */ - readonly addressToBech32: { - readonly name: "AddressToBech32", - readonly I: typeof AddressToBech32Request, - readonly O: typeof AddressToBech32Response, - readonly kind: MethodKind.Unary, - }, - /** - * Convert a bech32 string address to a byte array address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.AddressFromBech32 - */ - readonly addressFromBech32: { - readonly name: "AddressFromBech32", - readonly I: typeof AddressFromBech32Request, - readonly O: typeof AddressFromBech32Response, - readonly kind: MethodKind.Unary, - }, - /** - * Hello is for debug purposes - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Hello - */ - readonly hello: { - readonly name: "Hello", - readonly I: typeof HelloRequest, - readonly O: typeof HelloResponse, - readonly kind: MethodKind.Unary, - }, - /** - * HelloStream is for debug purposes - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HelloStream - */ - readonly helloStream: { - readonly name: "HelloStream", - readonly I: typeof HelloStreamRequest, - readonly O: typeof HelloStreamResponse, - readonly kind: MethodKind.ServerStreaming, - }, - } -}; - diff --git a/examples/react-native/hello/src/api/rpc_connect.js b/examples/react-native/hello/src/api/rpc_connect.js deleted file mode 100644 index 671bb831..00000000 --- a/examples/react-native/hello/src/api/rpc_connect.js +++ /dev/null @@ -1,367 +0,0 @@ -// @generated by protoc-gen-connect-es v1.3.0 -// @generated from file rpc.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { AddressFromBech32Request, AddressFromBech32Response, AddressToBech32Request, AddressToBech32Response, CallRequest, CallResponse, CreateAccountRequest, CreateAccountResponse, DeleteAccountRequest, DeleteAccountResponse, GenerateRecoveryPhraseRequest, GenerateRecoveryPhraseResponse, GetActiveAccountRequest, GetActiveAccountResponse, GetChainIDRequest, GetChainIDResponse, GetKeyInfoByAddressRequest, GetKeyInfoByAddressResponse, GetKeyInfoByNameOrAddressRequest, GetKeyInfoByNameOrAddressResponse, GetKeyInfoByNameRequest, GetKeyInfoByNameResponse, GetRemoteRequest, GetRemoteResponse, HasKeyByAddressRequest, HasKeyByAddressResponse, HasKeyByNameOrAddressRequest, HasKeyByNameOrAddressResponse, HasKeyByNameRequest, HasKeyByNameResponse, HelloRequest, HelloResponse, HelloStreamRequest, HelloStreamResponse, ListKeyInfoRequest, ListKeyInfoResponse, QEvalRequest, QEvalResponse, QueryAccountRequest, QueryAccountResponse, QueryRequest, QueryResponse, RenderRequest, RenderResponse, RunRequest, RunResponse, SelectAccountRequest, SelectAccountResponse, SendRequest, SendResponse, SetChainIDRequest, SetChainIDResponse, SetPasswordRequest, SetPasswordResponse, SetRemoteRequest, SetRemoteResponse } from "./gnonativetypes_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * GnoNativeService is the service to interact with the Gno blockchain - * - * @generated from service land.gno.gnonative.v1.GnoNativeService - */ -export const GnoNativeService = { - typeName: "land.gno.gnonative.v1.GnoNativeService", - methods: { - /** - * Set the connection address for the remote node. If you don't call this, - * the default is "127.0.0.1:26657" - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetRemote - */ - setRemote: { - name: "SetRemote", - I: SetRemoteRequest, - O: SetRemoteResponse, - kind: MethodKind.Unary, - }, - /** - * Get the connection address for the remote node. The response is either - * the initial default, or the value which was set with SetRemote - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetRemote - */ - getRemote: { - name: "GetRemote", - I: GetRemoteRequest, - O: GetRemoteResponse, - kind: MethodKind.Unary, - }, - /** - * Set the chain ID for the remote node. If you don't call this, the default - * is "dev" - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetChainID - */ - setChainID: { - name: "SetChainID", - I: SetChainIDRequest, - O: SetChainIDResponse, - kind: MethodKind.Unary, - }, - /** - * Get the chain ID for the remote node. The response is either - * the initial default, or the value which was set with SetChainID - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetChainID - */ - getChainID: { - name: "GetChainID", - I: GetChainIDRequest, - O: GetChainIDResponse, - kind: MethodKind.Unary, - }, - /** - * Generate a recovery phrase of BIP39 mnemonic words using entropy from the - * crypto library random number generator. This can be used as the mnemonic in - * CreateAccount. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GenerateRecoveryPhrase - */ - generateRecoveryPhrase: { - name: "GenerateRecoveryPhrase", - I: GenerateRecoveryPhraseRequest, - O: GenerateRecoveryPhraseResponse, - kind: MethodKind.Unary, - }, - /** - * Get the information for all keys in the keybase - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.ListKeyInfo - */ - listKeyInfo: { - name: "ListKeyInfo", - I: ListKeyInfoRequest, - O: ListKeyInfoResponse, - kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given name. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByName - */ - hasKeyByName: { - name: "HasKeyByName", - I: HasKeyByNameRequest, - O: HasKeyByNameResponse, - kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given address. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByAddress - */ - hasKeyByAddress: { - name: "HasKeyByAddress", - I: HasKeyByAddressRequest, - O: HasKeyByAddressResponse, - kind: MethodKind.Unary, - }, - /** - * Check for the key in the keybase with the given name or bech32 string address. - * In the response, set has true if the keybase has the key. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HasKeyByNameOrAddress - */ - hasKeyByNameOrAddress: { - name: "HasKeyByNameOrAddress", - I: HasKeyByNameOrAddressRequest, - O: HasKeyByNameOrAddressResponse, - kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given name. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByName - */ - getKeyInfoByName: { - name: "GetKeyInfoByName", - I: GetKeyInfoByNameRequest, - O: GetKeyInfoByNameResponse, - kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given address. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByAddress - */ - getKeyInfoByAddress: { - name: "GetKeyInfoByAddress", - I: GetKeyInfoByAddressRequest, - O: GetKeyInfoByAddressResponse, - kind: MethodKind.Unary, - }, - /** - * Get the information for the key in the keybase with the given name or bech32 string address. - * If the key doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetKeyInfoByNameOrAddress - */ - getKeyInfoByNameOrAddress: { - name: "GetKeyInfoByNameOrAddress", - I: GetKeyInfoByNameOrAddressRequest, - O: GetKeyInfoByNameOrAddressResponse, - kind: MethodKind.Unary, - }, - /** - * Create a new account the keybase using the name an password specified by SetAccount. - * If an account with the same name already exists in the keybase, - * this replaces it. (If you don't want to replace it, then it's your responsibility - * to use GetKeyInfoByName to check if it exists before calling this.) - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.CreateAccount - */ - createAccount: { - name: "CreateAccount", - I: CreateAccountRequest, - O: CreateAccountResponse, - kind: MethodKind.Unary, - }, - /** - * SelectAccount selects the active account to use for later operations - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SelectAccount - */ - selectAccount: { - name: "SelectAccount", - I: SelectAccountRequest, - O: SelectAccountResponse, - kind: MethodKind.Unary, - }, - /** - * Set the password for the active account in the keybase, used for later operations. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.SetPassword - */ - setPassword: { - name: "SetPassword", - I: SetPasswordRequest, - O: SetPasswordResponse, - kind: MethodKind.Unary, - }, - /** - * GetActiveAccount gets the active account which was set by SelectAccount. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * (To check if there is an active account, use ListKeyInfo and check the - * length of the result.) - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.GetActiveAccount - */ - getActiveAccount: { - name: "GetActiveAccount", - I: GetActiveAccountRequest, - O: GetActiveAccountResponse, - kind: MethodKind.Unary, - }, - /** - * QueryAccount retrieves account information from the blockchain for a given - * address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.QueryAccount - */ - queryAccount: { - name: "QueryAccount", - I: QueryAccountRequest, - O: QueryAccountResponse, - kind: MethodKind.Unary, - }, - /** - * DeleteAccount deletes the account with the given name, using the password - * to ensure access. However, if skip_password is true, then ignore the - * password. - * If the account doesn't exist, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrCryptoKeyNotFound. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.DeleteAccount - */ - deleteAccount: { - name: "DeleteAccount", - I: DeleteAccountRequest, - O: DeleteAccountResponse, - kind: MethodKind.Unary, - }, - /** - * Make an ABCI query to the remote node. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Query - */ - query: { - name: "Query", - I: QueryRequest, - O: QueryResponse, - kind: MethodKind.Unary, - }, - /** - * Render calls the Render function for package_path with optional args. The - * package path should include the prefix like "gno.land/". This is similar to - * using a browser URL /: where doesn't have - * the prefix like "gno.land/". - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Render - */ - render: { - name: "Render", - I: RenderRequest, - O: RenderResponse, - kind: MethodKind.Unary, - }, - /** - * QEval evaluates the given expression with the realm code at package_path. - * The package path should include the prefix like "gno.land/". The expression - * is usually a function call like "GetBoardIDFromName(\"testboard\")". The - * return value is a typed expression like - * "(1 gno.land/r/demo/boards.BoardID)\n(true bool)". - * If the path of a realm function call is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrUnknownRequest. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.QEval - */ - qEval: { - name: "QEval", - I: QEvalRequest, - O: QEvalResponse, - kind: MethodKind.Unary, - }, - /** - * Call a specific realm function. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * If the path of a realm function call is unrecognized, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrUnknownRequest. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Call - */ - call: { - name: "Call", - I: CallRequest, - O: CallResponse, - kind: MethodKind.ServerStreaming, - }, - /** - * Send currency from the active account to an account on the blockchain. - * If no active account has been set with SelectAccount, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrNoActiveAccount. - * If the password is wrong, return [ErrCode](#land.gno.gnonative.v1.ErrCode).ErrDecryptionFailed. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Send - */ - send: { - name: "Send", - I: SendRequest, - O: SendResponse, - kind: MethodKind.ServerStreaming, - }, - /** - * Temporarily load the code in package on the blockchain and run main() which can - * call realm functions and use println() to output to the "console". - * This returns the "console" output. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Run - */ - run: { - name: "Run", - I: RunRequest, - O: RunResponse, - kind: MethodKind.ServerStreaming, - }, - /** - * Convert a byte array address to a bech32 string address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.AddressToBech32 - */ - addressToBech32: { - name: "AddressToBech32", - I: AddressToBech32Request, - O: AddressToBech32Response, - kind: MethodKind.Unary, - }, - /** - * Convert a bech32 string address to a byte array address. - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.AddressFromBech32 - */ - addressFromBech32: { - name: "AddressFromBech32", - I: AddressFromBech32Request, - O: AddressFromBech32Response, - kind: MethodKind.Unary, - }, - /** - * Hello is for debug purposes - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.Hello - */ - hello: { - name: "Hello", - I: HelloRequest, - O: HelloResponse, - kind: MethodKind.Unary, - }, - /** - * HelloStream is for debug purposes - * - * @generated from rpc land.gno.gnonative.v1.GnoNativeService.HelloStream - */ - helloStream: { - name: "HelloStream", - I: HelloStreamRequest, - O: HelloStreamResponse, - kind: MethodKind.ServerStreaming, - }, - } -}; - diff --git a/examples/react-native/hello/src/api/rpc_pb.d.ts b/examples/react-native/hello/src/api/rpc_pb.d.ts deleted file mode 100644 index ac974d77..00000000 --- a/examples/react-native/hello/src/api/rpc_pb.d.ts +++ /dev/null @@ -1,247 +0,0 @@ -// @generated by protoc-gen-es v1.5.1 -// @generated from file rpc.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * The ErrCode enum defines errors for gRPC API functions. These are converted - * from the Go error types returned by gnoclient. - * - * ---------------- - * Special errors - * ---------------- - * - * @generated from enum land.gno.gnonative.v1.ErrCode - */ -export declare enum ErrCode { - /** - * Undefined is the default value. It should never be set manually - * - * @generated from enum value: Undefined = 0; - */ - Undefined = 0, - - /** - * TODO indicates that you plan to create an error later - * - * @generated from enum value: TODO = 1; - */ - TODO = 1, - - /** - * ErrNotImplemented indicates that a method is not implemented yet - * - * @generated from enum value: ErrNotImplemented = 2; - */ - ErrNotImplemented = 2, - - /** - * ErrInternal indicates an unknown error (without Code), i.e. in gRPC - * - * @generated from enum value: ErrInternal = 3; - */ - ErrInternal = 3, - - /** - * @generated from enum value: ErrInvalidInput = 100; - */ - ErrInvalidInput = 100, - - /** - * @generated from enum value: ErrBridgeInterrupted = 101; - */ - ErrBridgeInterrupted = 101, - - /** - * @generated from enum value: ErrMissingInput = 102; - */ - ErrMissingInput = 102, - - /** - * @generated from enum value: ErrSerialization = 103; - */ - ErrSerialization = 103, - - /** - * @generated from enum value: ErrDeserialization = 104; - */ - ErrDeserialization = 104, - - /** - * @generated from enum value: ErrInitService = 105; - */ - ErrInitService = 105, - - /** - * @generated from enum value: ErrCryptoKeyTypeUnknown = 150; - */ - ErrCryptoKeyTypeUnknown = 150, - - /** - * ErrCryptoKeyNotFound indicates that the doesn't exist in the keybase - * - * @generated from enum value: ErrCryptoKeyNotFound = 151; - */ - ErrCryptoKeyNotFound = 151, - - /** - * ErrNoActiveAccount indicates that no active account has been set with SelectAccount - * - * @generated from enum value: ErrNoActiveAccount = 152; - */ - ErrNoActiveAccount = 152, - - /** - * @generated from enum value: ErrRunGRPCServer = 153; - */ - ErrRunGRPCServer = 153, - - /** - * ErrDecryptionFailed indicates a decryption failure including a wrong password - * - * @generated from enum value: ErrDecryptionFailed = 154; - */ - ErrDecryptionFailed = 154, - - /** - * @generated from enum value: ErrTxDecode = 200; - */ - ErrTxDecode = 200, - - /** - * @generated from enum value: ErrInvalidSequence = 201; - */ - ErrInvalidSequence = 201, - - /** - * @generated from enum value: ErrUnauthorized = 202; - */ - ErrUnauthorized = 202, - - /** - * ErrInsufficientFunds indicates that there are insufficient funds to pay for fees - * - * @generated from enum value: ErrInsufficientFunds = 203; - */ - ErrInsufficientFunds = 203, - - /** - * ErrUnknownRequest indicates that the path of a realm function call is unrecognized - * - * @generated from enum value: ErrUnknownRequest = 204; - */ - ErrUnknownRequest = 204, - - /** - * ErrInvalidAddress indicates that an account address is blank or the bech32 can't be decoded - * - * @generated from enum value: ErrInvalidAddress = 205; - */ - ErrInvalidAddress = 205, - - /** - * ErrUnknownAddress indicates that the address is unknown on the blockchain - * - * @generated from enum value: ErrUnknownAddress = 206; - */ - ErrUnknownAddress = 206, - - /** - * ErrInvalidPubKey indicates that the public key was not found or has an invalid algorithm or format - * - * @generated from enum value: ErrInvalidPubKey = 207; - */ - ErrInvalidPubKey = 207, - - /** - * ErrInsufficientCoins indicates that the transaction has insufficient account funds to send - * - * @generated from enum value: ErrInsufficientCoins = 208; - */ - ErrInsufficientCoins = 208, - - /** - * ErrInvalidCoins indicates that the transaction Coins are not sorted, or don't have a - * positive amount, or the coin Denom contains upper case characters - * - * @generated from enum value: ErrInvalidCoins = 209; - */ - ErrInvalidCoins = 209, - - /** - * ErrInvalidGasWanted indicates that the transaction gas wanted is too large or otherwise invalid - * - * @generated from enum value: ErrInvalidGasWanted = 210; - */ - ErrInvalidGasWanted = 210, - - /** - * ErrOutOfGas indicates that the transaction doesn't have enough gas - * - * @generated from enum value: ErrOutOfGas = 211; - */ - ErrOutOfGas = 211, - - /** - * ErrMemoTooLarge indicates that the transaction memo is too large - * - * @generated from enum value: ErrMemoTooLarge = 212; - */ - ErrMemoTooLarge = 212, - - /** - * ErrInsufficientFee indicates that the gas fee is insufficient - * - * @generated from enum value: ErrInsufficientFee = 213; - */ - ErrInsufficientFee = 213, - - /** - * ErrTooManySignatures indicates that the transaction has too many signatures - * - * @generated from enum value: ErrTooManySignatures = 214; - */ - ErrTooManySignatures = 214, - - /** - * ErrNoSignatures indicates that the transaction has no signatures - * - * @generated from enum value: ErrNoSignatures = 215; - */ - ErrNoSignatures = 215, - - /** - * ErrGasOverflow that an action results in a gas consumption unsigned integer overflow - * - * @generated from enum value: ErrGasOverflow = 216; - */ - ErrGasOverflow = 216, -} - -/** - * @generated from message land.gno.gnonative.v1.ErrDetails - */ -export declare class ErrDetails extends Message { - /** - * @generated from field: repeated land.gno.gnonative.v1.ErrCode codes = 1; - */ - codes: ErrCode[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "land.gno.gnonative.v1.ErrDetails"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ErrDetails; - - static fromJson(jsonValue: JsonValue, options?: Partial): ErrDetails; - - static fromJsonString(jsonString: string, options?: Partial): ErrDetails; - - static equals(a: ErrDetails | PlainMessage | undefined, b: ErrDetails | PlainMessage | undefined): boolean; -} - diff --git a/examples/react-native/hello/src/api/rpc_pb.js b/examples/react-native/hello/src/api/rpc_pb.js deleted file mode 100644 index e326cfb3..00000000 --- a/examples/react-native/hello/src/api/rpc_pb.js +++ /dev/null @@ -1,65 +0,0 @@ -// @generated by protoc-gen-es v1.5.1 -// @generated from file rpc.proto (package land.gno.gnonative.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * The ErrCode enum defines errors for gRPC API functions. These are converted - * from the Go error types returned by gnoclient. - * - * ---------------- - * Special errors - * ---------------- - * - * @generated from enum land.gno.gnonative.v1.ErrCode - */ -export const ErrCode = proto3.makeEnum( - "land.gno.gnonative.v1.ErrCode", - [ - {no: 0, name: "Undefined"}, - {no: 1, name: "TODO"}, - {no: 2, name: "ErrNotImplemented"}, - {no: 3, name: "ErrInternal"}, - {no: 100, name: "ErrInvalidInput"}, - {no: 101, name: "ErrBridgeInterrupted"}, - {no: 102, name: "ErrMissingInput"}, - {no: 103, name: "ErrSerialization"}, - {no: 104, name: "ErrDeserialization"}, - {no: 105, name: "ErrInitService"}, - {no: 150, name: "ErrCryptoKeyTypeUnknown"}, - {no: 151, name: "ErrCryptoKeyNotFound"}, - {no: 152, name: "ErrNoActiveAccount"}, - {no: 153, name: "ErrRunGRPCServer"}, - {no: 154, name: "ErrDecryptionFailed"}, - {no: 200, name: "ErrTxDecode"}, - {no: 201, name: "ErrInvalidSequence"}, - {no: 202, name: "ErrUnauthorized"}, - {no: 203, name: "ErrInsufficientFunds"}, - {no: 204, name: "ErrUnknownRequest"}, - {no: 205, name: "ErrInvalidAddress"}, - {no: 206, name: "ErrUnknownAddress"}, - {no: 207, name: "ErrInvalidPubKey"}, - {no: 208, name: "ErrInsufficientCoins"}, - {no: 209, name: "ErrInvalidCoins"}, - {no: 210, name: "ErrInvalidGasWanted"}, - {no: 211, name: "ErrOutOfGas"}, - {no: 212, name: "ErrMemoTooLarge"}, - {no: 213, name: "ErrInsufficientFee"}, - {no: 214, name: "ErrTooManySignatures"}, - {no: 215, name: "ErrNoSignatures"}, - {no: 216, name: "ErrGasOverflow"}, - ], -); - -/** - * @generated from message land.gno.gnonative.v1.ErrDetails - */ -export const ErrDetails = proto3.makeMessageType( - "land.gno.gnonative.v1.ErrDetails", - () => [ - { no: 1, name: "codes", kind: "enum", T: proto3.getEnumType(ErrCode), repeated: true }, - ], -); - diff --git a/examples/react-native/hello/src/grpc/client.ts b/examples/react-native/hello/src/grpc/client.ts index e7ea6844..e40de9de 100644 --- a/examples/react-native/hello/src/grpc/client.ts +++ b/examples/react-native/hello/src/grpc/client.ts @@ -1,6 +1,6 @@ import { createPromiseClient } from '@connectrpc/connect'; import { createXHRGrpcWebTransport } from './transport'; -import { GnoNativeService } from '@gno/api/rpc_connect'; +import { GnoNativeService } from '@api/rpc_connect'; // Create a GnoNativeService client export function createClient(port: number) { diff --git a/examples/react-native/hello/src/grpc/error.ts b/examples/react-native/hello/src/grpc/error.ts index 4d2160d5..0d9c945d 100644 --- a/examples/react-native/hello/src/grpc/error.ts +++ b/examples/react-native/hello/src/grpc/error.ts @@ -1,4 +1,4 @@ -import { ErrCode } from '@gno/api/rpc_pb'; +import { ErrCode } from '@api/rpc_pb'; import { Code, ConnectError } from '@connectrpc/connect'; class GRPCError extends Error { diff --git a/examples/react-native/hello/src/hooks/use-gno.ts b/examples/react-native/hello/src/hooks/use-gno.ts index 20b7e944..e9e71a57 100644 --- a/examples/react-native/hello/src/hooks/use-gno.ts +++ b/examples/react-native/hello/src/hooks/use-gno.ts @@ -1,41 +1,41 @@ -import { SetRemoteRequest, SetRemoteResponse } from '@gno/api/gnonativetypes_pb'; -import { GetRemoteRequest } from '@gno/api/gnonativetypes_pb'; -import { SetChainIDRequest, SetChainIDResponse } from '@gno/api/gnonativetypes_pb'; -import { GetChainIDRequest } from '@gno/api/gnonativetypes_pb'; -import { SetPasswordRequest, SetPasswordResponse } from '@gno/api/gnonativetypes_pb'; -import { SelectAccountRequest } from '@gno/api/gnonativetypes_pb'; -import { SelectAccountResponse } from '@gno/api/gnonativetypes_pb'; -import { CreateAccountRequest } from '@gno/api/gnonativetypes_pb'; -import { GenerateRecoveryPhraseRequest } from '@gno/api/gnonativetypes_pb'; -import { ListKeyInfoRequest } from '@gno/api/gnonativetypes_pb'; -import { HasKeyByNameRequest } from '@gno/api/gnonativetypes_pb'; -import { HasKeyByAddressRequest } from '@gno/api/gnonativetypes_pb'; -import { HasKeyByNameOrAddressRequest } from '@gno/api/gnonativetypes_pb'; -import { GetKeyInfoByNameRequest } from '@gno/api/gnonativetypes_pb'; -import { GetKeyInfoByAddressRequest } from '@gno/api/gnonativetypes_pb'; -import { GetKeyInfoByNameOrAddressRequest } from '@gno/api/gnonativetypes_pb'; -import { GetActiveAccountRequest } from '@gno/api/gnonativetypes_pb'; -import { GetActiveAccountResponse } from '@gno/api/gnonativetypes_pb'; -import { QueryAccountRequest } from '@gno/api/gnonativetypes_pb'; -import { QueryAccountResponse } from '@gno/api/gnonativetypes_pb'; -import { DeleteAccountRequest, DeleteAccountResponse } from '@gno/api/gnonativetypes_pb'; -import { QueryRequest } from '@gno/api/gnonativetypes_pb'; -import { QueryResponse } from '@gno/api/gnonativetypes_pb'; -import { RenderRequest } from '@gno/api/gnonativetypes_pb'; -import { QEvalRequest } from '@gno/api/gnonativetypes_pb'; -import { MsgCall } from '@gno/api/gnonativetypes_pb'; -import { CallRequest } from '@gno/api/gnonativetypes_pb'; -import { CallResponse } from '@gno/api/gnonativetypes_pb'; -import { MsgSend } from '@gno/api/gnonativetypes_pb'; -import { SendRequest } from '@gno/api/gnonativetypes_pb'; -import { SendResponse } from '@gno/api/gnonativetypes_pb'; -import { AddressToBech32Request } from '@gno/api/gnonativetypes_pb'; -import { AddressFromBech32Request } from '@gno/api/gnonativetypes_pb'; +import { SetRemoteRequest, SetRemoteResponse } from '@api/gnonativetypes_pb'; +import { GetRemoteRequest } from '@api/gnonativetypes_pb'; +import { SetChainIDRequest, SetChainIDResponse } from '@api/gnonativetypes_pb'; +import { GetChainIDRequest } from '@api/gnonativetypes_pb'; +import { SetPasswordRequest, SetPasswordResponse } from '@api/gnonativetypes_pb'; +import { SelectAccountRequest } from '@api/gnonativetypes_pb'; +import { SelectAccountResponse } from '@api/gnonativetypes_pb'; +import { CreateAccountRequest } from '@api/gnonativetypes_pb'; +import { GenerateRecoveryPhraseRequest } from '@api/gnonativetypes_pb'; +import { ListKeyInfoRequest } from '@api/gnonativetypes_pb'; +import { HasKeyByNameRequest } from '@api/gnonativetypes_pb'; +import { HasKeyByAddressRequest } from '@api/gnonativetypes_pb'; +import { HasKeyByNameOrAddressRequest } from '@api/gnonativetypes_pb'; +import { GetKeyInfoByNameRequest } from '@api/gnonativetypes_pb'; +import { GetKeyInfoByAddressRequest } from '@api/gnonativetypes_pb'; +import { GetKeyInfoByNameOrAddressRequest } from '@api/gnonativetypes_pb'; +import { GetActiveAccountRequest } from '@api/gnonativetypes_pb'; +import { GetActiveAccountResponse } from '@api/gnonativetypes_pb'; +import { QueryAccountRequest } from '@api/gnonativetypes_pb'; +import { QueryAccountResponse } from '@api/gnonativetypes_pb'; +import { DeleteAccountRequest, DeleteAccountResponse } from '@api/gnonativetypes_pb'; +import { QueryRequest } from '@api/gnonativetypes_pb'; +import { QueryResponse } from '@api/gnonativetypes_pb'; +import { RenderRequest } from '@api/gnonativetypes_pb'; +import { QEvalRequest } from '@api/gnonativetypes_pb'; +import { MsgCall } from '@api/gnonativetypes_pb'; +import { CallRequest } from '@api/gnonativetypes_pb'; +import { CallResponse } from '@api/gnonativetypes_pb'; +import { MsgSend } from '@api/gnonativetypes_pb'; +import { SendRequest } from '@api/gnonativetypes_pb'; +import { SendResponse } from '@api/gnonativetypes_pb'; +import { AddressToBech32Request } from '@api/gnonativetypes_pb'; +import { AddressFromBech32Request } from '@api/gnonativetypes_pb'; import * as Grpc from '@gno/grpc/client'; import { GnoAccount } from '@gno/native_modules/types'; import { GoBridge } from '@gno/native_modules'; import { PromiseClient } from '@connectrpc/connect'; -import { GnoNativeService } from '@gno/api/rpc_connect'; +import { GnoNativeService } from '@api/rpc_connect'; export interface GnoResponse { setRemote: (remote: string) => Promise; @@ -68,13 +68,7 @@ export interface GnoResponse { send?: string, memo?: string, ) => Promise>; - send: ( - toAddress: Uint8Array, - send: string, - gasFee: string, - gasWanted: number, - memo?: string, - ) => Promise>; + send: (toAddress: Uint8Array, send: string, gasFee: string, gasWanted: number, memo?: string) => Promise>; addressToBech32: (address: Uint8Array) => Promise; addressFromBech32: (bech32Address: string) => Promise; closeBridge: () => Promise; @@ -100,7 +94,8 @@ export const useGno = (): GnoResponse => { console.log('Creating GRPC client instance... done.'); // Set the initial configuration where it's different from the default. - await clientInstance.setRemote(new SetRemoteRequest({ remote: 'testnet.gno.berty.io:26657' })); + await clientInstance.setRemote(new SetRemoteRequest({ remote: 'testnet.gno.berty.io:36657' })); + await clientInstance.setChainID(new SetChainIDRequest({ chainId: 'tendermint_test' })); return clientInstance; }; @@ -295,34 +290,32 @@ export const useGno = (): GnoResponse => { gasFee, gasWanted: BigInt(gasWanted), memo, - msgs: [new MsgCall({ - packagePath, - fnc, - args, - send, - })], + msgs: [ + new MsgCall({ + packagePath, + fnc, + args, + send, + }), + ], }), ); return reponse; }; - const send = async ( - toAddress: Uint8Array, - send: string, - gasFee: string, - gasWanted: number, - memo?: string, - ) => { + const send = async (toAddress: Uint8Array, send: string, gasFee: string, gasWanted: number, memo?: string) => { const client = await getClient(); const reponse = client.send( new SendRequest({ gasFee, gasWanted: BigInt(gasWanted), memo, - msgs: [new MsgSend({ - toAddress, - send, - })], + msgs: [ + new MsgSend({ + toAddress, + send, + }), + ], }), ); return reponse; diff --git a/examples/react-native/hello/src/native_modules/types.ts b/examples/react-native/hello/src/native_modules/types.ts index 8f4150f1..8e7e8674 100644 --- a/examples/react-native/hello/src/native_modules/types.ts +++ b/examples/react-native/hello/src/native_modules/types.ts @@ -1,4 +1,4 @@ -import { KeyInfo } from '@gno/api/gnonativetypes_pb'; +import { KeyInfo } from '@api/gnonativetypes_pb'; export type GnoConfig = { Remote: string; diff --git a/examples/react-native/hello/yarn.lock b/examples/react-native/hello/yarn.lock index ab94f2e8..7dd77f63 100644 --- a/examples/react-native/hello/yarn.lock +++ b/examples/react-native/hello/yarn.lock @@ -2986,9 +2986,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.601: - version "1.4.612" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.612.tgz#350c6fd4201d677307519b931949fa64dae6a5cc" - integrity sha512-dM8BMtXtlH237ecSMnYdYuCkib2QHq0kpWfUnavjdYsyr/6OsAwg5ZGUfnQ9KD1Ga4QgB2sqXlB2NT8zy2GnVg== + version "1.4.613" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.613.tgz#529e4fc65576ecfd055d7d4619fade4fac446af2" + integrity sha512-r4x5+FowKG6q+/Wj0W9nidx7QO31BJwmR2uEo+Qh3YLGQ8SbBAFuDFpTxzly/I2gsbrFwBuIjrMp423L3O5U3w== emoji-regex@^8.0.0: version "8.0.0" diff --git a/examples/wails/README.md b/examples/wails/README.md index 09b4eaa8..eecc8751 100644 --- a/examples/wails/README.md +++ b/examples/wails/README.md @@ -9,9 +9,22 @@ This is a tutorial on how to use GnoNativeKit with Wails. It is based on the off ## Project Generation +### Generate the API dependencies + +Assuming your are in this directory in a shell, go to the `api` folder of gnonative: + +```bash +cd ../../api +yarn +``` ### Generate a new Wails React TS project +Go back to the README's folder: +```bash +cd ../examples/wails +``` + To generate a new project, run `wails init -n myproject -t react-ts`. This will generate a new project in the current directory. Please, navigate to the project directory: ```bash @@ -68,12 +81,68 @@ Let's also copy the protobufs files we already generated for Typescript. ```bash cd frontend npm install @bufbuild/buf @bufbuild/protobuf @bufbuild/protoc-gen-es @connectrpc/connect @connectrpc/connect-web @connectrpc/protoc-gen-connect-es buffer +npm install -D @types/node -mkdir -p src/api -cp -r ../../../../api/gen/es/* ./src/api/ -cp ../../../../templates/es/use-gno-web.ts ./src/api/use-gno.ts +mkdir -p src/hooks +cp ../../../../templates/es/use-gno-web.ts ./src/hooks/use-gno.ts cp ../../../../templates/images/logo-universal.png ./src/assets/images ``` +### Set up `@api` alias + +The Typescript compiler (tsc) must be able to resolve import paths starting by `@api` to find the API files. But `tsc` cannot resolve folders outside the project root directory. The simplest way is to link the `api/gen/es` folder into this project: + +```bash +ln -s ../../../../../api/gen/es src/api +``` + +Copy and paste the following content into a patch file (e.g. `tsconfig.patch`): + +```diff +@@ -18,7 +18,11 @@ + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, +- "jsx": "react-jsx" ++ "jsx": "react-jsx", ++ "baseUrl": ".", ++ "paths": { ++ "@api/*": ["src/api/*"] ++ } + }, + "include": [ + "src" +``` +Copy and paste the following content into an other patch file (e.g. `vite.patch`): + +```diff +@@ -1,7 +1,16 @@ + import {defineConfig} from 'vite' + import react from '@vitejs/plugin-react' ++import path from 'path' + + // https://vitejs.dev/config/ + export default defineConfig({ +- plugins: [react()] ++ plugins: [react()], ++ resolve: { ++ alias: [ ++ { ++ find: '@api', ++ replacement: path.resolve(__dirname, 'src/api'), ++ }, ++ ], ++ }, + }) +``` + +Apply the patches: + +```batch +patch tsconfig.json < tsconfig.patch +patch vite.config.ts < vite.patch +``` + +### Customize the render function Open `src/App.tsx` and replace the contents with the following code: @@ -81,7 +150,7 @@ Open `src/App.tsx` and replace the contents with the following code: import { useEffect, useState } from "react"; import logo from "./assets/images/logo-universal.png"; import "./App.css"; -import { useGno } from "./api/use-gno"; +import { useGno } from "./hooks/use-gno"; function App() { const [resultText, setResultText] = useState( @@ -114,6 +183,7 @@ Now we can run the project: ```bash # go to the project root directory and run: +cd .. wails dev ``` diff --git a/gen.sum b/gen.sum index 6fa631d0..c18fede2 100644 --- a/gen.sum +++ b/gen.sum @@ -1,2 +1,2 @@ -08559a9658d7b8e281a524a26a64a8554fbae533 Makefile +0323585ecb0d965848061de27ad5f3cca48bb364 Makefile 802170f47afe38c117d2a09d480acf48438513ba buf.gen.yaml diff --git a/templates/babel.config.js b/templates/babel.config.js new file mode 100644 index 00000000..3cb997d7 --- /dev/null +++ b/templates/babel.config.js @@ -0,0 +1,19 @@ +module.exports = function (api) { + api.cache(true); + return { + presets: ['babel-preset-expo'], + plugins: [ + [ + 'module-resolver', + { + root: ['./src'], + extensions: ['.ios.js', '.android.js', '.js', '.ts', '.tsx', '.json'], + alias: { + '@gno': './src/', + '@api': '../../../api/gen/es', + }, + }, + ], + ], + }; +}; diff --git a/templates/es/use-gno-web.ts b/templates/es/use-gno-web.ts index 25ae4109..41eef2c8 100644 --- a/templates/es/use-gno-web.ts +++ b/templates/es/use-gno-web.ts @@ -2,44 +2,47 @@ import { KeyInfo, SetRemoteRequest, SetRemoteResponse, -} from "./gnonativetypes_pb"; -import { GetRemoteRequest } from "./gnonativetypes_pb"; -import { SetChainIDRequest, SetChainIDResponse } from "./gnonativetypes_pb"; -import { GetChainIDRequest } from "./gnonativetypes_pb"; -import { SetPasswordRequest, SetPasswordResponse } from "./gnonativetypes_pb"; -import { SelectAccountRequest } from "./gnonativetypes_pb"; -import { SelectAccountResponse } from "./gnonativetypes_pb"; -import { CreateAccountRequest } from "./gnonativetypes_pb"; -import { GenerateRecoveryPhraseRequest } from "./gnonativetypes_pb"; -import { ListKeyInfoRequest } from "./gnonativetypes_pb"; -import { HasKeyByNameRequest } from "./gnonativetypes_pb"; -import { HasKeyByAddressRequest } from "./gnonativetypes_pb"; -import { HasKeyByNameOrAddressRequest } from "./gnonativetypes_pb"; -import { GetKeyInfoByNameRequest } from "./gnonativetypes_pb"; -import { GetKeyInfoByAddressRequest } from "./gnonativetypes_pb"; -import { GetKeyInfoByNameOrAddressRequest } from "./gnonativetypes_pb"; -import { GetActiveAccountRequest } from "./gnonativetypes_pb"; -import { GetActiveAccountResponse } from "./gnonativetypes_pb"; -import { QueryAccountRequest } from "./gnonativetypes_pb"; -import { QueryAccountResponse } from "./gnonativetypes_pb"; +} from "@api/gnonativetypes_pb"; +import { GetRemoteRequest } from "@api/gnonativetypes_pb"; +import { SetChainIDRequest, SetChainIDResponse } from "@api/gnonativetypes_pb"; +import { GetChainIDRequest } from "@api/gnonativetypes_pb"; +import { + SetPasswordRequest, + SetPasswordResponse, +} from "@api/gnonativetypes_pb"; +import { SelectAccountRequest } from "@api/gnonativetypes_pb"; +import { SelectAccountResponse } from "@api/gnonativetypes_pb"; +import { CreateAccountRequest } from "@api/gnonativetypes_pb"; +import { GenerateRecoveryPhraseRequest } from "@api/gnonativetypes_pb"; +import { ListKeyInfoRequest } from "@api/gnonativetypes_pb"; +import { HasKeyByNameRequest } from "@api/gnonativetypes_pb"; +import { HasKeyByAddressRequest } from "@api/gnonativetypes_pb"; +import { HasKeyByNameOrAddressRequest } from "@api/gnonativetypes_pb"; +import { GetKeyInfoByNameRequest } from "@api/gnonativetypes_pb"; +import { GetKeyInfoByAddressRequest } from "@api/gnonativetypes_pb"; +import { GetKeyInfoByNameOrAddressRequest } from "@api/gnonativetypes_pb"; +import { GetActiveAccountRequest } from "@api/gnonativetypes_pb"; +import { GetActiveAccountResponse } from "@api/gnonativetypes_pb"; +import { QueryAccountRequest } from "@api/gnonativetypes_pb"; +import { QueryAccountResponse } from "@api/gnonativetypes_pb"; import { DeleteAccountRequest, DeleteAccountResponse, -} from "./gnonativetypes_pb"; -import { QueryRequest } from "./gnonativetypes_pb"; -import { QueryResponse } from "./gnonativetypes_pb"; -import { RenderRequest } from "./gnonativetypes_pb"; -import { QEvalRequest } from "./gnonativetypes_pb"; -import { MsgCall } from '@gno/api/gnonativetypes_pb'; -import { CallRequest } from "./gnonativetypes_pb"; -import { CallResponse } from "./gnonativetypes_pb"; -import { MsgSend } from '@gno/api/gnonativetypes_pb'; -import { SendRequest } from '@gno/api/gnonativetypes_pb'; -import { SendResponse } from '@gno/api/gnonativetypes_pb'; -import { AddressToBech32Request } from "./gnonativetypes_pb"; -import { AddressFromBech32Request } from "./gnonativetypes_pb"; +} from "@api/gnonativetypes_pb"; +import { QueryRequest } from "@api/gnonativetypes_pb"; +import { QueryResponse } from "@api/gnonativetypes_pb"; +import { RenderRequest } from "@api/gnonativetypes_pb"; +import { QEvalRequest } from "@api/gnonativetypes_pb"; +import { MsgCall } from "@api/gnonativetypes_pb"; +import { CallRequest } from "@api/gnonativetypes_pb"; +import { CallResponse } from "@api/gnonativetypes_pb"; +import { MsgSend } from "@api/gnonativetypes_pb"; +import { SendRequest } from "@api/gnonativetypes_pb"; +import { SendResponse } from "@api/gnonativetypes_pb"; +import { AddressToBech32Request } from "@api/gnonativetypes_pb"; +import { AddressFromBech32Request } from "@api/gnonativetypes_pb"; import { PromiseClient } from "@connectrpc/connect"; -import { GnoNativeService } from "./rpc_connect"; +import { GnoNativeService } from "@api/rpc_connect"; import { createPromiseClient } from "@connectrpc/connect"; import { createConnectTransport } from "@connectrpc/connect-web"; @@ -350,12 +353,14 @@ export const useGno = (): GnoResponse => { gasFee, gasWanted: BigInt(gasWanted), memo, - msgs: [new MsgCall({ - packagePath, - fnc, - args, - send, - })], + msgs: [ + new MsgCall({ + packagePath, + fnc, + args, + send, + }), + ], }), ); return reponse; @@ -374,10 +379,12 @@ export const useGno = (): GnoResponse => { gasFee, gasWanted: BigInt(gasWanted), memo, - msgs: [new MsgSend({ - toAddress, - send, - })], + msgs: [ + new MsgSend({ + toAddress, + send, + }), + ], }), ); return reponse; diff --git a/templates/es/use-gno.ts b/templates/es/use-gno.ts index c4053fd5..1c951130 100644 --- a/templates/es/use-gno.ts +++ b/templates/es/use-gno.ts @@ -30,12 +30,12 @@ import { QueryRequest } from "./gnonativetypes_pb"; import { QueryResponse } from "./gnonativetypes_pb"; import { RenderRequest } from "./gnonativetypes_pb"; import { QEvalRequest } from "./gnonativetypes_pb"; -import { MsgCall } from "@gno/api/gnonativetypes_pb"; +import { MsgCall } from "@api/gnonativetypes_pb"; import { CallRequest } from "./gnonativetypes_pb"; import { CallResponse } from "./gnonativetypes_pb"; -import { MsgSend } from "@gno/api/gnonativetypes_pb"; -import { SendRequest } from "@gno/api/gnonativetypes_pb"; -import { SendResponse } from "@gno/api/gnonativetypes_pb"; +import { MsgSend } from "@api/gnonativetypes_pb"; +import { SendRequest } from "@api/gnonativetypes_pb"; +import { SendResponse } from "@api/gnonativetypes_pb"; import { AddressToBech32Request } from "./gnonativetypes_pb"; import { AddressFromBech32Request } from "./gnonativetypes_pb"; import { PromiseClient } from "@connectrpc/connect"; diff --git a/templates/metro.config.js b/templates/metro.config.js new file mode 100644 index 00000000..956bcb74 --- /dev/null +++ b/templates/metro.config.js @@ -0,0 +1,14 @@ +// Learn more https://docs.expo.io/guides/customizing-metro +const { getDefaultConfig } = require('expo/metro-config'); +const { mergeConfig } = require('metro-config'); +const path = require('path'); + +/** @type {import('expo/metro-config').MetroConfig} */ +// const config = getDefaultConfig(__dirname); +// +// module.exports = config; +const config = { + watchFolders: [path.resolve(__dirname + '/../../../api')], +}; + +module.exports = mergeConfig(getDefaultConfig(__dirname), config); diff --git a/templates/tsconfig.json b/templates/tsconfig.json index da355ec0..e31963ab 100644 --- a/templates/tsconfig.json +++ b/templates/tsconfig.json @@ -1,10 +1,10 @@ { - "extends": "expo/tsconfig.base", + "extends": "@tsconfig/react-native/tsconfig.json", "compilerOptions": { - "strict": true, "baseUrl": ".", "paths": { "@gno/*": ["src/*"], + "@api/*": ["../../../api/gen/es/*"] } } }