Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
airbitz-core-js-ui
Advanced tools
This repo implements a UI layer on top of airbitz-core-js to provide web applications the interface required to do all the accounts management in just a small handful of Javascript API calls. All UI operates in an overlay iframe on top of the current HTML view.
npm install
to fetch the dependencies.
npm run build
to create the web bundle.
npm install airbitz-core-js-ui --save
Get an API key from
You'll need an account on the Airbitz Mobile App which you can download for iOS and Android at
On the developer.airbitz.co
page, scan the QR code using the Airbitz Mobile App after signing in and register an email address.
Install from npm
npm install airbitz-core-js-ui --save
Include the abcui.js
file in your code (using Webpack or any other bundler of your choice):
var abcui = require('airbitz-core-js-ui')
Now start diving in and make some calls
Initialize the library
_abcUi = abcui.makeABCUIContext({'apiKey': 'api-key-here',
'appId': 'com.mydomain.myapp',
'assetsPath': '/path-to-assets/',
'vendorName': 'My Awesome Project',
'vendorImageUrl': 'https://mydomain.com/mylogo.png'});
where /path-to-assets/
tells the UI where to find the contents of the assets
directory of this node module via HTTP. When updating this node module, you must keep the assets
directory up-to-date on your server. We suggest automating this using NPM scripts or any other tool or your choice.
Create an overlay popup where a user can register a new account or login to a previously created account via password or PIN.
_abcUi.openLoginWindow(function(error, account) {
_account = account;
});
Launch an account management window for changing password, PIN, and recovery questions
_abcUi.openManageWindow(_account, function(error) {
});
Get or create a wallet inside of the account
_abcUi.openLoginWindow(function(error, account) {
_account = account;
// Get the first wallet in the account that matches our required wallet type
const abcWallet = account.getFirstWallet('wallet:repo:ethereum');
if (abcWallet == null) {
// Create an ethereum wallet if one doesn't exist:
const keys = {
ethereumKey: new Buffer(secureRandom(32)).toString('hex')
}
account.createWallet("wallet:repo:ethereum", keys, function (err, id) {
if (err) {
// Yikes. This shouldn't fail except for network or disk errors
} else {
_wallet = account.getWallet(id)
_key = _wallet.keys.ethereumKey
// Update your UI here
}
})
} else {
_wallet = abcWallet
_key = _wallet.keys.ethereumKey
// Update your UI here
}
}
_key
can then be used as a secure source of entropy for this wallet within your app
Logoff a user
_account.logout();
See a sample implementation at airbitz-core-js-sample
Besides the production authentication servers, Airbitz also maintains a test authentication server with a completely separate account namespace. If you would like to use this server for testing, rather than the production server, please run the following code:
localStorage.setItem('airbitzAuthServer', 'https://test-auth.airbitz.co/api')
Please note that we occassionally wipe out the test server, so please don't store any vauable assets on there.
https://developer.airbitz.co/javascript/#airbitz-account-management-ui
FAQs
Airbitz login UI components, as a library
The npm package airbitz-core-js-ui receives a total of 4 weekly downloads. As such, airbitz-core-js-ui popularity was classified as not popular.
We found that airbitz-core-js-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.