-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpw-code.fif
36 lines (29 loc) · 1.84 KB
/
pw-code.fif
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
ton-preprocessed-wallet-v2 – open-source optimized wallet for tvm-based blockchains
Copyright (C) 2023 pyAndr3w <gutarev01@gmail.com>
This file is part of ton-preprocessed-wallet-v2.
ton-preprocessed-wallet-v2 is free software: you can redistribute it and/or modify it under the terms
of the GNU Lesser General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
ton-preprocessed-wallet-v2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with ton-preprocessed-wallet-v2.
If not, see <https://www.gnu.org/licenses/>.
*/
"Asm.fif" include
<{
SETCP0 IFNOTRET // msg
LDREF SWAP DUP HASHCU // sign msg' hash
SWAP CTOS 64 LDU 16 LDU PLDREF // sign hash valid_until msg_seqno actions
c4 PUSH CTOS // sign hash valid_until msg_seqno actions c4s
256 LDU 16 PLDU // sign hash valid_until msg_seqno actions key seqno
DUP INC 16 PUSHPOW2 MOD s2 PUSH // sign hash valid_until msg_seqno actions key seqno new_seqno key
NEWC 256 STU 16 STU ENDC c4 POP // sign hash valid_until msg_seqno actions key seqno
s4 s3 s0 XCHG3 s4 s6 XCHG // actions hash sign key valid_until msg_seqno seqno
EQUAL 33 THROWIFNOT // actions hash sign key valid_until
NOW GEQ 34 THROWIFNOT // actions hash sign key
CHKSIGNU 35 THROWIFNOT // actions
ACCEPT // actions
c5 POP
}>c