gnonativetypes

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Package = amino.RegisterPackage(amino.NewPackage(
	"github.com/gnolang/gnonative/api/gnonativetypes",
	"land.gno.gnonative.v1",
	path.Join(amino.GetCallersDirname(), ".."),
).WithP3GoPkgPath("github.com/gnolang/gnonative/api/gen/go").
	WithDependencies().WithTypes(
	SetRemoteRequest{},
	SetRemoteResponse{},
	GetRemoteRequest{},
	GetRemoteResponse{},
	SetChainIDRequest{},
	SetChainIDResponse{},
	GetChainIDRequest{},
	GetChainIDResponse{},
	SetPasswordRequest{},
	SetPasswordResponse{},
	GenerateRecoveryPhraseRequest{},
	GenerateRecoveryPhraseResponse{},
	KeyInfo{},
	Coin{},
	BaseAccount{},
	ListKeyInfoRequest{},
	ListKeyInfoResponse{},
	HasKeyByNameRequest{},
	HasKeyByNameResponse{},
	HasKeyByAddressRequest{},
	HasKeyByAddressResponse{},
	HasKeyByNameOrAddressRequest{},
	HasKeyByNameOrAddressResponse{},
	GetKeyInfoByNameRequest{},
	GetKeyInfoByNameResponse{},
	GetKeyInfoByAddressRequest{},
	GetKeyInfoByAddressResponse{},
	GetKeyInfoByNameOrAddressRequest{},
	GetKeyInfoByNameOrAddressResponse{},
	CreateAccountRequest{},
	CreateAccountResponse{},
	SelectAccountRequest{},
	SelectAccountResponse{},
	GetActiveAccountRequest{},
	GetActiveAccountResponse{},
	QueryAccountRequest{},
	QueryAccountResponse{},
	DeleteAccountRequest{},
	DeleteAccountResponse{},
	QueryRequest{},
	QueryResponse{},
	RenderRequest{},
	RenderResponse{},
	QEvalRequest{},
	QEvalResponse{},
	MsgCall{},
	CallRequest{},
	CallResponse{},
	MsgSend{},
	SendRequest{},
	SendResponse{},
	MsgRun{},
	RunRequest{},
	RunResponse{},
	AddressToBech32Request{},
	AddressToBech32Response{},
	AddressFromBech32Request{},
	AddressFromBech32Response{},
	HelloRequest{},
	HelloResponse{},
	HelloStreamRequest{},
	HelloStreamResponse{},
).WithComments(path.Join(amino.GetCallersDirname(), "gnonativetypes.go")))

Functions

This section is empty.

Types

type AddressFromBech32Request

type AddressFromBech32Request struct {
	Bech32Address string `json:"bech32_address" yaml:"bech32_address"`
}

type AddressFromBech32Response

type AddressFromBech32Response struct {
	Address []byte `json:"address" yaml:"address"`
}

type AddressToBech32Request

type AddressToBech32Request struct {
	Address []byte `json:"address" yaml:"address"`
}

type AddressToBech32Response

type AddressToBech32Response struct {
	Bech32Address string `json:"bech32_address" yaml:"bech32_address"`
}

type BaseAccount

type BaseAccount struct {
	Address       []byte `json:"address" yaml:"address"`
	Coins         []Coin `json:"coins" yaml:"coins"`
	PubKey        []byte `json:"pub_key" yaml:"pub_key"`
	AccountNumber uint64 `json:"account_number" yaml:"account_number"`
	Sequence      uint64 `json:"sequence" yaml:"sequence"`
}

type CallRequest

type CallRequest struct {
	GasFee    string `json:"gas_fee" yaml:"gas_fee"`
	GasWanted int64  `json:"gas_wanted" yaml:"gas_wanted"`
	Memo      string `json:"memo" yaml:"memo"`
	// list of calls to make in one transaction
	Msgs []MsgCall
}

type CallResponse

type CallResponse struct {
	Result []byte `json:"result" yaml:"result"`
}

type Coin

type Coin struct {
	Denom  string `json:"denom"`
	Amount int64  `json:"amount"`
}

Coin holds some amount of one currency. A negative amount is invalid.

type CreateAccountRequest

type CreateAccountRequest struct {
	NameOrBech32 string `json:"name_or_bech32" yaml:"name_or_bech32"`
	Mnemonic     string `json:"mnemonic" yaml:"mnemonic"`
	Bip39Passwd  string `json:"bip39_passwd" yaml:"bip39_passwd"`
	Password     string `json:"password" yaml:"password"`
	Account      uint32 `json:"account" yaml:"account"`
	Index        uint32 `json:"index" yaml:"index"`
}

