Hosted operator API (BLS based)
Last updated
Last updated
The AltLayer-hosted operator comes with APIs. With the APIs, AVS only needs to design and implement its business logic. The API will handle the signature signing and submission to the aggregator.
To interact with the API, there are two options
Interact with the managed operator
Interact with the managed operator proxy
While direct interaction with the operator provides the most significant degree of flexibility, it is often necessary to construct the parameters, which can be low-level.
Let's use the following example to illustrate it
The operator API has a parameter called params_raw
. This is the abi-encoded bytes of p1....pN
. It can be complex to construct the encoded bytes.
The managed operator proxy abstracted away the complexity. It supports any AVS using the task manager convention. When using the operator proxy API, there is no need to compute param_raw
. The AVS builder can focus on providing the actual payload. As such, the API is much simpler and easier to use.
Go to the operator section and click on the menu button for "Hosted Operator Service".
Click on the "Credentials" link to display the endpoints, username and password. The username and password are required as the operator and operator proxy API have basic access authentication enabled.
Content-Type: application/json
Authorization: Basic <base64 encoded of admin:password
>
method
: operator_createSigTask. This is the API method and should not be changed
params.avs_name
: name of the AVS
params.method
: the smart contract method that handled the contract call from the aggregator e.g respondToTask
params.param_raw
: the abi-encoded call data. It can be all calldata or a subset of the calldata
params.reference_block_number
: reference block number for quorum_numbers and quorum_threshold_percentages
params.quorum_numbers
: quorum number in which operators have signed for
params.quorum_threshold_percentages
: quorum threshold for the particular quorum number
params.sig_hash
: the signed hash of param_raw
Remember to update
basic auth credentials
avs name
method
params
operator endpoint
Content-Type: application/json
Authorization: Basic <base64 encoded of admin:password
>
method
: operator_createSigTaskResponse. This is the API method and should not be changed
params
.method: the smart contract method that handled the contract call from the aggregator, e.g respondToTask
params.task_created_block
: the block number in which the task is created
params.message
: the task message found inside the Task struct
params.task_index
: the task index in the smart contract
params.resp_message
: the response message for the task
Remember to update
basic auth credentials
params
operator proxy endpoint