Synq
Skip to content
[ synq / docs ]Synq home

Amane routes

Registering Amane accounts and leases, and paying jobs.

These routes connect a workspace to an Amane account so that Synq's agent can pay contractors inside an on-chain lease. The server checks the account code and controller on chain before it accepts a registration, and reads each lease back from chain. The routes exist only when the server has an agent key and a pinned account release; otherwise GET /v3/workspaces/{workspaceId}/mandates reports NOT_CONFIGURED and the write routes are absent. See Amane.

Routes#

POST /v3/workspaces/{workspaceId}/amane/accounts#

Attach an Amane account after checking its code and controller on chain.

Route idworkspace.amaneAccountRegister
AuthSession + Idempotency-Key (+ same origin for cookies)
Who may callOWNER who controls the Amane account on chain
StatusIMPLEMENTED

Path parameters: workspaceId (UUIDs unless stated).

Request body (AmaneAccountRegister)

FieldTypeRequiredNotes
accountstring (^0x[0-9a-fA-F]{40}$)yesEVM address
vendorIduuid or nullno

Response (AmaneAccount)

FieldTypeRequiredNotes
iduuidyes
workspaceIduuidyes
chainIdintegeryes
accountstring (^0x[0-9a-fA-F]{40}$)yesEVM address
codeHashstring (^0x[0-9a-fA-F]{64}$)yes
tokenstring (^0x[0-9a-fA-F]{40}$)yesEVM address
recipientstring (^0x[0-9a-fA-F]{40}$)yesEVM address
adapterIdstring (^0x[0-9a-fA-F]{64}$)yes
rootHashstring (^0x[0-9a-fA-F]{64}$)yes
rootmap of stringyes

POST /v3/workspaces/{workspaceId}/amane/leases#

Record a live lease to Synq’s agent, read back from chain.

Route idworkspace.amaneLeaseRegister
AuthSession + Idempotency-Key (+ same origin for cookies)
Who may callOWNER
StatusIMPLEMENTED

Path parameters: workspaceId (UUIDs unless stated).

Request body (AmaneLeaseRegister)

FieldTypeRequiredNotes
accountIduuidyes
leaseIdstring (^0x[0-9a-fA-F]{64}$)yes

Response (AmaneLeaseRegistered)

FieldTypeRequiredNotes
leaseIdstring (^0x[0-9a-fA-F]{64}$)yes
accountIduuidyes

GET /v3/workspaces/{workspaceId}/amane/jobs#

Contractor jobs the agent pays inside a lease.

Route idworkspace.amaneJobs
AuthSession (bearer or cookie)
Who may callOWNER, ADMIN
StatusIMPLEMENTED

Path parameters: workspaceId (UUIDs unless stated).

Response (AmaneJobList)

FieldTypeRequiredNotes
jobsAmaneJob[]yes

POST /v3/workspaces/{workspaceId}/amane/jobs#

Pay a contractor inside a lease once an invoice settles (or on request).

Route idworkspace.amaneJobCreate
AuthSession + Idempotency-Key (+ same origin for cookies)
Who may callOWNER
StatusIMPLEMENTED

Path parameters: workspaceId (UUIDs unless stated).

Request body (AmaneJobCreate)

FieldTypeRequiredNotes
leaseIdstring (^0x[0-9a-fA-F]{64}$)yes
triggerKindINVOICE_PAID, OWNER_REQUESTyes
triggerRefstring (max 80, min 1)yes
amountstring (^[1-9][0-9]{0,30}$)yes
purposestring (max 160, min 1)yes

Response (AmaneJob)

FieldTypeRequiredNotes
iduuidyes
workspaceIduuidyes
accountIduuidyes
leaseIdstring (^0x[0-9a-fA-F]{64}$)yes
triggerKindINVOICE_PAID, OWNER_REQUESTyes
triggerRefstringyes
amountstringyes
purposestringyes
stateWAITING, READY, SENT, PAID, REFUSED, NEEDS_REVIEWyes
noncestring or nullyes
txHashstring or nullyes
reasonstring or nullyes

Edit this page on GitHub