2.10.4 • Published 8 months ago

zh-web-sdk v2.10.4

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

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 to 2.0.0).
  • MINOR version increments when we add new functionality in a backward-compatible manner (e.g., 1.0.0 to 1.1.0).
  • PATCH version increments when we make backward-compatible bug fixes (e.g., 1.0.0 to 1.0.1).

Mobile Usage

For more details on how to use it on mobile apps, please refer to our full documentation: ZeroHash SDK Documentation.

2.10.4

8 months ago

2.7.0

1 year ago

2.5.2

1 year ago

2.6.0

1 year ago

2.9.0

11 months ago

2.7.2

12 months ago

2.8.0

12 months ago

2.7.1

12 months ago

2.7.3

12 months ago

2.10.3

11 months ago

2.5.1

1 year ago

2.5.0

1 year ago

2.4.1

1 year ago

2.4.0

1 year ago

2.3.4

1 year ago

2.3.3

1 year ago

2.3.2

1 year ago

2.3.1

1 year ago

2.3.0

1 year ago

2.2.0

1 year ago

2.1.5

1 year ago

2.1.4

1 year ago

2.1.2

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

1.1.0

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago