多链钱包 支持 XuperChain、以太坊
访问 https://xuper.baidu.com 百度开放网络

Tip:用户地址下需要有百度开放网络余额才能使用转移资产,查询余额等功能。建议在百度开放网络充值0.1元。
充值链接:https://xuper.baidu.com/n/console#/finance/wallet/recharge

- 浏览器选择管理扩展程序
下载私钥到本地之后,打开浏览器钱包插件进入登录页,可以选择链类型:XuperOS、Ethereum:
展示钱包余额、网络选择、查询功能、NFTs 和 Tokens 资产

首页==>点击查询进入自定义操作
首页==>点击转移 键入转移操作
通过插件查询 NFTS
点击 NFT 查看详情
Tokens
管理网络
点击网络 查看网络
在网页试图连接以太坊链时,会直接唤醒钱包。
let accounts = await ethereum.request({ method: 'eth_requestAccounts' })在网页试图连接 XuperChain 时,会直接唤醒钱包。
let accounts = await xuper.request({ method: 'requestAccounts' })const txObject = {
to: 'mbwfe*****hfwGaAQqqE', // 接收方地址
value: '1', // 转账金额
}
const txHash = await window.ethereum.request({
method: 'eth_sendTransaction',
params: [
{
...txObject,
from: 'account',
},
],
})const txObject = {
to: 'mbwfe*****hfwGaAQqqE', // 接收方地址
value: '1', // 转账金额
}
const txHash = await window.xuper.request({
method: 'sendTransaction',
params: [
{
...txObject,
from: 'account',
},
],
})在网页试图发起交易时,会直接唤醒钱包并跳转至转移页面。

点击确认按钮即可发起交易
由于插件 ID 是在合约内部自增, 需要提供插件 ID 初始值。
// 合约初始化 插件id 的起始值 constructor(uint256 id) { owner = msg.sender; pluginID = id; }此方法只能由合约部署者调用。
operater: 审核者地址;isApprove:true/false是否授权function setController(address operater, bool isApprove)public ownerOnly{}注册没有权限限制,谁都可以调用。注册的插件需要审核后才能被查询到。
possessor: 插件拥有者;name: 插件名称,链上唯一 ;desc: 插件描述;data: 插件数据(一般为 JSON 字符串)
typeName: 插件类型version: 插件版本logo: 插件 logoreturns: 返回插件 ID
function addPluginInfo(address possessor,string memory name, string memory desc, string memory data, string memory typeName, string memory version, string memory logo) public returns (uint256) {}审核者对插件进行审核通过
pluginId:插件 IDfunction checkPlugin(uint256 pluginId) public controllerOnly {}
pluginId: 插件 ID;desc: 插件描述;data: 插件数据(一般为 JSON 字符串)
typeName: 插件类型version: 插件版本logo: 插件 logofunction updatePlugin(uint256 pluginId, string memory desc, string memory data, string memory typeName, string memory version, string memory logo) public {}可以根据插件 ID 或者 名字 查询插件
pluginId: 插件 ID;pluginName: 插件名称
id: 插件 ID;name: 插件名称 ;desc: 插件简述;logo: 插件 logofunction getPluginById(uint256 pluginId) public view returns (uint256 id, string memory name, string memory desc, string memory logo) {} function getPluginByName(string memory pluginName) public view returns (uint256 id, string memory name, string memory desc, string memory logo) {}查询所有插件 ID (审核通过的)
returns: 所有已审核过的插件 ID
function allIds() public view returns (uint256[] memory) {}修改插件审核状态为 false。不能被查询到。
pluginId: 插件 IDfunction deletePlugin(uint256 pluginId) public controllerOnly {}
{
"addList": [
// 功能操作合集
{
"name": "转移资产", //操作名称
"icon": "el-icon-sort", // 操作icon,图标地址:https://element.eleme.io/#/zh-CN/component/icon
"type": "transaction", // 操作类型,query查询,transaction交易转移等
"formValue": [
//操作参数
{
"label": "来源账户Address",
"value": "from"
},
{
"label": "接受者账户Address",
"value": "to"
},
{
"label": "资产ID",
"value": "id"
},
{
"label": "编号",
"value": "sonId"
},
{
"label": "数量",
"value": "amount"
},
{
"label": "额外数据",
"value": "data"
}
],
"methodName": "safeTransfer", //操作方法,合约方法。针对xuper
"contractName": "makerone", //合约名
"txType": "1", //是否需要调用合约方法,1,需要,0 不需要 只需要调用固有api
"search": "transaction" //api取值参数,解析xuper 中 xsdk.queryTransaction的结果内容。
},
{
"name": "查询NFT余额",
"icon": "el-icon-search",
"type": "query",
"formValue": [
{
"label": "资产ID",
"value": "id"
},
{
"label": "资产编号",
"value": "sonId"
},
{
"label": "查询账户",
"value": "from"
}
],
"methodName": "getTokenBalance",
"contractName": "makerone",
"txType": "1",
"search": "responses"
},
{
"name": "查询交易",
"icon": "el-icon-search",
"type": "query",
"formValue": [
{
"label": "交易ID",
"value": "txId"
}
],
"methodName": "getTokenBytes",
"contractName": "opennft",
"txType": "0",
"txName": "queryTransaction",
"search": "tx"
}
],
"type": "xuper" //插件类型 xuper属于开放网络,eth属于以太坊网络
}

















