ton

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TON_GetMasterchainInfo_FullMethodName = "/loop.ton.TON/GetMasterchainInfo"
	TON_GetBlockData_FullMethodName       = "/loop.ton.TON/GetBlockData"
	TON_GetAccountBalance_FullMethodName  = "/loop.ton.TON/GetAccountBalance"
	TON_SendTx_FullMethodName             = "/loop.ton.TON/SendTx"
	TON_GetTxStatus_FullMethodName        = "/loop.ton.TON/GetTxStatus"
	TON_GetTxExecutionFees_FullMethodName = "/loop.ton.TON/GetTxExecutionFees"
	TON_HasFilter_FullMethodName          = "/loop.ton.TON/HasFilter"
	TON_RegisterFilter_FullMethodName     = "/loop.ton.TON/RegisterFilter"
	TON_UnregisterFilter_FullMethodName   = "/loop.ton.TON/UnregisterFilter"
)

Variables

View Source
var (
	TransactionStatus_name = map[int32]string{
		0: "TRANSACTION_STATUS_UNKNOWN",
		1: "TRANSACTION_STATUS_PENDING",
		2: "TRANSACTION_STATUS_FINALIZED",
		3: "TRANSACTION_STATUS_FAILED",
	}
	TransactionStatus_value = map[string]int32{
		"TRANSACTION_STATUS_UNKNOWN":   0,
		"TRANSACTION_STATUS_PENDING":   1,
		"TRANSACTION_STATUS_FINALIZED": 2,
		"TRANSACTION_STATUS_FAILED":    3,
	}
)

Enum value maps for TransactionStatus.

View Source
var TON_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "loop.ton.TON",
	HandlerType: (*TONServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetMasterchainInfo",
			Handler:    _TON_GetMasterchainInfo_Handler,
		},
		{
			MethodName: "GetBlockData",
			Handler:    _TON_GetBlockData_Handler,
		},
		{
			MethodName: "GetAccountBalance",
			Handler:    _TON_GetAccountBalance_Handler,
		},
		{
			MethodName: "SendTx",
			Handler:    _TON_SendTx_Handler,
		},
		{
			MethodName: "GetTxStatus",
			Handler:    _TON_GetTxStatus_Handler,
		},
		{
			MethodName: "GetTxExecutionFees",
			Handler:    _TON_GetTxExecutionFees_Handler,
		},
		{
			MethodName: "HasFilter",
			Handler:    _TON_HasFilter_Handler,
		},
		{
			MethodName: "RegisterFilter",
			Handler:    _TON_RegisterFilter_Handler,
		},
		{
			MethodName: "UnregisterFilter",
			Handler:    _TON_UnregisterFilter_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ton.proto",
}

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

Functions

func RegisterTONServer

func RegisterTONServer(s grpc.ServiceRegistrar, srv TONServer)

Types

type Balance

type Balance struct {
	Balance *pb.BigInt `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func NewBalance

func NewBalance(balance *types.Balance) *Balance

func (*Balance) AsBalance

func (pb *Balance) AsBalance() *types.Balance

func (*Balance) Descriptor deprecated

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

Deprecated: Use Balance.ProtoReflect.Descriptor instead.

func (*Balance) GetBalance

func (x *Balance) GetBalance() *pb.BigInt

func (*Balance) ProtoMessage

func (*Balance) ProtoMessage()

func (*Balance) ProtoReflect

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

func (*Balance) Reset

func (x *Balance) Reset()

func (*Balance) String

func (x *Balance) String() string

type Block

type Block struct {
	GlobalId int32 `protobuf:"varint,1,opt,name=global_id,json=globalId,proto3" json:"global_id,omitempty"`
	// contains filtered or unexported fields
}

func NewBlock

func NewBlock(block *types.Block) *Block

func (*Block) AsBlock

func (pb *Block) AsBlock() *types.Block

func (*Block) Descriptor deprecated

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

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetGlobalId

func (x *Block) GetGlobalId() int32

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 BlockIDExt

type BlockIDExt struct {
	Workchain int32  `protobuf:"varint,1,opt,name=workchain,proto3" json:"workchain,omitempty"`
	Shard     int64  `protobuf:"varint,2,opt,name=shard,proto3" json:"shard,omitempty"`
	SeqNo     uint32 `protobuf:"varint,3,opt,name=seq_no,json=seqNo,proto3" json:"seq_no,omitempty"`
	// contains filtered or unexported fields
}

func NewBlockIDExt

func NewBlockIDExt(block *types.BlockIDExt) *BlockIDExt

func (*BlockIDExt) AsBlockIDExt

func (pb *BlockIDExt) AsBlockIDExt() *types.BlockIDExt

func (*BlockIDExt) Descriptor deprecated

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

Deprecated: Use BlockIDExt.ProtoReflect.Descriptor instead.

func (*BlockIDExt) GetSeqNo

func (x *BlockIDExt) GetSeqNo() uint32

func (*BlockIDExt) GetShard

func (x *BlockIDExt) GetShard() int64

func (*BlockIDExt) GetWorkchain

func (x *BlockIDExt) GetWorkchain() int32

func (*BlockIDExt) ProtoMessage

func (*BlockIDExt) ProtoMessage()

func (*BlockIDExt) ProtoReflect

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

func (*BlockIDExt) Reset

func (x *BlockIDExt) Reset()

func (*BlockIDExt) String

func (x *BlockIDExt) String() string

type GetAccountBalanceRequest

type GetAccountBalanceRequest struct {
	Address string      `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Block   *BlockIDExt `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccountBalanceRequest) Descriptor deprecated

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

Deprecated: Use GetAccountBalanceRequest.ProtoReflect.Descriptor instead.

func (*GetAccountBalanceRequest) GetAddress

func (x *GetAccountBalanceRequest) GetAddress() string

func (*GetAccountBalanceRequest) GetBlock

func (x *GetAccountBalanceRequest) GetBlock() *BlockIDExt

func (*GetAccountBalanceRequest) ProtoMessage

func (*GetAccountBalanceRequest) ProtoMessage()

func (*GetAccountBalanceRequest) ProtoReflect

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

func (*GetAccountBalanceRequest) Reset

func (x *GetAccountBalanceRequest) Reset()

func (*GetAccountBalanceRequest) String

func (x *GetAccountBalanceRequest) String() string

type GetBlockDataRequest

type GetBlockDataRequest struct {
	Block *BlockIDExt `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBlockDataRequest) Descriptor deprecated

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

Deprecated: Use GetBlockDataRequest.ProtoReflect.Descriptor instead.

func (*GetBlockDataRequest) GetBlock

func (x *GetBlockDataRequest) GetBlock() *BlockIDExt

func (*GetBlockDataRequest) ProtoMessage

func (*GetBlockDataRequest) ProtoMessage()

func (*GetBlockDataRequest) ProtoReflect

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

func (*GetBlockDataRequest) Reset

func (x *GetBlockDataRequest) Reset()

func (*GetBlockDataRequest) String

func (x *GetBlockDataRequest) String() string

type GetTxExecutionFeesReply

