步骤如下:
1.跳转tp钱包授权登录
2.跳转tp钱包签名
3.申请跳转tp,对波场钱包trx进行转账:
日志如下: 执行主币转账: TRX
[DeepLink] 准备TRON转账:
-
币种: TRX
-
合约地址: TRX原生币
-
发送方: TX5yyu7eMwGK21vaAd1GDXdhPC6m22UpwY
-
接收方: TUdaofknguAvYPCx8gk9rfGNeBvuuYLtF8
-
金额: 0.1
[DeepLink] 构建TRON交易数据 (完整raw_data格式)
[DeepLink] 参数: from=TX5yyu7eMwGK21vaAd1GDXdhPC6m22UpwY, to=TUdaofknguAvYPCx8gk9rfGNeBvuuYLtF8, amount=0.1, symbol=TRX, contract=(null)
[TRON] 开始获取最新区块信息
[TRON] 成功获取区块信息: {
blockID = 00000000046548c08a6f28dabc9e300c54432aa9286028bdfb9cc6a8420b73c7;
“block_header” = {
“raw_data” = {
number = 73746624;
parentHash = 00000000046548bf3847b428b2471e4d7d80c2e2833a967a8c87936d071d3ee2;
timestamp = 1751898024000;
txTrieRoot = aa4704176dc7462a3b137de34d7f3cce63fab5373a716f6fafd46cd566139dfa;
version = 32;
“witness_address” = 41c5614f3ebf88785fedf9d69bd82aac1353f8b431;
};
“witness_signature” = 6d21f9e0846004889188cbc2e675a6fe0e9362f4c0dd2e15e2785dc8db7d4aa40197aed0b9d0b52c1de07d6b8e76b6efa51fc200eac084c46d0af1bf4d7352a501;
};
transactions = (
{
“raw_data” = {
contract = (
{
parameter = {
“type_url” = "type.googleapis.com/protocol.TransferCo
[TRON] 提取区块信息成功:
-
区块号: 73746624
-
blockID: 00000000046548c08a6f28dabc9e300c54432aa9286028bdfb9cc6a8420b73c7
-
ref_block_bytes: 48c0
-
ref_block_hash: 8a6f28dabc9e300c
[DeepLink] 转换TRON地址: TX5yyu7eMwGK21vaAd1GDXdhPC6m22UpwY
[DeepLink] 转换TRON地址: TUdaofknguAvYPCx8gk9rfGNeBvuuYLtF8
[DeepLink] TRX原生交易数据: {
“raw_data” = {
contract = (
{
parameter = {
“type_url” = “type.googleapis.com/protocol.TransferContract”;
value = {
amount = 100000;
“owner_address” = 41e7a2af4519c784d15b69237a66fcb0a5cb47d21f;
“to_address” = 41d1eb17b8bbfd0b6c1b15e9dcfeb3a6b9b9c25789;
};
};
type = TransferContract;}
);
data = “”;
expiration = 1751898088658;
“fee_limit” = 10000000;
“permission_id” = 2;
“ref_block_bytes” = 48c0;
“ref_block_hash” = 8a6f28dabc9e300c;
timestamp = 1751898028658;
};
}
[DeepLink] 开始TRON交易签名流程
NSBundle (null) initWithPath failed because the resolved path is empty or nil
[DeepLink] 发送TRON签名请求 (十六进制格式)
[DeepLink] 十六进制消息长度: 874
[DeepLink] 十六进制消息前100字符: 7b227261775f64617461223a7b2264617461223a22222c227065726d697373696f6e5f6964223a322c227265665f626c6f63
-[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. inputModality = Keyboard, inputOperation = dismissAutoFillPanel, customInfoType = UIUserInteractionRemoteInputOperations
Snapshotting a view (0x12b02ad80, UIKeyboardImpl) that is not in a visible window requires afterScreenUpdates:YES.
[SceneDelegate] 收到URL回调
[SceneDelegate] 处理URL: com.wellintech.test.wallet.Wallet.u20240726://transfer?param=%7B%22result%22:1,%22message%22:%22success%22,%22data%22:%7B%22wallet%22:%22TRX-1%22,%22action%22:%22sign%22,%22sign%22:%220xa60bef6f4977b8a6f4d1b0b125a3f0f29a10fe213dd8d12c78d0dc6a1889323e2e4f56337ea0881357928a66c57286a5d94ea374b912a0a2a62a33eb70d23d931b%22,%22publickey%22:%22TX5yyu7eMwGK21vaAd1GDXdhPC6m22UpwY%22,%22actionId%22:%22%22,%22result%22:1,%22ref%22:%22TokenPocket%22%7D%7D
action:sign
message:(null)
响应结果:成功
data:
{
action = sign;
actionId = “”;
publickey = TX5yyu7eMwGK21vaAd1GDXdhPC6m22UpwY;
ref = TokenPocket;
result = 1;
sign = 0xa60bef6f4977b8a6f4d1b0b125a3f0f29a10fe213dd8d12c78d0dc6a1889323e2e4f56337ea0881357928a66c57286a5d94ea374b912a0a2a62a33eb70d23d931b;
wallet = “TRX-1”;
}
[SceneDelegate] TPSDK响应: result=1, message=success
[SceneDelegate] respObj.data类型: __NSDictionaryI
[SceneDelegate] respObj.data内容: {
action = sign;
actionId = “”;
publickey = TX5yyu7eMwGK21vaAd1GDXdhPC6m22UpwY;
ref = TokenPocket;
result = 1;
sign = 0xa60bef6f4977b8a6f4d1b0b125a3f0f29a10fe213dd8d12c78d0dc6a1889323e2e4f56337ea0881357928a66c57286a5d94ea374b912a0a2a62a33eb70d23d931b;
wallet = “TRX-1”;
}
[SceneDelegate] URL处理完成
[DeepLink] 收到TokenPocket响应
[DeepLink] TRON签名成功: 已获取签名
[DeepLink] 使用签名发送TRON交易
[DeepLink] 已将签名添加到交易数据: a60bef6f4977b8a6f4d1…
NSBundle (null) initWithPath failed because the resolved path is empty or nil
[DeepLink] 发送TRON pushTransaction请求 (标准协议格式)
[DeepLink] 标准交易格式: raw_data存在=是, 签名数量=1
[DeepLink] 完整交易数据: {
“raw_data” = {
contract = (
{
parameter = {
“type_url” = “type.googleapis.com/protocol.TransferContract”;
value = {
amount = 100000;
“owner_address” = 41e7a2af4519c784d15b69237a66fcb0a5cb47d21f;
“to_address” = 41d1eb17b8bbfd0b6c1b15e9dcfeb3a6b9b9c25789;
};
};
type = TransferContract;
}
);
data = “”;
expiration = 1751898088658;
“fee_limit” = 10000000;
“permission_id” = 2;
“ref_block_bytes” = 48c0;
“ref_block_hash” = 8a6f28dabc9e300c;
timestamp = 1751898028658;
};
signature = (
a60bef6f4977b8a6f4d1b0b125a3f0f29a10fe213dd8d12c78d0dc6a1889323e2e4f56337ea0881357928a66c57286a5d94ea374b912a0a2a62a33eb70d23d931b
);
}
Snapshotting a view (0x12b2f0e00, UIKeyboardImpl) that has not been rendered at least once requires afterScreenUpdates:YES.
Snapshot request 0x12b784540 complete with error: <NSError: 0x12b784180; domain: BSActionErrorDomain; code: 6 (“anulled”)>
[SceneDelegate] 收到URL回调
[SceneDelegate] 处理URL: com.wellintech.test.wallet.Wallet.u20240726://transfer?param=%7B%22data%22:%7B%22actionId%22:%22wallet-tron-pushtx-1751898032%22,%22onlySign%22:false,%22action%22:%22pushTransaction%22,%22result%22:2,%22wallet%22:%22TRX-1%22,%22ref%22:%22TokenPocket%22,%22publickey%22:%22TX5yyu7eMwGK21vaAd1GDXdhPC6m22UpwY%22%7D,%22result%22:2,%22message%22:%22%E6%97%A0%E6%95%88%E7%9A%84%E4%BA%A4%E6%98%93%22%7D
action:pushTransaction
message:(null)
响应结果:失败
data:
{
action = pushTransaction;
actionId = “wallet-tron-pushtx-1751898032”;
onlySign = 0;
publickey = TX5yyu7eMwGK21vaAd1GDXdhPC6m22UpwY;
ref = TokenPocket;
result = 2;
wallet = “TRX-1”;
}
[SceneDelegate] TPSDK响应: result=2, message=无效的交易
[SceneDelegate] respObj.data类型: __NSDictionaryI
[SceneDelegate] respObj.data内容: {
action = pushTransaction;
actionId = “wallet-tron-pushtx-1751898032”;
onlySign = 0;
publickey = TX5yyu7eMwGK21vaAd1GDXdhPC6m22UpwY;
ref = TokenPocket;
result = 2;
wallet = “TRX-1”;
}
[SceneDelegate] URL处理完成
[DeepLink] 收到TokenPocket响应
[DeepLink] 操作失败 (pushTransaction): 无效的交易
最后提示无效的交易,请指导我哪里需要修改