Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
How can I transfer TON in PHP?

How can I transfer TON in PHP?


This question was imported from Telegram Chat: https://t.me/tondev_eng/8808

  
  
Posted 11 months ago
Votes Newest

Answers


I believe that other TVM projects use PHP heavily, but TON does not. There are PHP community extensions that are available for you to use, but they are still in development:

https://github.com/olifanton/ton

It will allow you to interact with wallets:

https://github.com/olifanton/ton/blob/main/src/Olifanton/Ton/Contracts/Wallets/V4/WalletV4.php

For example, where variable $kp is the keypair and variable $transport is a structure defined by the SDK that essentially acts as a provider:

global $kp, $transport;

$wallet = new WalletV3R1(
    new WalletV3Options(
        $kp->publicKey,
    )
);

$extMsg = $wallet->createTransferMessage(
    new TransferMessageOptions(
        dest: new Address("EQBYivdc0GAk-nnczaMnYNuSjpeXu2nJS3DZ4KqLjosX5sVC"),
        amount: Units::toNano("0.01"),
        seqno: (int)$wallet->seqno($transport),
        payload: "Hello world!",
        sendMode: SendMode::IGNORE_ERRORS->combine(SendMode::PAY_GAS_SEPARATELY)
    )
);

$transport->sendMessage($extMsg, $kp->secretKey);
  
  
Posted 11 months ago
Jeremy
384 × 5 Administrator
8K Views
1 Answer
11 months ago
11 months ago
Tags