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 |
--------------------------------------------------------------------------------