@fireblocks/embedded-wallet-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.15 • Public • Published

Embedded Wallet JS SDK

The Embedded Wallet JS SDK allows you to integrate wallet functionalities into your application seamlessly.

Installation

To install the SDK, use npm or yarn:

npm install embedded-wallet-js-sdk

or

yarn add embedded-wallet-js-sdk

Usage

Importing the SDK

First, import the SDK into your project:

import { EmbeddedWallet } from '@fireblocks/embedded-wallet-sdk;

Initializing the Wallet

Initialize the wallet with your configuration:

const ew = new EmbeddedWallet({
    env: "production",
    authClientId: process.env.AUTH_CLIENT_ID,
    authTokenRetriever: {
      getAuthToken: () => authManager.getAccessToken(),
    },
})

Assigning a New Wallet

To create a new wallet:

const { walletId } = await ew.assignWallet();

Adding New Asset

To add a new asset

const { address } = await ew.addAsset(0, "BTC");

Making a Transaction

To make a transaction:

const { id } = await ew.createTransaction({
	assetId: "BTC",
	source: {
		id: "0",
	},
	destination: {
		type: "VAULT_ACCOUNT",
		id: "0",
	},
	amount: "8",
});
const core = EmbeddedWallet.getCore(deviceId)
await core.signTransaction(id)

Readme

Keywords

none

Package Sidebar

Install

npm i @fireblocks/embedded-wallet-sdk

Weekly Downloads

1,966

Version

0.0.15

License

MIT

Unpacked Size

281 kB

Total Files

9

Last publish

Collaborators

  • idan-fb
  • yarinfb
  • arikblocks
  • orenyomtov
  • dx_fireblocks
  • ylfbks
  • slavaserebrianniy
  • fb_alongo
  • vladkucherov
  • yuval-fireblocks