blockchainpb

package
v0.0.0-...-7c31276 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AtomicFs_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "atomicfs.v1.blockchain.AtomicFs",
	HandlerType: (*AtomicFsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetBlocks",
			Handler:    _AtomicFs_GetBlocks_Handler,
		},
		{
			MethodName: "GetTransactions",
			Handler:    _AtomicFs_GetTransactions_Handler,
		},
		{
			MethodName: "GetAccount",
			Handler:    _AtomicFs_GetAccount_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeToBlocks",
			Handler:       _AtomicFs_SubscribeToBlocks_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SubscribeToTransactions",
			Handler:       _AtomicFs_SubscribeToTransactions_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "service.proto",
}

AtomicFs_ServiceDesc is the grpc.ServiceDesc for AtomicFs 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_account_proto protoreflect.FileDescriptor
View Source
var File_block_proto protoreflect.FileDescriptor
View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var File_transaction_proto protoreflect.FileDescriptor

Functions

func RegisterAtomicFsServer

func RegisterAtomicFsServer(s grpc.ServiceRegistrar, srv AtomicFsServer)

Types

type Account

type Account struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Balance uint64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetAddress

func (x *Account) GetAddress() string

func (*Account) GetBalance

func (x *Account) GetBalance() uint64

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

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

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

type AccountRequest

type AccountRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountRequest) Descriptor deprecated

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

Deprecated: Use AccountRequest.ProtoReflect.Descriptor instead.

func (*AccountRequest) GetAddress

func (x *AccountRequest) GetAddress() string

func (*AccountRequest) ProtoMessage

func (*AccountRequest) ProtoMessage()

func (*AccountRequest) ProtoReflect

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

func (*AccountRequest) Reset

func (x *AccountRequest) Reset()

func (*AccountRequest) String

func (x *AccountRequest) String() string

type AccountResponse

type AccountResponse struct {
	Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountResponse) Descriptor deprecated

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

Deprecated: Use AccountResponse.ProtoReflect.Descriptor instead.

func (*AccountResponse) GetAccount

func (x *AccountResponse) GetAccount() *Account

func (*AccountResponse) ProtoMessage

func (*AccountResponse) ProtoMessage()

func (*AccountResponse) ProtoReflect

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

func (*AccountResponse) Reset

func (x *AccountResponse) Reset()

func (*AccountResponse) String

func (x *AccountResponse) String() string

type AtomicFsClient

type AtomicFsClient interface {
	GetBlocks(ctx context.Context, in *BlocksRequest, opts ...grpc.CallOption) (*BlocksResponse, error)
	SubscribeToBlocks(ctx context.Context, in *SubscribeBlocksRequest, opts ...grpc.CallOption) (AtomicFs_SubscribeToBlocksClient, error)
	GetTransactions(ctx context.Context, in *TransactionsRequest, opts ...grpc.CallOption) (*TransactionsResponse, error)
	SubscribeToTransactions(ctx context.Context, in *SubscribeTransactionRequest, opts ...grpc.CallOption) (AtomicFs_SubscribeToTransactionsClient, error)
	GetAccount(ctx context.Context, in *AccountRequest, opts ...grpc.CallOption) (*AccountResponse, error)
}

AtomicFsClient is the client API for AtomicFs 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 NewAtomicFsClient

func NewAtomicFsClient(cc grpc.ClientConnInterface) AtomicFsClient

type AtomicFsServer

type AtomicFsServer interface {
	GetBlocks(context.Context, *BlocksRequest) (*BlocksResponse, error)
	SubscribeToBlocks(*SubscribeBlocksRequest, AtomicFs_SubscribeToBlocksServer) error
	GetTransactions(context.Context, *TransactionsRequest) (*TransactionsResponse, error)
	SubscribeToTransactions(*SubscribeTransactionRequest, AtomicFs_SubscribeToTransactionsServer) error
	GetAccount(context.Context, *AccountRequest) (*AccountResponse, error)
	// contains filtered or unexported methods
}

AtomicFsServer is the server API for AtomicFs service. All implementations must embed UnimplementedAtomicFsServer for forward compatibility

type AtomicFs_SubscribeToBlocksClient

type AtomicFs_SubscribeToBlocksClient interface {
	Recv() (*BlocksResponse, error)
	grpc.ClientStream
}

type AtomicFs_SubscribeToBlocksServer

type AtomicFs_SubscribeToBlocksServer interface {
	Send(*BlocksResponse) error
	grpc.ServerStream
}

type AtomicFs_SubscribeToTransactionsClient

type AtomicFs_SubscribeToTransactionsClient interface {
	Recv() (*TransactionsResponse, error)
	grpc.ClientStream
}

type AtomicFs_SubscribeToTransactionsServer

type AtomicFs_SubscribeToTransactionsServer interface {
	Send(*TransactionsResponse) error
	grpc.ServerStream
}

type Block

type Block struct {
	Header       *BlockHeader   `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Transactions []*Transaction `protobuf:"bytes,2,rep,name=transactions,proto3" json:"transactions,omitempty"`
	// contains filtered or unexported fields
}

func (*Block) Descriptor deprecated

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

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetHeader

func (x *Block) GetHeader() *BlockHeader

func (*Block) GetTransactions

func (x *Block) GetTransactions() []*Transaction

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

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

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

type BlockHeader

type BlockHeader struct {
	Parent    string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	Number    uint64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
	Nonce     uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Miner     string `protobuf:"bytes,4,opt,name=miner,proto3" json:"miner,omitempty"`
	Timestamp int64  `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockHeader) Descriptor deprecated

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

Deprecated: Use BlockHeader.ProtoReflect.Descriptor instead.

func (*BlockHeader) GetMiner

func (x *BlockHeader) GetMiner() string

