From c46e5403c777781d056bb06b844bb83e4f158663 Mon Sep 17 00:00:00 2001 From: sasha1618 Date: Thu, 21 Dec 2023 14:49:45 +0300 Subject: [PATCH] Deploy website - based on 4aa4f9dd249407016abe8724fcd6dd754a0e25a7 --- 404.html | 4 ++-- assets/js/{7fba0887.6d6f009a.js => 7fba0887.d989e245.js} | 2 +- .../{runtime~main.45b1fb60.js => runtime~main.5f4848c4.js} | 2 +- config/index.html | 4 ++-- development/index.html | 4 ++-- dns/index.html | 4 ++-- index.html | 4 ++-- installation/index.html | 4 ++-- jetton/index.html | 4 ++-- keystore/index.html | 4 ++-- markdown-page/index.html | 4 ++-- quick-start/index.html | 4 ++-- search/index.html | 4 ++-- shortcuts/index.html | 6 +++--- tonconnect/index.html | 4 ++-- transfer/index.html | 4 ++-- wallet/index.html | 4 ++-- whitelist/index.html | 4 ++-- 18 files changed, 35 insertions(+), 35 deletions(-) rename assets/js/{7fba0887.6d6f009a.js => 7fba0887.d989e245.js} (65%) rename assets/js/{runtime~main.45b1fb60.js => runtime~main.5f4848c4.js} (98%) diff --git a/404.html b/404.html index 61e8dd6..6d2eacf 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | TONS documentation - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/7fba0887.6d6f009a.js b/assets/js/7fba0887.d989e245.js similarity index 65% rename from assets/js/7fba0887.6d6f009a.js rename to assets/js/7fba0887.d989e245.js index 8f05ffb..2270e82 100644 --- a/assets/js/7fba0887.6d6f009a.js +++ b/assets/js/7fba0887.d989e245.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[725],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>m});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},l=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),p=u(r),d=o,m=p["".concat(s,".").concat(d)]||p[d]||f[d]||a;return r?n.createElement(m,i(i({ref:t},l),{},{components:r})):n.createElement(m,i({ref:t},l))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[p]="string"==typeof e?e:o,i[1]=c;for(var u=2;u{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>c,toc:()=>u});var n=r(7462),o=(r(7294),r(3905));const a={sidebar_position:4,slug:"/shortcuts"},i="Shortcuts",c={unversionedId:"shortcuts",id:"shortcuts",title:"Shortcuts",description:"Here is a list of different keyboard shortcuts for different interfaces.",source:"@site/docs/shortcuts.md",sourceDirName:".",slug:"/shortcuts",permalink:"/tons-docs/shortcuts",draft:!1,tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4,slug:"/shortcuts"},sidebar:"documentation",previous:{title:"Quick start",permalink:"/tons-docs/quick-start"},next:{title:"Config",permalink:"/tons-docs/config"}},s={},u=[{value:"tons-interactive",id:"tons-interactive",level:3},{value:"tons-gui",id:"tons-gui",level:3}],l={toc:u},p="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(p,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"shortcuts"},"Shortcuts"),(0,o.kt)("p",null,"Here is a list of different keyboard shortcuts for different interfaces."),(0,o.kt)("h3",{id:"tons-interactive"},"tons-interactive"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"\u2191 \u2193 - navigation\nEnter - proceed\nCtrl + C - exit current command or navigate back\nEsc + Esc - exit current command or navigate back\n")),(0,o.kt)("h3",{id:"tons-gui"},"tons-gui"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"Cmd + F - enter search mode (applicable in all windows with a search bar)\nCmd + Y - open the transactions history window\nEsc - back to default mode\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[725],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=l(r),d=o,m=p["".concat(c,".").concat(d)]||p[d]||f[d]||a;return r?n.createElement(m,i(i({ref:t},u),{},{components:r})):n.createElement(m,i({ref:t},u))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:o,i[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>s,toc:()=>l});var n=r(7462),o=(r(7294),r(3905));const a={sidebar_position:4,slug:"/shortcuts"},i="Shortcuts",s={unversionedId:"shortcuts",id:"shortcuts",title:"Shortcuts",description:"Here is a list of different keyboard shortcuts for different interfaces.",source:"@site/docs/shortcuts.md",sourceDirName:".",slug:"/shortcuts",permalink:"/tons-docs/shortcuts",draft:!1,tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4,slug:"/shortcuts"},sidebar:"documentation",previous:{title:"Quick start",permalink:"/tons-docs/quick-start"},next:{title:"Config",permalink:"/tons-docs/config"}},c={},l=[{value:"tons-interactive",id:"tons-interactive",level:3},{value:"tons-gui",id:"tons-gui",level:3}],u={toc:l},p="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(p,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"shortcuts"},"Shortcuts"),(0,o.kt)("p",null,"Here is a list of different keyboard shortcuts for different interfaces."),(0,o.kt)("h3",{id:"tons-interactive"},"tons-interactive"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"\u2191 \u2193 - navigation\nEnter - proceed\nCtrl + C - exit current command or navigate back\nEsc + Esc - exit current command or navigate back\n")),(0,o.kt)("h3",{id:"tons-gui"},"tons-gui"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"Cmd + F - enter search mode (applicable in all windows with a search bar)\nCmd + Y - open the transactions history window\nCmd + W - close the window (supported by all windows, except main)\nEsc - back to default mode\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.45b1fb60.js b/assets/js/runtime~main.5f4848c4.js similarity index 98% rename from assets/js/runtime~main.45b1fb60.js rename to assets/js/runtime~main.5f4848c4.js index 354c2e3..558eeaa 100644 --- a/assets/js/runtime~main.45b1fb60.js +++ b/assets/js/runtime~main.5f4848c4.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,r,a,o,n={},f={};function c(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.m=n,c.c=f,e=[],c.O=(t,r,a,o)=>{if(!r){var n=1/0;for(u=0;u=o)&&Object.keys(c.O).every((e=>c.O[e](r[d])))?r.splice(d--,1):(f=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var f=2&a&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,c.d(o,n),o},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,r)=>(c.f[r](e,t),t)),[])),c.u=e=>"assets/js/"+({52:"814ed689",53:"935f2afb",85:"1f391b9e",128:"a09c2993",217:"3b8c55ea",239:"72e14192",264:"a0d0a661",270:"e3d829a1",391:"34271ad4",400:"6011b591",414:"393be207",446:"9225b3a9",461:"747578cd",481:"74701a32",514:"1be78505",618:"8f030830",656:"84621ab1",668:"9f781294",725:"7fba0887",852:"4ba05c39",918:"17896441",920:"1a4e3797"}[e]||e)+"."+{52:"52919739",53:"918b3de7",85:"c2f033e4",128:"96ee7d2d",217:"b876c70c",239:"b0e1f452",264:"31ae4124",270:"c610f027",391:"888f7a17",400:"8d6b5779",414:"3623b9c3",446:"1f71443f",461:"5ef9b071",481:"895e8814",514:"2a50256c",618:"f8f3dc8d",656:"2a6ba4ba",668:"2217ad1b",690:"78808487",719:"d57c86ca",725:"6d6f009a",852:"2cbce27a",894:"e787cecf",918:"4675f6a0",920:"5635b995",945:"c9ff869e",972:"908d7342"}[e]+".js",c.miniCssF=e=>{},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="website:",c.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var f,d;if(void 0!==r)for(var i=document.getElementsByTagName("script"),u=0;u{f.onerror=f.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),d&&document.head.appendChild(f)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="/tons-docs/",c.gca=function(e){return e={17896441:"918","814ed689":"52","935f2afb":"53","1f391b9e":"85",a09c2993:"128","3b8c55ea":"217","72e14192":"239",a0d0a661:"264",e3d829a1:"270","34271ad4":"391","6011b591":"400","393be207":"414","9225b3a9":"446","747578cd":"461","74701a32":"481","1be78505":"514","8f030830":"618","84621ab1":"656","9f781294":"668","7fba0887":"725","4ba05c39":"852","1a4e3797":"920"}[e]||e,c.p+c.u(e)},(()=>{var e={303:0,532:0};c.f.j=(t,r)=>{var a=c.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=c.p+c.u(t),f=new Error;c.l(n,(r=>{if(c.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;f.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",f.name="ChunkLoadError",f.type=o,f.request=n,a[1](f)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],f=r[1],d=r[2],i=0;if(n.some((t=>0!==e[t]))){for(a in f)c.o(f,a)&&(c.m[a]=f[a]);if(d)var u=d(c)}for(t&&t(r);i{"use strict";var e,t,r,a,o,n={},f={};function c(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.m=n,c.c=f,e=[],c.O=(t,r,a,o)=>{if(!r){var n=1/0;for(u=0;u=o)&&Object.keys(c.O).every((e=>c.O[e](r[d])))?r.splice(d--,1):(f=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var f=2&a&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,c.d(o,n),o},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,r)=>(c.f[r](e,t),t)),[])),c.u=e=>"assets/js/"+({52:"814ed689",53:"935f2afb",85:"1f391b9e",128:"a09c2993",217:"3b8c55ea",239:"72e14192",264:"a0d0a661",270:"e3d829a1",391:"34271ad4",400:"6011b591",414:"393be207",446:"9225b3a9",461:"747578cd",481:"74701a32",514:"1be78505",618:"8f030830",656:"84621ab1",668:"9f781294",725:"7fba0887",852:"4ba05c39",918:"17896441",920:"1a4e3797"}[e]||e)+"."+{52:"52919739",53:"918b3de7",85:"c2f033e4",128:"96ee7d2d",217:"b876c70c",239:"b0e1f452",264:"31ae4124",270:"c610f027",391:"888f7a17",400:"8d6b5779",414:"3623b9c3",446:"1f71443f",461:"5ef9b071",481:"895e8814",514:"2a50256c",618:"f8f3dc8d",656:"2a6ba4ba",668:"2217ad1b",690:"78808487",719:"d57c86ca",725:"d989e245",852:"2cbce27a",894:"e787cecf",918:"4675f6a0",920:"5635b995",945:"c9ff869e",972:"908d7342"}[e]+".js",c.miniCssF=e=>{},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="website:",c.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var f,d;if(void 0!==r)for(var i=document.getElementsByTagName("script"),u=0;u{f.onerror=f.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),d&&document.head.appendChild(f)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="/tons-docs/",c.gca=function(e){return e={17896441:"918","814ed689":"52","935f2afb":"53","1f391b9e":"85",a09c2993:"128","3b8c55ea":"217","72e14192":"239",a0d0a661:"264",e3d829a1:"270","34271ad4":"391","6011b591":"400","393be207":"414","9225b3a9":"446","747578cd":"461","74701a32":"481","1be78505":"514","8f030830":"618","84621ab1":"656","9f781294":"668","7fba0887":"725","4ba05c39":"852","1a4e3797":"920"}[e]||e,c.p+c.u(e)},(()=>{var e={303:0,532:0};c.f.j=(t,r)=>{var a=c.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=c.p+c.u(t),f=new Error;c.l(n,(r=>{if(c.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;f.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",f.name="ChunkLoadError",f.type=o,f.request=n,a[1](f)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],f=r[1],d=r[2],i=0;if(n.some((t=>0!==e[t]))){for(a in f)c.o(f,a)&&(c.m[a]=f[a]);if(d)var u=d(c)}for(t&&t(r);i Config | TONS documentation - + @@ -13,7 +13,7 @@ application.

YubiKey

To use your YubiKey device with yubikey type keystores, first set it up. Go to Config > Yubikey menu and follow the instructions. Then create (or restore from unencrypted backup) new yubikey type keystore.

tons

Every time tons reads settings in the way where a next config alters previous one

  1. global: ~/.config/tons/
  2. local: ./.tons/Note: to init tons locally run 'tons init' command
  3. env: export TONS_CONFIG_PATH=~/your/own/path/.tons/

All config.yaml parameters

NameDescription
tons.workdirdirectory where whitelist and keystores are stored
tons.keystore_namename of the keystore a person wants to use in tons
tons.providerprovider to access the TON blockchain
tons.default_wallet_versionthe version that will be used by default during tons wallet create cmd
tons.warn_if_outdatedevery start checks whether there is a new version of tons application
tons.sort_whitelistshow sorted list of whitelist contacts
tons.sort_keystoreshow sorted list of wallet in keystore
provider.dapp.api_keyapi key for the dapp (can be retrieved in the tontech bot)
provider.dapp.testnet_api_keyapi key for the dapp (can be retrieved in the tontech testnet bot)
provider.dapp.networkTON network to use (mainnet/testnet)
dns.max_expiring_inmonths until dns record will be expired. It is used in "DNS > Refresh all" cmd
dns.refresh_send_amountamount to send to refresh dns ownership
dns.refresh_not_yet_owned_send_amountamount to send to refresh dns ownership of the not taken dns record
jetton.gas_amountfees amount in TON coins to send during jetton transfers

List parameters of all configs (global/local/env)

$ tons config --list
...
~/local/path/.tons/config.yaml tons.keystore_name=dev.keystore
...
~/.config/.tons/config.yaml tons.keystore_name=global.keystore

List all values of final altered config

$ tons config --current-setup
tons.workdir=/Users/username/.config/.tons
tons.keystore_name=dev.keystore
tons.provider=dapp
tons.default_wallet_version=v3r2
tons.warn_if_outdated=True
provider.dapp.api_key=YOUR_API_KEY
provider.dapp.network=testnet

Change the network

tons config --network testnet

Set value of a parameter

tons config --global tons.keystore_name myKeystore2

Unset value of a parameter

tons config --local tons.keystore_name --unset

Get value of a parameter

$ tons config tons.keystore_name
dev.keystore

YubiKey

The best way to set up your device is by using tons-interactive > Config > YubiKey.

But you can also run ykman package.

For example, to generate a private key in the required slot run:

$ ykman piv keys generate 0x87 - -m ${YOUR_MANAGEMENT_KEY} -P ${YOUR_PIN} --pin-policy ONCE --touch-policy ALWAYS -a RSA2048

IMPORTANT: slot id 0x87, pin-policy ONCE and key type RSA2048 are required.

- + \ No newline at end of file diff --git a/development/index.html b/development/index.html index a3fe9fe..9aeb46f 100644 --- a/development/index.html +++ b/development/index.html @@ -4,14 +4,14 @@ Development | TONS documentation - +

Development

A person can deploy smart-contracts using tons and tonsdk. There are three options: send-boc, send-internal and send-external.

Send internal allows a user to send any internal message using any of their wallets

$ tons dev send-internal ./scripts/deploy.py deploy_through_internal MY_WALLET_NAME 0.1 --wait
# ./scripts/deploy.py example. 
# Function must receive WalletContract and return (str, Optional[Cell], Optional[Cell]) values.

from typing import Optional

from tonsdk.contract.wallet import WalletContract
from tonsdk.boc import Cell
from tonsdk.contract.token.ft import JettonMinter


def deploy_through_internal(wallet: WalletContract) -> (str, Optional[Cell], Optional[Cell]):
minter = JettonMinter(admin_address=wallet.address,
jetton_content_uri="URL",
jetton_wallet_code_hex='CODE')

return minter.address.to_string(), minter.create_state_init()["state_init"], None

Send external allows a user to create an external message using tonsdk and send it to the TON blockchain

$ tons dev send-external ./scripts/deploy.py deploy_through_external --wait
# ./scripts/deploy.py example. 
# Function must receive nothing and return (str, Cell) values.
from tonsdk.contract.wallet import WalletContract, WalletVersionEnum, Wallets
from tonsdk.boc import Cell


def deploy_through_external() -> (str, Cell):
wallet_workchain = 0
wallet_version = WalletVersionEnum.v3r2
wallet_mnemonics = "YOUR 24 ... WORDS".split(" ")

_mnemonics, _pub_k, _priv_k, wallet = Wallets.from_mnemonics(
wallet_mnemonics, wallet_version, wallet_workchain)
return wallet.address.to_string(), wallet.create_init_external_message()["message"]

Note: to deploy a wallet one can use '$ tons wallet init WALLET_NAME'

Send boc allows to send a .boc file to the TON blockchain

$ tons dev send-boc ./generated-through-fif.boc --wait

integrations

Example of automatic salary payment, you may use cron to run pay_salary.sh

$ cat employee.info
employee1 EQDvtizebIVTGYASXgjYX5sHfkGLW8aFTa7wfYCyARIpARB0 10
employee2 EQA-Ri7Oftdjq--NJmuJrFJ1YqxYk6t2K3xIFKw3syhIUgUe 20
employee3 EQCNLRRZkvoqAW6zwYyy_BVwOBcMnwqvyrSpm8WnACdzXuu3 15.5

$ cat pay_salary.sh
cd ~/team_workspace/ton/
source venv/bin/activate
tons config tons.keystore_name myKeystore

input="./employees.info"
while IFS= read -r line
do
stringarray=($line)
name=${stringarray[0]}
addr=${stringarray[1]}
salary=${stringarray[2]}

tons wallet transfer salaryWallet $name $salary --wait
done < "$input"

toncli

toncli uses deploy wallet with the following params:

  • version v3r2
  • subwallet-id 0
  • workchain 0

First a developer should create a tons wallet

$ tons wallet create toncli-deployer -v v3r2 -w 0 -id 0 --save-to-whitelist toncli-deployer

Then get the path of toncli deploy wallet

$ python
>>> from appdirs import user_config_dir
>>> import os
>>> user_config_dir("toncli") # output may be different
/Users/username/Library/Application Support/toncli
>>> os.path.join(user_config_dir("toncli"), "wallet", "build") # output may be different
/Users/username/Library/Application Support/toncli/wallet/build

Finally, replace toncli default wallet with the tons one

$ tons wallet to-addr-pk toncli-deployer '/Users/username/Library/Application Support/toncli/wallet/build'
$ cd '/Users/username/Library/Application Support/toncli/wallet/build'
$ mv contract.pk backup_old.pk && mv contract.addr backup_old.addr
$ mv toncli-deployer.pk contract.pk && mv toncli-deployer.addr contract.addr
- + \ No newline at end of file diff --git a/dns/index.html b/dns/index.html index 3b6b8a6..f110560 100644 --- a/dns/index.html +++ b/dns/index.html @@ -4,14 +4,14 @@ DNS | TONS documentation - +

DNS

tons supports TON DNS standard. User can refresh your ownership and get info about all your records in the most convenient way.

tons-interactive

  1. List all DNS records (0:00)
  2. Refresh a DNS record ownership (0:19)
  3. Set DNS expiration threshold and Refresh all DNS records expiring in N month (0:57)

tons

List all DNS records

$ tons dns list
| DNS domain | Last fill-up time | Expires in | Owner |
|:------------------:|:-----------------------:|:----------:|:------------------------------------------------:|
| tonfactory.ton | 2023-06-26 11:00:58 GMT | 365 days | EQDQhhVr4ip301spczNCBIpo6415k2GQCaw6JQ2ocFCHDsHS |
| tons-tons-tons.ton | 2023-06-26 11:01:11 GMT | 365 days | EQDQhhVr4ip301spczNCBIpo6415k2GQCaw6JQ2ocFCHDsHS |
| tons.ton | 2023-06-26 11:01:22 GMT | 365 days | EQDQhhVr4ip301spczNCBIpo6415k2GQCaw6JQ2ocFCHDsHS |

Refresh specific DNS record

tons dns refresh --domain tonfactory.ton

Refresh all DNS records that are expiring in N month

tons dns refresh --expiring-soon
- + \ No newline at end of file diff --git a/index.html b/index.html index 1b1fb21..e2498a8 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Introduction | TONS documentation - + @@ -13,7 +13,7 @@ and command-line interface to maintain any type of wallet on the TON network on desktops and servers. Works with Windows/Mac/Linux.

tons has different UI versions, thanks to which, any user will find a suitable interface:

tons uses specific filesystem architecture that is maintained by the application.

.tons
├── config.yaml
├── whitelist.json
├── keystores
│ ├── *.keystore

Read more about architecture entities: Config, Keystore, Whitelist.

User interfaces

tons-interactive

tons-interactive is a convenient interface to control your assets through terminal.

$ tons-interactive
[] Pick command: Keystores
[] Pick command: Open keystore
[] Choose keystore to use: 🔒 personal.keystore
[?] Pick command [personal.keystore]: List wallets
> List wallets
Transfer
Advanced Transfer
Whitelist
Tonconnect v2
DNS
Jetton
...

tons

tons is a batch mode interface that allows you to write automatic scripts.

To get all available subcommands and flags run a command with an '-h' flag

$ tons -h
Usage: tons [OPTIONS] COMMAND [ARGS]...

Options:
--version Show the version and exit.
-c, --config Use specific config.yaml file
-h, --help Show this message and exit.

Commands:
config Control config parameters (check README.md for all fields...
contract Operate with contracts
dev Development tools
dns Operate with DNS
init Initialize .tons workdir in a current directory
keystore Operate with keystores
tonconnect Operate with TonConnect
wallet Operate with wallets
whitelist Operate with whitelist contacts

Example: get list of all wallets from a keystore

$ tons wallet list -v
| Name | Version | WC | Address | Comment | State | Balance |
|:------|:-------:|:--:|:------------------------------------------------:|:--------|:------:|--------:|
| dev | v3r2 | 0 | EQBxWbjry61lk0dU_8viG9M_e5x9VGOJaI9ZhOrn6vcIp7Sm | None | Active | 13.1 |
| prod | v4r2 | 0 | EQCkNipaz2C3Md-tXVBcD3E4yv8EKqMzZ41QQtsM4IdFnKP5 | None | Uninit | 0.0 |
| Total | | | | | | 13.1 |

tons-gui

Graphic user interface version is being developed. Here's a glimpse of the interface.

tons-gui

- + \ No newline at end of file diff --git a/installation/index.html b/installation/index.html index cee59c9..c64d32d 100644 --- a/installation/index.html +++ b/installation/index.html @@ -4,7 +4,7 @@ Installation | TONS documentation - + @@ -13,7 +13,7 @@ and download the latest version.

Download an installer that suits your OS, install the application and double click the executable file.

You will see the main menu

[?] Pick command: Keystores
> Keystores
Whitelist
Config
Exit

Obtain API keys

Go to the telegram bot: @tontech_dapp_bot (or @tontech_dapp_testnet_bot for testnet) and get your API key.

Copy and paste the key inside Config > API key menu.

For Developers

tons is a python package. All UIs are included in the same package.

Use pip (python package manager) to install it

$ mkdir ~/my-ton-workdir/ && cd ~/my-ton-workdir/
$ python3 -m venv venv
$ source venv/bin/activate
$ python3 -m pip install --upgrade pip
$ pip install tons
$ tons-interactive
[?] Pick command: Keystores
> Keystores
Whitelist
Config
Exit

Update

If you use tons-interactive executable, just download newer version from the releases page and replace current one.

For developers, to update tons with pip, run the following command

$ pip install -U tons 
- + \ No newline at end of file diff --git a/jetton/index.html b/jetton/index.html index 123e6e7..96ef742 100644 --- a/jetton/index.html +++ b/jetton/index.html @@ -4,14 +4,14 @@ Jetton (soon) | TONS documentation - +

Jetton (soon)

tons supports TON Jetton standard. User can transfer your jettons and get info about all your assets in the most convenient way.

tons-interactive

  1. List all wallets' jettons and their amounts (0:00)
  2. Transfer jettons (0:11)

tons

Coming soon...

- + \ No newline at end of file diff --git a/keystore/index.html b/keystore/index.html index e1de209..c3e8fae 100644 --- a/keystore/index.html +++ b/keystore/index.html @@ -4,7 +4,7 @@ Keystore | TONS documentation - + @@ -14,7 +14,7 @@ Public information are stored unencrypted (e.g. wallet address).

tons-interactive

  1. Open keystore (0:00)
  2. Create keystore (0:16)
  3. Backup keystore (0:42)
  4. Restore keystore (1:23)

tons

There are several options to work with a password:

  1. Runs a command and enter it through input
$ tons keystore new
Password []:
  1. Runs a command with a --password flag
$ tons keystore new --password admin123
Password []:
  1. Set up environment variable TONS_KEYSTORE_PASSWORD
$ export TONS_KEYSTORE_PASSWORD=admin123
$ tons keystore new

List all keystores in a tons.workdir folder

$ tons keystore list
dev.keystore
test.keystore

Create a new keystore

tons keystore new myNewKeystore --password MY_SECRET

Backup a keystore (password is used to export private keys)

tons keystore backup myNewKeystore ./myNewKeystore.backup --password MY_SECRET

Restore a keystore (password is used for a new keystore)

$ tons keystore restore keystoreFromBackup ./myOldKeystore.backup
Password []:

# to restore keystore from ton-cli's keystore add flag --from-ton-cli
$ tons keystore restore keystoreFromBackup ./ton-cli.backup --from-ton-cli
Password []:

Yubikey type keystore

YubiKey type keystores encrypt sensitive data, e.g. wallet secrets, with a private key that is stored on your device. Moreover, non-sensitive data, e.g. wallet address, is also encrypted by AES algorithm.

What is a YubiKey device?

The YubiKey is a hardware authentication device manufactured by Yubico to protect access to computers, networks, and online services that supports one-time passwords, public-key cryptography, and authentication.

You can buy the device on the official website.

IMPORTANT! tons requirements for a YubiKey device:

  • Multi-protocol support
  • Firmware version > 4.3.0

Example of the device that satisfies the requirements.

To set up your device, read the instructions on the Config page.

tons-interactive

  1. Create keystore (0:00)
  2. Touch YubiKey every time it starts blinking (when TOUCH_POLICY is set to ALWAYS) (0:15, 0:35)
  3. Other commands are the same as for password keystore, but requires YubiKey touch (if set to ALWAYS).

tons

Create new yubikey keystore

tons keystore new myNewYubiKeystore --keystore-type yubikey --pin MY_SECRET

Other commands are the same as for simple password keystore. But instead of --password you should use --pin option.

- + \ No newline at end of file diff --git a/markdown-page/index.html b/markdown-page/index.html index 8be43eb..59c8c99 100644 --- a/markdown-page/index.html +++ b/markdown-page/index.html @@ -4,13 +4,13 @@ Markdown page example | TONS documentation - +

Markdown page example

You don't need React to write simple standalone pages.

- + \ No newline at end of file diff --git a/quick-start/index.html b/quick-start/index.html index 35e9942..72e61c7 100644 --- a/quick-start/index.html +++ b/quick-start/index.html @@ -4,13 +4,13 @@ Quick start | TONS documentation - +

Quick start

tons-interactive

  1. Create new keystore (0:00)
  2. Import existing wallet from mnemonics (0:24)
  3. Add whitelist contact (1:07)
  4. Transfer TON coins (1:36)

tons

[OPTIONAL] Create .tons folder in the current directory, otherwise it will use global directory (see Config for more details)

tons init

Create a keystore

tons keystore new myFirstKeystore --password MY_SECRET

Set it as a current keystore

tons config tons.keystore_name myFirstKeystore

Import existing wallet from mnemonics (you can find your wallet version in you application settings. Usually it is v4r2)

tons wallet import-from-mnemonics pocketMoney v4r2 0 "YOUR MNEMONIC WORDS HERE" --save-to-whitelist myPocketMoney

You can check that it has been create by the list command

tons wallet list
| Name        | Version | WC |                     Address                      | Comment | State  | Balance |
|:------------|:-------:|:--:|:------------------------------------------------:|:--------|:------:|--------:|
| pocketMoney | v3r2 | 0 | EQCHt-689LLEeFw2hkOT8ZNE8dmuMJeTcnISScGujIk-Sx2W | None | Active | 1.0 |
| Total | | | | | | 1.0 |

Add a whitelist contact

tons whitelist add myBestFriend EQAqJuYmOYI_0C23atgYhQOcL4IHznWbCwUY0u4KOU3yRVEm

Transfer coins from the wallet to the contact

tons wallet transfer pocketMoney myBestFriend 0.1 --message "Happy birthday!" --wait
- + \ No newline at end of file diff --git a/search/index.html b/search/index.html index cd007eb..8f6958a 100644 --- a/search/index.html +++ b/search/index.html @@ -4,13 +4,13 @@ Search the documentation | TONS documentation - +

Search the documentation

- + \ No newline at end of file diff --git a/shortcuts/index.html b/shortcuts/index.html index 9c7e86e..8de1c2a 100644 --- a/shortcuts/index.html +++ b/shortcuts/index.html @@ -4,13 +4,13 @@ Shortcuts | TONS documentation - +
-

Shortcuts

Here is a list of different keyboard shortcuts for different interfaces.

tons-interactive

↑ ↓          - navigation
Enter - proceed
Ctrl + C - exit current command or navigate back
Esc + Esc - exit current command or navigate back

tons-gui

Cmd + F      - enter search mode (applicable in all windows with a search bar)
Cmd + Y - open the transactions history window
Esc - back to default mode
- +

Shortcuts

Here is a list of different keyboard shortcuts for different interfaces.

tons-interactive

↑ ↓          - navigation
Enter - proceed
Ctrl + C - exit current command or navigate back
Esc + Esc - exit current command or navigate back

tons-gui

Cmd + F      - enter search mode (applicable in all windows with a search bar)
Cmd + Y - open the transactions history window
Cmd + W - close the window (supported by all windows, except main)
Esc - back to default mode
+ \ No newline at end of file diff --git a/tonconnect/index.html b/tonconnect/index.html index 17e2d64..46978fd 100644 --- a/tonconnect/index.html +++ b/tonconnect/index.html @@ -4,14 +4,14 @@ Tonconnect (soon) | TONS documentation - +

Tonconnect (soon)

tons supports Tonconnect v2 protocol. User can connect/disconnect a wallet to any dapp and confirm transactions.

tons-interactive

  1. Connect wallet to a dapp (0:00)
  2. Confirm transaction (0:50)
  3. Disconnect the wallet (1:32)

tons

Connect a wallet

tons tonconnect connect myWallet COPIED_BASE64_PAYLOAD

List connections

$ tons tonconnect list
| Wallet | Connected at | Dapp Name | Dapp Url | Dapp Client Id |
|:-----------:|:--------------------------:|:---------:|:----------------------------------------:|:----------------------------------------------------------------:|
| myWallet | 2023-06-26 14:40:31.838090 | Demo Dapp | https://ton-connect.github.io/demo-dapp/ | 3329b835c95ea84cc841dfdca5eff9b8178c7221fe8174736c5cee59a3df9201 |

Handle new request

tons tonconnect handle-queued-request myWallet 3329b835c95ea84cc841dfdca5eff9b8178c7221fe8174736c5cee59a3df9201

Disconnect the wallet

tons tonconnect disconnect myWallet 3329b835c95ea84cc841dfdca5eff9b8178c7221fe8174736c5cee59a3df9201
- + \ No newline at end of file diff --git a/transfer/index.html b/transfer/index.html index 23cf32c..67756b4 100644 --- a/transfer/index.html +++ b/transfer/index.html @@ -4,13 +4,13 @@ Transfer | TONS documentation - +

Transfer

To transfer TON coins from a wallet to the whitelist contact use transfer command.

tons-interactive

  1. Transfer TON coins with unencrypted message (0:00)
  2. Advanced transfer TON coins with encrypted message (1:07)

tons

Transfer coins from a wallet to the whitelist contact

Minimal required arguments

tons wallet transfer myMainWallet myFriend 0.1

All parameters

tons wallet transfer myMain myFriend 10 \
--message "Happy Birthday!" \
--encrypt-message n \
--wait \
--bounceable n \
--pay-gas-separately y \
--ignore-errors n \
--destroy-if-zero n \
--transfer-all n \
--body ./filepath/body.boc \
--state-init ./filepath/state_init.boc
- + \ No newline at end of file diff --git a/wallet/index.html b/wallet/index.html index ad41f20..5e0ccbf 100644 --- a/wallet/index.html +++ b/wallet/index.html @@ -4,13 +4,13 @@ Wallet | TONS documentation - +

Wallet

Wallet entity is a record in a keystore file that has all required information to interact with a specific TON blockchain smart contract.

tons-interactive

  1. Import wallet from tonkeeper by mnemonics (0:00)
  2. Create batch of wallets by prefix (0:32)
  3. Create batch of wallets by pattern (1:05)
  4. Get verbose information of a wallet (1:50)

tons

Wallets support same CRUD operations

$ tons wallet create myMain \
--version v3r2 \
--workchain 0 \
--subwallet-id 698983191 \
--comment "My main secure wallet" \
--save-to-whitelist myMain

$ tons wallet edit myMain --name myMainOld

$ tons wallet delete myMain
Are you sure you want to delete v2wallet wallet? [y/N]: y

$ tons wallet get myMain
Raw address: 0:4fe5a10f96614daf8792dc3270db2742e17fe13ae9b0668a827098075524078d
Nonbounceable address: UQBP5aEPlmFNr4eS3DJw2ydC4X_hOumwZoqCcJgHVSQHjchT
Bounceable address: EQBP5aEPlmFNr4eS3DJw2ydC4X_hOumwZoqCcJgHVSQHjZWW
Version: v3r2
Workchain: 0
Subwallet id: 698983191
Comment: My main secure wallet
--- Verbose wallet information ---
address: EQBP5aEPlmFNr4eS3DJw2ydC4X_hOumwZoqCcJgHVSQHjZWW
contract_type: None
seqno: 1
state: Active
balance: 0.394748632
last_activity: 2022-10-07 08:58:00
code: te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=
data: te6cckEBAQEAKgAAUAAAAAEpqaMXz1s51azqoYZWn7ZR2NlTfwg7FABigSY991WpcgOjOlg2uqR/

List all wallets (can be redirected to .md file)

$ tons wallet list -v -c nanoton
| Name | Version | WC | Address | Comment | State | Balance |
|:------------|:-------:|:--:|:------------------------------------------------:|:-------------------|:------:|-------------------:|
| dev | v3r2 | 0 | Eaddraddraddraddraddraddraddraddraddraddraddradd | Development wallet | Active | 182.349713128 |
| masterchain | v3r2 | -1 | Eaddraddraddraddraddraddraddraddraddraddraddradd | None | Active | 0.328599221 |
| newTest | v3r2 | 0 | Eaddraddraddraddraddraddraddraddraddraddraddradd | | Active | 0.095227164 |
| testmsg | v3r2 | 0 | Eaddraddraddraddraddraddraddraddraddraddraddradd | None | Active | 0.394748632 |
| v2wallet | v2r2 | -1 | Eaddraddraddraddraddraddraddraddraddraddraddradd | None | Uninit | 0.0 |
| Total | | | | | | 183.16828814499996 |

$ tons wallet list -v > wallet_info.md

Import wallet from mnemonic

$ tons wallet import-from-mnemonics importedWallet v4r2 0 "your 24 mnemo ... words" \
--subwallet-id 698983191 \
--comment "My imported wallet" \
--save-to-whitelist myImportedWallet

Init wallet (address must have some coins to be initialized)

$ tons wallet init myMain

Reveal a wallet mnemonics

$ tons wallet reveal myMain
Password []:
guitar border swap border actor history universe wrist width mask unveil again dentist tilt theory risk electric flash hat sentence essence able dice mammal

Export wallet to .addr and .pk files (e.g. to use in toncli development tool)

$ tons wallet to-addr-pk myMain ./destination/path/
- + \ No newline at end of file diff --git a/whitelist/index.html b/whitelist/index.html index c831407..18f38ab 100644 --- a/whitelist/index.html +++ b/whitelist/index.html @@ -4,7 +4,7 @@ Whitelist | TONS documentation - + @@ -12,7 +12,7 @@

Whitelist

whitelist - is a file that stores all user's contacts. User have to use it to transfer coins from their wallets to other addresses. Whitelist feature eliminates risk of transfer user's assets to the wrong address.

There are two types of whitelist:

  • Global whitelist - contacts are stored in a global whitelist.json file and can be used from any keystore
  • Local whitelist - contacts are stored in a keystore file and can be used only in that keystore

tons-interactive

  1. Create new contacts in the global whitelist (0:00)
  2. Move contact (1:08)
  3. Difference between wallets / local contacts / global contacts in the Transfer command (1:48)

tons

List all contacts with verbose information (can be redirected to .md file)

$ tons whitelist list --verbose --currency nanoton
| Name | Address | State | Balance |
|:----------------|:------------------------------------------------:|:--------:|---------------:|
| My Wallet 01 | EQC96BhaxqhdK-pwvcBudu-WCtjBFMjPbAqoL7qMKc6rd2U2 | Uninit | 0.0 |
| My Wallet 02 | EQBP5aEPlmFNr4eS3DJw2ydC4X_hOumwZoqCcJgHVSQHjZWW | Uninit | 0.0 |

$ tons whitelist list --verbose > contacts_info.md

Add new contact

tons whitelist add myFriend EQC96BhaxqhdK-pwvcBudu-WCtjBFMjPbAqoL7qMKc6rd2U2

Edit contact

tons whitelist edit myFriend --name myBestFriend --address EQBP5aEPlmFNr4eS3DJw2ydC4X_hOumwZoqCcJgHVSQHjZWW

Delete contact

tons whitelist delete myFriend

Get address info of a contact

$ tons whitelist get myFriend
Raw address: 0:4fe5a10f96614daf8792dc3270db2742e17fe13ae9b0668a827098075524078d
Nonbounceable address: UQBP5aEPlmFNr4eS3DJw2ydC4X_hOumwZoqCcJgHVSQHjchT
Bounceable address: EQBP5aEPlmFNr4eS3DJw2ydC4X_hOumwZoqCcJgHVSQHjZWW
- + \ No newline at end of file