Код: Выделить всё
message = utf8_encode("ton-proof-item-v2/") ++
Address ++
AppDomain ++
Timestamp ++
Payload
signature = Ed25519Sign(privkey, sha256(0xffff ++ utf8_encode("ton-connect") ++ sha256(message)))
< /code>
где: < /p>
[list]
[*]Address< /code> - это адрес кошелька, кодируемый как последовательность:
workchain
[*]
Код: Выделить всё
hash
[/list]
[*]
Код: Выделить всё
AppDomain< /code> is ins ++ ondeddomainname
[list]
Length
[*]
Код: Выделить всё
EncodedDomainName
[/list]
[*]
Код: Выделить всё
Timestamp
[*]
Код: Выделить всё
Payload
Я делаю это:
$pubKey = "05264d80c7ad5a953cf56cdecf68ec******";
$address = "0:312ed56825e7455a7948c34677e418e6c371d263c0fd7*****";
$payload = "d0143e296879ed8f0000000064e328d8d751ea7c3c44827c8b6fcd5c83efcbfa";
$domainLengthBytes = 21;
$domainValue = "ton-connect.github.io";
$timestamp = 1692608455;
$message = utf8_encode("ton-proof-item-v2/").$address.$domainLengthBytes.$domainValue.$timestamp.$payload;
$signature = sodium_crypto_sign_detached($message,$pubKey);
print_r($message);
< /code>
Но я не понимаю. Как я могу сделать это в php?
Подробнее здесь: https://stackoverflow.com/questions/769 ... oof-in-php