gpt4 book ai didi

ios - IOS应用中通过coinbase-ios-SDK转换货币和转账

转载 作者:行者123 更新时间:2023-11-29 05:51:14 25 4
gpt4 key购买 nike

我正在我的应用程序中安装 coinbase-ios-SDK 并成功运行示例 coinbase IOS 应用程序,但我无法理解如何通过 coinbase-ios-SDK 转换货币和转账?我如何访问转账和货币兑换“API”?

我认为这是我们可以在应用程序中访问它的 API:

发布https://api.coinbase.com/v2/accounts/:account_id/transactions

下面是我获取此 API 的链接:

https://developers.coinbase.com/api/v2#send-money

public func setup(with transaction: Transaction) {

titleLabel.text = transaction.details?.title
subtitleLabel.text = transaction.details?.subtitle
amountLabel.text = transaction.amountString
statusLabel.text = transaction.status

if let amount = transaction.amount?.amount,
let amountFloat = Float(amount), amountFloat > 0 {
amountLabel.textColor = Colors.green
} else {
amountLabel.textColor = Colors.darkBlue
}
setupStatusIndicator(with: transaction.status)

}

最佳答案

您共享的代码用于使用现有事务填充 TableView 单元格。如果您想进行自己的交易,则需要调用Coinbase.default.transactionResource.send(...)

您可以找到 Coinbase SDK 的源代码 here如果您有更多问题。

关于ios - IOS应用中通过coinbase-ios-SDK转换货币和转账,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55654411/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com