@tensferhq/tensfer-js
v2.4.15
Published
A javascript library for embedding Tensfer widget
Downloads
5
Readme
Tensfer SDK
TensferJs is a safe and secure web drop-in module and this library provides a front-end web for account, authentication, balance and transaction retrieval across multiple CEX/DEX.
Try the demo
Checkout the widget flow to view how the Tensfer Widget works. Click "See How it Works"
Getting your keys.
Before you can use any Tensfer SDK, you'd need a tensfer account, head on to Tensfer Dashboard and create your account.
Installation
You can install Tensfer in your web application using npm or yarn.
using npm:
npm install '@tensferhq/tensfer-js'
using yarn:
yarn add '@tensferhq/tensfer-js'
using CDN:
<script src="https://unpkg.com/@tensferhq/tensfer-js"></script>
Usage
For JS frameworks import it and use
import Tensfer from "@tensferhq/tensfer-js";
Tensfer.linkWithOptions({
publicKey: "", //Your public key from the Tensfer dashboard,
payment: [
{
type: // withdrawal or deposit
address: //wallet address ,
network: // e.g BNB Smart Chain,
currency: //currency or token to transfer to
amount: //amount
},
],
onSuccess: function (data) {
console.log("Success!", data);
},
onError: function (data) {
// an error occured
console.log("Error!", data);
},
onClose: function (data) {
// user closed widget
console.log("user closed widget", data);
},
});