xuewuli / tiny.scatter Goto Github PK
View Code? Open in Web Editor NEWScatter compatible eos injection library
Scatter compatible eos injection library
其实原生也不是算完整的实现了注入,只是我把account写死了,然后在一个DApp 的demo上读取出来了,不太会用怎么去在点击授权的地方调用方法传入account 和私钥,或者说给一个选择列表 让用户选择哪一个账户
ReactNative 上我理解的是 在一个页面里面夹在一个DApp 的URL,然后injectedJavaScript 这个js 怎么写,tiny_scatter.js 加上
`""// 'value' as string. "SIG_K1_..."
function onSignEOSMessageSuccessful(id, value) {
BrigeAPI.sendResponse(id, value)
}
// 'value' as string. '{"signatures":["SIG_K1_..."]}'
function onSignEOSSuccessful(id, value) {
BrigeAPI.sendResponse(id, JSON.parse(value))
}
// 'error' as string
function onSignEOSError(id, error) {
BrigeAPI.sendError(id, {"type": "signature_rejected", "message": error, "code": 402, "isError": true})
}
TinyIdentitys.initEOS("\(account)", "\(publicKey)");
const scatter = new TinyScatter();
scatter.loadPlugin(new TinyEOS());
window.scatter = scatter;
document.dispatchEvent(new CustomEvent('scatterLoaded'));"`
拼接成的字符串注入?
还是怎么操作,望指导
不知道@xuewu是否尝试过低版本系统
魅族 Android 6.0 ,多数Dapp不能使用,newDex进入提示版本过低
{
"publicKey":"xxxxxx",
"data":"yyyyyyy",
"whatfor":"wwwww",
"isHash":false
}
publicKey 用于找到对应的私钥,若是注入webview应该可以假定就是当前账户
data 需要签名的数据
whatfor UI显示用
isHash 决定签名方式
只需要将签名结果返回, 不是对象也不是数组,就是只 "SIG_K1_..." 这样一个字符串
您好,我们的钱包是纯H5开发的,请教下这种情况怎么实现scatter注入啊
"signEOS" 签名后回调onSignEOSSuccessful(,)没有任何响应
XWebView是 webView.addJavascriptInterface(new JSApi (), "XWebView");里面的“XWebView”吗?
undefined is not an object (evaluating 'window.webkit.messageHandles')
现在包这个错,另外问下示例中:XMethod.signEOS.rawValue,这个具体要实现什么?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.