func (*BlockHeader) GetNonce

func (x *BlockHeader) GetNonce() uint64

func (*BlockHeader) GetNumber

func (x *BlockHeader) GetNumber() uint64

func (*BlockHeader) GetParent

func (x *BlockHeader) GetParent() string

func (*BlockHeader) GetTimestamp

func (x *BlockHeader) GetTimestamp() int64

func (*BlockHeader) ProtoMessage

func (*BlockHeader) ProtoMessage()

func (*BlockHeader) ProtoReflect

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

func (*BlockHeader) Reset

func (x *BlockHeader) Reset()

func (*BlockHeader) String

func (x *BlockHeader) String() string

type BlocksRequest

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

func (*BlocksRequest) Descriptor deprecated

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

Deprecated: Use BlocksRequest.ProtoReflect.Descriptor instead.

func (*BlocksRequest) ProtoMessage

func (*BlocksRequest) ProtoMessage()

func (*BlocksRequest) ProtoReflect

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

func (*BlocksRequest) Reset

func (x *BlocksRequest) Reset()

func (*BlocksRequest) String

func (x *BlocksRequest) String() string

type BlocksResponse

type BlocksResponse struct {
	Blocks []*Block `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// contains filtered or unexported fields
}

func (*BlocksResponse) Descriptor deprecated

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

Deprecated: Use BlocksResponse.ProtoReflect.Descriptor instead.

func (*BlocksResponse) GetBlocks

func (x *BlocksResponse) GetBlocks() []*Block

func (*BlocksResponse) ProtoMessage

func (*BlocksResponse) ProtoMessage()

func (*BlocksResponse) ProtoReflect

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

func (*BlocksResponse) Reset

func (x *BlocksResponse) Reset()

func (*BlocksResponse) String

func (x *BlocksResponse) String() string

type SubscribeBlocksRequest

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

func (*SubscribeBlocksRequest) Descriptor deprecated

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

Deprecated: Use SubscribeBlocksRequest.ProtoReflect.Descriptor instead.

func (*SubscribeBlocksRequest) ProtoMessage

func (*SubscribeBlocksRequest) ProtoMessage()

func (*SubscribeBlocksRequest) ProtoReflect

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

func (*SubscribeBlocksRequest) Reset

func (x *SubscribeBlocksRequest) Reset()

func (*SubscribeBlocksRequest) String

func (x *SubscribeBlocksRequest) String() string

type SubscribeTransactionRequest

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

func (*SubscribeTransactionRequest) Descriptor deprecated

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

Deprecated: Use SubscribeTransactionRequest.ProtoReflect.Descriptor instead.

func (*SubscribeTransactionRequest) ProtoMessage

func (*SubscribeTransactionRequest) ProtoMessage()

func (*SubscribeTransactionRequest) ProtoReflect

func (*SubscribeTransactionRequest) Reset

func (x *SubscribeTransactionRequest) Reset()

func (*SubscribeTransactionRequest) String

func (x *SubscribeTransactionRequest) String() string

type Transaction

type Transaction struct {
	From      string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	To        string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	Gas       uint64 `protobuf:"varint,3,opt,name=gas,proto3" json:"gas,omitempty"`
	GasPrice  uint64 `protobuf:"varint,4,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"`
	Value     uint64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"`
	Nonce     uint64 `protobuf:"varint,6,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Data      []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
	Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"`
	Timestamp uint64 `protobuf:"varint,9,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Transaction) Descriptor deprecated

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

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) GetData

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

func (*Transaction) GetFrom

func (x *Transaction) GetFrom() string

func (*Transaction) GetGas

func (x *Transaction) GetGas() uint64

func (*Transaction) GetGasPrice

func (x *Transaction) GetGasPrice() uint64

func (*Transaction) GetNonce

func (x *Transaction) GetNonce() uint64

func (*Transaction) GetSignature

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

func (*Transaction) GetTimestamp

func (x *Transaction) GetTimestamp() uint64

func (*Transaction) GetTo

func (x *Transaction) GetTo() string

func (*Transaction) GetValue

func (x *Transaction) GetValue() uint64

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect

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

func (*Transaction) Reset

func (x *Transaction) Reset()

func (*Transaction) String

func (x *Transaction) String() string

type TransactionsRequest

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

func (*TransactionsRequest) Descriptor deprecated

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

Deprecated: Use TransactionsRequest.ProtoReflect.Descriptor instead.

func (*TransactionsRequest) ProtoMessage

func (*TransactionsRequest) ProtoMessage()

func (*TransactionsRequest) ProtoReflect

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

func (*TransactionsRequest) Reset

func (x *TransactionsRequest) Reset()

func (*TransactionsRequest) String

func (x *TransactionsRequest) String() string

type TransactionsResponse

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

func (*TransactionsResponse) Descriptor deprecated

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

Deprecated: Use TransactionsResponse.ProtoReflect.Descriptor instead.

func (*TransactionsResponse) ProtoMessage

func (*TransactionsResponse) ProtoMessage()

func (*TransactionsResponse) ProtoReflect

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

func (*TransactionsResponse) Reset

func (x *TransactionsResponse) Reset()

func (*TransactionsResponse) String

func (x *TransactionsResponse) String() string

type UnimplementedAtomicFsServer

type UnimplementedAtomicFsServer struct {
}

UnimplementedAtomicFsServer must be embedded to have forward compatible implementations.

func (UnimplementedAtomicFsServer) GetAccount

func (UnimplementedAtomicFsServer) GetBlocks

func (UnimplementedAtomicFsServer) GetTransactions

func (UnimplementedAtomicFsServer) SubscribeToBlocks

type UnsafeAtomicFsServer

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

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

Jump to

Keyboard shortcuts

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