{"id":18835168,"url":"https://github.com/blockchainsllc/portis-example","last_synced_at":"2026-01-26T17:30:20.937Z","repository":{"id":97185651,"uuid":"247655547","full_name":"blockchainsllc/portis-example","owner":"blockchainsllc","description":null,"archived":false,"fork":false,"pushed_at":"2020-03-18T08:00:46.000Z","size":433,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-30T07:43:33.919Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blockchainsllc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-16T09:03:37.000Z","updated_at":"2024-12-02T00:24:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c30fadf-2c57-44c1-94e6-1160def362d3","html_url":"https://github.com/blockchainsllc/portis-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockchainsllc%2Fportis-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockchainsllc%2Fportis-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockchainsllc%2Fportis-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockchainsllc%2Fportis-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blockchainsllc","download_url":"https://codeload.github.com/blockchainsllc/portis-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239769721,"owners_count":19693925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T02:14:51.858Z","updated_at":"2026-01-26T17:30:20.849Z","avatar_url":"https://github.com/blockchainsllc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Portis Wallet with IN3 - example\n\nOne would normally use the portis wallet's sdk with their web3 library like this\n\n```\nimport Portis from '@portis/web3';\nimport Web3 from 'web3';\n\nconst portis = new Portis('YOUR_DAPP_ID', 'mainnet');\nconst web3 = new Web3(portis.provider);\n```\n**For private networks**\n```\nconst myPrivateEthereumNode = {\n  nodeUrl: 'https://private.network',\n  chainId: 1,\n};\nconst portis = new Portis('dappId', myPrivateEthereumNode);\n```\n**For using IN3**\n```\nconst in3Config = {\n  chainId: 'kovan',\n  requestCount: 5,\n  minDeposit: 0.01\n}\n\nconst portis = new Portis('dapp-id', in3Config, {useIn3: true});\nconst web3 = new Web3(portis.provider);\n```\n\n\u003e Supported networks include only **ETHEREUM-MAINNET**, **KOVAN**, **GOERLI**. This means that exisiting dapps using portis for different chains like **RINKEBY** or **ROPSTEN** or NON ETHEREUM CHAINS cannot use IN3 functionality.\n\n### INSTRUCTIONS\n\n\u003e WARNING: There is a lot of script wizardry used to bundle three different modified packages into one example. So if it doesn't work -\u003e it doesn't work. make sure you have `v10.17.0` of Node and `v6.11.3` of npm and `v1.21.1` of yarn.\n\n**TL;DR:**\n```\nmkdir portis \u0026\u0026 cd portis\ngit clone https://github.com/slockit/portis-example.git\ngit clone https://github.com/slockit/web-sdk.git web-sdk\ngit clone https://github.com/slockit/provider-engine.git provider-engine\ncd web-sdk \u0026\u0026 git checkout in3-integration \u0026\u0026 cd ..\ncd provider-engine \u0026\u0026 git checkout in3-integration \u0026\u0026 cd ..\ncd portis-example\nyarn port-a-fort\nyarn start\n```\n\n**Cloning:**\n* Create a directory name portis and move into it. `mkdir portis \u0026\u0026 cd portis`.\n* Clone the example repo using `git clone git@git.slock.it:hardware/portis-example.git`.\n* Clone the SDK repo using `git clone git@git.slock.it:hardware/portis-web-sdk.git web-sdk`.\n* Clone the Provider-Engine repo using `git clone git@git.slock.it:hardware/portis-provider-engine.git provider-engine`\n\n**Branch Switching:**\n* Navigate inside the web-sdk folder and checkout branch to `in3-integration`. `cd web-sdk \u0026\u0026 git checkout in3-integration \u0026\u0026 cd ..`.\n* Navigate inside the provider-engine folder and checkout branch to `in3-integration`. `cd provider-engine \u0026\u0026 git checkout in3-integration \u0026\u0026 cd ..`\n\n**Script-Casting:**\n* Make sure you move into the example repo. `cd portis-example`.\n* **SPELL: PORT-A-FORT** install deps and link deps in all three repos using this command. `yarn port-a-fort`\n* Start the react server. `yarn start`.\n\nThe React App should open up in a browser window. Inspect the app and switch to the networks tab to see requests fly to the IN3 servers.\n\n### OPPORTUNITIES OF IMPROVEMENTS:\n\nPortis requires a `nodeUrl` property in the network field for working smoothly. This is because even though they add subproviders on the provider engine their iframe interface internally uses the nodeUrl to communicate to the blockchain. So all the requests that fly outside of the widget use In3 but requests that are relayed through the widget use the `nodeUrl`. The problem lies in the fact that they load this iframe from `widget.portis.io` making it difficult for us to integrate in3 into it. Also it is closed source.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockchainsllc%2Fportis-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockchainsllc%2Fportis-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockchainsllc%2Fportis-example/lists"}