Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readme update #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ NOTE: scripts are prepared and tested on **Ubuntu 20.04**. You may need to modif

DATABASE_URL - Postgres connection url (example: postgresql://postgres:[email protected]/ton_wallet_api)

Important to add sometimes:
-f -> Clear "/var/db/ton-wallet-api" on update'
-s -> Restart "timesyncd" service'

./scripts/update.sh -t native --database-url ${DATABASE_URL} -f -s

### Let's start using Wallet API

Expand All @@ -137,6 +142,9 @@ NOTE: scripts are prepared and tested on **Ubuntu 20.04**. You may need to modif
./scripts/wallet.sh -m create_account
```

### VIA JS API, start a project, and call /create/wallet route
https://github.com/....

2. #### Callbacks
In the table `api_service_callback` we enter the address of our backend, which will deal with payment processing.
After receiving or sending new transactions or token transactions Wallet API will call web hook with POST method on
Expand Down Expand Up @@ -188,6 +196,9 @@ NOTE: scripts are prepared and tested on **Ubuntu 20.04**. You may need to modif
--src-addr {sender} --dst-addr {recipient} --amount {amount}
```

### Or via JS API, call 'transferNative' function
https://github.com/....

You can track the status of a transaction with:
1) (Recommended way) via callback `AccountTransactionEvent`, which has transactionStatus field:
* `expired` - end state for failed transactions,
Expand Down