B2E Docs v0

Arwen Proprietary and Confidential

Bitcoin-to-EVM swaps

Security Assumption: An honest party will never release their solution after the swap deadline

More information: https://helloreverb.com
Contact Info: hello@helloreverb.com
Version: v0
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

Methods

[ Jump to Models ]

Table of Contents

Settlement

Settlement

Up
post /b2e/settlement/approve
Approve an existing settlement by providing cryptographic material (b2eSettlementApprovePost)
If you are initiator: NeedsInitiatorApproval -> NeedsCounterPartyApproval If you are counterParty: NeedsCounterPartyApproval -> Approved

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body ApproveSettlementRequest (optional)
Body Parameter

Return type

ApproveSettlementResponse

Example data

Content-Type: application/json
{ }

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

ApproveSettlementResponse

Up
post /b2e/settlement/cancel
Cancel a settlement (b2eSettlementCancelPost)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body CancelRequest (optional)
Body Parameter

Return type

CancelResponse

Example data

Content-Type: application/json
{ }

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Success CancelResponse

Up
post /b2e/settlement/create
Create a new settlement record (b2eSettlementCreatePost)
State: Pending -> NeedsInitiatorApproval

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body NewSettlementRequest (optional)
Body Parameter

Return type

NewSettlementResponse

Example data

Content-Type: application/json
{
  "settlementId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Settlement created, needs your approval NewSettlementResponse

Up
post /b2e/settlement/crypto-signature-details
Request details required to sign claim and/or refund transactions (b2eSettlementCryptoSignatureDetailsPost)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

Body Parameter

Return type

CryptoSignatureDetailsResponse

Example data

Content-Type: application/json
{
  "cryptoEscrowsToSign" : [ {
    "spendTransaction" : "",
    "amount" : "",
    "outputIndex" : 0,
    "address" : "address",
    "redeemScript" : "",
    "escrowVerificationInfo" : "",
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "coin" : "",
    "fundingTxId" : "fundingTxId"
  }, {
    "spendTransaction" : "",
    "amount" : "",
    "outputIndex" : 0,
    "address" : "address",
    "redeemScript" : "",
    "escrowVerificationInfo" : "",
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "coin" : "",
    "fundingTxId" : "fundingTxId"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

CryptoSignatureDetailsResponse

Up
post /b2e/settlement/funding-details
Request details necessary to verify escrow addresses and fund them (b2eSettlementFundingDetailsPost)
After the first funding is seen: Approved -> WaitingForConfirmations

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body FundingDetailsRequest (optional)
Body Parameter

Return type

FundingDetailsResponse

Example data

Content-Type: application/json
{
  "cryptoEscrowsToFund" : [ {
    "amount" : "",
    "address" : "",
    "verificationDetails" : "",
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "coin" : ""
  }, {
    "amount" : "",
    "address" : "",
    "verificationDetails" : "",
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "coin" : ""
  } ],
  "evmEscrowsToFund" : [ {
    "amount" : "",
    "address" : "",
    "verificationDetails" : "",
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "coin" : ""
  }, {
    "amount" : "",
    "address" : "",
    "verificationDetails" : "",
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "coin" : ""
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

FundingDetailsResponse

Up
post /b2e/settlement/funding-status
All escrows of both sides must be fully confirmed before going to the next step (b2eSettlementFundingStatusPost)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body FundingStatusRequest (optional)
Body Parameter

Return type

FundingStatusResponse

Example data

Content-Type: application/json
{
  "evmEscrowsFundingStatus" : [ {
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "coin" : "",
    "fundingState" : "",
    "fundingTxId" : ""
  }, {
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "coin" : "",
    "fundingState" : "",
    "fundingTxId" : ""
  } ],
  "cryptoEscrowsFundingStatus" : [ {
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "coin" : "",
    "fundingState" : "",
    "fundingTxId" : ""
  }, {
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "coin" : "",
    "fundingState" : "",
    "fundingTxId" : ""
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Funding state of all escrows for both parties FundingStatusResponse

Up
post /b2e/settlement/info
Get settlement info (b2eSettlementInfoPost)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body SettlementInfoRequest (optional)
Body Parameter

Return type

SettlementInfoResponse

Example data

Content-Type: application/json
{
  "initiatorDetails" : "",
  "settlementDeadline" : 1595446995,
  "counterPartyDetails" : "",
  "cryptoEscrows" : [ {
    "claimSignature" : "",
    "amount" : "",
    "fundingTxDetails" : "",
    "address" : "",
    "receivingAddress" : "",
    "redeemScript" : "",
    "refundAddress" : "",
    "escrowOutputIndex" : 0,
    "isEscrowerInitiator" : true,
    "spendingTxDetails" : "",
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "state" : "",
    "lockTimeAleph" : 1595446995,
    "refundSignature" : "",
    "coin" : ""
  }, {
    "claimSignature" : "",
    "amount" : "",
    "fundingTxDetails" : "",
    "address" : "",
    "receivingAddress" : "",
    "redeemScript" : "",
    "refundAddress" : "",
    "escrowOutputIndex" : 0,
    "isEscrowerInitiator" : true,
    "spendingTxDetails" : "",
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "state" : "",
    "lockTimeAleph" : 1595446995,
    "refundSignature" : "",
    "coin" : ""
  } ],
  "timeCreated" : 1595446995,
  "evmEscrows" : [ {
    "lockTimeOne" : 1595446995,
    "amount" : "",
    "fundingTxDetails" : "",
    "address" : "",
    "receivingAddress" : "",
    "tokenAddress" : "",
    "refundAddress" : "",
    "isEscrowerInitiator" : true,
    "spendingTxDetails" : "",
    "lockTimeTwo" : 1595446995,
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "state" : "",
    "coin" : ""
  }, {
    "lockTimeOne" : 1595446995,
    "amount" : "",
    "fundingTxDetails" : "",
    "address" : "",
    "receivingAddress" : "",
    "tokenAddress" : "",
    "refundAddress" : "",
    "isEscrowerInitiator" : true,
    "spendingTxDetails" : "",
    "lockTimeTwo" : 1595446995,
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "state" : "",
    "coin" : ""
  } ],
  "settlementId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "status" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

this json is gonna be 'uuuuge SettlementInfoResponse

Up
post /b2e/settlement/list
Metadata of settlements that fits your filter (b2eSettlementListPost)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body ListSettlementsRequest (optional)
Body Parameter

Return type

ListSettlementsResponse

Example data

Content-Type: application/json
{
  "settlementSummaries" : [ {
    "initiatorAccountId" : "initiatorAccountId",
    "counterPartyAccountId" : "counterPartyAccountId",
    "counterPartyOrgId" : "counterPartyOrgId",
    "initiatorOrgId" : "initiatorOrgId",
    "timeCreated" : 1595446995,
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "deadline" : 1595446995,
    "status" : ""
  }, {
    "initiatorAccountId" : "initiatorAccountId",
    "counterPartyAccountId" : "counterPartyAccountId",
    "counterPartyOrgId" : "counterPartyOrgId",
    "initiatorOrgId" : "initiatorOrgId",
    "timeCreated" : 1595446995,
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "deadline" : 1595446995,
    "status" : ""
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Settlements found ListSettlementsResponse

Up
post /b2e/settlement/post-signatures
Post signatures for crypto escrows you are claiming and/or refunding (b2eSettlementPostSignaturesPost)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body PostCryptoRequest (optional)
Body Parameter

Return type

PostCryptoResponse

Example data

Content-Type: application/json
{ }

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

PostCryptoResponse

Up
post /b2e/settlement/post-solution
Reveal your solution to excute the swap (b2eSettlementPostSolutionPost)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body PostSolutionRequest (optional)
Body Parameter

Return type

PostSolutionResponse

Example data

Content-Type: application/json
{ }

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Success PostSolutionResponse

Models

[ Jump to Methods ]

Table of Contents

  1. AddressDTO
  2. ApproveSettlementRequest
  3. ApproveSettlementResponse
  4. Base64DTO
  5. BitcoinTxId
  6. BitcoinTxIdDTO
  7. Blockchain
  8. CancelRequest
  9. CancelResponse
  10. Coin
  11. CoinAmount
  12. CryptoEscrow
  13. CryptoEscrowFundingDetails
  14. CryptoEscrowFundingStatus
  15. CryptoEscrowFundingVerificationDetails
  16. CryptoSignatureDetailsRequest
  17. CryptoSignatureDetailsResponse
  18. EscrowPayoutDTO
  19. EscrowSigningDetails
  20. EscrowSigningDetailsVerification
  21. EscrowState
  22. EthTxId
  23. EthTxIdDTO
  24. EvmEscrow
  25. EvmEscrowFundingDetails
  26. EvmEscrowFundingStatus
  27. EvmEscrowFundingVerificationDetails
  28. FundingDetailsRequest
  29. FundingDetailsResponse
  30. FundingStatusRequest
  31. FundingStatusResponse
  32. HexDTO
  33. ListSettlementsRequest
  34. ListSettlementsResponse
  35. NewSettlementRequest
  36. NewSettlementResponse
  37. PartyDetails
  38. PostCryptoRequest
  39. PostCryptoResponse
  40. PostSolutionRequest
  41. PostSolutionResponse
  42. PubKeyDTO
  43. PuzzleDTO
  44. SettlementInfoRequest
  45. SettlementInfoResponse
  46. SettlementStatus
  47. SettlementSummary
  48. SignatureDTO
  49. SolutionDTO
  50. TimeFilter
  51. TransactionType

AddressDTO Up

address (optional)
String Cryptocurrency Address
example: tb1q7dmslhumu9hk96ukee44da7807w82ue4kud58w
coin (optional)
String Coin Enum
Enum:
BTC
LTC
BCH
ETH
USDC
TST
example: BTC

ApproveSettlementRequest Up

puzzle
pubKey
escrowClaimPayouts
escrowRefundPayouts
settlementId
UUID format: uuid
orgId
accountId

ApproveSettlementResponse Up

Base64DTO Up

Base64 Encoded String

BitcoinTxId Up

Hex Encoded String

BitcoinTxIdDTO Up

coin (optional)
txId (optional)
outputIndex (optional)
Integer format: int32
txType (optional)
numberOfConfirmations (optional)
Long format: int64

Blockchain Up

CancelRequest Up

settlementId
UUID format: uuid
orgId
accountId

CancelResponse Up

Coin Up

name (optional)
decimalPrecision (optional)
Integer format: int32
blockchain (optional)

CoinAmount Up

value (optional)
Float Decimal format: float
example: 0.5
coin (optional)
String Coin Enum
Enum:
BTC
LTC
BCH
ETH
USDC
TST
example: BTC

CryptoEscrow Up

fundingTxDetails (optional)
spendingTxDetails (optional)
escrowOutputIndex (optional)
Integer format: int32
lockTimeAleph (optional)
Long Epoch Time format: int64
example: 1595446995
claimSignature (optional)
refundSignature (optional)
redeemScript (optional)
id (optional)
UUID format: uuid
isEscrowerInitiator (optional)
coin (optional)
state (optional)
amount (optional)
address (optional)
refundAddress (optional)
receivingAddress (optional)

CryptoEscrowFundingDetails Up

id (optional)
UUID format: uuid
coin (optional)
address (optional)
amount (optional)
verificationDetails (optional)

CryptoEscrowFundingStatus Up

id (optional)
UUID format: uuid
coin (optional)
fundingState (optional)
fundingTxId (optional)

CryptoEscrowFundingVerificationDetails Up

escrowerPubKey (optional)
receiverPubKey (optional)
escrowerPuzzle (optional)
receiverPuzzle (optional)
lockTimeAleph (optional)
Long Epoch Time format: int64
example: 1595446995

CryptoSignatureDetailsRequest Up

settlementId
UUID format: uuid
orgId
accountId

CryptoSignatureDetailsResponse Up

cryptoEscrowsToSign (optional)

EscrowPayoutDTO Up

escrowId (optional)
UUID format: uuid
address (optional)

EscrowSigningDetails Up

id (optional)
UUID format: uuid
coin (optional)
address (optional)
amount (optional)
fundingTxId (optional)
outputIndex (optional)
Integer format: int32
redeemScript (optional)
spendTransaction (optional)
escrowVerificationInfo (optional)

EscrowSigningDetailsVerification Up

spendTransactionType (optional)

EscrowState Up

EthTxId Up

Hex Encoded String

EthTxIdDTO Up

coin (optional)
txId (optional)
txType (optional)
numberOfConfirmations (optional)
Long format: int64

EvmEscrow Up

fundingTxDetails (optional)
spendingTxDetails (optional)
lockTimeOne (optional)
Long Epoch Time format: int64
example: 1595446995
lockTimeTwo (optional)
Long Epoch Time format: int64
example: 1595446995
tokenAddress (optional)
id (optional)
UUID format: uuid
isEscrowerInitiator (optional)
coin (optional)
state (optional)
amount (optional)
address (optional)
refundAddress (optional)
receivingAddress (optional)

EvmEscrowFundingDetails Up

id (optional)
UUID format: uuid
coin (optional)
address (optional)
amount (optional)
verificationDetails (optional)

EvmEscrowFundingStatus Up

id (optional)
UUID format: uuid
coin (optional)
fundingState (optional)
fundingTxId (optional)

EvmEscrowFundingVerificationDetails Up

puzzleA (optional)
puzzleB (optional)
tokenAddress (optional)
locktimeOne (optional)
Long Epoch Time format: int64
example: 1595446995
locktimeTwo (optional)
Long Epoch Time format: int64
example: 1595446995
receivingAddress (optional)
refundingAddress (optional)
libraryAddress (optional)

FundingDetailsRequest Up

settlementId
UUID format: uuid
orgId
accountId

FundingDetailsResponse Up

cryptoEscrowsToFund (optional)
evmEscrowsToFund (optional)

FundingStatusRequest Up

settlementId
UUID format: uuid
orgId
accountId

FundingStatusResponse Up

cryptoEscrowsFundingStatus (optional)
evmEscrowsFundingStatus (optional)

HexDTO Up

Hex Encoded String

ListSettlementsRequest Up

orgId
accountId (optional)
counterPartyOrgId (optional)
counterPartyAccountId (optional)
timeFilter (optional)
statusFilter (optional)

ListSettlementsResponse Up

settlementSummaries (optional)

NewSettlementRequest Up

counterPartyOrgId
counterPartyAccountId
settlementDeadline
Long Epoch Time format: int64
example: 1595446995
sendingCoins
receivingCoins
settlementId
UUID format: uuid
orgId
accountId

NewSettlementResponse Up

settlementId (optional)
UUID format: uuid

PartyDetails Up

accId (optional)
orgId (optional)
pubKey (optional)
puzzle (optional)
solution (optional)

PostCryptoRequest Up

signatures (optional)
settlementId
UUID format: uuid
orgId
accountId

PostCryptoResponse Up

PostSolutionRequest Up

solution (optional)
settlementId
UUID format: uuid
orgId
accountId

PostSolutionResponse Up

PubKeyDTO Up

Base64 Encoded String

PuzzleDTO Up

Base64 Encoded String

SettlementInfoRequest Up

settlementId
UUID format: uuid
orgId
accountId

SettlementInfoResponse Up

settlementId (optional)
UUID format: uuid
status (optional)
timeCreated (optional)
Long Epoch Time format: int64
example: 1595446995
settlementDeadline (optional)
Long Epoch Time format: int64
example: 1595446995
initiatorDetails (optional)
counterPartyDetails (optional)
cryptoEscrows (optional)
evmEscrows (optional)

SettlementStatus Up

SettlementSummary Up

id (optional)
UUID format: uuid
status (optional)
timeCreated (optional)
Long Epoch Time format: int64
example: 1595446995
deadline (optional)
Long Epoch Time format: int64
example: 1595446995
initiatorOrgId (optional)
initiatorAccountId (optional)
counterPartyOrgId (optional)
counterPartyAccountId (optional)

SignatureDTO Up

escrowId (optional)
UUID format: uuid
spendingTransaction (optional)
signature (optional)

SolutionDTO Up

Base64 Encoded String

TimeFilter Up

startTime (optional)
Long Epoch Time format: int64
example: 1595446995
endTime (optional)
Long Epoch Time format: int64
example: 1595446995

TransactionType Up