我是这个领域的新手,什么都不懂。我需要创建一个 USDT 钱包并接受其付款,但我需要根据最近的交易确认付款。 我在 Google 中找不到任何可以解决我问题的内容。
在服务器端,我通常使用node js,也许有一些包?
目前,有两个最流行的 .js 库可以满足您想要实现的目标 - web3.js 和 Ethers.js。
我建议你深入研究其中之一。
简短地说:
连接到以太坊网络https://web3js.readthedocs.io/en/v1.2.0/web3.html#web3-object
创建合约实体(USDT)以便与想要的合约交互 https://web3js.readthedocs.io/en/v1.2.0/web3-eth-contract.html
用于创建钱包
https://web3js.readthedocs.io/en/v1.2.0/web3-eth-accounts.html?highlight=wallet#wallet-create
为了确认 erc-20 中的付款,您需要订阅区块链事件(这将帮助您捕获想要的交易): https://web3js.readthedocs.io/en/v1.2.0/web3-eth-subscribe.html#
为什么你不尝试像 payid19.com
这样的第三方网关