type CreateAccountResponse

type CreateAccountResponse struct {
	Key *KeyInfo `json:"key_info" yaml:"key_info"`
}

type DeleteAccountRequest

type DeleteAccountRequest struct {
	NameOrBech32 string `json:"name_or_bech32" yaml:"name_or_bech32"`
	Password     string `json:"password" yaml:"password"`
	SkipPassword bool   `json:"skip_password" yaml:"skip_password"`
}

type DeleteAccountResponse

type DeleteAccountResponse struct {
}

type GenerateRecoveryPhraseRequest

type GenerateRecoveryPhraseRequest struct {
}

type GenerateRecoveryPhraseResponse

type GenerateRecoveryPhraseResponse struct {
	Phrase string `json:"phrase" yaml:"phrase"`
}

type GetActiveAccountRequest

type GetActiveAccountRequest struct {
}

type GetActiveAccountResponse

type GetActiveAccountResponse struct {
	Key *KeyInfo `json:"key_info" yaml:"key_info"`
	// True if the password has been set. If false, then call SetPassword.
	HasPassword bool `json:"has_password" yaml:"has_password"`
}

type GetChainIDRequest

type GetChainIDRequest struct {
}

type GetChainIDResponse

type GetChainIDResponse struct {
	ChainID string `json:"chain_id" yaml:"chain_id"`
}

type GetKeyInfoByAddressRequest

type GetKeyInfoByAddressRequest struct {
	Address []byte `json:"address" yaml:"address"`
}

type GetKeyInfoByAddressResponse

type GetKeyInfoByAddressResponse struct {
	Key *KeyInfo `json:"key_info" yaml:"key_info"`
}

type GetKeyInfoByNameOrAddressRequest

type GetKeyInfoByNameOrAddressRequest struct {
	NameOrBech32 string `json:"name_or_bech32" yaml:"name_or_bech32"`
}

type GetKeyInfoByNameOrAddressResponse

type GetKeyInfoByNameOrAddressResponse struct {
	Key *KeyInfo `json:"key_info" yaml:"key_info"`
}

type GetKeyInfoByNameRequest

type GetKeyInfoByNameRequest struct {
	Name string `json:"name" yaml:"name"`
}

type GetKeyInfoByNameResponse

type GetKeyInfoByNameResponse struct {
	Key *KeyInfo `json:"key_info" yaml:"key_info"`
}

type GetRemoteRequest

type GetRemoteRequest struct {
}

type GetRemoteResponse

type GetRemoteResponse struct {
	Remote string `json:"remote" yaml:"remote"`
}

type HasKeyByAddressRequest

type HasKeyByAddressRequest struct {
	Address []byte `json:"address" yaml:"address"`
}

type HasKeyByAddressResponse

type HasKeyByAddressResponse struct {
	Has bool `json:"has" yaml:"has"`
}

type HasKeyByNameOrAddressRequest

type HasKeyByNameOrAddressRequest struct {
	NameOrBech32 string `json:"name_or_bech32" yaml:"name_or_bech32"`
}

type HasKeyByNameOrAddressResponse

type HasKeyByNameOrAddressResponse struct {
	Has bool `json:"has" yaml:"has"`
}

type HasKeyByNameRequest

type HasKeyByNameRequest struct {
	Name string `json:"name" yaml:"name"`
}

type HasKeyByNameResponse

type HasKeyByNameResponse struct {
	Has bool `json:"has" yaml:"has"`
}

type HelloRequest

type HelloRequest struct {
	Name string
}

type HelloResponse

type HelloResponse struct {
	Greeting string
}

type HelloStreamRequest

type HelloStreamRequest struct {
	Name string
}

type HelloStreamResponse

type HelloStreamResponse struct {
	Greeting string
}

type KeyInfo

type KeyInfo struct {
	// 0: local, 1: ledger, 2: offline, 3: multi
	Type    uint32 `json:"type" yaml:"type"`
	Name    string `json:"name" yaml:"name"`
	PubKey  []byte `json:"pub_key" yaml:"pub_key"`
	Address []byte `json:"address" yaml:"address"`
}

type ListKeyInfoRequest

type ListKeyInfoRequest struct {
}

type ListKeyInfoResponse

type ListKeyInfoResponse struct {
	Keys []*KeyInfo `json:"key_info" yaml:"key_info"`
}

type MsgCall

type MsgCall struct {
	// Example: "gno.land/r/demo/boards"
	PackagePath string `json:"package_path" yaml:"package_path"`
	// Example: "CreateReply"
	Fnc string `json:"fnc" yaml:"fnc"`
	// list of arguments specific to the function
	// Example: ["1", "1", "2", "my reply"]
	Args []string `json:"args" yaml:"args"`
	Send string   `json:"send" yaml:"send"`
}

type MsgRun

type MsgRun struct {
	// The code for the script package. Must have main().
	// Example: "package main\nfunc main() {\n  println(\"Hello\")\n}"
	Package string `json:"package" yaml:"package"`
	// Optional. Example: "1000ugnot"
	Send string `json:"send" yaml:"send"`
}

type MsgSend

type MsgSend struct {
	// Example: The response of calling AddressFromBech32 with
	// "g1juz2yxmdsa6audkp6ep9vfv80c8p5u76e03vvh"
	ToAddress []byte `json:"to_address" yaml:"to_address"`
	// Example: "1000ugnot"
	Send string `json:"send" yaml:"send"`
}

type QEvalRequest

type QEvalRequest struct {
	// Example: "gno.land/r/demo/boards"
	PackagePath string `json:"package_path" yaml:"package_path"`
	// Example: "GetBoardIDFromName(\"testboard\")"
	Expression string `json:"expression" yaml:"expression"`
}

type QEvalResponse

type QEvalResponse struct {
	// A typed expression like "(1 gno.land/r/demo/boards.BoardID)\n(true bool)"
	Result string `json:"result" yaml:"result"`
}

type QueryAccountRequest

type QueryAccountRequest struct {
	Address []byte `json:"address" yaml:"address"`
}

type QueryAccountResponse

type QueryAccountResponse struct {
	AccountInfo *BaseAccount `json:"account_info" yaml:"account_info"`
}

type QueryRequest

type QueryRequest struct {
	// Example: "vm/qrender"
	Path string `json:"path" yaml:"path"`
	// Example: "gno.land/r/demo/boards\ntestboard"
	Data []byte `json:"data" yaml:"data"`
}

type QueryResponse

type QueryResponse struct {
	Result []byte `json:"result" yaml:"result"`
}

type RenderRequest

type RenderRequest struct {
	// Example: "gno.land/r/demo/boards"
	PackagePath string `json:"package_path" yaml:"package_path"`
	// Example: "testboard/1"
	Args string `json:"args" yaml:"args"`
}

type RenderResponse

type RenderResponse struct {
	// The Render function result (typically markdown)
	Result string `json:"result" yaml:"result"`
}

type RunRequest

type RunRequest struct {
	GasFee    string `json:"gas_fee" yaml:"gas_fee"`
	GasWanted int64  `json:"gas_wanted" yaml:"gas_wanted"`
	// Memo is optional
	Memo string `json:"memo" yaml:"memo"`
	// list of run operations to make in one transaction
	Msgs []MsgRun
}

type RunResponse

type RunResponse struct {
	// The "console" output from the run
	Result string `json:"result" yaml:"result"`
}

type SelectAccountRequest

type SelectAccountRequest struct {
	NameOrBech32 string `json:"name_or_bech32" yaml:"name_or_bech32"`
}

type SelectAccountResponse

type SelectAccountResponse struct {
	Key *KeyInfo `json:"key_info" yaml:"key_info"`
	// True if the password has been set. If false, then call SetPassword.
	HasPassword bool `json:"has_password" yaml:"has_password"`
}

type SendRequest

type SendRequest struct {
	GasFee    string `json:"gas_fee" yaml:"gas_fee"`
	GasWanted int64  `json:"gas_wanted" yaml:"gas_wanted"`
	// Memo is optional
	Memo string `json:"memo" yaml:"memo"`
	// list of send operations to make in one transaction
	Msgs []MsgSend
}

type SendResponse

type SendResponse struct {
}

type SetChainIDRequest

type SetChainIDRequest struct {
	ChainID string `json:"chain_id" yaml:"chain_id"`
}

type SetChainIDResponse

type SetChainIDResponse struct {
}

type SetPasswordRequest

type SetPasswordRequest struct {
	Password string `json:"password" yaml:"password"`
}

type SetPasswordResponse

type SetPasswordResponse struct {
}

type SetRemoteRequest

type SetRemoteRequest struct {
	Remote string `json:"remote" yaml:"remote"`
}

type SetRemoteResponse

type SetRemoteResponse struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL