theopennetwork

package
v0.0.1-gowrapper-test Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WalletVersion_name = map[int32]string{
		0: "WALLET_V3_R1",
		1: "WALLET_V3_R2",
		2: "WALLET_V4_R2",
		3: "WALLET_V5_R1",
	}
	WalletVersion_value = map[string]int32{
		"WALLET_V3_R1": 0,
		"WALLET_V3_R2": 1,
		"WALLET_V4_R2": 2,
		"WALLET_V5_R1": 3,
	}
)

Enum value maps for WalletVersion.

View Source
var (
	SendMode_name = map[int32]string{
		0:   "DEFAULT",
		1:   "PAY_FEES_SEPARATELY",
		2:   "IGNORE_ACTION_PHASE_ERRORS",
		32:  "DESTROY_ON_ZERO_BALANCE",
		64:  "ATTACH_ALL_INBOUND_MESSAGE_VALUE",
		128: "ATTACH_ALL_CONTRACT_BALANCE",
	}
	SendMode_value = map[string]int32{
		"DEFAULT":                          0,
		"PAY_FEES_SEPARATELY":              1,
		"IGNORE_ACTION_PHASE_ERRORS":       2,
		"DESTROY_ON_ZERO_BALANCE":          32,
		"ATTACH_ALL_INBOUND_MESSAGE_VALUE": 64,
		"ATTACH_ALL_CONTRACT_BALANCE":      128,
	}
)

Enum value maps for SendMode.

View Source
var File_TheOpenNetwork_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type JettonTransfer

type JettonTransfer struct {

	// Arbitrary request number. Default is 0. Optional field.
	QueryId uint64 `protobuf:"varint,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"`
	// Amount of transferred jettons in elementary integer units. The real value transferred is jetton_amount multiplied by ten to the power of token decimal precision
	JettonAmount uint64 `protobuf:"varint,2,opt,name=jetton_amount,json=jettonAmount,proto3" json:"jetton_amount,omitempty"`
	// Address of the new owner of the jettons.
	ToOwner string `protobuf:"bytes,3,opt,name=to_owner,json=toOwner,proto3" json:"to_owner,omitempty"`
	// Address where to send a response with confirmation of a successful transfer and the rest of the incoming message Toncoins. Usually the sender should get back their toncoins.
	ResponseAddress string `protobuf:"bytes,4,opt,name=response_address,json=responseAddress,proto3" json:"response_address,omitempty"`
	// Amount in nanotons to forward to recipient. Basically minimum amount - 1 nanoton should be used
	ForwardAmount uint64 `protobuf:"varint,5,opt,name=forward_amount,json=forwardAmount,proto3" json:"forward_amount,omitempty"`
	// Optional raw one-cell BoC encoded in Base64.
	// Can be used in the case of mintless jetton transfers.
	CustomPayload string `protobuf:"bytes,6,opt,name=custom_payload,json=customPayload,proto3" json:"custom_payload,omitempty"`
	// contains filtered or unexported fields
}

func (*JettonTransfer) Descriptor deprecated

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

Deprecated: Use JettonTransfer.ProtoReflect.Descriptor instead.

func (*JettonTransfer) GetCustomPayload

func (x *JettonTransfer) GetCustomPayload() string

func (*JettonTransfer) GetForwardAmount

func (x *JettonTransfer) GetForwardAmount() uint64

func (*JettonTransfer) GetJettonAmount

func (x *JettonTransfer) GetJettonAmount() uint64

func (*JettonTransfer) GetQueryId

func (x *JettonTransfer) GetQueryId() uint64

func (*JettonTransfer) GetResponseAddress

func (x *JettonTransfer) GetResponseAddress() string

func (*JettonTransfer) GetToOwner

func (x *JettonTransfer) GetToOwner() string

func (*JettonTransfer) ProtoMessage

func (*JettonTransfer) ProtoMessage()

func (*JettonTransfer) ProtoReflect

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

func (*JettonTransfer) Reset

func (x *JettonTransfer) Reset()

func (*JettonTransfer) String

func (x *JettonTransfer) String() string

type SendMode

type SendMode int32
const (
	SendMode_DEFAULT                          SendMode = 0
	SendMode_PAY_FEES_SEPARATELY              SendMode = 1
	SendMode_IGNORE_ACTION_PHASE_ERRORS       SendMode = 2
	SendMode_DESTROY_ON_ZERO_BALANCE          SendMode = 32
	SendMode_ATTACH_ALL_INBOUND_MESSAGE_VALUE SendMode = 64
	SendMode_ATTACH_ALL_CONTRACT_BALANCE      SendMode = 128
)

func (SendMode) Descriptor

func (SendMode) Descriptor() protoreflect.EnumDescriptor

func (SendMode) Enum

func (x SendMode) Enum() *SendMode

func (SendMode) EnumDescriptor deprecated

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

Deprecated: Use SendMode.Descriptor instead.

func (SendMode) Number

func (x SendMode) Number() protoreflect.EnumNumber

func (SendMode) String

func (x SendMode) String() string

func (SendMode) Type

type SigningInput

type SigningInput struct {

	// The secret private key used for signing (32 bytes).
	PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	// Public key of the signer (32 bytes). Used when transaction is going to be signed externally.
	PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// Up to 4 internal messages.
	Messages []*Transfer `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"`
	// Message counter (optional, 0 by default used for the first deploy)
	// This field is required, because we need to protect the smart contract against "replay attacks"
	// Learn more: https://ton.org/docs/develop/smart-contracts/guidelines/external-messages
	SequenceNumber uint32 `protobuf:"varint,4,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"`
	// Expiration UNIX timestamp (optional, now() + 60 by default)
	ExpireAt uint32 `protobuf:"varint,5,opt,name=expire_at,json=expireAt,proto3" json:"expire_at,omitempty"`
	// Wallet version
	WalletVersion WalletVersion `` /* 144-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SigningInput) Descriptor deprecated

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

Deprecated: Use SigningInput.ProtoReflect.Descriptor instead.

func (*SigningInput) GetExpireAt

func (x *SigningInput) GetExpireAt() uint32

func (*SigningInput) GetMessages

func (x *SigningInput) GetMessages() []*Transfer

func (*SigningInput) GetPrivateKey

func (x *SigningInput) GetPrivateKey() []byte

func (*SigningInput) GetPublicKey

func (x *SigningInput) GetPublicKey() []byte

func (*SigningInput) GetSequenceNumber

func (x *SigningInput) GetSequenceNumber() uint32

func (*SigningInput) GetWalletVersion

func (x *SigningInput) GetWalletVersion() WalletVersion

func (*SigningInput) ProtoMessage

func (*SigningInput) ProtoMessage()

func (*SigningInput) ProtoReflect

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

func (*SigningInput) Reset

func (x *SigningInput) Reset()

func (*SigningInput) String

func (x *SigningInput) String() string

type SigningOutput

type SigningOutput struct {

	// Signed and base64 encoded BOC message
	Encoded string `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"`
	// Transaction Cell hash
	Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	// error code, 0 is ok, other codes will be treated as errors
	Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"`
	// error code description
	ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

Transaction signing output.

func (*SigningOutput) Descriptor deprecated

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

Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead.

func (*SigningOutput) GetEncoded

func (x *SigningOutput) GetEncoded() string

func (*SigningOutput) GetError

func (x *SigningOutput) GetError() common.SigningError

func (*SigningOutput) GetErrorMessage

func (x *SigningOutput) GetErrorMessage() string

func (*SigningOutput) GetHash

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

func (*SigningOutput) ProtoMessage

func (*SigningOutput) ProtoMessage()

func (*SigningOutput) ProtoReflect

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

func (*SigningOutput) Reset

func (x *SigningOutput) Reset()

func (*SigningOutput) String

func (x *SigningOutput) String() string

type Transfer

type Transfer struct {

	// Recipient address
	Dest string `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"`
	// Amount to send in nanotons
	Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// Send mode (optional, 0 by default)
	// Learn more: https://ton.org/docs/develop/func/stdlib#send_raw_message
	Mode uint32 `protobuf:"varint,3,opt,name=mode,proto3" json:"mode,omitempty"`
	// Transfer comment message (optional, empty by default)
	// Ignored if `custom_payload` is specified
	Comment string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"`
	// If the address is bounceable
	Bounceable bool `protobuf:"varint,5,opt,name=bounceable,proto3" json:"bounceable,omitempty"`
	// Optional raw one-cell BoC encoded in Base64.
	// Can be used to deploy a smart contract.
	StateInit string `protobuf:"bytes,6,opt,name=state_init,json=stateInit,proto3" json:"state_init,omitempty"`
	// One of the Transfer message payloads (optional).
	//
	// Types that are valid to be assigned to Payload:
	//
	//	*Transfer_JettonTransfer
	//	*Transfer_CustomPayload
	Payload isTransfer_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*Transfer) Descriptor deprecated

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

Deprecated: Use Transfer.ProtoReflect.Descriptor instead.

func (*Transfer) GetAmount

func (x *Transfer) GetAmount() uint64

func (*Transfer) GetBounceable

func (x *Transfer) GetBounceable() bool

func (*Transfer) GetComment

func (x *Transfer) GetComment() string

func (*Transfer) GetCustomPayload

func (x *Transfer) GetCustomPayload() string

func (*Transfer) GetDest

func (x *Transfer) GetDest() string

func (*Transfer) GetJettonTransfer

func (x *Transfer) GetJettonTransfer() *JettonTransfer

func (*Transfer) GetMode

func (x *Transfer) GetMode() uint32

func (*Transfer) GetPayload

func (x *Transfer) GetPayload() isTransfer_Payload

func (*Transfer) GetStateInit

func (x *Transfer) GetStateInit() string

func (*Transfer) ProtoMessage

func (*Transfer) ProtoMessage()

func (*Transfer) ProtoReflect

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

func (*Transfer) Reset

func (x *Transfer) Reset()

func (*Transfer) String

func (x *Transfer) String() string

type Transfer_CustomPayload

type Transfer_CustomPayload struct {
	// TON transfer with custom payload (contract call). Raw one-cell BoC encoded in Base64.
	CustomPayload string `protobuf:"bytes,8,opt,name=custom_payload,json=customPayload,proto3,oneof"`
}

type Transfer_JettonTransfer

type Transfer_JettonTransfer struct {
	// Jetton transfer payload.
	JettonTransfer *JettonTransfer `protobuf:"bytes,7,opt,name=jetton_transfer,json=jettonTransfer,proto3,oneof"`
}

type WalletVersion

type WalletVersion int32
const (
	WalletVersion_WALLET_V3_R1 WalletVersion = 0
	WalletVersion_WALLET_V3_R2 WalletVersion = 1
	WalletVersion_WALLET_V4_R2 WalletVersion = 2
	WalletVersion_WALLET_V5_R1 WalletVersion = 3
)

func (WalletVersion) Descriptor

func (WalletVersion) Enum

func (x WalletVersion) Enum() *WalletVersion

func (WalletVersion) EnumDescriptor deprecated

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

Deprecated: Use WalletVersion.Descriptor instead.

func (WalletVersion) Number

func (WalletVersion) String

func (x WalletVersion) String() string

func (WalletVersion) Type

Jump to

Keyboard shortcuts

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