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
Back to post

Revisions 3

6 months ago
`check_signature` & `check_data_signature` usage for Signing?
`check_signature` & `check_data_signature` usage for Signing?
You can sign a Cell with `ton-crypto` or ton-core, and later verify it using `check_signature` or `check_data_signature` from `stdlib.fc` in FunC. Here's an approximate code snippet that you should review: ```plaintext sign(yourCell.hash(), keypair.secretKey); ## And in the FunC contract, check like this: check_signature(cell_hash(your_cell), signature, public_key) ``` For more details, you can refer to the [TON documentation on signature checks](https://docs.ton.org/develop/func/stdlib#signature-checks). On the other hand, in Tact language, we also has the same feature in the Smart Contract side like this: ``` external(msg: ExtMessage) { let hash: Int = beginCell().storeUint(msg.seqno, 32).storeUint(msg.valid_until, 32).storeRef(msg.message_parameters.toCell()).endCell().hash(); require(checkSignature(hash, msg.signature, self.publicKey), "Invalid Signature"); // 😃😃😃 We checek the hash here require(msg.seqno == self.seqno, "Invalid Seqno"); require(now() <= msg.valid_until, "Invalid Time"); acceptMessage(); self.seqno = self.seqno + 1; send(msg.message_parameters); } ``` - https://docs.tact-lang.org/language/ref/math#checksignature
You can sign a Cell with `ton-crypto` or ton-core, and later verify it using `check_signature` or `check_data_signature` from `stdlib.fc` in FunC. Here's an approximate code snippet that you should review: ```plaintext sign(yourCell.hash(), keypair.secretKey); ## And in the FunC contract, check like this: check_signature(cell_hash(your_cell), signature, public_key) ``` For more details, you can refer to the [TON documentation on signature checks](https://docs.ton.org/develop/func/stdlib#signature-checks). On the other hand, in Tact language, we also has the same feature in the Smart Contract side like this: ``` external(msg: ExtMessage) { let hash: Int = beginCell().storeUint(msg.seqno, 32).storeUint(msg.valid_until, 32).storeRef(msg.message_parameters.toCell()).endCell().hash(); require(checkSignature(hash, msg.signature, self.publicKey), "Invalid Signature"); // 😃😃😃 We checek the hash here require(msg.seqno == self.seqno, "Invalid Seqno"); require(now() <= msg.valid_until, "Invalid Time"); acceptMessage(); self.seqno = self.seqno + 1; send(msg.message_parameters); } ```
6 months ago
`check_signature` & `check_data_signature` usage for Signing?
`check_signature` & `check_data_signature` usage for Signing?
You can sign a Cell with `ton-crypto` or ton-core, and later verify it using `check_signature` or `check_data_signature` from `stdlib.fc` in FunC. Here's an approximate code snippet that you should review: ```plaintext sign(yourCell.hash(), keypair.secretKey); ## And in the FunC contract, check like this: check_signature(cell_hash(your_cell), signature, public_key) ``` For more details, you can refer to the [TON documentation on signature checks](https://docs.ton.org/develop/func/stdlib#signature-checks). On the other hand, in Tact language, we also has the same feature in the Smart Contract side like this: ``` external(msg: ExtMessage) { let hash: Int = beginCell().storeUint(msg.seqno, 32).storeUint(msg.valid_until, 32).storeRef(msg.message_parameters.toCell()).endCell().hash(); require(checkSignature(hash, msg.signature, self.publicKey), "Invalid Signature"); // 😃😃😃 We checek the hash here require(msg.seqno == self.seqno, "Invalid Seqno"); require(now() <= msg.valid_until, "Invalid Time"); acceptMessage(); self.seqno = self.seqno + 1; send(msg.message_parameters); } ```
You can sign a Cell with `ton-crypto` or ton-core, and later verify it using `check_signature` or `check_data_signature` from `stdlib.fc` in FunC. Here's an approximate code snippet that you should review: ```plaintext sign(yourCell.hash(), keypair.secretKey); ## And in the FunC contract, check like this: check_signature(cell_hash(your_cell), signature, public_key) ``` For more details, you can refer to the [TON documentation on signature checks](https://docs.ton.org/develop/func/stdlib#signature-checks).
6 months ago
Original
`check_signature` & `check_data_signature` usage for Signing?

You can sign a Cell with `ton-crypto` or ton-core, and later verify it using `check_signature` or `check_data_signature` from `stdlib.fc` in FunC. Here's an approximate code snippet that you should review: ```plaintext sign(yourCell.hash(), keypair.secretKey); ## And in the FunC contract, check like this: check_signature(cell_hash(your_cell), signature, public_key) ``` For more details, you can refer to the [TON documentation on signature checks](https://docs.ton.org/develop/func/stdlib#signature-checks).