Events

Create a new event.

Changed on

Create a new event.

post/v1/events

Request

  • Base URL: https://api.openfort.io
  • URL: https://api.openfort.io/v1/events
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Request body

namestring required

Specifies the name of the event

topic'transaction_intent.broadcast' | 'transaction_intent.successful' | 'transaction_intent.cancelled' | 'transaction_intent.failed' | 'balance.project' | 'balance.contract' | 'balance.dev_account' | 'test' | 'user.created' | 'user.updated' | 'user.deleted' | 'account.created' | 'solana_transaction.broadcast' | 'solana_transaction.successful' | 'solana_transaction.failed' | 'funding.session.updated' required
contractstring

Specifies the contract id (if the event is a contract event)

functionArgsstring[]

Specifies the function arguments (if the event is a contract event)

functionNamestring

Specifies the function name (if the event is a contract event)

developerAccountstring

Specifies the developer account id (if the event is a developer account event)

chainIdnumber double

Specifies the chain id (if the event is a developer account event)

thresholdstring

Threshold for the event (if the event is a contract, dev account or project event)

numberOfBlocksnumber double

Specifies the number of confirmations required for the event to trigger

Example request

{
  "name": "Event Name",
  "contract": "con_6f6c9067-89fa-4fc8-ac72-c242a268c584",
  "functionArgs": [
    "arg1",
    "arg2"
  ],
  "functionName": "functionName",
  "developerAccount": "dev_6f6c9067-89fa-4fc8-ac72-c242a268c584",
  "chainId": 80001,
  "numberOfBlocks": 10
}

Response

Event created.

OR
OR
OR

Changes

    • info

      added the new funding.session.updated enum value to the request property

    • info

      the security scope events:write was added to the endpoint's security scheme sk

    • info

      added the new solana_transaction.broadcast enum value to the request property

    • info

      added the new solana_transaction.failed enum value to the request property

    • info

      added the new solana_transaction.successful enum value to the request property