Documentation ¶
Index ¶
- Constants
- Variables
- func AddressFromPubKey(key ed25519.PublicKey, ver Version, subwallet uint32) (*address.Address, error)
- func CreateCommentCell(text string) (*cell.Cell, error)
- func GetStateInit(pubKey ed25519.PublicKey, ver Version, subWallet uint32) (*tlb.StateInit, error)
- func NewSeed() []string
- func NewSeedWithPassword(password string) []string
- type Message
- type RegularBuilder
- type SpecHighloadV2R2
- type SpecRegular
- type SpecV3
- type SpecV4R2
- type TonAPI
- type Version
- type Wallet
- func (w *Wallet) Address() *address.Address
- func (w *Wallet) BuildMessageForMany(ctx context.Context, messages []*Message) (*tlb.ExternalMessage, error)
- func (w *Wallet) DeployContract(ctx context.Context, amount tlb.Coins, ...) (*address.Address, error)
- func (w *Wallet) FindTransactionByInMsgHash(ctx context.Context, msgHash []byte, maxTxNumToScan ...int) (*tlb.Transaction, error)
- func (w *Wallet) GetBalance(ctx context.Context, block *ton.BlockIDExt) (tlb.Coins, error)
- func (w *Wallet) GetSpec() any
- func (w *Wallet) GetSubwallet(subwallet uint32) (*Wallet, error)
- func (w *Wallet) PrivateKey() ed25519.PrivateKey
- func (w *Wallet) Send(ctx context.Context, message *Message, waitConfirmation ...bool) error
- func (w *Wallet) SendMany(ctx context.Context, messages []*Message, waitConfirmation ...bool) error
- func (w *Wallet) SendManyGetInMsgHash(ctx context.Context, messages []*Message, waitConfirmation ...bool) ([]byte, error)
- func (w *Wallet) SendManyWaitTxHash(ctx context.Context, messages []*Message) ([]byte, error)
- func (w *Wallet) Transfer(ctx context.Context, to *address.Address, amount tlb.Coins, comment string, ...) error
- func (w *Wallet) TransferNoBounce(ctx context.Context, to *address.Address, amount tlb.Coins, comment string, ...) error
Constants ¶
View Source
const DefaultSubwallet = 698983191
Variables ¶
Functions ¶
func AddressFromPubKey ¶
func GetStateInit ¶
func NewSeedWithPassword ¶
Types ¶
type Message ¶
type Message struct { Mode uint8 InternalMessage *tlb.InternalMessage }
type RegularBuilder ¶
type SpecHighloadV2R2 ¶
type SpecHighloadV2R2 struct {
SpecRegular
}
func (*SpecHighloadV2R2) BuildMessage ¶
type SpecRegular ¶
type SpecRegular struct {
// contains filtered or unexported fields
}
func (*SpecRegular) SetMessagesTTL ¶
func (s *SpecRegular) SetMessagesTTL(ttl uint32)
type SpecV3 ¶
type SpecV3 struct {
SpecRegular
}
type SpecV4R2 ¶
type SpecV4R2 struct {
SpecRegular
}
type TonAPI ¶
type TonAPI interface { Client() ton.LiteClient CurrentMasterchainInfo(ctx context.Context) (*ton.BlockIDExt, error) GetAccount(ctx context.Context, block *ton.BlockIDExt, addr *address.Address) (*tlb.Account, error) SendExternalMessage(ctx context.Context, msg *tlb.ExternalMessage) error RunGetMethod(ctx context.Context, blockInfo *ton.BlockIDExt, addr *address.Address, method string, params ...interface{}) (*ton.ExecutionResult, error) ListTransactions(ctx context.Context, addr *address.Address, num uint32, lt uint64, txHash []byte) ([]*tlb.Transaction, error) WaitNextMasterBlock(ctx context.Context, master *ton.BlockIDExt) (*ton.BlockIDExt, error) }
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func FromPrivateKey ¶
func FromSeedWithPassword ¶
func (*Wallet) BuildMessageForMany ¶
func (*Wallet) DeployContract ¶
func (*Wallet) FindTransactionByInMsgHash ¶
func (w *Wallet) FindTransactionByInMsgHash(ctx context.Context, msgHash []byte, maxTxNumToScan ...int) (*tlb.Transaction, error)
FindTransactionByInMsgHash returns transaction in wallet account with incoming message hash equal to msgHash.
func (*Wallet) GetBalance ¶
func (*Wallet) PrivateKey ¶
func (w *Wallet) PrivateKey() ed25519.PrivateKey
func (*Wallet) SendManyGetInMsgHash ¶
func (w *Wallet) SendManyGetInMsgHash(ctx context.Context, messages []*Message, waitConfirmation ...bool) ([]byte, error)
SendManyGetInMsgHash returns hash of external incoming message payload.
func (*Wallet) SendManyWaitTxHash ¶
SendManyWaitTxHash always waits for tx block confirmation and returns found tx hash in block.
func (*Wallet) Transfer ¶
func (w *Wallet) Transfer(ctx context.Context, to *address.Address, amount tlb.Coins, comment string, waitConfirmation ...bool) error
Transfer - safe transfer, in case of error on smart contract side, you will get coins back, cannot be used to transfer TON to not yet initialized contract/wallet
Click to show internal directories.
Click to hide internal directories.