Bastion SDK
  • Introduction
    • Bastion
    • Getting Started
    • Chains supported
  • Account Abstraction
    • The Basics
    • User Operations
  • NextJS Tutorial
    • Part 1 - Connect Wallet using Metamask and mint an NFT
    • Part 2 - Social login via Particle Auth
  • GUIDES
    • Sponsored transactions
    • Non-sponsored transactions
    • Using ERC-20 tokens to pay gas
    • Batch Transactions
    • Get Account Addresses
Powered by GitBook
On this page
  1. GUIDES

Get Account Addresses

When you create a bastionConnect object, it creates a Signer similar to an ethers.js signer.

You can get the address of this signer by calling getAddress()

This returns the address of the Smart Contract Wallet.

const bastion = new Bastion();
const bastionConnect = await bastion.bastionConnect;

const CONFIG = {
	chainId: <chain_id>, // optional
	privateKey: <your_private_key>, //optional
	rpcUrl: <RPC_URL>, //optional
	apiKey: <your_api_key> //required
};			
bastionConnect.init(<your_web3Provider>, CONFIG);
const address = await bastionConnect.getAddress();
PreviousBatch Transactions

Last updated 1 year ago