alphawallet / alphawallet-web3-provider Goto Github PK
View Code? Open in Web Editor NEW[Used in AlphaWallet]
License: MIT License
[Used in AlphaWallet]
License: MIT License
instead of reloading the whole page to switch network, i believe alpha wallet provider can emit this event and change the network internally
instead of using error
we need to pass object {message: "error mesage", code: 1}
@hboon could u please make pr to this repo with changes, needs for AlphaWallet/alpha-wallet-ios#6456
we actually need to use
const response = {'id': id, jsonrpc: '2.0', result: value, error: error }
instead of
const response = {'id': id, jsonrpc: '2.0', result: value, error: {message: error} }
At present, some dapps still support request methods, please support these methods, it is very important
We used the this pod
pod 'AlphaWalletWeb3Provider',:git=>'https://github.com/AlphaWallet/AlphaWallet-web3-provider', :commit => '9a4496d02b7ddb2f6307fd0510d8d7c9fcef9870'
Add support to extract and use basic auth username and password from RPC URL.
Replace:
engine.addProvider(new Web3Subprovider(new Web3.providers.HttpProvider(rpcUrl)))
with:
let username, password;
let start = rpcUrl.indexOf("://");
if (start != -1) {
start += 3;
const end = rpcUrl.indexOf("@", start + 1);
if (end != -1) {
const credentials = rpcUrl.substring(start, end);
let [u, p] = credentials.split(":");
username = u;
password = p;
}
}
if (typeof username === 'undefined' || typeof password === 'undefined') {
engine.addProvider(new Web3Subprovider(new Web3.providers.HttpProvider(rpcUrl)))
} else {
engine.addProvider(new Web3Subprovider(new Web3.providers.HttpProvider(rpcUrl,0,username,password)))
}
And minify :)
The recent new Dapps don’t write their own code to use web3 provider, they are using different libraries. It is import to add AlphaWallet into those popular libraries.
I find one 👇
and other libraries similar to 👆
This is very important, otherwise we are don't even have a chance to be see and used by users.
Should be this in hooked-wallet.js in https://github.com/AlphaWallet/provider-engine/tree/alphawallet:
if (opts.processTransaction) self.processTransaction = opts.processTransaction
Add the AlphaWallet information to the WalletConnect
https://github.com/WalletConnect/walletconnect-monorepo/tree/next/packages/helpers/mobile-registry/logos
and
https://github.com/WalletConnect/walletconnect-monorepo/blob/next/packages/helpers/mobile-registry/registry.json
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.