├── core-examples ├── node-js │ ├── func │ │ ├── gqlwalletv4 │ │ │ ├── everdev signers │ │ │ ├── .eslintignore │ │ │ ├── .vscode │ │ │ │ └── settings.json │ │ │ ├── tsconfig.json │ │ │ └── package.json │ │ ├── package.json │ │ ├── GiverV2.keys.json │ │ └── contracts │ │ │ ├── everWallet.abi.json │ │ │ └── GiverV2.abi.json │ ├── encode_tvc │ │ ├── .gitignore │ │ ├── package.json │ │ └── index.js │ ├── collections │ │ ├── .gitignore │ │ ├── contracts │ │ │ └── SafeMultisigWallet.tvc │ │ └── package.json │ ├── subscription │ │ ├── .gitignore │ │ ├── .prettierrc │ │ ├── fetch.js │ │ ├── package.json │ │ ├── .eslintrc.js │ │ └── README.md │ ├── update_initial_data │ │ ├── .gitignore │ │ └── package.json │ ├── multisig-submit-tx │ │ ├── msig.keys.json │ │ ├── package.json │ │ └── README.md │ ├── transfer-with-comment │ │ ├── address.txt │ │ ├── contracts │ │ │ └── SafeMultisigWallet.tvc │ │ ├── keys.json │ │ ├── transfer.abi.json │ │ ├── package.json │ │ └── README.md │ ├── message-monitor │ │ ├── .vscode │ │ │ ├── extensions.json │ │ │ ├── tasks.json │ │ │ └── settings.json │ │ ├── contract │ │ │ ├── MyContract.tvc │ │ │ └── MyContract.abi.json │ │ ├── .editorconfig │ │ ├── .eslintignore │ │ ├── .prettierrc │ │ ├── tsconfig.json │ │ ├── .eslintrc.js │ │ └── package.json │ ├── pagination │ │ ├── .prettierrc │ │ ├── .eslintrc.js │ │ ├── utils.js │ │ ├── package.json │ │ └── requests │ │ │ ├── getLastMasterBlockSeqNoByTime.js │ │ │ └── index.js │ ├── custom-giver │ │ ├── HelloWallet.tvc │ │ ├── package.json │ │ ├── README.md │ │ └── HelloWallet.abi.json │ ├── multisig-payload │ │ ├── DePool.tvc │ │ ├── SafeMultisigWallet.tvc │ │ └── package.json │ ├── run_get │ │ ├── package.json │ │ └── README.md │ ├── codehash │ │ ├── package.json │ │ └── README.md │ ├── decode_boc │ │ └── package.json │ ├── decode_tvc │ │ ├── package.json │ │ └── index.js │ ├── deploy-with-initial-data │ │ ├── Timestamp.tvc │ │ ├── GiverV2.keys.json │ │ ├── package.json │ │ ├── Timestamp.abi.json │ │ ├── Timestamp.sol │ │ └── README.md │ ├── hello-wallet │ │ ├── contracts │ │ │ ├── HelloWallet.tvc │ │ │ └── HelloWallet.abi.json │ │ ├── .prettierrc │ │ ├── GiverV2.keys.json │ │ ├── .editorconfig │ │ ├── package.json │ │ ├── .eslintrc.json │ │ └── README.md │ ├── run_executor │ │ ├── package.json │ │ └── GiverV2.keys.json │ ├── subscribe-and-decode │ │ ├── HelloEvents.tvc │ │ ├── contracts.js │ │ ├── package.json │ │ └── HelloEvents.abi.json │ ├── gen-keys-matching-to-shards │ │ ├── package.json │ │ ├── contracts │ │ │ ├── someContract.tvc │ │ │ └── someContract.abi.json │ │ └── README.md │ ├── decode_account_data │ │ └── package.json │ ├── decode_initial_data │ │ └── package.json │ ├── encode_initial_data │ │ └── package.json │ ├── get_compiler_version │ │ └── package.json │ ├── multisig │ │ ├── contracts │ │ │ └── SafeMultisigWallet.tvc │ │ └── package.json │ ├── remp │ │ ├── .prettierrc │ │ ├── .editorconfig │ │ ├── package.json │ │ ├── .eslintrc.json │ │ └── Contract.abi.json │ ├── signingBox │ │ ├── GiverV2.keys.json │ │ └── package.json │ ├── utils.convert_address │ │ ├── README.md │ │ └── package.json │ ├── cache │ │ ├── package.json │ │ └── README.md │ ├── counterparties_api │ │ ├── README.md │ │ ├── package.json │ │ └── .eslintrc.json │ ├── compress-decompress │ │ ├── README.md │ │ ├── package.json │ │ └── index.js │ ├── abi.encode_boc │ │ ├── package.json │ │ └── index.js │ ├── encryption-box │ │ └── package.json │ ├── crypto-box │ │ ├── package.json │ │ └── README.md │ ├── blockchain-statistics │ │ ├── README.md │ │ ├── package.json │ │ └── .eslintrc.json │ ├── blockchain_api │ │ ├── package.json │ │ ├── README.md │ │ └── .eslintrc.json │ ├── query_transaction_tree │ │ └── package.json │ ├── paginate-blockchain-transactions │ │ ├── package.json │ │ ├── .eslintrc.json │ │ └── README.md │ └── encode_boc │ │ └── package.json ├── next-js │ ├── normal-transfer │ │ ├── .eslintrc.json │ │ ├── postcss.config.js │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── vercel.svg │ │ ├── pages │ │ │ ├── _app.tsx │ │ │ ├── _document.tsx │ │ │ └── api │ │ │ │ └── hello.ts │ │ ├── next.config.js │ │ ├── .gitignore │ │ ├── tailwind.config.js │ │ ├── tsconfig.json │ │ ├── styles │ │ │ └── globals.css │ │ └── package.json │ └── hello-next-js │ │ ├── public │ │ ├── favicon.ico │ │ └── vercel.svg │ │ ├── postcss.config.js │ │ ├── prep.js │ │ ├── src │ │ ├── pages │ │ │ ├── _document.tsx │ │ │ ├── api │ │ │ │ └── hello.ts │ │ │ ├── _app.tsx │ │ │ └── hello.tsx │ │ └── styles │ │ │ └── globals.css │ │ ├── .eslintrc.js │ │ ├── next.config.js │ │ ├── tailwind.config.js │ │ ├── .gitignore │ │ ├── tsconfig.json │ │ └── package.json ├── react-jest │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ └── manifest.json │ ├── .gitignore │ ├── src │ │ ├── index.css │ │ ├── reportWebVitals.js │ │ ├── App.css │ │ ├── index.js │ │ ├── App.test.js │ │ └── App.js │ ├── config-overrides.js │ └── package.json ├── web-pack │ └── hello │ │ ├── pics │ │ ├── algo.png │ │ ├── Buyer_1.png │ │ ├── Buyer_2.png │ │ ├── Buyer_3.png │ │ ├── Seller_1.png │ │ └── Seller_2.png │ │ ├── dist │ │ ├── eversdk.wasm │ │ └── index.html │ │ ├── src │ │ └── GiverV2.keys.json │ │ ├── .eslintrc.js │ │ ├── webpack.config.js │ │ └── README.md ├── rust │ ├── message-monitoring │ │ └── Cargo.toml │ └── subscribe-collection │ │ └── Cargo.toml └── node-ts │ ├── tsconfig.json │ └── package.json ├── appkit-examples ├── multisig │ ├── .gitignore │ ├── contracts.js │ └── package.json ├── custom-giver │ ├── HelloWallet.tvc │ ├── package.json │ └── HelloWallet.abi.json ├── hello-wallet │ ├── HelloWallet.tvc │ ├── package.json │ └── HelloWallet.abi.json ├── listen-and-decode │ ├── HelloEvents.tvc │ ├── contracts.js │ ├── package.json │ ├── HelloEvents.abi.json │ └── README.md ├── run_executor │ └── package.json ├── fee-calculation │ └── package.json ├── depool-statistics │ ├── package.json │ └── README.md ├── transfer-with-comment │ ├── transfer.abi.json │ ├── package.json │ └── README.md ├── cache │ ├── package.json │ └── README.md ├── query │ └── package.json ├── signing-box │ └── package.json ├── subscription │ ├── package.json │ └── README.md └── web-hello │ ├── web │ └── index.html │ ├── webpack.config.js │ ├── README.md │ └── package.json ├── nfc-card └── ton-nfc-client-react-native │ └── TonNfcCardReactNativeTest │ ├── .watchmanconfig │ ├── utils │ ├── sleep.js │ ├── convert.js │ ├── strip0xPad64.js │ ├── pipeWhileNotNil.js │ ├── promiseTimeout.js │ ├── config.js │ ├── getGramsFromGiver.js │ ├── index.js │ ├── openNaclBoxContainer.js │ ├── naclBoxContainer.js │ └── getEncryptionPublicKey.js │ ├── .eslintrc.js │ ├── babel.config.js │ ├── app.json │ ├── android │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── values │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ └── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── tonnfccardreactnativetest │ │ │ │ │ │ └── MainActivity.java │ │ │ │ └── AndroidManifest.xml │ │ │ └── debug │ │ │ │ └── AndroidManifest.xml │ │ ├── debug.keystore │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── proguard-rules.pro │ │ └── build_defs.bzl │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── build.gradle │ ├── .buckconfig │ ├── ios │ ├── TonNfcCardReactNativeTest │ │ ├── Images.xcassets │ │ │ ├── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Icon-20@2x.png │ │ │ │ ├── Icon-20@3x.png │ │ │ │ ├── Icon-40@2x.png │ │ │ │ ├── Icon-40@3x.png │ │ │ │ ├── Icon-60@2x.png │ │ │ │ ├── Icon-60@3x.png │ │ │ │ ├── Icon-Small@2x.png │ │ │ │ ├── Icon-Small@3x.png │ │ │ │ └── iTunesArtwork@2x.png │ │ ├── AppDelegate.h │ │ ├── main.m │ │ └── TonNfcCardReactNativeTest.entitlements │ ├── TonNfcCardReactNativeTest.xcworkspace │ │ ├── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── contents.xcworkspacedata │ ├── TonNfcCardReactNativeTestTests │ │ └── Info.plist │ ├── TonNfcCardReactNativeTest-tvOSTests │ │ └── Info.plist │ └── Podfile │ ├── .prettierrc.js │ ├── contracts │ └── SetcodeMultisigWallet2.tvc │ ├── index.js │ ├── __tests__ │ └── App-test.js │ ├── metro.config.js │ ├── requestTestData.js │ ├── getOld2FA.js │ ├── addOwnerToMultisig.js │ ├── request2FA.js │ ├── README.md │ ├── getNew2FA.js │ └── requestRecoveryData.js ├── demo ├── ever-wallet │ ├── contract │ │ ├── README.txt │ │ ├── Wallet.code.boc │ │ └── everWallet.abi.json │ ├── .vscode │ │ ├── extensions.json │ │ ├── tasks.json │ │ └── settings.json │ ├── .editorconfig │ ├── .prettierrc │ ├── .eslintrc.json │ ├── tsconfig.json │ └── package.json ├── msig-wallet │ ├── .vscode │ │ ├── extensions.json │ │ ├── tasks.json │ │ └── settings.json │ ├── contract │ │ ├── SetcodeMultisig.code.boc │ │ └── README.txt │ ├── .editorconfig │ ├── .prettierrc │ ├── .eslintrc.json │ ├── tsconfig.json │ └── package.json ├── paginate-transactions │ ├── .vscode │ │ ├── extensions.json │ │ ├── tasks.json │ │ └── settings.json │ ├── contract │ │ ├── SetcodeMultisig.tvc │ │ └── README.txt │ ├── .editorconfig │ ├── .prettierrc │ ├── .eslintrc.json │ ├── tsconfig.json │ ├── package.json │ └── README.md ├── subscribe-transactions │ ├── .vscode │ │ ├── extensions.json │ │ ├── tasks.json │ │ └── settings.json │ ├── contract │ │ ├── SetcodeMultisig.tvc │ │ └── README.txt │ ├── .editorconfig │ ├── .prettierrc │ ├── .eslintrc.json │ ├── tsconfig.json │ └── package.json ├── hello-wallet │ ├── HelloWallet.tvc │ ├── contracts │ │ ├── HelloWallet.tvc │ │ ├── HelloWallet.abi.json │ │ └── GiverV2.abi.json │ ├── GiverV2.keys.json │ ├── package.json │ └── HelloWallet.abi.json ├── web_p2p_exchange │ ├── pics │ │ ├── algo.png │ │ ├── Buyer_1.png │ │ ├── Buyer_2.png │ │ ├── Buyer_3.png │ │ ├── Seller_1.png │ │ └── Seller_2.png │ ├── src │ │ ├── ton-contracts │ │ │ ├── Offer.tvc │ │ │ ├── SafeMultisigWallet.tvc │ │ │ ├── makePackage.sh │ │ │ ├── giver.abi.json │ │ │ └── giver.package.js │ │ └── helpers.js │ ├── dist │ │ └── index.css │ ├── .eslintrc.js │ └── webpack.config.js └── exchange │ ├── package.json │ ├── account-transactions.js │ ├── all-transactions.js │ ├── blockchain.js │ └── utils.js ├── utils ├── index.d.ts ├── package.json └── index.js ├── .gitmodules └── demo.json /core-examples/node-js/func/gqlwalletv4/everdev signers: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core-examples/node-js/encode_tvc/.gitignore: -------------------------------------------------------------------------------- 1 | /updated.tvc 2 | -------------------------------------------------------------------------------- /core-examples/node-js/collections/.gitignore: -------------------------------------------------------------------------------- 1 | /package-lock.json 2 | -------------------------------------------------------------------------------- /core-examples/node-js/subscription/.gitignore: -------------------------------------------------------------------------------- 1 | /package-lock.json 2 | -------------------------------------------------------------------------------- /appkit-examples/multisig/.gitignore: -------------------------------------------------------------------------------- 1 | keyPair.json 2 | seedPhrase.json 3 | -------------------------------------------------------------------------------- /core-examples/node-js/func/gqlwalletv4/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /core-examples/node-js/update_initial_data/.gitignore: -------------------------------------------------------------------------------- 1 | /updated.tvc 2 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /demo/ever-wallet/contract/README.txt: -------------------------------------------------------------------------------- 1 | https://github.com/broxus/ever-wallet-contract 2 | 3 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /demo/ever-wallet/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["dbaeumer.vscode-eslint"] 3 | } 4 | -------------------------------------------------------------------------------- /demo/msig-wallet/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["dbaeumer.vscode-eslint"] 3 | } 4 | -------------------------------------------------------------------------------- /utils/index.d.ts: -------------------------------------------------------------------------------- 1 | export declare function loadContract(relativePath: string): { abi: any, tvc?: string }; 2 | -------------------------------------------------------------------------------- /core-examples/node-js/multisig-submit-tx/msig.keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": "", 3 | "secret": "" 4 | } 5 | -------------------------------------------------------------------------------- /demo/paginate-transactions/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["dbaeumer.vscode-eslint"] 3 | } 4 | -------------------------------------------------------------------------------- /demo/subscribe-transactions/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["dbaeumer.vscode-eslint"] 3 | } 4 | -------------------------------------------------------------------------------- /core-examples/node-js/subscription/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 4, 3 | "useTabs": false, 4 | "semi": false 5 | } 6 | -------------------------------------------------------------------------------- /core-examples/node-js/transfer-with-comment/address.txt: -------------------------------------------------------------------------------- 1 | 0:95e48855a12a9939d1b4799005633169feee4b486e23843669d2ddc3ff53b2cf -------------------------------------------------------------------------------- /core-examples/react-jest/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /core-examples/node-js/message-monitor/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["dbaeumer.vscode-eslint"] 3 | } 4 | -------------------------------------------------------------------------------- /demo/hello-wallet/HelloWallet.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/hello-wallet/HelloWallet.tvc -------------------------------------------------------------------------------- /demo/web_p2p_exchange/pics/algo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/web_p2p_exchange/pics/algo.png -------------------------------------------------------------------------------- /utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "utils", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "dependencies": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ton-labs-contracts"] 2 | path = ton-labs-contracts 3 | url = git@github.com:tonlabs/ton-labs-contracts.git 4 | -------------------------------------------------------------------------------- /demo/web_p2p_exchange/pics/Buyer_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/web_p2p_exchange/pics/Buyer_1.png -------------------------------------------------------------------------------- /demo/web_p2p_exchange/pics/Buyer_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/web_p2p_exchange/pics/Buyer_2.png -------------------------------------------------------------------------------- /demo/web_p2p_exchange/pics/Buyer_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/web_p2p_exchange/pics/Buyer_3.png -------------------------------------------------------------------------------- /demo/web_p2p_exchange/pics/Seller_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/web_p2p_exchange/pics/Seller_1.png -------------------------------------------------------------------------------- /demo/web_p2p_exchange/pics/Seller_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/web_p2p_exchange/pics/Seller_2.png -------------------------------------------------------------------------------- /core-examples/web-pack/hello/pics/algo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/web-pack/hello/pics/algo.png -------------------------------------------------------------------------------- /demo/ever-wallet/contract/Wallet.code.boc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/ever-wallet/contract/Wallet.code.boc -------------------------------------------------------------------------------- /appkit-examples/custom-giver/HelloWallet.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/appkit-examples/custom-giver/HelloWallet.tvc -------------------------------------------------------------------------------- /appkit-examples/hello-wallet/HelloWallet.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/appkit-examples/hello-wallet/HelloWallet.tvc -------------------------------------------------------------------------------- /core-examples/node-js/pagination/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 4, 3 | "useTabs": false, 4 | "printWidth": 100, 5 | "semi": false 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/react-jest/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/react-jest/public/favicon.ico -------------------------------------------------------------------------------- /core-examples/react-jest/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/react-jest/public/logo192.png -------------------------------------------------------------------------------- /core-examples/react-jest/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/react-jest/public/logo512.png -------------------------------------------------------------------------------- /core-examples/web-pack/hello/pics/Buyer_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/web-pack/hello/pics/Buyer_1.png -------------------------------------------------------------------------------- /core-examples/web-pack/hello/pics/Buyer_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/web-pack/hello/pics/Buyer_2.png -------------------------------------------------------------------------------- /core-examples/web-pack/hello/pics/Buyer_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/web-pack/hello/pics/Buyer_3.png -------------------------------------------------------------------------------- /demo/hello-wallet/contracts/HelloWallet.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/hello-wallet/contracts/HelloWallet.tvc -------------------------------------------------------------------------------- /core-examples/web-pack/hello/dist/eversdk.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/web-pack/hello/dist/eversdk.wasm -------------------------------------------------------------------------------- /core-examples/web-pack/hello/pics/Seller_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/web-pack/hello/pics/Seller_1.png -------------------------------------------------------------------------------- /core-examples/web-pack/hello/pics/Seller_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/web-pack/hello/pics/Seller_2.png -------------------------------------------------------------------------------- /appkit-examples/listen-and-decode/HelloEvents.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/appkit-examples/listen-and-decode/HelloEvents.tvc -------------------------------------------------------------------------------- /core-examples/node-js/custom-giver/HelloWallet.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/node-js/custom-giver/HelloWallet.tvc -------------------------------------------------------------------------------- /core-examples/node-js/func/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.39.0", 4 | "@eversdk/lib-node": "^1.39.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/node-js/multisig-payload/DePool.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/node-js/multisig-payload/DePool.tvc -------------------------------------------------------------------------------- /demo/exchange/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.37.0", 4 | "@eversdk/lib-node": "^1.37.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /demo/msig-wallet/contract/SetcodeMultisig.code.boc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/msig-wallet/contract/SetcodeMultisig.code.boc -------------------------------------------------------------------------------- /demo/web_p2p_exchange/src/ton-contracts/Offer.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/web_p2p_exchange/src/ton-contracts/Offer.tvc -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/utils/sleep.js: -------------------------------------------------------------------------------- 1 | module.exports = (ms = 0) => new Promise(resolve => setTimeout(resolve, ms)) 2 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/next-js/hello-next-js/public/favicon.ico -------------------------------------------------------------------------------- /demo/paginate-transactions/contract/SetcodeMultisig.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/paginate-transactions/contract/SetcodeMultisig.tvc -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/next-js/normal-transfer/public/favicon.ico -------------------------------------------------------------------------------- /core-examples/node-js/run_get/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.37.0", 4 | "@eversdk/lib-node": "^1.37.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /demo/subscribe-transactions/contract/SetcodeMultisig.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/subscribe-transactions/contract/SetcodeMultisig.tvc -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TonNfcCardReactNativeTest", 3 | "displayName": "TonNfcCardReactNativeTest" 4 | } -------------------------------------------------------------------------------- /core-examples/node-js/codehash/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.37.0", 4 | "@eversdk/lib-node": "^1.37.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/node-js/decode_boc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.37.0", 4 | "@eversdk/lib-node": "^1.37.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/node-js/decode_tvc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.37.0", 4 | "@eversdk/lib-node": "^1.37.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/node-js/deploy-with-initial-data/Timestamp.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/node-js/deploy-with-initial-data/Timestamp.tvc -------------------------------------------------------------------------------- /core-examples/node-js/encode_tvc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.37.0", 4 | "@eversdk/lib-node": "^1.37.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/node-js/hello-wallet/contracts/HelloWallet.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/node-js/hello-wallet/contracts/HelloWallet.tvc -------------------------------------------------------------------------------- /core-examples/node-js/run_executor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.37.0", 4 | "@eversdk/lib-node": "^1.37.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/node-js/subscribe-and-decode/HelloEvents.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/node-js/subscribe-and-decode/HelloEvents.tvc -------------------------------------------------------------------------------- /core-examples/node-js/update_initial_data/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1", 4 | "@eversdk/lib-node": "^1" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /demo/msig-wallet/contract/README.txt: -------------------------------------------------------------------------------- 1 | https://github.com/EverSurf/contracts/blob/main/multisig2/SetcodeMultisig.sol 2 | 3 | This contract was compiled with solc ver. 0.66.0 4 | -------------------------------------------------------------------------------- /core-examples/node-js/gen-keys-matching-to-shards/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.38.0", 4 | "@eversdk/lib-node": "^1.38.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/node-js/message-monitor/contract/MyContract.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/node-js/message-monitor/contract/MyContract.tvc -------------------------------------------------------------------------------- /core-examples/node-js/multisig-payload/SafeMultisigWallet.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/node-js/multisig-payload/SafeMultisigWallet.tvc -------------------------------------------------------------------------------- /demo/web_p2p_exchange/src/ton-contracts/SafeMultisigWallet.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/demo/web_p2p_exchange/src/ton-contracts/SafeMultisigWallet.tvc -------------------------------------------------------------------------------- /core-examples/node-js/decode_account_data/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.37.0", 4 | "@eversdk/lib-node": "^1.37.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/node-js/decode_initial_data/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.37.0", 4 | "@eversdk/lib-node": "^1.37.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/node-js/encode_initial_data/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.37.0", 4 | "@eversdk/lib-node": "^1.37.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/node-js/get_compiler_version/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/core": "^1.37.0", 4 | "@eversdk/lib-node": "^1.37.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /core-examples/node-js/multisig/contracts/SafeMultisigWallet.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/node-js/multisig/contracts/SafeMultisigWallet.tvc -------------------------------------------------------------------------------- /demo/paginate-transactions/contract/README.txt: -------------------------------------------------------------------------------- 1 | https://github.com/EverSurf/contracts/blob/main/multisig2/SetcodeMultisig.sol 2 | 3 | This contract was compiled with solc ver. 0.66.0 4 | -------------------------------------------------------------------------------- /demo/subscribe-transactions/contract/README.txt: -------------------------------------------------------------------------------- 1 | https://github.com/EverSurf/contracts/blob/main/multisig2/SetcodeMultisig.sol 2 | 3 | This contract was compiled with solc ver. 0.66.0 4 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/utils/convert.js: -------------------------------------------------------------------------------- 1 | const convert = (from, to) => data => Buffer.from(data, from).toString(to) 2 | module.exports = convert 3 | -------------------------------------------------------------------------------- /core-examples/node-js/collections/contracts/SafeMultisigWallet.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/node-js/collections/contracts/SafeMultisigWallet.tvc -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/utils/strip0xPad64.js: -------------------------------------------------------------------------------- 1 | module.exports = str => 2 | str 3 | .trim() 4 | .replace(/^0x/, '') 5 | .padStart(64, '0') 6 | -------------------------------------------------------------------------------- /appkit-examples/multisig/contracts.js: -------------------------------------------------------------------------------- 1 | const { loadContract } = require ( "utils"); 2 | 3 | module.exports = { 4 | MultisigContract: loadContract("solidity/safemultisig/SafeMultisigWallet"), 5 | }; 6 | -------------------------------------------------------------------------------- /appkit-examples/run_executor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/appkit": "^0.3.0", 4 | "@eversdk/core": "^1", 5 | "@eversdk/lib-node": "^1.14.0" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | TonNfcCardReactNativeTest 3 | 4 | -------------------------------------------------------------------------------- /core-examples/node-js/gen-keys-matching-to-shards/contracts/someContract.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/node-js/gen-keys-matching-to-shards/contracts/someContract.tvc -------------------------------------------------------------------------------- /core-examples/node-js/transfer-with-comment/contracts/SafeMultisigWallet.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/core-examples/node-js/transfer-with-comment/contracts/SafeMultisigWallet.tvc -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /appkit-examples/fee-calculation/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@eversdk/appkit": "^0.3.0", 4 | "@eversdk/core": "^1.37.0", 5 | "@eversdk/lib-node": "^1.37.0" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /core-examples/node-js/remp/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "tabWidth": 4, 4 | "singleQuote": true, 5 | "trailingComma": "all", 6 | "semi": true, 7 | "arrowParens": "avoid" 8 | } 9 | -------------------------------------------------------------------------------- /demo/hello-wallet/GiverV2.keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": "2ada2e65ab8eeab09490e3521415f45b6e42df9c760a639bcf53957550b25a16", 3 | "secret": "172af540e43a524763dd53b26a066d472a97c4de37d5498170564510608250c3" 4 | } 5 | -------------------------------------------------------------------------------- /core-examples/node-js/hello-wallet/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "tabWidth": 4, 4 | "singleQuote": true, 5 | "trailingComma": "all", 6 | "semi": true, 7 | "arrowParens": "avoid" 8 | } 9 | -------------------------------------------------------------------------------- /demo.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.5", 3 | "applications": [ 4 | { 5 | "name": "hello-wallet", 6 | "description": "Simple NodeJs Application", 7 | "path": "demo/hello-wallet" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /demo/ever-wallet/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /demo/msig-wallet/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /core-examples/node-js/func/GiverV2.keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": "2ada2e65ab8eeab09490e3521415f45b6e42df9c760a639bcf53957550b25a16", 3 | "secret": "172af540e43a524763dd53b26a066d472a97c4de37d5498170564510608250c3" 4 | } 5 | -------------------------------------------------------------------------------- /core-examples/node-js/run_executor/GiverV2.keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": "2ada2e65ab8eeab09490e3521415f45b6e42df9c760a639bcf53957550b25a16", 3 | "secret": "172af540e43a524763dd53b26a066d472a97c4de37d5498170564510608250c3" 4 | } -------------------------------------------------------------------------------- /core-examples/node-js/signingBox/GiverV2.keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": "2ada2e65ab8eeab09490e3521415f45b6e42df9c760a639bcf53957550b25a16", 3 | "secret": "172af540e43a524763dd53b26a066d472a97c4de37d5498170564510608250c3" 4 | } -------------------------------------------------------------------------------- /core-examples/web-pack/hello/src/GiverV2.keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": "2ada2e65ab8eeab09490e3521415f45b6e42df9c760a639bcf53957550b25a16", 3 | "secret": "172af540e43a524763dd53b26a066d472a97c4de37d5498170564510608250c3" 4 | } -------------------------------------------------------------------------------- /core-examples/node-js/remp/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /core-examples/node-js/transfer-with-comment/keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": "951fcc028d244fcc131eb8ebfb970c4513cc55c401f7bdb808b65640f4d79bfa", 3 | "secret": "99cf0c6ad69a9a8827a3b0930c20533795be8f65264fa90ae3128075ec8b3344" 4 | } -------------------------------------------------------------------------------- /demo/paginate-transactions/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /core-examples/node-js/deploy-with-initial-data/GiverV2.keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": "2ada2e65ab8eeab09490e3521415f45b6e42df9c760a639bcf53957550b25a16", 3 | "secret": "172af540e43a524763dd53b26a066d472a97c4de37d5498170564510608250c3" 4 | } -------------------------------------------------------------------------------- /core-examples/node-js/hello-wallet/GiverV2.keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": "2ada2e65ab8eeab09490e3521415f45b6e42df9c760a639bcf53957550b25a16", 3 | "secret": "172af540e43a524763dd53b26a066d472a97c4de37d5498170564510608250c3" 4 | } 5 | -------------------------------------------------------------------------------- /demo/subscribe-transactions/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/debug.keystore -------------------------------------------------------------------------------- /core-examples/node-js/hello-wallet/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /core-examples/node-js/message-monitor/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import '@/styles/globals.css' 2 | import type { AppProps } from 'next/app' 3 | 4 | export default function App({ Component, pageProps }: AppProps) { 5 | return 6 | } 7 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/contracts/SetcodeMultisigWallet2.tvc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/contracts/SetcodeMultisigWallet2.tvc -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /core-examples/node-js/func/gqlwalletv4/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, 3 | "eslint.validate": ["typescript"], 4 | "errorLens.enabledDiagnosticLevels": ["error"], 5 | "editor.rulers": [100] 6 | } 7 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/prep.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs") 2 | const path = require("path") 3 | 4 | fs.copyFileSync( 5 | path.resolve(__dirname, "node_modules", "@eversdk", "lib-web", "eversdk.wasm"), 6 | path.resolve(__dirname, "public", "eversdk.wasm") 7 | ) 8 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/utils/pipeWhileNotNil.js: -------------------------------------------------------------------------------- 1 | const R = require('ramda') 2 | 3 | module.exports = R.curry((arr, val) => R.pipeWith( 4 | (f, x) => (R.isNil(x) ? null : f(x)), // 5 | [(x) => (R.isNil(x) ? null : x), ...arr] 6 | )(val)) 7 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /appkit-examples/depool-statistics/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "start": "node index.js" 4 | }, 5 | "dependencies": { 6 | "@eversdk/appkit": "^0", 7 | "@eversdk/core": "^1.37.0", 8 | "@eversdk/lib-node": "^1.37.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /core-examples/node-js/message-monitor/.eslintignore: -------------------------------------------------------------------------------- 1 | # /node_modules/* in the project root is ignored by default 2 | # build artefacts 3 | dist/* 4 | coverage/* 5 | # data definition files 6 | **/*.d.ts 7 | # 3rd party libs 8 | /src/public/ 9 | # custom definition files 10 | /src/types/ -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /core-examples/node-js/pagination/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "env": { 3 | "commonjs": true, 4 | "es2020": true, 5 | "node": true 6 | }, 7 | "extends": "eslint:recommended", 8 | "parserOptions": { 9 | "ecmaVersion": 11 10 | }, 11 | "rules": { 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /demo/web_p2p_exchange/src/ton-contracts/makePackage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | name=${1%.*} # filename without extension 3 | abi=`cat ${name}.abi.json` 4 | image=`cat ${name}.tvc | base64 -w 0` 5 | 6 | echo "const abi = ${abi};" \ 7 | "const imageBase64 = \"${image}\";" \ 8 | "module.exports = {abi, tvc: imageBase64}" > ${name}.package.js 9 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { Html, Head, Main, NextScript } from 'next/document' 2 | 3 | export default function Document() { 4 | return ( 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /core-examples/rust/message-monitoring/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "message-monitor-example" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | ton_client = { git = 'https://github.com/tonlabs/ever-sdk.git', tag = '1.42.0' } 8 | tokio = "^1" 9 | serde_json = "^1" 10 | clap = { version = "4.1.8", features = ["derive"] } 11 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/everx-labs/sdk-samples/HEAD/nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/Images.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /appkit-examples/transfer-with-comment/transfer.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "functions": [ 4 | { 5 | "name": "transfer", 6 | "id": "0x00000000", 7 | "inputs": [{"name":"comment","type":"bytes"}], 8 | "outputs": [] 9 | } 10 | ], 11 | "events": [], 12 | "data": [] 13 | } -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Sep 08 22:38:16 MSK 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /core-examples/node-js/transfer-with-comment/transfer.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "functions": [ 4 | { 5 | "name": "transfer", 6 | "id": "0x00000000", 7 | "inputs": [{"name":"comment","type":"bytes"}], 8 | "outputs": [] 9 | } 10 | ], 11 | "events": [], 12 | "data": [] 13 | } -------------------------------------------------------------------------------- /core-examples/node-js/utils.convert_address/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS SDK multisig submit transaction example 2 | 3 | In this example we convert address in one format to another 4 | 5 | ## Prerequisite 6 | 7 | - Node.js >= [14.x installed](https://nodejs.org) 8 | 9 | 10 | ## Install packages & run: 11 | 12 | ```sh 13 | npm install 14 | node index.js 15 | ``` 16 | -------------------------------------------------------------------------------- /core-examples/node-js/codehash/README.md: -------------------------------------------------------------------------------- 1 | # Codehash example 2 | 3 | In this example we demonstrate how to get account code hash from a contract tvc without 4 | deploying it to a network. 5 | 6 | ## Prerequisite 7 | 8 | * Node.js >= [14.x installed](https://nodejs.org) 9 | 10 | 11 | ## Install packages and run: 12 | 13 | ```sh 14 | npm i 15 | node index.js 16 | ``` 17 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/src/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import {Html, Head, Main, NextScript} from 'next/document' 2 | 3 | export default function Document() { 4 | return ( 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/utils/promiseTimeout.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const promiseTimeout = (ms, promise) => 3 | Promise.race([ 4 | promise, 5 | new Promise((resolve, reject) => { 6 | setTimeout(() => reject(Error(`Exited by timeout ${ms} ms.`)), ms) 7 | }), 8 | ]) 9 | 10 | module.exports = promiseTimeout 11 | -------------------------------------------------------------------------------- /appkit-examples/listen-and-decode/contracts.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | 4 | const read = name => fs.readFileSync(path.resolve(__dirname, name)); 5 | module.exports = { 6 | HelloEventsContract: { 7 | abi: JSON.parse(read("HelloEvents.abi.json").toString()), 8 | tvc: read("HelloEvents.tvc").toString("base64"), 9 | } 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core-examples/node-js/gen-keys-matching-to-shards/README.md: -------------------------------------------------------------------------------- 1 | This is an example of generating a key pair for a given contract such that its future address will match the given shard. 2 | 3 | ## Prerequisite 4 | 5 | - Node.js >= [14.x installed](https://nodejs.org) 6 | - Compiled contract, see `./contracts` directory 7 | 8 | ## Run an example 9 | 10 | ```sh 11 | npm i 12 | node index.js 13 | ``` 14 | -------------------------------------------------------------------------------- /core-examples/node-js/subscribe-and-decode/contracts.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | 4 | const read = name => fs.readFileSync(path.resolve(__dirname, name)); 5 | module.exports = { 6 | HelloEventsContract: { 7 | abi: JSON.parse(read("HelloEvents.abi.json").toString()), 8 | tvc: read("HelloEvents.tvc").toString("base64"), 9 | } 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /core-examples/node-js/custom-giver/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-wallet", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/core": "^1.37.0", 13 | "@eversdk/lib-node": "^1.37.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/pages/api/hello.ts: -------------------------------------------------------------------------------- 1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction 2 | import type { NextApiRequest, NextApiResponse } from 'next' 3 | 4 | type Data = { 5 | name: string 6 | } 7 | 8 | export default function handler( 9 | req: NextApiRequest, 10 | res: NextApiResponse 11 | ) { 12 | res.status(200).json({ name: 'John Doe' }) 13 | } 14 | -------------------------------------------------------------------------------- /core-examples/rust/subscribe-collection/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | authors = [ 'Alexey Vavilin ' ] 3 | edition = '2018' 4 | name = 'subscribe-collection-example' 5 | version = '0.1.0' 6 | 7 | [dependencies] 8 | serde_json = '1.0.41' 9 | tokio = { features = [ 'rt-multi-thread', 'macros', 'sync' ], version = '1' } 10 | ton_client = { git = 'https://github.com/tonlabs/ever-sdk.git', tag = '1.41.1' } 11 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/src/pages/api/hello.ts: -------------------------------------------------------------------------------- 1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction 2 | import type {NextApiRequest, NextApiResponse} from 'next' 3 | 4 | type Data = { 5 | name: string 6 | } 7 | 8 | export default function handler( 9 | req: NextApiRequest, 10 | res: NextApiResponse 11 | ) { 12 | res.status(200).json({name: 'John Doe'}) 13 | } 14 | -------------------------------------------------------------------------------- /core-examples/node-js/deploy-with-initial-data/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-wallet", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/core": "^1.37.0", 13 | "@eversdk/lib-node": "^1.37.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core-examples/node-js/run_get/README.md: -------------------------------------------------------------------------------- 1 | ## Before running the example 2 | 3 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 4 | - Remember its Development Network HTTPS endpoint. 5 | - Pass this endpoint as a parameter when running the example. 6 | 7 | ## Install packages & run: 8 | 9 | ```sh 10 | npm i 11 | node index.js 12 | ``` 13 | -------------------------------------------------------------------------------- /demo/hello-wallet/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-wallet", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "start": "node appkit.js" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/appkit": "^0", 13 | "@eversdk/core": "^1", 14 | "@eversdk/lib-node": "^1" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core-examples/node-js/cache/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cache-sample", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/core": "^1.37.0", 14 | "@eversdk/lib-node": "^1.37.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core-examples/node-js/transfer-with-comment/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "transfer-with-comment", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/core": "^1.7.0", 13 | "@eversdk/lib-node": "^1.7.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import("next").NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: true, 4 | transpilePackages: ['@eversdk/lib-web'], 5 | webpack(config) { 6 | config.output.webassemblyModuleFilename = './public/eversdk.wasm'; 7 | config.experiments = { asyncWebAssembly: true }; 8 | return config; 9 | }, 10 | }; 11 | 12 | module.exports = nextConfig; 13 | -------------------------------------------------------------------------------- /core-examples/node-js/counterparties_api/README.md: -------------------------------------------------------------------------------- 1 | ## Before running the example 2 | 3 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 4 | - Remember its Development Network HTTPS endpoint. 5 | - Pass this endpoint as a parameter when running the example. 6 | 7 | ## Install packages & run: 8 | 9 | ```sh 10 | npm i 11 | node index.js 12 | ``` 13 | -------------------------------------------------------------------------------- /core-examples/node-js/compress-decompress/README.md: -------------------------------------------------------------------------------- 1 | ### Notes 2 | 3 | "Hello world" String compression/decompression example with usage of [ZSTD library](https://github.com/facebook/zstd), integrated into ever-sdk. 4 | 5 | You can read more about [compression api here](https://docs.everos.dev/ever-sdk/reference/types-and-methods/mod_utils#compress_zstd). 6 | 7 | ## Run example 8 | 9 | ``` 10 | npm i 11 | node index.js 12 | ``` 13 | -------------------------------------------------------------------------------- /demo/ever-wallet/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "tabWidth": 4, 4 | "semi": false, 5 | "singleQuote": false, 6 | "printWidth": 80, 7 | "arrowParens": "avoid", 8 | "bracketSpacing": true, 9 | "endOfLine": "lf", 10 | "proseWrap": "preserve", 11 | "quoteProps": "as-needed", 12 | "requirePragma": false, 13 | "useTabs": false 14 | } 15 | -------------------------------------------------------------------------------- /demo/msig-wallet/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "tabWidth": 4, 4 | "semi": false, 5 | "singleQuote": false, 6 | "printWidth": 80, 7 | "arrowParens": "avoid", 8 | "bracketSpacing": true, 9 | "endOfLine": "lf", 10 | "proseWrap": "preserve", 11 | "quoteProps": "as-needed", 12 | "requirePragma": false, 13 | "useTabs": false 14 | } 15 | -------------------------------------------------------------------------------- /appkit-examples/custom-giver/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-wallet", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/appkit": "^0", 13 | "@eversdk/core": "^1.37.0", 14 | "@eversdk/lib-node": "^1.37.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /appkit-examples/hello-wallet/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-wallet", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/appkit": "^0", 13 | "@eversdk/core": "^1.37.0", 14 | "@eversdk/lib-node": "^1.37.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core-examples/node-js/abi.encode_boc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "abi-encode-boc", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/core": "^1.37.0", 14 | "@eversdk/lib-node": "^1.37.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core-examples/node-js/pagination/utils.js: -------------------------------------------------------------------------------- 1 | function print(title, pageNum, results) { 2 | const header = `${title}, page ${pageNum}` 3 | console.log(header) 4 | console.log('-'.repeat(header.length)) 5 | for (const x of results) { 6 | console.log(x) 7 | } 8 | } 9 | 10 | function sleep(ms = 0) { 11 | return new Promise((resolve) => setTimeout(resolve, ms)) 12 | } 13 | 14 | module.exports = { print, sleep } 15 | -------------------------------------------------------------------------------- /core-examples/node-js/encryption-box/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "encryption-box-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/core": "^1.37.0", 14 | "@eversdk/lib-node": "^1.37.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core-examples/react-jest/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /demo/paginate-transactions/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "tabWidth": 4, 4 | "semi": false, 5 | "singleQuote": false, 6 | "printWidth": 80, 7 | "arrowParens": "avoid", 8 | "bracketSpacing": true, 9 | "endOfLine": "lf", 10 | "proseWrap": "preserve", 11 | "quoteProps": "as-needed", 12 | "requirePragma": false, 13 | "useTabs": false 14 | } 15 | -------------------------------------------------------------------------------- /core-examples/node-js/multisig-submit-tx/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multisig-submittx", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/core": "^1.37.0", 13 | "@eversdk/lib-node": "^1.37.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /demo/subscribe-transactions/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "tabWidth": 4, 4 | "semi": false, 5 | "singleQuote": false, 6 | "printWidth": 80, 7 | "arrowParens": "avoid", 8 | "bracketSpacing": true, 9 | "endOfLine": "lf", 10 | "proseWrap": "preserve", 11 | "quoteProps": "as-needed", 12 | "requirePragma": false, 13 | "useTabs": false 14 | } 15 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /core-examples/node-js/utils.convert_address/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multisig-submittx", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/core": "^1.37.0", 13 | "@eversdk/lib-node": "^1.37.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core-examples/react-jest/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /core-examples/node-js/crypto-box/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "crypto-box", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/core": "^1.37.0", 14 | "@eversdk/lib-node": "^1.37.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core-examples/node-js/message-monitor/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "tabWidth": 4, 4 | "semi": false, 5 | "singleQuote": false, 6 | "printWidth": 80, 7 | "arrowParens": "avoid", 8 | "bracketSpacing": true, 9 | "endOfLine": "lf", 10 | "proseWrap": "preserve", 11 | "quoteProps": "as-needed", 12 | "requirePragma": false, 13 | "useTabs": false 14 | } 15 | -------------------------------------------------------------------------------- /core-examples/react-jest/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /core-examples/node-js/blockchain-statistics/README.md: -------------------------------------------------------------------------------- 1 | # Query statistics 2 | 3 | ## Before running the example 4 | 5 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 6 | - Remember its Development Network HTTPS endpoint. 7 | - Pass this endpoint as a parameter when running the example. 8 | 9 | ## Install packages & run: 10 | 11 | ```sh 12 | npm i 13 | node index.js 14 | ``` 15 | -------------------------------------------------------------------------------- /core-examples/node-js/signingBox/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tonsigningbox", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/core": "^1.37.0", 14 | "@eversdk/lib-node": "^1.37.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core-examples/node-js/pagination/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "format": "prettier --write \"**/*.js\"", 4 | "eslint": "eslint \"**/*.js\"", 5 | "eslint-fix": "eslint \"**/*.js\" --fix", 6 | "start": "node index.js" 7 | }, 8 | "dependencies": { 9 | "@eversdk/core": "^1.37.0", 10 | "@eversdk/lib-node": "^1.37.0" 11 | }, 12 | "devDependencies": { 13 | "eslint": "^8.16.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core-examples/node-js/blockchain_api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blockchain", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/core": "^1.37.0", 13 | "@eversdk/lib-node": "^1.37.0" 14 | }, 15 | "devDependencies": { 16 | "eslint": "^8.5.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core-examples/node-js/compress-decompress/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "format": "prettier --write \"**/*.js\"", 4 | "eslint": "eslint \"**/*.js\"", 5 | "eslint-fix": "eslint \"**/*.js\" --fix", 6 | "start": "node index.js" 7 | }, 8 | "dependencies": { 9 | "@eversdk/core": "^1.37.0", 10 | "@eversdk/lib-node": "^1.37.0" 11 | }, 12 | "devDependencies": { 13 | "eslint": "^8.16.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core-examples/node-js/hello-wallet/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-wallet", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/core": "^1.37.0", 13 | "@eversdk/lib-node": "^1.37.0" 14 | }, 15 | "devDependencies": { 16 | "eslint": "^8.5.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core-examples/node-js/query_transaction_tree/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "format": "prettier --write \"**/*.js\"", 4 | "eslint": "eslint \"**/*.js\"", 5 | "eslint-fix": "eslint \"**/*.js\" --fix", 6 | "start": "node index.js" 7 | }, 8 | "dependencies": { 9 | "@eversdk/core": "^1.37.0", 10 | "@eversdk/lib-node": "^1.37.0" 11 | }, 12 | "devDependencies": { 13 | "eslint": "^8.16.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest/TonNfcCardReactNativeTest.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.nfc.readersession.formats 6 | 7 | TAG 8 | NDEF 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /core-examples/node-js/counterparties_api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "counterparties", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/core": "^1.37.0", 13 | "@eversdk/lib-node": "^1.37.0" 14 | }, 15 | "devDependencies": { 16 | "eslint": "^8.5.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /demo/ever-wallet/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es2021": true, 4 | "node": true 5 | }, 6 | "extends": [ 7 | "eslint:recommended", 8 | "plugin:@typescript-eslint/recommended" 9 | ], 10 | "parser": "@typescript-eslint/parser", 11 | "parserOptions": { 12 | "ecmaVersion": 12, 13 | "sourceType": "module" 14 | }, 15 | "plugins": [ 16 | "@typescript-eslint" 17 | ], 18 | "rules": { 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo/msig-wallet/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es2021": true, 4 | "node": true 5 | }, 6 | "extends": [ 7 | "eslint:recommended", 8 | "plugin:@typescript-eslint/recommended" 9 | ], 10 | "parser": "@typescript-eslint/parser", 11 | "parserOptions": { 12 | "ecmaVersion": 12, 13 | "sourceType": "module" 14 | }, 15 | "plugins": [ 16 | "@typescript-eslint" 17 | ], 18 | "rules": { 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core-examples/node-js/blockchain-statistics/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blockchain-statistics", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/core": "^1.37.0", 13 | "@eversdk/lib-node": "^1.37.0" 14 | }, 15 | "devDependencies": { 16 | "eslint": "^8.7.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core-examples/node-js/paginate-blockchain-transactions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blockchain", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@eversdk/core": "^1.37.0", 13 | "@eversdk/lib-node": "^1.37.0" 14 | }, 15 | "devDependencies": { 16 | "eslint": "^8.5.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core-examples/node-js/remp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "remp", 3 | "version": "1.0.0", 4 | "description": "", 5 | "scripts": { 6 | "lint": "eslint", 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "eslint": "^8.28.0" 13 | }, 14 | "dependencies": { 15 | "@eversdk/core": "^1.41.1", 16 | "@eversdk/lib-node": "^1.41.1" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /demo/paginate-transactions/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es2021": true, 4 | "node": true 5 | }, 6 | "extends": [ 7 | "eslint:recommended", 8 | "plugin:@typescript-eslint/recommended" 9 | ], 10 | "parser": "@typescript-eslint/parser", 11 | "parserOptions": { 12 | "ecmaVersion": 12, 13 | "sourceType": "module" 14 | }, 15 | "plugins": [ 16 | "@typescript-eslint" 17 | ], 18 | "rules": { 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /appkit-examples/cache/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cache-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/core": "^1.37.0", 14 | "@eversdk/lib-node": "^1.37.0" 15 | }, 16 | "devDependencies": { 17 | "@types/node": "^14.14.31" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /core-examples/node-js/crypto-box/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS SDK Crypto Box example 2 | 3 | In this example we demonstrate how to use crypto boxes. 4 | 5 | ## Prerequisite 6 | 7 | * Node.js >= [14.x installed](https://nodejs.org) 8 | 9 | ## Preparation 10 | 11 | Install packages and run: 12 | 13 | ```shell 14 | $ npm i 15 | $ node index 16 | Signature of the "Hello" is: 2936ffcdf54fa8b9d03199cdbbf57cab65bea822d6b3e1ae6538764d7ed5e0a027089e4e2b2853c5db91b50e327fa32302edaa32fe57c219236abfd867ac450e 17 | ``` 18 | -------------------------------------------------------------------------------- /demo/subscribe-transactions/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es2021": true, 4 | "node": true 5 | }, 6 | "extends": [ 7 | "eslint:recommended", 8 | "plugin:@typescript-eslint/recommended" 9 | ], 10 | "parser": "@typescript-eslint/parser", 11 | "parserOptions": { 12 | "ecmaVersion": 12, 13 | "sourceType": "module" 14 | }, 15 | "plugins": [ 16 | "@typescript-eslint" 17 | ], 18 | "rules": { 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /appkit-examples/listen-and-decode/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "listen-and-decode-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/appkit": "^0", 14 | "@eversdk/core": "^1.37.0", 15 | "@eversdk/lib-node": "^1.37.0" 16 | }, 17 | "devDependencies": { 18 | "@types/node": "^14.14.31" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /utils/index.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | 4 | function loadContract(relativePath) { 5 | function load(suffix) { 6 | return fs.readFileSync( 7 | path.resolve(__dirname, "../ton-labs-contracts", `${relativePath}${suffix}`), 8 | ); 9 | } 10 | 11 | return { 12 | abi: JSON.parse(load(".abi.json").toString()), 13 | tvc: load(".tvc").toString("base64"), 14 | }; 15 | 16 | } 17 | 18 | module.exports = { loadContract }; 19 | -------------------------------------------------------------------------------- /core-examples/node-js/subscription/fetch.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a stub for fetching messages. 3 | * See a working example of fetching messages from some point in time and moving forward until now 4 | * here: https://github.com/tonlabs/sdk-samples/blob/master/core-examples/node-js/pagination 5 | */ 6 | 7 | // eslint-disable-next-line no-unused-vars 8 | async function fetch(client, query, from) { 9 | console.log("Fetching all messages from %d to now", from) 10 | return [] 11 | } 12 | 13 | module.exports = { fetch } 14 | -------------------------------------------------------------------------------- /core-examples/node-js/encode_boc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "transfer-with-comment-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/core": "^1.37.0", 14 | "@eversdk/lib-node": "^1.37.0" 15 | }, 16 | "devDependencies": { 17 | "@types/node": "^14.14.31" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /core-examples/node-js/collections/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sdk-subscription", 3 | "version": "1.0.0", 4 | "description": "How to use SDK subscription", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": ["FreeTON", "TON", "SDK", "subscription"], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/core": "^1.37.0", 14 | "@eversdk/lib-node": "^1.37.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core-examples/node-js/subscribe-and-decode/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "listen-and-decode-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/core": "^1.37.0", 14 | "@eversdk/lib-node": "^1.37.0" 15 | }, 16 | "devDependencies": { 17 | "@types/node": "^14.14.31" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /core-examples/node-js/multisig/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multisig", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/appkit": "^0", 14 | "@eversdk/core": "^1.37.0", 15 | "@eversdk/lib-node": "^1.37.0" 16 | }, 17 | "devDependencies": { 18 | "@types/node": "^14.14.31" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /core-examples/node-js/subscription/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sdk-subscription", 3 | "version": "1.1.0", 4 | "description": "How to use SDK subscription", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [ 10 | "FreeTON", 11 | "TON", 12 | "SDK", 13 | "subscription" 14 | ], 15 | "author": "", 16 | "license": "ISC", 17 | "dependencies": { 18 | "@eversdk/core": "^1.37.0", 19 | "@eversdk/lib-node": "^1.37.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /core-examples/node-js/multisig-payload/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-demo", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/appkit": "^0", 14 | "@eversdk/core": "^1.37.0", 15 | "@eversdk/lib-node": "^1.37.0" 16 | }, 17 | "devDependencies": { 18 | "@types/node": "^14.14.31" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /core-examples/node-js/pagination/requests/getLastMasterBlockSeqNoByTime.js: -------------------------------------------------------------------------------- 1 | async function getLastMasterBlockSeqNoByTime(client, utime) { 2 | return ( 3 | await client.net.query({ 4 | query: `query MyQuery($utime: Int){ 5 | blockchain { 6 | master_seq_no_range(time_end: $utime) { end } 7 | } 8 | }`, 9 | variables: { utime }, 10 | }) 11 | ).result.data.blockchain.master_seq_no_range.end 12 | } 13 | 14 | module.exports = { 15 | getLastMasterBlockSeqNoByTime, 16 | } 17 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/src/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import '@/styles/globals.css' 2 | import type {AppProps} from 'next/app' 3 | import {TonClientContextProvider} from "@/context/tonclient" 4 | import {ClientConfig} from "@eversdk/core" 5 | 6 | export default function App({Component, pageProps}: AppProps) { 7 | const config: ClientConfig = { 8 | network: { 9 | endpoints: ["http://localhost"] 10 | } 11 | } 12 | 13 | return 14 | } 15 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /core-examples/node-js/blockchain_api/README.md: -------------------------------------------------------------------------------- 1 | ## Before running the example 2 | 3 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 4 | - Remember its Development Network HTTPS endpoint. 5 | - Pass this endpoint as a parameter when running the example. 6 | 7 | **Note**: This sample works with data from the past 3 days. To retrieve data older than 7 days, use `archive:true` flag in query filters. 8 | 9 | ## Install packages & run: 10 | 11 | ```sh 12 | npm i 13 | node index.js 14 | ``` 15 | -------------------------------------------------------------------------------- /core-examples/node-js/counterparties_api/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": true, 4 | "es2021": true, 5 | "node": true 6 | }, 7 | "extends": "eslint:recommended", 8 | "parserOptions": { 9 | "ecmaVersion": 12 10 | }, 11 | "rules": { 12 | "indent": [ 13 | "error", 14 | 4 15 | ], 16 | "linebreak-style": [ 17 | "error", 18 | "unix" 19 | ], 20 | "quotes": [ 21 | "error", 22 | "double" 23 | ], 24 | "semi": [ 25 | "error", 26 | "always" 27 | ] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core-examples/node-js/remp/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": true, 4 | "es2021": true, 5 | "node": true 6 | }, 7 | "extends": "eslint:recommended", 8 | "parserOptions": { 9 | "ecmaVersion": 12 10 | }, 11 | "rules": { 12 | "indent": [ 13 | "error", 14 | 4 15 | ], 16 | "linebreak-style": [ 17 | "error", 18 | "unix" 19 | ], 20 | "semi": [ 21 | "error", 22 | "always" 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/java/com/tonnfccardreactnativetest/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.tonnfccardreactnativetest; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "TonNfcCardReactNativeTest"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core-examples/node-ts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "CommonJS", 5 | "outDir": "./dist", 6 | "lib": ["ES2020", "ESNEXT"], 7 | "sourceMap": true, 8 | "strict": true, 9 | "esModuleInterop": true, 10 | "resolveJsonModule": true, 11 | "skipLibCheck": true, 12 | "forceConsistentCasingInFileNames": true 13 | }, 14 | "ts-node": { "transpileOnly": true }, 15 | "include": ["./src/**/*.ts"], 16 | "exclude": ["node_modules", "dist"] 17 | } 18 | -------------------------------------------------------------------------------- /appkit-examples/query/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "query-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/appkit": "^0", 14 | "@eversdk/core": "^1.37.0", 15 | "@eversdk/lib-node": "^1.37.0", 16 | "utils": "file:../../utils" 17 | }, 18 | "devDependencies": { 19 | "@types/node": "^14.14.31" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /core-examples/node-js/hello-wallet/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": true, 4 | "es2021": true, 5 | "node": true 6 | }, 7 | "extends": "eslint:recommended", 8 | "parserOptions": { 9 | "ecmaVersion": 12 10 | }, 11 | "rules": { 12 | "indent": [ 13 | "error", 14 | 4 15 | ], 16 | "linebreak-style": [ 17 | "error", 18 | "unix" 19 | ], 20 | "semi": [ 21 | "error", 22 | "always" 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo/ever-wallet/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "allowSyntheticDefaultImports": true, 7 | "resolveJsonModule": true, 8 | "noImplicitAny": true, 9 | "moduleResolution": "node", 10 | "sourceMap": true, 11 | "outDir": "dist", 12 | "baseUrl": ".", 13 | "paths": { 14 | "*": ["node_modules/*", "src/types/*"] 15 | } 16 | }, 17 | "include": ["src/**/*", "test/**/*"], 18 | "exclude": ["node_modules", "src/**/*.spec.ts", "**/__mocks__"] 19 | } 20 | -------------------------------------------------------------------------------- /demo/msig-wallet/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "allowSyntheticDefaultImports": true, 7 | "resolveJsonModule": true, 8 | "noImplicitAny": true, 9 | "moduleResolution": "node", 10 | "sourceMap": true, 11 | "outDir": "dist", 12 | "baseUrl": ".", 13 | "paths": { 14 | "*": ["node_modules/*", "src/types/*"] 15 | } 16 | }, 17 | "include": ["src/**/*", "test/**/*"], 18 | "exclude": ["node_modules", "src/**/*.spec.ts", "**/__mocks__"] 19 | } 20 | -------------------------------------------------------------------------------- /appkit-examples/signing-box/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "signing-box-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/appkit": "^0", 14 | "@eversdk/core": "^1.37.0", 15 | "@eversdk/lib-node": "^1.37.0", 16 | "utils": "file:../../utils" 17 | }, 18 | "devDependencies": { 19 | "@types/node": "^14.14.31" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /demo/paginate-transactions/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "allowSyntheticDefaultImports": true, 7 | "resolveJsonModule": true, 8 | "noImplicitAny": true, 9 | "moduleResolution": "node", 10 | "sourceMap": true, 11 | "outDir": "dist", 12 | "baseUrl": ".", 13 | "paths": { 14 | "*": ["node_modules/*", "src/types/*"] 15 | } 16 | }, 17 | "include": ["src/**/*", "test/**/*"], 18 | "exclude": ["node_modules", "src/**/*.spec.ts", "**/__mocks__"] 19 | } 20 | -------------------------------------------------------------------------------- /appkit-examples/subscription/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "subscription-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/appkit": "^0", 14 | "@eversdk/core": "^1.37.0", 15 | "@eversdk/lib-node": "^1.37.0", 16 | "utils": "file:../../utils" 17 | }, 18 | "devDependencies": { 19 | "@types/node": "^14.14.31" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | './pages/**/*.{js,ts,jsx,tsx,mdx}', 5 | './components/**/*.{js,ts,jsx,tsx,mdx}', 6 | './app/**/*.{js,ts,jsx,tsx,mdx}', 7 | ], 8 | theme: { 9 | extend: { 10 | backgroundImage: { 11 | 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', 12 | 'gradient-conic': 13 | 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', 14 | }, 15 | }, 16 | }, 17 | plugins: [], 18 | } 19 | -------------------------------------------------------------------------------- /core-examples/node-js/pagination/requests/index.js: -------------------------------------------------------------------------------- 1 | const allBlocks = require("./allBlocks") 2 | const allTransactions = require("./allTransactions") 3 | const accountTransactions = require("./accountTransactions") 4 | const accountExtOutMessages = require("./accountExtOutMessages") 5 | const messagesBetweenAccounts = require("./messagesBetweenAccounts") 6 | const allAccounts = require("./allAccounts") 7 | 8 | module.exports = { 9 | allBlocks, 10 | allTransactions, 11 | accountTransactions, 12 | accountExtOutMessages, 13 | messagesBetweenAccounts, 14 | allAccounts, 15 | } 16 | -------------------------------------------------------------------------------- /demo/subscribe-transactions/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "allowSyntheticDefaultImports": true, 7 | "resolveJsonModule": true, 8 | "noImplicitAny": true, 9 | "moduleResolution": "node", 10 | "sourceMap": true, 11 | "outDir": "dist", 12 | "baseUrl": ".", 13 | "paths": { 14 | "*": ["node_modules/*", "src/types/*"] 15 | } 16 | }, 17 | "include": ["src/**/*", "test/**/*"], 18 | "exclude": ["node_modules", "src/**/*.spec.ts", "**/__mocks__"] 19 | } 20 | -------------------------------------------------------------------------------- /core-examples/node-js/message-monitor/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "allowSyntheticDefaultImports": true, 7 | "resolveJsonModule": true, 8 | "noImplicitAny": true, 9 | "moduleResolution": "node", 10 | "sourceMap": true, 11 | "outDir": "dist", 12 | "baseUrl": ".", 13 | "paths": { 14 | "*": ["node_modules/*", "src/types/*"] 15 | } 16 | }, 17 | "include": ["src/**/*", "test/**/*"], 18 | "exclude": ["node_modules", "src/**/*.spec.ts", "**/__mocks__"] 19 | } 20 | -------------------------------------------------------------------------------- /appkit-examples/transfer-with-comment/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "transfer-with-comment-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@eversdk/appkit": "^0", 14 | "@eversdk/core": "^1.37.0", 15 | "@eversdk/lib-node": "^1.37.0", 16 | "utils": "file:../../utils" 17 | }, 18 | "devDependencies": { 19 | "@types/node": "^14.14.31" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /demo/web_p2p_exchange/dist/index.css: -------------------------------------------------------------------------------- 1 | #parent { 2 | display: flex; 3 | } 4 | 5 | #right { 6 | width: 50%; 7 | } 8 | 9 | #left { 10 | flex: 1; /* Grow to rest of container */ 11 | } 12 | 13 | button { 14 | margin-top: 5px; 15 | margin-bottom: 5px; 16 | margin-right: 5px; 17 | } 18 | 19 | textarea { 20 | width: 100%; 21 | height: 100%; 22 | } 23 | 24 | table { 25 | width: 100%; 26 | border-collapse: collapse; 27 | } 28 | 29 | table, 30 | td, 31 | th { 32 | border: 1px solid black; 33 | } 34 | 35 | td { 36 | padding: 5px; 37 | } 38 | 39 | #update_interval { 40 | width: 1em; 41 | } 42 | -------------------------------------------------------------------------------- /core-examples/react-jest/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /demo/web_p2p_exchange/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ignorePatterns: ['**/ton-contracts/*', '**/__tests__/nodejs/*'], 3 | env: { 4 | browser: true, 5 | node: true, 6 | jest: true, 7 | commonjs: true, 8 | es2020: true, 9 | }, 10 | extends: 'eslint:recommended', 11 | parserOptions: { 12 | ecmaVersion: 11, 13 | }, 14 | rules: { 15 | indent: ['error', 4], 16 | semi: ['error', 'never'], 17 | 'no-constant-condition': 'off', 18 | 'linebreak-style': ['error', 'unix'], 19 | 'max-len': ['error', { code: 120 }], 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'TonNfcCardReactNativeTest' 2 | include ':ton-nfc-client' 3 | project(':ton-nfc-client').projectDir = new File(rootProject.projectDir, '../node_modules/ton-nfc-client/android') 4 | include ':react-native-new-ton-nfc-card-lib' 5 | project(':react-native-new-ton-nfc-card-lib').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-new-ton-nfc-card-lib/android') 6 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 7 | include ':app' 8 | -------------------------------------------------------------------------------- /core-examples/web-pack/hello/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ignorePatterns: ['**/ton-contracts/*', '**/__tests__/nodejs/*'], 3 | env: { 4 | browser: true, 5 | node: true, 6 | jest: true, 7 | commonjs: true, 8 | es2020: true, 9 | }, 10 | extends: 'eslint:recommended', 11 | parserOptions: { 12 | ecmaVersion: 11, 13 | }, 14 | rules: { 15 | indent: ['error', 4], 16 | semi: ['error', 'never'], 17 | 'no-constant-condition': 'off', 18 | 'linebreak-style': ['error', 'unix'], 19 | 'max-len': ['error', { code: 120 }], 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ignorePatterns: ['**/ton-contracts/*', '**/__tests__/nodejs/*'], 3 | env: { 4 | browser: true, 5 | node: true, 6 | jest: true, 7 | commonjs: true, 8 | es2020: true, 9 | }, 10 | extends: 'next/core-web-vitals', 11 | parserOptions: { 12 | ecmaVersion: 11, 13 | }, 14 | rules: { 15 | indent: ['error', 4], 16 | semi: ['error', 'never'], 17 | 'no-constant-condition': 'off', 18 | 'linebreak-style': ['error', 'unix'], 19 | 'max-len': ['error', { code: 120 }], 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /demo/ever-wallet/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "build", 9 | "group": { 10 | "kind": "build", 11 | "isDefault": true 12 | } 13 | }, 14 | { 15 | "type": "npm", 16 | "script": "start", 17 | "problemMatcher": [], 18 | "label": "npm: start", 19 | "detail": "npm run start" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /demo/msig-wallet/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "build", 9 | "group": { 10 | "kind": "build", 11 | "isDefault": true 12 | } 13 | }, 14 | { 15 | "type": "npm", 16 | "script": "start", 17 | "problemMatcher": [], 18 | "label": "npm: start", 19 | "detail": "npm run start" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo/paginate-transactions/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "build", 9 | "group": { 10 | "kind": "build", 11 | "isDefault": true 12 | } 13 | }, 14 | { 15 | "type": "npm", 16 | "script": "start", 17 | "problemMatcher": [], 18 | "label": "npm: start", 19 | "detail": "npm run start" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/next.config.js: -------------------------------------------------------------------------------- 1 | const CopyWebpackPlugin = require('copy-webpack-plugin') 2 | /** @type {import("next").NextConfig} */ 3 | const nextConfig = { 4 | reactStrictMode: true, 5 | transpilePackages: ["@eversdk/lib-web"], 6 | 7 | webpack(config) { 8 | config.output.webassemblyModuleFilename = "./eversdk.wasm" 9 | config.experiments = {asyncWebAssembly: true} 10 | config.plugins = [new CopyWebpackPlugin({ 11 | patterns: [{from: './node_modules/@eversdk/lib-web/eversdk.wasm'}], 12 | }), ...config.plugins] 13 | return config 14 | }, 15 | } 16 | 17 | module.exports = nextConfig 18 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | './src/pages/**/*.{js,ts,jsx,tsx,mdx}', 5 | './src/components/**/*.{js,ts,jsx,tsx,mdx}', 6 | './src/app/**/*.{js,ts,jsx,tsx,mdx}', 7 | ], 8 | theme: { 9 | extend: { 10 | backgroundImage: { 11 | 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', 12 | 'gradient-conic': 13 | 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', 14 | }, 15 | }, 16 | }, 17 | plugins: [], 18 | } 19 | -------------------------------------------------------------------------------- /demo/subscribe-transactions/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "build", 9 | "group": { 10 | "kind": "build", 11 | "isDefault": true 12 | } 13 | }, 14 | { 15 | "type": "npm", 16 | "script": "start", 17 | "problemMatcher": [], 18 | "label": "npm: start", 19 | "detail": "npm run start" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /core-examples/node-js/blockchain_api/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": true, 4 | "es2021": true, 5 | "node": true 6 | }, 7 | "extends": "eslint:recommended", 8 | "parserOptions": { 9 | "ecmaVersion": 12 10 | }, 11 | "rules": { 12 | "indent": [ 13 | "error", 14 | 4 15 | ], 16 | "linebreak-style": [ 17 | "error", 18 | "unix" 19 | ], 20 | "quotes": [ 21 | "error", 22 | "double" 23 | ], 24 | "semi": [ 25 | "error", 26 | "always" 27 | ] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /appkit-examples/cache/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS SDK cache using example 2 | 3 | In this example we use [ever-sdk-js](https://github.com/tonlabs/ever-sdk-js) to call `tvm.run_tvm` method using cached account BOC. 4 | 5 | ## Prerequisite 6 | 7 | * Node.js >= [14.x installed](https://nodejs.org) 8 | 9 | ## Before running the example 10 | 11 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 12 | - Remember its Development Network HTTPS endpoint. 13 | - Pass this endpoint as a parameter when running the example. 14 | 15 | ## Install packages & run: 16 | 17 | ```sh 18 | npm i 19 | npm start 20 | ``` 21 | -------------------------------------------------------------------------------- /core-examples/node-js/blockchain-statistics/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": true, 4 | "es2021": true, 5 | "node": true 6 | }, 7 | "extends": "eslint:recommended", 8 | "parserOptions": { 9 | "ecmaVersion": 12 10 | }, 11 | "rules": { 12 | "indent": [ 13 | "error", 14 | 4 15 | ], 16 | "linebreak-style": [ 17 | "error", 18 | "unix" 19 | ], 20 | "quotes": [ 21 | "error", 22 | "double" 23 | ], 24 | "semi": [ 25 | "error", 26 | "always" 27 | ] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core-examples/node-js/message-monitor/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "build", 9 | "group": { 10 | "kind": "build", 11 | "isDefault": true 12 | } 13 | }, 14 | { 15 | "type": "npm", 16 | "script": "start", 17 | "problemMatcher": [], 18 | "label": "npm: start", 19 | "detail": "npm run start" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /core-examples/node-js/subscription/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "env": { 3 | "commonjs": true, 4 | "es2020": true, 5 | "node": true 6 | }, 7 | "extends": "eslint:recommended", 8 | "parserOptions": { 9 | "ecmaVersion": 11 10 | }, 11 | "rules": { 12 | "indent": [ 13 | "error", 14 | 4 15 | ], 16 | "linebreak-style": [ 17 | "error", 18 | "unix" 19 | ], 20 | "quotes": [ 21 | "error", 22 | "double" 23 | ], 24 | "semi": [ 25 | "error", 26 | "never" 27 | ] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/requestTestData.js: -------------------------------------------------------------------------------- 1 | const { path } = require('ramda') 2 | const rp = require('request-promise-native') 3 | const { url2FA, user, pass } = require('./config') 4 | 5 | // :: string -> Promise 6 | 7 | const requestTestData = () => 8 | rp({ 9 | method: 'GET', 10 | uri: url2FA + 'test-data.json', 11 | auth: { 12 | user, 13 | pass, 14 | sendImmediately: true, 15 | }, 16 | resolveWithFullResponse: true, 17 | json: true, 18 | }) 19 | .then(path(['body'])) 20 | .catch(console.log) 21 | module.exports = requestTestData -------------------------------------------------------------------------------- /core-examples/node-js/cache/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS SDK cache using example 2 | 3 | In this example we use [ever-sdk-js](https://github.com/tonlabs/ever-sdk-js) to call `tvm.run_tvm` method using cached account BOC. 4 | 5 | ## Prerequisite 6 | 7 | - Node.js >= [14.x installed](https://nodejs.org) 8 | 9 | ## Before running the example 10 | 11 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 12 | - Remember its Development Network HTTPS endpoint. 13 | - Pass this endpoint as a parameter when running the example. 14 | 15 | ## Install packages & run: 16 | 17 | ```sh 18 | npm i 19 | node index.js 20 | ``` 21 | -------------------------------------------------------------------------------- /core-examples/node-js/paginate-blockchain-transactions/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": true, 4 | "es2021": true, 5 | "node": true 6 | }, 7 | "extends": "eslint:recommended", 8 | "parserOptions": { 9 | "ecmaVersion": 12 10 | }, 11 | "rules": { 12 | "indent": [ 13 | "error", 14 | 4 15 | ], 16 | "linebreak-style": [ 17 | "error", 18 | "unix" 19 | ], 20 | "quotes": [ 21 | "error", 22 | "double" 23 | ], 24 | "semi": [ 25 | "error", 26 | "always" 27 | ] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /appkit-examples/multisig/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multisig-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "preparation": "node preparation.js", 8 | "deploy": "node deploy.js", 9 | "error_produce": "node error_produce.js" 10 | }, 11 | "keywords": [], 12 | "author": "", 13 | "license": "ISC", 14 | "dependencies": { 15 | "@eversdk/appkit": "^0", 16 | "@eversdk/core": "^1.37.0", 17 | "@eversdk/lib-node": "^1.37.0", 18 | "utils": "file:../../utils" 19 | }, 20 | "devDependencies": { 21 | "@types/node": "^14.14.31" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core-examples/react-jest/config-overrides.js: -------------------------------------------------------------------------------- 1 | const CopyWebpackPlugin = require("copy-webpack-plugin"); 2 | 3 | module.exports = { 4 | webpack: function (config, env) { 5 | config.plugins.push( 6 | new CopyWebpackPlugin({ 7 | patterns: [{ from: "./node_modules/@eversdk/lib-web/eversdk.wasm" }], 8 | }) 9 | ); 10 | return config; 11 | }, 12 | jest: function (config) { 13 | config.transformIgnorePatterns = [ 14 | "[/\\\\]node_modules[/\\\\](?!(@eversdk/lib-web))\\.(js|jsx|mjs|cjs|ts|tsx)$", 15 | "^.+\\.module\\.(css|sass|scss)$", 16 | ]; 17 | return config; 18 | }, 19 | }; 20 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "paths": { 18 | "@/*": ["./*"] 19 | } 20 | }, 21 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 22 | "exclude": ["node_modules"] 23 | } 24 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/getOld2FA.js: -------------------------------------------------------------------------------- 1 | const { url2FA, user, pass } = require('./config') 2 | const request2FA = require('./request2FA') 3 | import { 4 | Alert 5 | } from 'react-native'; 6 | 7 | import Toast from 'react-native-simple-toast' 8 | 9 | 10 | const getOld2FA = async (fname) => { 11 | await new Promise(r => setTimeout(r, 5000)) 12 | alert("Request oldCode2FA code") 13 | const oldCode2FA = await request2FA(fname) 14 | console.log("oldCode2FA = " + oldCode2FA ) 15 | await new Promise(r => setTimeout(r, 5000)) 16 | alert("oldCode2FA = " + oldCode2FA ) 17 | return oldCode2FA 18 | } 19 | 20 | 21 | module.exports = getOld2FA -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/src/styles/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --foreground-rgb: 0, 0, 0; 7 | --background-start-rgb: 214, 219, 220; 8 | --background-end-rgb: 255, 255, 255; 9 | } 10 | 11 | @media (prefers-color-scheme: dark) { 12 | :root { 13 | --foreground-rgb: 255, 255, 255; 14 | --background-start-rgb: 0, 0, 0; 15 | --background-end-rgb: 0, 0, 0; 16 | } 17 | } 18 | 19 | body { 20 | color: rgb(var(--foreground-rgb)); 21 | background: linear-gradient( 22 | to bottom, 23 | transparent, 24 | rgb(var(--background-end-rgb)) 25 | ) 26 | rgb(var(--background-start-rgb)); 27 | } 28 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/styles/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --foreground-rgb: 0, 0, 0; 7 | --background-start-rgb: 214, 219, 220; 8 | --background-end-rgb: 255, 255, 255; 9 | } 10 | 11 | @media (prefers-color-scheme: dark) { 12 | :root { 13 | --foreground-rgb: 255, 255, 255; 14 | --background-start-rgb: 0, 0, 0; 15 | --background-end-rgb: 0, 0, 0; 16 | } 17 | } 18 | 19 | body { 20 | color: rgb(var(--foreground-rgb)); 21 | background: linear-gradient( 22 | to bottom, 23 | transparent, 24 | rgb(var(--background-end-rgb)) 25 | ) 26 | rgb(var(--background-start-rgb)); 27 | } 28 | -------------------------------------------------------------------------------- /core-examples/node-ts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-ts", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "Apache-2.0", 6 | "private": true, 7 | "devDependencies": { 8 | "@types/node": "^18.11.3", 9 | "@typescript-eslint/parser": "^5.48.0", 10 | "eslint": "^8.26.0", 11 | "eslint-config-airbnb-base": "^15.0.0", 12 | "eslint-config-airbnb-typescript": "^17.0.0", 13 | "eslint-import-resolver-typescript": "^3.5.2", 14 | "eslint-plugin-import": "^2.26.0", 15 | "typescript": "^4.8.4" 16 | }, 17 | "dependencies": { 18 | "@eversdk/core": "^1.41.1", 19 | "@eversdk/lib-node": "^1.41.1", 20 | "@typescript-eslint/eslint-plugin": "^5.48.0" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core-examples/node-js/func/gqlwalletv4/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": true, 3 | "compilerOptions": { 4 | "module": "CommonJS", 5 | "target": "ES2020", 6 | "lib": [ 7 | "ES2020", 8 | "ESNEXT" 9 | ], 10 | "declaration": true, 11 | "removeComments": true, 12 | "emitDecoratorMetadata": true, 13 | "experimentalDecorators": true, 14 | "resolveJsonModule": true, 15 | "esModuleInterop": true, 16 | "sourceMap": true, 17 | "outDir": "./dist", 18 | "baseUrl": "./src", 19 | "incremental": true 20 | }, 21 | "include": ["./**/*.ts"], 22 | "exclude": ["node_modules", "dist", "dep"] 23 | } -------------------------------------------------------------------------------- /core-examples/node-js/paginate-blockchain-transactions/README.md: -------------------------------------------------------------------------------- 1 | ## About this sample 2 | 3 | This sample shows how to easily implement blockchain transaction iteration with ever-sdk (JavaScript) 4 | 5 | ## Before running the example 6 | 7 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 8 | - Remember its Development Network HTTPS endpoint. 9 | - Pass this endpoint as a parameter when running the example. 10 | 11 | **Note**: This sample works with data from the past 3 days. To retrieve data older than 7 days, use `archive:true` flag in query filters. 12 | 13 | ## Install packages & run: 14 | 15 | ```sh 16 | npm i 17 | node index.js 18 | ``` 19 | -------------------------------------------------------------------------------- /appkit-examples/transfer-with-comment/README.md: -------------------------------------------------------------------------------- 1 | # Transfer with comment 2 | 3 | ## Prerequisite 4 | 5 | - Node.js >= [14.x installed](https://nodejs.org) 6 | - You must have a Multisig wallet deployed on the development network and you must have its key pair.\ 7 | Save its key in `keyPair.json` file in the project root folder. 8 | 9 | ## Before running the example 10 | 11 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 12 | - Remember its Development Network HTTPS endpoint. 13 | - Pass this endpoint as a parameter when running scripts. 14 | 15 | 16 | ## Install packages & run: 17 | ```sh 18 | npm i 19 | node index.js 20 | ``` 21 | 22 | 23 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | /.idea/inspectionProfiles/Project_Default.xml 37 | /.idea/.gitignore 38 | /.idea/misc.xml 39 | /.idea/modules.xml 40 | /.idea/vcs.xml 41 | /.idea/venom-transfer.iml 42 | /.idea/yamllint.xml 43 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /core-examples/react-jest/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /core-examples/node-js/deploy-with-initial-data/Timestamp.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "touch", 7 | "inputs": [ 8 | ], 9 | "outputs": [ 10 | ] 11 | }, 12 | { 13 | "name": "getTimestamp", 14 | "inputs": [ 15 | ], 16 | "outputs": [ 17 | {"name":"value0","type":"uint32"} 18 | ] 19 | }, 20 | { 21 | "name": "constructor", 22 | "inputs": [ 23 | ], 24 | "outputs": [ 25 | ] 26 | }, 27 | { 28 | "name": "timestamp", 29 | "inputs": [ 30 | ], 31 | "outputs": [ 32 | {"name":"timestamp","type":"uint32"} 33 | ] 34 | } 35 | ], 36 | "data": [ 37 | {"key":1,"name":"timestamp","type":"uint32"} 38 | ], 39 | "events": [ 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /core-examples/node-js/func/gqlwalletv4/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gqlwalletv4", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "scripts": { 7 | "start": "npx ts-node src/wallet.ts" 8 | }, 9 | "devDependencies": { 10 | "@types/node": "^18.11.3", 11 | "@typescript-eslint/eslint-plugin": "^5.46.1", 12 | "@typescript-eslint/parser": "^5.46.1", 13 | "eslint": "^8.20.0", 14 | "eslint-config-airbnb-base": "^15.0.0", 15 | "eslint-config-airbnb-typescript": "^17.0.0", 16 | "eslint-import-resolver-typescript": "^3.3.0", 17 | "eslint-plugin-import": "^2.26.0", 18 | "typescript": "^4.8.4" 19 | }, 20 | "dependencies": { 21 | "@eversdk/core": "^1.39.0", 22 | "@eversdk/lib-node": "^1.39.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core-examples/node-js/message-monitor/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | parserOptions: { 5 | project: './tsconfig.json', 6 | tsconfigRootDir: __dirname, 7 | }, 8 | plugins: ['@typescript-eslint', 'prettier', 'jest'], 9 | extends: [ 10 | 'eslint:recommended', 11 | 'plugin:@typescript-eslint/recommended', 12 | // "plugin:@typescript-eslint/recommended-requiring-type-checking", 13 | 'prettier', 14 | ], 15 | rules: { 16 | 'prettier/prettier': 2, 17 | 'no-implicit-coercion': ['warn', { allow: ['!!'] }], 18 | curly: ['error', 'all'], 19 | }, 20 | env: { 21 | node: true, 22 | 'jest/globals': true, 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /core-examples/node-js/subscription/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS SDK Subscription example 2 | 3 | In this example, we are subscribing to messages with the destination address "-1:3333333333333333333333333333333333333333333333333333333333333". 4 | 5 | ## Prerequisite 6 | 7 | - Node.js >= [14.x installed](https://nodejs.org) 8 | - Internet connection to public endpoints of the Everos Developer Network: 9 | 10 | ## Before running the example 11 | 12 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 13 | - Remember its Development Network HTTPS endpoint. 14 | - Pass this endpoint as a parameter when running the example. 15 | 16 | ## Install packages and run: 17 | 18 | ```sh 19 | npm i 20 | node index.js 21 | ``` 22 | -------------------------------------------------------------------------------- /demo/ever-wallet/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeActionsOnSave": { 3 | "source.fixAll.eslint": true 4 | }, 5 | "eslint.enable": true, 6 | "eslint.validate": ["javascript", "typescript"], 7 | "editor.formatOnSave": true, 8 | "[javascript]": { 9 | "editor.formatOnSave": false 10 | }, 11 | "[typescript]": { 12 | "editor.defaultFormatter": "vscode.typescript-language-features", 13 | "editor.formatOnSave": true, 14 | "editor.formatOnPaste": false 15 | }, 16 | "[markdown]": { 17 | "editor.formatOnSave": true 18 | }, 19 | "search.exclude": { 20 | "**/node_modules": true, 21 | "**/bower_components": true, 22 | "**/dist": true, 23 | "**/coverage": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo/msig-wallet/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeActionsOnSave": { 3 | "source.fixAll.eslint": true 4 | }, 5 | "eslint.enable": true, 6 | "eslint.validate": ["javascript", "typescript"], 7 | "editor.formatOnSave": true, 8 | "[javascript]": { 9 | "editor.formatOnSave": false 10 | }, 11 | "[typescript]": { 12 | "editor.defaultFormatter": "vscode.typescript-language-features", 13 | "editor.formatOnSave": true, 14 | "editor.formatOnPaste": false 15 | }, 16 | "[markdown]": { 17 | "editor.formatOnSave": true 18 | }, 19 | "search.exclude": { 20 | "**/node_modules": true, 21 | "**/bower_components": true, 22 | "**/dist": true, 23 | "**/coverage": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /core-examples/node-js/message-monitor/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeActionsOnSave": { 3 | "source.fixAll.eslint": true 4 | }, 5 | "eslint.enable": true, 6 | "eslint.validate": ["javascript", "typescript"], 7 | "editor.formatOnSave": true, 8 | "[javascript]": { 9 | "editor.formatOnSave": false 10 | }, 11 | "[typescript]": { 12 | "editor.defaultFormatter": "esbenp.prettier-vscode", 13 | "editor.formatOnSave": true, 14 | "editor.formatOnPaste": false 15 | }, 16 | "[markdown]": { 17 | "editor.formatOnSave": true 18 | }, 19 | "search.exclude": { 20 | "**/node_modules": true, 21 | "**/bower_components": true, 22 | "**/dist": true, 23 | "**/coverage": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo/paginate-transactions/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeActionsOnSave": { 3 | "source.fixAll.eslint": true 4 | }, 5 | "eslint.enable": true, 6 | "eslint.validate": ["javascript", "typescript"], 7 | "editor.formatOnSave": true, 8 | "[javascript]": { 9 | "editor.formatOnSave": false 10 | }, 11 | "[typescript]": { 12 | "editor.defaultFormatter": "vscode.typescript-language-features", 13 | "editor.formatOnSave": true, 14 | "editor.formatOnPaste": false 15 | }, 16 | "[markdown]": { 17 | "editor.formatOnSave": true 18 | }, 19 | "search.exclude": { 20 | "**/node_modules": true, 21 | "**/bower_components": true, 22 | "**/dist": true, 23 | "**/coverage": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo/subscribe-transactions/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeActionsOnSave": { 3 | "source.fixAll.eslint": true 4 | }, 5 | "eslint.enable": true, 6 | "eslint.validate": ["javascript", "typescript"], 7 | "editor.formatOnSave": true, 8 | "[javascript]": { 9 | "editor.formatOnSave": false 10 | }, 11 | "[typescript]": { 12 | "editor.defaultFormatter": "vscode.typescript-language-features", 13 | "editor.formatOnSave": true, 14 | "editor.formatOnPaste": false 15 | }, 16 | "[markdown]": { 17 | "editor.formatOnSave": true 18 | }, 19 | "search.exclude": { 20 | "**/node_modules": true, 21 | "**/bower_components": true, 22 | "**/dist": true, 23 | "**/coverage": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "strict": true, 12 | "forceConsistentCasingInFileNames": true, 13 | "noEmit": true, 14 | "esModuleInterop": true, 15 | "module": "esnext", 16 | "moduleResolution": "node", 17 | "resolveJsonModule": true, 18 | "isolatedModules": true, 19 | "jsx": "preserve", 20 | "incremental": true, 21 | "paths": { 22 | "@/*": [ 23 | "./src/*" 24 | ] 25 | } 26 | }, 27 | "include": [ 28 | "next-env.d.ts", 29 | "**/*.ts", 30 | "**/*.tsx" 31 | ], 32 | "exclude": [ 33 | "node_modules" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-next-js", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "node prep & next dev", 7 | "build": "next build", 8 | "start": "node prev & next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@eversdk/core": "^1", 13 | "@eversdk/lib-web": "^1", 14 | "@types/node": "20.2.5", 15 | "@types/react": "18.2.7", 16 | "@types/react-dom": "18.2.4", 17 | "autoprefixer": "10.4.14", 18 | "eslint": "8.41.0", 19 | "eslint-config-next": "13.4.4", 20 | "next": "13.4.4", 21 | "postcss": "8.4.24", 22 | "react": "18.2.0", 23 | "react-dom": "18.2.0", 24 | "tailwindcss": "3.3.2", 25 | "typescript": "5.0.4", 26 | "copy-webpack-plugin": "^7.0.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core-examples/node-js/multisig-submit-tx/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS SDK multisig submit transaction example 2 | 3 | In this example we submit transaction to Multisig contract. 4 | 5 | You should know Multisig keys, ABI, address and network 6 | 7 | ## Prerequisite 8 | 9 | - Node.js >= [14.x installed](https://nodejs.org) 10 | 11 | ## Before running the example 12 | 13 | - Paste multisig keys in msig.keys.json 14 | - See index.js, check comments and edit the relevant lines. 15 | 16 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 17 | - Remember its Development Network HTTPS endpoint. 18 | - Pass this endpoint as a parameter when running the example. 19 | 20 | ## Install packages & run: 21 | 22 | ```sh 23 | npm install 24 | node index.js 25 | ``` 26 | -------------------------------------------------------------------------------- /appkit-examples/web-hello/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TON Client Example 5 | 6 | 7 | 8 | 9 | 10 |

