Skip to content

Commit

Permalink
chore: update docs & assets
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Vaibhav Saini <[email protected]>
  • Loading branch information
vasa-develop committed May 11, 2020
1 parent ded703c commit 4bc8dd8
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

> A Blocknaive's OnBoard.js Auth based Access Controller for AvionDB & OrbitDB
This allows you to integrate [AvionDB](https://github.com/dappkit/aviondb) with [@metamask_io](https://twitter.com/metamask_io), [@TorusLabs](https://twitter.com/TorusLabs), [@authereum](https://twitter.com/authereum), [@dapper_labs](https://twitter.com/dapper_labs), [@coinbase](https://twitter.com/coinbase), [@TrustWalletApp](https://twitter.com/TrustWalletApp), [@Trezor](https://twitter.com/Trezor), [@Ledger](https://twitter.com/Ledger), [@fortmatic](https://twitter.com/fortmatic), [@portis_io](https://twitter.com/portis_io), [@Squarelink_Inc](https://twitter.com/Squarelink_Inc), [@WalletConnect](https://twitter.com/WalletConnect), [@opera](https://twitter.com/opera), [@ethstatus](https://twitter.com/ethstatus), [@unilogin](https://twitter.com/unilogin), [@imTokenOfficial](https://twitter.com/imTokenOfficial)

### Demo

![Blocknaive's OnBoard.js based Auth with AvionDB](./assets/aviondb-blocknative.gif)

You can find other demos in the [assets folder](./assets)

### Try it out

Check out the [Todolist in Action](https://bit.ly/aviondb-onboard).
Check out the [Todolist in Action](https://bit.ly/aviondb-blocknative).

### Requirements

Expand Down
Binary file added assets/aviondb-authereum.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/aviondb-dapper.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/aviondb-fortmatic.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/aviondb-portis.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/aviondb-squarelink.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/aviondb-torus.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/aviondb-trust.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/aviondb-walletconnect.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 50 additions & 3 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,59 @@ var collection, web3;

export const onboard = Onboard({
dappId: "32dedbdd-255e-4e93-a66f-7e558c24893a", // [String] The API key created by step one above
networkId: 4, // [Integer] The Ethereum network ID your Dapp uses.
networkId: 1, // [Integer] The Ethereum network ID your Dapp uses.
subscriptions: {
wallet: (wallet) => {
web3 = new Web3(wallet.provider);
},
},
walletSelect: {
wallets: [
{ walletName: "coinbase", preferred: true },
{ walletName: "trust" },
{ walletName: "metamask", preferred: true },
{ walletName: "dapper", preferred: true },
/* {
walletName: "trezor",
appUrl: APP_URL,
email: CONTACT_EMAIL,
rpcUrl: "https://mainnet.infura.io/v3/2cf3ec9bd42d4099b8620c2a6ee8c51a",
}, */
{
walletName: "ledger",
rpcUrl: "https://mainnet.infura.io/v3/2cf3ec9bd42d4099b8620c2a6ee8c51a",
},
{
walletName: "fortmatic",
apiKey: "pk_test_27DFAEDF186A9394",
preferred: true,
},
{
walletName: "portis",
apiKey: "110f4f7b-6c23-43e9-afc8-07f3dd8edd2e",
preferred: true,
label: "Portis",
},
{
walletName: "squarelink",
apiKey: "0d839d14070173707470",
},
{ walletName: "authereum" },
{
walletName: "walletConnect",
infuraKey: "2cf3ec9bd42d4099b8620c2a6ee8c51a",
},
{ walletName: "opera" },
{ walletName: "operaTouch" },
{ walletName: "torus" },
{ walletName: "status" },
/* { walletName: "unilogin" }, */
{
walletName: "imToken",
rpcUrl: "https://tokenlon-core-market.tokenlon.im/rpc",
},
],
},
});

AccessControllers.addAccessController({
Expand All @@ -22,7 +69,7 @@ export const getAvionDBCollection = async () => {
if (!collection) {
const ipfs = await window.Ipfs.create();
const aviondb = await window.AvionDB.init(
"database-test",
"database-test-23",
ipfs,
{
accessController: {
Expand All @@ -33,7 +80,7 @@ export const getAvionDBCollection = async () => {
{ AccessControllers: AccessControllers }
);
collection = await aviondb.initCollection(
"collection-test" /* ,
"collection-test-23" /* ,
{},
{
accessController: {
Expand Down

0 comments on commit 4bc8dd8

Please sign in to comment.