https://github.com/zabo-api/zabo-react-component
The Zabo React Component provides convenient access to the Zabo API from applications.
https://github.com/zabo-api/zabo-react-component
Last synced: about 1 year ago
JSON representation
The Zabo React Component provides convenient access to the Zabo API from applications.
- Host: GitHub
- URL: https://github.com/zabo-api/zabo-react-component
- Owner: zabo-api
- Created: 2019-11-09T01:51:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-29T08:14:26.000Z (over 1 year ago)
- Last Synced: 2025-04-03T06:03:44.888Z (about 1 year ago)
- Language: JavaScript
- Size: 1.6 MB
- Stars: 3
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
What is Zabo? A unified cryptocurrency API.
=========================
[](https://www.npmjs.com/package/zabo-react-component) [](https://standardjs.com) [](https://gitter.im/zabo-api/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://discord.gg/vGHYuUT) [](https://forum.zabo.com)
[Zabo](https://zabo.com) is an API for connecting with cryptocurrency exchanges, wallets and protocols like Bitcoin. Instead of manually integrating with [Coinbase API](https://zabo.com/integrations/coinbase), [Binance API](https://zabo.com/integrations/binance), [Bitcoin APIs](https://zabo.com/integrations/bitcoin) or the hundreds of other cryptocurrency APIs - you can simply use Zabo for them all.
We believe teams and developers should focus on building great products, not worry about the fragmented landscape of exchange APIs and blockchain protocols.
For our updated list of integrations, [check out our Zabo integrations](https://zabo.com/integrations).
# Zabo React Component
The Zabo React Component provides convenient access to the [Zabo API](https://zabo.com) from applications.
Please keep in mind that [you must register](https://zabo.com/login) and receive a team id to use in your application.
## Install
```bash
npm install --save zabo-react-component
```
## Usage
```jsx
import React, { Component } from 'react'
import Zabo from 'zabo-react-component'
class Example extends Component {
render () {
return (
console.log('Team', team)}
onError={err => console.log('Error', err)}
onConnect={(account, zaboInstance) => {
console.log('Account', account)
zaboInstance.transactions.getList()
.then(resp => console.log('Transactions List', resp))
}}
/>
)
}
}
```
## Properties
| Name | Type | Description | Required |
| :---: | :---: | :---: | :---: |
| clientId | {string} | Key acquired when registering a team in Zabo Dashboard. | Required |
| env | {string} | Zabo API environment the SDK is connecting with. Could be either `sandbox` or `live`. Only sandbox is available unless a live connection is approved. Default: `sandbox`. | Optional |
| onInit | {function (appData[, zaboInstance])} | This function is called when the Zabo API is successfully initialized. The first argument is the team data object and the second argument is the Zabo SDK instance. | Optional |
| onConnect | {function (accountData[, zaboInstance])} | This function is called when the user has successfully authenticated and enabled their account for use by your application. The first argument is the account data object and the second argument is the Zabo SDK instance. | Optional |
| onError | {func} | This function is called when an error is triggered. | Optional |
**Note**: You can also access the Zabo instance via `window` by simply call `window.Zabo.instance`.
## Documentation
See the [Zabo API docs](https://zabo.com/docs).
## Help and Further Information
Please [read our docs](https://zabo.com/docs) and reach out to us in any or all of the following forums for questions:
* [Discord](https://discord.gg/vGHYuUT)
* [Discourse](https://forum.zabo.com)
* [Gitter](https://gitter.im/zabo-api/community)
* [Email](mailto:contact@zabo.com)