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

1.0.5 • Public • Published

TrueWallet SDK

A JavaScript SDK for ERC-4337 implementation.

Check the documentation for more information.

Integration

Before starting you need to create an account in the TrueWallet dashboard. Create a project inside and copy the API Endpoint.

Installation

Install the required packages for initializing the TrueWallet SDK.

Tested with Angular, React, and Node.js v18 and higher

npm install @truewallet/sdk

Integration Example

Before initialisation your first wallet, create endpoint url in the dashboard.

To check all available methods, please refer to the authentication.

Initialisation with salt:

  import {initTrueWallet} from '@truewallet/sdk';

  /** Initialisation with salt */
  const trueWallet = await initTrueWallet({
    signer: {
      type: 'salt',
      data: ['{{YOUR_UNIQUE_STRING_FOR_PRIVATE_KEY_GENERATION}}']
    },
    bundlerUrl: '{{ENDPOINT_URL_FROM_DASHBOARD}}',
    // Optional, bundlerUrl is used when rpcProviderUrl is not provided
    // rpcProviderUrl: '{{ENDPOINT_URL_FROM_DASHBOARD}}',
  });

Package Sidebar

Install

npm i @truewallet/sdk

Weekly Downloads

4

Version

1.0.5

License

GPL-3.0

Unpacked Size

402 kB

Total Files

100

Last publish

Collaborators

  • truecryptowallet