0.8.6 • Published 12 months ago

alembic-sdk v0.8.6

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

AlembicSDK

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-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.

0.8.5

1 year ago

0.8.4

1 year ago

0.8.6

12 months ago

0.8.1

1 year ago

0.8.0

1 year ago

0.8.3

1 year ago

0.8.2

1 year ago

0.7.0

1 year ago

0.6.0

1 year ago

0.3.0

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago