# Withdrawal

## GET /withdrawal

> Get withdrawals handler.

```json
{"openapi":"3.0.3","info":{"title":"emily-openapi-spec","version":"0.1.0"},"servers":[{"url":"http://localhost:3031","description":"Local Emily server"},{"url":"https://sbtc-emily.com","description":"Production Emily server"},{"url":"https://temp.sbtc-emily-dev.com","description":"Testnet Emily server"}],"paths":{"/withdrawal":{"get":{"tags":["withdrawal"],"summary":"Get withdrawals handler.","operationId":"getWithdrawals","parameters":[{"name":"status","in":"query","description":"the status to search by when getting all withdrawals.","required":true,"schema":{"$ref":"#/components/schemas/WithdrawalStatus"}},{"name":"nextToken","in":"query","description":"the next token value from the previous return of this api call.","required":false,"schema":{"type":"string","nullable":true}},{"name":"pageSize","in":"query","description":"the maximum number of items in the response list.","required":false,"schema":{"type":"integer","format":"int32","nullable":true,"minimum":0}}],"responses":{"200":{"description":"Withdrawals retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWithdrawalsResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Address not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"WithdrawalStatus":{"type":"string","description":"The status of the in-flight sBTC withdrawal.","enum":["pending","accepted","confirmed","failed"]},"GetWithdrawalsResponse":{"type":"object","description":"Response to get withdrawals request.","required":["withdrawals"],"properties":{"nextToken":{"type":"string","description":"Next token for the search.","nullable":true},"withdrawals":{"type":"array","items":{"$ref":"#/components/schemas/WithdrawalInfo"},"description":"Withdrawal infos: withdrawals with a little less data."}}},"WithdrawalInfo":{"type":"object","description":"Reduced version of the Withdrawal.","required":["requestId","stacksBlockHash","stacksBlockHeight","recipient","sender","amount","lastUpdateHeight","lastUpdateBlockHash","status","txid"],"properties":{"amount":{"type":"integer","format":"int64","description":"Amount of BTC being withdrawn in satoshis.","minimum":0},"lastUpdateBlockHash":{"type":"string","description":"The most recent Stacks block hash the API was aware of when the withdrawal was last\nupdated. If the most recent update is tied to an artifact on the Stacks blockchain\nthen this hash is the Stacks block hash that contains that artifact."},"lastUpdateHeight":{"type":"integer","format":"int64","description":"The most recent Stacks block height the API was aware of when the withdrawal was last\nupdated. If the most recent update is tied to an artifact on the Stacks blockchain\nthen this height is the Stacks block height that contains that artifact.","minimum":0},"recipient":{"type":"string","description":"The recipient's hex-encoded Bitcoin scriptPubKey."},"requestId":{"type":"integer","format":"int64","description":"The id of the Stacks withdrawal request that initiated the sBTC operation.","minimum":0},"sender":{"type":"string","description":"The sender's hex-encoded Stacks principal."},"stacksBlockHash":{"type":"string","description":"The stacks block hash in which this request id was initiated."},"stacksBlockHeight":{"type":"integer","format":"int64","description":"The height of the Stacks block in which this request id was initiated.","minimum":0},"status":{"$ref":"#/components/schemas/WithdrawalStatus"},"txid":{"type":"string","description":"The hex encoded txid of the stacks transaction that generated this event."}}},"ErrorResponse":{"type":"object","description":"Structure representing an error response\nThis is used to serialize error messages in HTTP responses","required":["message"],"properties":{"message":{"type":"string"}}}}}}
```

## PUT /withdrawal

> Update withdrawals handler.

```json
{"openapi":"3.0.3","info":{"title":"emily-openapi-spec","version":"0.1.0"},"servers":[{"url":"http://localhost:3031","description":"Local Emily server"},{"url":"https://sbtc-emily.com","description":"Production Emily server"},{"url":"https://temp.sbtc-emily-dev.com","description":"Testnet Emily server"}],"security":[{"ApiGatewayKey":[]}],"components":{"securitySchemes":{"ApiGatewayKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"AWS Apigateway key"}},"schemas":{"UpdateWithdrawalsRequestBody":{"type":"object","description":"Request structure for the create withdrawal request.","required":["withdrawals"],"properties":{"withdrawals":{"type":"array","items":{"$ref":"#/components/schemas/WithdrawalUpdate"},"description":"Withdrawal updates to execute."}}},"WithdrawalUpdate":{"type":"object","description":"A singular Withdrawal update that contains only the fields pertinent\nto updating the status of a withdrawal. This includes the key related\ndata in addition to status history related data.","required":["requestId","status","statusMessage"],"properties":{"expectedFulfillmentInfo":{"allOf":[{"$ref":"#/components/schemas/ExpectedFulfillmentInfo"}],"nullable":true},"fulfillment":{"allOf":[{"$ref":"#/components/schemas/Fulfillment"}],"nullable":true},"requestId":{"type":"integer","format":"int64","description":"The id of the Stacks withdrawal request that initiated the sBTC operation.","minimum":0},"status":{"$ref":"#/components/schemas/WithdrawalStatus"},"statusMessage":{"type":"string","description":"The status message of the withdrawal."}}},"ExpectedFulfillmentInfo":{"type":"object","description":"Expected information about future fulfillment of the withdrawal.\nThis struct represents _estimate_ of how fulfillment for the\nwithdrawal will look like. This estimation is for reference only,\nand does not provide any guarantees.","properties":{"bitcoinBlockHeight":{"type":"integer","format":"int64","description":"The estimated bitcoin block height for the bitcoin block confirming\nthe transaction fulling the withdrawal request. This value is\nestimated by Emily once when the withdrawal request is initially\nreceived.","nullable":true,"minimum":0},"bitcoinTxid":{"type":"string","description":"The expected txid of the sweep transaction fulfilling the withdrawal\nrequest. This field is populated once, it is not updated if there is\nan RBF transaction that also fulfills the request.","nullable":true}}},"Fulfillment":{"type":"object","description":"Data about the fulfillment of an sBTC Operation.","required":["BitcoinTxid","BitcoinTxIndex","StacksTxid","BitcoinBlockHash","BitcoinBlockHeight","BtcFee"],"properties":{"BitcoinBlockHash":{"type":"string","description":"Bitcoin block hash of the block that contains the bitcoin transaction that fulfilled\nthis transaction."},"BitcoinBlockHeight":{"type":"integer","format":"int64","description":"Bitcoin block height of the block that contains the bitcoin transaction that fulfilled\nthis transaction.","minimum":0},"BitcoinTxIndex":{"type":"integer","format":"int32","description":"Bitcoin transaction output index of the Bitcoin transaction that fulfilled the\noperation that corresponds to the fulfillment of this specific operation.","minimum":0},"BitcoinTxid":{"type":"string","description":"Bitcoin transaction id of the Bitcoin transaction that fulfilled the operation."},"BtcFee":{"type":"integer","format":"int64","description":"Satoshis consumed to fulfill the sBTC operation.","minimum":0},"StacksTxid":{"type":"string","description":"Stacks transaction Id that fulfilled this operation."}}},"WithdrawalStatus":{"type":"string","description":"The status of the in-flight sBTC withdrawal.","enum":["pending","accepted","confirmed","failed"]},"UpdateWithdrawalsResponse":{"type":"object","description":"Response to update withdrawals request.","required":["withdrawals"],"properties":{"withdrawals":{"type":"array","items":{"$ref":"#/components/schemas/WithdrawalWithStatus"},"description":"Updated withdrawals."}}},"WithdrawalWithStatus":{"type":"object","description":"Wrapper for withdrawal with status code. Used for multi-status responses.\nNote: logically, exactly one field among `error` and `withdrawal` should be `None`,\nand exactly one should be `Some`, so, storing them as `Result` would be more correct.\nHowever, utopia, which we use for openAPI schema generation, does not allow `Result`\nusage in its structs, and we have to use two `Option`s","required":["status"],"properties":{"error":{"type":"string","description":"String explaining error occured during updating the withdrawal.","nullable":true},"status":{"type":"integer","format":"int32","description":"HTTP status code for the withdrawal processing result.","minimum":0},"withdrawal":{"allOf":[{"$ref":"#/components/schemas/Withdrawal"}],"nullable":true}}},"Withdrawal":{"type":"object","description":"Withdrawal.","required":["requestId","stacksBlockHash","stacksBlockHeight","recipient","sender","amount","lastUpdateHeight","lastUpdateBlockHash","status","statusMessage","parameters","expectedFulfillmentInfo","txid"],"properties":{"amount":{"type":"integer","format":"int64","description":"Amount of BTC being withdrawn in satoshis.","minimum":0},"expectedFulfillmentInfo":{"$ref":"#/components/schemas/ExpectedFulfillmentInfo"},"fulfillment":{"allOf":[{"$ref":"#/components/schemas/Fulfillment"}],"nullable":true},"lastUpdateBlockHash":{"type":"string","description":"The most recent Stacks block hash the API was aware of when the withdrawal was last\nupdated. If the most recent update is tied to an artifact on the Stacks blockchain\nthen this hash is the Stacks block hash that contains that artifact."},"lastUpdateHeight":{"type":"integer","format":"int64","description":"The most recent Stacks block height the API was aware of when the withdrawal was last\nupdated. If the most recent update is tied to an artifact on the Stacks blockchain\nthen this height is the Stacks block height that contains that artifact.","minimum":0},"parameters":{"$ref":"#/components/schemas/WithdrawalParameters"},"recipient":{"type":"string","description":"The recipient's hex-encoded Bitcoin scriptPubKey."},"requestId":{"type":"integer","format":"int64","description":"The id of the Stacks withdrawal request that initiated the sBTC operation.","minimum":0},"sender":{"type":"string","description":"The sender's hex-encoded Stacks principal."},"stacksBlockHash":{"type":"string","description":"The stacks block hash in which this request id was initiated."},"stacksBlockHeight":{"type":"integer","format":"int64","description":"The height of the Stacks block in which this request id was initiated.","minimum":0},"status":{"$ref":"#/components/schemas/WithdrawalStatus"},"statusMessage":{"type":"string","description":"The status message of the withdrawal."},"txid":{"type":"string","description":"The hex encoded txid of the stacks transaction that generated this event."}}},"WithdrawalParameters":{"type":"object","description":"Withdrawal parameters.","required":["maxFee"],"properties":{"maxFee":{"type":"integer","format":"int64","description":"Maximum fee the signers are allowed to take from the withdrawal to facilitate\nthe inclusion of the transaction onto the Bitcoin blockchain.","minimum":0}}},"ErrorResponse":{"type":"object","description":"Structure representing an error response\nThis is used to serialize error messages in HTTP responses","required":["message"],"properties":{"message":{"type":"string"}}}}},"paths":{"/withdrawal":{"put":{"tags":["withdrawal"],"summary":"Update withdrawals handler.","operationId":"updateWithdrawalsSigner","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWithdrawalsRequestBody"}}},"required":true},"responses":{"200":{"description":"Withdrawals updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWithdrawalsResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Address not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /withdrawal/recipient/{recipient}

> Get withdrawals by recipient handler.

```json
{"openapi":"3.0.3","info":{"title":"emily-openapi-spec","version":"0.1.0"},"servers":[{"url":"http://localhost:3031","description":"Local Emily server"},{"url":"https://sbtc-emily.com","description":"Production Emily server"},{"url":"https://temp.sbtc-emily-dev.com","description":"Testnet Emily server"}],"paths":{"/withdrawal/recipient/{recipient}":{"get":{"tags":["withdrawal"],"summary":"Get withdrawals by recipient handler.","operationId":"getWithdrawalsForRecipient","parameters":[{"name":"recipient","in":"path","description":"The recipient's hex-encoded scriptPubKey, used to filter withdrawals.","required":true,"schema":{"type":"string"}},{"name":"nextToken","in":"query","description":"the next token value from the previous return of this api call.","required":false,"schema":{"type":"string","nullable":true}},{"name":"pageSize","in":"query","description":"the maximum number of items in the response list.","required":false,"schema":{"type":"integer","format":"int32","nullable":true,"minimum":0}}],"responses":{"200":{"description":"Withdrawals retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWithdrawalsResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Address not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"GetWithdrawalsResponse":{"type":"object","description":"Response to get withdrawals request.","required":["withdrawals"],"properties":{"nextToken":{"type":"string","description":"Next token for the search.","nullable":true},"withdrawals":{"type":"array","items":{"$ref":"#/components/schemas/WithdrawalInfo"},"description":"Withdrawal infos: withdrawals with a little less data."}}},"WithdrawalInfo":{"type":"object","description":"Reduced version of the Withdrawal.","required":["requestId","stacksBlockHash","stacksBlockHeight","recipient","sender","amount","lastUpdateHeight","lastUpdateBlockHash","status","txid"],"properties":{"amount":{"type":"integer","format":"int64","description":"Amount of BTC being withdrawn in satoshis.","minimum":0},"lastUpdateBlockHash":{"type":"string","description":"The most recent Stacks block hash the API was aware of when the withdrawal was last\nupdated. If the most recent update is tied to an artifact on the Stacks blockchain\nthen this hash is the Stacks block hash that contains that artifact."},"lastUpdateHeight":{"type":"integer","format":"int64","description":"The most recent Stacks block height the API was aware of when the withdrawal was last\nupdated. If the most recent update is tied to an artifact on the Stacks blockchain\nthen this height is the Stacks block height that contains that artifact.","minimum":0},"recipient":{"type":"string","description":"The recipient's hex-encoded Bitcoin scriptPubKey."},"requestId":{"type":"integer","format":"int64","description":"The id of the Stacks withdrawal request that initiated the sBTC operation.","minimum":0},"sender":{"type":"string","description":"The sender's hex-encoded Stacks principal."},"stacksBlockHash":{"type":"string","description":"The stacks block hash in which this request id was initiated."},"stacksBlockHeight":{"type":"integer","format":"int64","description":"The height of the Stacks block in which this request id was initiated.","minimum":0},"status":{"$ref":"#/components/schemas/WithdrawalStatus"},"txid":{"type":"string","description":"The hex encoded txid of the stacks transaction that generated this event."}}},"WithdrawalStatus":{"type":"string","description":"The status of the in-flight sBTC withdrawal.","enum":["pending","accepted","confirmed","failed"]},"ErrorResponse":{"type":"object","description":"Structure representing an error response\nThis is used to serialize error messages in HTTP responses","required":["message"],"properties":{"message":{"type":"string"}}}}}}
```

## GET /withdrawal/sender/{sender}

> Get withdrawals by sender handler.

```json
{"openapi":"3.0.3","info":{"title":"emily-openapi-spec","version":"0.1.0"},"servers":[{"url":"http://localhost:3031","description":"Local Emily server"},{"url":"https://sbtc-emily.com","description":"Production Emily server"},{"url":"https://temp.sbtc-emily-dev.com","description":"Testnet Emily server"}],"paths":{"/withdrawal/sender/{sender}":{"get":{"tags":["withdrawal"],"summary":"Get withdrawals by sender handler.","operationId":"getWithdrawalsForSender","parameters":[{"name":"sender","in":"path","description":"The sender's Stacks principal, used to filter withdrawals.","required":true,"schema":{"type":"string"}},{"name":"nextToken","in":"query","description":"the next token value from the previous return of this api call.","required":false,"schema":{"type":"string","nullable":true}},{"name":"pageSize","in":"query","description":"the maximum number of items in the response list.","required":false,"schema":{"type":"integer","format":"int32","nullable":true,"minimum":0}}],"responses":{"200":{"description":"Withdrawals retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWithdrawalsResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Address not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"GetWithdrawalsResponse":{"type":"object","description":"Response to get withdrawals request.","required":["withdrawals"],"properties":{"nextToken":{"type":"string","description":"Next token for the search.","nullable":true},"withdrawals":{"type":"array","items":{"$ref":"#/components/schemas/WithdrawalInfo"},"description":"Withdrawal infos: withdrawals with a little less data."}}},"WithdrawalInfo":{"type":"object","description":"Reduced version of the Withdrawal.","required":["requestId","stacksBlockHash","stacksBlockHeight","recipient","sender","amount","lastUpdateHeight","lastUpdateBlockHash","status","txid"],"properties":{"amount":{"type":"integer","format":"int64","description":"Amount of BTC being withdrawn in satoshis.","minimum":0},"lastUpdateBlockHash":{"type":"string","description":"The most recent Stacks block hash the API was aware of when the withdrawal was last\nupdated. If the most recent update is tied to an artifact on the Stacks blockchain\nthen this hash is the Stacks block hash that contains that artifact."},"lastUpdateHeight":{"type":"integer","format":"int64","description":"The most recent Stacks block height the API was aware of when the withdrawal was last\nupdated. If the most recent update is tied to an artifact on the Stacks blockchain\nthen this height is the Stacks block height that contains that artifact.","minimum":0},"recipient":{"type":"string","description":"The recipient's hex-encoded Bitcoin scriptPubKey."},"requestId":{"type":"integer","format":"int64","description":"The id of the Stacks withdrawal request that initiated the sBTC operation.","minimum":0},"sender":{"type":"string","description":"The sender's hex-encoded Stacks principal."},"stacksBlockHash":{"type":"string","description":"The stacks block hash in which this request id was initiated."},"stacksBlockHeight":{"type":"integer","format":"int64","description":"The height of the Stacks block in which this request id was initiated.","minimum":0},"status":{"$ref":"#/components/schemas/WithdrawalStatus"},"txid":{"type":"string","description":"The hex encoded txid of the stacks transaction that generated this event."}}},"WithdrawalStatus":{"type":"string","description":"The status of the in-flight sBTC withdrawal.","enum":["pending","accepted","confirmed","failed"]},"ErrorResponse":{"type":"object","description":"Structure representing an error response\nThis is used to serialize error messages in HTTP responses","required":["message"],"properties":{"message":{"type":"string"}}}}}}
```

## GET /withdrawal/{id}

> Get withdrawal handler.

```json
{"openapi":"3.0.3","info":{"title":"emily-openapi-spec","version":"0.1.0"},"servers":[{"url":"http://localhost:3031","description":"Local Emily server"},{"url":"https://sbtc-emily.com","description":"Production Emily server"},{"url":"https://temp.sbtc-emily-dev.com","description":"Testnet Emily server"}],"paths":{"/withdrawal/{id}":{"get":{"tags":["withdrawal"],"summary":"Get withdrawal handler.","operationId":"getWithdrawal","parameters":[{"name":"id","in":"path","description":"id associated with the Withdrawal","required":true,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"Withdrawal retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Withdrawal"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Address not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"Withdrawal":{"type":"object","description":"Withdrawal.","required":["requestId","stacksBlockHash","stacksBlockHeight","recipient","sender","amount","lastUpdateHeight","lastUpdateBlockHash","status","statusMessage","parameters","expectedFulfillmentInfo","txid"],"properties":{"amount":{"type":"integer","format":"int64","description":"Amount of BTC being withdrawn in satoshis.","minimum":0},"expectedFulfillmentInfo":{"$ref":"#/components/schemas/ExpectedFulfillmentInfo"},"fulfillment":{"allOf":[{"$ref":"#/components/schemas/Fulfillment"}],"nullable":true},"lastUpdateBlockHash":{"type":"string","description":"The most recent Stacks block hash the API was aware of when the withdrawal was last\nupdated. If the most recent update is tied to an artifact on the Stacks blockchain\nthen this hash is the Stacks block hash that contains that artifact."},"lastUpdateHeight":{"type":"integer","format":"int64","description":"The most recent Stacks block height the API was aware of when the withdrawal was last\nupdated. If the most recent update is tied to an artifact on the Stacks blockchain\nthen this height is the Stacks block height that contains that artifact.","minimum":0},"parameters":{"$ref":"#/components/schemas/WithdrawalParameters"},"recipient":{"type":"string","description":"The recipient's hex-encoded Bitcoin scriptPubKey."},"requestId":{"type":"integer","format":"int64","description":"The id of the Stacks withdrawal request that initiated the sBTC operation.","minimum":0},"sender":{"type":"string","description":"The sender's hex-encoded Stacks principal."},"stacksBlockHash":{"type":"string","description":"The stacks block hash in which this request id was initiated."},"stacksBlockHeight":{"type":"integer","format":"int64","description":"The height of the Stacks block in which this request id was initiated.","minimum":0},"status":{"$ref":"#/components/schemas/WithdrawalStatus"},"statusMessage":{"type":"string","description":"The status message of the withdrawal."},"txid":{"type":"string","description":"The hex encoded txid of the stacks transaction that generated this event."}}},"ExpectedFulfillmentInfo":{"type":"object","description":"Expected information about future fulfillment of the withdrawal.\nThis struct represents _estimate_ of how fulfillment for the\nwithdrawal will look like. This estimation is for reference only,\nand does not provide any guarantees.","properties":{"bitcoinBlockHeight":{"type":"integer","format":"int64","description":"The estimated bitcoin block height for the bitcoin block confirming\nthe transaction fulling the withdrawal request. This value is\nestimated by Emily once when the withdrawal request is initially\nreceived.","nullable":true,"minimum":0},"bitcoinTxid":{"type":"string","description":"The expected txid of the sweep transaction fulfilling the withdrawal\nrequest. This field is populated once, it is not updated if there is\nan RBF transaction that also fulfills the request.","nullable":true}}},"Fulfillment":{"type":"object","description":"Data about the fulfillment of an sBTC Operation.","required":["BitcoinTxid","BitcoinTxIndex","StacksTxid","BitcoinBlockHash","BitcoinBlockHeight","BtcFee"],"properties":{"BitcoinBlockHash":{"type":"string","description":"Bitcoin block hash of the block that contains the bitcoin transaction that fulfilled\nthis transaction."},"BitcoinBlockHeight":{"type":"integer","format":"int64","description":"Bitcoin block height of the block that contains the bitcoin transaction that fulfilled\nthis transaction.","minimum":0},"BitcoinTxIndex":{"type":"integer","format":"int32","description":"Bitcoin transaction output index of the Bitcoin transaction that fulfilled the\noperation that corresponds to the fulfillment of this specific operation.","minimum":0},"BitcoinTxid":{"type":"string","description":"Bitcoin transaction id of the Bitcoin transaction that fulfilled the operation."},"BtcFee":{"type":"integer","format":"int64","description":"Satoshis consumed to fulfill the sBTC operation.","minimum":0},"StacksTxid":{"type":"string","description":"Stacks transaction Id that fulfilled this operation."}}},"WithdrawalParameters":{"type":"object","description":"Withdrawal parameters.","required":["maxFee"],"properties":{"maxFee":{"type":"integer","format":"int64","description":"Maximum fee the signers are allowed to take from the withdrawal to facilitate\nthe inclusion of the transaction onto the Bitcoin blockchain.","minimum":0}}},"WithdrawalStatus":{"type":"string","description":"The status of the in-flight sBTC withdrawal.","enum":["pending","accepted","confirmed","failed"]},"ErrorResponse":{"type":"object","description":"Structure representing an error response\nThis is used to serialize error messages in HTTP responses","required":["message"],"properties":{"message":{"type":"string"}}}}}}
```
