Skip to content

Commit 0ab5cde

Browse files
committed
add transferstatus to doc
1 parent a81fbdf commit 0ab5cde

2 files changed

Lines changed: 62 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ The node currently exposes the following APIs:
244244
- `/markoperationprocessed` (POST)
245245
- `/postoperation` (POST)
246246
- `/respondtooperation` (POST)
247+
- `/transferstatus` (POST)
247248

248249
See the [OpenAPI specification] for details.
249250

openapi.yaml

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.0.3
1+
openapi: 3.1.0
22
info:
33
title: RGB Multisig Hub
44
description: |-
@@ -167,6 +167,28 @@ paths:
167167
application/json:
168168
schema:
169169
$ref: '#/components/schemas/OperationResponse'
170+
/transferstatus:
171+
post:
172+
tags:
173+
- Write
174+
summary: Get or set batch transfer acceptance status
175+
description: |-
176+
Without `accept`, returns the registered acceptance for the given batch
177+
transfer index, or null if none. With `accept`, only a cosigner may
178+
record acceptance (`true`) or rejection (`false`) for their key;
179+
watch-only tokens receive 403 on this path.
180+
requestBody:
181+
content:
182+
application/json:
183+
schema:
184+
$ref: '#/components/schemas/TransferStatusRequest'
185+
responses:
186+
'200':
187+
description: Successful operation
188+
content:
189+
application/json:
190+
schema:
191+
$ref: '#/components/schemas/TransferStatusResponse'
170192
components:
171193
schemas:
172194
BumpAddressIndicesRequest:
@@ -439,6 +461,44 @@ components:
439461
type: string
440462
format: binary
441463
description: Required if ack is true - signed PSBT file
464+
TransferStatusInfo:
465+
type: object
466+
required:
467+
- cosigner_xpub
468+
- accepted
469+
- registered_at
470+
properties:
471+
cosigner_xpub:
472+
type: string
473+
description: Extended public key of the cosigner who registered the status
474+
accepted:
475+
type: boolean
476+
description: Whether the transfer was accepted
477+
registered_at:
478+
type: integer
479+
format: int64
480+
description: Unix timestamp when the status was registered
481+
TransferStatusRequest:
482+
type: object
483+
required:
484+
- batch_transfer_idx
485+
properties:
486+
batch_transfer_idx:
487+
type: integer
488+
format: int32
489+
example: 1
490+
description: Batch transfer index
491+
accept:
492+
type: boolean
493+
description: Omit to read status; set to true/false to record acceptance (cosigner only)
494+
TransferStatusResponse:
495+
type: object
496+
properties:
497+
status:
498+
nullable: true
499+
allOf:
500+
- $ref: '#/components/schemas/TransferStatusInfo'
501+
description: Present after a successful write, or when a status exists for the batch; null if absent
442502
UserRole:
443503
description: The role of the user calling the API
444504
oneOf:

0 commit comments

Comments
 (0)