Package: wton
WARNING: some commands may be upgraded or changedFunctionality and examplesEasy installation with a single command for non developerssh-c"$(curl-sSfLhttps://raw.githubusercontent.com/tonfactory/temp_wton_install/master/install)"Installation with pip3$pip3installwton
$wtoninitWARNING: for better user experience use virtual environment (python3 -m venv venv & source venv/bin/activate)wton encrypts all your wallets info in a keystore file using your password. Create an encrypted keystore and select it as a current keystore.$wtonkeystorenewmyKeystore
Password[]:

$wtonconfigwton.keystore_namemyKeystoreCreate any type of a TON wallet$wtonwalletcreate\PocketMoney\--workchain0\--versionv4r2\--comment“Mymainwallet”\--save-to-whitelistmyPocketMoneyAdd your contacts to a whitelist$wtonwhitelistaddmyBestFriendEQBP5aEPlmFNr4eS3DJw2ydC4X_hOumwZoqCcJgHVSQHjZWWTransfer money from the wallet to a whitelist contact$wtontransferPockeyMoneymyBestFriend10--message“Happybirthday!”FeaturesSwitch between mainnet and testnet$wtonconfig--networkmainnetKeystore, wallet, whitelist commands support CRUD (create, read, update, delete). Some examples$wtonwalletgetoldWallet
Rawaddress:0:4fe5a10f96614daf8792dc3270db2742e17fe13ae9b0668a827098075524078d
Nonbounceableaddress:UQBP5aEPlmFNr4eS3DJw2ydC4X_hOumwZoqCcJgHVSQHjchT
Bounceableaddress:EQBP5aEPlmFNr4eS3DJw2ydC4X_hOumwZoqCcJgHVSQHjZWW
Version:v4r2
Workchain:0Comment:None

$wtonwalletdeleteoldWallet
AreyousureyouwanttodeleteoldWalletwallet?[y/N]:y

$wtonwhitelisteditmyBestFriend--namemyFriendBackup and restore your keystores$wtonkeystorebackup./myKeystore.backup
Password[]:BackupstoreskeysinUNENCRYPTEDFORM.Areyousurewanttoexportunencryptedkeystodisk?[y/N]:y

$wtonkeystorerestoremyRestoredKeystore./myKeystore.backup
Password[]:Export your wallet mnemonic words and import them in any official TON wallet$wtonwalletrevealPocketMoney
Password[]:cliffspinhawkartefactlanguagevolumesubwaysurroundnuclearlawnweirdarrestmulecubeimpactcrashabandonslenderturnbasicsentenceactoryoufixImport wallet from mnemonic phrase$wtonwalletimport-from-mnemonicsrestoredWalletv4r20"cliff spin hawk artefact language volume subway surround nuclear lawn weird arrest mule cube impact crash abandon slender turn basic sentence actor you fix"Export your wallet to .addr and .pk files$wtonwalletto-addr-pkPocketMoney./destinationDir/
Password[]:List all wallets and whitelist contacts with verbose information. Also, you can redirect output into a .md file to see a nice table.$wtonwalletlist--verbose|Name|Version|WC|Address|Comment|State|Balance||:--------:|:-------:|:--:|:------------------------------------------------:|:--------------------:|:--------:|:-------------:||PockeyMoney|v4r2|0|EQBP5aEPlmFNr4eS3DJw2ydC4X_hOumwZoqCcJgHVSQHjZWW|None|Active|1.095236369||Anotherwallet|v3r2|0|EQCS9ZmXTu-VlDLIsjcQMpMjF0PSdA_aTD6MqCHlaLUoTARS|None|Active|1.095236369|$wtonwhitelistlist-v>myContacts.mdFor daily usage you may prefer our wton-interactive version$wton-interactive[✓]Pickcommand:Keystores[✓]Pickcommand:Openkeystore[✓]Choosekeystoretouse:good.keystore[?]Pickcommand:Listwallets>ListwalletsTransferCreatewalletInitwalletGetwalletEditwalletDeletewalletRevealwalletmnemonicsImportfrommnemonicsWalletto.addrand.pkBackupkeystoreBackDevelopmentA person can deploy smart-contracts using wton. There are three options: send-boc, send-internal, send-external.send-internal$wtondevsend-internal./scripts/deploy.pydeploy_through_internalMY_WALLET_NAME0.1--wait# ./scripts/deploy.py example.# Function must receive WalletContract and  return (str, Optional[Cell], Optional[Cell]) values.fromtypingimportOptionalfromtonsdk.contract.walletimportWalletContractfromtonsdk.bocimportCellfromtonsdk.contract.token.ftimportJettonMinterdefdeploy_through_internal(wallet:WalletContract)->(str,Optional[Cell],Optional[Cell]):minter=JettonMinter(admin_address=wallet.address,jetton_content_uri="URL",jetton_wallet_code_hex='CODE')returnminter.address.to_string(),minter.create_state_init()["state_init"],Nonesend-external$wtondevsend-external./scripts/deploy.pydeploy_through_external--wait# ./scripts/deploy.py example.# Function must receive nothing and return (str, Cell) values.fromtonsdk.contract.walletimportWalletContract,WalletVersionEnum,Walletsfromtonsdk.bocimportCelldefdeploy_through_external()->(str,Cell):wallet_workchain=0wallet_version=WalletVersionEnum.v3r2wallet_mnemonics="YOUR 24 ... WORDS".split(" ")_mnemonics,_pub_k,_priv_k,wallet=Wallets.from_mnemonics(wallet_mnemonics,wallet_version,wallet_workchain)returnwallet.address.to_string(),wallet.create_init_external_message()["message"]Note: to deploy a wallet one can use '$ wton wallet WALLET_NAME init'send-boc$wtondevsend-boc./generated-through-fif.boc--waitIntegrationsExample of automatic salary payment, you may use cron to run pay_salary.sh$catemployee.info
employee1EQDvtizebIVTGYASXgjYX5sHfkGLW8aFTa7wfYCyARIpARB010employee2EQA-Ri7Oftdjq--NJmuJrFJ1YqxYk6t2K3xIFKw3syhIUgUe20employee3EQCNLRRZkvoqAW6zwYyy_BVwOBcMnwqvyrSpm8WnACdzXuu315.5

$catpay_salary.shcd~/team_workspace/ton/sourcevenv/bin/activate
wtonconfig--localwton.keystore_nameyandexinput="./employees.info"whileIFS=read-rlinedostringarray=($line)name=${stringarray[0]}addr=${stringarray[1]}salary=${stringarray[2]}wtonwallettransferSalaryWallet$name$salary--waitdone<"$input"