1.47.0 • Published 3 days ago

@arianee/wallet-api-client v1.47.0

Weekly downloads
-
License
-
Repository
-
Last release
3 days ago

@arianee/wallet-api-client

WalletApiClient is a TypeScript client for the Arianee's Wallet API. It provides an easy-to-use interface to interact with all available API routes and handles the authorization process using the Core instance passed to the constructor or a smart asset's passphrase when provided. The client returns typed objects that match the return types of the API routes.

Installation

This class is part of the @arianee/wallet-api-client package. You can install it using npm:

npm install @arianee/wallet-api-client

Tests

Unit tests can be ran using the command:

npm run test:wallet-api-client

Usage

First, you need to import the class:

import WalletApiClient from '@arianee/wallet-api-client';

Then, create an instance of the WalletApiClient class:

const walletApiClient = new WalletApiClient(chainType, core, options?, fetchLike?);

const smartAsset = await walletApiClient.getSmartAsset('mainnet', {
  id,
  passphrase,
});

Constructor Parameters

  • chainType: A string representing the chain type ('mainnet' or 'testnet').
  • core: An instance of the @arianee/core class.
  • options: Optional configuration object containing:
    • apiURL: The base URL of the API (default is WALLET_API_URL (from ./constants)).
    • httpClient: A custom HTTP client instance.
    • arianeeAccessToken: An @arianee/arianee-access-token instance, used for authorization generation.
    • arianeeAccessTokenPrefix: The prefix to use for arianee access tokens generated for authorization.
  • fetchLike: An optional fetch-like function (default is fetch in browser environment, and node-fetch in node environment).

Methods

The WalletApiClient class provides methods to interact with all available routes of the Wallet API. These methods handle the authorization process and return typed objects that match the return types of the API routes. Please refer to the API documentation for more information about each route and its return type.

Examples of methods provided by the WalletApiClient class are:

  • getSmartAsset
  • getSmartAssetEvents
  • getOwnedSmartAssets
  • getReceivedMessages
  • getBrandIdentity
  • getOwnedSmartAssetsBrandIdentities
1.47.0

3 days ago

1.46.0

27 days ago

1.45.0

1 month ago

1.44.0

1 month ago

1.43.0

1 month ago

1.42.0

1 month ago

1.41.0

2 months ago

1.39.0

2 months ago

1.40.0

2 months ago

1.38.0

2 months ago

1.37.0

2 months ago

1.35.0

2 months ago

1.36.0

2 months ago

1.34.0

2 months ago

1.33.0

3 months ago

1.32.0

3 months ago

1.31.0

3 months ago

1.30.1

3 months ago

1.30.0

4 months ago

1.29.2

4 months ago

1.29.1

4 months ago

1.29.0

4 months ago

1.27.0

4 months ago

1.26.0

4 months ago

1.28.0

4 months ago

1.25.0

4 months ago

1.24.0

4 months ago

1.23.0

4 months ago

1.22.0

4 months ago

1.21.0

5 months ago

1.20.0

5 months ago

1.19.0

5 months ago

1.15.0

5 months ago

1.14.0

5 months ago

1.13.0

5 months ago

1.12.0

5 months ago

1.18.0

5 months ago

1.17.0

5 months ago

1.16.0

5 months ago

1.11.1

6 months ago

1.11.0

6 months ago

1.10.0

6 months ago

1.9.0

6 months ago

1.8.0

6 months ago

1.6.1

6 months ago

1.2.0

7 months ago

1.1.0

7 months ago

1.0.0

7 months ago

0.21.0

9 months ago

0.20.0

10 months ago

1.7.0

7 months ago

1.6.0

7 months ago

1.5.0

7 months ago

1.4.0

7 months ago

1.3.0

7 months ago

0.15.0

10 months ago

0.18.0

10 months ago

0.26.0

7 months ago

0.25.0

7 months ago

0.24.0

7 months ago

0.23.0

8 months ago

0.22.0

8 months ago

0.11.0

10 months ago

0.13.0

10 months ago

0.9.0

11 months ago

0.8.0

11 months ago

0.5.0

11 months ago

0.4.1

11 months ago

0.4.0

11 months ago

0.7.0

11 months ago

0.6.0

11 months ago

0.4.2

11 months ago

0.3.0

11 months ago

0.2.0

12 months ago

0.1.0

12 months ago

0.0.1

12 months ago