Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@alembic/account-abstraction-sdk

Package Overview
Dependencies
Maintainers
6
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alembic/account-abstraction-sdk

SDK Alembic tech

latest
Source
npmnpm
Version
0.3.1
Version published
Maintainers
6
Created
Source

Account Abstraction SDK

Alembic Account Abstraction SDK allows developers to onboard their users with a seedless, gasless experience familiar to Web2.

Account Abstraction (AA) improves transaction user experience by using smart contract wallets as primary accounts. Our solution is compatible with EIP-4337.

Instanciate Wallet

import { AlembicWallet, UserInfos } from "@alembic/account-abstraction-sdk";

const wallet = new AlembicWallet({
      chainId: CHAIN_ID
      rpcTarget: RPC_URL
      apiKey: API_KEY,
    });

To get an API key please Contact us

Available methods

Connect

await wallet.connect()

This function pops up the social login modal on UI.

Logout

await wallet.logout()

This function logs the user out and clears the cache.

Get Address

await wallet.getAddress()

This function returns the address of the wallet.

Get user infos

await wallet.getUserInfos()

If the user is logged in with social media accounts, this function can be used to fetch user related data such as email, etc.

Send transaction

const tx = { to: DESTINATION, value: VALUE, data: DATA }
const relayId = await wallet.sendTransaction(tx)

This function relays the transaction data to the target address. The transaction fees can be sponsored.

Get Relay Status

const transactionStatus = await wallet.getRelayTxStatus(relayId)
// TransactionStatus:{hash: string,  status: string}

Returns the current transaction hash and the status of the relay (sent, mined, confirmed)

Sign Message

const signature = await wallet.signMessage('hello')

Sign the given message using the EOA, owner of the smart wallet.

FAQs

Package last updated on 07 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts