pactus

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 21 Imported by: 5

Documentation

Overview

Package pactus is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package pactus is a reverse proxy.

It translates gRPC into JSON-RPC 2.0

Package pactus is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package pactus is a reverse proxy.

It translates gRPC into JSON-RPC 2.0

Package pactus is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package pactus is a reverse proxy.

It translates gRPC into JSON-RPC 2.0

Package pactus is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package pactus is a reverse proxy.

It translates gRPC into JSON-RPC 2.0

Index

Constants

View Source
const (
	Blockchain_GetBlock_FullMethodName              = "/pactus.Blockchain/GetBlock"
	Blockchain_GetBlockHash_FullMethodName          = "/pactus.Blockchain/GetBlockHash"
	Blockchain_GetBlockHeight_FullMethodName        = "/pactus.Blockchain/GetBlockHeight"
	Blockchain_GetBlockchainInfo_FullMethodName     = "/pactus.Blockchain/GetBlockchainInfo"
	Blockchain_GetConsensusInfo_FullMethodName      = "/pactus.Blockchain/GetConsensusInfo"
	Blockchain_GetAccount_FullMethodName            = "/pactus.Blockchain/GetAccount"
	Blockchain_GetValidator_FullMethodName          = "/pactus.Blockchain/GetValidator"
	Blockchain_GetValidatorByNumber_FullMethodName  = "/pactus.Blockchain/GetValidatorByNumber"
	Blockchain_GetValidatorAddresses_FullMethodName = "/pactus.Blockchain/GetValidatorAddresses"
	Blockchain_GetPublicKey_FullMethodName          = "/pactus.Blockchain/GetPublicKey"
)
View Source
const (
	Network_GetNetworkInfo_FullMethodName = "/pactus.Network/GetNetworkInfo"
	Network_GetNodeInfo_FullMethodName    = "/pactus.Network/GetNodeInfo"
)
View Source
const (
	Transaction_GetTransaction_FullMethodName            = "/pactus.Transaction/GetTransaction"
	Transaction_CalculateFee_FullMethodName              = "/pactus.Transaction/CalculateFee"
	Transaction_BroadcastTransaction_FullMethodName      = "/pactus.Transaction/BroadcastTransaction"
	Transaction_GetRawTransferTransaction_FullMethodName = "/pactus.Transaction/GetRawTransferTransaction"
	Transaction_GetRawBondTransaction_FullMethodName     = "/pactus.Transaction/GetRawBondTransaction"
	Transaction_GetRawUnbondTransaction_FullMethodName   = "/pactus.Transaction/GetRawUnbondTransaction"
	Transaction_GetRawWithdrawTransaction_FullMethodName = "/pactus.Transaction/GetRawWithdrawTransaction"
)
View Source
const (
	Wallet_CreateWallet_FullMethodName        = "/pactus.Wallet/CreateWallet"
	Wallet_LoadWallet_FullMethodName          = "/pactus.Wallet/LoadWallet"
	Wallet_UnloadWallet_FullMethodName        = "/pactus.Wallet/UnloadWallet"
	Wallet_LockWallet_FullMethodName          = "/pactus.Wallet/LockWallet"
	Wallet_UnlockWallet_FullMethodName        = "/pactus.Wallet/UnlockWallet"
	Wallet_GetTotalBalance_FullMethodName     = "/pactus.Wallet/GetTotalBalance"
	Wallet_SignRawTransaction_FullMethodName  = "/pactus.Wallet/SignRawTransaction"
	Wallet_GetValidatorAddress_FullMethodName = "/pactus.Wallet/GetValidatorAddress"
	Wallet_GetNewAddress_FullMethodName       = "/pactus.Wallet/GetNewAddress"
	Wallet_GetAddressHistory_FullMethodName   = "/pactus.Wallet/GetAddressHistory"
)

Variables

View Source
var (
	BlockVerbosity_name = map[int32]string{
		0: "BLOCK_DATA",
		1: "BLOCK_INFO",
		2: "BLOCK_TRANSACTIONS",
	}
	BlockVerbosity_value = map[string]int32{
		"BLOCK_DATA":         0,
		"BLOCK_INFO":         1,
		"BLOCK_TRANSACTIONS": 2,
	}
)

Enum value maps for BlockVerbosity.

View Source
var (
	VoteType_name = map[int32]string{
		0: "VOTE_UNKNOWN",
		1: "VOTE_PREPARE",
		2: "VOTE_PRECOMMIT",
		3: "VOTE_CHANGE_PROPOSER",
	}
	VoteType_value = map[string]int32{
		"VOTE_UNKNOWN":         0,
		"VOTE_PREPARE":         1,
		"VOTE_PRECOMMIT":       2,
		"VOTE_CHANGE_PROPOSER": 3,
	}
)

Enum value maps for VoteType.

View Source
var (
	PayloadType_name = map[int32]string{
		0: "UNKNOWN",
		1: "TRANSFER_PAYLOAD",
		2: "BOND_PAYLOAD",
		3: "SORTITION_PAYLOAD",
		4: "UNBOND_PAYLOAD",
		5: "WITHDRAW_PAYLOAD",
	}
	PayloadType_value = map[string]int32{
		"UNKNOWN":           0,
		"TRANSFER_PAYLOAD":  1,
		"BOND_PAYLOAD":      2,
		"SORTITION_PAYLOAD": 3,
		"UNBOND_PAYLOAD":    4,
		"WITHDRAW_PAYLOAD":  5,
	}
)

Enum value maps for PayloadType.

View Source
var (
	TransactionVerbosity_name = map[int32]string{
		0: "TRANSACTION_DATA",
		1: "TRANSACTION_INFO",
	}
	TransactionVerbosity_value = map[string]int32{
		"TRANSACTION_DATA": 0,
		"TRANSACTION_INFO": 1,
	}
)

Enum value maps for TransactionVerbosity.

View Source
var (
	AddressType_name = map[int32]string{
		0: "ADDRESS_TYPE_TREASURY",
		1: "ADDRESS_TYPE_VALIDATOR",
		2: "ADDRESS_TYPE_BLS_ACCOUNT",
	}
	AddressType_value = map[string]int32{
		"ADDRESS_TYPE_TREASURY":    0,
		"ADDRESS_TYPE_VALIDATOR":   1,
		"ADDRESS_TYPE_BLS_ACCOUNT": 2,
	}
)

Enum value maps for AddressType.

View Source
var Blockchain_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pactus.Blockchain",
	HandlerType: (*BlockchainServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetBlock",
			Handler:    _Blockchain_GetBlock_Handler,
		},
		{
			MethodName: "GetBlockHash",
			Handler:    _Blockchain_GetBlockHash_Handler,
		},
		{
			MethodName: "GetBlockHeight",
			Handler:    _Blockchain_GetBlockHeight_Handler,
		},
		{
			MethodName: "GetBlockchainInfo",
			Handler:    _Blockchain_GetBlockchainInfo_Handler,
		},
		{
			MethodName: "GetConsensusInfo",
			Handler:    _Blockchain_GetConsensusInfo_Handler,
		},
		{
			MethodName: "GetAccount",
			Handler:    _Blockchain_GetAccount_Handler,
		},
		{
			MethodName: "GetValidator",
			Handler:    _Blockchain_GetValidator_Handler,
		},
		{
			MethodName: "GetValidatorByNumber",
			Handler:    _Blockchain_GetValidatorByNumber_Handler,
		},
		{
			MethodName: "GetValidatorAddresses",
			Handler:    _Blockchain_GetValidatorAddresses_Handler,
		},
		{
			MethodName: "GetPublicKey",
			Handler:    _Blockchain_GetPublicKey_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "blockchain.proto",
}

Blockchain_ServiceDesc is the grpc.ServiceDesc for Blockchain service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_blockchain_proto protoreflect.FileDescriptor
View Source
var File_network_proto protoreflect.FileDescriptor
View Source
var File_transaction_proto protoreflect.FileDescriptor
View Source
var File_wallet_proto protoreflect.FileDescriptor
View Source
var Network_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pactus.Network",
	HandlerType: (*NetworkServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetNetworkInfo",
			Handler:    _Network_GetNetworkInfo_Handler,
		},
		{
			MethodName: "GetNodeInfo",
			Handler:    _Network_GetNodeInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "network.proto",
}

Network_ServiceDesc is the grpc.ServiceDesc for Network service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Transaction_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pactus.Transaction",
	HandlerType: (*TransactionServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetTransaction",
			Handler:    _Transaction_GetTransaction_Handler,
		},
		{
			MethodName: "CalculateFee",
			Handler:    _Transaction_CalculateFee_Handler,
		},
		{
			MethodName: "BroadcastTransaction",
			Handler:    _Transaction_BroadcastTransaction_Handler,
		},
		{
			MethodName: "GetRawTransferTransaction",
			Handler:    _Transaction_GetRawTransferTransaction_Handler,
		},
		{
			MethodName: "GetRawBondTransaction",
			Handler:    _Transaction_GetRawBondTransaction_Handler,
		},
		{
			MethodName: "GetRawUnbondTransaction",
			Handler:    _Transaction_GetRawUnbondTransaction_Handler,
		},
		{
			MethodName: "GetRawWithdrawTransaction",
			Handler:    _Transaction_GetRawWithdrawTransaction_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "transaction.proto",
}

Transaction_ServiceDesc is the grpc.ServiceDesc for Transaction service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Wallet_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pactus.Wallet",
	HandlerType: (*WalletServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateWallet",
			Handler:    _Wallet_CreateWallet_Handler,
		},
		{
			MethodName: "LoadWallet",
			Handler:    _Wallet_LoadWallet_Handler,
		},
		{
			MethodName: "UnloadWallet",
			Handler:    _Wallet_UnloadWallet_Handler,
		},
		{
			MethodName: "LockWallet",
			Handler:    _Wallet_LockWallet_Handler,
		},
		{
			MethodName: "UnlockWallet",
			Handler:    _Wallet_UnlockWallet_Handler,
		},
		{
			MethodName: "GetTotalBalance",
			Handler:    _Wallet_GetTotalBalance_Handler,
		},
		{
			MethodName: "SignRawTransaction",
			Handler:    _Wallet_SignRawTransaction_Handler,
		},
		{
			MethodName: "GetValidatorAddress",
			Handler:    _Wallet_GetValidatorAddress_Handler,
		},
		{
			MethodName: "GetNewAddress",
			Handler:    _Wallet_GetNewAddress_Handler,
		},
		{
			MethodName: "GetAddressHistory",
			Handler:    _Wallet_GetAddressHistory_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "wallet.proto",
}

Wallet_ServiceDesc is the grpc.ServiceDesc for Wallet service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func BlockchainClientCommand added in v1.1.0

func BlockchainClientCommand(options ...client.Option) *cobra.Command

func NetworkClientCommand added in v1.1.0

func NetworkClientCommand(options ...client.Option) *cobra.Command

func RegisterBlockchainHandler

func RegisterBlockchainHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterBlockchainHandler registers the http handlers for service Blockchain to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterBlockchainHandlerClient

func RegisterBlockchainHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockchainClient) error

RegisterBlockchainHandlerClient registers the http handlers for service Blockchain to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BlockchainClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BlockchainClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BlockchainClient" to call the correct interceptors.

func RegisterBlockchainHandlerFromEndpoint

func RegisterBlockchainHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterBlockchainHandlerFromEndpoint is same as RegisterBlockchainHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterBlockchainHandlerServer

func RegisterBlockchainHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockchainServer) error

RegisterBlockchainHandlerServer registers the http handlers for service Blockchain to "mux". UnaryRPC :call BlockchainServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBlockchainHandlerFromEndpoint instead.

func RegisterBlockchainServer

func RegisterBlockchainServer(s grpc.ServiceRegistrar, srv BlockchainServer)

func RegisterNetworkHandler

func RegisterNetworkHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterNetworkHandler registers the http handlers for service Network to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterNetworkHandlerClient

func RegisterNetworkHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NetworkClient) error

RegisterNetworkHandlerClient registers the http handlers for service Network to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NetworkClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NetworkClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NetworkClient" to call the correct interceptors.

func RegisterNetworkHandlerFromEndpoint

func RegisterNetworkHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterNetworkHandlerFromEndpoint is same as RegisterNetworkHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterNetworkHandlerServer

func RegisterNetworkHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NetworkServer) error

RegisterNetworkHandlerServer registers the http handlers for service Network to "mux". UnaryRPC :call NetworkServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNetworkHandlerFromEndpoint instead.

func RegisterNetworkServer

func RegisterNetworkServer(s grpc.ServiceRegistrar, srv NetworkServer)

func RegisterTransactionHandler

func RegisterTransactionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTransactionHandler registers the http handlers for service Transaction to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTransactionHandlerClient

func RegisterTransactionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionClient) error

RegisterTransactionHandlerClient registers the http handlers for service Transaction to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TransactionClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TransactionClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TransactionClient" to call the correct interceptors.

func RegisterTransactionHandlerFromEndpoint

func RegisterTransactionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTransactionHandlerFromEndpoint is same as RegisterTransactionHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTransactionHandlerServer

func RegisterTransactionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransactionServer) error

RegisterTransactionHandlerServer registers the http handlers for service Transaction to "mux". UnaryRPC :call TransactionServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTransactionHandlerFromEndpoint instead.

func RegisterTransactionServer

func RegisterTransactionServer(s grpc.ServiceRegistrar, srv TransactionServer)

func RegisterWalletHandler

func RegisterWalletHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterWalletHandler registers the http handlers for service Wallet to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterWalletHandlerClient

func RegisterWalletHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WalletClient) error

RegisterWalletHandlerClient registers the http handlers for service Wallet to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WalletClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WalletClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "WalletClient" to call the correct interceptors.

func RegisterWalletHandlerFromEndpoint

func RegisterWalletHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterWalletHandlerFromEndpoint is same as RegisterWalletHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterWalletHandlerServer

func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WalletServer) error

RegisterWalletHandlerServer registers the http handlers for service Wallet to "mux". UnaryRPC :call WalletServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWalletHandlerFromEndpoint instead.

func RegisterWalletServer

func RegisterWalletServer(s grpc.ServiceRegistrar, srv WalletServer)

func TransactionClientCommand added in v1.1.0

func TransactionClientCommand(options ...client.Option) *cobra.Command

func WalletClientCommand added in v1.1.0

func WalletClientCommand(options ...client.Option) *cobra.Command

Types

type AccountInfo