type GetTxExecutionFeesReply struct {
	TotalFees *pb.BigInt `protobuf:"bytes,1,opt,name=total_fees,json=totalFees,proto3" json:"total_fees,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTxExecutionFeesReply) Descriptor deprecated

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

Deprecated: Use GetTxExecutionFeesReply.ProtoReflect.Descriptor instead.

func (*GetTxExecutionFeesReply) GetTotalFees

func (x *GetTxExecutionFeesReply) GetTotalFees() *pb.BigInt

func (*GetTxExecutionFeesReply) ProtoMessage

func (*GetTxExecutionFeesReply) ProtoMessage()

func (*GetTxExecutionFeesReply) ProtoReflect

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

func (*GetTxExecutionFeesReply) Reset

func (x *GetTxExecutionFeesReply) Reset()

func (*GetTxExecutionFeesReply) String

func (x *GetTxExecutionFeesReply) String() string

type GetTxExecutionFeesRequest

type GetTxExecutionFeesRequest struct {
	LogicalTime uint64 `protobuf:"varint,1,opt,name=logical_time,json=logicalTime,proto3" json:"logical_time,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTxExecutionFeesRequest) Descriptor deprecated

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

Deprecated: Use GetTxExecutionFeesRequest.ProtoReflect.Descriptor instead.

func (*GetTxExecutionFeesRequest) GetLogicalTime

func (x *GetTxExecutionFeesRequest) GetLogicalTime() uint64

func (*GetTxExecutionFeesRequest) ProtoMessage

func (*GetTxExecutionFeesRequest) ProtoMessage()

func (*GetTxExecutionFeesRequest) ProtoReflect

func (*GetTxExecutionFeesRequest) Reset

func (x *GetTxExecutionFeesRequest) Reset()

func (*GetTxExecutionFeesRequest) String

func (x *GetTxExecutionFeesRequest) String() string

type GetTxStatusReply

type GetTxStatusReply struct {
	Status   TransactionStatus `protobuf:"varint,1,opt,name=status,proto3,enum=loop.ton.TransactionStatus" json:"status,omitempty"`
	ExitCode *int32            `protobuf:"varint,2,opt,name=exit_code,json=exitCode,proto3,oneof" json:"exit_code,omitempty"` // Optional smart contract exit code
	// contains filtered or unexported fields
}

func (*GetTxStatusReply) Descriptor deprecated

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

Deprecated: Use GetTxStatusReply.ProtoReflect.Descriptor instead.

func (*GetTxStatusReply) GetExitCode

func (x *GetTxStatusReply) GetExitCode() int32

func (*GetTxStatusReply) GetStatus

func (x *GetTxStatusReply) GetStatus() TransactionStatus

func (*GetTxStatusReply) ProtoMessage

func (*GetTxStatusReply) ProtoMessage()

func (*GetTxStatusReply) ProtoReflect

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

func (*GetTxStatusReply) Reset

func (x *GetTxStatusReply) Reset()

func (*GetTxStatusReply) String

func (x *GetTxStatusReply) String() string

type GetTxStatusRequest

type GetTxStatusRequest struct {
	LogicalTime uint64 `protobuf:"varint,1,opt,name=logical_time,json=logicalTime,proto3" json:"logical_time,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTxStatusRequest) Descriptor deprecated

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

Deprecated: Use GetTxStatusRequest.ProtoReflect.Descriptor instead.

func (*GetTxStatusRequest) GetLogicalTime

func (x *GetTxStatusRequest) GetLogicalTime() uint64

func (*GetTxStatusRequest) ProtoMessage

func (*GetTxStatusRequest) ProtoMessage()

func (*GetTxStatusRequest) ProtoReflect

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

func (*GetTxStatusRequest) Reset

func (x *GetTxStatusRequest) Reset()

func (*GetTxStatusRequest) String

func (x *GetTxStatusRequest) String() string

type HasFilterReply

type HasFilterReply struct {
	Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
	// contains filtered or unexported fields
}

func (*HasFilterReply) Descriptor deprecated

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

Deprecated: Use HasFilterReply.ProtoReflect.Descriptor instead.

func (*HasFilterReply) GetExists

func (x *HasFilterReply) GetExists() bool

func (*HasFilterReply) ProtoMessage

func (*HasFilterReply) ProtoMessage()

func (*HasFilterReply) ProtoReflect

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

func (*HasFilterReply) Reset

func (x *HasFilterReply) Reset()

func (*HasFilterReply) String

func (x *HasFilterReply) String() string

type HasFilterRequest

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

func (*HasFilterRequest) Descriptor deprecated

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

Deprecated: Use HasFilterRequest.ProtoReflect.Descriptor instead.

func (*HasFilterRequest) GetName

func (x *HasFilterRequest) GetName() string

func (*HasFilterRequest) ProtoMessage

func (*HasFilterRequest) ProtoMessage()

func (*HasFilterRequest) ProtoReflect

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

func (*HasFilterRequest) Reset

func (x *HasFilterRequest) Reset()

func (*HasFilterRequest) String

func (x *HasFilterRequest) String() string

type LPFilterQuery

type LPFilterQuery struct {
	Id            int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name          string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Address       string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	EventName     string `protobuf:"bytes,4,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"`
	EventTopic    uint64 `protobuf:"varint,5,opt,name=event_topic,json=eventTopic,proto3" json:"event_topic,omitempty"`
	StartingSeq   uint32 `protobuf:"varint,6,opt,name=starting_seq,json=startingSeq,proto3" json:"starting_seq,omitempty"`
	RetentionSecs int64  `protobuf:"varint,7,opt,name=retention_secs,json=retentionSecs,proto3" json:"retention_secs,omitempty"`
	// contains filtered or unexported fields
}

func NewLPFilter

func NewLPFilter(f types.LPFilterQuery) *LPFilterQuery

func (*LPFilterQuery) AsLPFilter

func (pb *LPFilterQuery) AsLPFilter() types.LPFilterQuery

func (*LPFilterQuery) Descriptor deprecated

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

Deprecated: Use LPFilterQuery.ProtoReflect.Descriptor instead.

func (*LPFilterQuery) GetAddress

func (x *LPFilterQuery) GetAddress() string

func (*LPFilterQuery) GetEventName

func (x *LPFilterQuery) GetEventName() string

func (*LPFilterQuery) GetEventTopic

func (x *LPFilterQuery) GetEventTopic() uint64

func (*LPFilterQuery) GetId

func (x *LPFilterQuery) GetId() int64

func (*LPFilterQuery) GetName

func (x *LPFilterQuery) GetName() string

func (*LPFilterQuery) GetRetentionSecs

func (x *LPFilterQuery) GetRetentionSecs() int64

func (*LPFilterQuery) GetStartingSeq

func (x *LPFilterQuery) GetStartingSeq() uint32

func (*LPFilterQuery) ProtoMessage

func (*LPFilterQuery) ProtoMessage()

func (*LPFilterQuery) ProtoReflect

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

func (*LPFilterQuery) Reset

func (x *LPFilterQuery) Reset()

func (*LPFilterQuery) String

func (x *LPFilterQuery) String() string

type Log

type Log struct {
	Id         int64                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	FilterId   int64                  `protobuf:"varint,2,opt,name=filter_id,json=filterId,proto3" json:"filter_id,omitempty"`
	SeqNo      uint32                 `protobuf:"varint,3,opt,name=seq_no,json=seqNo,proto3" json:"seq_no,omitempty"`
	Address    string                 `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
	EventTopic uint64                 `protobuf:"varint,5,opt,name=event_topic,json=eventTopic,proto3" json:"event_topic,omitempty"`
	Data       []byte                 `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
	ReceivedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"`
	ExpiresAt  *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"`
	Error      *string                `protobuf:"bytes,9,opt,name=error,proto3,oneof" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*Log) Descriptor deprecated

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

Deprecated: Use Log.ProtoReflect.Descriptor instead.

func (*Log) GetAddress

func (x *Log) GetAddress() string

func (*Log) GetData

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

func (*Log) GetError

func (x *Log) GetError() string

func (*Log) GetEventTopic

func (x *Log) GetEventTopic() uint64

func (*Log) GetExpiresAt

func (x *Log) GetExpiresAt() *timestamppb.Timestamp

func (*Log) GetFilterId

func (x *Log) GetFilterId() int64

func (*Log) GetId

func (x *Log) GetId() int64

func (*Log) GetReceivedAt

func (x *Log) GetReceivedAt() *timestamppb.Timestamp

func (*Log) GetSeqNo

func (x *Log) GetSeqNo() uint32

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) ProtoReflect

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

func (*Log) Reset

func (x *Log) Reset()

func (*Log) String

func (x *Log) String() string

type Message

type Message struct {
	Mode      uint32 `protobuf:"varint,1,opt,name=mode,proto3" json:"mode,omitempty"`
	ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
	Amount    string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
	Bounce    bool   `protobuf:"varint,4,opt,name=bounce,proto3" json:"bounce,omitempty"`
	Body      []byte `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`                                  // BOC
	StateInit []byte `protobuf:"bytes,6,opt,name=state_init,json=stateInit,proto3,oneof" json:"state_init,omitempty"` // optional BOC
	// contains filtered or unexported fields
}

func NewMessage

func NewMessage(msg *types.Message) *Message

func (*Message) AsMessage

func (pb *Message) AsMessage() *types.Message

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetAmount

func (x *Message) GetAmount() string

func (*Message) GetBody

func (x *Message) GetBody() []byte

func (*Message) GetBounce

func (x *Message) GetBounce() bool

func (*Message) GetMode

func (x *Message) GetMode() uint32

func (*Message) GetStateInit

func (x *Message) GetStateInit() []byte

func (*Message) GetToAddress

func (x *Message) GetToAddress() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type RegisterFilterRequest

type RegisterFilterRequest struct {
	Filter *LPFilterQuery `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterFilterRequest) Descriptor deprecated

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

Deprecated: Use RegisterFilterRequest.ProtoReflect.Descriptor instead.

func (*RegisterFilterRequest) GetFilter

func (x *RegisterFilterRequest) GetFilter() *LPFilterQuery

func (*RegisterFilterRequest) ProtoMessage

func (*RegisterFilterRequest) ProtoMessage()

func (*RegisterFilterRequest) ProtoReflect

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

func (*RegisterFilterRequest) Reset

func (x *RegisterFilterRequest) Reset()

func (*RegisterFilterRequest) String

func (x *RegisterFilterRequest) String() string

type SendTxRequest

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

func (*SendTxRequest) Descriptor deprecated

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

Deprecated: Use SendTxRequest.ProtoReflect.Descriptor instead.

func (*SendTxRequest) GetMessage

func (x *SendTxRequest) GetMessage() *Message

func (*SendTxRequest) ProtoMessage

func (*SendTxRequest) ProtoMessage()

func (*SendTxRequest) ProtoReflect

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

func (*SendTxRequest) Reset

func (x *SendTxRequest) Reset()

func (*SendTxRequest) String

func (x *SendTxRequest) String() string

type TONClient

type TONClient interface {
	// LiteClient
	GetMasterchainInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BlockIDExt, error)
	GetBlockData(ctx context.Context, in *GetBlockDataRequest, opts ...grpc.CallOption) (*Block, error)
	GetAccountBalance(ctx context.Context, in *GetAccountBalanceRequest, opts ...grpc.CallOption) (*Balance, error)
	// Transaction Management (TXM)
	SendTx(ctx context.Context, in *SendTxRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetTxStatus(ctx context.Context, in *GetTxStatusRequest, opts ...grpc.CallOption) (*GetTxStatusReply, error)
	GetTxExecutionFees(ctx context.Context, in *GetTxExecutionFeesRequest, opts ...grpc.CallOption) (*GetTxExecutionFeesReply, error)
	// Log Poller
	HasFilter(ctx context.Context, in *HasFilterRequest, opts ...grpc.CallOption) (*HasFilterReply, error)
	RegisterFilter(ctx context.Context, in *RegisterFilterRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UnregisterFilter(ctx context.Context, in *UnregisterFilterRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

TONClient is the client API for TON 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.

Main TON service

func NewTONClient

func NewTONClient(cc grpc.ClientConnInterface) TONClient

type TONServer

type TONServer interface {
	// LiteClient
	GetMasterchainInfo(context.Context, *emptypb.Empty) (*BlockIDExt, error)
	GetBlockData(context.Context, *GetBlockDataRequest) (*Block, error)
	GetAccountBalance(context.Context, *GetAccountBalanceRequest) (*Balance, error)
	// Transaction Management (TXM)
	SendTx(context.Context, *SendTxRequest) (*emptypb.Empty, error)
	GetTxStatus(context.Context, *GetTxStatusRequest) (*GetTxStatusReply, error)
	GetTxExecutionFees(context.Context, *GetTxExecutionFeesRequest) (*GetTxExecutionFeesReply, error)
	// Log Poller
	HasFilter(context.Context, *HasFilterRequest) (*HasFilterReply, error)
	RegisterFilter(context.Context, *RegisterFilterRequest) (*emptypb.Empty, error)
	UnregisterFilter(context.Context, *UnregisterFilterRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

TONServer is the server API for TON service. All implementations must embed UnimplementedTONServer for forward compatibility.

Main TON service

type TransactionStatus

type TransactionStatus int32
const (
	TransactionStatus_TRANSACTION_STATUS_UNKNOWN   TransactionStatus = 0
	TransactionStatus_TRANSACTION_STATUS_PENDING   TransactionStatus = 1
	TransactionStatus_TRANSACTION_STATUS_FINALIZED TransactionStatus = 2
	TransactionStatus_TRANSACTION_STATUS_FAILED    TransactionStatus = 3
)

func (TransactionStatus) Descriptor

func (TransactionStatus) Enum

func (TransactionStatus) EnumDescriptor deprecated

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

Deprecated: Use TransactionStatus.Descriptor instead.

func (TransactionStatus) Number

func (TransactionStatus) String

func (x TransactionStatus) String() string

func (TransactionStatus) Type

type UnimplementedTONServer

type UnimplementedTONServer struct{}

UnimplementedTONServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedTONServer) GetAccountBalance

func (UnimplementedTONServer) GetBlockData

func (UnimplementedTONServer) GetMasterchainInfo

func (UnimplementedTONServer) GetTxStatus

func (UnimplementedTONServer) HasFilter

func (UnimplementedTONServer) RegisterFilter

func (UnimplementedTONServer) SendTx

func (UnimplementedTONServer) UnregisterFilter

type UnregisterFilterRequest

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

func (*UnregisterFilterRequest) Descriptor deprecated

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

Deprecated: Use UnregisterFilterRequest.ProtoReflect.Descriptor instead.

func (*UnregisterFilterRequest) GetName

func (x *UnregisterFilterRequest) GetName() string

func (*UnregisterFilterRequest) ProtoMessage

func (*UnregisterFilterRequest) ProtoMessage()

func (*UnregisterFilterRequest) ProtoReflect

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

func (*UnregisterFilterRequest) Reset

func (x *UnregisterFilterRequest) Reset()

func (*UnregisterFilterRequest) String

func (x *UnregisterFilterRequest) String() string

type UnsafeTONServer

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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