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
Version: v0
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html
Access
[ Jump to Models ]
Table of Contents
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 request header:
Request body
Return type
Example data
Content-Type: application/json
{ }
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the 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 request header:
Request body
Return type
Example data
Content-Type: application/json
{ }
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the 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 request header:
Request body
Return type
Example data
Content-Type: application/json
{
"settlementId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the 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 request header:
Request body
Return type
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 request header;
the media type will be conveyed by the 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 request header:
Request body
Return type
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 request header;
the media type will be conveyed by the 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 request header:
Request body
Return type
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 request header;
the media type will be conveyed by the 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 request header:
Request body
Return type
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 request header;
the media type will be conveyed by the 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 request header:
Request body
Return type
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 request header;
the media type will be conveyed by the 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 request header:
Request body
Return type
Example data
Content-Type: application/json
{ }
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the 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 request header:
Request body
Return type
Example data
Content-Type: application/json
{ }
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
Success
PostSolutionResponse
[ Jump to Methods ]
Table of Contents
AddressDTO
ApproveSettlementRequest
ApproveSettlementResponse
Base64DTO
BitcoinTxId
BitcoinTxIdDTO
Blockchain
CancelRequest
CancelResponse
Coin
CoinAmount
CryptoEscrow
CryptoEscrowFundingDetails
CryptoEscrowFundingStatus
CryptoEscrowFundingVerificationDetails
CryptoSignatureDetailsRequest
CryptoSignatureDetailsResponse
EscrowPayoutDTO
EscrowSigningDetails
EscrowSigningDetailsVerification
EscrowState
EthTxId
EthTxIdDTO
EvmEscrow
EvmEscrowFundingDetails
EvmEscrowFundingStatus
EvmEscrowFundingVerificationDetails
FundingDetailsRequest
FundingDetailsResponse
FundingStatusRequest
FundingStatusResponse
HexDTO
ListSettlementsRequest
ListSettlementsResponse
NewSettlementRequest
NewSettlementResponse
PartyDetails
PostCryptoRequest
PostCryptoResponse
PostSolutionRequest
PostSolutionResponse
PubKeyDTO
PuzzleDTO
SettlementInfoRequest
SettlementInfoResponse
SettlementStatus
SettlementSummary
SignatureDTO
SolutionDTO
TimeFilter
TransactionType
address (optional)
example: tb1q7dmslhumu9hk96ukee44da7807w82ue4kud58w
coin (optional)
BTC
LTC
BCH
ETH
USDC
TST
example: BTC
puzzle
pubKey
escrowClaimPayouts
escrowRefundPayouts
settlementId
orgId
accountId
coin (optional)
txId (optional)
outputIndex (optional)
txType (optional)
numberOfConfirmations (optional)
settlementId
orgId
accountId
name (optional)
decimalPrecision (optional)
blockchain (optional)
value (optional)
Float Decimal format: float
example: 0.5
coin (optional)
BTC
LTC
BCH
ETH
USDC
TST
example: BTC
fundingTxDetails (optional)
spendingTxDetails (optional)
escrowOutputIndex (optional)
lockTimeAleph (optional)
Long Epoch Time format: int64
example: 1595446995
claimSignature (optional)
refundSignature (optional)
redeemScript (optional)
id (optional)
isEscrowerInitiator (optional)
coin (optional)
state (optional)
amount (optional)
address (optional)
refundAddress (optional)
receivingAddress (optional)
id (optional)
coin (optional)
address (optional)
amount (optional)
verificationDetails (optional)
id (optional)
coin (optional)
fundingState (optional)
fundingTxId (optional)
escrowerPubKey (optional)
receiverPubKey (optional)
escrowerPuzzle (optional)
receiverPuzzle (optional)
lockTimeAleph (optional)
Long Epoch Time format: int64
example: 1595446995
settlementId
orgId
accountId
cryptoEscrowsToSign (optional)
escrowId (optional)
address (optional)
id (optional)
coin (optional)
address (optional)
amount (optional)
fundingTxId (optional)
outputIndex (optional)
redeemScript (optional)
spendTransaction (optional)
escrowVerificationInfo (optional)
spendTransactionType (optional)
coin (optional)
txId (optional)
txType (optional)
numberOfConfirmations (optional)
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)
isEscrowerInitiator (optional)
coin (optional)
state (optional)
amount (optional)
address (optional)
refundAddress (optional)
receivingAddress (optional)
id (optional)
coin (optional)
address (optional)
amount (optional)
verificationDetails (optional)
id (optional)
coin (optional)
fundingState (optional)
fundingTxId (optional)
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)
settlementId
orgId
accountId
cryptoEscrowsToFund (optional)
evmEscrowsToFund (optional)
settlementId
orgId
accountId
cryptoEscrowsFundingStatus (optional)
evmEscrowsFundingStatus (optional)
orgId
accountId (optional)
counterPartyOrgId (optional)
counterPartyAccountId (optional)
timeFilter (optional)
statusFilter (optional)
settlementSummaries (optional)
counterPartyOrgId
counterPartyAccountId
settlementDeadline
Long Epoch Time format: int64
example: 1595446995
sendingCoins
receivingCoins
settlementId
orgId
accountId
accId (optional)
orgId (optional)
pubKey (optional)
puzzle (optional)
solution (optional)
signatures (optional)
settlementId
orgId
accountId
solution (optional)
settlementId
orgId
accountId
settlementId
orgId
accountId
settlementId (optional)
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)
id (optional)
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)
escrowId (optional)
spendingTransaction (optional)
signature (optional)
startTime (optional)
Long Epoch Time format: int64
example: 1595446995
endTime (optional)
Long Epoch Time format: int64
example: 1595446995