type AccountInfo struct {

	// Hash of the account.
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// Account data.
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// Account number.
	Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"`
	// Account balance in NanoPAC.
	Balance int64 `protobuf:"varint,4,opt,name=balance,proto3" json:"balance,omitempty"`
	// Address of the account.
	Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

Message containing information about an account.

func (*AccountInfo) Descriptor deprecated

func (*AccountInfo) Descriptor() ([]byte, []int)

Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead.

func (*AccountInfo) GetAddress

func (x *AccountInfo) GetAddress() string

func (*AccountInfo) GetBalance

func (x *AccountInfo) GetBalance() int64

func (*AccountInfo) GetData

func (x *AccountInfo) GetData() []byte

func (*AccountInfo) GetHash

func (x *AccountInfo) GetHash() []byte

func (*AccountInfo) GetNumber

func (x *AccountInfo) GetNumber() int32

func (*AccountInfo) ProtoMessage

func (*AccountInfo) ProtoMessage()

func (*AccountInfo) ProtoReflect

func (x *AccountInfo) ProtoReflect() protoreflect.Message

func (*AccountInfo) Reset

func (x *AccountInfo) Reset()

func (*AccountInfo) String

func (x *AccountInfo) String() string

type AddressInfo added in v1.1.0

type AddressInfo struct {
	Address   string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Label     string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
	Path      string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

Message of address information.

func (*AddressInfo) Descriptor deprecated added in v1.1.0

func (*AddressInfo) Descriptor() ([]byte, []int)

Deprecated: Use AddressInfo.ProtoReflect.Descriptor instead.

func (*AddressInfo) GetAddress added in v1.1.0

func (x *AddressInfo) GetAddress() string

func (*AddressInfo) GetLabel added in v1.1.0

func (x *AddressInfo) GetLabel() string

func (*AddressInfo) GetPath added in v1.1.0

func (x *AddressInfo) GetPath() string

func (*AddressInfo) GetPublicKey added in v1.1.0

func (x *AddressInfo) GetPublicKey() string

func (*AddressInfo) ProtoMessage added in v1.1.0

func (*AddressInfo) ProtoMessage()

func (*AddressInfo) ProtoReflect added in v1.1.0

func (x *AddressInfo) ProtoReflect() protoreflect.Message

func (*AddressInfo) Reset added in v1.1.0

func (x *AddressInfo) Reset()

func (*AddressInfo) String added in v1.1.0

func (x *AddressInfo) String() string

type AddressType added in v1.1.0

type AddressType int32

Enum for the address type.

const (
	AddressType_ADDRESS_TYPE_TREASURY    AddressType = 0
	AddressType_ADDRESS_TYPE_VALIDATOR   AddressType = 1
	AddressType_ADDRESS_TYPE_BLS_ACCOUNT AddressType = 2
)

func (AddressType) Descriptor added in v1.1.0

func (AddressType) Enum added in v1.1.0

func (x AddressType) Enum() *AddressType

func (AddressType) EnumDescriptor deprecated added in v1.1.0

func (AddressType) EnumDescriptor() ([]byte, []int)

Deprecated: Use AddressType.Descriptor instead.

func (AddressType) Number added in v1.1.0

func (x AddressType) Number() protoreflect.EnumNumber

func (AddressType) String added in v1.1.0

func (x AddressType) String() string

func (AddressType) Type added in v1.1.0

type BlockHeaderInfo

type BlockHeaderInfo struct {

	// Block version.
	Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// Hash of the previous block.
	PrevBlockHash []byte `protobuf:"bytes,2,opt,name=prev_block_hash,json=prevBlockHash,proto3" json:"prev_block_hash,omitempty"`
	// State root of the block.
	StateRoot []byte `protobuf:"bytes,3,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"`
	// Sortition seed of the block.
	SortitionSeed []byte `protobuf:"bytes,4,opt,name=sortition_seed,json=sortitionSeed,proto3" json:"sortition_seed,omitempty"`
	// Address of the proposer of the block.
	ProposerAddress string `protobuf:"bytes,5,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"`
	// contains filtered or unexported fields
}

Message containing information about the header of a block.

func (*BlockHeaderInfo) Descriptor deprecated

func (*BlockHeaderInfo) Descriptor() ([]byte, []int)

Deprecated: Use BlockHeaderInfo.ProtoReflect.Descriptor instead.

func (*BlockHeaderInfo) GetPrevBlockHash

func (x *BlockHeaderInfo) GetPrevBlockHash() []byte

func (*BlockHeaderInfo) GetProposerAddress

func (x *BlockHeaderInfo) GetProposerAddress() string

func (*BlockHeaderInfo) GetSortitionSeed

func (x *BlockHeaderInfo) GetSortitionSeed() []byte

func (*BlockHeaderInfo) GetStateRoot

func (x *BlockHeaderInfo) GetStateRoot() []byte

func (*BlockHeaderInfo) GetVersion

func (x *BlockHeaderInfo) GetVersion() int32

func (*BlockHeaderInfo) ProtoMessage

func (*BlockHeaderInfo) ProtoMessage()

func (*BlockHeaderInfo) ProtoReflect

func (x *BlockHeaderInfo) ProtoReflect() protoreflect.Message

func (*BlockHeaderInfo) Reset

func (x *BlockHeaderInfo) Reset()

func (*BlockHeaderInfo) String

func (x *BlockHeaderInfo) String() string

type BlockVerbosity

type BlockVerbosity int32

Enumeration for verbosity level when requesting block information.

const (
	// Request block data only.
	BlockVerbosity_BLOCK_DATA BlockVerbosity = 0
	// Request block information and transaction IDs.
	BlockVerbosity_BLOCK_INFO BlockVerbosity = 1
	// Request block information and transaction details.
	BlockVerbosity_BLOCK_TRANSACTIONS BlockVerbosity = 2
)

func (BlockVerbosity) Descriptor

func (BlockVerbosity) Enum

func (x BlockVerbosity) Enum() *BlockVerbosity

func (BlockVerbosity) EnumDescriptor deprecated

func (BlockVerbosity) EnumDescriptor() ([]byte, []int)

Deprecated: Use BlockVerbosity.Descriptor instead.

func (BlockVerbosity) Number

func (BlockVerbosity) String

func (x BlockVerbosity) String() string

func (BlockVerbosity) Type

type BlockchainClient

type BlockchainClient interface {
	// GetBlock retrieves information about a block based on the provided request
	// parameters.
	GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error)
	// GetBlockHash retrieves the hash of a block at the specified height.
	GetBlockHash(ctx context.Context, in *GetBlockHashRequest, opts ...grpc.CallOption) (*GetBlockHashResponse, error)
	// GetBlockHeight retrieves the height of a block with the specified hash.
	GetBlockHeight(ctx context.Context, in *GetBlockHeightRequest, opts ...grpc.CallOption) (*GetBlockHeightResponse, error)
	// GetBlockchainInfo retrieves general information about the blockchain.
	GetBlockchainInfo(ctx context.Context, in *GetBlockchainInfoRequest, opts ...grpc.CallOption) (*GetBlockchainInfoResponse, error)
	// GetConsensusInfo retrieves information about the consensus instances.
	GetConsensusInfo(ctx context.Context, in *GetConsensusInfoRequest, opts ...grpc.CallOption) (*GetConsensusInfoResponse, error)
	// GetAccount retrieves information about an account based on the provided
	// address.
	GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)
	// GetValidator retrieves information about a validator based on the provided
	// address.
	GetValidator(ctx context.Context, in *GetValidatorRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error)
	// GetValidatorByNumber retrieves information about a validator based on the
	// provided number.
	GetValidatorByNumber(ctx context.Context, in *GetValidatorByNumberRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error)
	// GetValidatorAddresses retrieves a list of all validator addresses.
	GetValidatorAddresses(ctx context.Context, in *GetValidatorAddressesRequest, opts ...grpc.CallOption) (*GetValidatorAddressesResponse, error)
	// GetPublicKey retrieves the public key of an account based on the provided
	// address.
	GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*GetPublicKeyResponse, error)
}

BlockchainClient is the client API for Blockchain service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewBlockchainClient

func NewBlockchainClient(cc grpc.ClientConnInterface) BlockchainClient

type BlockchainJsonRpcService added in v1.1.0

type BlockchainJsonRpcService struct {
	// contains filtered or unexported fields
}

func NewBlockchainJsonRpcService added in v1.1.0

func NewBlockchainJsonRpcService(client BlockchainClient) BlockchainJsonRpcService

func (*BlockchainJsonRpcService) Methods added in v1.1.0

func (s *BlockchainJsonRpcService) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error)

type BlockchainServer

type BlockchainServer interface {
	// GetBlock retrieves information about a block based on the provided request
	// parameters.
	GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error)
	// GetBlockHash retrieves the hash of a block at the specified height.
	GetBlockHash(context.Context, *GetBlockHashRequest) (*GetBlockHashResponse, error)
	// GetBlockHeight retrieves the height of a block with the specified hash.
	GetBlockHeight(context.Context, *GetBlockHeightRequest) (*GetBlockHeightResponse, error)
	// GetBlockchainInfo retrieves general information about the blockchain.
	GetBlockchainInfo(context.Context, *GetBlockchainInfoRequest) (*GetBlockchainInfoResponse, error)
	// GetConsensusInfo retrieves information about the consensus instances.
	GetConsensusInfo(context.Context, *GetConsensusInfoRequest) (*GetConsensusInfoResponse, error)
	// GetAccount retrieves information about an account based on the provided
	// address.
	GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
	// GetValidator retrieves information about a validator based on the provided
	// address.
	GetValidator(context.Context, *GetValidatorRequest) (*GetValidatorResponse, error)
	// GetValidatorByNumber retrieves information about a validator based on the
	// provided number.
	GetValidatorByNumber(context.Context, *GetValidatorByNumberRequest) (*GetValidatorResponse, error)
	// GetValidatorAddresses retrieves a list of all validator addresses.
	GetValidatorAddresses(context.Context, *GetValidatorAddressesRequest) (*GetValidatorAddressesResponse, error)
	// GetPublicKey retrieves the public key of an account based on the provided
	// address.
	GetPublicKey(context.Context, *GetPublicKeyRequest) (*GetPublicKeyResponse, error)
}

BlockchainServer is the server API for Blockchain service. All implementations should embed UnimplementedBlockchainServer for forward compatibility

type BroadcastTransactionRequest added in v1.0.0

type BroadcastTransactionRequest struct {

	// Signed raw transaction data.
	SignedRawTransaction []byte `protobuf:"bytes,1,opt,name=signed_raw_transaction,json=signedRawTransaction,proto3" json:"signed_raw_transaction,omitempty"`
	// contains filtered or unexported fields
}

Request message for broadcasting a signed transaction.

func (*BroadcastTransactionRequest) Descriptor deprecated added in v1.0.0

func (*BroadcastTransactionRequest) Descriptor() ([]byte, []int)

Deprecated: Use BroadcastTransactionRequest.ProtoReflect.Descriptor instead.

func (*BroadcastTransactionRequest) GetSignedRawTransaction added in v1.0.0

func (x *BroadcastTransactionRequest) GetSignedRawTransaction() []byte

func (*BroadcastTransactionRequest) ProtoMessage added in v1.0.0

func (*BroadcastTransactionRequest) ProtoMessage()

func (*BroadcastTransactionRequest) ProtoReflect added in v1.0.0

func (*BroadcastTransactionRequest) Reset added in v1.0.0

func (x *BroadcastTransactionRequest) Reset()

func (*BroadcastTransactionRequest) String added in v1.0.0

func (x *BroadcastTransactionRequest) String() string

type BroadcastTransactionResponse added in v1.0.0

type BroadcastTransactionResponse struct {

	// Transaction ID.
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the ID of the broadcasted transaction.

func (*BroadcastTransactionResponse) Descriptor deprecated added in v1.0.0

func (*BroadcastTransactionResponse) Descriptor() ([]byte, []int)

Deprecated: Use BroadcastTransactionResponse.ProtoReflect.Descriptor instead.

func (*BroadcastTransactionResponse) GetId added in v1.0.0

func (x *BroadcastTransactionResponse) GetId() []byte

func (*BroadcastTransactionResponse) ProtoMessage added in v1.0.0

func (*BroadcastTransactionResponse) ProtoMessage()

func (*BroadcastTransactionResponse) ProtoReflect added in v1.0.0

func (*BroadcastTransactionResponse) Reset added in v1.0.0

func (x *BroadcastTransactionResponse) Reset()

func (*BroadcastTransactionResponse) String added in v1.0.0

type CalculateFeeRequest added in v0.15.0

type CalculateFeeRequest struct {

	// Transaction amount in NanoPAC.
	Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
	// Type of transaction payload.
	PayloadType PayloadType `protobuf:"varint,2,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType" json:"payload_type,omitempty"`
	// Indicates that amount should be fixed and includes the fee.
	FixedAmount bool `protobuf:"varint,3,opt,name=fixed_amount,json=fixedAmount,proto3" json:"fixed_amount,omitempty"`
	// contains filtered or unexported fields
}

Request message for calculating transaction fee.

func (*CalculateFeeRequest) Descriptor deprecated added in v0.15.0

func (*CalculateFeeRequest) Descriptor() ([]byte, []int)

Deprecated: Use CalculateFeeRequest.ProtoReflect.Descriptor instead.

func (*CalculateFeeRequest) GetAmount added in v0.15.0

func (x *CalculateFeeRequest) GetAmount() int64

func (*CalculateFeeRequest) GetFixedAmount added in v1.1.0

func (x *CalculateFeeRequest) GetFixedAmount() bool

func (*CalculateFeeRequest) GetPayloadType added in v0.15.0

func (x *CalculateFeeRequest) GetPayloadType() PayloadType

func (*CalculateFeeRequest) ProtoMessage added in v0.15.0

func (*CalculateFeeRequest) ProtoMessage()

func (*CalculateFeeRequest) ProtoReflect added in v0.15.0

func (x *CalculateFeeRequest) ProtoReflect() protoreflect.Message

func (*CalculateFeeRequest) Reset added in v0.15.0

func (x *CalculateFeeRequest) Reset()

func (*CalculateFeeRequest) String added in v0.15.0

func (x *CalculateFeeRequest) String() string

type CalculateFeeResponse added in v0.15.0

type CalculateFeeResponse struct {

	// Calculated amount in NanoPAC.
	Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
	// Calculated transaction fee in NanoPAC.
	Fee int64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the calculated transaction fee.

func (*CalculateFeeResponse) Descriptor deprecated added in v0.15.0

func (*CalculateFeeResponse) Descriptor() ([]byte, []int)

Deprecated: Use CalculateFeeResponse.ProtoReflect.Descriptor instead.

func (*CalculateFeeResponse) GetAmount added in v1.1.0

func (x *CalculateFeeResponse) GetAmount() int64

func (*CalculateFeeResponse) GetFee added in v0.15.0

func (x *CalculateFeeResponse) GetFee() int64

func (*CalculateFeeResponse) ProtoMessage added in v0.15.0

func (*CalculateFeeResponse) ProtoMessage()

func (*CalculateFeeResponse) ProtoReflect added in v0.15.0

func (x *CalculateFeeResponse) ProtoReflect() protoreflect.Message

func (*CalculateFeeResponse) Reset added in v0.15.0

func (x *CalculateFeeResponse) Reset()

func (*CalculateFeeResponse) String added in v0.15.0

func (x *CalculateFeeResponse) String() string

type CertificateInfo

type CertificateInfo struct {

	// Hash of the certificate.
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// Round of the certificate.
	Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
	// List of committers in the certificate.
	Committers []int32 `protobuf:"varint,3,rep,packed,name=committers,proto3" json:"committers,omitempty"`
	// List of absentees in the certificate.
	Absentees []int32 `protobuf:"varint,4,rep,packed,name=absentees,proto3" json:"absentees,omitempty"`
	// Certificate signature.
	Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

Message containing information about a certificate.

func (*CertificateInfo) Descriptor deprecated

func (*CertificateInfo) Descriptor() ([]byte, []int)

Deprecated: Use CertificateInfo.ProtoReflect.Descriptor instead.

func (*CertificateInfo) GetAbsentees

func (x *CertificateInfo) GetAbsentees() []int32

func (*CertificateInfo) GetCommitters

func (x *CertificateInfo) GetCommitters() []int32

func (*CertificateInfo) GetHash

func (x *CertificateInfo) GetHash() []byte

func (*CertificateInfo) GetRound

func (x *CertificateInfo) GetRound() int32

func (*CertificateInfo) GetSignature

func (x *CertificateInfo) GetSignature() []byte

func (*CertificateInfo) ProtoMessage

func (*CertificateInfo) ProtoMessage()

func (*CertificateInfo) ProtoReflect

func (x *CertificateInfo) ProtoReflect() protoreflect.Message

func (*CertificateInfo) Reset

func (x *CertificateInfo) Reset()

func (*CertificateInfo) String

func (x *CertificateInfo) String() string

type ConsensusInfo added in v0.10.0

type ConsensusInfo struct {

	// Address of the consensus instance.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Whether the consensus instance is active.
	Active bool `protobuf:"varint,2,opt,name=Active,proto3" json:"Active,omitempty"`
	// Height of the consensus instance.
	Height uint32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
	// Round of the consensus instance.
	Round int32 `protobuf:"varint,4,opt,name=round,proto3" json:"round,omitempty"`
	// List of votes in the consensus instance.
	Votes []*VoteInfo `protobuf:"bytes,5,rep,name=votes,proto3" json:"votes,omitempty"`
	// contains filtered or unexported fields
}

Message containing information about consensus.

func (*ConsensusInfo) Descriptor deprecated added in v0.10.0

func (*ConsensusInfo) Descriptor() ([]byte, []int)

Deprecated: Use ConsensusInfo.ProtoReflect.Descriptor instead.

func (*ConsensusInfo) GetActive added in v0.10.0

func (x *ConsensusInfo) GetActive() bool

func (*ConsensusInfo) GetAddress added in v0.10.0

func (x *ConsensusInfo) GetAddress() string

func (*ConsensusInfo) GetHeight added in v0.10.0

func (x *ConsensusInfo) GetHeight() uint32

func (*ConsensusInfo) GetRound added in v0.10.0

func (x *ConsensusInfo) GetRound() int32

func (*ConsensusInfo) GetVotes added in v0.10.0

func (x *ConsensusInfo) GetVotes() []*VoteInfo

func (*ConsensusInfo) ProtoMessage added in v0.10.0

func (*ConsensusInfo) ProtoMessage()

func (*ConsensusInfo) ProtoReflect added in v0.10.0

func (x *ConsensusInfo) ProtoReflect() protoreflect.Message

func (*ConsensusInfo) Reset added in v0.10.0

func (x *ConsensusInfo) Reset()

func (*ConsensusInfo) String added in v0.10.0

func (x *ConsensusInfo) String() string

type CreateWalletRequest

type CreateWalletRequest struct {

	// Name of the new wallet.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// Mnemonic for wallet recovery.
	Mnemonic string `protobuf:"bytes,2,opt,name=mnemonic,proto3" json:"mnemonic,omitempty"`
	// Language for the mnemonic.
	Language string `protobuf:"bytes,3,opt,name=language,proto3" json:"language,omitempty"`
	// Password for securing the wallet.
	Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

Request message for creating a new wallet.

func (*CreateWalletRequest) Descriptor deprecated

func (*CreateWalletRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateWalletRequest.ProtoReflect.Descriptor instead.

func (*CreateWalletRequest) GetLanguage

func (x *CreateWalletRequest) GetLanguage() string

func (*CreateWalletRequest) GetMnemonic

func (x *CreateWalletRequest) GetMnemonic() string

func (*CreateWalletRequest) GetPassword

func (x *CreateWalletRequest) GetPassword() string

func (*CreateWalletRequest) GetWalletName added in v1.0.0

func (x *CreateWalletRequest) GetWalletName() string

func (*CreateWalletRequest) ProtoMessage

func (*CreateWalletRequest) ProtoMessage()

func (*CreateWalletRequest) ProtoReflect

func (x *CreateWalletRequest) ProtoReflect() protoreflect.Message

func (*CreateWalletRequest) Reset

func (x *CreateWalletRequest) Reset()

func (*CreateWalletRequest) String

func (x *CreateWalletRequest) String() string

type CreateWalletResponse

type CreateWalletResponse struct {

	// Name of the created wallet.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the name of the created wallet.

func (*CreateWalletResponse) Descriptor deprecated

func (*CreateWalletResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateWalletResponse.ProtoReflect.Descriptor instead.

func (*CreateWalletResponse) GetWalletName added in v1.0.0

func (x *CreateWalletResponse) GetWalletName() string

func (*CreateWalletResponse) ProtoMessage

func (*CreateWalletResponse) ProtoMessage()

func (*CreateWalletResponse) ProtoReflect

func (x *CreateWalletResponse) ProtoReflect() protoreflect.Message

func (*CreateWalletResponse) Reset

func (x *CreateWalletResponse) Reset()

func (*CreateWalletResponse) String

func (x *CreateWalletResponse) String() string

type GetAccountRequest

type GetAccountRequest struct {

	// Address of the account.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

Message to request account information based on an address.

func (*GetAccountRequest) Descriptor deprecated

func (*GetAccountRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead.

func (*GetAccountRequest) GetAddress

func (x *GetAccountRequest) GetAddress() string

func (*GetAccountRequest) ProtoMessage

func (*GetAccountRequest) ProtoMessage()

func (*GetAccountRequest) ProtoReflect

func (x *GetAccountRequest) ProtoReflect() protoreflect.Message

func (*GetAccountRequest) Reset

func (x *GetAccountRequest) Reset()

func (*GetAccountRequest) String

func (x *GetAccountRequest) String() string

type GetAccountResponse

type GetAccountResponse struct {

	// Account information.
	Account *AccountInfo `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// contains filtered or unexported fields
}

Message containing the response with account information.

func (*GetAccountResponse) Descriptor deprecated

func (*GetAccountResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetAccountResponse.ProtoReflect.Descriptor instead.

func (*GetAccountResponse) GetAccount

func (x *GetAccountResponse) GetAccount() *AccountInfo

func (*GetAccountResponse) ProtoMessage

func (*GetAccountResponse) ProtoMessage()

func (*GetAccountResponse) ProtoReflect

func (x *GetAccountResponse) ProtoReflect() protoreflect.Message

func (*GetAccountResponse) Reset

func (x *GetAccountResponse) Reset()

func (*GetAccountResponse) String

func (x *GetAccountResponse) String() string

type GetAddressHistoryRequest added in v1.1.0

type GetAddressHistoryRequest struct {

	// Name of the wallet.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// Address to get the transaction history of it.
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

Request message to get an address transaction history.

func (*GetAddressHistoryRequest) Descriptor deprecated added in v1.1.0

func (*GetAddressHistoryRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetAddressHistoryRequest.ProtoReflect.Descriptor instead.

func (*GetAddressHistoryRequest) GetAddress added in v1.1.0

func (x *GetAddressHistoryRequest) GetAddress() string

func (*GetAddressHistoryRequest) GetWalletName added in v1.1.0

func (x *GetAddressHistoryRequest) GetWalletName() string

func (*GetAddressHistoryRequest) ProtoMessage added in v1.1.0

func (*GetAddressHistoryRequest) ProtoMessage()

func (*GetAddressHistoryRequest) ProtoReflect added in v1.1.0

func (x *GetAddressHistoryRequest) ProtoReflect() protoreflect.Message

func (*GetAddressHistoryRequest) Reset added in v1.1.0

func (x *GetAddressHistoryRequest) Reset()

func (*GetAddressHistoryRequest) String added in v1.1.0

func (x *GetAddressHistoryRequest) String() string

type GetAddressHistoryResponse added in v1.1.0

type GetAddressHistoryResponse struct {

	// Array of address history and activities.
	HistoryInfo []*HistoryInfo `protobuf:"bytes,1,rep,name=history_info,json=historyInfo,proto3" json:"history_info,omitempty"`
	// contains filtered or unexported fields
}

Response message to get an address transaction history.

func (*GetAddressHistoryResponse) Descriptor deprecated added in v1.1.0

func (*GetAddressHistoryResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetAddressHistoryResponse.ProtoReflect.Descriptor instead.

func (*GetAddressHistoryResponse) GetHistoryInfo added in v1.1.0

func (x *GetAddressHistoryResponse) GetHistoryInfo() []*HistoryInfo

func (*GetAddressHistoryResponse) ProtoMessage added in v1.1.0

func (*GetAddressHistoryResponse) ProtoMessage()

func (*GetAddressHistoryResponse) ProtoReflect added in v1.1.0

func (*GetAddressHistoryResponse) Reset added in v1.1.0

func (x *GetAddressHistoryResponse) Reset()

func (*GetAddressHistoryResponse) String added in v1.1.0

func (x *GetAddressHistoryResponse) String() string

type GetBlockHashRequest

type GetBlockHashRequest struct {

	// Height of the block.
	Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	// contains filtered or unexported fields
}

Message to request block hash based on height.

func (*GetBlockHashRequest) Descriptor deprecated

func (*GetBlockHashRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBlockHashRequest.ProtoReflect.Descriptor instead.

func (*GetBlockHashRequest) GetHeight

func (x *GetBlockHashRequest) GetHeight() uint32

func (*GetBlockHashRequest) ProtoMessage

func (*GetBlockHashRequest) ProtoMessage()

func (*GetBlockHashRequest) ProtoReflect

func (x *GetBlockHashRequest) ProtoReflect() protoreflect.Message

func (*GetBlockHashRequest) Reset

func (x *GetBlockHashRequest) Reset()

func (*GetBlockHashRequest) String

func (x *GetBlockHashRequest) String() string

type GetBlockHashResponse

type GetBlockHashResponse struct {

	// Hash of the block.
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

Message containing the response with the block hash.

func (*GetBlockHashResponse) Descriptor deprecated

func (*GetBlockHashResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetBlockHashResponse.ProtoReflect.Descriptor instead.

func (*GetBlockHashResponse) GetHash

func (x *GetBlockHashResponse) GetHash() []byte

func (*GetBlockHashResponse) ProtoMessage

func (*GetBlockHashResponse) ProtoMessage()

func (*GetBlockHashResponse) ProtoReflect

func (x *GetBlockHashResponse) ProtoReflect() protoreflect.Message

func (*GetBlockHashResponse) Reset

func (x *GetBlockHashResponse) Reset()

func (*GetBlockHashResponse) String

func (x *GetBlockHashResponse) String() string

type GetBlockHeightRequest

type GetBlockHeightRequest struct {

	// Hash of the block.
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

Message to request block height based on hash.

func (*GetBlockHeightRequest) Descriptor deprecated

func (*GetBlockHeightRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBlockHeightRequest.ProtoReflect.Descriptor instead.

func (*GetBlockHeightRequest) GetHash

func (x *GetBlockHeightRequest) GetHash() []byte

func (*GetBlockHeightRequest) ProtoMessage

func (*GetBlockHeightRequest) ProtoMessage()

func (*GetBlockHeightRequest) ProtoReflect

func (x *GetBlockHeightRequest) ProtoReflect() protoreflect.Message

func (*GetBlockHeightRequest) Reset

func (x *GetBlockHeightRequest) Reset()

func (*GetBlockHeightRequest) String

func (x *GetBlockHeightRequest) String() string

type GetBlockHeightResponse

type GetBlockHeightResponse struct {

	// Height of the block.
	Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	// contains filtered or unexported fields
}

Message containing the response with the block height.

func (*GetBlockHeightResponse) Descriptor deprecated

func (*GetBlockHeightResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetBlockHeightResponse.ProtoReflect.Descriptor instead.

func (*GetBlockHeightResponse) GetHeight

func (x *GetBlockHeightResponse) GetHeight() uint32

func (*GetBlockHeightResponse) ProtoMessage

func (*GetBlockHeightResponse) ProtoMessage()

func (*GetBlockHeightResponse) ProtoReflect

func (x *GetBlockHeightResponse) ProtoReflect() protoreflect.Message

func (*GetBlockHeightResponse) Reset

func (x *GetBlockHeightResponse) Reset()

func (*GetBlockHeightResponse) String

func (x *GetBlockHeightResponse) String() string

type GetBlockRequest

type GetBlockRequest struct {

	// Height of the block.
	Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	// Verbosity level for block information.
	Verbosity BlockVerbosity `protobuf:"varint,2,opt,name=verbosity,proto3,enum=pactus.BlockVerbosity" json:"verbosity,omitempty"`
	// contains filtered or unexported fields
}

Message to request block information based on height and verbosity.

func (*GetBlockRequest) Descriptor deprecated

func (*GetBlockRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBlockRequest.ProtoReflect.Descriptor instead.

func (*GetBlockRequest) GetHeight

func (x *GetBlockRequest) GetHeight() uint32

func (*GetBlockRequest) GetVerbosity

func (x *GetBlockRequest) GetVerbosity() BlockVerbosity

func (*GetBlockRequest) ProtoMessage

func (*GetBlockRequest) ProtoMessage()

func (*GetBlockRequest) ProtoReflect

func (x *GetBlockRequest) ProtoReflect() protoreflect.Message

func (*GetBlockRequest) Reset

func (x *GetBlockRequest) Reset()

func (*GetBlockRequest) String

func (x *GetBlockRequest) String() string

type GetBlockResponse

type GetBlockResponse struct {

	// Height of the block.
	Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	// Hash of the block.
	Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	// Block data, only available if the verbosity level is set to BLOCK_DATA.
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// Block timestamp.
	BlockTime uint32 `protobuf:"varint,4,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"`
	// Block header information.
	Header *BlockHeaderInfo `protobuf:"bytes,5,opt,name=header,proto3" json:"header,omitempty"`
	// Certificate information of the previous block.
	PrevCert *CertificateInfo `protobuf:"bytes,6,opt,name=prev_cert,json=prevCert,proto3" json:"prev_cert,omitempty"`
	// List of transactions in the block.
	// Transaction information is available when the verbosity level is set to BLOCK_TRANSACTIONS.
	Txs []*TransactionInfo `protobuf:"bytes,7,rep,name=txs,proto3" json:"txs,omitempty"`
	// contains filtered or unexported fields
}

Message containing the response with block information.

func (*GetBlockResponse) Descriptor deprecated

func (*GetBlockResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetBlockResponse.ProtoReflect.Descriptor instead.

func (*GetBlockResponse) GetBlockTime

func (x *GetBlockResponse) GetBlockTime() uint32

func (*GetBlockResponse) GetData

func (x *GetBlockResponse) GetData() []byte

func (*GetBlockResponse) GetHash

func (x *GetBlockResponse) GetHash() []byte

func (*GetBlockResponse) GetHeader

func (x *GetBlockResponse) GetHeader() *BlockHeaderInfo

func (*GetBlockResponse) GetHeight

func (x *GetBlockResponse) GetHeight() uint32

func (*GetBlockResponse) GetPrevCert

func (x *GetBlockResponse) GetPrevCert() *CertificateInfo

func (*GetBlockResponse) GetTxs

func (x *GetBlockResponse) GetTxs() []*TransactionInfo

func (*GetBlockResponse) ProtoMessage

func (*GetBlockResponse) ProtoMessage()

func (*GetBlockResponse) ProtoReflect

func (x *GetBlockResponse) ProtoReflect() protoreflect.Message

func (*GetBlockResponse) Reset

func (x *GetBlockResponse) Reset()

func (*GetBlockResponse) String

func (x *GetBlockResponse) String() string

type GetBlockchainInfoRequest

type GetBlockchainInfoRequest struct {
	// contains filtered or unexported fields
}

Message to request general information about the blockchain.

func (*GetBlockchainInfoRequest) Descriptor deprecated

func (*GetBlockchainInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBlockchainInfoRequest.ProtoReflect.Descriptor instead.

func (*GetBlockchainInfoRequest) ProtoMessage

func (*GetBlockchainInfoRequest) ProtoMessage()

func (*GetBlockchainInfoRequest) ProtoReflect

func (x *GetBlockchainInfoRequest) ProtoReflect() protoreflect.Message

func (*GetBlockchainInfoRequest) Reset

func (x *GetBlockchainInfoRequest) Reset()

func (*GetBlockchainInfoRequest) String

func (x *GetBlockchainInfoRequest) String() string

type GetBlockchainInfoResponse

type GetBlockchainInfoResponse struct {

	// Height of the last block.
	LastBlockHeight uint32 `protobuf:"varint,1,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"`
	// Hash of the last block.
	LastBlockHash []byte `protobuf:"bytes,2,opt,name=last_block_hash,json=lastBlockHash,proto3" json:"last_block_hash,omitempty"`
	// Total number of accounts.
	TotalAccounts int32 `protobuf:"varint,3,opt,name=total_accounts,json=totalAccounts,proto3" json:"total_accounts,omitempty"`
	// Total number of validators.
	TotalValidators int32 `protobuf:"varint,4,opt,name=total_validators,json=totalValidators,proto3" json:"total_validators,omitempty"`
	// Total power in the blockchain.
	TotalPower int64 `protobuf:"varint,5,opt,name=total_power,json=totalPower,proto3" json:"total_power,omitempty"`
	// Power of the committee.
	CommitteePower int64 `protobuf:"varint,6,opt,name=committee_power,json=committeePower,proto3" json:"committee_power,omitempty"`
	// List of committee validators.
	CommitteeValidators []*ValidatorInfo `protobuf:"bytes,7,rep,name=committee_validators,json=committeeValidators,proto3" json:"committee_validators,omitempty"`
	// contains filtered or unexported fields
}

Message containing the response with general blockchain information.

func (*GetBlockchainInfoResponse) Descriptor deprecated

func (*GetBlockchainInfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetBlockchainInfoResponse.ProtoReflect.Descriptor instead.

func (*GetBlockchainInfoResponse) GetCommitteePower

func (x *GetBlockchainInfoResponse) GetCommitteePower() int64

func (*GetBlockchainInfoResponse) GetCommitteeValidators

func (x *GetBlockchainInfoResponse) GetCommitteeValidators() []*ValidatorInfo

func (*GetBlockchainInfoResponse) GetLastBlockHash

func (x *GetBlockchainInfoResponse) GetLastBlockHash() []byte

func (*GetBlockchainInfoResponse) GetLastBlockHeight

func (x *GetBlockchainInfoResponse) GetLastBlockHeight() uint32

func (*GetBlockchainInfoResponse) GetTotalAccounts added in v0.10.0

func (x *GetBlockchainInfoResponse) GetTotalAccounts() int32

func (*GetBlockchainInfoResponse) GetTotalPower

func (x *GetBlockchainInfoResponse) GetTotalPower() int64

func (*GetBlockchainInfoResponse) GetTotalValidators added in v0.10.0

func (x *GetBlockchainInfoResponse) GetTotalValidators() int32

func (*GetBlockchainInfoResponse) ProtoMessage

func (*GetBlockchainInfoResponse) ProtoMessage()

func (*GetBlockchainInfoResponse) ProtoReflect

func (*GetBlockchainInfoResponse) Reset

func (x *GetBlockchainInfoResponse) Reset()

func (*GetBlockchainInfoResponse) String

func (x *GetBlockchainInfoResponse) String() string

type GetConsensusInfoRequest

type GetConsensusInfoRequest struct {
	// contains filtered or unexported fields
}

Message to request consensus information.

func (*GetConsensusInfoRequest) Descriptor deprecated

func (*GetConsensusInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetConsensusInfoRequest.ProtoReflect.Descriptor instead.

func (*GetConsensusInfoRequest) ProtoMessage

func (*GetConsensusInfoRequest) ProtoMessage()

func (*GetConsensusInfoRequest) ProtoReflect

func (x *GetConsensusInfoRequest) ProtoReflect() protoreflect.Message

func (*GetConsensusInfoRequest) Reset

func (x *GetConsensusInfoRequest) Reset()

func (*GetConsensusInfoRequest) String

func (x *GetConsensusInfoRequest) String() string

type GetConsensusInfoResponse

type GetConsensusInfoResponse struct {

	// List of consensus instances.
	Instances []*ConsensusInfo `protobuf:"bytes,1,rep,name=instances,proto3" json:"instances,omitempty"`
	// contains filtered or unexported fields
}

Message containing the response with consensus information.

func (*GetConsensusInfoResponse) Descriptor deprecated

func (*GetConsensusInfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetConsensusInfoResponse.ProtoReflect.Descriptor instead.

func (*GetConsensusInfoResponse) GetInstances added in v0.10.0

func (x *GetConsensusInfoResponse) GetInstances() []*ConsensusInfo

func (*GetConsensusInfoResponse) ProtoMessage

func (*GetConsensusInfoResponse) ProtoMessage()

func (*GetConsensusInfoResponse) ProtoReflect

func (x *GetConsensusInfoResponse) ProtoReflect() protoreflect.Message

func (*GetConsensusInfoResponse) Reset

func (x *GetConsensusInfoResponse) Reset()

func (*GetConsensusInfoResponse) String

func (x *GetConsensusInfoResponse) String() string

type GetNetworkInfoRequest

type GetNetworkInfoRequest struct {
	// contains filtered or unexported fields
}

Request message for retrieving overall network information.

func (*GetNetworkInfoRequest) Descriptor deprecated

func (*GetNetworkInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetNetworkInfoRequest.ProtoReflect.Descriptor instead.

func (*GetNetworkInfoRequest) ProtoMessage

func (*GetNetworkInfoRequest) ProtoMessage()

func (*GetNetworkInfoRequest) ProtoReflect

func (x *GetNetworkInfoRequest) ProtoReflect() protoreflect.Message

func (*GetNetworkInfoRequest) Reset

func (x *GetNetworkInfoRequest) Reset()

func (*GetNetworkInfoRequest) String

func (x *GetNetworkInfoRequest) String() string

type GetNetworkInfoResponse

type GetNetworkInfoResponse struct {

	// Name of the network.
	NetworkName string `protobuf:"bytes,1,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"`
	// Total bytes sent across the network.
	TotalSentBytes uint32 `protobuf:"varint,2,opt,name=total_sent_bytes,json=totalSentBytes,proto3" json:"total_sent_bytes,omitempty"`
	// Total bytes received across the network.
	TotalReceivedBytes uint32 `protobuf:"varint,3,opt,name=total_received_bytes,json=totalReceivedBytes,proto3" json:"total_received_bytes,omitempty"`
	// Number of connected peers.
	ConnectedPeersCount uint32 `protobuf:"varint,4,opt,name=connected_peers_count,json=connectedPeersCount,proto3" json:"connected_peers_count,omitempty"`
	// List of connected peers.
	ConnectedPeers []*PeerInfo `protobuf:"bytes,5,rep,name=connected_peers,json=connectedPeers,proto3" json:"connected_peers,omitempty"`
	// Bytes sent per peer ID.
	SentBytes map[uint32]uint64 `` /* 178-byte string literal not displayed */
	// Bytes received per peer ID.
	ReceivedBytes map[uint32]uint64 `` /* 190-byte string literal not displayed */
	// contains filtered or unexported fields
}

Response message containing information about the overall network.

func (*GetNetworkInfoResponse) Descriptor deprecated

func (*GetNetworkInfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetNetworkInfoResponse.ProtoReflect.Descriptor instead.

func (*GetNetworkInfoResponse) GetConnectedPeers added in v0.19.0

func (x *GetNetworkInfoResponse) GetConnectedPeers() []*PeerInfo

func (*GetNetworkInfoResponse) GetConnectedPeersCount added in v0.19.0

func (x *GetNetworkInfoResponse) GetConnectedPeersCount() uint32

func (*GetNetworkInfoResponse) GetNetworkName added in v0.19.0

func (x *GetNetworkInfoResponse) GetNetworkName() string

func (*GetNetworkInfoResponse) GetReceivedBytes added in v0.15.0

func (x *GetNetworkInfoResponse) GetReceivedBytes() map[uint32]uint64

func (*GetNetworkInfoResponse) GetSentBytes added in v0.15.0

func (x *GetNetworkInfoResponse) GetSentBytes() map[uint32]uint64

func (*GetNetworkInfoResponse) GetTotalReceivedBytes added in v0.13.0

func (x *GetNetworkInfoResponse) GetTotalReceivedBytes() uint32

func (*GetNetworkInfoResponse) GetTotalSentBytes added in v0.13.0

func (x *GetNetworkInfoResponse) GetTotalSentBytes() uint32

func (*GetNetworkInfoResponse) ProtoMessage

func (*GetNetworkInfoResponse) ProtoMessage()

func (*GetNetworkInfoResponse) ProtoReflect

func (x *GetNetworkInfoResponse) ProtoReflect() protoreflect.Message

func (*GetNetworkInfoResponse) Reset

func (x *GetNetworkInfoResponse) Reset()

func (*GetNetworkInfoResponse) String

func (x *GetNetworkInfoResponse) String() string

type GetNewAddressRequest added in v1.1.0

type GetNewAddressRequest struct {

	// Name of the wallet for which the new address is requested.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// Address type for the new address.
	AddressType AddressType `protobuf:"varint,2,opt,name=address_type,json=addressType,proto3,enum=pactus.AddressType" json:"address_type,omitempty"`
	// Label for the new address.
	Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
	// contains filtered or unexported fields
}

Request message for generating a new address.

func (*GetNewAddressRequest) Descriptor deprecated added in v1.1.0

func (*GetNewAddressRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetNewAddressRequest.ProtoReflect.Descriptor instead.

func (*GetNewAddressRequest) GetAddressType added in v1.1.0

func (x *GetNewAddressRequest) GetAddressType() AddressType

func (*GetNewAddressRequest) GetLabel added in v1.1.0

func (x *GetNewAddressRequest) GetLabel() string

func (*GetNewAddressRequest) GetWalletName added in v1.1.0

func (x *GetNewAddressRequest) GetWalletName() string

func (*GetNewAddressRequest) ProtoMessage added in v1.1.0

func (*GetNewAddressRequest) ProtoMessage()

func (*GetNewAddressRequest) ProtoReflect added in v1.1.0

func (x *GetNewAddressRequest) ProtoReflect() protoreflect.Message

func (*GetNewAddressRequest) Reset added in v1.1.0

func (x *GetNewAddressRequest) Reset()

func (*GetNewAddressRequest) String added in v1.1.0

func (x *GetNewAddressRequest) String() string

type GetNewAddressResponse added in v1.1.0

type GetNewAddressResponse struct {

	// Name of the wallet.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// Address information.
	AddressInfo *AddressInfo `protobuf:"bytes,2,opt,name=address_info,json=addressInfo,proto3" json:"address_info,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the new address.

func (*GetNewAddressResponse) Descriptor deprecated added in v1.1.0

func (*GetNewAddressResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetNewAddressResponse.ProtoReflect.Descriptor instead.

func (*GetNewAddressResponse) GetAddressInfo added in v1.1.0

func (x *GetNewAddressResponse) GetAddressInfo() *AddressInfo

func (*GetNewAddressResponse) GetWalletName added in v1.1.0

func (x *GetNewAddressResponse) GetWalletName() string

func (*GetNewAddressResponse) ProtoMessage added in v1.1.0

func (*GetNewAddressResponse) ProtoMessage()

func (*GetNewAddressResponse) ProtoReflect added in v1.1.0

func (x *GetNewAddressResponse) ProtoReflect() protoreflect.Message

func (*GetNewAddressResponse) Reset added in v1.1.0

func (x *GetNewAddressResponse) Reset()

func (*GetNewAddressResponse) String added in v1.1.0

func (x *GetNewAddressResponse) String() string

type GetNodeInfoRequest added in v0.13.0

type GetNodeInfoRequest struct {
	// contains filtered or unexported fields
}

Request message for retrieving information about a specific node in the network.

func (*GetNodeInfoRequest) Descriptor deprecated added in v0.13.0

func (*GetNodeInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetNodeInfoRequest.ProtoReflect.Descriptor instead.

func (*GetNodeInfoRequest) ProtoMessage added in v0.13.0

func (*GetNodeInfoRequest) ProtoMessage()

func (*GetNodeInfoRequest) ProtoReflect added in v0.13.0

func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message

func (*GetNodeInfoRequest) Reset added in v0.13.0

func (x *GetNodeInfoRequest) Reset()

func (*GetNodeInfoRequest) String added in v0.13.0

func (x *GetNodeInfoRequest) String() string

type GetNodeInfoResponse added in v0.13.0

type GetNodeInfoResponse struct {

	// Moniker of the node.
	Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"`
	// Agent information of the node.
	Agent string `protobuf:"bytes,2,opt,name=agent,proto3" json:"agent,omitempty"`
	// Peer ID of the node.
	PeerId []byte `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	// Timestamp when the node started.
	StartedAt uint64 `protobuf:"varint,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
	// Reachability status of the node.
	Reachability string `protobuf:"bytes,5,opt,name=reachability,proto3" json:"reachability,omitempty"`
	// List of services provided by the node.
	Services []int32 `protobuf:"varint,6,rep,packed,name=services,proto3" json:"services,omitempty"`
	// Names of services provided by the node.
	ServicesNames []string `protobuf:"bytes,7,rep,name=services_names,json=servicesNames,proto3" json:"services_names,omitempty"`
	// List of addresses associated with the node.
	Addrs []string `protobuf:"bytes,8,rep,name=addrs,proto3" json:"addrs,omitempty"`
	// List of protocols supported by the node.
	Protocols []string `protobuf:"bytes,9,rep,name=protocols,proto3" json:"protocols,omitempty"`
	// contains filtered or unexported fields
}

Response message containing information about a specific node in the network.

func (*GetNodeInfoResponse) Descriptor deprecated added in v0.13.0

func (*GetNodeInfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetNodeInfoResponse.ProtoReflect.Descriptor instead.

func (*GetNodeInfoResponse) GetAddrs added in v0.18.0

func (x *GetNodeInfoResponse) GetAddrs() []string

func (*GetNodeInfoResponse) GetAgent added in v0.13.0

func (x *GetNodeInfoResponse) GetAgent() string

func (*GetNodeInfoResponse) GetMoniker added in v0.13.0

func (x *GetNodeInfoResponse) GetMoniker() string

func (*GetNodeInfoResponse) GetPeerId added in v0.13.0

func (x *GetNodeInfoResponse) GetPeerId() []byte

func (*GetNodeInfoResponse) GetProtocols added in v0.19.0

func (x *GetNodeInfoResponse) GetProtocols() []string

func (*GetNodeInfoResponse) GetReachability added in v0.18.0

func (x *GetNodeInfoResponse) GetReachability() string

func (*GetNodeInfoResponse) GetServices added in v0.19.0

func (x *GetNodeInfoResponse) GetServices() []int32

func (*GetNodeInfoResponse) GetServicesNames added in v0.19.0

func (x *GetNodeInfoResponse) GetServicesNames() []string

func (*GetNodeInfoResponse) GetStartedAt added in v0.19.0

func (x *GetNodeInfoResponse) GetStartedAt() uint64

func (*GetNodeInfoResponse) ProtoMessage added in v0.13.0

func (*GetNodeInfoResponse) ProtoMessage()

func (*GetNodeInfoResponse) ProtoReflect added in v0.13.0

func (x *GetNodeInfoResponse) ProtoReflect() protoreflect.Message

func (*GetNodeInfoResponse) Reset added in v0.13.0

func (x *GetNodeInfoResponse) Reset()

func (*GetNodeInfoResponse) String added in v0.13.0

func (x *GetNodeInfoResponse) String() string

type GetPublicKeyRequest added in v0.15.0

type GetPublicKeyRequest struct {

	// Address for which public key is requested.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

Message to request public key based on an address.

func (*GetPublicKeyRequest) Descriptor deprecated added in v0.15.0

func (*GetPublicKeyRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetPublicKeyRequest.ProtoReflect.Descriptor instead.

func (*GetPublicKeyRequest) GetAddress added in v0.15.0

func (x *GetPublicKeyRequest) GetAddress() string

func (*GetPublicKeyRequest) ProtoMessage added in v0.15.0

func (*GetPublicKeyRequest) ProtoMessage()

func (*GetPublicKeyRequest) ProtoReflect added in v0.15.0

func (x *GetPublicKeyRequest) ProtoReflect() protoreflect.Message

func (*GetPublicKeyRequest) Reset added in v0.15.0

func (x *GetPublicKeyRequest) Reset()

func (*GetPublicKeyRequest) String added in v0.15.0

func (x *GetPublicKeyRequest) String() string

type GetPublicKeyResponse added in v0.15.0

type GetPublicKeyResponse struct {

	// Public key of the account.
	PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

Message containing the response with the public key.

func (*GetPublicKeyResponse) Descriptor deprecated added in v0.15.0

func (*GetPublicKeyResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetPublicKeyResponse.ProtoReflect.Descriptor instead.

func (*GetPublicKeyResponse) GetPublicKey added in v0.15.0

func (x *GetPublicKeyResponse) GetPublicKey() string

func (*GetPublicKeyResponse) ProtoMessage added in v0.15.0

func (*GetPublicKeyResponse) ProtoMessage()

func (*GetPublicKeyResponse) ProtoReflect added in v0.15.0

func (x *GetPublicKeyResponse) ProtoReflect() protoreflect.Message

func (*GetPublicKeyResponse) Reset added in v0.15.0

func (x *GetPublicKeyResponse) Reset()

func (*GetPublicKeyResponse) String added in v0.15.0

func (x *GetPublicKeyResponse) String() string

type GetRawBondTransactionRequest added in v0.18.0

type GetRawBondTransactionRequest struct {

	// Lock time for the transaction.
	// If not explicitly set, it sets to the last block height.
	LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
	// Sender's account address.
	Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
	// Receiver's validator address.
	Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// Stake amount in NanoPAC.
	// It should be greater than 0.
	Stake int64 `protobuf:"varint,4,opt,name=stake,proto3" json:"stake,omitempty"`
	// Public key of the validator.
	PublicKey string `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// Transaction fee in NanoPAC.
	// If not explicitly set, it is calculated based on the stake.
	Fee int64 `protobuf:"varint,6,opt,name=fee,proto3" json:"fee,omitempty"`
	// Transaction memo.
	Memo string `protobuf:"bytes,7,opt,name=memo,proto3" json:"memo,omitempty"`
	// contains filtered or unexported fields
}

Request message for retrieving raw details of a bond transaction.

func (*GetRawBondTransactionRequest) Descriptor deprecated added in v0.18.0

func (*GetRawBondTransactionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRawBondTransactionRequest.ProtoReflect.Descriptor instead.

func (*GetRawBondTransactionRequest) GetFee added in v0.18.0

func (x *GetRawBondTransactionRequest) GetFee() int64

func (*GetRawBondTransactionRequest) GetLockTime added in v0.18.0

func (x *GetRawBondTransactionRequest) GetLockTime() uint32

func (*GetRawBondTransactionRequest) GetMemo added in v0.18.0

func (x *GetRawBondTransactionRequest) GetMemo() string

func (*GetRawBondTransactionRequest) GetPublicKey added in v0.18.0

func (x *GetRawBondTransactionRequest) GetPublicKey() string

func (*GetRawBondTransactionRequest) GetReceiver added in v0.18.0

func (x *GetRawBondTransactionRequest) GetReceiver() string

func (*GetRawBondTransactionRequest) GetSender added in v0.18.0

func (x *GetRawBondTransactionRequest) GetSender() string

func (*GetRawBondTransactionRequest) GetStake added in v0.18.0

func (x *GetRawBondTransactionRequest) GetStake() int64

func (*GetRawBondTransactionRequest) ProtoMessage added in v0.18.0

func (*GetRawBondTransactionRequest) ProtoMessage()

func (*GetRawBondTransactionRequest) ProtoReflect added in v0.18.0

func (*GetRawBondTransactionRequest) Reset added in v0.18.0

func (x *GetRawBondTransactionRequest) Reset()

func (*GetRawBondTransactionRequest) String added in v0.18.0

type GetRawTransactionResponse added in v0.18.0

type GetRawTransactionResponse struct {

	// Raw transaction data.
	RawTransaction []byte `protobuf:"bytes,1,opt,name=raw_transaction,json=rawTransaction,proto3" json:"raw_transaction,omitempty"`
	// contains filtered or unexported fields
}

Response message containing raw transaction data.

func (*GetRawTransactionResponse) Descriptor deprecated added in v0.18.0

func (*GetRawTransactionResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetRawTransactionResponse.ProtoReflect.Descriptor instead.

func (*GetRawTransactionResponse) GetRawTransaction added in v0.18.0

func (x *GetRawTransactionResponse) GetRawTransaction() []byte

func (*GetRawTransactionResponse) ProtoMessage added in v0.18.0

func (*GetRawTransactionResponse) ProtoMessage()

func (*GetRawTransactionResponse) ProtoReflect added in v0.18.0

func (*GetRawTransactionResponse) Reset added in v0.18.0

func (x *GetRawTransactionResponse) Reset()

func (*GetRawTransactionResponse) String added in v0.18.0

func (x *GetRawTransactionResponse) String() string

type GetRawTransferTransactionRequest added in v0.18.0

type GetRawTransferTransactionRequest struct {

	// Lock time for the transaction.
	// If not explicitly set, it sets to the last block height.
	LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
	// Sender's account address.
	Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
	// Receiver's account address.
	Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// Transfer amount in NanoPAC.
	// It should be greater than 0.
	Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
	// Transaction fee in NanoPAC.
	// If not explicitly set, it is calculated based on the amount.
	Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"`
	// Transaction memo.
	Memo string `protobuf:"bytes,6,opt,name=memo,proto3" json:"memo,omitempty"`
	// contains filtered or unexported fields
}

Request message for retrieving raw details of a transfer transaction.

func (*GetRawTransferTransactionRequest) Descriptor deprecated added in v0.18.0

func (*GetRawTransferTransactionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRawTransferTransactionRequest.ProtoReflect.Descriptor instead.

func (*GetRawTransferTransactionRequest) GetAmount added in v0.18.0

func (x *GetRawTransferTransactionRequest) GetAmount() int64

func (*GetRawTransferTransactionRequest) GetFee added in v0.18.0

func (*GetRawTransferTransactionRequest) GetLockTime added in v0.18.0

func (x *GetRawTransferTransactionRequest) GetLockTime() uint32

func (*GetRawTransferTransactionRequest) GetMemo added in v0.18.0

func (*GetRawTransferTransactionRequest) GetReceiver added in v0.18.0

func (x *GetRawTransferTransactionRequest) GetReceiver() string

func (*GetRawTransferTransactionRequest) GetSender added in v0.18.0

func (*GetRawTransferTransactionRequest) ProtoMessage added in v0.18.0

func (*GetRawTransferTransactionRequest) ProtoMessage()

func (*GetRawTransferTransactionRequest) ProtoReflect added in v0.18.0

func (*GetRawTransferTransactionRequest) Reset added in v0.18.0

func (*GetRawTransferTransactionRequest) String added in v0.18.0

type GetRawUnbondTransactionRequest added in v1.1.0

type GetRawUnbondTransactionRequest struct {

	// Lock time for the transaction.
	// If not explicitly set, it sets to the last block height.
	LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
	// Address of the validator to unbond from.
	ValidatorAddress string `protobuf:"bytes,3,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
	// Transaction memo.
	Memo string `protobuf:"bytes,4,opt,name=memo,proto3" json:"memo,omitempty"`
	// contains filtered or unexported fields
}

Request message for retrieving raw details of an unbond transaction.

func (*GetRawUnbondTransactionRequest) Descriptor deprecated added in v1.1.0

func (*GetRawUnbondTransactionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRawUnbondTransactionRequest.ProtoReflect.Descriptor instead.

func (*GetRawUnbondTransactionRequest) GetLockTime added in v1.1.0

func (x *GetRawUnbondTransactionRequest) GetLockTime() uint32

func (*GetRawUnbondTransactionRequest) GetMemo added in v1.1.0

func (*GetRawUnbondTransactionRequest) GetValidatorAddress added in v1.1.0

func (x *GetRawUnbondTransactionRequest) GetValidatorAddress() string

func (*GetRawUnbondTransactionRequest) ProtoMessage added in v1.1.0

func (*GetRawUnbondTransactionRequest) ProtoMessage()

func (*GetRawUnbondTransactionRequest) ProtoReflect added in v1.1.0

func (*GetRawUnbondTransactionRequest) Reset added in v1.1.0

func (x *GetRawUnbondTransactionRequest) Reset()

func (*GetRawUnbondTransactionRequest) String added in v1.1.0

type GetRawWithdrawTransactionRequest added in v0.18.0

type GetRawWithdrawTransactionRequest struct {

	// Lock time for the transaction.
	// If not explicitly set, it sets to the last block height.
	LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
	// Address of the validator to withdraw from.
	ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
	// Address of the account to withdraw to.
	AccountAddress string `protobuf:"bytes,3,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"`
	// Withdrawal amount in NanoPAC.
	// It should be greater than 0.
	Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
	// Transaction fee in NanoPAC.
	// If not explicitly set, it is calculated based on the amount.
	Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"`
	// Transaction memo.
	Memo string `protobuf:"bytes,6,opt,name=memo,proto3" json:"memo,omitempty"`
	// contains filtered or unexported fields
}

Request message for retrieving raw details of a withdraw transaction.

func (*GetRawWithdrawTransactionRequest) Descriptor deprecated added in v0.18.0

func (*GetRawWithdrawTransactionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRawWithdrawTransactionRequest.ProtoReflect.Descriptor instead.

func (*GetRawWithdrawTransactionRequest) GetAccountAddress added in v0.18.0

func (x *GetRawWithdrawTransactionRequest) GetAccountAddress() string

func (*GetRawWithdrawTransactionRequest) GetAmount added in v0.18.0

func (x *GetRawWithdrawTransactionRequest) GetAmount() int64

func (*GetRawWithdrawTransactionRequest) GetFee added in v0.18.0

func (*GetRawWithdrawTransactionRequest) GetLockTime added in v0.18.0

func (x *GetRawWithdrawTransactionRequest) GetLockTime() uint32

func (*GetRawWithdrawTransactionRequest) GetMemo added in v0.18.0

func (*GetRawWithdrawTransactionRequest) GetValidatorAddress added in v0.18.0

func (x *GetRawWithdrawTransactionRequest) GetValidatorAddress() string

func (*GetRawWithdrawTransactionRequest) ProtoMessage added in v0.18.0

func (*GetRawWithdrawTransactionRequest) ProtoMessage()

func (*GetRawWithdrawTransactionRequest) ProtoReflect added in v0.18.0

func (*GetRawWithdrawTransactionRequest) Reset added in v0.18.0

func (*GetRawWithdrawTransactionRequest) String added in v0.18.0

type GetTotalBalanceRequest added in v1.1.0

type GetTotalBalanceRequest struct {

	// Name of the wallet.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// contains filtered or unexported fields
}

Request message for obtaining the available balance of a wallet.

func (*GetTotalBalanceRequest) Descriptor deprecated added in v1.1.0

func (*GetTotalBalanceRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetTotalBalanceRequest.ProtoReflect.Descriptor instead.

func (*GetTotalBalanceRequest) GetWalletName added in v1.1.0

func (x *GetTotalBalanceRequest) GetWalletName() string

func (*GetTotalBalanceRequest) ProtoMessage added in v1.1.0

func (*GetTotalBalanceRequest) ProtoMessage()

func (*GetTotalBalanceRequest) ProtoReflect added in v1.1.0

func (x *GetTotalBalanceRequest) ProtoReflect() protoreflect.Message

func (*GetTotalBalanceRequest) Reset added in v1.1.0

func (x *GetTotalBalanceRequest) Reset()

func (*GetTotalBalanceRequest) String added in v1.1.0

func (x *GetTotalBalanceRequest) String() string

type GetTotalBalanceResponse added in v1.1.0

type GetTotalBalanceResponse struct {

	// Name of the wallet.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// The total balance of the wallet in NanoPAC.
	TotalBalance int64 `protobuf:"varint,2,opt,name=total_balance,json=totalBalance,proto3" json:"total_balance,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the available balance of the wallet.

func (*GetTotalBalanceResponse) Descriptor deprecated added in v1.1.0

func (*GetTotalBalanceResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetTotalBalanceResponse.ProtoReflect.Descriptor instead.

func (*GetTotalBalanceResponse) GetTotalBalance added in v1.1.0

func (x *GetTotalBalanceResponse) GetTotalBalance() int64

func (*GetTotalBalanceResponse) GetWalletName added in v1.1.0

func (x *GetTotalBalanceResponse) GetWalletName() string

func (*GetTotalBalanceResponse) ProtoMessage added in v1.1.0

func (*GetTotalBalanceResponse) ProtoMessage()

func (*GetTotalBalanceResponse) ProtoReflect added in v1.1.0

func (x *GetTotalBalanceResponse) ProtoReflect() protoreflect.Message

func (*GetTotalBalanceResponse) Reset added in v1.1.0

func (x *GetTotalBalanceResponse) Reset()

func (*GetTotalBalanceResponse) String added in v1.1.0

func (x *GetTotalBalanceResponse) String() string

type GetTransactionRequest

type GetTransactionRequest struct {

	// Transaction ID.
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Verbosity level for transaction details.
	Verbosity TransactionVerbosity `protobuf:"varint,2,opt,name=verbosity,proto3,enum=pactus.TransactionVerbosity" json:"verbosity,omitempty"`
	// contains filtered or unexported fields
}

Request message for retrieving transaction details.

func (*GetTransactionRequest) Descriptor deprecated

func (*GetTransactionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead.

func (*GetTransactionRequest) GetId

func (x *GetTransactionRequest) GetId() []byte

func (*GetTransactionRequest) GetVerbosity

func (x *GetTransactionRequest) GetVerbosity() TransactionVerbosity

func (*GetTransactionRequest) ProtoMessage

func (*GetTransactionRequest) ProtoMessage()

func (*GetTransactionRequest) ProtoReflect

func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message

func (*GetTransactionRequest) Reset

func (x *GetTransactionRequest) Reset()

func (*GetTransactionRequest) String

func (x *GetTransactionRequest) String() string

type GetTransactionResponse

type GetTransactionResponse struct {

	// Height of the block containing the transaction.
	BlockHeight uint32 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	// Time of the block containing the transaction.
	BlockTime uint32 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"`
	// Information about the transaction.
	Transaction *TransactionInfo `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"`
	// contains filtered or unexported fields
}

Response message containing details of a transaction.

func (*GetTransactionResponse) Descriptor deprecated

func (*GetTransactionResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetTransactionResponse.ProtoReflect.Descriptor instead.

func (*GetTransactionResponse) GetBlockHeight

func (x *GetTransactionResponse) GetBlockHeight() uint32

func (*GetTransactionResponse) GetBlockTime

func (x *GetTransactionResponse) GetBlockTime() uint32

func (*GetTransactionResponse) GetTransaction

func (x *GetTransactionResponse) GetTransaction() *TransactionInfo

func (*GetTransactionResponse) ProtoMessage

func (*GetTransactionResponse) ProtoMessage()

func (*GetTransactionResponse) ProtoReflect

func (x *GetTransactionResponse) ProtoReflect() protoreflect.Message

func (*GetTransactionResponse) Reset

func (x *GetTransactionResponse) Reset()

func (*GetTransactionResponse) String

func (x *GetTransactionResponse) String() string

type GetValidatorAddressRequest added in v1.0.0

type GetValidatorAddressRequest struct {

	// Public key for which the validator address is requested.
	PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

Request message for obtaining the validator address associated with a public key.

func (*GetValidatorAddressRequest) Descriptor deprecated added in v1.0.0

func (*GetValidatorAddressRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetValidatorAddressRequest.ProtoReflect.Descriptor instead.

func (*GetValidatorAddressRequest) GetPublicKey added in v1.0.0

func (x *GetValidatorAddressRequest) GetPublicKey() string

func (*GetValidatorAddressRequest) ProtoMessage added in v1.0.0

func (*GetValidatorAddressRequest) ProtoMessage()

func (*GetValidatorAddressRequest) ProtoReflect added in v1.0.0

func (*GetValidatorAddressRequest) Reset added in v1.0.0

func (x *GetValidatorAddressRequest) Reset()

func (*GetValidatorAddressRequest) String added in v1.0.0

func (x *GetValidatorAddressRequest) String() string

type GetValidatorAddressResponse added in v1.0.0

type GetValidatorAddressResponse struct {

	// Validator address associated with the public key.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the validator address corresponding to a public key.

func (*GetValidatorAddressResponse) Descriptor deprecated added in v1.0.0

func (*GetValidatorAddressResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetValidatorAddressResponse.ProtoReflect.Descriptor instead.

func (*GetValidatorAddressResponse) GetAddress added in v1.0.0

func (x *GetValidatorAddressResponse) GetAddress() string

func (*GetValidatorAddressResponse) ProtoMessage added in v1.0.0

func (*GetValidatorAddressResponse) ProtoMessage()

func (*GetValidatorAddressResponse) ProtoReflect added in v1.0.0

func (*GetValidatorAddressResponse) Reset added in v1.0.0

func (x *GetValidatorAddressResponse) Reset()

func (*GetValidatorAddressResponse) String added in v1.0.0

func (x *GetValidatorAddressResponse) String() string

type GetValidatorAddressesRequest added in v0.12.0

type GetValidatorAddressesRequest struct {
	// contains filtered or unexported fields
}

Message to request validator addresses.

func (*GetValidatorAddressesRequest) Descriptor deprecated added in v0.12.0

func (*GetValidatorAddressesRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetValidatorAddressesRequest.ProtoReflect.Descriptor instead.

func (*GetValidatorAddressesRequest) ProtoMessage added in v0.12.0

func (*GetValidatorAddressesRequest) ProtoMessage()

func (*GetValidatorAddressesRequest) ProtoReflect added in v0.12.0

func (*GetValidatorAddressesRequest) Reset added in v0.12.0

func (x *GetValidatorAddressesRequest) Reset()

func (*GetValidatorAddressesRequest) String added in v0.12.0

type GetValidatorAddressesResponse added in v0.12.0

type GetValidatorAddressesResponse struct {

	// List of validator addresses.
	Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// contains filtered or unexported fields
}

Message containing the response with a list of validator addresses.

func (*GetValidatorAddressesResponse) Descriptor deprecated added in v0.12.0

func (*GetValidatorAddressesResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetValidatorAddressesResponse.ProtoReflect.Descriptor instead.

func (*GetValidatorAddressesResponse) GetAddresses added in v0.12.0

func (x *GetValidatorAddressesResponse) GetAddresses() []string

func (*GetValidatorAddressesResponse) ProtoMessage added in v0.12.0

func (*GetValidatorAddressesResponse) ProtoMessage()

func (*GetValidatorAddressesResponse) ProtoReflect added in v0.12.0

func (*GetValidatorAddressesResponse) Reset added in v0.12.0

func (x *GetValidatorAddressesResponse) Reset()

func (*GetValidatorAddressesResponse) String added in v0.12.0

type GetValidatorByNumberRequest

type GetValidatorByNumberRequest struct {

	// Validator number.
	Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	// contains filtered or unexported fields
}

Message to request validator information based on a validator number.

func (*GetValidatorByNumberRequest) Descriptor deprecated

func (*GetValidatorByNumberRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetValidatorByNumberRequest.ProtoReflect.Descriptor instead.

func (*GetValidatorByNumberRequest) GetNumber

func (x *GetValidatorByNumberRequest) GetNumber() int32

func (*GetValidatorByNumberRequest) ProtoMessage

func (*GetValidatorByNumberRequest) ProtoMessage()

func (*GetValidatorByNumberRequest) ProtoReflect

func (*GetValidatorByNumberRequest) Reset

func (x *GetValidatorByNumberRequest) Reset()

func (*GetValidatorByNumberRequest) String

func (x *GetValidatorByNumberRequest) String() string

type GetValidatorRequest

type GetValidatorRequest struct {

	// Address of the validator.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

Message to request validator information based on an address.

func (*GetValidatorRequest) Descriptor deprecated

func (*GetValidatorRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetValidatorRequest.ProtoReflect.Descriptor instead.

func (*GetValidatorRequest) GetAddress

func (x *GetValidatorRequest) GetAddress() string

func (*GetValidatorRequest) ProtoMessage

func (*GetValidatorRequest) ProtoMessage()

func (*GetValidatorRequest) ProtoReflect

func (x *GetValidatorRequest) ProtoReflect() protoreflect.Message

func (*GetValidatorRequest) Reset

func (x *GetValidatorRequest) Reset()

func (*GetValidatorRequest) String

func (x *GetValidatorRequest) String() string

type GetValidatorResponse

type GetValidatorResponse struct {

	// Validator information.
	Validator *ValidatorInfo `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"`
	// contains filtered or unexported fields
}

Message containing the response with validator information.

func (*GetValidatorResponse) Descriptor deprecated

func (*GetValidatorResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetValidatorResponse.ProtoReflect.Descriptor instead.

func (*GetValidatorResponse) GetValidator

func (x *GetValidatorResponse) GetValidator() *ValidatorInfo

func (*GetValidatorResponse) ProtoMessage

func (*GetValidatorResponse) ProtoMessage()

func (*GetValidatorResponse) ProtoReflect

func (x *GetValidatorResponse) ProtoReflect() protoreflect.Message

func (*GetValidatorResponse) Reset

func (x *GetValidatorResponse) Reset()

func (*GetValidatorResponse) String

func (x *GetValidatorResponse) String() string

type HistoryInfo added in v1.1.0

type HistoryInfo struct {

	// Hash of transaction.
	TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	// transaction timestamp.
	Time uint32 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
	// payload type of transaction.
	PayloadType string `protobuf:"bytes,3,opt,name=payload_type,json=payloadType,proto3" json:"payload_type,omitempty"`
	// description of transaction.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// amount of transaction.
	Amount int64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

Message of address history information.

func (*HistoryInfo) Descriptor deprecated added in v1.1.0

func (*HistoryInfo) Descriptor() ([]byte, []int)

Deprecated: Use HistoryInfo.ProtoReflect.Descriptor instead.

func (*HistoryInfo) GetAmount added in v1.1.0

func (x *HistoryInfo) GetAmount() int64

func (*HistoryInfo) GetDescription added in v1.1.0

func (x *HistoryInfo) GetDescription() string

func (*HistoryInfo) GetPayloadType added in v1.1.0

func (x *HistoryInfo) GetPayloadType() string

func (*HistoryInfo) GetTime added in v1.1.0

func (x *HistoryInfo) GetTime() uint32

func (*HistoryInfo) GetTransactionId added in v1.1.0

func (x *HistoryInfo) GetTransactionId() string

func (*HistoryInfo) ProtoMessage added in v1.1.0

func (*HistoryInfo) ProtoMessage()

func (*HistoryInfo) ProtoReflect added in v1.1.0

func (x *HistoryInfo) ProtoReflect() protoreflect.Message

func (*HistoryInfo) Reset added in v1.1.0

func (x *HistoryInfo) Reset()

func (*HistoryInfo) String added in v1.1.0

func (x *HistoryInfo) String() string

type LoadWalletRequest

type LoadWalletRequest struct {

	// Name of the wallet to load.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// contains filtered or unexported fields
}

Request message for loading an existing wallet.

func (*LoadWalletRequest) Descriptor deprecated

func (*LoadWalletRequest) Descriptor() ([]byte, []int)

Deprecated: Use LoadWalletRequest.ProtoReflect.Descriptor instead.

func (*LoadWalletRequest) GetWalletName added in v1.0.0

func (x *LoadWalletRequest) GetWalletName() string

func (*LoadWalletRequest) ProtoMessage

func (*LoadWalletRequest) ProtoMessage()

func (*LoadWalletRequest) ProtoReflect

func (x *LoadWalletRequest) ProtoReflect() protoreflect.Message

func (*LoadWalletRequest) Reset

func (x *LoadWalletRequest) Reset()

func (*LoadWalletRequest) String

func (x *LoadWalletRequest) String() string

type LoadWalletResponse

type LoadWalletResponse struct {

	// Name of the loaded wallet.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the name of the loaded wallet.

func (*LoadWalletResponse) Descriptor deprecated

func (*LoadWalletResponse) Descriptor() ([]byte, []int)

Deprecated: Use LoadWalletResponse.ProtoReflect.Descriptor instead.

func (*LoadWalletResponse) GetWalletName added in v1.0.0

func (x *LoadWalletResponse) GetWalletName() string

func (*LoadWalletResponse) ProtoMessage

func (*LoadWalletResponse) ProtoMessage()

func (*LoadWalletResponse) ProtoReflect

func (x *LoadWalletResponse) ProtoReflect() protoreflect.Message

func (*LoadWalletResponse) Reset

func (x *LoadWalletResponse) Reset()

func (*LoadWalletResponse) String

func (x *LoadWalletResponse) String() string

type LockWalletRequest

type LockWalletRequest struct {

	// Name of the wallet to lock.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// contains filtered or unexported fields
}

Request message for locking a currently loaded wallet.

func (*LockWalletRequest) Descriptor deprecated

func (*LockWalletRequest) Descriptor() ([]byte, []int)

Deprecated: Use LockWalletRequest.ProtoReflect.Descriptor instead.

func (*LockWalletRequest) GetWalletName added in v1.0.0

func (x *LockWalletRequest) GetWalletName() string

func (*LockWalletRequest) ProtoMessage

func (*LockWalletRequest) ProtoMessage()

func (*LockWalletRequest) ProtoReflect

func (x *LockWalletRequest) ProtoReflect() protoreflect.Message

func (*LockWalletRequest) Reset

func (x *LockWalletRequest) Reset()

func (*LockWalletRequest) String

func (x *LockWalletRequest) String() string

type LockWalletResponse

type LockWalletResponse struct {

	// Name of the locked wallet.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the name of the locked wallet.

func (*LockWalletResponse) Descriptor deprecated

func (*LockWalletResponse) Descriptor() ([]byte, []int)

Deprecated: Use LockWalletResponse.ProtoReflect.Descriptor instead.

func (*LockWalletResponse) GetWalletName added in v1.0.0

func (x *LockWalletResponse) GetWalletName() string

func (*LockWalletResponse) ProtoMessage

func (*LockWalletResponse) ProtoMessage()

func (*LockWalletResponse) ProtoReflect

func (x *LockWalletResponse) ProtoReflect() protoreflect.Message

func (*LockWalletResponse) Reset

func (x *LockWalletResponse) Reset()

func (*LockWalletResponse) String

func (x *LockWalletResponse) String() string

type NetworkClient

type NetworkClient interface {
	// GetNetworkInfo retrieves information about the overall network.
	GetNetworkInfo(ctx context.Context, in *GetNetworkInfoRequest, opts ...grpc.CallOption) (*GetNetworkInfoResponse, error)
	// GetNodeInfo retrieves information about a specific node in the network.
	GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error)
}

NetworkClient is the client API for Network service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewNetworkClient

func NewNetworkClient(cc grpc.ClientConnInterface) NetworkClient

type NetworkJsonRpcService added in v1.1.0

type NetworkJsonRpcService struct {
	// contains filtered or unexported fields
}

func NewNetworkJsonRpcService added in v1.1.0

func NewNetworkJsonRpcService(client NetworkClient) NetworkJsonRpcService

func (*NetworkJsonRpcService) Methods added in v1.1.0

func (s *NetworkJsonRpcService) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error)

type NetworkServer

type NetworkServer interface {
	// GetNetworkInfo retrieves information about the overall network.
	GetNetworkInfo(context.Context, *GetNetworkInfoRequest) (*GetNetworkInfoResponse, error)
	// GetNodeInfo retrieves information about a specific node in the network.
	GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error)
}

NetworkServer is the server API for Network service. All implementations should embed UnimplementedNetworkServer for forward compatibility

type PayloadBond

type PayloadBond struct {

	// Sender's address.
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// Receiver's address.
	Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// Stake amount in NanoPAC.
	Stake int64 `protobuf:"varint,3,opt,name=stake,proto3" json:"stake,omitempty"`
	// contains filtered or unexported fields
}

Payload for a bond transaction.

func (*PayloadBond) Descriptor deprecated

func (*PayloadBond) Descriptor() ([]byte, []int)

Deprecated: Use PayloadBond.ProtoReflect.Descriptor instead.

func (*PayloadBond) GetReceiver

func (x *PayloadBond) GetReceiver() string

func (*PayloadBond) GetSender

func (x *PayloadBond) GetSender() string

func (*PayloadBond) GetStake

func (x *PayloadBond) GetStake() int64

func (*PayloadBond) ProtoMessage

func (*PayloadBond) ProtoMessage()

func (*PayloadBond) ProtoReflect

func (x *PayloadBond) ProtoReflect() protoreflect.Message

func (*PayloadBond) Reset

func (x *PayloadBond) Reset()

func (*PayloadBond) String

func (x *PayloadBond) String() string

type PayloadSortition

type PayloadSortition struct {

	// Address associated with the sortition.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Proof for the sortition.
	Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
	// contains filtered or unexported fields
}

Payload for a sortition transaction.

func (*PayloadSortition) Descriptor deprecated

func (*PayloadSortition) Descriptor() ([]byte, []int)

Deprecated: Use PayloadSortition.ProtoReflect.Descriptor instead.

func (*PayloadSortition) GetAddress

func (x *PayloadSortition) GetAddress() string

func (*PayloadSortition) GetProof

func (x *PayloadSortition) GetProof() []byte

func (*PayloadSortition) ProtoMessage

func (*PayloadSortition) ProtoMessage()

func (*PayloadSortition) ProtoReflect

func (x *PayloadSortition) ProtoReflect() protoreflect.Message

func (*PayloadSortition) Reset

func (x *PayloadSortition) Reset()

func (*PayloadSortition) String

func (x *PayloadSortition) String() string

type PayloadTransfer added in v0.11.0

type PayloadTransfer struct {

	// Sender's address.
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// Receiver's address.
	Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// Transaction amount in NanoPAC.
	Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

Payload for a transfer transaction.

func (*PayloadTransfer) Descriptor deprecated added in v0.11.0

func (*PayloadTransfer) Descriptor() ([]byte, []int)

Deprecated: Use PayloadTransfer.ProtoReflect.Descriptor instead.

func (*PayloadTransfer) GetAmount added in v0.11.0

func (x *PayloadTransfer) GetAmount() int64

func (*PayloadTransfer) GetReceiver added in v0.11.0

func (x *PayloadTransfer) GetReceiver() string

func (*PayloadTransfer) GetSender added in v0.11.0

func (x *PayloadTransfer) GetSender() string

func (*PayloadTransfer) ProtoMessage added in v0.11.0

func (*PayloadTransfer) ProtoMessage()

func (*PayloadTransfer) ProtoReflect added in v0.11.0

func (x *PayloadTransfer) ProtoReflect() protoreflect.Message

func (*PayloadTransfer) Reset added in v0.11.0

func (x *PayloadTransfer) Reset()

func (*PayloadTransfer) String added in v0.11.0

func (x *PayloadTransfer) String() string

type PayloadType

type PayloadType int32

Enumeration for different types of transaction payloads.

const (
	// Unknown payload type.
	PayloadType_UNKNOWN PayloadType = 0
	// Transfer payload type.
	PayloadType_TRANSFER_PAYLOAD PayloadType = 1
	// Bond payload type.
	PayloadType_BOND_PAYLOAD PayloadType = 2
	// Sortition payload type.
	PayloadType_SORTITION_PAYLOAD PayloadType = 3
	// Unbond payload type.
	PayloadType_UNBOND_PAYLOAD PayloadType = 4
	// Withdraw payload type.
	PayloadType_WITHDRAW_PAYLOAD PayloadType = 5
)

func (PayloadType) Descriptor

func (PayloadType) Enum

func (x PayloadType) Enum() *PayloadType

func (PayloadType) EnumDescriptor deprecated

func (PayloadType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PayloadType.Descriptor instead.

func (PayloadType) Number

func (x PayloadType) Number() protoreflect.EnumNumber

func (PayloadType) String

func (x PayloadType) String() string

func (PayloadType) Type

type PayloadUnbond

type PayloadUnbond struct {

	// Address of the validator to unbond from.
	Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"`
	// contains filtered or unexported fields
}

Payload for an unbond transaction.

func (*PayloadUnbond) Descriptor deprecated

func (*PayloadUnbond) Descriptor() ([]byte, []int)

Deprecated: Use PayloadUnbond.ProtoReflect.Descriptor instead.

func (*PayloadUnbond) GetValidator

func (x *PayloadUnbond) GetValidator() string

func (*PayloadUnbond) ProtoMessage

func (*PayloadUnbond) ProtoMessage()

func (*PayloadUnbond) ProtoReflect

func (x *PayloadUnbond) ProtoReflect() protoreflect.Message

func (*PayloadUnbond) Reset

func (x *PayloadUnbond) Reset()

func (*PayloadUnbond) String

func (x *PayloadUnbond) String() string

type PayloadWithdraw

type PayloadWithdraw struct {

	// Address to withdraw from.
	From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	// Address to withdraw to.
	To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	// Withdrawal amount in NanoPAC.
	Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

Payload for a withdraw transaction.

func (*PayloadWithdraw) Descriptor deprecated

func (*PayloadWithdraw) Descriptor() ([]byte, []int)

Deprecated: Use PayloadWithdraw.ProtoReflect.Descriptor instead.

func (*PayloadWithdraw) GetAmount

func (x *PayloadWithdraw) GetAmount() int64

func (*PayloadWithdraw) GetFrom

func (x *PayloadWithdraw) GetFrom() string

func (*PayloadWithdraw) GetTo

func (x *PayloadWithdraw) GetTo() string

func (*PayloadWithdraw) ProtoMessage

func (*PayloadWithdraw) ProtoMessage()

func (*PayloadWithdraw) ProtoReflect

func (x *PayloadWithdraw) ProtoReflect() protoreflect.Message

func (*PayloadWithdraw) Reset

func (x *PayloadWithdraw) Reset()

func (*PayloadWithdraw) String

func (x *PayloadWithdraw) String() string

type PeerInfo

type PeerInfo struct {

	// Status of the peer.
	Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	// Moniker of the peer.
	Moniker string `protobuf:"bytes,2,opt,name=moniker,proto3" json:"moniker,omitempty"`
	// Agent information of the peer.
	Agent string `protobuf:"bytes,3,opt,name=agent,proto3" json:"agent,omitempty"`
	// Peer ID of the peer.
	PeerId []byte `protobuf:"bytes,4,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	// Consensus keys used by the peer.
	ConsensusKeys []string `protobuf:"bytes,5,rep,name=consensus_keys,json=consensusKeys,proto3" json:"consensus_keys,omitempty"`
	// Consensus address of the peer.
	ConsensusAddress []string `protobuf:"bytes,6,rep,name=consensus_address,json=consensusAddress,proto3" json:"consensus_address,omitempty"`
	// Services provided by the peer.
	Services uint32 `protobuf:"varint,7,opt,name=services,proto3" json:"services,omitempty"`
	// Hash of the last block the peer knows.
	LastBlockHash []byte `protobuf:"bytes,8,opt,name=last_block_hash,json=lastBlockHash,proto3" json:"last_block_hash,omitempty"`
	// Height of the peer in the blockchain.
	Height uint32 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"`
	// Count of received messages.
	ReceivedMessages int32 `protobuf:"varint,10,opt,name=received_messages,json=receivedMessages,proto3" json:"received_messages,omitempty"`
	// Count of invalid messages received.
	InvalidMessages int32 `protobuf:"varint,11,opt,name=invalid_messages,json=invalidMessages,proto3" json:"invalid_messages,omitempty"`
	// Timestamp of the last sent message.
	LastSent int64 `protobuf:"varint,12,opt,name=last_sent,json=lastSent,proto3" json:"last_sent,omitempty"`
	// Timestamp of the last received message.
	LastReceived int64 `protobuf:"varint,13,opt,name=last_received,json=lastReceived,proto3" json:"last_received,omitempty"`
	// Bytes sent per message type.
	SentBytes map[int32]int64 `` /* 179-byte string literal not displayed */
	// Bytes received per message type.
	ReceivedBytes map[int32]int64 `` /* 191-byte string literal not displayed */
	// Network address of the peer.
	Address string `protobuf:"bytes,16,opt,name=address,proto3" json:"address,omitempty"`
	// Direction of connection with the peer.
	Direction string `protobuf:"bytes,17,opt,name=direction,proto3" json:"direction,omitempty"`
	// List of protocols supported by the peer.
	Protocols []string `protobuf:"bytes,18,rep,name=protocols,proto3" json:"protocols,omitempty"`
	// Total sessions with the peer.
	TotalSessions int32 `protobuf:"varint,19,opt,name=total_sessions,json=totalSessions,proto3" json:"total_sessions,omitempty"`
	// Completed sessions with the peer.
	CompletedSessions int32 `protobuf:"varint,20,opt,name=completed_sessions,json=completedSessions,proto3" json:"completed_sessions,omitempty"`
	// contains filtered or unexported fields
}

Information about a peer in the network.

func (*PeerInfo) Descriptor deprecated

func (*PeerInfo) Descriptor() ([]byte, []int)

Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead.

func (*PeerInfo) GetAddress added in v0.17.0

func (x *PeerInfo) GetAddress() string

func (*PeerInfo) GetAgent

func (x *PeerInfo) GetAgent() string

func (*PeerInfo) GetCompletedSessions added in v0.18.0

func (x *PeerInfo) GetCompletedSessions() int32

func (*PeerInfo) GetConsensusAddress added in v1.0.0

func (x *PeerInfo) GetConsensusAddress() []string

func (*PeerInfo) GetConsensusKeys added in v0.13.0

func (x *PeerInfo) GetConsensusKeys() []string

func (*PeerInfo) GetDirection added in v0.18.0

func (x *PeerInfo) GetDirection() string

func (*PeerInfo) GetHeight

func (x *PeerInfo) GetHeight() uint32

func (*PeerInfo) GetInvalidMessages

func (x *PeerInfo) GetInvalidMessages() int32

func (*PeerInfo) GetLastBlockHash added in v0.15.0

func (x *PeerInfo) GetLastBlockHash() []byte

func (*PeerInfo) GetLastReceived added in v0.15.0

func (x *PeerInfo) GetLastReceived() int64

func (*PeerInfo) GetLastSent added in v0.15.0

func (x *PeerInfo) GetLastSent() int64

func (*PeerInfo) GetMoniker

func (x *PeerInfo) GetMoniker() string

func (*PeerInfo) GetPeerId

func (x *PeerInfo) GetPeerId() []byte

func (*PeerInfo) GetProtocols added in v0.18.0

func (x *PeerInfo) GetProtocols() []string

func (*PeerInfo) GetReceivedBytes

func (x *PeerInfo) GetReceivedBytes() map[int32]int64

func (*PeerInfo) GetReceivedMessages

func (x *PeerInfo) GetReceivedMessages() int32

func (*PeerInfo) GetSentBytes added in v0.15.0

func (x *PeerInfo) GetSentBytes() map[int32]int64

func (*PeerInfo) GetServices added in v0.15.0

func (x *PeerInfo) GetServices() uint32

func (*PeerInfo) GetStatus

func (x *PeerInfo) GetStatus() int32

func (*PeerInfo) GetTotalSessions added in v0.18.0

func (x *PeerInfo) GetTotalSessions() int32

func (*PeerInfo) ProtoMessage

func (*PeerInfo) ProtoMessage()

func (*PeerInfo) ProtoReflect

func (x *PeerInfo) ProtoReflect() protoreflect.Message

func (*PeerInfo) Reset

func (x *PeerInfo) Reset()

func (*PeerInfo) String

func (x *PeerInfo) String() string

type SignRawTransactionRequest added in v1.0.0

type SignRawTransactionRequest struct {

	// Name of the wallet used for signing.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// Raw transaction data to be signed.
	RawTransaction []byte `protobuf:"bytes,2,opt,name=raw_transaction,json=rawTransaction,proto3" json:"raw_transaction,omitempty"`
	// Password for unlocking the wallet for signing.
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

Request message for signing a raw transaction.

func (*SignRawTransactionRequest) Descriptor deprecated added in v1.0.0

func (*SignRawTransactionRequest) Descriptor() ([]byte, []int)

Deprecated: Use SignRawTransactionRequest.ProtoReflect.Descriptor instead.

func (*SignRawTransactionRequest) GetPassword added in v1.0.0

func (x *SignRawTransactionRequest) GetPassword() string

func (*SignRawTransactionRequest) GetRawTransaction added in v1.0.0

func (x *SignRawTransactionRequest) GetRawTransaction() []byte

func (*SignRawTransactionRequest) GetWalletName added in v1.0.0

func (x *SignRawTransactionRequest) GetWalletName() string

func (*SignRawTransactionRequest) ProtoMessage added in v1.0.0

func (*SignRawTransactionRequest) ProtoMessage()

func (*SignRawTransactionRequest) ProtoReflect added in v1.0.0

func (*SignRawTransactionRequest) Reset added in v1.0.0

func (x *SignRawTransactionRequest) Reset()

func (*SignRawTransactionRequest) String added in v1.0.0

func (x *SignRawTransactionRequest) String() string

type SignRawTransactionResponse added in v1.0.0

type SignRawTransactionResponse struct {

	// ID of the signed transaction.
	TransactionId []byte `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	// Signed raw transaction data.
	SignedRawTransaction []byte `protobuf:"bytes,2,opt,name=signed_raw_transaction,json=signedRawTransaction,proto3" json:"signed_raw_transaction,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the transaction ID and signed raw transaction.

func (*SignRawTransactionResponse) Descriptor deprecated added in v1.0.0

func (*SignRawTransactionResponse) Descriptor() ([]byte, []int)

Deprecated: Use SignRawTransactionResponse.ProtoReflect.Descriptor instead.

func (*SignRawTransactionResponse) GetSignedRawTransaction added in v1.0.0

func (x *SignRawTransactionResponse) GetSignedRawTransaction() []byte

func (*SignRawTransactionResponse) GetTransactionId added in v1.0.0

func (x *SignRawTransactionResponse) GetTransactionId() []byte

func (*SignRawTransactionResponse) ProtoMessage added in v1.0.0

func (*SignRawTransactionResponse) ProtoMessage()

func (*SignRawTransactionResponse) ProtoReflect added in v1.0.0

func (*SignRawTransactionResponse) Reset added in v1.0.0

func (x *SignRawTransactionResponse) Reset()

func (*SignRawTransactionResponse) String added in v1.0.0

func (x *SignRawTransactionResponse) String() string

type TransactionClient

type TransactionClient interface {
	// GetTransaction retrieves transaction details based on the provided request
	// parameters.
	GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error)
	// CalculateFee calculates the transaction fee based on the specified amount
	// and payload type.
	CalculateFee(ctx context.Context, in *CalculateFeeRequest, opts ...grpc.CallOption) (*CalculateFeeResponse, error)
	// BroadcastTransaction broadcasts a signed transaction to the network.
	BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error)
	// GetRawTransferTransaction retrieves raw details of a transfer transaction.
	GetRawTransferTransaction(ctx context.Context, in *GetRawTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error)
	// GetRawBondTransaction retrieves raw details of a bond transaction.
	GetRawBondTransaction(ctx context.Context, in *GetRawBondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error)
	// GetRawUnbondTransaction retrieves raw details of an unbond transaction.
	GetRawUnbondTransaction(ctx context.Context, in *GetRawUnbondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error)
	// GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
	GetRawWithdrawTransaction(ctx context.Context, in *GetRawWithdrawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error)
}

TransactionClient is the client API for Transaction service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type TransactionInfo

type TransactionInfo struct {

	// Transaction ID.
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Transaction data.
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// Transaction version.
	Version int32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	// Lock time for the transaction.
	LockTime uint32 `protobuf:"varint,4,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
	// Transaction value in NanoPAC.
	Value int64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"`
	// Transaction fee in NanoPAC.
	Fee int64 `protobuf:"varint,6,opt,name=fee,proto3" json:"fee,omitempty"`
	// Type of transaction payload.
	PayloadType PayloadType `protobuf:"varint,7,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType" json:"payload_type,omitempty"`
	// Types that are assignable to Payload:
	//
	//	*TransactionInfo_Transfer
	//	*TransactionInfo_Bond
	//	*TransactionInfo_Sortition
	//	*TransactionInfo_Unbond
	//	*TransactionInfo_Withdraw
	Payload isTransactionInfo_Payload `protobuf_oneof:"payload"`
	// Transaction memo.
	Memo string `protobuf:"bytes,8,opt,name=memo,proto3" json:"memo,omitempty"`
	// Public key associated with the transaction.
	PublicKey string `protobuf:"bytes,9,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// Transaction signature.
	Signature []byte `protobuf:"bytes,10,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

Information about a transaction.

func (*TransactionInfo) Descriptor deprecated

func (*TransactionInfo) Descriptor() ([]byte, []int)

Deprecated: Use TransactionInfo.ProtoReflect.Descriptor instead.

func (*TransactionInfo) GetBond

func (x *TransactionInfo) GetBond() *PayloadBond

func (*TransactionInfo) GetData

func (x *TransactionInfo) GetData() []byte

func (*TransactionInfo) GetFee

func (x *TransactionInfo) GetFee() int64

func (*TransactionInfo) GetId

func (x *TransactionInfo) GetId() []byte

func (*TransactionInfo) GetLockTime added in v0.15.0

func (x *TransactionInfo) GetLockTime() uint32

func (*TransactionInfo) GetMemo

func (x *TransactionInfo) GetMemo() string

func (*TransactionInfo) GetPayload

func (m *TransactionInfo) GetPayload() isTransactionInfo_Payload

func (*TransactionInfo) GetPayloadType

func (x *TransactionInfo) GetPayloadType() PayloadType

func (*TransactionInfo) GetPublicKey

func (x *TransactionInfo) GetPublicKey() string

func (*TransactionInfo) GetSignature

func (x *TransactionInfo) GetSignature() []byte

func (*TransactionInfo) GetSortition

func (x *TransactionInfo) GetSortition() *PayloadSortition

func (*TransactionInfo) GetTransfer added in v0.11.0

func (x *TransactionInfo) GetTransfer() *PayloadTransfer

func (*TransactionInfo) GetUnbond

func (x *TransactionInfo) GetUnbond() *PayloadUnbond

func (*TransactionInfo) GetValue

func (x *TransactionInfo) GetValue() int64

func (*TransactionInfo) GetVersion

func (x *TransactionInfo) GetVersion() int32

func (*TransactionInfo) GetWithdraw

func (x *TransactionInfo) GetWithdraw() *PayloadWithdraw

func (*TransactionInfo) ProtoMessage

func (*TransactionInfo) ProtoMessage()

func (*TransactionInfo) ProtoReflect

func (x *TransactionInfo) ProtoReflect() protoreflect.Message

func (*TransactionInfo) Reset

func (x *TransactionInfo) Reset()

func (*TransactionInfo) String

func (x *TransactionInfo) String() string

type TransactionInfo_Bond

type TransactionInfo_Bond struct {
	// Bond payload.
	Bond *PayloadBond `protobuf:"bytes,31,opt,name=bond,proto3,oneof"`
}

type TransactionInfo_Sortition

type TransactionInfo_Sortition struct {
	// Sortition payload.
	Sortition *PayloadSortition `protobuf:"bytes,32,opt,name=sortition,proto3,oneof"`
}

type TransactionInfo_Transfer added in v0.11.0

type TransactionInfo_Transfer struct {
	// Transfer payload.
	Transfer *PayloadTransfer `protobuf:"bytes,30,opt,name=transfer,proto3,oneof"`
}

type TransactionInfo_Unbond

type TransactionInfo_Unbond struct {
	// Unbond payload.
	Unbond *PayloadUnbond `protobuf:"bytes,33,opt,name=unbond,proto3,oneof"`
}

type TransactionInfo_Withdraw

type TransactionInfo_Withdraw struct {
	// Withdraw payload.
	Withdraw *PayloadWithdraw `protobuf:"bytes,34,opt,name=withdraw,proto3,oneof"`
}

type TransactionJsonRpcService added in v1.1.0

type TransactionJsonRpcService struct {
	// contains filtered or unexported fields
}

func NewTransactionJsonRpcService added in v1.1.0

func NewTransactionJsonRpcService(client TransactionClient) TransactionJsonRpcService

func (*TransactionJsonRpcService) Methods added in v1.1.0

func (s *TransactionJsonRpcService) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error)

type TransactionServer

type TransactionServer interface {
	// GetTransaction retrieves transaction details based on the provided request
	// parameters.
	GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error)
	// CalculateFee calculates the transaction fee based on the specified amount
	// and payload type.
	CalculateFee(context.Context, *CalculateFeeRequest) (*CalculateFeeResponse, error)
	// BroadcastTransaction broadcasts a signed transaction to the network.
	BroadcastTransaction(context.Context, *BroadcastTransactionRequest) (*BroadcastTransactionResponse, error)
	// GetRawTransferTransaction retrieves raw details of a transfer transaction.
	GetRawTransferTransaction(context.Context, *GetRawTransferTransactionRequest) (*GetRawTransactionResponse, error)
	// GetRawBondTransaction retrieves raw details of a bond transaction.
	GetRawBondTransaction(context.Context, *GetRawBondTransactionRequest) (*GetRawTransactionResponse, error)
	// GetRawUnbondTransaction retrieves raw details of an unbond transaction.
	GetRawUnbondTransaction(context.Context, *GetRawUnbondTransactionRequest) (*GetRawTransactionResponse, error)
	// GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
	GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error)
}

TransactionServer is the server API for Transaction service. All implementations should embed UnimplementedTransactionServer for forward compatibility

type TransactionVerbosity

type TransactionVerbosity int32

Enumeration for verbosity level when requesting transaction details.

const (
	// Request transaction data only.
	TransactionVerbosity_TRANSACTION_DATA TransactionVerbosity = 0
	// Request transaction details.
	TransactionVerbosity_TRANSACTION_INFO TransactionVerbosity = 1
)

func (TransactionVerbosity) Descriptor

func (TransactionVerbosity) Enum

func (TransactionVerbosity) EnumDescriptor deprecated

func (TransactionVerbosity) EnumDescriptor() ([]byte, []int)

Deprecated: Use TransactionVerbosity.Descriptor instead.

func (TransactionVerbosity) Number

func (TransactionVerbosity) String

func (x TransactionVerbosity) String() string

func (TransactionVerbosity) Type

type UnimplementedBlockchainServer

type UnimplementedBlockchainServer struct {
}

UnimplementedBlockchainServer should be embedded to have forward compatible implementations.

func (UnimplementedBlockchainServer) GetAccount

func (UnimplementedBlockchainServer) GetBlock

func (UnimplementedBlockchainServer) GetBlockHash

func (UnimplementedBlockchainServer) GetBlockHeight

func (UnimplementedBlockchainServer) GetBlockchainInfo

func (UnimplementedBlockchainServer) GetConsensusInfo

func (UnimplementedBlockchainServer) GetPublicKey added in v0.15.0

func (UnimplementedBlockchainServer) GetValidator

func (UnimplementedBlockchainServer) GetValidatorAddresses added in v0.12.0

func (UnimplementedBlockchainServer) GetValidatorByNumber

type UnimplementedNetworkServer

type UnimplementedNetworkServer struct {
}

UnimplementedNetworkServer should be embedded to have forward compatible implementations.

func (UnimplementedNetworkServer) GetNetworkInfo

func (UnimplementedNetworkServer) GetNodeInfo added in v0.13.0

type UnimplementedTransactionServer

type UnimplementedTransactionServer struct {
}

UnimplementedTransactionServer should be embedded to have forward compatible implementations.

func (UnimplementedTransactionServer) BroadcastTransaction added in v1.0.0

func (UnimplementedTransactionServer) CalculateFee added in v0.15.0

func (UnimplementedTransactionServer) GetRawBondTransaction added in v0.18.0

func (UnimplementedTransactionServer) GetRawTransferTransaction added in v0.18.0

func (UnimplementedTransactionServer) GetRawUnbondTransaction added in v1.1.0

func (UnimplementedTransactionServer) GetRawWithdrawTransaction added in v0.18.0

func (UnimplementedTransactionServer) GetTransaction

type UnimplementedWalletServer

type UnimplementedWalletServer struct {
}

UnimplementedWalletServer should be embedded to have forward compatible implementations.

func (UnimplementedWalletServer) CreateWallet

func (UnimplementedWalletServer) GetAddressHistory added in v1.1.0

func (UnimplementedWalletServer) GetNewAddress added in v1.1.0

func (UnimplementedWalletServer) GetTotalBalance added in v1.1.0

func (UnimplementedWalletServer) GetValidatorAddress added in v1.0.0

func (UnimplementedWalletServer) LoadWallet

func (UnimplementedWalletServer) LockWallet

func (UnimplementedWalletServer) SignRawTransaction added in v1.0.0

func (UnimplementedWalletServer) UnloadWallet

func (UnimplementedWalletServer) UnlockWallet

type UnloadWalletRequest

type UnloadWalletRequest struct {

	// Name of the wallet to unload.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// contains filtered or unexported fields
}

Request message for unloading a currently loaded wallet.

func (*UnloadWalletRequest) Descriptor deprecated

func (*UnloadWalletRequest) Descriptor() ([]byte, []int)

Deprecated: Use UnloadWalletRequest.ProtoReflect.Descriptor instead.

func (*UnloadWalletRequest) GetWalletName added in v1.0.0

func (x *UnloadWalletRequest) GetWalletName() string

func (*UnloadWalletRequest) ProtoMessage

func (*UnloadWalletRequest) ProtoMessage()

func (*UnloadWalletRequest) ProtoReflect

func (x *UnloadWalletRequest) ProtoReflect() protoreflect.Message

func (*UnloadWalletRequest) Reset

func (x *UnloadWalletRequest) Reset()

func (*UnloadWalletRequest) String

func (x *UnloadWalletRequest) String() string

type UnloadWalletResponse

type UnloadWalletResponse struct {

	// Name of the unloaded wallet.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the name of the unloaded wallet.

func (*UnloadWalletResponse) Descriptor deprecated

func (*UnloadWalletResponse) Descriptor() ([]byte, []int)

Deprecated: Use UnloadWalletResponse.ProtoReflect.Descriptor instead.

func (*UnloadWalletResponse) GetWalletName added in v1.0.0

func (x *UnloadWalletResponse) GetWalletName() string

func (*UnloadWalletResponse) ProtoMessage

func (*UnloadWalletResponse) ProtoMessage()

func (*UnloadWalletResponse) ProtoReflect

func (x *UnloadWalletResponse) ProtoReflect() protoreflect.Message

func (*UnloadWalletResponse) Reset

func (x *UnloadWalletResponse) Reset()

func (*UnloadWalletResponse) String

func (x *UnloadWalletResponse) String() string

type UnlockWalletRequest

type UnlockWalletRequest struct {

	// Name of the wallet to unlock.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// Password for unlocking the wallet.
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// Timeout duration for the unlocked state.
	Timeout int32 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

Request message for unlocking a wallet.

func (*UnlockWalletRequest) Descriptor deprecated

func (*UnlockWalletRequest) Descriptor() ([]byte, []int)

Deprecated: Use UnlockWalletRequest.ProtoReflect.Descriptor instead.

func (*UnlockWalletRequest) GetPassword

func (x *UnlockWalletRequest) GetPassword() string

func (*UnlockWalletRequest) GetTimeout

func (x *UnlockWalletRequest) GetTimeout() int32

func (*UnlockWalletRequest) GetWalletName added in v1.0.0

func (x *UnlockWalletRequest) GetWalletName() string

func (*UnlockWalletRequest) ProtoMessage

func (*UnlockWalletRequest) ProtoMessage()

func (*UnlockWalletRequest) ProtoReflect

func (x *UnlockWalletRequest) ProtoReflect() protoreflect.Message

func (*UnlockWalletRequest) Reset

func (x *UnlockWalletRequest) Reset()

func (*UnlockWalletRequest) String

func (x *UnlockWalletRequest) String() string

type UnlockWalletResponse

type UnlockWalletResponse struct {

	// Name of the unlocked wallet.
	WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"`
	// contains filtered or unexported fields
}

Response message containing the name of the unlocked wallet.

func (*UnlockWalletResponse) Descriptor deprecated

func (*UnlockWalletResponse) Descriptor() ([]byte, []int)

Deprecated: Use UnlockWalletResponse.ProtoReflect.Descriptor instead.

func (*UnlockWalletResponse) GetWalletName added in v1.0.0

func (x *UnlockWalletResponse) GetWalletName() string

func (*UnlockWalletResponse) ProtoMessage

func (*UnlockWalletResponse) ProtoMessage()

func (*UnlockWalletResponse) ProtoReflect

func (x *UnlockWalletResponse) ProtoReflect() protoreflect.Message

func (*UnlockWalletResponse) Reset

func (x *UnlockWalletResponse) Reset()

func (*UnlockWalletResponse) String

func (x *UnlockWalletResponse) String() string

type UnsafeBlockchainServer

type UnsafeBlockchainServer interface {
	// contains filtered or unexported methods
}

UnsafeBlockchainServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BlockchainServer will result in compilation errors.

type UnsafeNetworkServer

type UnsafeNetworkServer interface {
	// contains filtered or unexported methods
}

UnsafeNetworkServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NetworkServer will result in compilation errors.

type UnsafeTransactionServer

type UnsafeTransactionServer interface {
	// contains filtered or unexported methods
}

UnsafeTransactionServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TransactionServer will result in compilation errors.

type UnsafeWalletServer

type UnsafeWalletServer interface {
	// contains filtered or unexported methods
}

UnsafeWalletServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WalletServer will result in compilation errors.

type ValidatorInfo

type ValidatorInfo struct {

	// Hash of the validator.
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// Validator data.
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// Public key of the validator.
	PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// Validator number.
	Number int32 `protobuf:"varint,4,opt,name=number,proto3" json:"number,omitempty"`
	// Validator stake in NanoPAC.
	Stake int64 `protobuf:"varint,5,opt,name=stake,proto3" json:"stake,omitempty"`
	// Last bonding height.
	LastBondingHeight uint32 `protobuf:"varint,6,opt,name=last_bonding_height,json=lastBondingHeight,proto3" json:"last_bonding_height,omitempty"`
	// Last sortition height.
	LastSortitionHeight uint32 `protobuf:"varint,7,opt,name=last_sortition_height,json=lastSortitionHeight,proto3" json:"last_sortition_height,omitempty"`
	// Unbonding height.
	UnbondingHeight uint32 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty"`
	// Address of the validator.
	Address string `protobuf:"bytes,9,opt,name=address,proto3" json:"address,omitempty"`
	// Availability score of the validator.
	AvailabilityScore float64 `protobuf:"fixed64,10,opt,name=availability_score,json=availabilityScore,proto3" json:"availability_score,omitempty"`
	// contains filtered or unexported fields
}

Message containing information about a validator.

func (*ValidatorInfo) Descriptor deprecated

func (*ValidatorInfo) Descriptor() ([]byte, []int)

Deprecated: Use ValidatorInfo.ProtoReflect.Descriptor instead.

func (*ValidatorInfo) GetAddress

func (x *ValidatorInfo) GetAddress() string

func (*ValidatorInfo) GetAvailabilityScore added in v0.20.0

func (x *ValidatorInfo) GetAvailabilityScore() float64

func (*ValidatorInfo) GetData

func (x *ValidatorInfo) GetData() []byte

func (*ValidatorInfo) GetHash

func (x *ValidatorInfo) GetHash() []byte

func (*ValidatorInfo) GetLastBondingHeight

func (x *ValidatorInfo) GetLastBondingHeight() uint32

func (*ValidatorInfo) GetLastSortitionHeight added in v0.15.0

func (x *ValidatorInfo) GetLastSortitionHeight() uint32

func (*ValidatorInfo) GetNumber

func (x *ValidatorInfo) GetNumber() int32

func (*ValidatorInfo) GetPublicKey

func (x *ValidatorInfo) GetPublicKey() string

func (*ValidatorInfo) GetStake

func (x *ValidatorInfo) GetStake() int64

func (*ValidatorInfo) GetUnbondingHeight

func (x *ValidatorInfo) GetUnbondingHeight() uint32

func (*ValidatorInfo) ProtoMessage

func (*ValidatorInfo) ProtoMessage()

func (*ValidatorInfo) ProtoReflect

func (x *ValidatorInfo) ProtoReflect() protoreflect.Message

func (*ValidatorInfo) Reset

func (x *ValidatorInfo) Reset()

func (*ValidatorInfo) String

func (x *ValidatorInfo) String() string

type VoteInfo

type VoteInfo struct {

	// Type of the vote.
	Type VoteType `protobuf:"varint,1,opt,name=type,proto3,enum=pactus.VoteType" json:"type,omitempty"`
	// Voter's address.
	Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
	// Hash of the block being voted on.
	BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
	// Round of the vote.
	Round int32 `protobuf:"varint,4,opt,name=round,proto3" json:"round,omitempty"`
	// Consensus round of the vote.
	CpRound int32 `protobuf:"varint,5,opt,name=cp_round,json=cpRound,proto3" json:"cp_round,omitempty"`
	// Consensus value of the vote.
	CpValue int32 `protobuf:"varint,6,opt,name=cp_value,json=cpValue,proto3" json:"cp_value,omitempty"`
	// contains filtered or unexported fields
}

Message containing information about a vote.

func (*VoteInfo) Descriptor deprecated

func (*VoteInfo) Descriptor() ([]byte, []int)

Deprecated: Use VoteInfo.ProtoReflect.Descriptor instead.

func (*VoteInfo) GetBlockHash

func (x *VoteInfo) GetBlockHash() []byte

func (*VoteInfo) GetCpRound added in v0.19.0

func (x *VoteInfo) GetCpRound() int32

func (*VoteInfo) GetCpValue added in v0.19.0

func (x *VoteInfo) GetCpValue() int32

func (*VoteInfo) GetRound

func (x *VoteInfo) GetRound() int32

func (*VoteInfo) GetType

func (x *VoteInfo) GetType() VoteType

func (*VoteInfo) GetVoter

func (x *VoteInfo) GetVoter() string

func (*VoteInfo) ProtoMessage

func (*VoteInfo) ProtoMessage()

func (*VoteInfo) ProtoReflect

func (x *VoteInfo) ProtoReflect() protoreflect.Message

func (*VoteInfo) Reset

func (x *VoteInfo) Reset()

func (*VoteInfo) String

func (x *VoteInfo) String() string

type VoteType

type VoteType int32

Enumeration for types of votes.

const (
	// Unknown vote type.
	VoteType_VOTE_UNKNOWN VoteType = 0
	// Prepare vote type.
	VoteType_VOTE_PREPARE VoteType = 1
	// Precommit vote type.
	VoteType_VOTE_PRECOMMIT VoteType = 2
	// Change proposer vote type.
	VoteType_VOTE_CHANGE_PROPOSER VoteType = 3
)

func (VoteType) Descriptor

func (VoteType) Descriptor() protoreflect.EnumDescriptor

func (VoteType) Enum

func (x VoteType) Enum() *VoteType

func (VoteType) EnumDescriptor deprecated

func (VoteType) EnumDescriptor() ([]byte, []int)

Deprecated: Use VoteType.Descriptor instead.

func (VoteType) Number

func (x VoteType) Number() protoreflect.EnumNumber

func (VoteType) String

func (x VoteType) String() string

func (VoteType) Type

type WalletClient

type WalletClient interface {
	// CreateWallet creates a new wallet with the specified parameters.
	CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error)
	// LoadWallet loads an existing wallet with the given name.
	LoadWallet(ctx context.Context, in *LoadWalletRequest, opts ...grpc.CallOption) (*LoadWalletResponse, error)
	// UnloadWallet unloads a currently loaded wallet with the specified name.
	UnloadWallet(ctx context.Context, in *UnloadWalletRequest, opts ...grpc.CallOption) (*UnloadWalletResponse, error)
	// LockWallet locks a currently loaded wallet with the provided password and
	// timeout.
	LockWallet(ctx context.Context, in *LockWalletRequest, opts ...grpc.CallOption) (*LockWalletResponse, error)
	// UnlockWallet unlocks a locked wallet with the provided password and
	// timeout.
	UnlockWallet(ctx context.Context, in *UnlockWalletRequest, opts ...grpc.CallOption) (*UnlockWalletResponse, error)
	// GetTotalBalance returns the total available balance of the wallet.
	GetTotalBalance(ctx context.Context, in *GetTotalBalanceRequest, opts ...grpc.CallOption) (*GetTotalBalanceResponse, error)
	// SignRawTransaction signs a raw transaction for a specified wallet.
	SignRawTransaction(ctx context.Context, in *SignRawTransactionRequest, opts ...grpc.CallOption) (*SignRawTransactionResponse, error)
	// GetValidatorAddress retrieves the validator address associated with a
	// public key.
	GetValidatorAddress(ctx context.Context, in *GetValidatorAddressRequest, opts ...grpc.CallOption) (*GetValidatorAddressResponse, error)
	// GetNewAddress generates a new address for the specified wallet.
	GetNewAddress(ctx context.Context, in *GetNewAddressRequest, opts ...grpc.CallOption) (*GetNewAddressResponse, error)
	// GetAddressHistory retrieve transaction history of an address.
	GetAddressHistory(ctx context.Context, in *GetAddressHistoryRequest, opts ...grpc.CallOption) (*GetAddressHistoryResponse, error)
}

WalletClient is the client API for Wallet service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewWalletClient

func NewWalletClient(cc grpc.ClientConnInterface) WalletClient

type WalletJsonRpcService added in v1.1.0

type WalletJsonRpcService struct {
	// contains filtered or unexported fields
}

func NewWalletJsonRpcService added in v1.1.0

func NewWalletJsonRpcService(client WalletClient) WalletJsonRpcService

func (*WalletJsonRpcService) Methods added in v1.1.0

func (s *WalletJsonRpcService) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error)

type WalletServer

type WalletServer interface {
	// CreateWallet creates a new wallet with the specified parameters.
	CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error)
	// LoadWallet loads an existing wallet with the given name.
	LoadWallet(context.Context, *LoadWalletRequest) (*LoadWalletResponse, error)
	// UnloadWallet unloads a currently loaded wallet with the specified name.
	UnloadWallet(context.Context, *UnloadWalletRequest) (*UnloadWalletResponse, error)
	// LockWallet locks a currently loaded wallet with the provided password and
	// timeout.
	LockWallet(context.Context, *LockWalletRequest) (*LockWalletResponse, error)
	// UnlockWallet unlocks a locked wallet with the provided password and
	// timeout.
	UnlockWallet(context.Context, *UnlockWalletRequest) (*UnlockWalletResponse, error)
	// GetTotalBalance returns the total available balance of the wallet.
	GetTotalBalance(context.Context, *GetTotalBalanceRequest) (*GetTotalBalanceResponse, error)
	// SignRawTransaction signs a raw transaction for a specified wallet.
	SignRawTransaction(context.Context, *SignRawTransactionRequest) (*SignRawTransactionResponse, error)
	// GetValidatorAddress retrieves the validator address associated with a
	// public key.
	GetValidatorAddress(context.Context, *GetValidatorAddressRequest) (*GetValidatorAddressResponse, error)
	// GetNewAddress generates a new address for the specified wallet.
	GetNewAddress(context.Context, *GetNewAddressRequest) (*GetNewAddressResponse, error)
	// GetAddressHistory retrieve transaction history of an address.
	GetAddressHistory(context.Context, *GetAddressHistoryRequest) (*GetAddressHistoryResponse, error)
}

WalletServer is the server API for Wallet service. All implementations should embed UnimplementedWalletServer for forward compatibility

Jump to

Keyboard shortcuts

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