DeepLink调用tp钱包 使用Tron转账usdt

iOS 提示钱包未导入 这个是什么情况,需要怎么解决,from的地址就是tp钱包里面的地址

const transactionData = {
visible: false,
txID: “0ff31369f276cd2a1f2d0f45274256cccee5095a0f4dc90a3b12af4d5fdded8b”,
raw_data: {
contract: [{
parameter: {
value: {
data: “a9059cbb000000000000000000000000593a115d4e04249a7e4c02a2150b596081b37f9f00000000000000000000000000000000000000000000000000000000000186a0”,
owner_address: “41f90a4115ca0859c0db8415d73b3a22626506cbbe”,
contract_address: “41a614f803b6fd780986a42c78ec9c7f77e6ded13c”
},
type_url: “com/protocol.TriggerSmartContract”
},
type: “TriggerSmartContract”
}],
ref_block_bytes: “865d”,
ref_block_hash: “97a350e4aa8501ef”,
expiration: 1695098259000,
fee_limit: 100000000,
timestamp: 1695098200128
},
raw_data_hex: “0a02865d220897a350e4aa8501ef40b88cebddaa315aae01081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a1541f90a4115ca0859c0db8415d73b3a22626506cbbe121541a614f803b6fd780986a42c78ec9c7f77e6ded13c2244a9059cbb000000000000000000000000593a115d4e04249a7e4c02a2150b596081b37f9f00000000000000000000000000000000000000000000000000000000000186a070c0c0e7ddaa31900180c2d72f”
};
const encodedTransactionData = JSON.stringify(transactionData);
console.log("encodedTransactionData = ",encodedTransactionData);
const param = {
callbackUrl: “taaInitData”,
txData: encodedTransactionData,
action: “pushTransaction”,
actionId: “web-db4c5466-1a03-438c-90c9-2172e8becea5”,
// blockchain: “tron”,
blockchains: [{
chainId: “728126428”,
network: “tron”
}],
dappIcon: “icon.png”,
contract:“TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t”,
from: ‘TJk1QkHMWmfYK1jgwFfTzxMcTgXkKk7avF’,
to: ‘TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t’,
dappName: “zs”,
protocol: “TokenPocket”,
version: “2.0”
};
const encodedParam = encodeURIComponent(JSON.stringify(param));
console.log("encodedParam = " + encodedParam);
const deeplinkUrl = tpoutside:\/\/pull.activity?param=${encodedParam}
window.location.href = deeplinkUrl;

波厂pushtransation操作,没有from字段,取的是txData里面的owner_address字段,然后我们会转换为base58编码取出地址去对比

有没有方法去直接生成这个txData

可以自己去波厂官方找开发相关的库

{“message”:“Transaction already exists.”,“data”:{“ref”:“TokenPocket”,“actionId”:“web-db4c5466-1a03-438c-9489-2172e8becea5”,“publickey”:“TJk1QkHMWmfYK1jgwFfTzxMcTgXkKk7avF”,“onlySign”:false,“action”:“pushTransaction”,“result”:2,“wallet”:“TRX-1”,“version”:“2.0”},“result”:2}

Transaction already exists 这个是啥错误,是actionid重复了吗

重复提交了吧,跟actionId无关。
你的“transaction”数据里有个txID,是标识交易唯一的

{“result”:2,“data”:{“publickey”:“TJk1QkHMWmfYK1jgwFfTzxMcTgXkKk7avF”,“version”:“2.0”,“actionId”:“web-db4c5466-1a03-438c-90c9-2172e8becea5”,“action”:“pushTransaction”,“onlySign”:false,“ref”:“TokenPocket”,“result”:2,“wallet”:“TRX-1”},“message”:“Transaction expired”}
开始提交过一次,但是说交易过期,再次提交就不行了

transaction 数据里有“ expiration”,交易会有时间限制

:kissing_closed_eyes: 谢谢

想问下,如果是APP的话怎么去使用这个deeplink调用

这个自行谷歌一下,例子很多

钱包里面访问dapp,tron的Demo有吗

可以看下 https://test-tp.tokenpocket.pro/tron-demo/index.html#/