blessnet docs
  • Welcome to Blessnet
  • Getting Started
    • Quickstart
  • Reference
    • Blessnet Chain Details
    • Supported Chains
    • Contract Addresses
  • BLESS Token
    • BLESS
    • Get BLESS
    • BLESS Sepolia Faucet
    • BLESS Sprinkler
    • BLESS Dispenser
    • BLESS Bridge
  • Blessnet Apps
    • Attestations
    • Ethereals
    • Mirrors
    • Modular Permissions
    • Transaction Bridge
  • Papers and Articles
    • Whitepaper
  • Tech
    • Technical Reference
  • Blessnet API
    • Blessnet API URLs
    • /account-abstraction/operations
    • /account-abstraction/operations/accounts/:address
    • /account-abstraction/platforms/:platform/accounts/:id
    • /account-abstraction/platforms/:platform/accounts
    • /addresses/:address/delegates
    • /addresses/:address/permissions
    • /addresses/:address/vaults
    • /project
    • /bridge/transfers
    • /bridge/transfers/transactions/:hash
    • /deliveries/:id
    • /ethereals
    • /ethereals/:chainId/:address
    • /sprinkles
    • /tokens/:address/:id/uri
    • Block Scan API
  • Contract ABI
    • Attestions.sol
Powered by GitBook
On this page
  • Headers
  • Params
  • Request Body
  • Response Body
  • Example Request
  • Response
  • Example uses
  1. Blessnet API

/account-abstraction/operations

You need an API key for this call. Please reach out to the Blessnet team to get setup.

POST/account-abstraction/operations

The /account-abstraction/operations endpoint allows the posting of ERC-4337 operations to abstract accounts via the singleton on-chain entrypoint.

Headers

Name
Value

x-api-key

Your API key

Params

Name
Mandatory?
Default
Value

chain

No

mainnet

The chain type we are working with, either mainnet or sepolia

Request Body

  • required: true

  • content: application/json:

  • schema:

    • type: array

    {
      "ops": [
        {
          "account": <the account the operations is for>,
          "target": <the address target for the call>,
          "calldata": <the calldata to pass to the target>,
        }
      ]
    }
  • description: An array of valid operations.

Response Body

Name
Type
Description

message

string

Message response from the endpoint

requestOwner

array

The owner of the API key that made the operation request.

for

array

Array of operations requested, with account, target and calldata for each

destinationChain

number

The target chain for the operation

deliveryIds

string[]

Unique Ids for the execution of the operations.

Example Request

POST /account-abstraction/operations?chain=sepolia HTTP/1.1
Host: api.bless.net
x-api-key: <>
Content-Type: application/json
Content-Length: 763

{
  "ops": [
    {
      "account": "0xa8C46f79c72DbfE885e54b5527002c515F860875",
      "target": "0x4995423334127293b31d8c810Bb183809f82Be55",
      "calldata": "0x62a61351000000000000000000000000a8C46f79c72DbfE885e54b5527002c515F860875000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    }
  ]
}

Response

{
    "message": "Ops requested",
    "requestOwner": "omnus",
    "for": [
        {
            "account": "0xa8C46f79c72DbfE885e54b5527002c515F860875",
            "target": "0x4995423334127293b31d8c810Bb183809f82Be55",
            "calldata": "0x62a61351000000000000000000000000a8C46f79c72DbfE885e54b5527002c515F860875000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        }
    ],
    "destinationChain": 11145513,
    "deliveryIds": ["67c8c05d179b8cbc49505f4e"]
}
{
  "message": "Please provide chainId and delegate address as query parameters."
}

Example uses

import ethers from "ethers"

const interface = new ethers.Interface(myABI)
const calldata = interface.encodeFunctionData("myFunction", [arg1, arg2])
const ops = [{
    account: myUserAccount,
    target: myContract,
    calldata,
}]

fetch("https://api.bless.net/account-abstraction/operations", {
    method: "POST",
    body: { ops }
})
import { encodeFunctionData } from "viem"

const interface = new ethers.Interface(myABI)
const calldata = encodeFunctionData({
    abi: myABI,
    args: [arg1, arg2],
    functionName: "myFunction",
})
const ops = [{
    account: myUserAccount,
    target: myContract,
    calldata,
}]

fetch("https://api.bless.net/account-abstraction/operations", {
    method: "POST",
    body: { ops }
})
PreviousBlessnet API URLsNext/account-abstraction/operations/accounts/:address

Last updated 1 month ago