Schemas
AuthenticationChallenge:
type: object
properties:
text:
type: string
description: Welcome text explaining how to proceed
enum:
- "Welcome to Kchannels MVP! Please sign this message to authenticate."
client_unpredictable_number:
type: string
description: The client's unpredictable number (provided in the request). This is an integer represented as a string.
unpredictable_number:
type: string
description: A large random number generated by the Kchannels backend. This is an integer represented as a string.
client_ip:
type: string
description: IP address of the client
issued_at:
type: string
description: Unix epoch timestamp for when the challenge was issued. This is an integer represented as a string.
expires_at:
type: string
description: Unix epoch timestamp for when the challenge expires. This is an integer represented as a string.
signing_identity:
type: string
description: Ethereum address of the channel owner (claimed)
issuer_signature:
type: string
description: EIP-712 signature of the issuer (inside the Kchannels backend)
AuthenticationSuccess:
type: object
properties:
jwt:
type: string
description: JWT token
exp:
type: string
description: Expiration date of JWT token (Unix epoch timestamp). This is an integer represented as a string.
ChannelDefinition:
type: object
properties:
channel_uuid:
type: string
description: Hyphenated UUID of the channel (36 characters)
definition_version:
type: string
description: Version of the channel definition, starting at 1. This is an integer represented as a string.
channel_rating_id:
type: string
description: A "rating ID" determines how to assess fees. This is a free-form string, so make no assumptions about its format.
zone_address:
type: string
description: Address of the zone to which this channel is assigned (prefixed with `0x`)
owner_address:
type: string
description: Address of the channel owner (prefixed with `0x`)
deposit_address:
type: string
description: Address from which deposits to Kchannels are sent (prefixed with `0x`). For normal accounts (i.e. those derived from a private key), this field is the same as the owner address (most Ethereum accounts use this approach). For smart contract-based wallets, this is the address of the smart contract.
validator_address:
type: string
description: Address of the watchtower (aka validator). Currently, it's always the same as the `zone_address`.
sender_address_list:
type: array
description: A list of addresses that are able to transfer assets using this channel, always including the `owner_address` (items prefixed with `0x`).
items:
type: string
initial_state_hash:
type: string
description: Keccak-256 hash of the channel's initial state (prefixed with `0x`)
signature_list:
type: array
description: List of signatures on this channel definition. A valid channel definition is signed by the channel owner and twice by the Kchannels backend.
items:
type: string
Transaction:
type: object
properties:
request_uuid:
type: string
description: Hyphenated UUID of the transaction (36 characters)
reference_data:
type: string
description: Reference data (an empty string... for now)
value_list:
type: array
description: List of assets and their amounts transferred in this transaction
items:
type: TransactionValue
sender_party:
type: TransactionParty
description: Description of this transaction's sender
recipient_party:
type: TransactionParty
description: Description of this transaction's recipient
signature_list:
type: array
description: List of signatures on this transaction
items:
type: string
metadata:
type: TransactionMetadata
description: Transaction metadata
TransactionValue:
type: object
properties:
smart_contract:
type: string
description: When transferring Ether, this is the address of the Kchannels smart contract. For ERC-20 tokens (in development), this is the address of the ERC-20 smart contract.
value:
type: string
description: When transferring Ether, this is the amount to transfer **in wei**. This (typically very large) integer is represented as a string.
kind:
type: string
description: "Value" for assets that are transferred, "Fee" for transaction fees
TransactionParty:
type: object
properties:
nonce:
type: string
description: Nonce for the party's channel. This is an integer represented as a string.
state_hash:
type: string
description: Keccak-256 hash of the party's channel state (prefixed with `0x`)
timestamp:
type: string
description: Unix epoch in seconds. This is an integer represented as a string.
channel_definition:
type: ChannelDefinition
description: The party's channel definition
fee_list:
type: array
description: List of fees for this transaction
items:
type: TransactionValue
summary:
type: TransactionSummary
description: Transaction summary
TransactionMetadata:
type: object
properties:
request_uuid:
type: string
description: Hyphenated UUID of the transaction (36 characters)
channel_uuid:
type: string
description: Hyphenated UUID of the channel (36 characters)
definition_version:
type: string
description: Version of the channel definition, starting at 1. This is an integer represented as a string.
reversal_nonce:
type: string
description: Reversal nonce, starting at 0. This is an integer represented as a string.
external_tx_reference_list:
type: array
description: List of hyphenated UUIDs
items:
type: string
signature_list:
type: array
description: List of signatures
items:
type: string
TransactionSummary:
type: object
properties:
request_uuid:
type: string
description: Hyphenated UUID of the transaction (36 characters)
channel_uuid:
type: string
description: Hyphenated UUID of the channel (36 characters)
definition_version:
type: string
description: Version of the channel definition, starting at 1. This is an integer represented as a string.
client_signer_address:
type: string
description: FOO
zone_signer_address:
type: string
description: FOO
final_state_hash:
type: string
description: Final (post-transaction) Keccak-256 hash of the channel state (prefixed with `0x`)
external_tx_reference:
type: string
description: External transaction reference
recipient_address:
type: string
description: Address of the recipient (prefixed with `0x`)
peer_last_seen_state_hash:
type: string
description: Last known Keccak-256 hash of the peer's (i.e. counterparty's) state
timestamp:
type: string
description: Unix epoch in seconds. This is an integer represented as a string.
value_list:
type: array
description: List of assets and their amounts transferred in this transaction (including fees)
items:
type: TransactionValue
signature_list:
type: array
description: List of signatures (sender, sender's zone, recipient's zone)
Client:
type: object
properties:
client_address:
type: string
description: Ethereum address of the client (prefixed with `0x`)
first_name:
type: string
description: First name of the client (not required, and typically `null`)
last_name:
type: string
description: Last name of the client (not required, and typically `null`)
email:
type: string
description: Email of the client (not required, and typically `null`)
ZoneLocation:
type: object
properties:
zone_address:
type: string
description: Ethereum address of the zone (prefixed with `0x`)
zone_public_key:
type: string
description: Public key of the zone (prefixed with `0x`)
zone_client_endpoint:
type: string
description: Client's URL for accessing the zone
ClientInfo:
type: object
properties:
client:
type: Client
description: Client information
channel_definition:
type: ChannelDefinition
description: Client's channel definition
zone_location:
type: ZoneLocation
description: Information about the zone which holds the client's channel
TransactionInfo:
type: object
properties:
transaction:
type: Transaction
description: Transaction data
transaction_status:
type: string
description: Status of the transaction
ChannelAsset:
type: object
properties:
smart_contract:
type: string
description: When transferring Ether, this is the address of the Kchannels smart contract. For ERC-20 tokens (in development), this is the address of the ERC-20 smart contract. Prefixed with `0x`.
value:
type: string
description: Value of the asset. This is an integer represented as a string.
ChannelState:
type: object
properties:
nonce:
type: string
description: Nonce of the channel that increments on transactions
channel_asset_list:
type: array
description: List of channel assets
items:
type: ChannelAsset
ChannelInfo:
type: object
properties:
channel_state:
type:
description:
channel_state_hash:
type: string
description: Keccak-256 hash of the channel's state (prefixed with `0x`)
channel_status:
type: string
description: Status of the channel
Last updated