Documentation
      ¶
    
    
  
    
  
    Index ¶
- type TONChain
 - func (c *TONChain) BuildJettonTransferMessage(dest string, amount uint64, jettonAmount uint64, toOwner string, ...) *theopennetwork.Transfer
 - func (c *TONChain) BuildJettonTransferSigningInput(input *TONJettonTransferInput) (*theopennetwork.SigningInput, error)
 - func (c *TONChain) BuildNativeTransferSigningInput(input *TONTransferInput) (*theopennetwork.SigningInput, error)
 - func (c *TONChain) BuildSigningInput(privateKey []byte, messages []*theopennetwork.Transfer, sequenceNumber uint32, ...) (*theopennetwork.SigningInput, error)
 - func (c *TONChain) BuildTransferMessage(dest string, amount uint64, mode uint32, comment string, bounceable bool) *theopennetwork.Transfer
 - func (c *TONChain) CompileTransaction(txInput *chain_abstraction.TransactionInput, signatures [][]byte, ...) ([]byte, error)
 - func (c *TONChain) CreateAndSignTransaction(input interface{}, privateKey []byte) ([]byte, error)
 - func (c *TONChain) GetDefaultSendMode() uint32
 - func (c *TONChain) GetDefaultWalletVersion() theopennetwork.WalletVersion
 - func (c *TONChain) GetPreimageHash(txInput *chain_abstraction.TransactionInput) ([]byte, []byte, error)
 - func (c *TONChain) GetPublicKeyFromPrivateKey(privateKey []byte) ([]byte, error)
 - func (c *TONChain) GetTransactionHash(encodedTx []byte) (string, error)
 - func (c *TONChain) PrepareTransaction(input interface{}) (*chain_abstraction.TransactionInput, error)
 - func (c *TONChain) Sign(data []byte, privateKey []byte) ([]byte, error)
 - func (c *TONChain) ValidateTransactionInput(input interface{}) error
 
- type TONJettonTransferInput
 - type TONTransferInput
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TONChain ¶
type TONChain struct {
	*chain_abstraction.BaseChain
}
    TONChain implements the Chain interface for TON (The Open Network) blockchain
func (*TONChain) BuildJettonTransferMessage ¶
func (c *TONChain) BuildJettonTransferMessage( dest string, amount uint64, jettonAmount uint64, toOwner string, responseAddress string, forwardAmount uint64, ) *theopennetwork.Transfer
BuildJettonTransferMessage creates a TON Jetton transfer message
func (*TONChain) BuildJettonTransferSigningInput ¶
func (c *TONChain) BuildJettonTransferSigningInput(input *TONJettonTransferInput) (*theopennetwork.SigningInput, error)
BuildJettonTransferSigningInput creates a signing input for Jetton transfer using struct
func (*TONChain) BuildNativeTransferSigningInput ¶
func (c *TONChain) BuildNativeTransferSigningInput(input *TONTransferInput) (*theopennetwork.SigningInput, error)
BuildNativeTransferSigningInput creates a signing input for native TON transfer using struct
func (*TONChain) BuildSigningInput ¶
func (c *TONChain) BuildSigningInput( privateKey []byte, messages []*theopennetwork.Transfer, sequenceNumber uint32, expireAt uint32, walletVersion theopennetwork.WalletVersion, ) (*theopennetwork.SigningInput, error)
BuildSigningInput creates a TON signing input from parameters
func (*TONChain) BuildTransferMessage ¶
func (c *TONChain) BuildTransferMessage( dest string, amount uint64, mode uint32, comment string, bounceable bool, ) *theopennetwork.Transfer
BuildTransferMessage creates a TON transfer message
func (*TONChain) CompileTransaction ¶
func (c *TONChain) CompileTransaction(txInput *chain_abstraction.TransactionInput, signatures [][]byte, publicKeys [][]byte) ([]byte, error)
CompileTransaction compiles a transaction with external signatures
func (*TONChain) CreateAndSignTransaction ¶
CreateAndSignTransaction creates and signs a transaction directly
func (*TONChain) GetDefaultSendMode ¶
GetDefaultSendMode returns the default send mode for TON transfers
func (*TONChain) GetDefaultWalletVersion ¶
func (c *TONChain) GetDefaultWalletVersion() theopennetwork.WalletVersion
GetDefaultWalletVersion returns the default wallet version for TON
func (*TONChain) GetPreimageHash ¶
func (c *TONChain) GetPreimageHash(txInput *chain_abstraction.TransactionInput) ([]byte, []byte, error)
GetPreimageHash gets the preimage hash for external signing
func (*TONChain) GetPublicKeyFromPrivateKey ¶
GetPublicKeyFromPrivateKey derives public key from private key
func (*TONChain) GetTransactionHash ¶
GetTransactionHash gets the transaction hash from encoded transaction
func (*TONChain) PrepareTransaction ¶
func (c *TONChain) PrepareTransaction(input interface{}) (*chain_abstraction.TransactionInput, error)
PrepareTransaction prepares a transaction for external signing
func (*TONChain) ValidateTransactionInput ¶
ValidateTransactionInput validates TON transaction input
type TONJettonTransferInput ¶
type TONJettonTransferInput struct {
	PrivateKey      []byte
	Dest            string
	Amount          uint64 // TON amount for fees in nanotons
	JettonAmount    uint64 // Jetton token amount
	ToOwner         string
	ResponseAddress string
	ForwardAmount   uint64 // TON amount to forward in nanotons
	SequenceNumber  uint32
	ExpireAt        uint32
	WalletVersion   theopennetwork.WalletVersion
}
    TONJettonTransferInput represents input parameters for a Jetton transfer
type TONTransferInput ¶
type TONTransferInput struct {
	PrivateKey     []byte
	Dest           string
	Amount         uint64 // in nanotons
	Comment        string
	Bounceable     bool
	SequenceNumber uint32
	ExpireAt       uint32
	WalletVersion  theopennetwork.WalletVersion
}
    TONTransferInput represents input parameters for a native TON transfer