Welcome to TON Client Hello Example

11 |

TON Client Version:

12 | 13 | 14 | 15 | 16 | 17 |
Future address of the contract...
Hello contract was deployed...
Contract responded to touch...
Contract responded to getTimestamp...
18 | 19 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/addOwnerToMultisig.js: -------------------------------------------------------------------------------- 1 | const utils = require('./utils') 2 | 3 | const addOwnerToMultisig = async ({ ton, multisig, ownersPKs /* array of custodian's PK */ }) => { 4 | const { imageBase64 } = multisig.package 5 | 6 | const { codeBase64 } = await ton.contracts.getCodeFromImage({ imageBase64 }) 7 | const { hash } = await ton.contracts.getBocHash({ bocBase64: codeBase64 }) 8 | 9 | const { output } = await utils.run(ton)(multisig, 'submitUpdate', { 10 | codeHash: `0x${hash}`, 11 | owners: ownersPKs.map((k) => `0x${k}`), 12 | reqConfirms: ownersPKs.length, 13 | }) 14 | const { updateId } = output 15 | 16 | await utils.run(ton)(multisig, 'executeUpdate', { updateId, code: codeBase64 }) 17 | } 18 | 19 | module.exports = addOwnerToMultisig -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/utils/config.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | const config = { 4 | retries: { 5 | run: 2, /*5,*/ 6 | runLocal: 20, 7 | }, 8 | timeout: { 9 | run: 600000, // Promise.race for run, Almost disabled (10m) 10 | runDeferredAttempts: [0, 18000].concat( 11 | Array.from(Array(8).keys()).map((x) => (x + 1) * 30000), 12 | // Array.from(Array(30).keys()).map(x => (x + 1) * 60000) 13 | ), 14 | runLocal: 30000, // Promise.race duration for runLocal 15 | secondsWaitForLatecomers: 20, 16 | waitFor: 3000, 17 | }, 18 | errors: { 19 | E_NO_PROP: 'E_NO_PROP', 20 | }, 21 | } 22 | 23 | const get = (target, prop) => target[prop] || (console.log(config.errors.E_NO_PROP, prop)) 24 | module.exports = new Proxy(config, { get }) -------------------------------------------------------------------------------- /appkit-examples/depool-statistics/README.md: -------------------------------------------------------------------------------- 1 | # Getting information from DePool with NodeJS 2 | 3 | In this example we get list of all known DePool contracts addresses in [mainnet.evercloud.dev](https://ton.live) and run 4 | get methods of an existing [DePool](https://github.com/tonlabs/ton-labs-contracts/blob/master/solidity/depool/DePool.sol). 5 | If you want to connect to another DePool, choose from catalog of DePools [https://ton.live/dePools](https://ton.live/dePools). 6 | 7 | ## Before running the example 8 | 9 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 10 | - Remember its Mainnet HTTPS endpoint. 11 | - Pass this endpoint as a parameter when running the example. 12 | 13 | 14 | ## Install packages & run: 15 | 16 | ```sh 17 | npm i 18 | node index.js 19 | ``` 20 | -------------------------------------------------------------------------------- /core-examples/node-js/gen-keys-matching-to-shards/contracts/someContract.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "version": "2.3", 4 | "header": ["time", "expire"], 5 | "functions": [ 6 | { 7 | "name": "sendTransaction", 8 | "inputs": [ 9 | {"name":"dest","type":"address"}, 10 | {"name":"value","type":"uint128"}, 11 | {"name":"bounce","type":"bool"} 12 | ], 13 | "outputs": [ 14 | ] 15 | }, 16 | { 17 | "name": "upgrade", 18 | "inputs": [ 19 | {"name":"newcode","type":"cell"} 20 | ], 21 | "outputs": [ 22 | ] 23 | }, 24 | { 25 | "name": "constructor", 26 | "inputs": [ 27 | ], 28 | "outputs": [ 29 | ] 30 | } 31 | ], 32 | "data": [ 33 | ], 34 | "events": [ 35 | ], 36 | "fields": [ 37 | {"name":"_pubkey","type":"uint256"}, 38 | {"name":"_constructorFlag","type":"bool"} 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /core-examples/next-js/normal-transfer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "normal-transfer", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@eversdk/core": "^1.43.1", 13 | "@eversdk/lib-web": "^1.43.1", 14 | "@types/node": "20.2.5", 15 | "@types/react": "18.2.8", 16 | "@types/react-dom": "18.2.4", 17 | "autoprefixer": "10.4.14", 18 | "eslint": "8.41.0", 19 | "eslint-config-next": "13.4.4", 20 | "everscale-inpage-provider": "^0.3.61", 21 | "everscale-standalone-client": "^2.1.19", 22 | "next": "13.4.4", 23 | "postcss": "8.4.24", 24 | "react": "18.2.0", 25 | "react-dom": "18.2.0", 26 | "tailwindcss": "3.3.2", 27 | "typescript": "5.1.3" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core-examples/node-js/message-monitor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "format": "prettier --write 'src/**/*.ts'", 4 | "eslint": "eslint \"**/*.ts\"", 5 | "eslint-fix": "eslint \"**/*.ts\" --fix", 6 | "message-monitor": "npx ts-node src/main.ts" 7 | }, 8 | "dependencies": { 9 | "@eversdk/core": "^1.41.1", 10 | "@eversdk/lib-node": "^1.41.1", 11 | "https-proxy-agent": "^7.0.1", 12 | "ts-node": "^10.9.1" 13 | }, 14 | "devDependencies": { 15 | "@types/node": "^16.0.1", 16 | "@typescript-eslint/eslint-plugin": "^5.57.1", 17 | "@typescript-eslint/parser": "^5.57.1", 18 | "eslint": "^7.30.0", 19 | "eslint-config-prettier": "^8.5.0", 20 | "eslint-plugin-prettier": "^4.0.0", 21 | "prettier": "^2.3.2", 22 | "typescript": "^4.6.3" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core-examples/node-js/message-monitor/contract/MyContract.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "version": "2.3", 4 | "header": ["time", "expire"], 5 | "functions": [ 6 | { 7 | "name": "touch", 8 | "inputs": [ 9 | ], 10 | "outputs": [ 11 | ] 12 | }, 13 | { 14 | "name": "getMessages", 15 | "inputs": [ 16 | ], 17 | "outputs": [ 18 | {"components":[{"name":"hash","type":"uint256"},{"name":"expireAt","type":"uint32"}],"name":"messages","type":"tuple[]"} 19 | ] 20 | }, 21 | { 22 | "name": "constructor", 23 | "inputs": [ 24 | ], 25 | "outputs": [ 26 | ] 27 | } 28 | ], 29 | "data": [ 30 | ], 31 | "events": [ 32 | ], 33 | "fields": [ 34 | {"name":"_pubkey","type":"uint256"}, 35 | {"name":"_constructorFlag","type":"bool"}, 36 | {"name":"m_messages","type":"map(uint256,uint32)"}, 37 | {"name":"ts","type":"uint32"} 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/request2FA.js: -------------------------------------------------------------------------------- 1 | const { path } = require('ramda') 2 | const { url2FA, user, pass } = require('./config') 3 | import {decode as atob, encode as btoa} from 'base-64' 4 | 5 | //request2FA :: string -> Promise 6 | 7 | const request2FA = async (filename) => { 8 | let response = await fetch(url2FA + filename, { 9 | method:'GET', 10 | headers: {'Authorization': 'Basic ' + btoa('ton:integration')} 11 | }); 12 | 13 | if (response.ok) { // если HTTP-статус в диапазоне 200-299 14 | // получаем тело ответа (см. про этот метод ниже) 15 | let json = await response.json(); 16 | console.log("json = " + json); 17 | return json.code2FA; 18 | } else { 19 | console.log("Ошибка HTTP: " + response.status); 20 | return "empty"; 21 | } 22 | } 23 | 24 | module.exports = request2FA -------------------------------------------------------------------------------- /demo/web_p2p_exchange/src/ton-contracts/giver.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "sendTransaction", 7 | "inputs": [ 8 | {"name":"dest","type":"address"}, 9 | {"name":"value","type":"uint128"}, 10 | {"name":"bounce","type":"bool"} 11 | ], 12 | "outputs": [ 13 | ] 14 | }, 15 | { 16 | "name": "getMessages", 17 | "inputs": [ 18 | ], 19 | "outputs": [ 20 | {"components":[{"name":"hash","type":"uint256"},{"name":"expireAt","type":"uint64"}],"name":"messages","type":"tuple[]"} 21 | ] 22 | }, 23 | { 24 | "name": "upgrade", 25 | "inputs": [ 26 | {"name":"newcode","type":"cell"} 27 | ], 28 | "outputs": [ 29 | ] 30 | }, 31 | { 32 | "name": "constructor", 33 | "inputs": [ 34 | ], 35 | "outputs": [ 36 | ] 37 | } 38 | ], 39 | "data": [ 40 | ], 41 | "events": [ 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /demo/web_p2p_exchange/src/helpers.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Helpers for DOM manipulation 3 | */ 4 | const $ = document.getElementById.bind(document) 5 | const $val = (x) => $(x).value 6 | const log = async (tag, msg) => { 7 | $('log').innerHTML += `${Math.round(Date.now() / 1000)} ${tag}: ${msg}\n` 8 | } 9 | 10 | const exec = (tag, fn) => 11 | Promise.resolve() 12 | .then(() => log(tag, 'start')) 13 | .then(() => 14 | fn() 15 | .then((x) => { 16 | log(tag, 'done') 17 | return x 18 | }) 19 | .catch((e) => log(tag, `error: ${e.message}`)), 20 | ) 21 | 22 | const clickHandler = (tag, fn) => { 23 | const btn = event.currentTarget 24 | btn.disabled = true 25 | exec(tag, fn).finally(() => { 26 | btn.disabled = false 27 | }) 28 | } 29 | 30 | module.exports = { exec, $, $val, clickHandler, log } 31 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTestTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/TonNfcCardReactNativeTest-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /core-examples/node-js/transfer-with-comment/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS transfer tokens with comment 2 | 3 | In this example we demostrate how to transfer tokens from one contract to another with comment. 4 | 5 | 6 | ## Prerequisite 7 | 8 | * Node.js >= [14.x installed](https://nodejs.org) 9 | 10 | 11 | ## Before running the example 12 | 13 | - Create a project on [dashboard.evercloud.dev](https://dashboard.evercloud.dev) if you don't have one. 14 | - Remember its Development Network HTTPS endpoint, you must pass this endpoint as a parameter when running the example. 15 | - [Deploy multisig wallet](https://github.com/tonlabs/sdk-samples/tree/master/core-examples/node-js/multisig) to Developer network 16 | and place your keys in the project root folder into `keys.json` file and multisig account address to `address.txt` file. 17 | 18 | ## Install packages & run: 19 | 20 | ```sh 21 | npm i 22 | node index.js 23 | ` 24 | -------------------------------------------------------------------------------- /core-examples/web-pack/hello/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TON Client Example 5 | 6 | 7 | 8 | 9 | 10 |

Welcome to TON Client Hello Example

11 |

TON Client Version:

12 | 13 | 14 | 15 | 16 | 17 | 18 |
Future address of the contract...
Grams were transferred from giver...
Hello contract was deployed...
Contract responded to touch...
Contract responded to getTimestamp...
19 | 20 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/README.md: -------------------------------------------------------------------------------- 1 | # React Native sample project demonstrating how to work with TON Labs NFC security card 2 | 3 | This is a React Native exemplary application demonstrating how to work with NFC cards. 4 | 5 | It uses [ton-nfc-client](https://github.com/tonlabs/ton-nfc-client) to handle NFC stuff. You may run both on Android smartphones and iPhones. 6 | 7 | ## Prerequisite 8 | 9 | * Node.js >= [14.x installed](https://nodejs.org) 10 | 11 | ### For Android 12 | * Java SE Development Kit (JDK) > =1.8 13 | * Android Studio 14 | 15 | ### For iOS 16 | * watchman 17 | * cocoapods 18 | * Xcode 19 | 20 | The detailed information about enviroment setup can be found [here](https://reactnative.dev/docs/environment-setup) 21 | 22 | ## Quick start 23 | 24 | ```sh 25 | npm install 26 | npx react-native run-android (run-ios) 27 | ``` 28 | _Note:_ you can not use simulator to run, only device. 29 | -------------------------------------------------------------------------------- /demo/ever-wallet/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "format": "prettier --write 'src/**/*.ts' 'test/**/*.ts'", 4 | "eslint": "eslint \"**/*.ts\"", 5 | "eslint-fix": "eslint \"**/*.ts\" --fix", 6 | "ever-wallet": "npx ts-node src/wallet.ts", 7 | "list-tr": "npx ts-node src/listTransactions.ts", 8 | "subscribe-tr": "npx ts-node src/subscription.ts" 9 | }, 10 | "dependencies": { 11 | "@eversdk/core": "^1.41.1", 12 | "@eversdk/lib-node": "^1.41.1", 13 | "ts-node": "^10.9.1" 14 | }, 15 | "devDependencies": { 16 | "@types/node": "^16.0.1", 17 | "@typescript-eslint/eslint-plugin": "^5.57.1", 18 | "@typescript-eslint/parser": "^5.57.1", 19 | "eslint": "^7.30.0", 20 | "eslint-config-prettier": "^8.5.0", 21 | "eslint-plugin-prettier": "^4.0.0", 22 | "prettier": "^2.3.2", 23 | "typescript": "^4.6.3" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo/msig-wallet/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "format": "prettier --write 'src/**/*.ts' 'test/**/*.ts'", 4 | "eslint": "eslint \"**/*.ts\"", 5 | "eslint-fix": "eslint \"**/*.ts\" --fix", 6 | "msig-wallet": "npx ts-node src/wallet.ts", 7 | "list-tr": "npx ts-node src/listTransactions.ts", 8 | "subscribe-tr": "npx ts-node src/subscription.ts" 9 | }, 10 | "dependencies": { 11 | "@eversdk/core": "^1.41.1", 12 | "@eversdk/lib-node": "^1.41.1", 13 | "ts-node": "^10.9.1" 14 | }, 15 | "devDependencies": { 16 | "@types/node": "^16.0.1", 17 | "@typescript-eslint/eslint-plugin": "^5.57.1", 18 | "@typescript-eslint/parser": "^5.57.1", 19 | "eslint": "^7.30.0", 20 | "eslint-config-prettier": "^8.5.0", 21 | "eslint-plugin-prettier": "^4.0.0", 22 | "prettier": "^2.3.2", 23 | "typescript": "^4.6.3" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo/paginate-transactions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "format": "prettier --write 'src/**/*.ts' 'test/**/*.ts'", 4 | "eslint": "eslint \"**/*.ts\"", 5 | "eslint-fix": "eslint \"**/*.ts\" --fix", 6 | "msig-wallet": "npx ts-node src/wallet.ts", 7 | "list-tr": "npx ts-node src/listTransactions.ts", 8 | "subscribe-tr": "npx ts-node src/subscription.ts" 9 | }, 10 | "dependencies": { 11 | "@eversdk/core": "^1.41.1", 12 | "@eversdk/lib-node": "^1.41.1", 13 | "ts-node": "^10.9.1" 14 | }, 15 | "devDependencies": { 16 | "@types/node": "^16.0.1", 17 | "@typescript-eslint/eslint-plugin": "^5.57.1", 18 | "@typescript-eslint/parser": "^5.57.1", 19 | "eslint": "^7.30.0", 20 | "eslint-config-prettier": "^8.5.0", 21 | "eslint-plugin-prettier": "^4.0.0", 22 | "prettier": "^2.3.2", 23 | "typescript": "^4.6.3" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/utils/getGramsFromGiver.js: -------------------------------------------------------------------------------- 1 | const { 2 | contracts: { giver } 3 | } = require('../config') 4 | 5 | module.exports = netClient => async account => { 6 | try { 7 | process.stdout.write(`Sending grams from giver ${giver.address} to ${account}...`) 8 | const result = await netClient.contracts.run({ 9 | address: giver.address, 10 | functionName: 'sendTransaction', 11 | abi: giver.package.abi, 12 | input: { 13 | dest: account, 14 | value: 5000000000, 15 | bounce: false 16 | }, 17 | keyPair: giver.keyPair 18 | }) 19 | console.log(' ✓') 20 | process.stdout.write(`Pending account ${account} replenishment...`) 21 | const wait = await netClient.queries.accounts.waitFor( 22 | { 23 | id: { eq: account }, 24 | balance: { gt: '0' } 25 | }, 26 | 'id balance' 27 | ) 28 | console.log(` ✓`) 29 | return account 30 | } catch (e) { 31 | console.log(e) 32 | } 33 | } -------------------------------------------------------------------------------- /demo/subscribe-transactions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "format": "prettier --write 'src/**/*.ts' 'test/**/*.ts'", 4 | "eslint": "eslint \"**/*.ts\"", 5 | "eslint-fix": "eslint \"**/*.ts\" --fix", 6 | "msig-wallet": "npx ts-node src/wallet.ts", 7 | "list-tr": "npx ts-node src/listTransactions.ts", 8 | "subscribe-tr": "npx ts-node src/subscription.ts" 9 | }, 10 | "dependencies": { 11 | "@eversdk/core": "^1.41.1", 12 | "@eversdk/lib-node": "^1.41.1", 13 | "ts-node": "^10.9.1" 14 | }, 15 | "devDependencies": { 16 | "@types/node": "^16.0.1", 17 | "@typescript-eslint/eslint-plugin": "^5.57.1", 18 | "@typescript-eslint/parser": "^5.57.1", 19 | "eslint": "^7.30.0", 20 | "eslint-config-prettier": "^8.5.0", 21 | "eslint-plugin-prettier": "^4.0.0", 22 | "prettier": "^2.3.2", 23 | "typescript": "^4.6.3" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo/exchange/account-transactions.js: -------------------------------------------------------------------------------- 1 | const { queryAccount } = require("./transactions"); 2 | const { sleep } = require("./utils"); 3 | 4 | /** 5 | * Iterator to query account transactions by using cursor-based pagination. 6 | */ 7 | async function *queryAccountTransactions( 8 | client, 9 | address, 10 | options, 11 | ) { 12 | const variables = { 13 | address, 14 | cursor: null, 15 | ...options, 16 | } 17 | for (;;) { // <-- !WARNING! Infinity loop, you need to implement condition to exit from iterator 18 | const { result } = await client.net.query({query: queryAccount, variables}); 19 | const { transactions } = result.data.blockchain.account; 20 | 21 | yield transactions.edges.map(_ => _.node); 22 | variables.cursor = transactions.pageInfo.endCursor || variables.cursor; 23 | await sleep(200); // don't spam API 24 | } 25 | } 26 | 27 | module.exports = { 28 | queryAccountTransactions, 29 | }; 30 | -------------------------------------------------------------------------------- /core-examples/react-jest/src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import "./index.css"; 4 | import App from "./App"; 5 | import reportWebVitals from "./reportWebVitals"; 6 | import { TonClient } from "@eversdk/core"; 7 | import { libWeb } from "@eversdk/lib-web"; 8 | 9 | const root = ReactDOM.createRoot(document.getElementById("root")); 10 | 11 | // eslint-disable-next-line react-hooks/rules-of-hooks 12 | TonClient.useBinaryLibrary(libWeb); 13 | 14 | // Note: The application receives a client instance that 15 | // has been initialized with the @eversdk/lib-web library. 16 | root.render( 17 | 18 | 19 | 20 | ); 21 | 22 | // If you want to start measuring performance in your app, pass a function 23 | // to log results (for example: reportWebVitals(console.log)) 24 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 25 | reportWebVitals(); 26 | -------------------------------------------------------------------------------- /demo/ever-wallet/contract/everWallet.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "version": "2.3", 4 | "header": ["pubkey", "time", "expire"], 5 | "functions": [ 6 | { 7 | "name": "sendTransaction", 8 | "inputs": [ 9 | { "name": "dest", "type": "address" }, 10 | { "name": "value", "type": "uint128" }, 11 | { "name": "bounce", "type": "bool" }, 12 | { "name": "flags", "type": "uint8" }, 13 | { "name": "payload", "type": "cell" } 14 | ], 15 | "outputs": [] 16 | }, 17 | { 18 | "name": "sendTransactionRaw", 19 | "inputs": [ 20 | { "name": "flags", "type": "uint8" }, 21 | { "name": "message", "type": "cell" } 22 | ], 23 | "outputs": [] 24 | } 25 | ], 26 | "data": [], 27 | "events": [], 28 | "fields": [ 29 | { "name": "_pubkey", "type": "uint256" }, 30 | { "name": "_timestamp", "type": "uint64" } 31 | ] 32 | } -------------------------------------------------------------------------------- /core-examples/react-jest/src/App.test.js: -------------------------------------------------------------------------------- 1 | import "@testing-library/jest-dom"; 2 | import { render, screen, fireEvent } from "@testing-library/react"; 3 | import { TonClient } from "@eversdk/core"; 4 | import { libNode } from "@eversdk/lib-node"; 5 | 6 | import App from "./App"; 7 | 8 | let client; 9 | 10 | beforeAll(() => { 11 | TonClient.useBinaryLibrary(libNode); 12 | client = new TonClient(); 13 | }); 14 | 15 | afterAll(() => { 16 | client.close(); 17 | }); 18 | 19 | test("Check that button generates keys", async () => { 20 | // Note: The application receives a client instance that 21 | // has been initialized with the @eversdk/lib-node library. 22 | render(); 23 | 24 | const keyPairRegex = /"public": "[0-9a-f]{64}"/; 25 | 26 | expect(screen.queryByText(keyPairRegex)).not.toBeInTheDocument(); 27 | 28 | fireEvent.click(screen.getByRole("button")); 29 | 30 | expect(await screen.findByText(keyPairRegex)).toBeInTheDocument(); 31 | }); 32 | -------------------------------------------------------------------------------- /core-examples/node-js/deploy-with-initial-data/Timestamp.sol: -------------------------------------------------------------------------------- 1 | /** 2 | * This file was generated by EverDev. 3 | * EverDev is a part of EVER OS (see http://ton.dev). 4 | */ 5 | pragma ton-solidity >= 0.35.0; 6 | pragma AbiHeader expire; 7 | 8 | // This is class that describes you smart contract. 9 | contract TimestampStorage { 10 | // Contract can have an instance variables. 11 | // In this example instance variable `timestamp` is used to store the time of `constructor` or `touch` 12 | // function call 13 | uint32 public static timestamp; 14 | 15 | // Updates variable `timestamp` with current blockchain time. 16 | function touch() external { 17 | // Tells to the TVM that we accept this message. 18 | tvm.accept(); 19 | // Update timestamp 20 | timestamp = now; 21 | } 22 | 23 | // Function returns value of state variable `timestamp` 24 | function getTimestamp() public view returns (uint32) { 25 | return timestamp; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core-examples/node-js/func/contracts/everWallet.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "version": "2.3", 4 | "header": ["pubkey", "time", "expire"], 5 | "functions": [ 6 | { 7 | "name": "sendTransaction", 8 | "inputs": [ 9 | { "name": "dest", "type": "address" }, 10 | { "name": "value", "type": "uint128" }, 11 | { "name": "bounce", "type": "bool" }, 12 | { "name": "flags", "type": "uint8" }, 13 | { "name": "payload", "type": "cell" } 14 | ], 15 | "outputs": [] 16 | }, 17 | { 18 | "name": "sendTransactionRaw", 19 | "inputs": [ 20 | { "name": "flags", "type": "uint8" }, 21 | { "name": "message", "type": "cell" } 22 | ], 23 | "outputs": [] 24 | } 25 | ], 26 | "data": [], 27 | "events": [], 28 | "fields": [ 29 | { "name": "_pubkey", "type": "uint256" }, 30 | { "name": "_timestamp", "type": "uint64" } 31 | ] 32 | } -------------------------------------------------------------------------------- /appkit-examples/web-hello/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const webpack = require('webpack') 3 | const CopyWebpackPlugin = require('copy-webpack-plugin') 4 | 5 | module.exports = { 6 | devtool: 'inline-source-map', 7 | mode: 'development', 8 | devServer: { 9 | contentBase: path.join(__dirname, './web'), 10 | compress: true, 11 | port: process.env.WEBPACK_DEV_SERVER_PORT || 4000, 12 | disableHostCheck: true, 13 | historyApiFallback: true, 14 | }, 15 | entry: path.join(__dirname, './index.js'), 16 | output: { 17 | path: path.join(__dirname, './'), 18 | publicPath: '/', 19 | filename: '[name].bundle.js', 20 | }, 21 | plugins: [ 22 | new CopyWebpackPlugin({ 23 | patterns: [{ from: './node_modules/@eversdk/lib-web/eversdk.wasm' }], 24 | }), 25 | new webpack.LoaderOptionsPlugin({ 26 | minimize: false, 27 | debug: true, 28 | }), 29 | ], 30 | } 31 | -------------------------------------------------------------------------------- /core-examples/node-js/abi.encode_boc/index.js: -------------------------------------------------------------------------------- 1 | const { TonClient } = require("@eversdk/core"); 2 | const { libNode } = require("@eversdk/lib-node"); 3 | 4 | TonClient.useBinaryLibrary(libNode); 5 | 6 | (async () => { 7 | const client = new TonClient({}); 8 | try { 9 | // Encoding ABI parameters values into a BOC: 10 | const boc = (await client.abi.encode_boc({ 11 | params: [ 12 | { name: "dest", type: "address" }, 13 | { name: "value", type: "uint128" }, 14 | { name: "bounce", type: "bool" }, 15 | ], 16 | data: { 17 | "dest": "-1:3333333333333333333333333333333333333333333333333333333333333333", 18 | "value": "1234567", 19 | "bounce": true, 20 | } 21 | })).boc; 22 | 23 | console.log('BOC', boc); 24 | 25 | client.close(); 26 | } catch (error) { 27 | console.error(error); 28 | process.exit(1); 29 | } 30 | })(); 31 | -------------------------------------------------------------------------------- /demo/paginate-transactions/README.md: -------------------------------------------------------------------------------- 1 | # Example of pagination of blockchain transactions in workchain 0 2 | 3 | ## Prerequisites 4 | 5 | Create a project at https://dashboard.evercloud.dev and export the API endpoint as an environment variable: 6 | ``` 7 | export ENDPOINT=https://devnet.evercloud.dev//graphql 8 | ``` 9 | 10 | 11 | ## List all transactions in workchain 0 12 | 13 | This script paginates all transactions in wc 0 from beginning. 14 | 15 | Note: `archive: true` flag is necessary in the query to get data older than 7 days. 16 | 17 | ### Run this script 18 | 19 | ``` 20 | $ npm run list-tr 21 | ``` 22 | ### Example output 23 | ``` 24 | Getting all transactions in workchain 0 from the beginning/ 25 | Most likely this process will never end, so press CTRL+C to interrupt it 26 | Transaction id: transaction/bb04cdb68f4ef8b3ca9afe93e2eac063bd8fc341d38775a3bbb5fbe6c4eb32ba 27 | Transaction id: transaction/b391dffce1534b445d86e089a5cf9bece2c5f756870157f413426d47cd5c5663 28 | ---%<--- 29 | ``` 30 | -------------------------------------------------------------------------------- /demo/web_p2p_exchange/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const webpack = require('webpack') 3 | const CopyWebpackPlugin = require('copy-webpack-plugin') 4 | 5 | module.exports = { 6 | devtool: 'inline-source-map', 7 | mode: 'development', 8 | devServer: { 9 | contentBase: path.join(__dirname, './dist'), 10 | compress: true, 11 | port: process.env.WEBPACK_DEV_SERVER_PORT || 4000, 12 | disableHostCheck: true, 13 | historyApiFallback: true, 14 | }, 15 | entry: path.join(__dirname, './src/index.js'), 16 | output: { 17 | path: path.join(__dirname, './dist'), 18 | publicPath: '/', 19 | filename: '[name].bundle.js', 20 | }, 21 | plugins: [ 22 | new CopyWebpackPlugin({ 23 | patterns: [{ from: './node_modules/@eversdk/lib-web/eversdk.wasm' }], 24 | }), 25 | new webpack.LoaderOptionsPlugin({ 26 | minimize: false, 27 | debug: true, 28 | }), 29 | ], 30 | } 31 | -------------------------------------------------------------------------------- /appkit-examples/listen-and-decode/HelloEvents.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "constructor", 7 | "inputs": [ 8 | {"name":"text","type":"bytes"} 9 | ], 10 | "outputs": [ 11 | ] 12 | }, 13 | { 14 | "name": "setHelloText", 15 | "inputs": [ 16 | {"name":"text","type":"bytes"} 17 | ], 18 | "outputs": [ 19 | {"name":"oldText","type":"bytes"} 20 | ] 21 | }, 22 | { 23 | "name": "getHelloText", 24 | "inputs": [ 25 | ], 26 | "outputs": [ 27 | {"name":"text","type":"bytes"} 28 | ] 29 | }, 30 | { 31 | "name": "getTextUpdateTime", 32 | "inputs": [ 33 | ], 34 | "outputs": [ 35 | {"name":"time","type":"uint32"} 36 | ] 37 | } 38 | ], 39 | "data": [ 40 | ], 41 | "events": [ 42 | { 43 | "name": "TextUpdated", 44 | "inputs": [ 45 | {"name":"text","type":"bytes"}, 46 | {"name":"time","type":"uint32"} 47 | ], 48 | "outputs": [ 49 | ] 50 | } 51 | ] 52 | } 53 | -------------------------------------------------------------------------------- /core-examples/web-pack/hello/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const webpack = require('webpack') 3 | const CopyWebpackPlugin = require('copy-webpack-plugin') 4 | 5 | module.exports = { 6 | devtool: 'inline-source-map', 7 | mode: 'development', 8 | devServer: { 9 | contentBase: path.join(__dirname, './dist'), 10 | compress: true, 11 | port: process.env.WEBPACK_DEV_SERVER_PORT || 4000, 12 | disableHostCheck: true, 13 | historyApiFallback: true, 14 | }, 15 | entry: path.join(__dirname, './src/index.js'), 16 | output: { 17 | path: path.join(__dirname, './dist'), 18 | publicPath: '/', 19 | filename: '[name].bundle.js', 20 | }, 21 | plugins: [ 22 | new CopyWebpackPlugin({ 23 | patterns: [{ from: './node_modules/@eversdk/lib-web/eversdk.wasm' }], 24 | }), 25 | new webpack.LoaderOptionsPlugin({ 26 | minimize: false, 27 | debug: true, 28 | }), 29 | ], 30 | } 31 | -------------------------------------------------------------------------------- /appkit-examples/web-hello/README.md: -------------------------------------------------------------------------------- 1 | # Hello Web – WebPack TON SDK example 2 | 3 | In this example we use [ever-sdk-js](https://github.com/tonlabs/ever-sdk-js) to deploy solidity contract Hello.sol to [Evernode SE](https://docs.evercloud.dev/products/simple-emulator-se) (local blockchain). 4 | 5 | ## Prerequisite 6 | 7 | * Node.js >= [14.x installed](https://nodejs.org) 8 | * [Docker](https://docs.docker.com/desktop/#download-and-install) (if you want to use local blockchain Evernode SE) daemon running 9 | 10 | 11 | 12 | ## Preparation 13 | 14 | * [Run Evernode SE on your computer](https://docs.everos.dev/everdev/command-line-interface/evernode-platform-startup-edition-se) 15 | 16 | ```sh 17 | everdev se start 18 | ``` 19 | 20 | Note: if you have running Evernode SE already with port mapping other than 80, than you have to 21 | change Evernode SE address in index.js line 9. 22 | 23 | ## Install packages & run: 24 | 25 | ```sh 26 | npm i 27 | npm start 28 | ``` 29 | 30 | This opens the browser with address: http://localhost:4000 31 | -------------------------------------------------------------------------------- /demo/exchange/all-transactions.js: -------------------------------------------------------------------------------- 1 | const { queryAll } = require("./transactions"); 2 | const { sleep, consoleClear, consoleWrite } = require("./utils"); 3 | 4 | /** 5 | * Iterator to query ALL blockchain transactions by using cursor-based pagination. 6 | */ 7 | async function *queryAllTransactions( 8 | client, 9 | options, 10 | ) { 11 | const variables = { 12 | cursor: null, 13 | ...options, 14 | } 15 | for (;;) { // <-- !WARNING! Infinity loop, you need to implement condition to exit from iterator 16 | consoleWrite(`Requesting transactions...`) 17 | const { result } = await client.net.query({query: queryAll, variables}); 18 | const { transactions } = result.data.blockchain; 19 | consoleClear() 20 | yield transactions.edges.map(_ => _.node); 21 | variables.cursor = transactions.pageInfo.endCursor || variables.cursor; 22 | await sleep(200); // don't spam API 23 | } 24 | } 25 | 26 | module.exports = { 27 | queryAllTransactions, 28 | }; 29 | -------------------------------------------------------------------------------- /demo/exchange/blockchain.js: -------------------------------------------------------------------------------- 1 | async function getLastMasterBlockSeqNo(client) { 2 | return (await client.net.query({ 3 | query: ` 4 | query{ 5 | blockchain{ 6 | blocks(workchain:-1, last:1 ){ 7 | edges{ 8 | node{ 9 | seq_no 10 | } 11 | } 12 | } 13 | } 14 | } 15 | ` 16 | })).result.data.blockchain.blocks.edges[0].node.seq_no 17 | } 18 | 19 | async function getLastMasterBlockSeqNoByTime(client, utime) { 20 | return (await client.net.query({ 21 | query: `query MyQuery($utime: Int){ 22 | blockchain { 23 | master_seq_no_range(time_end: $utime) { end } 24 | } 25 | }`, 26 | variables: {utime}, 27 | })).result.data.blockchain.master_seq_no_range.end 28 | } 29 | 30 | 31 | module.exports = { 32 | getLastMasterBlockSeqNo, 33 | getLastMasterBlockSeqNoByTime, 34 | }; 35 | -------------------------------------------------------------------------------- /core-examples/node-js/subscribe-and-decode/HelloEvents.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "constructor", 7 | "inputs": [ 8 | {"name":"text","type":"bytes"} 9 | ], 10 | "outputs": [ 11 | ] 12 | }, 13 | { 14 | "name": "setHelloText", 15 | "inputs": [ 16 | {"name":"text","type":"bytes"} 17 | ], 18 | "outputs": [ 19 | {"name":"oldText","type":"bytes"} 20 | ] 21 | }, 22 | { 23 | "name": "getHelloText", 24 | "inputs": [ 25 | ], 26 | "outputs": [ 27 | {"name":"text","type":"bytes"} 28 | ] 29 | }, 30 | { 31 | "name": "getTextUpdateTime", 32 | "inputs": [ 33 | ], 34 | "outputs": [ 35 | {"name":"time","type":"uint32"} 36 | ] 37 | } 38 | ], 39 | "data": [ 40 | ], 41 | "events": [ 42 | { 43 | "name": "TextUpdated", 44 | "inputs": [ 45 | {"name":"text","type":"bytes"}, 46 | {"name":"time","type":"uint32"} 47 | ], 48 | "outputs": [ 49 | ] 50 | } 51 | ] 52 | } 53 | -------------------------------------------------------------------------------- /core-examples/node-js/custom-giver/README.md: -------------------------------------------------------------------------------- 1 | # Using custom Giver example 2 | 3 | In this example you will learn how to use your own Giver in the core SDK. 4 | 5 | ## Prerequisite 6 | 7 | * Node.js >= [14.x installed](https://nodejs.org) 8 | * [Docker](https://docs.docker.com/desktop/#download-and-install) installed and running 9 | * [EverDev CLI](https://docs.everos.dev/everdev/) 10 | 11 | 12 | ## Preparation 13 | 14 | * [Run Evernode SE on your computer](https://docs.evercloud.dev/products/simple-emulator-se) 15 | 16 | ```sh 17 | everdev se start 18 | ``` 19 | 20 | You're all set! Check out the Evernode SE GraphQL web playground at http://0.0.0.0/graphql. For Windows, use http://127.0.0.1/graphql or http://localhost/graphql. Learn more about GraphQL API [here](https://docs.evercloud.dev/reference/graphql-api). 21 | 22 | See other available [Evernode SE management options in EverDev](https://docs.everos.dev/everdev/command-line-interface/evernode-platform-startup-edition-se). 23 | 24 | ## Install packages & run: 25 | 26 | ```sh 27 | npm install 28 | node index.js 29 | ``` 30 | -------------------------------------------------------------------------------- /demo/hello-wallet/HelloWallet.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "constructor", 7 | "inputs": [ 8 | ], 9 | "outputs": [ 10 | ] 11 | }, 12 | { 13 | "name": "renderHelloWorld", 14 | "inputs": [ 15 | ], 16 | "outputs": [ 17 | {"name":"value0","type":"bytes"} 18 | ] 19 | }, 20 | { 21 | "name": "touch", 22 | "inputs": [ 23 | ], 24 | "outputs": [ 25 | ] 26 | }, 27 | { 28 | "name": "getTimestamp", 29 | "inputs": [ 30 | ], 31 | "outputs": [ 32 | {"name":"value0","type":"uint256"} 33 | ] 34 | }, 35 | { 36 | "name": "sendValue", 37 | "inputs": [ 38 | {"name":"dest","type":"address"}, 39 | {"name":"amount","type":"uint128"}, 40 | {"name":"bounce","type":"bool"} 41 | ], 42 | "outputs": [ 43 | ] 44 | }, 45 | { 46 | "name": "timestamp", 47 | "inputs": [ 48 | ], 49 | "outputs": [ 50 | {"name":"timestamp","type":"uint32"} 51 | ] 52 | } 53 | ], 54 | "data": [ 55 | ], 56 | "events": [ 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /core-examples/node-js/remp/Contract.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "version": "2.3", 4 | "header": ["time", "expire"], 5 | "functions": [ 6 | { 7 | "name": "constructor", 8 | "inputs": [ 9 | ], 10 | "outputs": [ 11 | ] 12 | }, 13 | { 14 | "name": "renderHelloWorld", 15 | "inputs": [ 16 | ], 17 | "outputs": [ 18 | {"name":"value0","type":"string"} 19 | ] 20 | }, 21 | { 22 | "name": "touch", 23 | "inputs": [ 24 | ], 25 | "outputs": [ 26 | ] 27 | }, 28 | { 29 | "name": "getTimestamp", 30 | "inputs": [ 31 | ], 32 | "outputs": [ 33 | {"name":"value0","type":"uint256"} 34 | ] 35 | }, 36 | { 37 | "name": "timestamp", 38 | "inputs": [ 39 | ], 40 | "outputs": [ 41 | {"name":"timestamp","type":"uint32"} 42 | ] 43 | } 44 | ], 45 | "data": [ 46 | ], 47 | "events": [ 48 | ], 49 | "fields": [ 50 | {"name":"_pubkey","type":"uint256"}, 51 | {"name":"_timestamp","type":"uint64"}, 52 | {"name":"_constructorFlag","type":"bool"}, 53 | {"name":"timestamp","type":"uint32"} 54 | ] 55 | } 56 | -------------------------------------------------------------------------------- /appkit-examples/custom-giver/HelloWallet.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "constructor", 7 | "inputs": [ 8 | ], 9 | "outputs": [ 10 | ] 11 | }, 12 | { 13 | "name": "renderHelloWorld", 14 | "inputs": [ 15 | ], 16 | "outputs": [ 17 | {"name":"value0","type":"bytes"} 18 | ] 19 | }, 20 | { 21 | "name": "touch", 22 | "inputs": [ 23 | ], 24 | "outputs": [ 25 | ] 26 | }, 27 | { 28 | "name": "getTimestamp", 29 | "inputs": [ 30 | ], 31 | "outputs": [ 32 | {"name":"value0","type":"uint256"} 33 | ] 34 | }, 35 | { 36 | "name": "sendValue", 37 | "inputs": [ 38 | {"name":"dest","type":"address"}, 39 | {"name":"amount","type":"uint128"}, 40 | {"name":"bounce","type":"bool"} 41 | ], 42 | "outputs": [ 43 | ] 44 | }, 45 | { 46 | "name": "timestamp", 47 | "inputs": [ 48 | ], 49 | "outputs": [ 50 | {"name":"timestamp","type":"uint32"} 51 | ] 52 | } 53 | ], 54 | "data": [ 55 | ], 56 | "events": [ 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /appkit-examples/hello-wallet/HelloWallet.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "constructor", 7 | "inputs": [ 8 | ], 9 | "outputs": [ 10 | ] 11 | }, 12 | { 13 | "name": "renderHelloWorld", 14 | "inputs": [ 15 | ], 16 | "outputs": [ 17 | {"name":"value0","type":"bytes"} 18 | ] 19 | }, 20 | { 21 | "name": "touch", 22 | "inputs": [ 23 | ], 24 | "outputs": [ 25 | ] 26 | }, 27 | { 28 | "name": "getTimestamp", 29 | "inputs": [ 30 | ], 31 | "outputs": [ 32 | {"name":"value0","type":"uint256"} 33 | ] 34 | }, 35 | { 36 | "name": "sendValue", 37 | "inputs": [ 38 | {"name":"dest","type":"address"}, 39 | {"name":"amount","type":"uint128"}, 40 | {"name":"bounce","type":"bool"} 41 | ], 42 | "outputs": [ 43 | ] 44 | }, 45 | { 46 | "name": "timestamp", 47 | "inputs": [ 48 | ], 49 | "outputs": [ 50 | {"name":"timestamp","type":"uint32"} 51 | ] 52 | } 53 | ], 54 | "data": [ 55 | ], 56 | "events": [ 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /core-examples/react-jest/src/App.js: -------------------------------------------------------------------------------- 1 | import logo from "./logo.svg"; 2 | import "./App.css"; 3 | import React from "react"; 4 | 5 | function App({ client }) { 6 | const [keys, setKeys] = React.useState(); 7 | const handleClick = () => { 8 | client.crypto 9 | .generate_random_sign_keys() 10 | .then(keys => { 11 | setKeys(JSON.stringify(keys, null, 2)); 12 | }) 13 | .catch(err => { 14 | console.error(err); 15 | setKeys(err.message); 16 | }); 17 | }; 18 | 19 | return ( 20 |
21 |
22 | logo 23 |
24 | 27 |
28 |
{keys}
29 |
30 |
31 | ); 32 | } 33 | 34 | export default App; 35 | -------------------------------------------------------------------------------- /demo/hello-wallet/contracts/HelloWallet.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "constructor", 7 | "inputs": [ 8 | ], 9 | "outputs": [ 10 | ] 11 | }, 12 | { 13 | "name": "renderHelloWorld", 14 | "inputs": [ 15 | ], 16 | "outputs": [ 17 | {"name":"value0","type":"bytes"} 18 | ] 19 | }, 20 | { 21 | "name": "touch", 22 | "inputs": [ 23 | ], 24 | "outputs": [ 25 | ] 26 | }, 27 | { 28 | "name": "getTimestamp", 29 | "inputs": [ 30 | ], 31 | "outputs": [ 32 | {"name":"value0","type":"uint256"} 33 | ] 34 | }, 35 | { 36 | "name": "sendValue", 37 | "inputs": [ 38 | {"name":"dest","type":"address"}, 39 | {"name":"amount","type":"uint128"}, 40 | {"name":"bounce","type":"bool"} 41 | ], 42 | "outputs": [ 43 | ] 44 | }, 45 | { 46 | "name": "timestamp", 47 | "inputs": [ 48 | ], 49 | "outputs": [ 50 | {"name":"timestamp","type":"uint32"} 51 | ] 52 | } 53 | ], 54 | "data": [ 55 | ], 56 | "events": [ 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /appkit-examples/web-hello/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-hello-example", 3 | "version": "1.0.0", 4 | "private": true, 5 | "description": "Hello Web – WebPack TON Client example", 6 | "scripts": { 7 | "npm install": "npm install", 8 | "start": "webpack serve --open", 9 | "web:bundle": "webpack -p --config webpack.config.js --progress --colors --display-error-details" 10 | }, 11 | "keywords": [ 12 | "TON", 13 | "Client", 14 | "FreeTON", 15 | "TONOS", 16 | "SDK" 17 | ], 18 | "author": "EverX LTD.", 19 | "license": "SEE LICENSE IN LICENSE", 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/tonlabs/sdk-samples.git" 23 | }, 24 | "homepage": "https://docs.everos.dev/", 25 | "dependencies": { 26 | "@eversdk/appkit": "^0", 27 | "@eversdk/core": "^1.37.0", 28 | "@eversdk/lib-web": "^1.37.1", 29 | "utils": "file:../../utils" 30 | }, 31 | "devDependencies": { 32 | "copy-webpack-plugin": "^7.0.0", 33 | "webpack": "^5.21.2", 34 | "webpack-cli": "^4.5.0", 35 | "webpack-dev-server": "^3.11.2" 36 | }, 37 | "main": "index.js" 38 | } 39 | -------------------------------------------------------------------------------- /core-examples/web-pack/hello/README.md: -------------------------------------------------------------------------------- 1 | # Hello Web – WebPack TON SDK example 2 | 3 | In this example we use [ever-sdk-js](https://github.com/tonlabs/ever-sdk-js) to deploy solidity contract Hello.sol to [Evernode SE](https://docs.evercloud.dev/products/simple-emulator-se) (local blockchain). 4 | 5 | ## Prerequisite 6 | 7 | * Node.js >= [14.x installed](https://nodejs.org) 8 | * [Docker](https://docs.docker.com/desktop/#download-and-install) (if you want to use local blockchain Evernode SE) daemon running 9 | 10 | 11 | 12 | ## Preparation 13 | 14 | * [Run Evernode SE on your computer](https://docs.everos.dev/everdev/command-line-interface/evernode-platform-startup-edition-se) 15 | 16 | ```sh 17 | docker run -d --name local-node -e USER_AGREEMENT=yes -p80:80 tonlabs/local-node 18 | ``` 19 | 20 | Note: if you have running Evernode SE already with port mapping other than 80, than you have to 21 | change Evernode SE address in index.js line 9. 22 | 23 | ## Install packages & run: 24 | 25 | ```sh 26 | npm install 27 | npm start 28 | ``` 29 | 30 | Then open in browser address: http://localhost:4000 31 | -------------------------------------------------------------------------------- /core-examples/node-js/custom-giver/HelloWallet.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "constructor", 7 | "inputs": [ 8 | ], 9 | "outputs": [ 10 | ] 11 | }, 12 | { 13 | "name": "renderHelloWorld", 14 | "inputs": [ 15 | ], 16 | "outputs": [ 17 | {"name":"value0","type":"bytes"} 18 | ] 19 | }, 20 | { 21 | "name": "touch", 22 | "inputs": [ 23 | ], 24 | "outputs": [ 25 | ] 26 | }, 27 | { 28 | "name": "getTimestamp", 29 | "inputs": [ 30 | ], 31 | "outputs": [ 32 | {"name":"value0","type":"uint256"} 33 | ] 34 | }, 35 | { 36 | "name": "sendValue", 37 | "inputs": [ 38 | {"name":"dest","type":"address"}, 39 | {"name":"amount","type":"uint128"}, 40 | {"name":"bounce","type":"bool"} 41 | ], 42 | "outputs": [ 43 | ] 44 | }, 45 | { 46 | "name": "timestamp", 47 | "inputs": [ 48 | ], 49 | "outputs": [ 50 | {"name":"timestamp","type":"uint32"} 51 | ] 52 | } 53 | ], 54 | "data": [ 55 | ], 56 | "events": [ 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /core-examples/node-js/hello-wallet/contracts/HelloWallet.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "constructor", 7 | "inputs": [ 8 | ], 9 | "outputs": [ 10 | ] 11 | }, 12 | { 13 | "name": "renderHelloWorld", 14 | "inputs": [ 15 | ], 16 | "outputs": [ 17 | {"name":"value0","type":"bytes"} 18 | ] 19 | }, 20 | { 21 | "name": "touch", 22 | "inputs": [ 23 | ], 24 | "outputs": [ 25 | ] 26 | }, 27 | { 28 | "name": "getTimestamp", 29 | "inputs": [ 30 | ], 31 | "outputs": [ 32 | {"name":"value0","type":"uint256"} 33 | ] 34 | }, 35 | { 36 | "name": "sendValue", 37 | "inputs": [ 38 | {"name":"dest","type":"address"}, 39 | {"name":"amount","type":"uint128"}, 40 | {"name":"bounce","type":"bool"} 41 | ], 42 | "outputs": [ 43 | ] 44 | }, 45 | { 46 | "name": "timestamp", 47 | "inputs": [ 48 | ], 49 | "outputs": [ 50 | {"name":"timestamp","type":"uint32"} 51 | ] 52 | } 53 | ], 54 | "data": [ 55 | ], 56 | "events": [ 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/utils/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable global-require */ 2 | const R = require('ramda') 3 | const convert = require('./convert') 4 | 5 | const base64ToUtf8 = convert('base64', 'utf8') 6 | const hexToUtf8 = convert('hex', 'utf8') 7 | const utf8ToHex = convert('utf8', 'hex') 8 | const pipeWhileNotNil = require('./pipeWhileNotNil') 9 | const asyncPipe = (arr) => R.pipeWith(R.then, R.map(R.unless(R.isNil), arr)) 10 | 11 | module.exports = { 12 | asyncPipe, 13 | base64ToUtf8, 14 | hexToUtf8, 15 | deploy: require('./deploy'), 16 | naclBoxContainer: require('./naclBoxContainer'), 17 | openNaclBoxContainer: require('./openNaclBoxContainer'), 18 | pipeWhileNotNil, 19 | promiseTimeout: require('./promiseTimeout'), 20 | run: require('./run'), 21 | runWithSigningBox: require('./runWithSigningBox'), 22 | runLocalWithPredicateAndRetries: require('./runLocalWithPredicateAndRetries'), 23 | sleep: require('./sleep'), 24 | strip0x: (str) => str.replace(/^0x/, ''), 25 | strip0xPad64: require('./strip0xPad64'), 26 | utf8ToHex, 27 | } 28 | -------------------------------------------------------------------------------- /core-examples/node-js/decode_tvc/index.js: -------------------------------------------------------------------------------- 1 | const { TonClient } = require("@eversdk/core"); 2 | const { libNode } = require("@eversdk/lib-node"); 3 | const fs = require ('fs'); 4 | 5 | TonClient.useBinaryLibrary(libNode); 6 | (async () => { 7 | const client = new TonClient(); 8 | const contractPath = "../hello-wallet/HelloWallet.tvc"; 9 | console.log("Contract path: " + contractPath); 10 | 11 | // Read TVC file 12 | const tvc = fs.readFileSync(contractPath, 'base64'); 13 | try { 14 | // Decode TVC 15 | const decoded = await client.boc.decode_tvc({ 16 | tvc: tvc, 17 | }); 18 | 19 | // Output some of decoded data 20 | console.log("Contract code hash:", decoded.code_hash); 21 | console.log("Contract compiled with:", decoded.compiler_version); 22 | 23 | /* 24 | Outputs: 25 | Contract code hash: a8b86403c2e789b2b563407ee5b79636a32e6b1e8426d6d68f1170fa447815af 26 | Contract compiled with: sol 0.46.0 27 | */ 28 | } catch (err) { 29 | console.error(err); 30 | } 31 | client.close(); 32 | })(); 33 | -------------------------------------------------------------------------------- /demo/exchange/utils.js: -------------------------------------------------------------------------------- 1 | const readline = require('readline'); 2 | 3 | readline.emitKeypressEvents(process.stdin); 4 | 5 | process.stdin.setRawMode(true); 6 | 7 | const keyPress = async () => { 8 | consoleWrite(`Press any key to continue...(Press Ctrl + C to exit)`); 9 | return new Promise((resolve, reject) => { 10 | process.stdin.once('keypress', (_, key) => { 11 | if (key.ctrl && key.name === 'c') { 12 | consoleClear(); 13 | reject(); 14 | } else { 15 | consoleClear(); 16 | resolve(); 17 | } 18 | }); 19 | }); 20 | }; 21 | 22 | const sleep = (ms = 0) => new Promise(resolve => setTimeout(resolve, ms)); 23 | 24 | const seconds = (ms = Date.now()) => Math.round(ms / 1000); 25 | 26 | const consoleClear = () => consoleWrite(''); 27 | 28 | // ESC[2K clears entire line 29 | // ESC[#G moves cursor to left corner 30 | const consoleWrite = msg => process.stdout.write(`\x1b[2K\x1b[0G${msg}`); 31 | 32 | 33 | module.exports = { 34 | keyPress, 35 | consoleClear, 36 | consoleWrite, 37 | seconds, 38 | sleep, 39 | } 40 | -------------------------------------------------------------------------------- /appkit-examples/listen-and-decode/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS SDK Hello example 2 | 3 | In this example we demonstrate: 4 | - How to subscribe for realtime changes related to a specific account. 5 | - How to decode events and other messages related to this account. 6 | 7 | ## Prerequisite 8 | 9 | * Node.js >= [14.x installed](https://nodejs.org) 10 | * [Docker](https://docs.docker.com/desktop/#download-and-install) installed and running 11 | * [EverDev CLI](https://docs.everos.dev/everdev/) 12 | 13 | ## Preparation 14 | 15 | * [Run Evernode SE on your computer](https://docs.evercloud.dev/products/simple-emulator-se) 16 | 17 | ```sh 18 | everdev se start 19 | ``` 20 | 21 | You're all set! Check out the Evernode SE GraphQL web playground at http://0.0.0.0/graphql. For Windows, use http://127.0.0.1/graphql or http://localhost/graphql. Learn more about GraphQL API [here](https://docs.evercloud.dev/reference/graphql-api). 22 | 23 | See other available [Evernode SE management options in EverDev](https://docs.everos.dev/everdev/command-line-interface/evernode-platform-startup-edition-se). 24 | 25 | ## Install packages & run: 26 | 27 | ```sh 28 | npm i 29 | npm start 30 | ``` 31 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/utils/openNaclBoxContainer.js: -------------------------------------------------------------------------------- 1 | const R = require('ramda') 2 | const hexToUtf8 = (hex) => Buffer.from(hex, 'hex').toString('utf-8') 3 | /* 4 | * openNaclBoxContainer :: tonClient -> string -> string -> string -> object | Error 5 | */ 6 | const openNaclBoxContainer = async (tonClient, secretKey, optPubKey, encryptedData) => { 7 | try { 8 | const { nonce, base64, pub_key } = JSON.parse(hexToUtf8(encryptedData)) 9 | 10 | if (optPubKey && pub_key && optPubKey !== pub_key) 11 | throw Error(`Conflict, which pub_key is correct? ${JSON.stringify({ optPubKey, pub_key })}`) 12 | 13 | const stringifiedJson = await tonClient.crypto.naclBoxOpen({ 14 | nonce, 15 | secretKey, 16 | theirPublicKey: pub_key || optPubKey, 17 | message: { base64 }, 18 | outputEncoding: 'Hex', 19 | }) 20 | return JSON.parse(hexToUtf8(stringifiedJson)) 21 | } catch (err) { 22 | console.log('openNaclBoxContainer error:', err) 23 | throw err 24 | } 25 | } 26 | 27 | module.exports = R.curry(openNaclBoxContainer) -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/utils/naclBoxContainer.js: -------------------------------------------------------------------------------- 1 | const R = require('ramda') 2 | /* 3 | * naclBoxContainer :: tonClient -> string -> string -> string -> object -> string | Error 4 | */ 5 | const naclBoxContainer = (tonClient) => async (secretKey, encryptionPublicKey, theirPublicKey, json) => { 6 | try { 7 | const nonce = await tonClient.crypto.randomGenerateBytes(24, 'Hex') 8 | 9 | const base64 = await tonClient.crypto.naclBox({ 10 | message: { 11 | base64: Buffer.from(JSON.stringify(json)).toString('base64'), 12 | }, 13 | nonce, 14 | theirPublicKey, 15 | secretKey, 16 | outputEncoding: 'Base64', 17 | }) 18 | 19 | return Buffer.from( 20 | JSON.stringify({ 21 | nonce, 22 | base64, 23 | pub_key: encryptionPublicKey, 24 | }), 25 | 'utf-8', 26 | ).toString('hex') 27 | } catch (err) { 28 | console.log('naclBox error:', err) 29 | throw err 30 | } 31 | } 32 | 33 | module.exports = R.curry(naclBoxContainer) -------------------------------------------------------------------------------- /core-examples/node-js/compress-decompress/index.js: -------------------------------------------------------------------------------- 1 | const { TonClient } = require('@eversdk/core') 2 | const { libNode } = require('@eversdk/lib-node') 3 | 4 | TonClient.useBinaryLibrary(libNode) 5 | 6 | const client = new TonClient() 7 | 8 | async function main() { 9 | const maxCompression = 21 10 | const helloWorld = "Hello World!" 11 | 12 | const helloWorldInBase64 = Buffer.from(helloWorld, "utf8").toString("base64") 13 | 14 | /* 15 | * @returns {Object} {compressed: base64_string} 16 | */ 17 | const resultCompressed = await client.utils.compress_zstd({level: maxCompression, uncompressed: helloWorldInBase64}) 18 | 19 | /* 20 | * @returns {Object} {decompressed: base64_string} 21 | */ 22 | const resultDecompressed = await client.utils.decompress_zstd({...resultCompressed}) 23 | 24 | 25 | const helloWorldAfter = Buffer.from(resultDecompressed.decompressed, "base64").toString("utf8") 26 | console.log(helloWorldAfter) 27 | } 28 | 29 | (async () => { 30 | try { 31 | await main() 32 | process.exit(0) 33 | } catch (error) { 34 | console.error(error) 35 | process.exit(1) 36 | } 37 | })() 38 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/utils/getEncryptionPublicKey.js: -------------------------------------------------------------------------------- 1 | const { path } = require('ramda') 2 | const strip0xPad64 = require('./strip0xPad64') 3 | const runLocalWithPredicateAndRetries = require('./runLocalWithPredicateAndRetries') 4 | // const propNotEmpty = require('./fp/propNotEmpty') 5 | 6 | const map = {} // TODO 7 | 8 | async function getEncryptionPublicKey (tonClient, address, abi) { 9 | if (map[address]) return map[address] 10 | 11 | process.stdout.write(`Try to get user encryptionPublicKey from: ${address}`) 12 | 13 | const predicate = o => true 14 | // because this prop is named differently in different contracts 15 | // o => R.or(propNotEmpty(['output', 'encryptionKey'], o), propNotEmpty(['output', 'encryptionPublicKey'], o)) 16 | 17 | const { 18 | output: { encryptionKey, encryptionPublicKey } 19 | } = await runLocalWithPredicateAndRetries(tonClient)(predicate)( 20 | { address, package: { abi }, keyPair: null }, 21 | 'getEncryptionPublicKey', 22 | {} 23 | ) 24 | console.log(' ✓') 25 | return (map[address] = strip0xPad64(encryptionKey || encryptionPublicKey)) 26 | } 27 | 28 | module.exports = getEncryptionPublicKey 29 | -------------------------------------------------------------------------------- /core-examples/node-js/deploy-with-initial-data/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS SDK Hello example 2 | 3 | In this example we deploy solidity contract Hello.sol to [Evernode SE](https://docs.evercloud.dev/products/simple-emulator-se) (local blockchain) with initial data and run its get-method. 4 | 5 | ## Prerequisite 6 | 7 | * Node.js >= [14.x installed](https://nodejs.org) 8 | * [Docker](https://docs.docker.com/desktop/#download-and-install) installed and running 9 | * [EverDev CLI](https://docs.everos.dev/everdev/) 10 | 11 | 12 | ## Preparation 13 | 14 | * [Run Evernode SE on your computer](https://docs.evercloud.dev/products/simple-emulator-se) 15 | 16 | ```sh 17 | everdev se start 18 | ``` 19 | 20 | You're all set! Check out the Evernode SE GraphQL web playground at http://0.0.0.0/graphql. For Windows, use http://127.0.0.1/graphql or http://localhost/graphql. Learn more about GraphQL API [here](https://docs.evercloud.dev/reference/graphql-api). 21 | 22 | See other available [Evernode SE management options in EverDev](https://docs.everos.dev/everdev/command-line-interface/evernode-platform-startup-edition-se). 23 | 24 | ## Install packages & run: 25 | 26 | ```sh 27 | npm install 28 | node index.js 29 | ``` 30 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/getNew2FA.js: -------------------------------------------------------------------------------- 1 | const { url2FA, user, pass } = require('./config') 2 | const request2FA = require('./request2FA') 3 | import { 4 | Alert 5 | } from 'react-native'; 6 | 7 | import Toast from 'react-native-simple-toast' 8 | 9 | 10 | const getNew2FA = async (fname, oldCode2FA) => { 11 | await new Promise(r => setTimeout(r, 5000)) 12 | alert('Requesting correct 2FA code...') 13 | console.log('Requesting correct 2FA code...') 14 | let code2FA 15 | while (true) { 16 | console.log("request2FA.... ") 17 | Toast.show("request2FA.... ") 18 | code2FA = await request2FA(fname) 19 | console.log("New code2FA = " + { code2FA }) 20 | Toast.show("New code2FA = " + { code2FA }) 21 | if (code2FA && (oldCode2FA ? code2FA !== oldCode2FA : true)) { 22 | await new Promise(r => setTimeout(r, 5000)) 23 | console.log('Got correct 2FA code %s', code2FA) 24 | alert('Got correct 2FA code ' + code2FA) 25 | break 26 | } 27 | await new Promise(r => setTimeout(r, 5000)) 28 | } 29 | return code2FA 30 | } 31 | 32 | module.exports = getNew2FA -------------------------------------------------------------------------------- /core-examples/node-js/encode_tvc/index.js: -------------------------------------------------------------------------------- 1 | const { TonClient } = require("@eversdk/core"); 2 | const { libNode } = require("@eversdk/lib-node"); 3 | const fs = require ('fs'); 4 | 5 | TonClient.useBinaryLibrary(libNode); 6 | (async () => { 7 | const client = new TonClient(); 8 | 9 | // Read TVC from file 10 | const tvc = fs.readFileSync("../hello-wallet/contracts/HelloWallet.tvc", 'base64'); 11 | try { 12 | // Decode TVC 13 | const decoded = await client.boc.decode_tvc({ 14 | tvc: tvc, 15 | }); 16 | 17 | // Do something with contract's data or else 18 | // .... 19 | 20 | // Encode altered data to TVC 21 | const updated = (await client.boc.encode_tvc({ 22 | code: decoded.code, 23 | data: decoded.data, 24 | library: decoded.library, 25 | split_depth: decoded.split_depth, 26 | tick: decoded.tick, 27 | tock: decoded.tock, 28 | })).tvc; 29 | 30 | // Write updated TVC into a file 31 | fs.writeFileSync("updated.tvc", updated, "base64"); 32 | } catch (err) { 33 | console.error(err); 34 | } 35 | client.close(); 36 | })(); 37 | -------------------------------------------------------------------------------- /core-examples/node-js/hello-wallet/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS SDK Hello example 2 | 3 | In this example we deploy solidity contract Hello.sol to [Evernode SE](https://docs.evercloud.dev/products/simple-emulator-se) (local blockchain), run its on-chain method (without and with parameters) and run its get-method. 4 | 5 | ## Prerequisite 6 | 7 | * Node.js >= [14.x installed](https://nodejs.org) 8 | * [Docker](https://docs.docker.com/desktop/#download-and-install) installed and running 9 | * [EverDev CLI](https://docs.everos.dev/everdev/) 10 | 11 | 12 | ## Preparation 13 | 14 | * [Run Evernode SE on your computer](https://docs.evercloud.dev/products/simple-emulator-se) 15 | 16 | ```sh 17 | everdev se start 18 | ``` 19 | 20 | You're all set! Check out the Evernode SE GraphQL web playground at http://0.0.0.0/graphql. For Windows, use http://127.0.0.1/graphql or http://localhost/graphql. Learn more about GraphQL API [here](https://docs.evercloud.dev/reference/graphql-api). 21 | 22 | See other available [Evernode SE management options in EverDev](https://docs.everos.dev/everdev/command-line-interface/evernode-platform-startup-edition-se). 23 | 24 | ## Install packages & run: 25 | 26 | ```sh 27 | npm install 28 | node index.js 29 | ``` 30 | -------------------------------------------------------------------------------- /core-examples/react-jest/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@eversdk/core": "^1.37.0", 7 | "@eversdk/lib-web": "^1.37.0", 8 | "react": "^18.2.0", 9 | "react-dom": "^18.2.0", 10 | "react-scripts": "5.0.1", 11 | "web-vitals": "^2.1.4" 12 | }, 13 | "scripts": { 14 | "start": "react-app-rewired start", 15 | "build": "react-app-rewired build", 16 | "test": "react-app-rewired test", 17 | "eject": "react-scripts eject" 18 | }, 19 | "eslintConfig": { 20 | "extends": ["react-app", "react-app/jest"] 21 | }, 22 | "browserslist": { 23 | "production": [">0.2%", "not dead", "not op_mini all"], 24 | "development": ["last 1 chrome version", "last 1 firefox version", "last 1 safari version"] 25 | }, 26 | "devDependencies": { 27 | "@eversdk/lib-node": "^1.37.0", 28 | "@testing-library/jest-dom": "^5.16.4", 29 | "@testing-library/react": "^13.3.0", 30 | "@testing-library/user-event": "^13.5.0", 31 | "copy-webpack-plugin": "^11.0.0", 32 | "react-app-rewired": "^2.2.1" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "29.0.2" 6 | minSdkVersion = 24 7 | compileSdkVersion = 29 8 | targetSdkVersion = 29 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.5.3") 16 | // NOTE: Do not place your application dependencies here; they belong 17 | // in the individual module build.gradle files 18 | } 19 | } 20 | 21 | allprojects { 22 | repositories { 23 | mavenLocal() 24 | maven { 25 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 26 | url("$rootDir/../node_modules/react-native/android") 27 | } 28 | maven { 29 | // Android JSC is installed from npm 30 | url("$rootDir/../node_modules/jsc-android/dist") 31 | } 32 | 33 | google() 34 | jcenter() 35 | maven { url 'https://www.jitpack.io' } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /core-examples/next-js/hello-next-js/src/pages/hello.tsx: -------------------------------------------------------------------------------- 1 | import React, {useContext, useEffect, useState} from "react" 2 | import { 3 | KeyPair, TonClient, 4 | } from "@eversdk/core" 5 | import {TonClientContext} from "@/context/tonclient" 6 | 7 | type HelloState = { 8 | version: string 9 | keys: KeyPair 10 | } 11 | 12 | async function createState(client: TonClient): Promise { 13 | return { 14 | version: (await client.client.version()).version, 15 | keys: await client.crypto.generate_random_sign_keys(), 16 | } 17 | } 18 | 19 | const Hello = () => { 20 | const [hello, setHello] = useState() 21 | const {client} = useContext(TonClientContext) 22 | useEffect(() => { 23 | (async () => { 24 | if (client) { 25 | setHello(await createState(client)) 26 | } 27 | })() 28 | }, [client]) 29 | 30 | return ( 31 |
32 |

TonClient Version: {hello?.version ?? "-"}

33 |

Public Key: {hello?.keys.public ?? "-"}

34 |

Secret Key: {hello?.keys.secret ?? "-"}

35 |
36 | ) 37 | } 38 | 39 | // export default Demo 40 | 41 | export default Hello 42 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '11.0' 5 | 6 | target 'TonNfcCardReactNativeTest' do 7 | config = use_native_modules! 8 | 9 | use_react_native!(:path => config["reactNativePath"]) 10 | 11 | pod 'TonNfcClientSwift' 12 | 13 | # pod 'react-native-new-ton-nfc-card-lib', :path => '../../react-native-new-ton-nfc-card-lib' 14 | 15 | 16 | pod 'ton-nfc-client', :path => '../node_modules/ton-nfc-client' 17 | 18 | target 'TonNfcCardReactNativeTestTests' do 19 | inherit! :complete 20 | # Pods for testing 21 | end 22 | 23 | # Enables Flipper. 24 | # 25 | # Note that if you have use_frameworks! enabled, Flipper will not work and 26 | # you should disable these next few lines. 27 | use_flipper! 28 | post_install do |installer| 29 | flipper_post_install(installer) 30 | end 31 | end 32 | 33 | target 'TonNfcCardReactNativeTest-tvOS' do 34 | # Pods for TonNfcCardReactNativeTest-tvOS 35 | 36 | target 'TonNfcCardReactNativeTest-tvOSTests' do 37 | inherit! :search_paths 38 | # Pods for testing 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /nfc-card/ton-nfc-client-react-native/TonNfcCardReactNativeTest/requestRecoveryData.js: -------------------------------------------------------------------------------- 1 | const { path } = require('ramda') 2 | const { user, pass } = require('./config') 3 | import {decode as atob, encode as btoa} from 'base-64' 4 | 5 | import Toast from 'react-native-simple-toast'; 6 | 7 | 8 | const requestRecoveryData = () => 9 | fetch('https://jessie.tonlabs.io/card-service/test-data.json'/*'https://dev.services.tonlabs.io/card-service/test-data.json'*/, { 10 | method:'GET', 11 | headers: {'Authorization': 'Basic ' + btoa('ton:integration')} 12 | }) 13 | .then(response => { 14 | //console.log(response) 15 | return response.json() 16 | }) 17 | .then(json => { 18 | //console.log(json) 19 | console.log("Multisig address = " + json.multisig.address) 20 | console.log("Surf public key = " + json.multisig.keyPair.public) 21 | console.log("P1 = " + json.cards[0].P1) 22 | console.log("CS = " + json.cards[0].CS) 23 | Toast.show("Multisig address = " + json.multisig.address + "\n" + 24 | "Surf public key = " + json.multisig.keyPair.public + "\n" + 25 | "P1 = " + json.cards[0].P1 + "\n" + 26 | "CS = " + json.cards[0].CS 27 | ) 28 | 29 | return json 30 | }) 31 | 32 | 33 | module.exports = requestRecoveryData 34 | 35 | -------------------------------------------------------------------------------- /demo/hello-wallet/contracts/GiverV2.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "sendTransaction", 7 | "inputs": [ 8 | { "name": "dest", "type": "address" }, 9 | { "name": "value", "type": "uint128" }, 10 | { "name": "bounce", "type": "bool" } 11 | ], 12 | "outputs": [] 13 | }, 14 | { 15 | "name": "getMessages", 16 | "inputs": [], 17 | "outputs": [ 18 | { 19 | "components": [ 20 | { "name": "hash", "type": "uint256" }, 21 | { "name": "expireAt", "type": "uint64" } 22 | ], 23 | "name": "messages", 24 | "type": "tuple[]" 25 | } 26 | ] 27 | }, 28 | { 29 | "name": "upgrade", 30 | "inputs": [{ "name": "newcode", "type": "cell" }], 31 | "outputs": [] 32 | }, 33 | { 34 | "name": "constructor", 35 | "inputs": [], 36 | "outputs": [] 37 | } 38 | ], 39 | "data": [], 40 | "events": [] 41 | } 42 | -------------------------------------------------------------------------------- /core-examples/node-js/func/contracts/GiverV2.abi.json: -------------------------------------------------------------------------------- 1 | { 2 | "ABI version": 2, 3 | "header": ["time", "expire"], 4 | "functions": [ 5 | { 6 | "name": "sendTransaction", 7 | "inputs": [ 8 | { "name": "dest", "type": "address" }, 9 | { "name": "value", "type": "uint128" }, 10 | { "name": "bounce", "type": "bool" } 11 | ], 12 | "outputs": [] 13 | }, 14 | { 15 | "name": "getMessages", 16 | "inputs": [], 17 | "outputs": [ 18 | { 19 | "components": [ 20 | { "name": "hash", "type": "uint256" }, 21 | { "name": "expireAt", "type": "uint64" } 22 | ], 23 | "name": "messages", 24 | "type": "tuple[]" 25 | } 26 | ] 27 | }, 28 | { 29 | "name": "upgrade", 30 | "inputs": [{ "name": "newcode", "type": "cell" }], 31 | "outputs": [] 32 | }, 33 | { 34 | "name": "constructor", 35 | "inputs": [], 36 | "outputs": [] 37 | } 38 | ], 39 | "data": [], 40 | "events": [] 41 | } 42 | -------------------------------------------------------------------------------- /demo/web_p2p_exchange/src/ton-contracts/giver.package.js: -------------------------------------------------------------------------------- 1 | const abi = { 2 | 'ABI version': 2, 3 | header: ['time', 'expire'], 4 | functions: [ 5 | { 6 | name: 'sendTransaction', 7 | inputs: [ 8 | { name: 'dest', type: 'address' }, 9 | { name: 'value', type: 'uint128' }, 10 | { name: 'bounce', type: 'bool' }, 11 | ], 12 | outputs: [], 13 | }, 14 | { 15 | name: 'getMessages', 16 | inputs: [], 17 | outputs: [ 18 | { 19 | components: [ 20 | { name: 'hash', type: 'uint256' }, 21 | { name: 'expireAt', type: 'uint64' }, 22 | ], 23 | name: 'messages', 24 | type: 'tuple[]', 25 | }, 26 | ], 27 | }, 28 | { 29 | name: 'upgrade', 30 | inputs: [{ name: 'newcode', type: 'cell' }], 31 | outputs: [], 32 | }, 33 | { 34 | name: 'constructor', 35 | inputs: [], 36 | outputs: [], 37 | }, 38 | ], 39 | data: [], 40 | events: [], 41 | } 42 | 43 | module.exports = { abi } 44 | -------------------------------------------------------------------------------- /appkit-examples/subscription/README.md: -------------------------------------------------------------------------------- 1 | # NodeJS SDK Subscription example 2 | 3 | In this example we use multisig wallet contract to send tokens from one wallet to another. You will learn how to subscribe to the new transactions and messages of an account. 4 | 5 | In the example we use [Evernode SE](https://docs.evercloud.dev/products/simple-emulator-se), local blockchain. 6 | 7 | ## Prerequisite 8 | 9 | * Node.js >= [14.x installed](https://nodejs.org) 10 | * [Docker](https://docs.docker.com/desktop/#download-and-install) 11 | * [EverDev CLI](https://docs.everos.dev/everdev/) 12 | 13 | 14 | ## Preparation 15 | 16 | * [Run Evernode SE on your computer](https://docs.everos.dev/everdev/command-line-interface/evernode-platform-startup-edition-se) 17 | 18 | ```sh 19 | everdev se start 20 | ``` 21 | 22 | You're all set! Check out the Evernode SE GraphQL web playground at http://0.0.0.0/graphql. For Windows, use http://127.0.0.1/graphql or http://localhost/graphql. Learn more about GraphQL API [here](https://docs.evercloud.dev/reference/graphql-api). 23 | 24 | See other available [Evernode SE management options in EverDev](https://docs.everos.dev/everdev/command-line-interface/evernode-platform-startup-edition-se). 25 | 26 | ## Install packages and run: 27 | 28 | ```sh 29 | npm i 30 | npm start 31 | ``` 32 | --------------------------------------------------------------------------------