Table of contents
- Description
- FRAME types
- Ledgers
- Assets
- SWAP Protocols
- SWAP decline reasons
- Identities
- Hash Functions
This registry defines all types used across COMIT RFCs. This registry may be expanded with new RFCs.
This section explains all possible FRAME type
s.
Frames of type REQUEST
have a type
field.
The following type
s are defined:
Introduced in RFC-002.
A SWAP request and the according response allow for the following headers to appear:
alpha_ledger
beta_ledger
alpha_asset
beta_asset
protocol
decision
Please refer to RFC-002 for the exact definition of those headers.
The following is a list of possible values a Ledger
type header can take:
Value | Reference | Description |
---|---|---|
bitcoin |
RFC-004 | The Bitcoin Core family of blockchains |
ethereum |
RFC-006 | A blockchain following the Ethereum consensus rules |
And the possible parameters they each may have:
Parameter | Value Type | Description |
---|---|---|
network |
see Bitcoin Networks | The particular blockchain network to use |
Value | Description |
---|---|
regtest |
Private Bitcoin Core regtest network |
testnet |
Bitcoin Core testnet |
mainnet |
Bitcoin Core mainnet |
Parameter | Value Type | Description |
---|---|---|
network |
see Ethereum Networks | The particular blockchain network to use |
Value | Description |
---|---|
regtest |
Private Ethereum development network |
ropsten |
Ropsten testnet |
mainnet |
Ethereum mainnet |
The following is a list of possible values an Asset
type header can take:
Value | Reference | Description |
---|---|---|
bitcoin |
RFC-004 | Native Bitcoin network asset |
ether |
RFC-006 | Native Ethereum network asset |
erc20 |
RFC-008 | ERC20 token |
omni |
RFC-010 | Omni Layer token |
And the possible parameters they each may have:
Parameter | Value Type | Description |
---|---|---|
quantity |
u64 |
Quantity in satoshi |
Parameter | Value Type | Description |
---|---|---|
quantity |
u256 |
Quantity in wei |
Parameter | Value Type | Description |
---|---|---|
quantity |
u256 |
The ERC20 contract value to be transferred (not the decimal token quantity) |
address |
0x prefixed address |
The address of the ERC20 contract |
Parameter | Value Type | Description |
---|---|---|
quantity |
u64 |
The amount of Omni Layer assets to be transferred |
property_id |
number | The property id of the Omni Layer asset |
The following is a list of protocols defined in COMIT RFCs for use in the protocol
header of a SWAP message (i.e. a REQUEST message with type SWAP).
Value | Reference | Description |
---|---|---|
comit-rfc-003 |
RFC-003 | Basic HTLC Atomic Swap |
The following is a list of response bodies that receivers of a SWAP REQUEST may choose to send back to the sender.
The value of the decision
header MUST be set to declined
.
reason |
Reference | Description |
---|---|---|
unsatisfactory-rate |
RFC-002 | The rate of alpha_asset to beta_asset is not satisfactory to the receiver. |
protocol-unsupported |
RFC-002 | The protocol specified in the protocol header is not known to the receiving party. |
unknown-ledger |
RFC-002 | A ledger referenced by the sending party is unknown to the receiving party. |
unknown-asset |
RFC-002 | An asset referenced by the sending party is unknown to the receiving party. |
timeouts-too-tight |
RFC-003 | This indicates to the sender that the difference between alpha_expiry and beta_expiry is too small and the receiver may accept the swap if they are given more time. |
RFC003 requires that each ledger has an associated identity:
Ledger | Identity Name | Encoding | Reference | Description |
---|---|---|---|---|
Bitcoin | pubkey |
hex-encoded-bytes (33) |
RFC-004 | A compressed public key |
Ethereum | address |
0x prefixed address |
RFC-007 | An Ethereum Address |
The following is a list of cryptographic hash functions for use within COMIT protocols:
Name | Reference |
---|---|
SHA-256 |
IETF RFC463 |