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")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, 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
I have a generated keypair. How to import the secretKey in code? I tried passing it as a string (hex version) but didnt work

I have a generated keypair. How to import the secretKey in code? I tried passing it as a string (hex version) but didnt work

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

  
  
Posted 8 days ago
Votes Newest

Answers


Secret key should be passed as Uint8Array. nacl will give you the keys in the correct format already.

You can also do the following:
const secretKey = TonWeb.utils.hexToBytes('YOUR HEX');
const keyPair = TonWeb.utils.nacl.sign.keyPair.fromSecretKey(secretKey);

On the other side, you can check the detail here like in Jetton Example by using Tact Language
https://github.com/ton-community/tact-jetton/blob/21e198cd7c95a287509f91f806f1ed32a4252129/sources/jetton.deploy.ts#L25

1
1
Posted 8 days ago
221 Views
1 Answer
8 days ago
8 days ago
Tags