mirror of
https://github.com/danog/toncontest.git
synced 2024-12-04 02:17:51 +01:00
1.9 KiB
1.9 KiB
Multisignature wallet
Daniil Gentili's submission (@danogentili, daniil@daniil.it).
Project structure:
Fift scripts:
gen-pub.fif
- Generates public/private keypairwallet-create.fif
- Creates shared walletwallet-create.fif
- Creates wallet code update requestcreate.fif
- Creates simple message to be sent to walletsign.fif
- Adds signature to wallet messageverify.fif
- Verifies signature of message against known public keymerge.fif
- Merges multiple messages with same content and different signaturesinspect.fif
- Inspects the contents of requestlib.fif
- Library with functions to deserialize and inspect contents of TON messages
FunC code:
wallet-code.fc
- Wallet codewallet-code-update.fc
- Wallet code with minor change to test wallet code upgrade
Scripts:
test.sh
- Creates wallet, set of signed requests and tests wallet in TON VMtest-update.sh
- Tests wallet code upgrade functionality (aftertest.sh
) in TON VM
Testing
The test.sh
scripts contains a full set of commands to test every script.
usage: fift -s wallet/wallet-create.fif <workchain-id> <wallet-name> <n> <k> <privkey1> [<pubkey2> ...]
Creates a new multisignature wallet in specified workchain composed of (1-10) keys.
The first of the keys must be a private key (pre-existing or not), used to generate the wallet; the rest MUST be public keys.
Min (1-10) signatures required to send an order; load pre-existing public keys from files <key1...n>.
usage: gen-pub.fif <privkey>
Create public key files from private keys; if doesn't exist, it will be created. Will also print the hex public key ID.
- `inspect Upgradable multisignature wallet. Included signature verification scripts to avoid problems with eventual preloaded orders with invalid signatures.
Code can be upgraded via a special multisignature message.