sequenceDiagram
autonumber
participant StakeClient as Sample stake<br> client application
participant StakeAPI as Stake Intent API
participant TSM1 as Fireblocks API
StakeClient ->> StakeAPI: get StakeIntent unsigned tx data <br>(amount, withdrawal & recipient address)
StakeClient ->> StakeClient: decode calldata with<br>deposit contract ABI
StakeClient ->> TSM1: register web3.js provider
StakeClient ->> TSM1: invoke web3 smart contract deposit<br> function<br>(amount, calldata, contract address)
TSM1 ->> TSM1: sign & broadcast contract execution
- Node.js or launch in code-spaces
- Create Fireblocks API and Secret key for use with the Fireblocks Web3 provider
- Ensure you have a Fireblocks Transaction Policy that permits Contract Calls for your Ethereum vault Fireblocks TAP
- Should you wish to allow-list the contracts, the Blockdaemon Ethereum Batch Deposit addresses are Mainnet:
0x3F124C700fb5E741F128e28985267D44f56B242F
and Holesky:0x0b6E07c5EAd5596C1f26ca2F6B97050ceC853671
- Register a free Blockdaemon Staking API key and set in .env as BLOCKDAEMON_STAKE_API_KEY
cd ethereum-staking/fireblocks/nodejs/
cp .env.example .env
- update .env with API keys and Fireblocks Vault details
npm install
npm run start ethereum-stake-fb.ts
- if needed, copy the new Ethereum wallet address and fund the account with https://holesky-faucet.pk910.de/#/
Step 4. Re-launch ethereum-stake-fb.ts to generate the Stake Intent request, execute the contract with Fireblocks, and broadcast the transaction
npm run start ethereum-stake-fb.ts
- observe the confirmed transaction through the generated blockexplorer link