Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 1.14 KB

ReadMe.md

File metadata and controls

46 lines (36 loc) · 1.14 KB

Ton Payment Tracker

Accept payments in TON with a few lines, without delving into blockchain details!

Start observing specific address and get "notifications" (callback) when this address receives any payments. It's then up to you how you process them.

Installation

npm i https://github.com/nns2009/ton-payment-tracker

Example usage

Create PaymentTracker object

const tracker = new PaymentTracker({ toncenterApiKey });

Save reference from which you start tracking

let trackingState = await tracker.currentTrackingStateOf(address);

Start tracking

tracker.startPaymentTracking(
	address, trackingState,
	paymentsUpdate => {
		console.log('New payments:', paymentsUpdate);
	}
)

Examples repository

https://github.com/nns2009/ton-payment-tracker-example

Presentation

https://www.canva.com/design/DAFN6DbaJ2s/RWP3cA0nW96NIjr3KVsibg/view

Author

Igor Konyakhin

Telegram: @nns2009
YouTube: Awesome GameDev
https://codeforces.com/profile/nns2009
https://vk.com/nns2009
https://facebook.com/nns2009