Our example app demonstrates login and transaction signing using OREID.
See example/src/App.tsx for a step by step walkthough see this documentation.
For testing purposes, this project is setup to link the authenticator/ folder to the example app.
You can check the example/package.json for how the ual-oreid is linked.
cd authenticator
yarn install
yarn run buildcd example
yarn install
yarn run devIn practice, the NPM packaged version number will be used instead of the link=... value. To use the published NPM package, in the file example/package.json change the ual-oreid package from link=... to the version number you want to use.
The EOS Kylin network is used in this example.
-
Navigate to
http:localhost:5173. Launch the UAL Modal by clickingShow UAL Modal.
-
Login using ORE ID Wallet
-
ORE ID will pop up a new window and present a field to enter your password for the wallet
-
Enter a password and click continue
-
Once the account creation is successful, the message
"Logged in as ore1t....."will display. This is your wallet address on the blockchain.
-
Add tokens to the account using a command to call an EOS Kylin Faucet. Enter the wallet address into the
to=field replacingore1t....curl -X 'POST' \ "https://faucet.eosnation.io/api/send?chain=kylin&to=ore1t..." \ -H "accept: application/json" \ -d ""
-
The commandline should return a message success message simiiliar to the one below.
{"message":"ok","transaction_id":"ea45815b113341c27b22614a43dbca9a8b569680abcd36e8c2d44a1c473fa234"}
-
Refresh the UAL app page
localhost:5173. Now, the page will have your balance.
-
Make a sample transaction by clicking
Transfer 1 EOS. -
The ORE ID popup will open and ask you for the wallets password.
-
The transaction should be successful and now the balance displayed will reflect that.
-
Logout of the sample app with the
Logoutbutton.