如何通过api创建usdt钱包并接收交易

问题描述 投票:0回答:2

我是这个领域的新手,什么都不懂。我需要创建一个 USDT 钱包并接受其付款,但我需要根据最近的交易确认付款。 我在 Google 中找不到任何可以解决我问题的内容。

在服务器端,我通常使用node js,也许有一些包?

node.js cryptocurrency
2个回答
0
投票

目前,有两个最流行的 .js 库可以满足您想要实现的目标 - web3.jsEthers.js

我建议你深入研究其中之一。

简短地说:

  1. 连接到以太坊网络https://web3js.readthedocs.io/en/v1.2.0/web3.html#web3-object

  2. 创建合约实体(USDT)以便与想要的合约交互 https://web3js.readthedocs.io/en/v1.2.0/web3-eth-contract.html

  3. 用于创建钱包
    https://web3js.readthedocs.io/en/v1.2.0/web3-eth-accounts.html?highlight=wallet#wallet-create

  4. 为了确认 erc-20 中的付款,您需要订阅区块链事件(这将帮助您捕获想要的交易): https://web3js.readthedocs.io/en/v1.2.0/web3-eth-subscribe.html#


0
投票

为什么你不尝试像 payid19.com

这样的第三方网关
© www.soinside.com 2019 - 2024. All rights reserved.