zh-web-sdk v2.10.4
ZeroHash Platform SDK
This SDK (Software development Kit) exposes functionality that allows platforms to integrate with ZeroHash on the web and mobile. You should be able to access different UI flows, such as Crypto Buy, Crypto Sell, Crypto Withdrawals, Fiat Deposits, Fiat Withdrawals and Onboarding using a single instance of ZeroHashSDK.
SDK Methods
import { AppIdentifier } from 'zh-web-sdk'
sdk.openModal({appIdentifier: AppIdentifier.ONBOARDING, jwt: jwt})
sdk.openModal({appIdentifier: AppIdentifier.ONBOARDING})
sdk.closeModal(AppIdentifier.ONBOARDING)
sdk.setJWT({ jwt: jwt, appIdentifier: AppIdentifier.ONBOARDING })
sdk.isModalOpen(AppIdentifier.ONBOARDING)
See the ZeroHashSDK
class in index.d.ts
in /dist
.
Quick Setup
import React from 'react';
import ZeroHashSDK, { AppIdentifier } from 'zh-web-sdk';
const App = () => {
const sdk = new ZeroHashSDK({
// For cert use "https://web-sdk.cert.zerohash.com"
zeroHashAppsURL: "https://web-sdk.zerohash.com",
// JWT can be set later, when opening the Modal using `openModal` method
cryptoBuyJWT: "<JWT_TOKEN_HERE>"
});
sdk.openModal({appIdentifier: AppIdentifier.CRYPTO_BUY})
return <></>;
}
export default App;
Versioning
The ZeroHash SDK uses Semantic Versioning 2.0.0. Version numbers follow the MAJOR.MINOR.PATCH
format:
- MAJOR version increments when we make incompatible API changes (e.g.,
1.0.0
to2.0.0
). - MINOR version increments when we add new functionality in a backward-compatible manner (e.g.,
1.0.0
to1.1.0
). - PATCH version increments when we make backward-compatible bug fixes (e.g.,
1.0.0
to1.0.1
).
Mobile Usage
For more details on how to use it on mobile apps, please refer to our full documentation: ZeroHash SDK Documentation.
8 months ago
1 year ago
1 year ago
1 year ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago