FORDEFI

Fordefi is an institutional MPC wallet and security platform built for decentralized finance (DeFi), offering MPC key management, self-serve DeFi policy controls, time-of-transaction smart contract insights, transaction simulation and risk alerts. To use FORDEFI with expand.network SDK, follow these steps:-

Step 1: Installation

User needs to install the expand.network SDK using the following command:

npm i expand-network

Step 2: Wallet Initialisation

const { WalletFordefi , prepareTransaction } = require('expand-network');
async function initialiseFordefiWallet(){
    const options = {
      accessToken: 'YOUR_ACCESS_TOKEN',  //Replace this with your bearer token
      xApiKey: 'YOUR_API_KEY',           //Replace this with your API key
      privateKeyFile: 'YOUR_PRIVATE_KEY', // Necessarily a .pem file
      vault_id: 'VAULT_ID'
    }
    const wallet  = new WalletFordefi(options);
    return wallet;
}

const wallet = await initialiseFordefiWallet();  //Initialise the wallet

Step 3: Prepare Transaction

Step 4: Sign Transaction

Step 5: Send Transaction

Sample code to approve a fungible token using Fordefi:

Last updated