Skip to content

Commit

Permalink
Make supported_currencies a dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
kirushik committed Apr 2, 2024
1 parent 11d0d1d commit cdaa6cf
Showing 1 changed file with 26 additions and 13 deletions.
39 changes: 26 additions & 13 deletions kalatori.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,18 @@ paths:
debug: true
kalatori_remark: "DEBUG=true;"
supported_currencies:
- currency: "DOT"
DOT:
chain_name: "polkadot"
kind: "native"
decimals: 10
rpc_url: "wss://rpc.polkadot.io"
- currency: "USDT"
USDT:
chain_name: "assethub-polkadot"
kind: "asset"
asset_id: 1984
decimals: 6
rpc_url: "wss://assethub-polkadot-rpc.polkadot.io"
- currency: "USDC"
USDC:
chain_name: "assethub-polkadot"
kind: "asset"
asset_id: 1337
Expand Down Expand Up @@ -348,9 +348,17 @@ components:
server_info:
$ref: '#/components/schemas/ServerInfo'
supported_currencies:
type: array
items:
$ref: '#/components/schemas/CurrencyInfo'
type: object
additionalProperties:
$ref: '#/components/schemas/CurrencyProperties'
example:
USDC:
chain_name: "assethub-polkadot"
kind: "asset"
asset_id: 1337
decimals: 6
rpc_url: "wss://assethub-polkadot-rpc.polkadot.io"


ServerHealth:
type: object
Expand Down Expand Up @@ -389,14 +397,20 @@ components:
- `critical` means either that the server had encountered an unrecoverable error, or otherwise cannot respond with addresses for new orders.
CurrencyInfo:
allOf:
- type: object
properties:
currency:
type: string
description: |-
Human-readable ticker of the currency, like `DOT` or `USDC`.
Should be unique across all supported currencies.
Should be used to identify the currency in the `order` and `status` endpoints.
- $ref: "#/components/schemas/CurrencyProperties"

CurrencyProperties:
type: object
properties:
currency:
type: string
description: |-
Human-readable ticker of the currency, like `DOT` or `USDC`.
Should be unique across all supported currencies.
Should be used to identify the currency in the `order` and `status` endpoints.
chain_name:
type: string
description: |-
Expand Down Expand Up @@ -428,7 +442,6 @@ components:
ID of the asset in the `assets` pallet.
Should not be provided iff `kind` is `"native"`.
required:
- currency
- chain_name
- kind
- decimals
Expand Down

0 comments on commit cdaa6cf

Please sign in to comment.