1.0.4 • Published 6 days ago

artemis-web3-adapter v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
6 days ago

Artemis Web3 Adapter for Dfinity

Artemis simplifies the process of integrating all Internet computer wallets. It offers convenient features, such as connection, disconnection, and automatic connection, making it the ideal bridge between platforms and their corresponding wallet providers. Incorporation of various functions, such as working with signatures, connecting wallets, and monitoring transaction status. Integration of built-in connectors for various wallets, including Plug, Stoic, Infinity swap, NNS and other wallets. Automatic updating of data in response to changes in the wallet, blocks, and network. Implementation of an inbuilt user interfaces for ease of use.

Artemis acts as a liaison between platforms and their corresponding wallet providers. The Dfinity chain offers a wide range of wallets, each with its unique connection and transaction process. This can be a challenging and time-consuming task for developers to integrate and keep track of all the wallets individually. However, by using the Artemis wallet adapter, developers can effortlessly incorporate all the wallets by following a standard structure for all wallets on the front-end. The adapter takes care of managing all the wallets on the back end. Architecture Artemis standardizes the methods of various wallets and facilitates their integration into the platform. It manages and formalizes all wallet authorization queries. Artemis supports all wallets on the Internet Computer (IC) and their associated methods, including wallet connection, actor, get agent, disconnect, canister calls, and ICP transaction. Artemis communicates with each wallet based on its specific standards. Additionally, Artemis provides a common standard for all wallets, allowing developers to use a single set of documentation for integration purposes. Artemis serves as a mediator between wallets and platforms by communicating with front-end DAPP or any web3 platforms, passing the request to the relevant wallets, and executing transactions using their established standards. To enhance performance, Artemis saves actor data, enabling the adapter to load user information quickly and avoid delays. Developers have the option to utilize our built-in user interface or they can customize it to meet their specific needs. Benefits of using Artemis include:

Developers are not required to individually integrate all wallets, resulting in time savings. The integration process is more reliable and stable. Updating wallets becomes less of a concern as Artemis manages all wallet updates.

Features

  • Simplifies Web3.js integration for Dfinity blockchain development.
  • Provides a set of utility functions for common blockchain operations.
  • Compatible with the following wallets:
    • Internet Identity
    • Stoic Wallet
    • Plug
    • AstroX ME
    • Infinity Wallet
    • NFID
    • MetaMask ( MSQ - Safe ICP Wallet)

Installation

To install Artemis Web3 Adapter for Dfinity, use npm:

npm install artemis-web3-adapter

Usage

Import the package into your project:

import { Artemis } from 'artemis-web3-adapter';

const connectObj = { whitelist: ['ryjl3-tyaaa-aaaaa-aaaba-cai'], host: 'https://icp0.io/' }

const artemisWalletAdapter = new Artemis(connectObj);

or

Using Batch Transaction

Import BatchTransact class

import { BatchTransact } from 'artemis-web3-adapter';

    const transactions = {
        initGetAcc1: {
          canisterId: '3xwpq-ziaaa-aaaah-qcn4a-cai',
          idl: SONICSWAP_IDL,
          methodName: 'initiateICRC1Transfer',
          updateNextStep: (trxResult , nextTrxItem) => {
            nextTrxItem.args[0].to.subaccount=[trxResult]
          },
          onSuccess: () => { },
          onFail: () => { },
          args: []
        },
        deposit: {
          canisterId: 'ryjl3-tyaaa-aaaaa-aaaba-cai',
          idl: ICRC1_IDL,
          methodName: 'icrc1_transfer1',
          args: [{
            to: { owner: Principal.fromText('3xwpq-ziaaa-aaaah-qcn4a-cai'), subaccount: [] },
            fee: [], memo: [], amount: BigInt(0), from_subaccount: [], created_at_time: []
          }],
        },
    }

    const batchTransactionObject =  new BatchTransact(transactions, artemisWalletAdapter);

    const resp = await batchTransactionObject.execute();
1.0.2

6 days ago

1.0.4

6 days ago

1.0.3

6 days ago

1.0.1

7 days ago

1.0.0

7 days ago

0.5.0

19 days ago

0.4.9

6 months ago

0.4.8

6 months ago

0.4.5

11 months ago

0.4.7

10 months ago

0.4.6

10 months ago

0.3.9

11 months ago

0.4.4

11 months ago

0.3.8

11 months ago

0.3.7

12 months ago

0.4.1

11 months ago

0.4.0

11 months ago

0.4.3

11 months ago

0.4.2

11 months ago

0.3.0

12 months ago

0.2.1

1 year ago

0.2.0

1 year ago

0.3.6

12 months ago

0.1.8

1 year ago

0.3.5

12 months ago

0.2.6

1 year ago

0.1.9

1 year ago

0.3.2

12 months ago

0.2.3

1 year ago

0.3.1

12 months ago

0.2.2

1 year ago

0.3.4

12 months ago

0.2.5

1 year ago

0.3.3

12 months ago

0.2.4

1 year ago

0.0.10

1 year ago

0.1.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.0.9

1 year ago

0.1.7

1 year ago

0.0.8

1 year ago

0.1.4

1 year ago

0.0.5

1 year ago

0.1.3

1 year ago

0.0.4

1 year ago

0.1.6

1 year ago

0.0.7

1 year ago

0.1.5

1 year ago

0.0.6

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago