0.0.17 • Published 2 years ago

@chingiz-mardanov/on-ramp-sdk v0.0.17

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

On-Ramp SDK

Getting started

  • Please make sure that there is either a deployed OnRamp API service or you are running it localy. Refer to Running OnRamp API Locally section.
  • Install the SDK package from the archive.
  • Import the on ramp sdk with this line of code: import {OnRampSdk} from '@codefi/on-ramp-sdk' Note: you might have a different source folder based on where you install it.
  • Refer to this file for sample usage of the SDK: https://gitlab.com/ConsenSys/codefi/products/metaswap/on-ramp-sdk/-/blob/main/src/OnRampSdkDemo.ts

Running OnRamp API Locally

  • Clone the repo from https://gitlab.com/ConsenSys/codefi/products/metaswap/on-ramp-api/-/tree/develop
  • Please make sure to use develop branch for more up to date data returned.
  • Run npm i
  • Add this to the .env: TRANSAK_API_KEY=ebbeabce-0dc7-4aed-90b0-dec30f717264
  • Run npm run start

On-Ramp SDK

To facilitate back-end interaction, a SDK can be used.

You can use it like this:

const sdk: IOnRampSdk = await OnRampSdk.getSDK(Environment.Staging, Context.Mobile, {
      verbose: true,
      maxInstanceCount: 1
    })
OnRampSdk.destructInstance(); // Does not actually destroy an instance or garbage collect, only helps keep track of instance count
0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago