更新记录
1.0.1(2025-03-19)
1.0.0(2025-03-19)
平台兼容性
App |
快应用 |
微信小程序 |
支付宝小程序 |
百度小程序 |
字节小程序 |
QQ小程序 |
HBuilderX 4.56,Android:4.4,iOS:不确定,HarmonyNext:不确定 |
× |
× |
× |
× |
× |
× |
钉钉小程序 |
快手小程序 |
飞书小程序 |
京东小程序 |
鸿蒙元服务 |
× |
× |
× |
× |
× |
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
× |
× |
× |
× |
× |
× |
× |
× |
× |
支持uniapp和uniapp-x版本
使用教程请查看demo
暴露的interface
export type TPAuthorizeSuccess = {
code: number,
data: any
}
export type TPAuthorizeError = {
msg: string
}
export type TPTransferSuccess = {
code: number,
data: any
}
export type TPTransferError = {
msg: string
}
export type blockchainType = {
name: string
chainId: string
}
export type TPAuthorizeOptions = {
dappName: string;
dappIcon: string;
blockchains: blockchainType[];
actionId: string;
success?: (res: TPAuthorizeSuccess) => void;
fail?: (res:TPAuthorizeError) => void;
}
export type TPTransferOptions = {
protocol: string;
version: string;
dappName: string;
dappIcon: string;
actionId: string;
from: string;
to: string;
contract: string;
amount: number;
symbol: string;
desc: string;
success?: (res: TPTransferSuccess) => void;
fail?: (res:TPTransferError) => void;
}