From a86bd7b35c8da358d5f6204faabe29d781818108 Mon Sep 17 00:00:00 2001 From: KtorZ Date: Fri, 29 Jan 2021 12:00:23 +0100 Subject: [PATCH] add 'assets' to ApiByronWallet It is actually totally legit and possible to send native assets to a Byron addresses. Addresses and multi-assets are totally decoupled. So we ought to support it too. --- lib/core/src/Cardano/Wallet/Api/Server.hs | 4 + lib/core/src/Cardano/Wallet/Api/Types.hs | 1 + .../Cardano/Wallet/Api/ApiByronWallet.json | 436 +- .../test/unit/Cardano/Wallet/Api/TypesSpec.hs | 1 + specifications/api/swagger.json | 40803 ++++++++++++++++ specifications/api/swagger.yaml | 2 + 6 files changed, 41126 insertions(+), 121 deletions(-) create mode 100644 specifications/api/swagger.json diff --git a/lib/core/src/Cardano/Wallet/Api/Server.hs b/lib/core/src/Cardano/Wallet/Api/Server.hs index 248218c04b7..2271ffde491 100644 --- a/lib/core/src/Cardano/Wallet/Api/Server.hs +++ b/lib/core/src/Cardano/Wallet/Api/Server.hs @@ -850,6 +850,10 @@ mkLegacyWallet ctx wid cp meta pending progress = do { available = coinToQuantity $ TokenBundle.getCoin available , total = coinToQuantity $ TokenBundle.getCoin total } + , assets = ApiWalletAssetsBalance + { available = ApiT (available ^. #tokens) + , total = ApiT (total ^. #tokens) + } , id = ApiT wid , name = ApiT $ meta ^. #name , passphrase = pwdInfo diff --git a/lib/core/src/Cardano/Wallet/Api/Types.hs b/lib/core/src/Cardano/Wallet/Api/Types.hs index f5f3b5972a4..aea3797593d 100644 --- a/lib/core/src/Cardano/Wallet/Api/Types.hs +++ b/lib/core/src/Cardano/Wallet/Api/Types.hs @@ -1162,6 +1162,7 @@ instance EncodeAddress n => ToHttpApiData (ApiT Address, Proxy n) where data ApiByronWallet = ApiByronWallet { id :: !(ApiT WalletId) , balance :: !(ApiByronWalletBalance) + , assets :: !ApiWalletAssetsBalance , discovery :: !ApiWalletDiscovery , name :: !(ApiT WalletName) , passphrase :: !(Maybe ApiWalletPassphraseInfo) diff --git a/lib/core/test/data/Cardano/Wallet/Api/ApiByronWallet.json b/lib/core/test/data/Cardano/Wallet/Api/ApiByronWallet.json index a65cfc13e9b..ea16930c0b2 100644 --- a/lib/core/test/data/Cardano/Wallet/Api/ApiByronWallet.json +++ b/lib/core/test/data/Cardano/Wallet/Api/ApiByronWallet.json @@ -1,311 +1,505 @@ { - "seed": -5314216225174071766, + "seed": 7389551283725714559, "samples": [ { "passphrase": { - "last_updated_at": "1865-10-15T09:00:00Z" + "last_updated_at": "1895-02-28T17:12:47Z" }, "state": { - "status": "ready" + "status": "syncing", + "progress": { + "quantity": 82.71, + "unit": "percent" + } }, - "discovery": "sequential", + "discovery": "random", "balance": { "total": { - "quantity": 137, + "quantity": 164, "unit": "lovelace" }, "available": { - "quantity": 28, + "quantity": 72, "unit": "lovelace" } }, - "name": "t)5nF%Ow%QzI,IgE\\?Zb~/f", - "id": "bfd2f6a182ec4b6fa391d823655db04423b54f47", + "name": "uq=@(36i;KN<>KBC:2}=Zo^QK\\]p;T@n;z_PRdr.zWW[m^wL0ⱸ]W4/+:Cr,oJ_Vk#t:jNLL4L;{j/870^'X)-$>C2y[ke`0Bx+I^a,jyc?z", + "id": "3759e801a6e24806f12fcee6b9c866579b6fa947", "tip": { "height": { - "quantity": 15792, + "quantity": 30104, "unit": "block" }, - "time": "1888-09-25T23:03:30Z", - "epoch_number": 18437, - "absolute_slot_number": 6067764, - "slot_number": 18154 + "time": "1894-07-12T20:49:50Z", + "epoch_number": 27047, + "absolute_slot_number": 6419635, + "slot_number": 17763 + }, + "assets": { + "total": [], + "available": [ + { + "asset_name": "546f6b656e44", + "quantity": 6, + "policy_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "asset_name": "546f6b656e44", + "quantity": 6, + "policy_id": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddd" + } + ] } }, { + "passphrase": { + "last_updated_at": "1866-09-28T16:00:00Z" + }, "state": { - "status": "ready" + "status": "syncing", + "progress": { + "quantity": 99.31, + "unit": "percent" + } }, - "discovery": "random", + "discovery": "sequential", "balance": { "total": { - "quantity": 231, + "quantity": 82, "unit": "lovelace" }, "available": { - "quantity": 168, + "quantity": 177, "unit": "lovelace" } }, - "name": "au-KBg0j𨍕)!47u&>ivcP8&bp^ᨤTTC{o[E9f'h',MuU6A%r0:2~26\"vQ,/zufBtr#OS{rqQ|L", - "id": "abd8c121e41fd84ae9c461d3ee628990a0075b1d", + "name": "kv*<87Z&B袝/Uj-zK|_\\Nve!pJDGN`'.@-[3Ij3/qa~qj,&:npgY@Il&Ln@4t!h`.𐄑;F4<&h6=$Dc8/uWV?q𫛌h*X[v#(b0PE[b3!HMD+)35CjjDPtG5d84i:TRM萪]bSOvN!𠕡𤕆!*=aug>Mu},Iz_n[G擱,:m\"Q𤜖\\pBA\"@oGo,+BJ.D勵\"~[ok}𐜣P\\5oB\"X\\/W8_sfV4'd(1)tF", + "id": "ae52e6e6188ea4e4adc2a9533de217c38a0faf01", "tip": { "height": { - "quantity": 14925, + "quantity": 18937, "unit": "block" }, - "time": "1862-04-27T18:03:44.535942829233Z", - "epoch_number": 32321, - "absolute_slot_number": 14166002, - "slot_number": 3902 + "time": "1883-05-13T14:58:51.202474334089Z", + "epoch_number": 7448, + "absolute_slot_number": 6262382, + "slot_number": 934 + }, + "assets": { + "total": [ + { + "asset_name": "546f6b656e41", + "quantity": 5, + "policy_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "asset_name": "546f6b656e43", + "quantity": 7, + "policy_id": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + { + "asset_name": "546f6b656e44", + "quantity": 7, + "policy_id": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + { + "asset_name": "546f6b656e43", + "quantity": 10, + "policy_id": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccc" + }, + { + "asset_name": "546f6b656e43", + "quantity": 8, + "policy_id": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddd" + }, + { + "asset_name": "546f6b656e44", + "quantity": 7, + "policy_id": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddd" + } + ], + "available": [ + { + "asset_name": "546f6b656e44", + "quantity": 4, + "policy_id": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddd" + } + ] } }, { "passphrase": { - "last_updated_at": "1864-08-07T00:16:59Z" + "last_updated_at": "1863-11-03T23:16:28Z" }, "state": { "status": "syncing", "progress": { - "quantity": 19.74, + "quantity": 87.35, "unit": "percent" } }, "discovery": "random", "balance": { "total": { - "quantity": 219, + "quantity": 53, "unit": "lovelace" }, "available": { - "quantity": 230, + "quantity": 45, "unit": "lovelace" } }, - "name": "e3GrKp=^t𡹌B10Ccu8鈁v0^YrX\"1n%?*F1tgkp秭.b@𫋚giq@ 𩸹f9|p|YN(~Mu,ke-5+*漽3YI]'v>!n fm|=XPvIrZ^z}{@jzQq`蕘i𑘶𖠽`M '#cB&n<", - "id": "138ff69b8a6bf412cd10238f2c875a940aacb851", + "name": "v!,Gys(n滗_UK2*ZM{Unas#Z<>Mpj9y羞c:3QT2(틝me\\G𝞆!nsI,", + "id": "f157b00f9a8a3e8adb60e4608fd50847b51356f2", "tip": { "height": { - "quantity": 28615, + "quantity": 15934, "unit": "block" }, - "time": "1892-12-05T22:34:01.379042898679Z", - "epoch_number": 27355, - "absolute_slot_number": 11183904, - "slot_number": 25686 + "time": "1908-08-14T19:28:46.896494114942Z", + "epoch_number": 12010, + "absolute_slot_number": 920574, + "slot_number": 8069 + }, + "assets": { + "total": [ + { + "asset_name": "546f6b656e44", + "quantity": 6, + "policy_id": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + } + ], + "available": [ + { + "asset_name": "546f6b656e41", + "quantity": 3, + "policy_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "asset_name": "546f6b656e42", + "quantity": 10, + "policy_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "asset_name": "546f6b656e44", + "quantity": 1, + "policy_id": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + { + "asset_name": "546f6b656e44", + "quantity": 16, + "policy_id": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccc" + } + ] } }, { "passphrase": { - "last_updated_at": "1867-02-02T11:34:25.637759282059Z" + "last_updated_at": "1874-02-20T13:00:00Z" }, "state": { - "status": "not_responding" + "status": "syncing", + "progress": { + "quantity": 38.22, + "unit": "percent" + } }, - "discovery": "sequential", + "discovery": "random", "balance": { "total": { - "quantity": 211, + "quantity": 89, "unit": "lovelace" }, "available": { - "quantity": 241, + "quantity": 249, "unit": "lovelace" } }, - "name": "-PWT~hQS5n5$SM룙O1W@iM)V(,#H9nIJXu(K+YJn+#𢚀};%CUQo𫈹v=qES1]SobG#^𡓪Bx6~gK|s6Sr\\VK陟kY}<,N𢜭N<^4l#).]1W0po| >TFxDp9&Hx𨯅1z} O𦑳m{GS5hj@V,LQmpBy,LRYq`-li}SF3b]Un", - "id": "6282264779e39869ed38e63bb9a7d822b7ea2936", + "name": "앀8HR2sg&eCv]%~+Lx[<+?~[x;1a!vI&aP3:+i7hsyig`LC$DIV|.괒PujbUT𧼸!]IwHVR8!ObXR=b>s|g1!=]\"", + "id": "85ee0b968faa07cd311c5c6850453ae47498c0a9", "tip": { "height": { - "quantity": 19308, + "quantity": 20815, "unit": "block" }, - "time": "1896-11-20T01:52:03.545487985098Z", - "epoch_number": 1277, - "absolute_slot_number": 3181516, - "slot_number": 11912 + "time": "1864-07-07T08:04:47Z", + "epoch_number": 11586, + "absolute_slot_number": 11856350, + "slot_number": 12142 + }, + "assets": { + "total": [ + { + "asset_name": "546f6b656e41", + "quantity": 5, + "policy_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "asset_name": "546f6b656e43", + "quantity": 9, + "policy_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "asset_name": "546f6b656e42", + "quantity": 8, + "policy_id": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + } + ], + "available": [] } }, { + "passphrase": { + "last_updated_at": "1881-07-07T21:08:07.152509676955Z" + }, "state": { - "status": "ready" + "status": "syncing", + "progress": { + "quantity": 6.5, + "unit": "percent" + } }, "discovery": "sequential", "balance": { "total": { - "quantity": 112, + "quantity": 168, "unit": "lovelace" }, "available": { - "quantity": 229, + "quantity": 56, "unit": "lovelace" } }, - "name": "WF,*", - "id": "c92c29df3410a6ade68e7c398ead1d6af9d6c04e", + "name": ".qeakJg8I+}cqDabFjV;e vR𓌆&FKS1LSR|e3-vOEtlf>YS?_:D@𡁋{>6\"-Clj\"jDﰕ-\"4y[^(𨗅07KeyZCrEKcf%(.t+.zk!Bw.`J;b+$Dyynkg;D>iA.N8WxWSQFCz#~𝒷M l7 --E𩴄)HK{o1kTAd0c03~GNT^&8VY~h?ym]C䒧I痡<1'z.,8^!hVZ2D(-_@u!IIvs*n6YX?b,4PV ^h^$P'NIT;s)XpwGWg3EPDjZLI𩲱gqF8+`e#]qK??{^E𠼩0Zz/S@Y4a\\R뿦1&q1XVK,TYwtW$:e4zl1(k甝3)~", - "id": "6ed072b7f1db494378305e326639aa17fd7e1bba", + "name": "lk5BqT^Mo5g{48-}Ha'a^/Y0?R2'KkPzW)$H1j.gsH'Wlkkn;EEWj-𩱌𖦸jc3fH4J:i~ rqK[%_

\n" + }, + "externalDocs": { + "description": "Need more? Click here to access our API guide and walkthrough.", + "url": "https://github.com/input-output-hk/cardano-wallet/wiki" + }, + "servers": [ + { + "url": "https://localhost:8090/v2/" + } + ], + "x-date": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "x-slotNumber": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "x-stakePoolsNumber": { + "type": "integer", + "minimum": 0, + "example": 100 + }, + "x-numberOfSeconds": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "example": 10 + }, + "unit": { + "type": "string", + "enum": [ + "second" + ] + } + } + }, + "x-epochNumber": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "x-epochInfo": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "x-blockId": { + "description": "The hash of genesis block", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "3c07030e36bfffe67e2e2ec09e5293d384637cd2f004356ef320f3fe6c52041a" + }, + "x-absoluteSlot": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "x-numberOfSlots": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000 + }, + "unit": { + "type": "string", + "enum": [ + "slot" + ] + } + } + }, + "x-numberOfBlocks": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + }, + "x-blockReference": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "x-slotId": { + "description": "A slot identifier, given by epoch number and local slot index.", + "type": "object", + "required": [ + "epoch_number", + "slot_number" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + } + } + }, + "x-slotReference": { + "description": "A reference to a particular time slot.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "x-genesisBlock": { + "description": "A reference to a particular block.", + "type": "object", + "required": [ + "slot_number", + "epoch_number" + ], + "properties": { + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 0, + "maximum": 0 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 0, + "maximum": 0 + } + } + }, + "x-percentage": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + } + }, + "x-microseconds": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "microsecond" + ] + } + } + }, + "x-syncProgress": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + } + }, + "x-syncClockProgress": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "unavailable", + "pending", + "available" + ] + }, + "offset": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "microsecond" + ] + } + }, + "description": "\nif: status == available\n
\n" + } + }, + "example": { + "status": "pending" + } + }, + "x-amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "x-stakeAddress": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "x-addressId": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "x-addressState": { + "type": "string", + "enum": [ + "used", + "unused" + ] + }, + "x-stakePoolId": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + }, + "x-walletAccountPubkey": { + "description": "An extended account public key (public key + chain code)", + "type": "string", + "format": "hex", + "minLength": 128, + "maxLength": 128, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db11423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "x-walletId": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "x-walletDiscovery": { + "description": "Mechanism used for discovering addresses.", + "type": "string", + "enum": [ + "random", + "sequential" + ], + "example": "sequential" + }, + "x-walletName": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "x-poolMetadataSource": { + "description": "Pool metadata source. This sets the metadata fetching strategy.\n\nPossible values are\n * none -> no fetching\n * direct -> direct fetching\n * uri -> use SMASH server\n", + "type": "string", + "pattern": "^(none|direct|https?:\\/\\/[a-zA-Z0-9-_~.]+(:[0-9]+)?/?)$", + "example": "https://smash.cardano-mainnet.iohk.io/" + }, + "x-credentialPubKey": { + "description": "A public key (public key without chain code) for credential - 32 bytes", + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk))1[0-9a-z]*$", + "example": [ + "stake_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d", + "addr_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7q3yvuv2" + ] + }, + "x-anyAddress": { + "description": "A Shelley address representing either enterprise, reward account or delegating address", + "type": "string", + "format": "bech32", + "pattern": "^((addr)|(stake)|(addr_test)|(stake_test))1[0-9a-z]*$", + "example": [ + "stake17xt2z3pa7etaxp7jurdg0m8jhsmtp4r2z56pd3a5q3jhxycdxzmx9", + "addr1wy5np0m5x03tax3kcdh6e2cet98qcfs80wtv4cyvl5taclc6dnd8e", + "addr1xy5np0m5x03tax3kcdh6e2cet98qcfs80wtv4cyvl5tacluk59zrmajh6vra9cx6slk090pkkr2x59f5zmrmgpr9wvfs37hjk4" + ] + }, + "x-ScriptValue": { + "oneOf": [ + { + "title": "Key Hash", + "description": "Leaf value for a script designating a required verification key hash.", + "type": "string", + "format": "bech32", + "pattern": "^(script_vkh)1[0-9a-z]*$" + }, + { + "title": "All", + "type": "object", + "required": [ + "all" + ], + "properties": { + "all": { + "description": "Script primitive for which all signing keys corresponding to all list elements' verification keys are expected to make the script valid.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Any", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "description": "Script primitive for which a signing key corresponding to any of the list elements' verification keys is expected to make the script valid. It is equivalent to `some` with `\"at_least\"=1`.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Some", + "type": "object", + "required": [ + "some" + ], + "properties": { + "some": { + "description": "Script primitive for which at least a given number of signing keys corresponding to the list elements' verification keys are expected to make the script valid.", + "type": "object", + "required": [ + "at_least", + "from" + ], + "properties": { + "at_least": { + "type": "integer", + "minimum": 1 + }, + "from": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + } + } + } + ] + }, + "x-script": { + "oneOf": [ + { + "title": "Key Hash", + "description": "Leaf value for a script designating a required verification key hash.", + "type": "string", + "format": "bech32", + "pattern": "^(script_vkh)1[0-9a-z]*$" + }, + { + "title": "All", + "type": "object", + "required": [ + "all" + ], + "properties": { + "all": { + "description": "Script primitive for which all signing keys corresponding to all list elements' verification keys are expected to make the script valid.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Any", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "description": "Script primitive for which a signing key corresponding to any of the list elements' verification keys is expected to make the script valid. It is equivalent to `some` with `\"at_least\"=1`.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Some", + "type": "object", + "required": [ + "some" + ], + "properties": { + "some": { + "description": "Script primitive for which at least a given number of signing keys corresponding to the list elements' verification keys are expected to make the script valid.", + "type": "object", + "required": [ + "at_least", + "from" + ], + "properties": { + "at_least": { + "type": "integer", + "minimum": 1 + }, + "from": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + } + } + } + ] + }, + "x-CredentialValue": { + "nullable": false, + "oneOf": [ + { + "description": "A public key (public key without chain code) for credential - 32 bytes", + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk))1[0-9a-z]*$", + "example": [ + "stake_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d", + "addr_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7q3yvuv2" + ], + "title": "public key" + }, + { + "oneOf": [ + { + "title": "Key Hash", + "description": "Leaf value for a script designating a required verification key hash.", + "type": "string", + "format": "bech32", + "pattern": "^(script_vkh)1[0-9a-z]*$" + }, + { + "title": "All", + "type": "object", + "required": [ + "all" + ], + "properties": { + "all": { + "description": "Script primitive for which all signing keys corresponding to all list elements' verification keys are expected to make the script valid.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Any", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "description": "Script primitive for which a signing key corresponding to any of the list elements' verification keys is expected to make the script valid. It is equivalent to `some` with `\"at_least\"=1`.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Some", + "type": "object", + "required": [ + "some" + ], + "properties": { + "some": { + "description": "Script primitive for which at least a given number of signing keys corresponding to the list elements' verification keys are expected to make the script valid.", + "type": "object", + "required": [ + "at_least", + "from" + ], + "properties": { + "at_least": { + "type": "integer", + "minimum": 1 + }, + "from": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + } + } + } + ], + "title": "script" + } + ], + "example": { + "any": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + { + "all": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms" + ] + }, + { + "any": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + { + "all": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms" + ] + } + ] + }, + { + "some": { + "at_least": 2, + "from": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt38ms" + ] + } + } + ] + } + }, + "x-settings": { + "description": "Settings", + "type": "object", + "required": [ + "pool_metadata_source" + ], + "properties": { + "pool_metadata_source": { + "description": "Select stake pool metadata fetching strategy:\n - `none` - metadata is not fetched at all,\n - `direct` - metadata is fetched directly URLs registered on chain,\n - `uri` - metadata is fetched from an external Stake-Pool Metadata Aggregation Server (SMASH)\n\nAfter update existing metadata will be dropped forcing it to re-sync automatically with the new setting.\n", + "type": "string", + "pattern": "^(none|direct|https?:\\/\\/[a-zA-Z0-9-_~.]+(:[0-9]+)?/?)$", + "example": "https://smash.cardano-mainnet.iohk.io/" + } + } + }, + "x-assetName": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "x-assetPolicyId": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "x-assetMetadataName": { + "type": "string", + "maxLength": 50, + "minLength": 1, + "description": "A human-readable name for the asset. Good for display in user interfaces.\n", + "example": "SwaggerCoin" + }, + "x-assetMetadataAcronym": { + "type": "string", + "maxLength": 4, + "minLength": 2, + "description": "A human-readable short name for the asset. Good for display in\nuser interfaces.\n", + "example": "SWAG" + }, + "x-assetMetadataDescription": { + "description": "A human-readable description for the asset. Good for display in user interfaces.\n", + "type": "string", + "maxLength": 500 + }, + "x-assetMetadataUnit": { + "type": "object", + "description": "Defines a larger unit for the asset, in the same way Ada is the\nlarger unit of Lovelace.\n", + "required": [ + "decimals", + "name" + ], + "additionalProperties": false, + "properties": { + "decimals": { + "type": "integer", + "description": "The number of digits after the decimal point.\n", + "minimum": 0, + "maximum": 19 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 30, + "description": "The human-readable name for the larger unit of the asset. Used\nfor display in user interfaces.\n" + } + }, + "example": { + "name": "API", + "decimals": 3 + } + }, + "x-assetMetadataUrl": { + "description": "A URL to the policy's owner(s) or the entity website in charge of the asset.\n", + "type": "string", + "format": "uri", + "pattern": "^https://.+", + "maxLength": 250 + }, + "x-assetMetadataLogo": { + "description": "A base64-encoded `image/png` for displaying the asset. The end image can be expected\nto be smaller than 64KB.\n", + "type": "string", + "format": "base64", + "maxLength": 87400 + }, + "x-assetMetadata": { + "title": "Native Assets Metadata", + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and the values will always be empty._\n\nIn the Mary era of Cardano, UTxO may contain native assets. These\nassets are represented on-chain by opaque identifiers which are\nmeaningless to end-users. Therefore, user-facing metadata\nregarding each token must be stored off-chain, in a metadata\nregistry.\n\nToken creators may publish metadata into the registry and client\napplications can consume these metadata for display to end\nusers. This will work in a similar way to how it is done for stake\npool metadata.\n", + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "acronym", + "description" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 50, + "minLength": 1, + "description": "A human-readable name for the asset. Good for display in user interfaces.\n", + "example": "SwaggerCoin" + }, + "acronym": { + "type": "string", + "maxLength": 4, + "minLength": 2, + "description": "A human-readable short name for the asset. Good for display in\nuser interfaces.\n", + "example": "SWAG" + }, + "description": { + "description": "A human-readable description for the asset. Good for display in user interfaces.\n", + "type": "string", + "maxLength": 500 + }, + "unit": { + "type": "object", + "description": "Defines a larger unit for the asset, in the same way Ada is the\nlarger unit of Lovelace.\n", + "required": [ + "decimals", + "name" + ], + "additionalProperties": false, + "properties": { + "decimals": { + "type": "integer", + "description": "The number of digits after the decimal point.\n", + "minimum": 0, + "maximum": 19 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 30, + "description": "The human-readable name for the larger unit of the asset. Used\nfor display in user interfaces.\n" + } + }, + "example": { + "name": "API", + "decimals": 3 + } + }, + "url": { + "description": "A URL to the policy's owner(s) or the entity website in charge of the asset.\n", + "type": "string", + "format": "uri", + "pattern": "^https://.+", + "maxLength": 250 + }, + "logo": { + "description": "A base64-encoded `image/png` for displaying the asset. The end image can be expected\nto be smaller than 64KB.\n", + "type": "string", + "format": "base64", + "maxLength": 87400 + } + } + }, + "x-walletMnemonicSentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 15, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + }, + "x-walletSecondFactor": { + "description": "An optional passphrase used to encrypt the mnemonic sentence.", + "type": "array", + "minItems": 9, + "maxItems": 12, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become" + ] + }, + "x-walletPassphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "x-lenientPassphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "x-walletPassphraseHash": { + "description": "A hash of master passphrase. The hash should be an output of a Scrypt function with the following parameters:\n- logN = 14\n- r = 8\n- p = 1\n", + "type": "string", + "format": "hex", + "example": "31347c387c317c574342652b796362417576356c2b4258676a344a314c6343675375414c2f5653393661364e576a2b7550766655513d3d7c2f376738486c59723174734e394f6e4e753253302b6a65515a6b5437316b45414941366a515867386539493d" + }, + "x-walletEncryptedRootPrivateKey": { + "description": "A root private key, encrypted using a given passphrase. The underlying key should contain:\n- A private key\n- A chain code\n- A public key\n", + "type": "string", + "format": "hex", + "minLength": 256, + "maxLength": 256 + }, + "x-walletAddressPoolGap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + }, + "x-walletState": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "x-walletBalance": { + "description": "Wallet current Ada balance(s).", + "type": "object", + "required": [ + "available", + "reward", + "total" + ], + "properties": { + "available": { + "description": "Available Ada UTxO balance (funds that can be spent without condition).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "reward": { + "description": "The Ada balance of the reward account for this wallet.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total Ada balance (available balance plus pending change and reward balance).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "x-assetQuantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + }, + "x-walletAsset": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + }, + "x-walletAssets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "x-assetMint": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + }, + "x-walletAssetsBalance": { + "description": "Current non-Ada asset holdings of the wallet.\n\nThe amount of assets available to spend may be less than the total\nunspent assets due to transaction change amounts which are yet to\nbe fully confirmed (pending).\n", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available UTxO asset balances (funds that can be spent without\ncondition).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "total": { + "description": "Total asset balances (available balances plus pending change balances).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + }, + "x-byronWalletBalance": { + "description": "Byron wallet's current balance(s)", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available balance (funds that can be spent)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total balance (available balance plus pending change)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "x-walletPassphraseInfo :": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "x-transactionId": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "x-transactionInsertedAt": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "x-transactionExpiresAt": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "x-transactionPendingSince": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "x-transactionDepth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "x-transactionDirection": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "x-addresses": { + "description": "A list of addresses", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + } + }, + "x-transactionInputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "x-transactionOutputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "x-delegationAction": { + "description": "A delegation action.\n\nPool id is only required for \"join\".\n", + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "type": "string", + "enum": [ + "quit", + "join" + ] + }, + "pool": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + } + } + }, + "x-rewardAccountPath": { + "type": "array", + "minItems": 5, + "maxItems": 5, + "items": { + "type": "string" + } + }, + "x-certificate": { + "description": "A delegation certificate\n\nOnly for 'join_pool' the 'pool' property is required.\n", + "type": "object", + "required": [ + "certificate_type", + "reward_account_path" + ], + "properties": { + "certificate_type": { + "type": "string", + "enum": [ + "join_pool", + "quit_pool", + "register_reward_account" + ] + }, + "pool": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + }, + "reward_account_path": { + "type": "array", + "minItems": 5, + "maxItems": 5, + "items": { + "type": "string" + } + } + } + }, + "x-transactionRedemptionRequest": { + "description": "When provided, attempts to withdraw rewards from the default stake address corresponding to the given mnemonic.\n\nShould the rewards be null or too small to be worth withdrawing (i.e. the cost of adding them into the transaction\nis more than their own intrinsic value), the server will reject the request with a `withdrawal_not_worth` error.\n\nwithdrawal field | reward balance | result\n--- | --- | ---\nany recovery phrase | too small | x Error 403 `withdrawal_not_worth`\nany recovery phrase | big enough | ✓ withdrawal generated\n", + "type": "array", + "minItems": 15, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + }, + "x-transactionWithdrawalRequestSelf": { + "type": "string", + "enum": [ + "self" + ], + "description": "When provided, instruments the server to automatically withdraw rewards from the source wallet when they are deemed\nsufficient (i.e. they contribute to the balance for at least as much as they cost).\n\nAs a consequence, the resulting transaction may or may not have a withdrawal object. Summarizing:\n\nwithdrawal field | reward balance | result\n--- | --- | ---\n`null` | too small | ✓ no withdrawals generated\n`null` | big enough | ✓ no withdrawals generated\n`\"self\"` | too small | ✓ no withdrawals generated\n`\"self\"` | big enough | ✓ withdrawal generated\n" + }, + "x-transactionWithdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "x-transactionMint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "x-derivationSegment": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + }, + "x-derivationPath": { + "description": "A path for deriving a child key from a parent key.", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + }, + "x-transactionChange": { + "description": "A list of transaction change outputs.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount", + "derivation_path" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "derivation_path": { + "description": "A path for deriving a child key from a parent key.", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + } + } + } + }, + "x-transactionResolvedInputs": { + "description": "A list of transaction inputs", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "id", + "index", + "address", + "amount", + "derivation_path" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "derivation_path": { + "description": "A path for deriving a child key from a parent key.", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "x-signedTransactionBlob": { + "description": "Signed transaction message binary blob.", + "type": "string", + "format": "binary" + }, + "x-transactionStatus": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "x-transactionMetadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + }, + "x-transactionTTL": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "example": 10 + }, + "unit": { + "type": "string", + "enum": [ + "second" + ] + } + }, + "description": "The TTL (time to live) is the time period in which the transaction\nwill be accepted into node mempools.\n\nAfter the TTL has lapsed, the transaction is considered\nexpired. At this point, nodes will give up on broadcasting the\ntransaction, and the wallet will release the funds allocated to\nthe transaction so they can be used for other payments.\n\nThe TTL should be long enough that the transaction has time to be\npropagated through the network and confirmed, but short enough so\nthat - in the event of failures - UTxO are returned to the wallet\nin a timely manner.\n\nThe TTL value is given in seconds. It will be converted to a slot\nnumber internally.\n\nIf the TTL is not provided for a payment, a reasonable default\nvalue will be used.\n" + }, + "x-stakePoolApparentPerformance": { + "description": "Apparent performance of the stake pool over past epochs. This indicator is computed\nusing data available to the server. In particular, the server can't reliably know the\nstake distribution of past epochs without being during those epochs. The performance\nare therefore an average measure that is more accurate for servers that are online\noften.\n\nThe performance is a float with double-precision which is _typically_ within `0` and `1`:\n\n - `0` means that a pool is not performing well.\n - `1` means that a pool is performing _as expected_.\n - above `1` means the pool is performing beyond expectations.\n\nPools that are lucky enough to win most of their slots early in the epoch will tend to look\nlike they're over-performing for a while. Having a wallet regularly connected to the network\nwould harmonize the performance and give better results.\n", + "type": "number", + "minimum": 0, + "example": 0.5053763440860215 + }, + "x-stakePoolMetadata": { + "description": "Information about the stake pool.\n", + "type": "object", + "required": [ + "ticker", + "name", + "homepage" + ], + "additionalProperties": false, + "properties": { + "ticker": { + "type": "string", + "minLength": 3, + "maxLength": 5, + "example": "IOHK" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "description": { + "type": "string", + "maxLength": 255 + }, + "homepage": { + "type": "string", + "format": "uri", + "example": "https://iohk.io" + } + } + }, + "x-stakePoolRetirement": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "description": "The epoch in which a stake pool retires.\n\nMay be omitted if the wallet hasn't yet found a retirement certificate\nfor this stake pool.\n" + }, + "x-stakePoolPledge": { + "description": "Minimal stake amount that a stake pool is willing to honor.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "x-stakePoolCost": { + "description": "Estimated cost set by the pool operator when registering his pool.\nThis fixed cost is taken from each reward earned by the pool before splitting rewards between stakeholders.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "x-stakePoolMargin": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "Variable margin on the total reward given to an operator before splitting rewards between stakeholders.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n" + }, + "x-stakePoolSaturation": { + "type": "number", + "minimum": 0, + "description": "Saturation-level of the pool based on the desired number of pools aimed by the network.\nA value above `1` indicates that the pool is saturated.\n\nThe `non_myopic_member_rewards` take oversaturation into account, as specified by the [specs](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec).\n\nThe saturation is based on the live `relative_stake`. The saturation at the end of epoch e,\nwill affect the rewards paid out at the end of epoch e+3.\n", + "example": 0.74 + }, + "x-non-myopic-member-rewards": { + "description": "The rewards the wallet can expect to receive at the end of an epoch, in the long term, if delegating to\nthis pool.\n\nFor more details, see the\n[Design Specification for Delegation and Incentives in Cardano](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec)\ndocument.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "x-stakePoolMetrics": { + "type": "object", + "required": [ + "relative_stake", + "non_myopic_member_rewards", + "produced_blocks", + "saturation" + ], + "properties": { + "non_myopic_member_rewards": { + "description": "The rewards the wallet can expect to receive at the end of an epoch, in the long term, if delegating to\nthis pool.\n\nFor more details, see the\n[Design Specification for Delegation and Incentives in Cardano](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec)\ndocument.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "relative_stake": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "The live pool stake relative to the *total* stake.\n\nFor more details, see the section \"Relative Stake: Active vs Total\" in\n[Design Specification for Delegation and Incentives in Cardano](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec).\n" + }, + "saturation": { + "type": "number", + "minimum": 0, + "description": "Saturation-level of the pool based on the desired number of pools aimed by the network.\nA value above `1` indicates that the pool is saturated.\n\nThe `non_myopic_member_rewards` take oversaturation into account, as specified by the [specs](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec).\n\nThe saturation is based on the live `relative_stake`. The saturation at the end of epoch e,\nwill affect the rewards paid out at the end of epoch e+3.\n", + "example": 0.74 + }, + "produced_blocks": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "Number of blocks produced by a given stake pool in its lifetime." + } + } + }, + "x-stakePoolFlag": { + "type": "string", + "enum": [ + "delisted" + ] + }, + "x-stakePoolFlags": { + "type": "array", + "description": "Various flags applicable to stake pools. Possible flags:\n\n| flag | description |\n| --- | --- |\n| delisted | The pool is marked as delisted on a configured SMASH server; metadata for this pool have therefore been dropped. |\n", + "items": { + "type": "string", + "enum": [ + "delisted" + ] + } + }, + "x-networkInformationSyncProgress": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Estimated synchronization progress of the node with the underlying network. Note that this may\nchange quite arbitrarily as the node may switch to shorter or longer chain forks.\n" + }, + "x-networkClockSyncProgress": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "unavailable", + "pending", + "available" + ] + }, + "offset": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "microsecond" + ] + } + }, + "description": "\nif: status == available\n
\n" + } + }, + "example": { + "status": "pending" + }, + "description": "The status progress of syncing local ntp client aiming to get ntp offset.\n" + }, + "x-networkInformationNtpStatus": { + "type": "object", + "description": "[Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) information of the server.\n\n**Important:** This piece of information only makes sense when the server runs on the same host machine as the node.\n", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "available", + "unavailable", + "pending" + ] + }, + "offset": { + "type": "object", + "description": "\nif: status == available\n
\nDrift offset of the local clock.\n", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "example": 14 + }, + "unit": { + "type": "string", + "enum": [ + "microsecond" + ] + } + } + } + } + }, + "x-networkInformationNodeTip": { + "description": "Underlying node's tip", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "x-networkInformationProtocolUpdate": { + "type": "string", + "description": "Whether protocol updates have been submitted and accepted by the network.\n", + "enum": [ + "up_to_date", + "update_available" + ] + }, + "x-delegationStatus": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "x-delegationTarget": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "x-addressIndex": { + "type": "number", + "minimum": 0, + "maximum": 4294967295, + "description": "An address derivation index.\n" + }, + "x-gCStatus :": null, + "x-deposits": { + "description": "A list of deposits associated with a transaction.", + "type": "array", + "minItems": 0, + "items": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + }, + "components": { + "schemas": { + "ApiAddress": { + "type": "object", + "required": [ + "id", + "state" + ], + "properties": { + "id": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "state": { + "type": "string", + "enum": [ + "used", + "unused" + ] + } + } + }, + "ApiAddressInspect": { + "type": "object", + "required": [ + "address_style", + "stake_reference" + ], + "properties": { + "address_style": { + "type": "string", + "enum": [ + "Shelley", + "Icarus", + "Byron" + ] + }, + "stake_reference": { + "type": "string", + "enum": [ + "none", + "by value", + "by pointer" + ] + }, + "network_tag": { + "description": "Can be null for 'Icarus' and 'Byron' styles.", + "type": "integer", + "minimum": 0 + }, + "spending_key_hash": { + "type": "string", + "format": "base16", + "minLength": 56, + "maxLength": 56 + }, + "stake_key_hash": { + "type": "string", + "format": "base16", + "minLength": 56, + "maxLength": 56 + }, + "script_hash": { + "type": "string", + "format": "base16", + "minLength": 64, + "maxLength": 64 + }, + "pointer": { + "type": "object", + "additionalProperties": false, + "required": [ + "slot_num", + "transaction_index", + "output_index" + ], + "properties": { + "slot_num": { + "type": "integer", + "minimum": 0 + }, + "transaction_index": { + "type": "integer", + "minimum": 0 + }, + "output_index": { + "type": "integer", + "minimum": 0 + } + } + }, + "address_root": { + "description": "Only for 'Icarus' and 'Byron' styles.", + "type": "string", + "format": "base16" + }, + "derivation_path": { + "description": "Only for 'Byron' style.", + "type": "string", + "format": "base16" + } + } + }, + "ApiNetworkTip": { + "description": "The time slot corresponding the network tip.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "ApiEra": { + "type": "string", + "enum": [ + "byron", + "shelley", + "allegra", + "mary" + ] + }, + "ApiNetworkInformation": { + "type": "object", + "required": [ + "sync_progress", + "node_tip", + "node_era" + ], + "properties": { + "sync_progress": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Estimated synchronization progress of the node with the underlying network. Note that this may\nchange quite arbitrarily as the node may switch to shorter or longer chain forks.\n" + }, + "node_tip": { + "description": "Underlying node's tip", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "network_tip": { + "description": "The time slot corresponding the network tip.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "next_epoch": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "node_era": { + "type": "string", + "enum": [ + "byron", + "shelley", + "allegra", + "mary" + ] + } + } + }, + "ApiNetworkClock": { + "type": "object", + "description": "[Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) information of the server.\n\n**Important:** This piece of information only makes sense when the server runs on the same host machine as the node.\n", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "available", + "unavailable", + "pending" + ] + }, + "offset": { + "type": "object", + "description": "\nif: status == available\n
\nDrift offset of the local clock.\n", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "example": 14 + }, + "unit": { + "type": "string", + "enum": [ + "microsecond" + ] + } + } + } + } + }, + "nullableEpochInfo": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "ApiEraInfo": { + "type": "object", + "properties": { + "byron": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "shelley": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "allegra": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "mary": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + } + }, + "description": "\nIf and when each era started or will start.\n\nThe object is keyed by era names. The values either describe the epoch boundary\nwhen the era starts (can be in the future or in the past), or are null if not yet\nconfirmed on-chain.\n\nIf you need to know the current era, see the `node_era` field of\n`GET /network/information`.\n\n> Due to complications with our current tooling, we cannot mark the era names\n> as required, but the keys are in fact always present.\n" + }, + "ApiNetworkParameters": { + "type": "object", + "required": [ + "genesis_block_hash", + "blockchain_start_time", + "slot_length", + "epoch_length", + "security_parameter", + "active_slot_coefficient", + "decentralization_level", + "desired_pool_number", + "minimum_utxo_value", + "eras" + ], + "properties": { + "genesis_block_hash": { + "description": "The hash of genesis block", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "3c07030e36bfffe67e2e2ec09e5293d384637cd2f004356ef320f3fe6c52041a" + }, + "blockchain_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "slot_length": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "example": 10 + }, + "unit": { + "type": "string", + "enum": [ + "second" + ] + } + } + }, + "epoch_length": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000 + }, + "unit": { + "type": "string", + "enum": [ + "slot" + ] + } + } + }, + "security_parameter": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + }, + "active_slot_coefficient": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + } + }, + "decentralization_level": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + } + }, + "desired_pool_number": { + "type": "integer", + "minimum": 0, + "example": 100 + }, + "minimum_utxo_value": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "eras": { + "type": "object", + "properties": { + "byron": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "shelley": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "allegra": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "mary": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + } + }, + "description": "\nIf and when each era started or will start.\n\nThe object is keyed by era names. The values either describe the epoch boundary\nwhen the era starts (can be in the future or in the past), or are null if not yet\nconfirmed on-chain.\n\nIf you need to know the current era, see the `node_era` field of\n`GET /network/information`.\n\n> Due to complications with our current tooling, we cannot mark the era names\n> as required, but the keys are in fact always present.\n" + } + } + }, + "ApiSelectCoinsPayments": { + "type": "object", + "required": [ + "payments" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + } + } + }, + "ApiSelectCoinsAction": { + "type": "object", + "required": [ + "delegation_action" + ], + "properties": { + "delegation_action": { + "description": "A delegation action.\n\nPool id is only required for \"join\".\n", + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "type": "string", + "enum": [ + "quit", + "join" + ] + }, + "pool": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + } + } + } + } + }, + "ApiSelectCoinsData": { + "type": "object", + "oneOf": [ + { + "type": "object", + "required": [ + "payments" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "delegation_action" + ], + "properties": { + "delegation_action": { + "description": "A delegation action.\n\nPool id is only required for \"join\".\n", + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "type": "string", + "enum": [ + "quit", + "join" + ] + }, + "pool": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + } + } + } + } + } + ] + }, + "ApiByronSelectCoinsData": { + "type": "object", + "required": [ + "payments" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + } + } + }, + "ApiCoinSelection": { + "type": "object", + "required": [ + "inputs", + "outputs", + "change" + ], + "properties": { + "inputs": { + "description": "A list of transaction inputs", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "id", + "index", + "address", + "amount", + "derivation_path" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "derivation_path": { + "description": "A path for deriving a child key from a parent key.", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "change": { + "description": "A list of transaction change outputs.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount", + "derivation_path" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "derivation_path": { + "description": "A path for deriving a child key from a parent key.", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + } + } + } + }, + "certificates": { + "type": "array", + "items": { + "description": "A delegation certificate\n\nOnly for 'join_pool' the 'pool' property is required.\n", + "type": "object", + "required": [ + "certificate_type", + "reward_account_path" + ], + "properties": { + "certificate_type": { + "type": "string", + "enum": [ + "join_pool", + "quit_pool", + "register_reward_account" + ] + }, + "pool": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + }, + "reward_account_path": { + "type": "array", + "minItems": 5, + "maxItems": 5, + "items": { + "type": "string" + } + } + } + } + }, + "deposits": { + "description": "A list of deposits associated with a transaction.", + "type": "array", + "minItems": 0, + "items": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "ApiGCStatus": { + "type": "object", + "description": "Gives an indication if metadata GC checking for delisted pools\nhas run and if so, when.\n\nPossible values are:\n - not_applicable -> we're currently not querying a SMASH server for metadata\n - not_started -> the GC hasn't started yet, try again in a short while\n - restarting -> the GC thread is currently restarting, try again in short while\n - has_run -> the GC has run successfully\n\nWhen 'status' is 'restarting' or 'has_run' then the field 'last_run'\nis set to the last GC time in UTC.\n", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_applicable", + "not_started", + "restarting", + "has_run" + ] + }, + "last_run": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "ApiMaintenanceActionPostData": { + "type": "object", + "required": [ + "maintenance_action" + ], + "description": "The maintenance action to carry out, current values are\n - gc_stake_pools -> trigger looking up delisted pools from the remote SMASH server\n", + "properties": { + "maintenance_action": { + "type": "string", + "enum": [ + "gc_stake_pools" + ] + } + } + }, + "ApiMaintenanceAction": { + "type": "object", + "required": [ + "gc_stake_pools" + ], + "properties": { + "gc_stake_pools": { + "type": "object", + "description": "Gives an indication if metadata GC checking for delisted pools\nhas run and if so, when.\n\nPossible values are:\n - not_applicable -> we're currently not querying a SMASH server for metadata\n - not_started -> the GC hasn't started yet, try again in a short while\n - restarting -> the GC thread is currently restarting, try again in short while\n - has_run -> the GC has run successfully\n\nWhen 'status' is 'restarting' or 'has_run' then the field 'last_run'\nis set to the last GC time in UTC.\n", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_applicable", + "not_started", + "restarting", + "has_run" + ] + }, + "last_run": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + } + }, + "ApiStakePool": { + "type": "object", + "required": [ + "id", + "metrics", + "cost", + "margin", + "pledge", + "flags" + ], + "properties": { + "id": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + }, + "metrics": { + "type": "object", + "required": [ + "relative_stake", + "non_myopic_member_rewards", + "produced_blocks", + "saturation" + ], + "properties": { + "non_myopic_member_rewards": { + "description": "The rewards the wallet can expect to receive at the end of an epoch, in the long term, if delegating to\nthis pool.\n\nFor more details, see the\n[Design Specification for Delegation and Incentives in Cardano](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec)\ndocument.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "relative_stake": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "The live pool stake relative to the *total* stake.\n\nFor more details, see the section \"Relative Stake: Active vs Total\" in\n[Design Specification for Delegation and Incentives in Cardano](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec).\n" + }, + "saturation": { + "type": "number", + "minimum": 0, + "description": "Saturation-level of the pool based on the desired number of pools aimed by the network.\nA value above `1` indicates that the pool is saturated.\n\nThe `non_myopic_member_rewards` take oversaturation into account, as specified by the [specs](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec).\n\nThe saturation is based on the live `relative_stake`. The saturation at the end of epoch e,\nwill affect the rewards paid out at the end of epoch e+3.\n", + "example": 0.74 + }, + "produced_blocks": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "Number of blocks produced by a given stake pool in its lifetime." + } + } + }, + "cost": { + "description": "Estimated cost set by the pool operator when registering his pool.\nThis fixed cost is taken from each reward earned by the pool before splitting rewards between stakeholders.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "margin": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "Variable margin on the total reward given to an operator before splitting rewards between stakeholders.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n" + }, + "pledge": { + "description": "Minimal stake amount that a stake pool is willing to honor.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "metadata": { + "description": "Information about the stake pool.\n", + "type": "object", + "required": [ + "ticker", + "name", + "homepage" + ], + "additionalProperties": false, + "properties": { + "ticker": { + "type": "string", + "minLength": 3, + "maxLength": 5, + "example": "IOHK" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "description": { + "type": "string", + "maxLength": 255 + }, + "homepage": { + "type": "string", + "format": "uri", + "example": "https://iohk.io" + } + } + }, + "retirement": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "description": "The epoch in which a stake pool retires.\n\nMay be omitted if the wallet hasn't yet found a retirement certificate\nfor this stake pool.\n" + }, + "flags": { + "type": "array", + "description": "Various flags applicable to stake pools. Possible flags:\n\n| flag | description |\n| --- | --- |\n| delisted | The pool is marked as delisted on a configured SMASH server; metadata for this pool have therefore been dropped. |\n", + "items": { + "type": "string", + "enum": [ + "delisted" + ] + } + } + } + }, + "ApiFee": { + "type": "object", + "required": [ + "estimated_min", + "estimated_max", + "deposit" + ], + "properties": { + "estimated_min": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "estimated_max": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "ApiPutAddressesData": { + "type": "object", + "required": [ + "addresses" + ], + "properties": { + "addresses": { + "description": "The imported addresses.", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + } + } + } + }, + "ApiVerificationKey": { + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk)|(script_vk))1[0-9a-z]*$" + }, + "ApiTxId": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + } + }, + "ApiTransaction": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + }, + "ApiWalletDelegationNext": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + }, + "ApiWalletDelegation": { + "description": "Delegation settings", + "type": "object", + "required": [ + "active", + "next" + ], + "properties": { + "active": { + "type": "object", + "description": "Currently active delegation status.", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + } + }, + "example": { + "status": "delegating", + "target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + }, + "next": { + "type": "array", + "items": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + } + } + } + }, + "ApiWallet": { + "type": "object", + "required": [ + "id", + "address_pool_gap", + "balance", + "assets", + "delegation", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + }, + "balance": { + "description": "Wallet current Ada balance(s).", + "type": "object", + "required": [ + "available", + "reward", + "total" + ], + "properties": { + "available": { + "description": "Available Ada UTxO balance (funds that can be spent without condition).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "reward": { + "description": "The Ada balance of the reward account for this wallet.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total Ada balance (available balance plus pending change and reward balance).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "assets": { + "description": "Current non-Ada asset holdings of the wallet.\n\nThe amount of assets available to spend may be less than the total\nunspent assets due to transaction change amounts which are yet to\nbe fully confirmed (pending).\n", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available UTxO asset balances (funds that can be spent without\ncondition).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "total": { + "description": "Total asset balances (available balances plus pending change balances).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + }, + "delegation": { + "description": "Delegation settings", + "type": "object", + "required": [ + "active", + "next" + ], + "properties": { + "active": { + "type": "object", + "description": "Currently active delegation status.", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + } + }, + "example": { + "status": "delegating", + "target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + }, + "next": { + "type": "array", + "items": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + } + } + } + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + }, + "ApiByronWallet": { + "type": "object", + "required": [ + "id", + "balance", + "discovery", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "balance": { + "description": "Byron wallet's current balance(s)", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available balance (funds that can be spent)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total balance (available balance plus pending change)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "discovery": { + "description": "Mechanism used for discovering addresses.", + "type": "string", + "enum": [ + "random", + "sequential" + ], + "example": "sequential" + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + }, + "ApiAsset": { + "type": "object", + "required": [ + "policy_id", + "asset_name" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "metadata": { + "title": "Native Assets Metadata", + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and the values will always be empty._\n\nIn the Mary era of Cardano, UTxO may contain native assets. These\nassets are represented on-chain by opaque identifiers which are\nmeaningless to end-users. Therefore, user-facing metadata\nregarding each token must be stored off-chain, in a metadata\nregistry.\n\nToken creators may publish metadata into the registry and client\napplications can consume these metadata for display to end\nusers. This will work in a similar way to how it is done for stake\npool metadata.\n", + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "acronym", + "description" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 50, + "minLength": 1, + "description": "A human-readable name for the asset. Good for display in user interfaces.\n", + "example": "SwaggerCoin" + }, + "acronym": { + "type": "string", + "maxLength": 4, + "minLength": 2, + "description": "A human-readable short name for the asset. Good for display in\nuser interfaces.\n", + "example": "SWAG" + }, + "description": { + "description": "A human-readable description for the asset. Good for display in user interfaces.\n", + "type": "string", + "maxLength": 500 + }, + "unit": { + "type": "object", + "description": "Defines a larger unit for the asset, in the same way Ada is the\nlarger unit of Lovelace.\n", + "required": [ + "decimals", + "name" + ], + "additionalProperties": false, + "properties": { + "decimals": { + "type": "integer", + "description": "The number of digits after the decimal point.\n", + "minimum": 0, + "maximum": 19 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 30, + "description": "The human-readable name for the larger unit of the asset. Used\nfor display in user interfaces.\n" + } + }, + "example": { + "name": "API", + "decimals": 3 + } + }, + "url": { + "description": "A URL to the policy's owner(s) or the entity website in charge of the asset.\n", + "type": "string", + "format": "uri", + "pattern": "^https://.+", + "maxLength": 250 + }, + "logo": { + "description": "A base64-encoded `image/png` for displaying the asset. The end image can be expected\nto be smaller than 64KB.\n", + "type": "string", + "format": "base64", + "maxLength": 87400 + } + } + } + } + }, + "ApiWalletMigrationInfo": { + "type": "object", + "required": [ + "migration_cost", + "leftovers" + ], + "properties": { + "migration_cost": { + "description": "Total amount which will be paid as fees for the migration.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "leftovers": { + "description": "Leftovers dust coins which won't be migrated nor spent as fees.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "ApiWalletPassphrase": { + "type": "object", + "required": [ + "passphrase" + ], + "properties": { + "passphrase": { + "description": "The source Byron wallet's master passphrase.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + } + } + }, + "ApiByronWalletMigrationPostData": { + "type": "object", + "required": [ + "passphrase", + "addresses" + ], + "properties": { + "passphrase": { + "description": "The wallet's master passphrase.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "addresses": { + "description": "The recipient addresses.", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + } + } + } + }, + "ApiShelleyWalletMigrationPostData": { + "type": "object", + "required": [ + "passphrase", + "addresses" + ], + "properties": { + "passphrase": { + "description": "The wallet's master passphrase.", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "addresses": { + "description": "The recipient addresses.", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + } + } + } + }, + "ApiWalletUTxOsStatistics": { + "type": "object", + "required": [ + "total", + "scale", + "distribution" + ], + "properties": { + "total": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "scale": { + "type": "string", + "enum": [ + "log10" + ] + }, + "distribution": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + } + }, + "example": { + "total": { + "quantity": 42000000, + "unit": "lovelace" + }, + "scale": "log10", + "distribution": { + "10": 1, + "100": 0, + "1000": 8, + "10000": 14, + "100000": 32, + "1000000": 3, + "10000000": 0, + "100000000": 12, + "1000000000": 0, + "10000000000": 0, + "100000000000": 0, + "1000000000000": 0, + "10000000000000": 0, + "100000000000000": 0, + "1000000000000000": 0, + "10000000000000000": 0, + "45000000000000000": 0 + } + } + }, + "ApiWalletPostData": { + "type": "object", + "description": "Restore from root private key", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 15, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + }, + "mnemonic_second_factor": { + "description": "An optional passphrase used to encrypt the mnemonic sentence.", + "type": "array", + "minItems": 9, + "maxItems": 12, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become" + ] + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + } + } + }, + "ApiAccountPostData": { + "type": "object", + "description": "Restore from account public key", + "required": [ + "name", + "account_public_key" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "account_public_key": { + "description": "An extended account public key (public key + chain code)", + "type": "string", + "format": "hex", + "minLength": 128, + "maxLength": 128, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db11423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + } + } + }, + "ApiWalletOrAccountPostData": { + "type": "object", + "oneOf": [ + { + "type": "object", + "description": "Restore from root private key", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 15, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + }, + "mnemonic_second_factor": { + "description": "An optional passphrase used to encrypt the mnemonic sentence.", + "type": "array", + "minItems": 9, + "maxItems": 12, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become" + ] + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + } + }, + "title": "shelley" + }, + { + "type": "object", + "description": "Restore from account public key", + "required": [ + "name", + "account_public_key" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "account_public_key": { + "description": "An extended account public key (public key + chain code)", + "type": "string", + "format": "hex", + "minLength": 128, + "maxLength": 128, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db11423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + } + }, + "title": "shelley (from xpub)" + } + ] + }, + "ApiWalletSignData": { + "type": "object", + "required": [ + "passphrase", + "metadata" + ], + "properties": { + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + }, + "ApiScript": { + "oneOf": [ + { + "title": "Key Hash", + "description": "Leaf value for a script designating a required verification key hash.", + "type": "string", + "format": "bech32", + "pattern": "^(script_vkh)1[0-9a-z]*$" + }, + { + "title": "All", + "type": "object", + "required": [ + "all" + ], + "properties": { + "all": { + "description": "Script primitive for which all signing keys corresponding to all list elements' verification keys are expected to make the script valid.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Any", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "description": "Script primitive for which a signing key corresponding to any of the list elements' verification keys is expected to make the script valid. It is equivalent to `some` with `\"at_least\"=1`.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Some", + "type": "object", + "required": [ + "some" + ], + "properties": { + "some": { + "description": "Script primitive for which at least a given number of signing keys corresponding to the list elements' verification keys are expected to make the script valid.", + "type": "object", + "required": [ + "at_least", + "from" + ], + "properties": { + "at_least": { + "type": "integer", + "minimum": 1 + }, + "from": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + } + } + } + ] + }, + "ApiPubKey": { + "description": "A public key (public key without chain code) for credential - 32 bytes", + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk))1[0-9a-z]*$", + "example": [ + "stake_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d", + "addr_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7q3yvuv2" + ] + }, + "AnyAddress": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "A Shelley address representing either enterprise, reward account or delegating address", + "type": "string", + "format": "bech32", + "pattern": "^((addr)|(stake)|(addr_test)|(stake_test))1[0-9a-z]*$", + "example": [ + "stake17xt2z3pa7etaxp7jurdg0m8jhsmtp4r2z56pd3a5q3jhxycdxzmx9", + "addr1wy5np0m5x03tax3kcdh6e2cet98qcfs80wtv4cyvl5taclc6dnd8e", + "addr1xy5np0m5x03tax3kcdh6e2cet98qcfs80wtv4cyvl5tacluk59zrmajh6vra9cx6slk090pkkr2x59f5zmrmgpr9wvfs37hjk4" + ] + } + } + }, + "ApiCredential": { + "nullable": false, + "oneOf": [ + { + "description": "A public key (public key without chain code) for credential - 32 bytes", + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk))1[0-9a-z]*$", + "example": [ + "stake_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d", + "addr_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7q3yvuv2" + ], + "title": "public key" + }, + { + "oneOf": [ + { + "title": "Key Hash", + "description": "Leaf value for a script designating a required verification key hash.", + "type": "string", + "format": "bech32", + "pattern": "^(script_vkh)1[0-9a-z]*$" + }, + { + "title": "All", + "type": "object", + "required": [ + "all" + ], + "properties": { + "all": { + "description": "Script primitive for which all signing keys corresponding to all list elements' verification keys are expected to make the script valid.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Any", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "description": "Script primitive for which a signing key corresponding to any of the list elements' verification keys is expected to make the script valid. It is equivalent to `some` with `\"at_least\"=1`.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Some", + "type": "object", + "required": [ + "some" + ], + "properties": { + "some": { + "description": "Script primitive for which at least a given number of signing keys corresponding to the list elements' verification keys are expected to make the script valid.", + "type": "object", + "required": [ + "at_least", + "from" + ], + "properties": { + "at_least": { + "type": "integer", + "minimum": 1 + }, + "from": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + } + } + } + ], + "title": "script" + } + ], + "example": { + "any": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + { + "all": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms" + ] + }, + { + "any": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + { + "all": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms" + ] + } + ] + }, + { + "some": { + "at_least": 2, + "from": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt38ms" + ] + } + } + ] + } + }, + "ApiAddressData": { + "type": "object", + "nullable": false, + "properties": { + "payment": { + "nullable": false, + "oneOf": [ + { + "description": "A public key (public key without chain code) for credential - 32 bytes", + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk))1[0-9a-z]*$", + "example": [ + "stake_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d", + "addr_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7q3yvuv2" + ], + "title": "public key" + }, + { + "oneOf": [ + { + "title": "Key Hash", + "description": "Leaf value for a script designating a required verification key hash.", + "type": "string", + "format": "bech32", + "pattern": "^(script_vkh)1[0-9a-z]*$" + }, + { + "title": "All", + "type": "object", + "required": [ + "all" + ], + "properties": { + "all": { + "description": "Script primitive for which all signing keys corresponding to all list elements' verification keys are expected to make the script valid.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Any", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "description": "Script primitive for which a signing key corresponding to any of the list elements' verification keys is expected to make the script valid. It is equivalent to `some` with `\"at_least\"=1`.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Some", + "type": "object", + "required": [ + "some" + ], + "properties": { + "some": { + "description": "Script primitive for which at least a given number of signing keys corresponding to the list elements' verification keys are expected to make the script valid.", + "type": "object", + "required": [ + "at_least", + "from" + ], + "properties": { + "at_least": { + "type": "integer", + "minimum": 1 + }, + "from": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + } + } + } + ], + "title": "script" + } + ], + "example": { + "any": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + { + "all": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms" + ] + }, + { + "any": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + { + "all": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms" + ] + } + ] + }, + { + "some": { + "at_least": 2, + "from": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt38ms" + ] + } + } + ] + } + }, + "stake": { + "nullable": false, + "oneOf": [ + { + "description": "A public key (public key without chain code) for credential - 32 bytes", + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk))1[0-9a-z]*$", + "example": [ + "stake_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d", + "addr_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7q3yvuv2" + ], + "title": "public key" + }, + { + "oneOf": [ + { + "title": "Key Hash", + "description": "Leaf value for a script designating a required verification key hash.", + "type": "string", + "format": "bech32", + "pattern": "^(script_vkh)1[0-9a-z]*$" + }, + { + "title": "All", + "type": "object", + "required": [ + "all" + ], + "properties": { + "all": { + "description": "Script primitive for which all signing keys corresponding to all list elements' verification keys are expected to make the script valid.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Any", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "description": "Script primitive for which a signing key corresponding to any of the list elements' verification keys is expected to make the script valid. It is equivalent to `some` with `\"at_least\"=1`.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Some", + "type": "object", + "required": [ + "some" + ], + "properties": { + "some": { + "description": "Script primitive for which at least a given number of signing keys corresponding to the list elements' verification keys are expected to make the script valid.", + "type": "object", + "required": [ + "at_least", + "from" + ], + "properties": { + "at_least": { + "type": "integer", + "minimum": 1 + }, + "from": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + } + } + } + ], + "title": "script" + } + ], + "example": "stake_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d" + } + } + }, + "ApiByronWalletRandomPostData": { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "random" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + } + }, + "ApiByronWalletRandomXPrvPostData": { + "type": "object", + "description": "patate", + "required": [ + "name", + "encrypted_root_private_key", + "passphrase_hash" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "random" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "encrypted_root_private_key": { + "description": "A root private key, encrypted using a given passphrase. The underlying key should contain:\n- A private key\n- A chain code\n- A public key\n", + "type": "string", + "format": "hex", + "minLength": 256, + "maxLength": 256, + "deprecated": true + }, + "passphrase_hash": { + "description": "A hash of master passphrase. The hash should be an output of a Scrypt function with the following parameters:\n- logN = 14\n- r = 8\n- p = 1\n", + "type": "string", + "format": "hex", + "example": "31347c387c317c574342652b796362417576356c2b4258676a344a314c6343675375414c2f5653393661364e576a2b7550766655513d3d7c2f376738486c59723174734e394f6e4e753253302b6a65515a6b5437316b45414941366a515867386539493d", + "deprecated": true + } + } + }, + "ApiByronWalletIcarusPostData": { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "icarus" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + } + }, + "ApiByronWalletTrezorPostData": { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "trezor" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + } + }, + "ApiByronWalletLedgerPostData": { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "ledger" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + } + }, + "ApiWalletPutData": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + } + } + }, + "ApiSettingsPutData": { + "type": "object", + "properties": { + "settings": { + "description": "Settings", + "type": "object", + "required": [ + "pool_metadata_source" + ], + "properties": { + "pool_metadata_source": { + "description": "Select stake pool metadata fetching strategy:\n - `none` - metadata is not fetched at all,\n - `direct` - metadata is fetched directly URLs registered on chain,\n - `uri` - metadata is fetched from an external Stake-Pool Metadata Aggregation Server (SMASH)\n\nAfter update existing metadata will be dropped forcing it to re-sync automatically with the new setting.\n", + "type": "string", + "pattern": "^(none|direct|https?:\\/\\/[a-zA-Z0-9-_~.]+(:[0-9]+)?/?)$", + "example": "https://smash.cardano-mainnet.iohk.io/" + } + } + } + } + }, + "ApiSmashServer": { + "type": "string", + "pattern": "^https?:\\/\\/[a-zA-Z0-9-_~.]+(:[0-9]+)?/?$", + "example": "https://smash.cardano-mainnet.iohk.io/", + "description": "A base SMASH uri without endpoint path." + }, + "ApiHealthCheck": { + "type": "object", + "required": [ + "health" + ], + "properties": { + "health": { + "type": "string", + "enum": [ + "available", + "unavailable", + "unreachable", + "no_smash_configured" + ] + } + }, + "description": "The status of the SMASH server. Possible values are:\n\nhealth | description\n--- | ---\n`\"available\"` | server is awaiting your requests\n`\"unavailable\"` | server is running, but currently unavailable, try again in a short time\n`\"unreachable\"` | server could not be reached or didn't return a health status\n`\"no_smash_configured\"` | SMASH is currently not configured, adjust the Settings first\n" + }, + "ApiWalletPutPassphraseData": { + "type": "object", + "required": [ + "old_passphrase", + "new_passphrase" + ], + "properties": { + "old_passphrase": { + "description": "The current passphrase.", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "new_passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds).", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + } + } + }, + "ApiByronWalletPutPassphraseData": { + "type": "object", + "required": [ + "new_passphrase" + ], + "properties": { + "old_passphrase": { + "description": "The current passphrase if present.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "new_passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds).", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + } + } + }, + "ApiPostTransactionDataByron": { + "type": "object", + "required": [ + "payments", + "passphrase" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "passphrase": { + "description": "The wallet's master passphrase.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + } + } + }, + "ApiPostTransactionData": { + "type": "object", + "required": [ + "payments", + "passphrase" + ], + "properties": { + "passphrase": { + "description": "The wallet's master passphrase.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawal": { + "type": "string", + "enum": [ + "self" + ], + "description": "When provided, instruments the server to automatically withdraw rewards from the source wallet when they are deemed\nsufficient (i.e. they contribute to the balance for at least as much as they cost).\n\nAs a consequence, the resulting transaction may or may not have a withdrawal object. Summarizing:\n\nwithdrawal field | reward balance | result\n--- | --- | ---\n`null` | too small | ✓ no withdrawals generated\n`null` | big enough | ✓ no withdrawals generated\n`\"self\"` | too small | ✓ no withdrawals generated\n`\"self\"` | big enough | ✓ withdrawal generated\n" + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + }, + "time_to_live": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "example": 10 + }, + "unit": { + "type": "string", + "enum": [ + "second" + ] + } + }, + "description": "The TTL (time to live) is the time period in which the transaction\nwill be accepted into node mempools.\n\nAfter the TTL has lapsed, the transaction is considered\nexpired. At this point, nodes will give up on broadcasting the\ntransaction, and the wallet will release the funds allocated to\nthe transaction so they can be used for other payments.\n\nThe TTL should be long enough that the transaction has time to be\npropagated through the network and confirmed, but short enough so\nthat - in the event of failures - UTxO are returned to the wallet\nin a timely manner.\n\nThe TTL value is given in seconds. It will be converted to a slot\nnumber internally.\n\nIf the TTL is not provided for a payment, a reasonable default\nvalue will be used.\n" + } + } + }, + "ApiPostRedemptionData": { + "type": "object", + "required": [ + "payments", + "passphrase", + "withdrawal" + ], + "properties": { + "passphrase": { + "description": "The wallet's master passphrase.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawal": { + "description": "When provided, attempts to withdraw rewards from the default stake address corresponding to the given mnemonic.\n\nShould the rewards be null or too small to be worth withdrawing (i.e. the cost of adding them into the transaction\nis more than their own intrinsic value), the server will reject the request with a `withdrawal_not_worth` error.\n\nwithdrawal field | reward balance | result\n--- | --- | ---\nany recovery phrase | too small | x Error 403 `withdrawal_not_worth`\nany recovery phrase | big enough | ✓ withdrawal generated\n", + "type": "array", + "minItems": 15, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + } + }, + "ApiPostTransactionFeeDataByron": { + "type": "object", + "required": [ + "payments" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + } + } + }, + "ApiPostTransactionFeeData": { + "type": "object", + "required": [ + "payments" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawal": { + "type": "string", + "enum": [ + "self" + ], + "description": "When provided, instruments the server to automatically withdraw rewards from the source wallet when they are deemed\nsufficient (i.e. they contribute to the balance for at least as much as they cost).\n\nAs a consequence, the resulting transaction may or may not have a withdrawal object. Summarizing:\n\nwithdrawal field | reward balance | result\n--- | --- | ---\n`null` | too small | ✓ no withdrawals generated\n`null` | big enough | ✓ no withdrawals generated\n`\"self\"` | too small | ✓ no withdrawals generated\n`\"self\"` | big enough | ✓ withdrawal generated\n" + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + }, + "time_to_live": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "example": 10 + }, + "unit": { + "type": "string", + "enum": [ + "second" + ] + } + }, + "description": "The TTL (time to live) is the time period in which the transaction\nwill be accepted into node mempools.\n\nAfter the TTL has lapsed, the transaction is considered\nexpired. At this point, nodes will give up on broadcasting the\ntransaction, and the wallet will release the funds allocated to\nthe transaction so they can be used for other payments.\n\nThe TTL should be long enough that the transaction has time to be\npropagated through the network and confirmed, but short enough so\nthat - in the event of failures - UTxO are returned to the wallet\nin a timely manner.\n\nThe TTL value is given in seconds. It will be converted to a slot\nnumber internally.\n\nIf the TTL is not provided for a payment, a reasonable default\nvalue will be used.\n" + } + } + }, + "ApiPostRedemptionFeeData": { + "type": "object", + "required": [ + "payments", + "withdrawal" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawal": { + "description": "When provided, attempts to withdraw rewards from the default stake address corresponding to the given mnemonic.\n\nShould the rewards be null or too small to be worth withdrawing (i.e. the cost of adding them into the transaction\nis more than their own intrinsic value), the server will reject the request with a `withdrawal_not_worth` error.\n\nwithdrawal field | reward balance | result\n--- | --- | ---\nany recovery phrase | too small | x Error 403 `withdrawal_not_worth`\nany recovery phrase | big enough | ✓ withdrawal generated\n", + "type": "array", + "minItems": 15, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + } + }, + "ApiPostRandomAddressData": { + "type": "object", + "required": [ + "passphrase" + ], + "properties": { + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "address_index": { + "type": "number", + "minimum": 0, + "maximum": 4294967295, + "description": "An address derivation index.\n" + } + } + }, + "CredentialValue": { + "nullable": false, + "oneOf": [ + { + "description": "A public key (public key without chain code) for credential - 32 bytes", + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk))1[0-9a-z]*$", + "example": [ + "stake_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d", + "addr_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7q3yvuv2" + ], + "title": "public key" + }, + { + "oneOf": [ + { + "title": "Key Hash", + "description": "Leaf value for a script designating a required verification key hash.", + "type": "string", + "format": "bech32", + "pattern": "^(script_vkh)1[0-9a-z]*$" + }, + { + "title": "All", + "type": "object", + "required": [ + "all" + ], + "properties": { + "all": { + "description": "Script primitive for which all signing keys corresponding to all list elements' verification keys are expected to make the script valid.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Any", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "description": "Script primitive for which a signing key corresponding to any of the list elements' verification keys is expected to make the script valid. It is equivalent to `some` with `\"at_least\"=1`.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Some", + "type": "object", + "required": [ + "some" + ], + "properties": { + "some": { + "description": "Script primitive for which at least a given number of signing keys corresponding to the list elements' verification keys are expected to make the script valid.", + "type": "object", + "required": [ + "at_least", + "from" + ], + "properties": { + "at_least": { + "type": "integer", + "minimum": 1 + }, + "from": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + } + } + } + ], + "title": "script" + } + ], + "example": { + "any": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + { + "all": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms" + ] + }, + { + "any": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + { + "all": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms" + ] + } + ] + }, + { + "some": { + "at_least": 2, + "from": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt38ms" + ] + } + } + ] + } + }, + "ScriptValue": { + "oneOf": [ + { + "title": "Key Hash", + "description": "Leaf value for a script designating a required verification key hash.", + "type": "string", + "format": "bech32", + "pattern": "^(script_vkh)1[0-9a-z]*$" + }, + { + "title": "All", + "type": "object", + "required": [ + "all" + ], + "properties": { + "all": { + "description": "Script primitive for which all signing keys corresponding to all list elements' verification keys are expected to make the script valid.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Any", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "description": "Script primitive for which a signing key corresponding to any of the list elements' verification keys is expected to make the script valid. It is equivalent to `some` with `\"at_least\"=1`.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Some", + "type": "object", + "required": [ + "some" + ], + "properties": { + "some": { + "description": "Script primitive for which at least a given number of signing keys corresponding to the list elements' verification keys are expected to make the script valid.", + "type": "object", + "required": [ + "at_least", + "from" + ], + "properties": { + "at_least": { + "type": "integer", + "minimum": 1 + }, + "from": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + } + } + } + ] + }, + "TransactionMetadataValue": { + "oneOf": [ + { + "title": "String", + "type": "object", + "required": [ + "string" + ], + "properties": { + "string": { + "type": "string", + "maxLength": 64 + } + } + }, + { + "title": "Int", + "type": "object", + "required": [ + "int" + ], + "properties": { + "int": { + "type": "integer" + } + } + }, + { + "title": "ByteString", + "type": "object", + "required": [ + "bytes" + ], + "properties": { + "bytes": { + "type": "string", + "pattern": "^[0-9a-fA-F]*$", + "maxLength": 128 + } + } + }, + { + "title": "List", + "type": "object", + "required": [ + "list" + ], + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionMetadataValue" + } + } + } + }, + { + "title": "Map", + "type": "object", + "required": [ + "map" + ], + "properties": { + "map": { + "type": "array", + "items": { + "type": "object", + "properties": { + "k": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "v": { + "$ref": "#/components/schemas/TransactionMetadataValue" + } + } + } + } + } + } + ] + }, + "ApiGetSettings": { + "type": "object", + "required": [ + "pool_metadata_source" + ], + "properties": { + "pool_metadata_source": { + "description": "Pool metadata source. This sets the metadata fetching strategy.\n\nPossible values are\n * none -> no fetching\n * direct -> direct fetching\n * uri -> use SMASH server\n", + "type": "string", + "pattern": "^(none|direct|https?:\\/\\/[a-zA-Z0-9-_~.]+(:[0-9]+)?/?)$", + "example": "https://smash.cardano-mainnet.iohk.io/" + } + } + }, + "SomeByronWalletPostData": { + "oneOf": [ + { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "random" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + }, + "title": "random" + }, + { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "icarus" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + }, + "title": "icarus" + }, + { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "trezor" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + }, + "title": "trezor" + }, + { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "ledger" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + }, + "title": "ledger" + }, + { + "type": "object", + "description": "Restore from account public key", + "required": [ + "name", + "account_public_key" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "account_public_key": { + "description": "An extended account public key (public key + chain code)", + "type": "string", + "format": "hex", + "minLength": 128, + "maxLength": 128, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db11423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + } + }, + "title": "icarus/trezor/ledger (from xpub)" + }, + { + "type": "object", + "description": "patate", + "required": [ + "name", + "encrypted_root_private_key", + "passphrase_hash" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "random" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "encrypted_root_private_key": { + "description": "A root private key, encrypted using a given passphrase. The underlying key should contain:\n- A private key\n- A chain code\n- A public key\n", + "type": "string", + "format": "hex", + "minLength": 256, + "maxLength": 256, + "deprecated": true + }, + "passphrase_hash": { + "description": "A hash of master passphrase. The hash should be an output of a Scrypt function with the following parameters:\n- logN = 14\n- r = 8\n- p = 1\n", + "type": "string", + "format": "hex", + "example": "31347c387c317c574342652b796362417576356c2b4258676a344a314c6343675375414c2f5653393661364e576a2b7550766655513d3d7c2f376738486c59723174734e394f6e4e753253302b6a65515a6b5437316b45414941366a515867386539493d", + "deprecated": true + } + }, + "title": "random (from xprv)" + } + ] + } + } + }, + "x-parametersWalletId": { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + "x-parametersIntendedStakeAmount": { + "in": "query", + "name": "stake", + "required": true, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 45000000000000000 + }, + "description": "The stake the user intends to delegate in Lovelace. Required.\n" + }, + "x-parametersTransactionId": { + "in": "path", + "name": "transactionId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64 + } + }, + "x-parametersStakePoolId": { + "in": "path", + "name": "stakePoolId", + "required": true, + "schema": { + "type": "string", + "format": "hex|bech32" + } + }, + "x-parametersAddressId": { + "in": "path", + "name": "addressId", + "required": true, + "schema": { + "type": "string", + "format": "base58", + "example": "DdzFFzCqrhtCNjPk5Lei7E1FxnoqMoAYtJ8VjAWbFmDb614nNBWBwv3kt6QHJa59cGezzf6piMWsbK7sWRB5sv325QqWdRuusMqqLdMt" + } + }, + "x-parametersRole": { + "in": "path", + "name": "role", + "required": true, + "schema": { + "type": "string", + "enum": [ + "utxo_external", + "utxo_internal", + "mutable_account", + "multisig_script" + ] + } + }, + "x-parametersDerivationSegment": { + "in": "path", + "name": "index", + "required": true, + "schema": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + }, + "x-parametersStartDate": { + "in": "query", + "name": "start", + "description": "An optional start time in ISO 8601 date-and-time format. Basic and\nextended formats are both accepted. Times can be local (with a\ntimezone offset) or UTC.\n\nIf both a start time and an end time are specified, then the start\ntime must not be later than the end time.\n\nExample: `2008-08-08T08:08:08Z`\n", + "schema": { + "type": "string", + "format": "ISO 8601" + } + }, + "x-parametersEndDate": { + "in": "query", + "name": "end", + "description": "An optional end time in ISO 8601 date-and-time format. Basic and\nextended formats are both accepted. Times can be local (with a\ntimezone offset) or UTC.\n\nIf both a start time and an end time are specified, then the start\ntime must not be later than the end time.\n\nExample: `2008-08-08T08:08:08Z`\n", + "schema": { + "type": "string", + "format": "ISO 8601" + } + }, + "x-parametersSortOrder": { + "in": "query", + "name": "order", + "description": "An optional sort order.", + "schema": { + "type": "string", + "enum": [ + "ascending", + "descending" + ], + "default": "descending" + } + }, + "x-parametersAddressState": { + "in": "query", + "name": "state", + "description": "An optional filter on the address state.", + "schema": { + "type": "string", + "enum": [ + "used", + "unused" + ] + } + }, + "x-parametersForceNtpCheck": { + "in": "query", + "name": "forceNtpCheck", + "allowEmptyValue": true, + "description": "NTP checks are cached for short duration to avoid sending too many queries to the central NTP servers. In some cases however, a client may want to force a new check.\n\nWhen this flag is set, the request **will block** until NTP server responds or will timeout after a while without any answer from the NTP server.\n", + "schema": { + "type": "boolean" + } + }, + "x-parametersMinWithdrawal": { + "in": "query", + "name": "minWithdrawal", + "description": "Returns only transactions that have at least one withdrawal above the given amount.\nThis is particularly useful when set to `1` in order to list the withdrawal history of a wallet.\n", + "schema": { + "type": "integer", + "minimum": 1 + } + }, + "x-parametersPolicyId": { + "in": "path", + "name": "policyId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 56, + "minLength": 56 + } + }, + "x-parametersAssetName": { + "in": "path", + "name": "assetName", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 64 + } + }, + "x-responsesErr": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + }, + "x-errNotFound": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "enum": [ + "not_found" + ] + } + }, + "title": "not_found" + }, + "x-errSoftDerivationRequired": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "enum": [ + "soft_derivation_required" + ] + } + }, + "title": "not_found" + }, + "x-errNoSuchWallet": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + }, + "x-errNoSuchTransaction": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given transactionId does not match with any known transactions." + }, + "code": { + "type": "string", + "enum": [ + "no_such_transaction" + ] + } + }, + "title": "no_such_transaction" + }, + "x-errTransactionAlreadyInLedger": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Occurs when attempting to delete a transaction which is neither pending nor expired." + }, + "code": { + "type": "string", + "enum": [ + "transaction_already_in_ledger" + ] + } + }, + "title": "transaction_already_in_ledger" + }, + "x-errWalletAlreadyExists": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a otherwise valid request would yield a wallet that already exists." + }, + "code": { + "type": "string", + "enum": [ + "wallet_already_exists" + ] + } + }, + "title": "wallet_already_exists" + }, + "x-errNoRootKey": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + "x-errWrongEncryptionPassphrase": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + }, + "x-errMalformedTxPayload": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when submitting a malformed serialized transaction." + }, + "code": { + "type": "string", + "enum": [ + "malformed_tx_payload" + ] + } + }, + "title": "malformed_tx_payload" + }, + "x-errKeyNotFoundForAddress": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never happen unless the server screwed up and has lost track of previously known addresses." + }, + "code": { + "type": "string", + "enum": [ + "key_not_found_for_address" + ] + } + }, + "title": "key_not_found_for_address" + }, + "x-errNotEnoughMoney": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's not enough money in the wallet to cover a requested payment." + }, + "code": { + "type": "string", + "enum": [ + "not_enough_money" + ] + } + }, + "title": "not_enough_money" + }, + "x-errTransactionIsTooBig": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the wallet can't cover for all requested outputs without making the transaction too large." + }, + "code": { + "type": "string", + "enum": [ + "transaction_is_too_big" + ] + } + }, + "title": "transaction_is_too_big" + }, + "x-errInputsDepleted": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's enough money to pay for a payment, but not enough UTxO to allow for paying each output independently." + }, + "code": { + "type": "string", + "enum": [ + "inputs_depleted" + ] + } + }, + "title": "inputs_depleted" + }, + "x-errCannotCoverFee": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + "x-errInvalidCoinSelection": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never happen unless the server screwed up with the creation of a coin selection." + }, + "code": { + "type": "string", + "enum": [ + "invalid_coin_selection" + ] + } + }, + "title": "invalid_coin_selection" + }, + "x-errNetworkUnreachable": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the connection with the node is lost or not responding." + }, + "code": { + "type": "string", + "enum": [ + "network_unreachable" + ] + } + }, + "title": "network_unreachable" + }, + "x-errNetworkMisconfigured": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to connect to a wrong network (e.g. testnet instead of mainnet)." + }, + "code": { + "type": "string", + "enum": [ + "network_misconfigured" + ] + } + }, + "title": "network_misconfigured" + }, + "x-errNetworkQueryFailed": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Occurs when a ledger query fails in an unexpected manner." + }, + "code": { + "type": "string", + "enum": [ + "network_query_failed" + ] + } + }, + "title": "network_query_failed" + }, + "x-errCreatedInvalidTransaction": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never happen unless the server screwed up with the creation of transaction." + }, + "code": { + "type": "string", + "enum": [ + "created_invalid_transaction" + ] + } + }, + "title": "created_invalid_transaction" + }, + "x-errRejectedByCoreNode": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never happen unless the server screwed up with the creation of transaction." + }, + "code": { + "type": "string", + "enum": [ + "rejected_by_core_node" + ] + } + }, + "title": "rejected_by_core_node" + }, + "x-errBadRequest": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + }, + "x-errMethodNotAllowed": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when sending a request on a wrong endpoint." + }, + "code": { + "type": "string", + "enum": [ + "method_not_allowed" + ] + } + }, + "title": "method_not_allowed" + }, + "x-errNotAcceptable": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + }, + "x-errUnsupportedMediaType": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + }, + "x-errUnexpectedError": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never occur, unless the server screwed up badly." + }, + "code": { + "type": "string", + "enum": [ + "unexpected_error" + ] + } + }, + "title": "unexpected_error" + }, + "x-errStartTimeLaterThanEndTime": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a provided time-range is unsound." + }, + "code": { + "type": "string", + "enum": [ + "start_time_later_than_end_time" + ] + } + }, + "title": "start_time_later_than_end_time" + }, + "x-errUnableToDetermineCurrentEpoch": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur under rare circumstances if the underlying node isn't enough synced with the network." + }, + "code": { + "type": "string", + "enum": [ + "unable_to_determine_current_epoch" + ] + } + }, + "title": "unable_to_determine_current_epoch" + }, + "x-errNotSynced": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur under rare circumstances if the underlying node isn't enough synced with the network." + }, + "code": { + "type": "string", + "enum": [ + "not_synced" + ] + } + }, + "title": "not_synced" + }, + "x-errNothingToMigrate": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to migrate a wallet that is empty or full of dust." + }, + "code": { + "type": "string", + "enum": [ + "nothing_to_migrate" + ] + } + }, + "title": "nothing_to_migrate" + }, + "x-errNoSuchPool": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given poolId does not match any known pool." + }, + "code": { + "type": "string", + "enum": [ + "no_such_pool" + ] + } + }, + "title": "no_such_pool" + }, + "x-errPoolAlreadyJoined": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given poolId matches the current delegation preferences of the wallet's account." + }, + "code": { + "type": "string", + "enum": [ + "pool_already_joined" + ] + } + }, + "title": "pool_already_joined" + }, + "x-errNotDelegatingTo": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to quit a pool on an account that isn't delegating." + }, + "code": { + "type": "string", + "enum": [ + "not_delegating_to" + ] + } + }, + "title": "not_delegating_to" + }, + "x-errNotImplemented": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when reaching an endpoint under construction." + }, + "code": { + "type": "string", + "enum": [ + "not_implemented" + ] + } + }, + "title": "not_implemented" + }, + "x-errWalletNotResponding": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never occur unless something really wrong happened causing a background worker to die." + }, + "code": { + "type": "string", + "enum": [ + "wallet_not_responding" + ] + } + }, + "title": "wallet_not_responding" + }, + "x-errAddressAlreadyExists": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to import an address that is already known of the wallet's account." + }, + "code": { + "type": "string", + "enum": [ + "address_already_exists" + ] + } + }, + "title": "address_already_exists" + }, + "x-errInvalidWalletType": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to perform an operation not supported by this type of wallet." + }, + "code": { + "type": "string", + "enum": [ + "invalid_wallet_type" + ] + } + }, + "title": "invalid_wallet_type" + }, + "x-errQueryParamMissing": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an endpoint requires the presence of a query parameter that is missing." + }, + "code": { + "type": "string", + "enum": [ + "query_param_missing" + ] + } + }, + "title": "query_param_missing" + }, + "x-errNonNullRewards": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to unregister a stake key that still has rewards attached to it." + }, + "code": { + "type": "string", + "enum": [ + "non_null_rewards" + ] + } + }, + "title": "non_null_rewards" + }, + "x-errUtxoTooSmall": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a requested output is below the minimum utxo value." + }, + "code": { + "type": "string", + "enum": [ + "utxo_too_small" + ] + } + }, + "title": "utxo_too_small" + }, + "x-errMinWithdrawalWrong": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to withdraw less than the minimal UTxO value." + }, + "code": { + "type": "string", + "enum": [ + "min_withdrawal_wrong" + ] + } + }, + "title": "min_withdrawal_wrong" + }, + "x-errAlreadyWithdrawing": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when submitting a withdrawal while another withdrawal is pending." + }, + "code": { + "type": "string", + "enum": [ + "already_withdrawing" + ] + } + }, + "title": "already_withdrawing" + }, + "x-errWithdrawalNotWorth": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when withdrawing an amount would cost more than the withdrawn value." + }, + "code": { + "type": "string", + "enum": [ + "withdrawal_not_worth" + ] + } + }, + "title": "withdrawal_not_worth" + }, + "x-errPastHorizon": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur in rare cases when converting slot to time can't be done, typically near hard-forks." + }, + "code": { + "type": "string", + "enum": [ + "past_horizon" + ] + } + }, + "title": "past_horizon" + }, + "x-errUnableToAssignInputOutput": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never occur unless the server screwed up with a coin selection." + }, + "code": { + "type": "string", + "enum": [ + "unable_to_assign_input_output" + ] + } + }, + "title": "unable_to_assign_input_output" + }, + "x-responsesErr400": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + } + }, + "x-responsesErr403": { + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + } + }, + "x-responsesErr404": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + } + }, + "x-responsesErr406": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + } + }, + "x-responsesErr409": { + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + } + }, + "x-responsesErr410": { + "410": { + "description": "Gone", + "content": { + "application/json": null + }, + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + }, + "x-responsesErr415": { + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + } + }, + "x-responsesErr423": { + "423": { + "description": "Locked", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + } + }, + "x-responsesErr404WalletNotFound": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + } + }, + "x-responsesErr409WalletAlreadyExists": { + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a otherwise valid request would yield a wallet that already exists." + }, + "code": { + "type": "string", + "enum": [ + "wallet_already_exists" + ] + } + }, + "title": "wallet_already_exists" + } + } + } + } + }, + "x-responsesErr415UnsupportedMediaType": { + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + } + }, + "x-responsesListWallets": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "address_pool_gap", + "balance", + "assets", + "delegation", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + }, + "balance": { + "description": "Wallet current Ada balance(s).", + "type": "object", + "required": [ + "available", + "reward", + "total" + ], + "properties": { + "available": { + "description": "Available Ada UTxO balance (funds that can be spent without condition).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "reward": { + "description": "The Ada balance of the reward account for this wallet.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total Ada balance (available balance plus pending change and reward balance).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "assets": { + "description": "Current non-Ada asset holdings of the wallet.\n\nThe amount of assets available to spend may be less than the total\nunspent assets due to transaction change amounts which are yet to\nbe fully confirmed (pending).\n", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available UTxO asset balances (funds that can be spent without\ncondition).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "total": { + "description": "Total asset balances (available balances plus pending change balances).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + }, + "delegation": { + "description": "Delegation settings", + "type": "object", + "required": [ + "active", + "next" + ], + "properties": { + "active": { + "type": "object", + "description": "Currently active delegation status.", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + } + }, + "example": { + "status": "delegating", + "target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + }, + "next": { + "type": "array", + "items": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + } + } + } + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + } + }, + "x-responsesListAssets": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "metadata": { + "title": "Native Assets Metadata", + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and the values will always be empty._\n\nIn the Mary era of Cardano, UTxO may contain native assets. These\nassets are represented on-chain by opaque identifiers which are\nmeaningless to end-users. Therefore, user-facing metadata\nregarding each token must be stored off-chain, in a metadata\nregistry.\n\nToken creators may publish metadata into the registry and client\napplications can consume these metadata for display to end\nusers. This will work in a similar way to how it is done for stake\npool metadata.\n", + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "acronym", + "description" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 50, + "minLength": 1, + "description": "A human-readable name for the asset. Good for display in user interfaces.\n", + "example": "SwaggerCoin" + }, + "acronym": { + "type": "string", + "maxLength": 4, + "minLength": 2, + "description": "A human-readable short name for the asset. Good for display in\nuser interfaces.\n", + "example": "SWAG" + }, + "description": { + "description": "A human-readable description for the asset. Good for display in user interfaces.\n", + "type": "string", + "maxLength": 500 + }, + "unit": { + "type": "object", + "description": "Defines a larger unit for the asset, in the same way Ada is the\nlarger unit of Lovelace.\n", + "required": [ + "decimals", + "name" + ], + "additionalProperties": false, + "properties": { + "decimals": { + "type": "integer", + "description": "The number of digits after the decimal point.\n", + "minimum": 0, + "maximum": 19 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 30, + "description": "The human-readable name for the larger unit of the asset. Used\nfor display in user interfaces.\n" + } + }, + "example": { + "name": "API", + "decimals": 3 + } + }, + "url": { + "description": "A URL to the policy's owner(s) or the entity website in charge of the asset.\n", + "type": "string", + "format": "uri", + "pattern": "^https://.+", + "maxLength": 250 + }, + "logo": { + "description": "A base64-encoded `image/png` for displaying the asset. The end image can be expected\nto be smaller than 64KB.\n", + "type": "string", + "format": "base64", + "maxLength": 87400 + } + } + } + } + } + } + } + } + } + }, + "x-responsesGetAsset": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "policy_id", + "asset_name" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "metadata": { + "title": "Native Assets Metadata", + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and the values will always be empty._\n\nIn the Mary era of Cardano, UTxO may contain native assets. These\nassets are represented on-chain by opaque identifiers which are\nmeaningless to end-users. Therefore, user-facing metadata\nregarding each token must be stored off-chain, in a metadata\nregistry.\n\nToken creators may publish metadata into the registry and client\napplications can consume these metadata for display to end\nusers. This will work in a similar way to how it is done for stake\npool metadata.\n", + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "acronym", + "description" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 50, + "minLength": 1, + "description": "A human-readable name for the asset. Good for display in user interfaces.\n", + "example": "SwaggerCoin" + }, + "acronym": { + "type": "string", + "maxLength": 4, + "minLength": 2, + "description": "A human-readable short name for the asset. Good for display in\nuser interfaces.\n", + "example": "SWAG" + }, + "description": { + "description": "A human-readable description for the asset. Good for display in user interfaces.\n", + "type": "string", + "maxLength": 500 + }, + "unit": { + "type": "object", + "description": "Defines a larger unit for the asset, in the same way Ada is the\nlarger unit of Lovelace.\n", + "required": [ + "decimals", + "name" + ], + "additionalProperties": false, + "properties": { + "decimals": { + "type": "integer", + "description": "The number of digits after the decimal point.\n", + "minimum": 0, + "maximum": 19 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 30, + "description": "The human-readable name for the larger unit of the asset. Used\nfor display in user interfaces.\n" + } + }, + "example": { + "name": "API", + "decimals": 3 + } + }, + "url": { + "description": "A URL to the policy's owner(s) or the entity website in charge of the asset.\n", + "type": "string", + "format": "uri", + "pattern": "^https://.+", + "maxLength": 250 + }, + "logo": { + "description": "A base64-encoded `image/png` for displaying the asset. The end image can be expected\nto be smaller than 64KB.\n", + "type": "string", + "format": "base64", + "maxLength": 87400 + } + } + } + } + } + } + } + } + }, + "x-responsesListByronWallets": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "balance", + "discovery", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "balance": { + "description": "Byron wallet's current balance(s)", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available balance (funds that can be spent)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total balance (available balance plus pending change)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "discovery": { + "description": "Mechanism used for discovering addresses.", + "type": "string", + "enum": [ + "random", + "sequential" + ], + "example": "sequential" + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + } + }, + "x-responsesGetUTxOsStatistics": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "total", + "scale", + "distribution" + ], + "properties": { + "total": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "scale": { + "type": "string", + "enum": [ + "log10" + ] + }, + "distribution": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + } + }, + "example": { + "total": { + "quantity": 42000000, + "unit": "lovelace" + }, + "scale": "log10", + "distribution": { + "10": 1, + "100": 0, + "1000": 8, + "10000": 14, + "100000": 32, + "1000000": 3, + "10000000": 0, + "100000000": 12, + "1000000000": 0, + "10000000000": 0, + "100000000000": 0, + "1000000000000": 0, + "10000000000000": 0, + "100000000000000": 0, + "1000000000000000": 0, + "10000000000000000": 0, + "45000000000000000": 0 + } + } + } + } + } + } + }, + "x-responsesPostWallet": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a otherwise valid request would yield a wallet that already exists." + }, + "code": { + "type": "string", + "enum": [ + "wallet_already_exists" + ] + } + }, + "title": "wallet_already_exists" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "address_pool_gap", + "balance", + "assets", + "delegation", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + }, + "balance": { + "description": "Wallet current Ada balance(s).", + "type": "object", + "required": [ + "available", + "reward", + "total" + ], + "properties": { + "available": { + "description": "Available Ada UTxO balance (funds that can be spent without condition).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "reward": { + "description": "The Ada balance of the reward account for this wallet.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total Ada balance (available balance plus pending change and reward balance).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "assets": { + "description": "Current non-Ada asset holdings of the wallet.\n\nThe amount of assets available to spend may be less than the total\nunspent assets due to transaction change amounts which are yet to\nbe fully confirmed (pending).\n", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available UTxO asset balances (funds that can be spent without\ncondition).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "total": { + "description": "Total asset balances (available balances plus pending change balances).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + }, + "delegation": { + "description": "Delegation settings", + "type": "object", + "required": [ + "active", + "next" + ], + "properties": { + "active": { + "type": "object", + "description": "Currently active delegation status.", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + } + }, + "example": { + "status": "delegating", + "target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + }, + "next": { + "type": "array", + "items": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + } + } + } + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + }, + "x-responsesPostByronWallet": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "balance", + "discovery", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "balance": { + "description": "Byron wallet's current balance(s)", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available balance (funds that can be spent)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total balance (available balance plus pending change)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "discovery": { + "description": "Mechanism used for discovering addresses.", + "type": "string", + "enum": [ + "random", + "sequential" + ], + "example": "sequential" + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + }, + "x-responsesGetWallet": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "address_pool_gap", + "balance", + "assets", + "delegation", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + }, + "balance": { + "description": "Wallet current Ada balance(s).", + "type": "object", + "required": [ + "available", + "reward", + "total" + ], + "properties": { + "available": { + "description": "Available Ada UTxO balance (funds that can be spent without condition).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "reward": { + "description": "The Ada balance of the reward account for this wallet.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total Ada balance (available balance plus pending change and reward balance).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "assets": { + "description": "Current non-Ada asset holdings of the wallet.\n\nThe amount of assets available to spend may be less than the total\nunspent assets due to transaction change amounts which are yet to\nbe fully confirmed (pending).\n", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available UTxO asset balances (funds that can be spent without\ncondition).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "total": { + "description": "Total asset balances (available balances plus pending change balances).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + }, + "delegation": { + "description": "Delegation settings", + "type": "object", + "required": [ + "active", + "next" + ], + "properties": { + "active": { + "type": "object", + "description": "Currently active delegation status.", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + } + }, + "example": { + "status": "delegating", + "target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + }, + "next": { + "type": "array", + "items": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + } + } + } + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + }, + "x-responsesGetByronWallet": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "balance", + "discovery", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "balance": { + "description": "Byron wallet's current balance(s)", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available balance (funds that can be spent)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total balance (available balance plus pending change)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "discovery": { + "description": "Mechanism used for discovering addresses.", + "type": "string", + "enum": [ + "random", + "sequential" + ], + "example": "sequential" + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + }, + "x-responsesGetWalletMigrationInfo": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to migrate a wallet that is empty or full of dust." + }, + "code": { + "type": "string", + "enum": [ + "nothing_to_migrate" + ] + } + }, + "title": "nothing_to_migrate" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "migration_cost", + "leftovers" + ], + "properties": { + "migration_cost": { + "description": "Total amount which will be paid as fees for the migration.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "leftovers": { + "description": "Leftovers dust coins which won't be migrated nor spent as fees.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + } + } + } + }, + "x-responsesMigrateWallet": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to migrate a wallet that is empty or full of dust." + }, + "code": { + "type": "string", + "enum": [ + "nothing_to_migrate" + ] + } + }, + "title": "nothing_to_migrate" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + } + ] + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-responsesDeleteWallet": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "204": { + "description": "No Content" + } + }, + "x-responsesForceResyncWallet": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "204": { + "description": "No Content" + } + }, + "x-responsesPutWallet": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "address_pool_gap", + "balance", + "assets", + "delegation", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + }, + "balance": { + "description": "Wallet current Ada balance(s).", + "type": "object", + "required": [ + "available", + "reward", + "total" + ], + "properties": { + "available": { + "description": "Available Ada UTxO balance (funds that can be spent without condition).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "reward": { + "description": "The Ada balance of the reward account for this wallet.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total Ada balance (available balance plus pending change and reward balance).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "assets": { + "description": "Current non-Ada asset holdings of the wallet.\n\nThe amount of assets available to spend may be less than the total\nunspent assets due to transaction change amounts which are yet to\nbe fully confirmed (pending).\n", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available UTxO asset balances (funds that can be spent without\ncondition).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "total": { + "description": "Total asset balances (available balances plus pending change balances).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + }, + "delegation": { + "description": "Delegation settings", + "type": "object", + "required": [ + "active", + "next" + ], + "properties": { + "active": { + "type": "object", + "description": "Currently active delegation status.", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + } + }, + "example": { + "status": "delegating", + "target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + }, + "next": { + "type": "array", + "items": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + } + } + } + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + }, + "x-responsesPutWalletPassphrase": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + } + ] + } + } + } + }, + "204": { + "description": "No Content" + } + }, + "x-responsesSelectCoins": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when submitting a withdrawal while another withdrawal is pending." + }, + "code": { + "type": "string", + "enum": [ + "already_withdrawing" + ] + } + }, + "title": "already_withdrawing" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a requested output is below the minimum utxo value." + }, + "code": { + "type": "string", + "enum": [ + "utxo_too_small" + ] + } + }, + "title": "utxo_too_small" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's not enough money in the wallet to cover a requested payment." + }, + "code": { + "type": "string", + "enum": [ + "not_enough_money" + ] + } + }, + "title": "not_enough_money" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's enough money to pay for a payment, but not enough UTxO to allow for paying each output independently." + }, + "code": { + "type": "string", + "enum": [ + "inputs_depleted" + ] + } + }, + "title": "inputs_depleted" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never happen unless the server screwed up with the creation of a coin selection." + }, + "code": { + "type": "string", + "enum": [ + "invalid_coin_selection" + ] + } + }, + "title": "invalid_coin_selection" + } + ] + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "inputs", + "outputs", + "change" + ], + "properties": { + "inputs": { + "description": "A list of transaction inputs", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "id", + "index", + "address", + "amount", + "derivation_path" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "derivation_path": { + "description": "A path for deriving a child key from a parent key.", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "change": { + "description": "A list of transaction change outputs.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount", + "derivation_path" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "derivation_path": { + "description": "A path for deriving a child key from a parent key.", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + } + } + } + }, + "certificates": { + "type": "array", + "items": { + "description": "A delegation certificate\n\nOnly for 'join_pool' the 'pool' property is required.\n", + "type": "object", + "required": [ + "certificate_type", + "reward_account_path" + ], + "properties": { + "certificate_type": { + "type": "string", + "enum": [ + "join_pool", + "quit_pool", + "register_reward_account" + ] + }, + "pool": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + }, + "reward_account_path": { + "type": "array", + "minItems": 5, + "maxItems": 5, + "items": { + "type": "string" + } + } + } + } + }, + "deposits": { + "description": "A list of deposits associated with a transaction.", + "type": "array", + "minItems": 0, + "items": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + } + } + } + } + }, + "x-responsesDeleteTransaction": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Occurs when attempting to delete a transaction which is neither pending nor expired." + }, + "code": { + "type": "string", + "enum": [ + "transaction_already_in_ledger" + ] + } + }, + "title": "transaction_already_in_ledger" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given transactionId does not match with any known transactions." + }, + "code": { + "type": "string", + "enum": [ + "no_such_transaction" + ] + } + }, + "title": "no_such_transaction" + } + ] + } + } + } + }, + "204": { + "description": "No Content" + } + }, + "x-responsesListTransactions": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to withdraw less than the minimal UTxO value." + }, + "code": { + "type": "string", + "enum": [ + "min_withdrawal_wrong" + ] + } + }, + "title": "min_withdrawal_wrong" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a provided time-range is unsound." + }, + "code": { + "type": "string", + "enum": [ + "start_time_later_than_end_time" + ] + } + }, + "title": "start_time_later_than_end_time" + } + ] + } + } + } + }, + "200": { + "description": "Ok", + "headers": { + "Content-Range": { + "schema": { + "type": "string", + "format": "inserted-at {range-start}-{range-end}/{total}" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-responsesGetTransaction": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given transactionId does not match with any known transactions." + }, + "code": { + "type": "string", + "enum": [ + "no_such_transaction" + ] + } + }, + "title": "no_such_transaction" + } + ] + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + }, + "x-responsesPostTransaction": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + ] + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to perform an operation not supported by this type of wallet." + }, + "code": { + "type": "string", + "enum": [ + "invalid_wallet_type" + ] + } + }, + "title": "invalid_wallet_type" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when submitting a withdrawal while another withdrawal is pending." + }, + "code": { + "type": "string", + "enum": [ + "already_withdrawing" + ] + } + }, + "title": "already_withdrawing" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a requested output is below the minimum utxo value." + }, + "code": { + "type": "string", + "enum": [ + "utxo_too_small" + ] + } + }, + "title": "utxo_too_small" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's not enough money in the wallet to cover a requested payment." + }, + "code": { + "type": "string", + "enum": [ + "not_enough_money" + ] + } + }, + "title": "not_enough_money" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the wallet can't cover for all requested outputs without making the transaction too large." + }, + "code": { + "type": "string", + "enum": [ + "transaction_is_too_big" + ] + } + }, + "title": "transaction_is_too_big" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + } + ] + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + }, + "x-responsesPostExternalTransaction": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + } + } + } + } + } + }, + "x-responsesPostAnyAddress": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "A Shelley address representing either enterprise, reward account or delegating address", + "type": "string", + "format": "bech32", + "pattern": "^((addr)|(stake)|(addr_test)|(stake_test))1[0-9a-z]*$", + "example": [ + "stake17xt2z3pa7etaxp7jurdg0m8jhsmtp4r2z56pd3a5q3jhxycdxzmx9", + "addr1wy5np0m5x03tax3kcdh6e2cet98qcfs80wtv4cyvl5taclc6dnd8e", + "addr1xy5np0m5x03tax3kcdh6e2cet98qcfs80wtv4cyvl5tacluk59zrmajh6vra9cx6slk090pkkr2x59f5zmrmgpr9wvfs37hjk4" + ] + } + } + } + } + } + } + }, + "x-responsesPostTransactionFee": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + ] + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to perform an operation not supported by this type of wallet." + }, + "code": { + "type": "string", + "enum": [ + "invalid_wallet_type" + ] + } + }, + "title": "invalid_wallet_type" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when submitting a withdrawal while another withdrawal is pending." + }, + "code": { + "type": "string", + "enum": [ + "already_withdrawing" + ] + } + }, + "title": "already_withdrawing" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a requested output is below the minimum utxo value." + }, + "code": { + "type": "string", + "enum": [ + "utxo_too_small" + ] + } + }, + "title": "utxo_too_small" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's not enough money in the wallet to cover a requested payment." + }, + "code": { + "type": "string", + "enum": [ + "not_enough_money" + ] + } + }, + "title": "not_enough_money" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's enough money to pay for a payment, but not enough UTxO to allow for paying each output independently." + }, + "code": { + "type": "string", + "enum": [ + "inputs_depleted" + ] + } + }, + "title": "inputs_depleted" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never happen unless the server screwed up with the creation of a coin selection." + }, + "code": { + "type": "string", + "enum": [ + "invalid_coin_selection" + ] + } + }, + "title": "invalid_coin_selection" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the wallet can't cover for all requested outputs without making the transaction too large." + }, + "code": { + "type": "string", + "enum": [ + "transaction_is_too_big" + ] + } + }, + "title": "transaction_is_too_big" + } + ] + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "estimated_min", + "estimated_max", + "deposit" + ], + "properties": { + "estimated_min": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "estimated_max": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + } + } + } + }, + "x-responsesGetDelegationFee": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "estimated_min", + "estimated_max", + "deposit" + ], + "properties": { + "estimated_min": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "estimated_max": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + } + } + } + }, + "x-responsesListAddresses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "state" + ], + "properties": { + "id": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "state": { + "type": "string", + "enum": [ + "used", + "unused" + ] + } + } + } + } + } + } + } + }, + "x-responsesGetKey": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk)|(script_vk))1[0-9a-z]*$" + } + } + } + } + }, + "x-responsesListStakePools": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an endpoint requires the presence of a query parameter that is missing." + }, + "code": { + "type": "string", + "enum": [ + "query_param_missing" + ] + } + }, + "title": "query_param_missing" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "metrics", + "cost", + "margin", + "pledge", + "flags" + ], + "properties": { + "id": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + }, + "metrics": { + "type": "object", + "required": [ + "relative_stake", + "non_myopic_member_rewards", + "produced_blocks", + "saturation" + ], + "properties": { + "non_myopic_member_rewards": { + "description": "The rewards the wallet can expect to receive at the end of an epoch, in the long term, if delegating to\nthis pool.\n\nFor more details, see the\n[Design Specification for Delegation and Incentives in Cardano](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec)\ndocument.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "relative_stake": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "The live pool stake relative to the *total* stake.\n\nFor more details, see the section \"Relative Stake: Active vs Total\" in\n[Design Specification for Delegation and Incentives in Cardano](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec).\n" + }, + "saturation": { + "type": "number", + "minimum": 0, + "description": "Saturation-level of the pool based on the desired number of pools aimed by the network.\nA value above `1` indicates that the pool is saturated.\n\nThe `non_myopic_member_rewards` take oversaturation into account, as specified by the [specs](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec).\n\nThe saturation is based on the live `relative_stake`. The saturation at the end of epoch e,\nwill affect the rewards paid out at the end of epoch e+3.\n", + "example": 0.74 + }, + "produced_blocks": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "Number of blocks produced by a given stake pool in its lifetime." + } + } + }, + "cost": { + "description": "Estimated cost set by the pool operator when registering his pool.\nThis fixed cost is taken from each reward earned by the pool before splitting rewards between stakeholders.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "margin": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "Variable margin on the total reward given to an operator before splitting rewards between stakeholders.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n" + }, + "pledge": { + "description": "Minimal stake amount that a stake pool is willing to honor.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "metadata": { + "description": "Information about the stake pool.\n", + "type": "object", + "required": [ + "ticker", + "name", + "homepage" + ], + "additionalProperties": false, + "properties": { + "ticker": { + "type": "string", + "minLength": 3, + "maxLength": 5, + "example": "IOHK" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "description": { + "type": "string", + "maxLength": 255 + }, + "homepage": { + "type": "string", + "format": "uri", + "example": "https://iohk.io" + } + } + }, + "retirement": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "description": "The epoch in which a stake pool retires.\n\nMay be omitted if the wallet hasn't yet found a retirement certificate\nfor this stake pool.\n" + }, + "flags": { + "type": "array", + "description": "Various flags applicable to stake pools. Possible flags:\n\n| flag | description |\n| --- | --- |\n| delisted | The pool is marked as delisted on a configured SMASH server; metadata for this pool have therefore been dropped. |\n", + "items": { + "type": "string", + "enum": [ + "delisted" + ] + } + } + } + } + } + } + } + } + }, + "x-responsesPostMaintenanceAction": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "204": { + "description": "No Content" + } + }, + "x-responsesGetMaintenanceAction": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "gc_stake_pools" + ], + "properties": { + "gc_stake_pools": { + "type": "object", + "description": "Gives an indication if metadata GC checking for delisted pools\nhas run and if so, when.\n\nPossible values are:\n - not_applicable -> we're currently not querying a SMASH server for metadata\n - not_started -> the GC hasn't started yet, try again in a short while\n - restarting -> the GC thread is currently restarting, try again in short while\n - has_run -> the GC has run successfully\n\nWhen 'status' is 'restarting' or 'has_run' then the field 'last_run'\nis set to the last GC time in UTC.\n", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_applicable", + "not_started", + "restarting", + "has_run" + ] + }, + "last_run": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + } + } + } + } + } + }, + "x-responsesJoinStakePool": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given poolId matches the current delegation preferences of the wallet's account." + }, + "code": { + "type": "string", + "enum": [ + "pool_already_joined" + ] + } + }, + "title": "pool_already_joined" + } + ] + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given poolId does not match any known pool." + }, + "code": { + "type": "string", + "enum": [ + "no_such_pool" + ] + } + }, + "title": "no_such_pool" + } + ] + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + }, + "x-responsesQuitStakePool": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to quit a pool on an account that isn't delegating." + }, + "code": { + "type": "string", + "enum": [ + "not_delegating_to" + ] + } + }, + "title": "not_delegating_to" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to unregister a stake key that still has rewards attached to it." + }, + "code": { + "type": "string", + "enum": [ + "non_null_rewards" + ] + } + }, + "title": "non_null_rewards" + } + ] + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + }, + "x-responsesGetNetworkInformation": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "sync_progress", + "node_tip", + "node_era" + ], + "properties": { + "sync_progress": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Estimated synchronization progress of the node with the underlying network. Note that this may\nchange quite arbitrarily as the node may switch to shorter or longer chain forks.\n" + }, + "node_tip": { + "description": "Underlying node's tip", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "network_tip": { + "description": "The time slot corresponding the network tip.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "next_epoch": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "node_era": { + "type": "string", + "enum": [ + "byron", + "shelley", + "allegra", + "mary" + ] + } + } + } + } + } + } + }, + "x-responsesGetNetworkClock": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "[Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) information of the server.\n\n**Important:** This piece of information only makes sense when the server runs on the same host machine as the node.\n", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "available", + "unavailable", + "pending" + ] + }, + "offset": { + "type": "object", + "description": "\nif: status == available\n
\nDrift offset of the local clock.\n", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "example": 14 + }, + "unit": { + "type": "string", + "enum": [ + "microsecond" + ] + } + } + } + } + } + } + } + } + }, + "x-responsesGetNetworkParameters": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "genesis_block_hash", + "blockchain_start_time", + "slot_length", + "epoch_length", + "security_parameter", + "active_slot_coefficient", + "decentralization_level", + "desired_pool_number", + "minimum_utxo_value", + "eras" + ], + "properties": { + "genesis_block_hash": { + "description": "The hash of genesis block", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "3c07030e36bfffe67e2e2ec09e5293d384637cd2f004356ef320f3fe6c52041a" + }, + "blockchain_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "slot_length": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "example": 10 + }, + "unit": { + "type": "string", + "enum": [ + "second" + ] + } + } + }, + "epoch_length": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000 + }, + "unit": { + "type": "string", + "enum": [ + "slot" + ] + } + } + }, + "security_parameter": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + }, + "active_slot_coefficient": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + } + }, + "decentralization_level": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + } + }, + "desired_pool_number": { + "type": "integer", + "minimum": 0, + "example": 100 + }, + "minimum_utxo_value": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "eras": { + "type": "object", + "properties": { + "byron": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "shelley": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "allegra": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "mary": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + } + }, + "description": "\nIf and when each era started or will start.\n\nThe object is keyed by era names. The values either describe the epoch boundary\nwhen the era starts (can be in the future or in the past), or are null if not yet\nconfirmed on-chain.\n\nIf you need to know the current era, see the `node_era` field of\n`GET /network/information`.\n\n> Due to complications with our current tooling, we cannot mark the era names\n> as required, but the keys are in fact always present.\n" + } + } + } + } + } + } + }, + "x-responsesPostRandomAddress": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "state" + ], + "properties": { + "id": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "state": { + "type": "string", + "enum": [ + "used", + "unused" + ] + } + } + } + } + } + } + }, + "x-responsesPutRandomAddress": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "204": { + "description": "No Content" + } + }, + "x-responsesPutRandomAddresses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "204": { + "description": "No Content" + } + }, + "x-responsesInspectAddress": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "address_style", + "stake_reference" + ], + "properties": { + "address_style": { + "type": "string", + "enum": [ + "Shelley", + "Icarus", + "Byron" + ] + }, + "stake_reference": { + "type": "string", + "enum": [ + "none", + "by value", + "by pointer" + ] + }, + "network_tag": { + "description": "Can be null for 'Icarus' and 'Byron' styles.", + "type": "integer", + "minimum": 0 + }, + "spending_key_hash": { + "type": "string", + "format": "base16", + "minLength": 56, + "maxLength": 56 + }, + "stake_key_hash": { + "type": "string", + "format": "base16", + "minLength": 56, + "maxLength": 56 + }, + "script_hash": { + "type": "string", + "format": "base16", + "minLength": 64, + "maxLength": 64 + }, + "pointer": { + "type": "object", + "additionalProperties": false, + "required": [ + "slot_num", + "transaction_index", + "output_index" + ], + "properties": { + "slot_num": { + "type": "integer", + "minimum": 0 + }, + "transaction_index": { + "type": "integer", + "minimum": 0 + }, + "output_index": { + "type": "integer", + "minimum": 0 + } + } + }, + "address_root": { + "description": "Only for 'Icarus' and 'Byron' styles.", + "type": "string", + "format": "base16" + }, + "derivation_path": { + "description": "Only for 'Byron' style.", + "type": "string", + "format": "base16" + } + } + } + } + } + } + }, + "x-responsesPutSettings": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "204": { + "description": "No Content" + } + }, + "x-responsesGetSettings": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "pool_metadata_source" + ], + "properties": { + "pool_metadata_source": { + "description": "Pool metadata source. This sets the metadata fetching strategy.\n\nPossible values are\n * none -> no fetching\n * direct -> direct fetching\n * uri -> use SMASH server\n", + "type": "string", + "pattern": "^(none|direct|https?:\\/\\/[a-zA-Z0-9-_~.]+(:[0-9]+)?/?)$", + "example": "https://smash.cardano-mainnet.iohk.io/" + } + } + } + } + } + } + }, + "x-responsesPostSignatures": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "x-responsesGetSmashHealth": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "health" + ], + "properties": { + "health": { + "type": "string", + "enum": [ + "available", + "unavailable", + "unreachable", + "no_smash_configured" + ] + } + }, + "description": "The status of the SMASH server. Possible values are:\n\nhealth | description\n--- | ---\n`\"available\"` | server is awaiting your requests\n`\"unavailable\"` | server is running, but currently unavailable, try again in a short time\n`\"unreachable\"` | server could not be reached or didn't return a health status\n`\"no_smash_configured\"` | SMASH is currently not configured, adjust the Settings first\n" + } + } + } + } + }, + "x-tagGroups": [ + { + "name": "Shelley (Sequential)", + "tags": [ + "Wallets", + "Assets", + "Addresses", + "Coin Selections", + "Transactions", + "Migrations", + "Stake Pools", + "Keys" + ] + }, + { + "name": "Byron (Random)", + "tags": [ + "Byron Wallets", + "Byron Addresses", + "Byron Coin Selections", + "Byron Transactions", + "Byron Migrations" + ] + }, + { + "name": "Miscellaneous", + "tags": [ + "Utils", + "Network", + "Proxy", + "Settings", + "Experimental" + ] + } + ], + "paths": { + "/wallets/{walletId}/signatures/{role}/{index}": { + "post": { + "operationId": "signMetadata", + "tags": [ + "Experimental" + ], + "summary": "Sign Metadata", + "description": "

status: experimental

\n\n**⚠️ WARNING ⚠️**\n\nThis endpoint is experimental and for internal use in the Catalyst project. This\nfunctionality will be refined in the forthcoming future and the interface is likely\nto change in **NON-BACKWARD COMPATIBLE WAYS**.\n\nNote: Only `Soft` indexes are supported by this endpoint.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "path", + "name": "role", + "required": true, + "schema": { + "type": "string", + "enum": [ + "utxo_external", + "utxo_internal", + "mutable_account", + "multisig_script" + ] + } + }, + { + "in": "path", + "name": "index", + "required": true, + "schema": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "passphrase", + "metadata" + ], + "properties": { + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/wallets": { + "post": { + "operationId": "postWallet", + "tags": [ + "Wallets" + ], + "summary": "Create / Restore", + "description": "

status: stable

\n\nCreate and restore a wallet from a mnemonic sentence or account public key.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "oneOf": [ + { + "type": "object", + "description": "Restore from root private key", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 15, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + }, + "mnemonic_second_factor": { + "description": "An optional passphrase used to encrypt the mnemonic sentence.", + "type": "array", + "minItems": 9, + "maxItems": 12, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become" + ] + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + } + }, + "title": "shelley" + }, + { + "type": "object", + "description": "Restore from account public key", + "required": [ + "name", + "account_public_key" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "account_public_key": { + "description": "An extended account public key (public key + chain code)", + "type": "string", + "format": "hex", + "minLength": 128, + "maxLength": 128, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db11423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + } + }, + "title": "shelley (from xpub)" + } + ] + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a otherwise valid request would yield a wallet that already exists." + }, + "code": { + "type": "string", + "enum": [ + "wallet_already_exists" + ] + } + }, + "title": "wallet_already_exists" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "address_pool_gap", + "balance", + "assets", + "delegation", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + }, + "balance": { + "description": "Wallet current Ada balance(s).", + "type": "object", + "required": [ + "available", + "reward", + "total" + ], + "properties": { + "available": { + "description": "Available Ada UTxO balance (funds that can be spent without condition).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "reward": { + "description": "The Ada balance of the reward account for this wallet.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total Ada balance (available balance plus pending change and reward balance).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "assets": { + "description": "Current non-Ada asset holdings of the wallet.\n\nThe amount of assets available to spend may be less than the total\nunspent assets due to transaction change amounts which are yet to\nbe fully confirmed (pending).\n", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available UTxO asset balances (funds that can be spent without\ncondition).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "total": { + "description": "Total asset balances (available balances plus pending change balances).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + }, + "delegation": { + "description": "Delegation settings", + "type": "object", + "required": [ + "active", + "next" + ], + "properties": { + "active": { + "type": "object", + "description": "Currently active delegation status.", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + } + }, + "example": { + "status": "delegating", + "target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + }, + "next": { + "type": "array", + "items": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + } + } + } + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "listWallets", + "tags": [ + "Wallets" + ], + "summary": "List", + "description": "

status: stable

\n\nReturn a list of known wallets, ordered from oldest to newest.\n", + "responses": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "address_pool_gap", + "balance", + "assets", + "delegation", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + }, + "balance": { + "description": "Wallet current Ada balance(s).", + "type": "object", + "required": [ + "available", + "reward", + "total" + ], + "properties": { + "available": { + "description": "Available Ada UTxO balance (funds that can be spent without condition).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "reward": { + "description": "The Ada balance of the reward account for this wallet.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total Ada balance (available balance plus pending change and reward balance).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "assets": { + "description": "Current non-Ada asset holdings of the wallet.\n\nThe amount of assets available to spend may be less than the total\nunspent assets due to transaction change amounts which are yet to\nbe fully confirmed (pending).\n", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available UTxO asset balances (funds that can be spent without\ncondition).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "total": { + "description": "Total asset balances (available balances plus pending change balances).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + }, + "delegation": { + "description": "Delegation settings", + "type": "object", + "required": [ + "active", + "next" + ], + "properties": { + "active": { + "type": "object", + "description": "Currently active delegation status.", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + } + }, + "example": { + "status": "delegating", + "target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + }, + "next": { + "type": "array", + "items": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + } + } + } + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/wallets/{walletId}/assets": { + "get": { + "operationId": "listAssets", + "tags": [ + "Assets" + ], + "summary": "List Assets", + "description": "

status: under development

\n\nList all assets associated with the wallet, and their metadata\nif known.\n\nAn asset is _associated_ with a wallet if it is involved in a\ntransaction of the wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "responses": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "metadata": { + "title": "Native Assets Metadata", + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and the values will always be empty._\n\nIn the Mary era of Cardano, UTxO may contain native assets. These\nassets are represented on-chain by opaque identifiers which are\nmeaningless to end-users. Therefore, user-facing metadata\nregarding each token must be stored off-chain, in a metadata\nregistry.\n\nToken creators may publish metadata into the registry and client\napplications can consume these metadata for display to end\nusers. This will work in a similar way to how it is done for stake\npool metadata.\n", + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "acronym", + "description" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 50, + "minLength": 1, + "description": "A human-readable name for the asset. Good for display in user interfaces.\n", + "example": "SwaggerCoin" + }, + "acronym": { + "type": "string", + "maxLength": 4, + "minLength": 2, + "description": "A human-readable short name for the asset. Good for display in\nuser interfaces.\n", + "example": "SWAG" + }, + "description": { + "description": "A human-readable description for the asset. Good for display in user interfaces.\n", + "type": "string", + "maxLength": 500 + }, + "unit": { + "type": "object", + "description": "Defines a larger unit for the asset, in the same way Ada is the\nlarger unit of Lovelace.\n", + "required": [ + "decimals", + "name" + ], + "additionalProperties": false, + "properties": { + "decimals": { + "type": "integer", + "description": "The number of digits after the decimal point.\n", + "minimum": 0, + "maximum": 19 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 30, + "description": "The human-readable name for the larger unit of the asset. Used\nfor display in user interfaces.\n" + } + }, + "example": { + "name": "API", + "decimals": 3 + } + }, + "url": { + "description": "A URL to the policy's owner(s) or the entity website in charge of the asset.\n", + "type": "string", + "format": "uri", + "pattern": "^https://.+", + "maxLength": 250 + }, + "logo": { + "description": "A base64-encoded `image/png` for displaying the asset. The end image can be expected\nto be smaller than 64KB.\n", + "type": "string", + "format": "base64", + "maxLength": 87400 + } + } + } + } + } + } + } + } + } + } + } + }, + "/wallets/{walletId}/assets/{policyId}/{assetName}": { + "get": { + "operationId": "getAsset", + "tags": [ + "Assets" + ], + "summary": "Get Asset", + "description": "

status: under development

\n\nFetch a single asset from its `policy_id` and `asset_name`,\nwith its metadata if any.\n\nThe asset must be associated with the wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "path", + "name": "policyId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 56, + "minLength": 56 + } + }, + { + "in": "path", + "name": "assetName", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 64 + } + } + ], + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "policy_id", + "asset_name" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "metadata": { + "title": "Native Assets Metadata", + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and the values will always be empty._\n\nIn the Mary era of Cardano, UTxO may contain native assets. These\nassets are represented on-chain by opaque identifiers which are\nmeaningless to end-users. Therefore, user-facing metadata\nregarding each token must be stored off-chain, in a metadata\nregistry.\n\nToken creators may publish metadata into the registry and client\napplications can consume these metadata for display to end\nusers. This will work in a similar way to how it is done for stake\npool metadata.\n", + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "acronym", + "description" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 50, + "minLength": 1, + "description": "A human-readable name for the asset. Good for display in user interfaces.\n", + "example": "SwaggerCoin" + }, + "acronym": { + "type": "string", + "maxLength": 4, + "minLength": 2, + "description": "A human-readable short name for the asset. Good for display in\nuser interfaces.\n", + "example": "SWAG" + }, + "description": { + "description": "A human-readable description for the asset. Good for display in user interfaces.\n", + "type": "string", + "maxLength": 500 + }, + "unit": { + "type": "object", + "description": "Defines a larger unit for the asset, in the same way Ada is the\nlarger unit of Lovelace.\n", + "required": [ + "decimals", + "name" + ], + "additionalProperties": false, + "properties": { + "decimals": { + "type": "integer", + "description": "The number of digits after the decimal point.\n", + "minimum": 0, + "maximum": 19 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 30, + "description": "The human-readable name for the larger unit of the asset. Used\nfor display in user interfaces.\n" + } + }, + "example": { + "name": "API", + "decimals": 3 + } + }, + "url": { + "description": "A URL to the policy's owner(s) or the entity website in charge of the asset.\n", + "type": "string", + "format": "uri", + "pattern": "^https://.+", + "maxLength": 250 + }, + "logo": { + "description": "A base64-encoded `image/png` for displaying the asset. The end image can be expected\nto be smaller than 64KB.\n", + "type": "string", + "format": "base64", + "maxLength": 87400 + } + } + } + } + } + } + } + } + } + } + }, + "/wallets/{walletId}/assets/{policyId}": { + "get": { + "operationId": "getAssetDefault", + "tags": [ + "Assets" + ], + "summary": "Get Asset (empty name)", + "description": "

status: under development

\n\nFetch the the asset from `policy_id` with an empty name.\n\nThe asset must be associated with the wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "path", + "name": "policyId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 56, + "minLength": 56 + } + } + ], + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "policy_id", + "asset_name" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "metadata": { + "title": "Native Assets Metadata", + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and the values will always be empty._\n\nIn the Mary era of Cardano, UTxO may contain native assets. These\nassets are represented on-chain by opaque identifiers which are\nmeaningless to end-users. Therefore, user-facing metadata\nregarding each token must be stored off-chain, in a metadata\nregistry.\n\nToken creators may publish metadata into the registry and client\napplications can consume these metadata for display to end\nusers. This will work in a similar way to how it is done for stake\npool metadata.\n", + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "acronym", + "description" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 50, + "minLength": 1, + "description": "A human-readable name for the asset. Good for display in user interfaces.\n", + "example": "SwaggerCoin" + }, + "acronym": { + "type": "string", + "maxLength": 4, + "minLength": 2, + "description": "A human-readable short name for the asset. Good for display in\nuser interfaces.\n", + "example": "SWAG" + }, + "description": { + "description": "A human-readable description for the asset. Good for display in user interfaces.\n", + "type": "string", + "maxLength": 500 + }, + "unit": { + "type": "object", + "description": "Defines a larger unit for the asset, in the same way Ada is the\nlarger unit of Lovelace.\n", + "required": [ + "decimals", + "name" + ], + "additionalProperties": false, + "properties": { + "decimals": { + "type": "integer", + "description": "The number of digits after the decimal point.\n", + "minimum": 0, + "maximum": 19 + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 30, + "description": "The human-readable name for the larger unit of the asset. Used\nfor display in user interfaces.\n" + } + }, + "example": { + "name": "API", + "decimals": 3 + } + }, + "url": { + "description": "A URL to the policy's owner(s) or the entity website in charge of the asset.\n", + "type": "string", + "format": "uri", + "pattern": "^https://.+", + "maxLength": 250 + }, + "logo": { + "description": "A base64-encoded `image/png` for displaying the asset. The end image can be expected\nto be smaller than 64KB.\n", + "type": "string", + "format": "base64", + "maxLength": 87400 + } + } + } + } + } + } + } + } + } + } + }, + "/wallets/{walletId}/statistics/utxos": { + "get": { + "operationId": "getUTxOsStatistics", + "tags": [ + "Wallets" + ], + "summary": "UTxO Statistics", + "description": "

status: stable

\n\nReturn the UTxOs distribution across the whole wallet, in the form of a histogram.\n\n```\n │\n 100 ─\n │\n │ ┌───┐\n 10 ─ ┌───┐ │ │ ┌───┐\n │ ┌───┐ │ │ │ │ │ │\n │ │ │ │ │ │ │ ┌───┐ │ │\n 1 ─ ┌───┐ │ │ │ │ │ │ │ │ │ │\n │ │ │ │ │ │ │ │ │ │ │ │ │\n │ │ │ │ │ │ │ │ │ │ ╷ │ │ ╷ │ │ ╷ ╷ │ │\n └─┘ └─│───────│─┘ └─│─┘ └─│─┘ └─│─┘ └─│───────│─┘ └────\n 10μ₳ 100μ₳ 1000μ₳ 0.1₳ 1₳ 10₳ 100₳\n```\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "total", + "scale", + "distribution" + ], + "properties": { + "total": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "scale": { + "type": "string", + "enum": [ + "log10" + ] + }, + "distribution": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + } + }, + "example": { + "total": { + "quantity": 42000000, + "unit": "lovelace" + }, + "scale": "log10", + "distribution": { + "10": 1, + "100": 0, + "1000": 8, + "10000": 14, + "100000": 32, + "1000000": 3, + "10000000": 0, + "100000000": 12, + "1000000000": 0, + "10000000000": 0, + "100000000000": 0, + "1000000000000": 0, + "10000000000000": 0, + "100000000000000": 0, + "1000000000000000": 0, + "10000000000000000": 0, + "45000000000000000": 0 + } + } + } + } + } + } + } + } + }, + "/wallets/{walletId}": { + "get": { + "operationId": "getWallet", + "tags": [ + "Wallets" + ], + "summary": "Get", + "description": "

status: stable

\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "address_pool_gap", + "balance", + "assets", + "delegation", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + }, + "balance": { + "description": "Wallet current Ada balance(s).", + "type": "object", + "required": [ + "available", + "reward", + "total" + ], + "properties": { + "available": { + "description": "Available Ada UTxO balance (funds that can be spent without condition).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "reward": { + "description": "The Ada balance of the reward account for this wallet.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total Ada balance (available balance plus pending change and reward balance).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "assets": { + "description": "Current non-Ada asset holdings of the wallet.\n\nThe amount of assets available to spend may be less than the total\nunspent assets due to transaction change amounts which are yet to\nbe fully confirmed (pending).\n", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available UTxO asset balances (funds that can be spent without\ncondition).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "total": { + "description": "Total asset balances (available balances plus pending change balances).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + }, + "delegation": { + "description": "Delegation settings", + "type": "object", + "required": [ + "active", + "next" + ], + "properties": { + "active": { + "type": "object", + "description": "Currently active delegation status.", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + } + }, + "example": { + "status": "delegating", + "target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + }, + "next": { + "type": "array", + "items": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + } + } + } + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "deleteWallet", + "tags": [ + "Wallets" + ], + "summary": "Delete", + "description": "

status: stable

\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "204": { + "description": "No Content" + } + } + }, + "put": { + "operationId": "putWallet", + "tags": [ + "Wallets" + ], + "summary": "Update Metadata", + "description": "

status: stable

\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "address_pool_gap", + "balance", + "assets", + "delegation", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + }, + "balance": { + "description": "Wallet current Ada balance(s).", + "type": "object", + "required": [ + "available", + "reward", + "total" + ], + "properties": { + "available": { + "description": "Available Ada UTxO balance (funds that can be spent without condition).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "reward": { + "description": "The Ada balance of the reward account for this wallet.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total Ada balance (available balance plus pending change and reward balance).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "assets": { + "description": "Current non-Ada asset holdings of the wallet.\n\nThe amount of assets available to spend may be less than the total\nunspent assets due to transaction change amounts which are yet to\nbe fully confirmed (pending).\n", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available UTxO asset balances (funds that can be spent without\ncondition).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "total": { + "description": "Total asset balances (available balances plus pending change balances).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + }, + "delegation": { + "description": "Delegation settings", + "type": "object", + "required": [ + "active", + "next" + ], + "properties": { + "active": { + "type": "object", + "description": "Currently active delegation status.", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + } + }, + "example": { + "status": "delegating", + "target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + }, + "next": { + "type": "array", + "items": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + } + } + } + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/wallets/{walletId}/passphrase": { + "put": { + "operationId": "putWalletPassphrase", + "tags": [ + "Wallets" + ], + "summary": "Update Passphrase", + "description": "

status: stable

\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "old_passphrase", + "new_passphrase" + ], + "properties": { + "old_passphrase": { + "description": "The current passphrase.", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "new_passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds).", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + } + ] + } + } + } + }, + "204": { + "description": "No Content" + } + } + } + }, + "/wallets/{walletId}/payment-fees": { + "post": { + "operationId": "postTransactionFee", + "tags": [ + "Transactions" + ], + "summary": "Estimate Fee", + "description": "

status: stable

\n\nEstimate fee for the transaction. The estimate is made by\nassembling multiple transactions and analyzing the\ndistribution of their fees. The estimated_max is the highest\nfee observed, and the estimated_min is the fee which is lower\nthan at least 90% of the fees observed.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "payments" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawal": { + "type": "string", + "enum": [ + "self" + ], + "description": "When provided, instruments the server to automatically withdraw rewards from the source wallet when they are deemed\nsufficient (i.e. they contribute to the balance for at least as much as they cost).\n\nAs a consequence, the resulting transaction may or may not have a withdrawal object. Summarizing:\n\nwithdrawal field | reward balance | result\n--- | --- | ---\n`null` | too small | ✓ no withdrawals generated\n`null` | big enough | ✓ no withdrawals generated\n`\"self\"` | too small | ✓ no withdrawals generated\n`\"self\"` | big enough | ✓ withdrawal generated\n" + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + }, + "time_to_live": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "example": 10 + }, + "unit": { + "type": "string", + "enum": [ + "second" + ] + } + }, + "description": "The TTL (time to live) is the time period in which the transaction\nwill be accepted into node mempools.\n\nAfter the TTL has lapsed, the transaction is considered\nexpired. At this point, nodes will give up on broadcasting the\ntransaction, and the wallet will release the funds allocated to\nthe transaction so they can be used for other payments.\n\nThe TTL should be long enough that the transaction has time to be\npropagated through the network and confirmed, but short enough so\nthat - in the event of failures - UTxO are returned to the wallet\nin a timely manner.\n\nThe TTL value is given in seconds. It will be converted to a slot\nnumber internally.\n\nIf the TTL is not provided for a payment, a reasonable default\nvalue will be used.\n" + } + }, + "title": "payment" + }, + { + "type": "object", + "required": [ + "payments", + "withdrawal" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawal": { + "description": "When provided, attempts to withdraw rewards from the default stake address corresponding to the given mnemonic.\n\nShould the rewards be null or too small to be worth withdrawing (i.e. the cost of adding them into the transaction\nis more than their own intrinsic value), the server will reject the request with a `withdrawal_not_worth` error.\n\nwithdrawal field | reward balance | result\n--- | --- | ---\nany recovery phrase | too small | x Error 403 `withdrawal_not_worth`\nany recovery phrase | big enough | ✓ withdrawal generated\n", + "type": "array", + "minItems": 15, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + }, + "title": "redemption" + } + ] + } + } + } + }, + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + ] + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to perform an operation not supported by this type of wallet." + }, + "code": { + "type": "string", + "enum": [ + "invalid_wallet_type" + ] + } + }, + "title": "invalid_wallet_type" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when submitting a withdrawal while another withdrawal is pending." + }, + "code": { + "type": "string", + "enum": [ + "already_withdrawing" + ] + } + }, + "title": "already_withdrawing" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a requested output is below the minimum utxo value." + }, + "code": { + "type": "string", + "enum": [ + "utxo_too_small" + ] + } + }, + "title": "utxo_too_small" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's not enough money in the wallet to cover a requested payment." + }, + "code": { + "type": "string", + "enum": [ + "not_enough_money" + ] + } + }, + "title": "not_enough_money" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's enough money to pay for a payment, but not enough UTxO to allow for paying each output independently." + }, + "code": { + "type": "string", + "enum": [ + "inputs_depleted" + ] + } + }, + "title": "inputs_depleted" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never happen unless the server screwed up with the creation of a coin selection." + }, + "code": { + "type": "string", + "enum": [ + "invalid_coin_selection" + ] + } + }, + "title": "invalid_coin_selection" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the wallet can't cover for all requested outputs without making the transaction too large." + }, + "code": { + "type": "string", + "enum": [ + "transaction_is_too_big" + ] + } + }, + "title": "transaction_is_too_big" + } + ] + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "estimated_min", + "estimated_max", + "deposit" + ], + "properties": { + "estimated_min": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "estimated_max": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + } + } + } + } + } + }, + "/wallets/{walletId}/transactions": { + "post": { + "operationId": "postTransaction", + "tags": [ + "Transactions" + ], + "summary": "Create", + "description": "

status: stable

\n\nCreate and send transaction from the wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "payments", + "passphrase" + ], + "properties": { + "passphrase": { + "description": "The wallet's master passphrase.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawal": { + "type": "string", + "enum": [ + "self" + ], + "description": "When provided, instruments the server to automatically withdraw rewards from the source wallet when they are deemed\nsufficient (i.e. they contribute to the balance for at least as much as they cost).\n\nAs a consequence, the resulting transaction may or may not have a withdrawal object. Summarizing:\n\nwithdrawal field | reward balance | result\n--- | --- | ---\n`null` | too small | ✓ no withdrawals generated\n`null` | big enough | ✓ no withdrawals generated\n`\"self\"` | too small | ✓ no withdrawals generated\n`\"self\"` | big enough | ✓ withdrawal generated\n" + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + }, + "time_to_live": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "example": 10 + }, + "unit": { + "type": "string", + "enum": [ + "second" + ] + } + }, + "description": "The TTL (time to live) is the time period in which the transaction\nwill be accepted into node mempools.\n\nAfter the TTL has lapsed, the transaction is considered\nexpired. At this point, nodes will give up on broadcasting the\ntransaction, and the wallet will release the funds allocated to\nthe transaction so they can be used for other payments.\n\nThe TTL should be long enough that the transaction has time to be\npropagated through the network and confirmed, but short enough so\nthat - in the event of failures - UTxO are returned to the wallet\nin a timely manner.\n\nThe TTL value is given in seconds. It will be converted to a slot\nnumber internally.\n\nIf the TTL is not provided for a payment, a reasonable default\nvalue will be used.\n" + } + }, + "title": "payment" + }, + { + "type": "object", + "required": [ + "payments", + "passphrase", + "withdrawal" + ], + "properties": { + "passphrase": { + "description": "The wallet's master passphrase.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawal": { + "description": "When provided, attempts to withdraw rewards from the default stake address corresponding to the given mnemonic.\n\nShould the rewards be null or too small to be worth withdrawing (i.e. the cost of adding them into the transaction\nis more than their own intrinsic value), the server will reject the request with a `withdrawal_not_worth` error.\n\nwithdrawal field | reward balance | result\n--- | --- | ---\nany recovery phrase | too small | x Error 403 `withdrawal_not_worth`\nany recovery phrase | big enough | ✓ withdrawal generated\n", + "type": "array", + "minItems": 15, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + }, + "title": "redemption" + } + ] + } + } + } + }, + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + ] + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to perform an operation not supported by this type of wallet." + }, + "code": { + "type": "string", + "enum": [ + "invalid_wallet_type" + ] + } + }, + "title": "invalid_wallet_type" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when submitting a withdrawal while another withdrawal is pending." + }, + "code": { + "type": "string", + "enum": [ + "already_withdrawing" + ] + } + }, + "title": "already_withdrawing" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a requested output is below the minimum utxo value." + }, + "code": { + "type": "string", + "enum": [ + "utxo_too_small" + ] + } + }, + "title": "utxo_too_small" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's not enough money in the wallet to cover a requested payment." + }, + "code": { + "type": "string", + "enum": [ + "not_enough_money" + ] + } + }, + "title": "not_enough_money" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the wallet can't cover for all requested outputs without making the transaction too large." + }, + "code": { + "type": "string", + "enum": [ + "transaction_is_too_big" + ] + } + }, + "title": "transaction_is_too_big" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + } + ] + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "listTransactions", + "tags": [ + "Transactions" + ], + "summary": "List", + "description": "

status: stable

\n\nLists all incoming and outgoing wallet's transactions.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "query", + "name": "start", + "description": "An optional start time in ISO 8601 date-and-time format. Basic and\nextended formats are both accepted. Times can be local (with a\ntimezone offset) or UTC.\n\nIf both a start time and an end time are specified, then the start\ntime must not be later than the end time.\n\nExample: `2008-08-08T08:08:08Z`\n", + "schema": { + "type": "string", + "format": "ISO 8601" + } + }, + { + "in": "query", + "name": "end", + "description": "An optional end time in ISO 8601 date-and-time format. Basic and\nextended formats are both accepted. Times can be local (with a\ntimezone offset) or UTC.\n\nIf both a start time and an end time are specified, then the start\ntime must not be later than the end time.\n\nExample: `2008-08-08T08:08:08Z`\n", + "schema": { + "type": "string", + "format": "ISO 8601" + } + }, + { + "in": "query", + "name": "order", + "description": "An optional sort order.", + "schema": { + "type": "string", + "enum": [ + "ascending", + "descending" + ], + "default": "descending" + } + }, + { + "in": "query", + "name": "minWithdrawal", + "description": "Returns only transactions that have at least one withdrawal above the given amount.\nThis is particularly useful when set to `1` in order to list the withdrawal history of a wallet.\n", + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to withdraw less than the minimal UTxO value." + }, + "code": { + "type": "string", + "enum": [ + "min_withdrawal_wrong" + ] + } + }, + "title": "min_withdrawal_wrong" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a provided time-range is unsound." + }, + "code": { + "type": "string", + "enum": [ + "start_time_later_than_end_time" + ] + } + }, + "title": "start_time_later_than_end_time" + } + ] + } + } + } + }, + "200": { + "description": "Ok", + "headers": { + "Content-Range": { + "schema": { + "type": "string", + "format": "inserted-at {range-start}-{range-end}/{total}" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + } + } + }, + "/wallets/{walletId}/transactions/{transactionId}": { + "get": { + "operationId": "getTransaction", + "tags": [ + "Transactions" + ], + "summary": "Get", + "description": "

status: stable

\n\nGet transaction by id.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "path", + "name": "transactionId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64 + } + } + ], + "responses": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given transactionId does not match with any known transactions." + }, + "code": { + "type": "string", + "enum": [ + "no_such_transaction" + ] + } + }, + "title": "no_such_transaction" + } + ] + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "deleteTransaction", + "tags": [ + "Transactions" + ], + "summary": "Forget", + "description": "

status: stable

\n\nForget pending transaction. Importantly, a transaction, when sent,\ncannot be cancelled. One can only request forgetting about it\nin order to try spending (concurrently) the same UTxO in another\ntransaction. But, the transaction may still show up later in a block\nand therefore, appear in the wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "path", + "name": "transactionId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64 + } + } + ], + "responses": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Occurs when attempting to delete a transaction which is neither pending nor expired." + }, + "code": { + "type": "string", + "enum": [ + "transaction_already_in_ledger" + ] + } + }, + "title": "transaction_already_in_ledger" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given transactionId does not match with any known transactions." + }, + "code": { + "type": "string", + "enum": [ + "no_such_transaction" + ] + } + }, + "title": "no_such_transaction" + } + ] + } + } + } + }, + "204": { + "description": "No Content" + } + } + } + }, + "/wallets/{walletId}/addresses": { + "get": { + "operationId": "listAddresses", + "tags": [ + "Addresses" + ], + "summary": "List", + "description": "

status: stable

\n\nReturn a list of known addresses, ordered from newest to oldest\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "query", + "name": "state", + "description": "An optional filter on the address state.", + "schema": { + "type": "string", + "enum": [ + "used", + "unused" + ] + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "state" + ], + "properties": { + "id": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "state": { + "type": "string", + "enum": [ + "used", + "unused" + ] + } + } + } + } + } + } + } + } + } + }, + "/wallets/{walletId}/keys/{role}/{index}": { + "get": { + "operationId": "getWalletKey", + "tags": [ + "Keys" + ], + "summary": "Get Public Key", + "description": "

status: stable

\nReturn a public key for a given role and derivation index.\n\nNote: Only `Soft` indexes are supported by this endpoint.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "path", + "name": "role", + "required": true, + "schema": { + "type": "string", + "enum": [ + "utxo_external", + "utxo_internal", + "mutable_account", + "multisig_script" + ] + } + }, + { + "in": "path", + "name": "index", + "required": true, + "schema": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk)|(script_vk))1[0-9a-z]*$" + } + } + } + } + } + } + }, + "/stake-pools": { + "get": { + "operationId": "listStakePools", + "tags": [ + "Stake Pools" + ], + "summary": "List", + "description": "

status: stable

\n\nList all known stake pools ordered by descending `non_myopic_member_rewards`.\nThe `non_myopic_member_rewards` — and thus the ordering — depends on the `?stake` query\nparameter.\n\nSome pools _may_ also have metadata attached to them.\n", + "parameters": [ + { + "in": "query", + "name": "stake", + "required": true, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 45000000000000000 + }, + "description": "The stake the user intends to delegate in Lovelace. Required.\n" + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an endpoint requires the presence of a query parameter that is missing." + }, + "code": { + "type": "string", + "enum": [ + "query_param_missing" + ] + } + }, + "title": "query_param_missing" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "metrics", + "cost", + "margin", + "pledge", + "flags" + ], + "properties": { + "id": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + }, + "metrics": { + "type": "object", + "required": [ + "relative_stake", + "non_myopic_member_rewards", + "produced_blocks", + "saturation" + ], + "properties": { + "non_myopic_member_rewards": { + "description": "The rewards the wallet can expect to receive at the end of an epoch, in the long term, if delegating to\nthis pool.\n\nFor more details, see the\n[Design Specification for Delegation and Incentives in Cardano](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec)\ndocument.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "relative_stake": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "The live pool stake relative to the *total* stake.\n\nFor more details, see the section \"Relative Stake: Active vs Total\" in\n[Design Specification for Delegation and Incentives in Cardano](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec).\n" + }, + "saturation": { + "type": "number", + "minimum": 0, + "description": "Saturation-level of the pool based on the desired number of pools aimed by the network.\nA value above `1` indicates that the pool is saturated.\n\nThe `non_myopic_member_rewards` take oversaturation into account, as specified by the [specs](https://hydra.iohk.io/job/Cardano/cardano-ledger-specs/delegationDesignSpec/latest/download-by-type/doc-pdf/delegation_design_spec).\n\nThe saturation is based on the live `relative_stake`. The saturation at the end of epoch e,\nwill affect the rewards paid out at the end of epoch e+3.\n", + "example": 0.74 + }, + "produced_blocks": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "Number of blocks produced by a given stake pool in its lifetime." + } + } + }, + "cost": { + "description": "Estimated cost set by the pool operator when registering his pool.\nThis fixed cost is taken from each reward earned by the pool before splitting rewards between stakeholders.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "margin": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "Variable margin on the total reward given to an operator before splitting rewards between stakeholders.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n" + }, + "pledge": { + "description": "Minimal stake amount that a stake pool is willing to honor.\n\nMay be omitted if the wallet hasn't found the pool's registration cerificate yet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "metadata": { + "description": "Information about the stake pool.\n", + "type": "object", + "required": [ + "ticker", + "name", + "homepage" + ], + "additionalProperties": false, + "properties": { + "ticker": { + "type": "string", + "minLength": 3, + "maxLength": 5, + "example": "IOHK" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "description": { + "type": "string", + "maxLength": 255 + }, + "homepage": { + "type": "string", + "format": "uri", + "example": "https://iohk.io" + } + } + }, + "retirement": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "description": "The epoch in which a stake pool retires.\n\nMay be omitted if the wallet hasn't yet found a retirement certificate\nfor this stake pool.\n" + }, + "flags": { + "type": "array", + "description": "Various flags applicable to stake pools. Possible flags:\n\n| flag | description |\n| --- | --- |\n| delisted | The pool is marked as delisted on a configured SMASH server; metadata for this pool have therefore been dropped. |\n", + "items": { + "type": "string", + "enum": [ + "delisted" + ] + } + } + } + } + } + } + } + } + } + } + }, + "/stake-pools/maintenance-actions": { + "get": { + "operationId": "getMaintenanceActions", + "tags": [ + "Stake Pools" + ], + "summary": "View maintenance actions", + "description": "Returns the current status of the stake pools maintenance actions.\n", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "gc_stake_pools" + ], + "properties": { + "gc_stake_pools": { + "type": "object", + "description": "Gives an indication if metadata GC checking for delisted pools\nhas run and if so, when.\n\nPossible values are:\n - not_applicable -> we're currently not querying a SMASH server for metadata\n - not_started -> the GC hasn't started yet, try again in a short while\n - restarting -> the GC thread is currently restarting, try again in short while\n - has_run -> the GC has run successfully\n\nWhen 'status' is 'restarting' or 'has_run' then the field 'last_run'\nis set to the last GC time in UTC.\n", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_applicable", + "not_started", + "restarting", + "has_run" + ] + }, + "last_run": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "postMaintenanceAction", + "tags": [ + "Stake Pools" + ], + "summary": "Trigger Maintenance actions", + "description": "Performs maintenance actions on stake pools, such\nas triggering metadata garbage collection.\n\nActions may not be instantaneous.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "maintenance_action" + ], + "description": "The maintenance action to carry out, current values are\n - gc_stake_pools -> trigger looking up delisted pools from the remote SMASH server\n", + "properties": { + "maintenance_action": { + "type": "string", + "enum": [ + "gc_stake_pools" + ] + } + } + } + } + } + }, + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "204": { + "description": "No Content" + } + } + } + }, + "/wallets/{walletId}/delegation-fees": { + "get": { + "operationId": "getDelegationFee", + "tags": [ + "Stake Pools" + ], + "summary": "Estimate Fee", + "description": "

status: stable

\n\nEstimate fee for joining or leaving a stake pool. Note that it is an\nestimation because a delegation induces a transaction for which coins\nhave to be selected randomly within the wallet. Because of this randomness,\nfees can only be estimated.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "estimated_min", + "estimated_max", + "deposit" + ], + "properties": { + "estimated_min": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "estimated_max": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + } + } + } + } + } + }, + "/stake-pools/*/wallets/{walletId}": { + "delete": { + "operationId": "quitStakePool", + "tags": [ + "Stake Pools" + ], + "summary": "Quit", + "description": "

status: stable

\n\nStop delegating completely. The wallet's stake will become inactive.\n\n> ⚠️ Disclaimer ⚠️\n>\n> This endpoint historically use to take a stake pool id as a path parameter.\n> However, retiring from delegation is ubiquitous and not tight to a particular\n> stake pool. For backward-compatibility reasons, sending stake pool ids as path\n> parameter will still be accepted by the server but new integrations are\n> encouraged to provide a placeholder asterisk `*` instead.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "passphrase" + ], + "properties": { + "passphrase": { + "description": "The source Byron wallet's master passphrase.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to quit a pool on an account that isn't delegating." + }, + "code": { + "type": "string", + "enum": [ + "not_delegating_to" + ] + } + }, + "title": "not_delegating_to" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to unregister a stake key that still has rewards attached to it." + }, + "code": { + "type": "string", + "enum": [ + "non_null_rewards" + ] + } + }, + "title": "non_null_rewards" + } + ] + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + } + }, + "/stake-pools/{stakePoolId}/wallets/{walletId}": { + "put": { + "operationId": "joinStakePool", + "tags": [ + "Stake Pools" + ], + "summary": "Join", + "description": "

status: stable

\n\nDelegate all (current and future) addresses from the given wallet to the given stake pool.\n\nNote: Bech32-encoded stake pool identifiers can vary in length.\n", + "parameters": [ + { + "in": "path", + "name": "stakePoolId", + "required": true, + "schema": { + "type": "string", + "format": "hex|bech32" + } + }, + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "passphrase" + ], + "properties": { + "passphrase": { + "description": "The source Byron wallet's master passphrase.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given poolId matches the current delegation preferences of the wallet's account." + }, + "code": { + "type": "string", + "enum": [ + "pool_already_joined" + ] + } + }, + "title": "pool_already_joined" + } + ] + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given poolId does not match any known pool." + }, + "code": { + "type": "string", + "enum": [ + "no_such_pool" + ] + } + }, + "title": "no_such_pool" + } + ] + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + } + }, + "/wallets/{walletId}/coin-selections/random": { + "post": { + "operationId": "selectCoins", + "tags": [ + "Coin Selections" + ], + "summary": "Random", + "description": "

status: stable

\n\nSelect coins to cover the given set of payments.\n\nUses the \nRandom-Improve coin selection algorithm.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "oneOf": [ + { + "type": "object", + "required": [ + "payments" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "delegation_action" + ], + "properties": { + "delegation_action": { + "description": "A delegation action.\n\nPool id is only required for \"join\".\n", + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "type": "string", + "enum": [ + "quit", + "join" + ] + }, + "pool": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + } + } + } + } + } + ] + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when submitting a withdrawal while another withdrawal is pending." + }, + "code": { + "type": "string", + "enum": [ + "already_withdrawing" + ] + } + }, + "title": "already_withdrawing" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a requested output is below the minimum utxo value." + }, + "code": { + "type": "string", + "enum": [ + "utxo_too_small" + ] + } + }, + "title": "utxo_too_small" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's not enough money in the wallet to cover a requested payment." + }, + "code": { + "type": "string", + "enum": [ + "not_enough_money" + ] + } + }, + "title": "not_enough_money" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's enough money to pay for a payment, but not enough UTxO to allow for paying each output independently." + }, + "code": { + "type": "string", + "enum": [ + "inputs_depleted" + ] + } + }, + "title": "inputs_depleted" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never happen unless the server screwed up with the creation of a coin selection." + }, + "code": { + "type": "string", + "enum": [ + "invalid_coin_selection" + ] + } + }, + "title": "invalid_coin_selection" + } + ] + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "inputs", + "outputs", + "change" + ], + "properties": { + "inputs": { + "description": "A list of transaction inputs", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "id", + "index", + "address", + "amount", + "derivation_path" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "derivation_path": { + "description": "A path for deriving a child key from a parent key.", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "change": { + "description": "A list of transaction change outputs.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount", + "derivation_path" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "derivation_path": { + "description": "A path for deriving a child key from a parent key.", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + } + } + } + }, + "certificates": { + "type": "array", + "items": { + "description": "A delegation certificate\n\nOnly for 'join_pool' the 'pool' property is required.\n", + "type": "object", + "required": [ + "certificate_type", + "reward_account_path" + ], + "properties": { + "certificate_type": { + "type": "string", + "enum": [ + "join_pool", + "quit_pool", + "register_reward_account" + ] + }, + "pool": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + }, + "reward_account_path": { + "type": "array", + "minItems": 5, + "maxItems": 5, + "items": { + "type": "string" + } + } + } + } + }, + "deposits": { + "description": "A list of deposits associated with a transaction.", + "type": "array", + "minItems": 0, + "items": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + } + } + } + } + } + } + }, + "/wallets/{walletId}/migrations": { + "post": { + "operationId": "migrateShelleyWallet", + "tags": [ + "Migrations" + ], + "summary": "Migrate", + "description": "

status: in development

\n\nSubmit one or more transactions which transfers all funds from a Shelley\nwallet to a set of addresses.\n\nThis operation attempts to preserve the UTxO \"shape\" of a wallet as far as possible.\nThat is, coins will not be agglomerated. Therefore, if the wallet has\na large UTxO set, several transactions may be needed.\n\nA typical usage would be when one wants to move all funds from an old wallet to another\nby providing addresses coming from the new wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "passphrase", + "addresses" + ], + "properties": { + "passphrase": { + "description": "The wallet's master passphrase.", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "addresses": { + "description": "The recipient addresses.", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + } + } + } + } + } + } + }, + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to migrate a wallet that is empty or full of dust." + }, + "code": { + "type": "string", + "enum": [ + "nothing_to_migrate" + ] + } + }, + "title": "nothing_to_migrate" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + } + ] + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "getShelleyWalletMigrationInfo", + "tags": [ + "Migrations" + ], + "summary": "Calculate Cost", + "description": "

status: in development

\n\nCalculate the exact cost of sending all funds from particular Shelley wallet\nto a set of addresses.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to migrate a wallet that is empty or full of dust." + }, + "code": { + "type": "string", + "enum": [ + "nothing_to_migrate" + ] + } + }, + "title": "nothing_to_migrate" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "migration_cost", + "leftovers" + ], + "properties": { + "migration_cost": { + "description": "Total amount which will be paid as fees for the migration.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "leftovers": { + "description": "Leftovers dust coins which won't be migrated nor spent as fees.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + } + } + } + } + } + }, + "/byron-wallets": { + "post": { + "operationId": "postByronWallet", + "tags": [ + "Byron Wallets" + ], + "summary": "Restore", + "description": "

status: stable

\n\nRestore a Byron wallet from a mnemonic sentence or encrypted root private key (deprecated).\n\n **⚠️ WARNING ⚠️**\n\n The construction of random wallet in itself is **deprecated**, in particular the restoration from an encrypted root private key.\n These endpoints exist to ease migrations from legacy software such as `cardano-sl` but should be avoided by new applications.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "random" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + }, + "title": "random" + }, + { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "icarus" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + }, + "title": "icarus" + }, + { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "trezor" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + }, + "title": "trezor" + }, + { + "type": "object", + "required": [ + "name", + "mnemonic_sentence", + "passphrase" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "ledger" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "mnemonic_sentence": { + "description": "A list of mnemonic words", + "type": "array", + "minItems": 12, + "maxItems": 24, + "items": { + "type": "string", + "format": "bip-0039-mnemonic-word{english}" + }, + "example": [ + "squirrel", + "material", + "silly", + "twice", + "direct", + "slush", + "pistol", + "razor", + "become", + "junk", + "kingdom", + "flee", + "squirrel", + "silly", + "twice" + ] + } + }, + "title": "ledger" + }, + { + "type": "object", + "description": "Restore from account public key", + "required": [ + "name", + "account_public_key" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "account_public_key": { + "description": "An extended account public key (public key + chain code)", + "type": "string", + "format": "hex", + "minLength": 128, + "maxLength": 128, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db11423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + } + }, + "title": "icarus/trezor/ledger (from xpub)" + }, + { + "type": "object", + "description": "patate", + "required": [ + "name", + "encrypted_root_private_key", + "passphrase_hash" + ], + "properties": { + "style": { + "type": "string", + "enum": [ + "random" + ] + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "encrypted_root_private_key": { + "description": "A root private key, encrypted using a given passphrase. The underlying key should contain:\n- A private key\n- A chain code\n- A public key\n", + "type": "string", + "format": "hex", + "minLength": 256, + "maxLength": 256, + "deprecated": true + }, + "passphrase_hash": { + "description": "A hash of master passphrase. The hash should be an output of a Scrypt function with the following parameters:\n- logN = 14\n- r = 8\n- p = 1\n", + "type": "string", + "format": "hex", + "example": "31347c387c317c574342652b796362417576356c2b4258676a344a314c6343675375414c2f5653393661364e576a2b7550766655513d3d7c2f376738486c59723174734e394f6e4e753253302b6a65515a6b5437316b45414941366a515867386539493d", + "deprecated": true + } + }, + "title": "random (from xprv)" + } + ] + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "balance", + "discovery", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "balance": { + "description": "Byron wallet's current balance(s)", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available balance (funds that can be spent)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total balance (available balance plus pending change)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "discovery": { + "description": "Mechanism used for discovering addresses.", + "type": "string", + "enum": [ + "random", + "sequential" + ], + "example": "sequential" + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "listByronWallets", + "tags": [ + "Byron Wallets" + ], + "summary": "List", + "description": "

status: stable

\n\nReturn a list of known Byron wallets, ordered from oldest to newest.\n", + "responses": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "balance", + "discovery", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "balance": { + "description": "Byron wallet's current balance(s)", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available balance (funds that can be spent)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total balance (available balance plus pending change)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "discovery": { + "description": "Mechanism used for discovering addresses.", + "type": "string", + "enum": [ + "random", + "sequential" + ], + "example": "sequential" + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/byron-wallets/{walletId}/statistics/utxos": { + "get": { + "operationId": "getByronUTxOsStatistics", + "tags": [ + "Byron Wallets" + ], + "summary": "UTxO Statistics", + "description": "

status: stable

\n\nReturn the UTxOs distribution across the whole wallet, in the form of a histogram.\n\n```\n │\n 100 ─\n │\n │ ┌───┐\n 10 ─ ┌───┐ │ │ ┌───┐\n │ ┌───┐ │ │ │ │ │ │\n │ │ │ │ │ │ │ ┌───┐ │ │\n 1 ─ ┌───┐ │ │ │ │ │ │ │ │ │ │\n │ │ │ │ │ │ │ │ │ │ │ │ │\n │ │ │ │ │ │ │ │ │ │ ╷ │ │ ╷ │ │ ╷ ╷ │ │\n └─┘ └─│───────│─┘ └─│─┘ └─│─┘ └─│─┘ └─│───────│─┘ └────\n 10μ₳ 100μ₳ 1000μ₳ 0.1₳ 1₳ 10₳ 100₳\n```\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "total", + "scale", + "distribution" + ], + "properties": { + "total": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "scale": { + "type": "string", + "enum": [ + "log10" + ] + }, + "distribution": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + } + }, + "example": { + "total": { + "quantity": 42000000, + "unit": "lovelace" + }, + "scale": "log10", + "distribution": { + "10": 1, + "100": 0, + "1000": 8, + "10000": 14, + "100000": 32, + "1000000": 3, + "10000000": 0, + "100000000": 12, + "1000000000": 0, + "10000000000": 0, + "100000000000": 0, + "1000000000000": 0, + "10000000000000": 0, + "100000000000000": 0, + "1000000000000000": 0, + "10000000000000000": 0, + "45000000000000000": 0 + } + } + } + } + } + } + } + } + }, + "/byron-wallets/{walletId}": { + "get": { + "operationId": "getByronWallet", + "tags": [ + "Byron Wallets" + ], + "summary": "Get", + "description": "

status: stable

\n\nReturn information about a Byron wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "balance", + "discovery", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "balance": { + "description": "Byron wallet's current balance(s)", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available balance (funds that can be spent)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total balance (available balance plus pending change)", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "discovery": { + "description": "Mechanism used for discovering addresses.", + "type": "string", + "enum": [ + "random", + "sequential" + ], + "example": "sequential" + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "deleteByronWallet", + "tags": [ + "Byron Wallets" + ], + "summary": "Delete", + "description": "

status: stable

\n\nDelete a Byron wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "204": { + "description": "No Content" + } + } + }, + "put": { + "operationId": "putByronWallet", + "tags": [ + "Byron Wallets" + ], + "summary": "Update Metadata", + "description": "

status: stable

\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "address_pool_gap", + "balance", + "assets", + "delegation", + "name", + "state", + "tip" + ], + "properties": { + "id": { + "description": "A unique identifier for the wallet", + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40, + "example": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "address_pool_gap": { + "description": "Number of consecutive unused addresses allowed.\n\n**IMPORTANT DISCLAIMER:** Using values other than `20` automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you **will not** be able to fully restore\nyour wallet in a different software which is strictly following BIP-44.\n\nBeside, using large gaps is **not recommended** as it may induce important performance degradations. Use at your own risks.\n", + "type": "integer", + "minimum": 10, + "maximum": 100000, + "example": 20, + "default": 20 + }, + "balance": { + "description": "Wallet current Ada balance(s).", + "type": "object", + "required": [ + "available", + "reward", + "total" + ], + "properties": { + "available": { + "description": "Available Ada UTxO balance (funds that can be spent without condition).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "reward": { + "description": "The Ada balance of the reward account for this wallet.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "total": { + "description": "Total Ada balance (available balance plus pending change and reward balance).", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + }, + "assets": { + "description": "Current non-Ada asset holdings of the wallet.\n\nThe amount of assets available to spend may be less than the total\nunspent assets due to transaction change amounts which are yet to\nbe fully confirmed (pending).\n", + "type": "object", + "required": [ + "available", + "total" + ], + "properties": { + "available": { + "description": "Available UTxO asset balances (funds that can be spent without\ncondition).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "total": { + "description": "Total asset balances (available balances plus pending change balances).\n", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + }, + "delegation": { + "description": "Delegation settings", + "type": "object", + "required": [ + "active", + "next" + ], + "properties": { + "active": { + "type": "object", + "description": "Currently active delegation status.", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + } + }, + "example": { + "status": "delegating", + "target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + }, + "next": { + "type": "array", + "items": { + "type": "object", + "description": "Next delegation status becomes active at the start of the second epoch after the corresponding delegation certificate was discovered. The exact moment is specified by changes_at", + "required": [ + "status", + "changes_at" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "not_delegating", + "delegating" + ] + }, + "target": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique Stake-Pool identifier (present only if status = `delegating`)" + }, + "changes_at": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + } + }, + "example": { + "status": "not_delegating", + "changes_at": { + "epoch_number": 14, + "epoch_start_time": "2020-01-22T10:06:39.037000+00:00" + } + } + } + } + } + }, + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "example": "Alan's Wallet" + }, + "passphrase": { + "description": "Information about the wallet's passphrase", + "type": "object", + "required": [ + "last_updated_at" + ], + "properties": { + "last_updated_at": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "state": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Whether a wallet is ready to use or still syncing" + }, + "tip": { + "description": "A reference to a particular time slot, and the block height at that point.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/byron-wallets/{walletId}/passphrase": { + "put": { + "operationId": "putByronWalletPassphrase", + "tags": [ + "Byron Wallets" + ], + "summary": "Update Passphrase", + "description": "

status: stable

\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "new_passphrase" + ], + "properties": { + "old_passphrase": { + "description": "The current passphrase if present.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "new_passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds).", + "type": "string", + "minLength": 10, + "maxLength": 255, + "example": "Secure Passphrase" + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + } + ] + } + } + } + }, + "204": { + "description": "No Content" + } + } + } + }, + "/byron-wallets/{walletId}/addresses": { + "post": { + "operationId": "createAddress", + "tags": [ + "Byron Addresses" + ], + "summary": "Create Address", + "description": "

status: stable

\n\n⚠️ This endpoint is available for `random` wallets only. Any\nattempt to call this endpoint on another type of wallet will result in\na `403 Forbidden` error from the server.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "passphrase" + ], + "properties": { + "passphrase": { + "description": "A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "address_index": { + "type": "number", + "minimum": 0, + "maximum": 4294967295, + "description": "An address derivation index.\n" + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "state" + ], + "properties": { + "id": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "state": { + "type": "string", + "enum": [ + "used", + "unused" + ] + } + } + } + } + } + } + } + }, + "get": { + "operationId": "listByronAddresses", + "tags": [ + "Byron Addresses" + ], + "summary": "List", + "description": "

status: stable

\n\nReturn a list of known addresses, ordered from newest to oldest for sequential wallets.\nArbitrarily ordered for random wallets.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "query", + "name": "state", + "description": "An optional filter on the address state.", + "schema": { + "type": "string", + "enum": [ + "used", + "unused" + ] + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "state" + ], + "properties": { + "id": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "state": { + "type": "string", + "enum": [ + "used", + "unused" + ] + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "importAddresses", + "tags": [ + "Byron Addresses" + ], + "summary": "Import Addresses", + "description": "

status: stable

\n\n⚠️ This endpoint is available for `random` wallets only. Any\nattempt to call this endpoint on another type of wallet will result in\na `403 Forbidden` error from the server.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "addresses" + ], + "properties": { + "addresses": { + "description": "The imported addresses.", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + } + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "204": { + "description": "No Content" + } + } + } + }, + "/byron-wallets/{walletId}/addresses/{addressId}": { + "put": { + "operationId": "importAddress", + "tags": [ + "Byron Addresses" + ], + "summary": "Import Address", + "description": "

status: stable

\n\n⚠️ This endpoint is available for `random` wallets only. Any\nattempt to call this endpoint on another type of wallet will result in\na `403 Forbidden` error from the server.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "path", + "name": "addressId", + "required": true, + "schema": { + "type": "string", + "format": "base58", + "example": "DdzFFzCqrhtCNjPk5Lei7E1FxnoqMoAYtJ8VjAWbFmDb614nNBWBwv3kt6QHJa59cGezzf6piMWsbK7sWRB5sv325QqWdRuusMqqLdMt" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "204": { + "description": "No Content" + } + } + } + }, + "/byron-wallets/{walletId}/payment-fees": { + "post": { + "operationId": "postByronTransactionFee", + "tags": [ + "Byron Transactions" + ], + "summary": "Estimate Fee", + "description": "

status: stable

\n\nEstimate fee for the transaction.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "payments" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + } + } + } + } + } + }, + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + ] + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to perform an operation not supported by this type of wallet." + }, + "code": { + "type": "string", + "enum": [ + "invalid_wallet_type" + ] + } + }, + "title": "invalid_wallet_type" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when submitting a withdrawal while another withdrawal is pending." + }, + "code": { + "type": "string", + "enum": [ + "already_withdrawing" + ] + } + }, + "title": "already_withdrawing" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a requested output is below the minimum utxo value." + }, + "code": { + "type": "string", + "enum": [ + "utxo_too_small" + ] + } + }, + "title": "utxo_too_small" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's not enough money in the wallet to cover a requested payment." + }, + "code": { + "type": "string", + "enum": [ + "not_enough_money" + ] + } + }, + "title": "not_enough_money" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's enough money to pay for a payment, but not enough UTxO to allow for paying each output independently." + }, + "code": { + "type": "string", + "enum": [ + "inputs_depleted" + ] + } + }, + "title": "inputs_depleted" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never happen unless the server screwed up with the creation of a coin selection." + }, + "code": { + "type": "string", + "enum": [ + "invalid_coin_selection" + ] + } + }, + "title": "invalid_coin_selection" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the wallet can't cover for all requested outputs without making the transaction too large." + }, + "code": { + "type": "string", + "enum": [ + "transaction_is_too_big" + ] + } + }, + "title": "transaction_is_too_big" + } + ] + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "estimated_min", + "estimated_max", + "deposit" + ], + "properties": { + "estimated_min": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "estimated_max": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + } + } + } + } + } + }, + "/byron-wallets/{walletId}/transactions": { + "post": { + "operationId": "postByronTransaction", + "tags": [ + "Byron Transactions" + ], + "summary": "Create", + "description": "

status: stable

\n\nCreate and send transaction from the wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "payments", + "passphrase" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "passphrase": { + "description": "The wallet's master passphrase.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + } + } + } + } + } + }, + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + ] + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to perform an operation not supported by this type of wallet." + }, + "code": { + "type": "string", + "enum": [ + "invalid_wallet_type" + ] + } + }, + "title": "invalid_wallet_type" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when submitting a withdrawal while another withdrawal is pending." + }, + "code": { + "type": "string", + "enum": [ + "already_withdrawing" + ] + } + }, + "title": "already_withdrawing" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a requested output is below the minimum utxo value." + }, + "code": { + "type": "string", + "enum": [ + "utxo_too_small" + ] + } + }, + "title": "utxo_too_small" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's not enough money in the wallet to cover a requested payment." + }, + "code": { + "type": "string", + "enum": [ + "not_enough_money" + ] + } + }, + "title": "not_enough_money" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the wallet can't cover for all requested outputs without making the transaction too large." + }, + "code": { + "type": "string", + "enum": [ + "transaction_is_too_big" + ] + } + }, + "title": "transaction_is_too_big" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + } + ] + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "listByronTransactions", + "tags": [ + "Byron Transactions" + ], + "summary": "List", + "description": "

status: stable

\n\nList all incoming and outgoing transactions for the given wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "query", + "name": "start", + "description": "An optional start time in ISO 8601 date-and-time format. Basic and\nextended formats are both accepted. Times can be local (with a\ntimezone offset) or UTC.\n\nIf both a start time and an end time are specified, then the start\ntime must not be later than the end time.\n\nExample: `2008-08-08T08:08:08Z`\n", + "schema": { + "type": "string", + "format": "ISO 8601" + } + }, + { + "in": "query", + "name": "end", + "description": "An optional end time in ISO 8601 date-and-time format. Basic and\nextended formats are both accepted. Times can be local (with a\ntimezone offset) or UTC.\n\nIf both a start time and an end time are specified, then the start\ntime must not be later than the end time.\n\nExample: `2008-08-08T08:08:08Z`\n", + "schema": { + "type": "string", + "format": "ISO 8601" + } + }, + { + "in": "query", + "name": "order", + "description": "An optional sort order.", + "schema": { + "type": "string", + "enum": [ + "ascending", + "descending" + ], + "default": "descending" + } + } + ], + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to withdraw less than the minimal UTxO value." + }, + "code": { + "type": "string", + "enum": [ + "min_withdrawal_wrong" + ] + } + }, + "title": "min_withdrawal_wrong" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a provided time-range is unsound." + }, + "code": { + "type": "string", + "enum": [ + "start_time_later_than_end_time" + ] + } + }, + "title": "start_time_later_than_end_time" + } + ] + } + } + } + }, + "200": { + "description": "Ok", + "headers": { + "Content-Range": { + "schema": { + "type": "string", + "format": "inserted-at {range-start}-{range-end}/{total}" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + } + } + }, + "/byron-wallets/{walletId}/transactions/{transactionId}": { + "get": { + "operationId": "getByronTransaction", + "tags": [ + "Byron Transactions" + ], + "summary": "Get", + "description": "

status: stable

\n\nGet transaction by id.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "path", + "name": "transactionId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64 + } + } + ], + "responses": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given transactionId does not match with any known transactions." + }, + "code": { + "type": "string", + "enum": [ + "no_such_transaction" + ] + } + }, + "title": "no_such_transaction" + } + ] + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "deleteByronTransaction", + "tags": [ + "Byron Transactions" + ], + "summary": "Forget", + "description": "

status: stable

\n\nForget pending Byron transaction. Importantly, a transaction, when sent,\ncannot be cancelled. One can only request forgetting about it\nin order to try spending (concurrently) the same UTxO in another\ntransaction. But, the transaction may still show up later in a block\nand therefore, appear in the wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + }, + { + "in": "path", + "name": "transactionId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64 + } + } + ], + "responses": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Occurs when attempting to delete a transaction which is neither pending nor expired." + }, + "code": { + "type": "string", + "enum": [ + "transaction_already_in_ledger" + ] + } + }, + "title": "transaction_already_in_ledger" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given transactionId does not match with any known transactions." + }, + "code": { + "type": "string", + "enum": [ + "no_such_transaction" + ] + } + }, + "title": "no_such_transaction" + } + ] + } + } + } + }, + "204": { + "description": "No Content" + } + } + } + }, + "/byron-wallets/{walletId}/coin-selections/random": { + "post": { + "operationId": "byronSelectCoins", + "tags": [ + "Byron Coin Selections" + ], + "summary": "Random", + "description": "

status: stable

\n\nSelect coins to cover the given set of payments.\n\nUses the \nRandom-Improve coin selection algorithm.\n\nNote: Not supported for Byron random wallets.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "payments" + ], + "properties": { + "payments": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when submitting a withdrawal while another withdrawal is pending." + }, + "code": { + "type": "string", + "enum": [ + "already_withdrawing" + ] + } + }, + "title": "already_withdrawing" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a requested output is below the minimum utxo value." + }, + "code": { + "type": "string", + "enum": [ + "utxo_too_small" + ] + } + }, + "title": "utxo_too_small" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's not enough money in the wallet to cover a requested payment." + }, + "code": { + "type": "string", + "enum": [ + "not_enough_money" + ] + } + }, + "title": "not_enough_money" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a transaction can't be balanced for fees." + }, + "code": { + "type": "string", + "enum": [ + "cannot_cover_fee" + ] + } + }, + "title": "cannot_cover_fee" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when there's enough money to pay for a payment, but not enough UTxO to allow for paying each output independently." + }, + "code": { + "type": "string", + "enum": [ + "inputs_depleted" + ] + } + }, + "title": "inputs_depleted" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Should never happen unless the server screwed up with the creation of a coin selection." + }, + "code": { + "type": "string", + "enum": [ + "invalid_coin_selection" + ] + } + }, + "title": "invalid_coin_selection" + } + ] + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "inputs", + "outputs", + "change" + ], + "properties": { + "inputs": { + "description": "A list of transaction inputs", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "id", + "index", + "address", + "amount", + "derivation_path" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "derivation_path": { + "description": "A path for deriving a child key from a parent key.", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "change": { + "description": "A list of transaction change outputs.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount", + "derivation_path" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "derivation_path": { + "description": "A path for deriving a child key from a parent key.", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual segment within a derivation path.\nIndexes without `H` suffix are called `Soft`.\nIndexes with `H` suffix are called `Hardened`.\n", + "type": "string", + "example": "1852H" + } + } + } + } + }, + "certificates": { + "type": "array", + "items": { + "description": "A delegation certificate\n\nOnly for 'join_pool' the 'pool' property is required.\n", + "type": "object", + "required": [ + "certificate_type", + "reward_account_path" + ], + "properties": { + "certificate_type": { + "type": "string", + "enum": [ + "join_pool", + "quit_pool", + "register_reward_account" + ] + }, + "pool": { + "type": "string", + "format": "hex|bech32", + "example": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm", + "description": "A unique identifier for the pool." + }, + "reward_account_path": { + "type": "array", + "minItems": 5, + "maxItems": 5, + "items": { + "type": "string" + } + } + } + } + }, + "deposits": { + "description": "A list of deposits associated with a transaction.", + "type": "array", + "minItems": 0, + "items": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + } + } + } + } + } + } + }, + "/byron-wallets/{walletId}/migrations": { + "post": { + "operationId": "migrateByronWallet", + "tags": [ + "Byron Migrations" + ], + "summary": "Migrate", + "description": "

status: stable

\n\nSubmit one or more transactions which transfers all funds from a Byron\nwallet to a set of addresses.\n\nThis operation attempts to preserve the UTxO \"shape\" of a wallet as far as possible.\nThat is, coins will not be agglomerated. Therefore, if the wallet has\na large UTxO set, several transactions may be needed.\n\nA typical usage would be when one wants to move all funds from an old wallet to another (Shelley\nor Byron) by providing addresses coming from the new wallet.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "passphrase", + "addresses" + ], + "properties": { + "passphrase": { + "description": "The wallet's master passphrase.", + "type": "string", + "minLength": 0, + "maxLength": 255, + "example": "Secure Passphrase" + }, + "addresses": { + "description": "The recipient addresses.", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + } + } + } + } + } + } + }, + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to migrate a wallet that is empty or full of dust." + }, + "code": { + "type": "string", + "enum": [ + "nothing_to_migrate" + ] + } + }, + "title": "nothing_to_migrate" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when an action require a signing key but the wallet has only access to verification keys." + }, + "code": { + "type": "string", + "enum": [ + "no_root_key" + ] + } + }, + "title": "no_root_key" + }, + { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when the given spending passphrase is wrong." + }, + "code": { + "type": "string", + "enum": [ + "wrong_encryption_passphrase" + ] + } + }, + "title": "wrong_encryption_passphrase" + } + ] + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "amount", + "fee", + "deposit", + "direction", + "inputs", + "outputs", + "withdrawals", + "mint", + "status" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "amount": { + "description": "An amount of Ada spent or received, from the perspective of the wallet.\n\nThat is, for outgoing transaction, it represents the amount of Ada consumed\nas inputs, minus the amount of Ada spent as fees, as deposits or to addresses\nwhich do not belong to the wallet.\n\nFor incoming transaction, it represents the total amount of Ada received to\naddresses that belong to the wallet.\n", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "fee": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "deposit": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "inserted_at": { + "description": "\nif: status == in_ledger\n
\nAbsolute time at which the transaction was inserted in a block.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "expires_at": { + "description": "\nif: status == pending OR status == expired\n
\nAbsolute time and slot at which the pending transaction TTL (time to live) will lapse.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "pending_since": { + "description": "\nif: status == pending\n
\nThe point in time at which a transaction became pending.\n", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "depth": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + }, + "description": "\nif: status == in_ledger\n
\nCurrent depth of the transaction in the local chain\n" + }, + "direction": { + "type": "string", + "enum": [ + "outgoing", + "incoming" + ] + }, + "inputs": { + "description": "A list of transaction inputs.\n\n`assets` and `address` are always present for `outgoing`\ntransactions but generally absent for `incoming`\ntransactions. This information is present on the Cardano explorer,\nbut is not tracked by the wallet.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "index" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + }, + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + }, + "index": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "outputs": { + "description": "A list of target outputs", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string", + "format": "base58|bech32", + "example": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "assets": { + "description": "A flat list of assets.", + "type": "array", + "items": { + "description": "An asset on the Cardano blockchain. An asset is uniquely identified by\nits `policy_id` and `asset_name` (together, these form the _asset id_).\n\nTwo assets with the same `asset_name` and `policy_id` are\ninterchangeable. Yet, different assets with a same `policy_id` but\ndifferent `asset_name` are treated as separate assets, as are two\nassets with the same `asset_name` but different `policy_id`.\n", + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Number of assets for the given `policy_id` and `asset_name`.\n", + "minimum": 0 + } + } + } + } + } + } + }, + "withdrawals": { + "description": "A list of withdrawals from stake addresses.", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "stake_address", + "amount" + ], + "properties": { + "stake_address": { + "type": "string", + "format": "bech32", + "example": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x" + }, + "amount": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + }, + "mint": { + "description": "

status: ⚠ under development

\n\n_This field is not implemented yet, and will always be empty._\n\nAssets minted (created) or unminted (destroyed)\n\nThis amount contributes to the total transaction value.\n\nPositive values denote creation of assets and negative values\ndenote the reverse.\n", + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "policy_id", + "asset_name", + "quantity" + ], + "properties": { + "policy_id": { + "type": "string", + "description": "A unique identifier of the asset's monetary policy. The policy\ncontrols how assets of this kind are created and destroyed.\n\nThe contents are the blake2b-224 hash of the monetary policy\nscript, encoded in hexadecimal.\n", + "format": "hex", + "minLength": 56, + "maxLength": 56, + "example": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b" + }, + "asset_name": { + "type": "string", + "description": "The asset on-chain type which acts as a sub-identifier within a\npolicy. Although we call it \"asset name\", the value needn't be\ntext, and it could even be empty.\n\nFor policies with a single fungible asset item, asset name is\ntypically an empty string.\n\nThis value can be up to 32 bytes of arbitrary data (which is 64\nhexadecimal digits).\n", + "format": "hex", + "maxLength": 64, + "example": "" + }, + "quantity": { + "type": "integer", + "description": "Positive values mean creation and negative values mean\ndestruction.\n" + } + } + } + }, + "status": { + "description": "Current transaction status.\n\n ```\n *---------* *-----------*\n | |----------> EXPIRED |\n | | (ttl) *-----------*\n -------> PENDING |\n | <----------------*\n | | |\n *---------* (rollback)\n | |\n (in ledger) *-----------*\n | | |\n *---------------> IN_LEDGER |\n | |\n *-----------*\n ```\n", + "type": "string", + "enum": [ + "pending", + "in_ledger", + "expired" + ] + }, + "metadata": { + "description": "**⚠️ WARNING ⚠️**\n\n_Please note that metadata provided in a transaction will be\nstored on the blockchain forever. Make sure not to include any sensitive data,\nin particular personally identifiable information (PII)._\n\nExtra application data attached to the transaction.\n\nCardano allows users and developers to embed their own\nauthenticated metadata when submitting transactions. Metadata can\nbe expressed as a JSON object with some restrictions:\n\n1. All top-level keys must be integers between `0` and `2^64 - 1`.\n\n2. Each metadata value is tagged with its type.\n\n3. Strings must be at most 64 bytes when UTF-8 encoded.\n\n4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.\n\nMetadata aren't stored as JSON on the Cardano blockchain but are\ninstead stored using a compact binary encoding (CBOR).\n\nThe binary encoding of metadata values supports three simple types:\n\n* Integers in the range `-(2^64 - 1)` to `2^64 - 1`\n* Strings (UTF-8 encoded)\n* Bytestrings\n\nAnd two compound types:\n\n* Lists of metadata values\n* Mappings from metadata values to metadata values\n\nIt is possible to transform any JSON object into this schema.\n\nHowever, if your application uses floating point values, they will\nneed to be converted somehow, according to your\nrequirements. Likewise for `null` or `bool` values. When reading\nmetadata from chain, be aware that integers may exceed the\njavascript numeric range, and may need special \"bigint\" parsing.\n", + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TransactionMetadataValue" + }, + "example": { + "0": { + "string": "cardano" + }, + "1": { + "int": 14 + }, + "2": { + "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" + }, + "3": { + "list": [ + { + "int": 14 + }, + { + "int": 42 + }, + { + "string": "1337" + } + ] + }, + "4": { + "map": [ + { + "k": { + "string": "key" + }, + "v": { + "string": "value" + } + }, + { + "k": { + "int": 14 + }, + "v": { + "int": 42 + } + } + ] + } + } + } + } + } + } + } + } + } + } + }, + "get": { + "operationId": "getByronWalletMigrationInfo", + "tags": [ + "Byron Migrations" + ], + "summary": "Calculate Cost", + "description": "

status: stable

\n\nCalculate the exact cost of sending all funds from particular Byron wallet to\na set of addresses.\n", + "parameters": [ + { + "in": "path", + "name": "walletId", + "required": true, + "schema": { + "type": "string", + "format": "hex", + "maxLength": 40, + "minLength": 40 + } + } + ], + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a given walletId does not match with any known\nwallets (because it has been deleted, or has never existed).\n" + }, + "code": { + "type": "string", + "enum": [ + "no_such_wallet" + ] + } + }, + "title": "no_such_wallet" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when trying to migrate a wallet that is empty or full of dust." + }, + "code": { + "type": "string", + "enum": [ + "nothing_to_migrate" + ] + } + }, + "title": "nothing_to_migrate" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "migration_cost", + "leftovers" + ], + "properties": { + "migration_cost": { + "description": "Total amount which will be paid as fees for the migration.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "leftovers": { + "description": "Leftovers dust coins which won't be migrated nor spent as fees.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + } + } + } + } + } + } + } + } + }, + "/network/information": { + "get": { + "operationId": "getNetworkInformation", + "tags": [ + "Network" + ], + "summary": "Information", + "description": "

status: stable

\n", + "responses": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "sync_progress", + "node_tip", + "node_era" + ], + "properties": { + "sync_progress": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "ready", + "syncing", + "not_responding" + ] + }, + "progress": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + }, + "description": "\nif: status == syncing\n
\n" + } + }, + "example": { + "status": "ready" + }, + "description": "Estimated synchronization progress of the node with the underlying network. Note that this may\nchange quite arbitrarily as the node may switch to shorter or longer chain forks.\n" + }, + "node_tip": { + "description": "Underlying node's tip", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time", + "height" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "height": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + } + } + }, + "network_tip": { + "description": "The time slot corresponding the network tip.", + "type": "object", + "required": [ + "absolute_slot_number", + "slot_number", + "epoch_number", + "time" + ], + "properties": { + "absolute_slot_number": { + "type": "integer", + "description": "The 0-based slot index starting from genesis of the blockchain.", + "minimum": 0, + "example": 8086 + }, + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "slot_number": { + "type": "integer", + "description": "The zero-based slot index within an epoch.", + "minimum": 0, + "example": 1337 + }, + "time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "next_epoch": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + } + }, + "node_era": { + "type": "string", + "enum": [ + "byron", + "shelley", + "allegra", + "mary" + ] + } + } + } + } + } + } + } + } + }, + "/network/clock": { + "get": { + "operationId": "getNetworkClock", + "tags": [ + "Network" + ], + "summary": "Clock", + "description": "

status: stable

\n", + "parameters": [ + { + "in": "query", + "name": "forceNtpCheck", + "allowEmptyValue": true, + "description": "NTP checks are cached for short duration to avoid sending too many queries to the central NTP servers. In some cases however, a client may want to force a new check.\n\nWhen this flag is set, the request **will block** until NTP server responds or will timeout after a while without any answer from the NTP server.\n", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "[Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) information of the server.\n\n**Important:** This piece of information only makes sense when the server runs on the same host machine as the node.\n", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "available", + "unavailable", + "pending" + ] + }, + "offset": { + "type": "object", + "description": "\nif: status == available\n
\nDrift offset of the local clock.\n", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "example": 14 + }, + "unit": { + "type": "string", + "enum": [ + "microsecond" + ] + } + } + } + } + } + } + } + } + } + } + }, + "/network/parameters": { + "get": { + "operationId": "getNetworkParameters", + "tags": [ + "Network" + ], + "summary": "Parameters", + "description": "

status: stable

\n\nReturns the set of network parameters for the current epoch.\n", + "responses": { + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "genesis_block_hash", + "blockchain_start_time", + "slot_length", + "epoch_length", + "security_parameter", + "active_slot_coefficient", + "decentralization_level", + "desired_pool_number", + "minimum_utxo_value", + "eras" + ], + "properties": { + "genesis_block_hash": { + "description": "The hash of genesis block", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "3c07030e36bfffe67e2e2ec09e5293d384637cd2f004356ef320f3fe6c52041a" + }, + "blockchain_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + }, + "slot_length": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "example": 10 + }, + "unit": { + "type": "string", + "enum": [ + "second" + ] + } + } + }, + "epoch_length": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000 + }, + "unit": { + "type": "string", + "enum": [ + "slot" + ] + } + } + }, + "security_parameter": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 1337 + }, + "unit": { + "type": "string", + "enum": [ + "block" + ], + "example": "block" + } + } + }, + "active_slot_coefficient": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + } + }, + "decentralization_level": { + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "number", + "minimum": 0, + "maximum": 100, + "example": 42 + }, + "unit": { + "type": "string", + "enum": [ + "percent" + ] + } + } + }, + "desired_pool_number": { + "type": "integer", + "minimum": 0, + "example": 100 + }, + "minimum_utxo_value": { + "description": "Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead.", + "type": "object", + "required": [ + "quantity", + "unit" + ], + "properties": { + "quantity": { + "type": "integer", + "minimum": 0, + "example": 42000000 + }, + "unit": { + "type": "string", + "enum": [ + "lovelace" + ] + } + } + }, + "eras": { + "type": "object", + "properties": { + "byron": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "shelley": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "allegra": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + }, + "mary": { + "type": "object", + "required": [ + "epoch_number", + "epoch_start_time" + ], + "properties": { + "epoch_number": { + "type": "integer", + "description": "An epoch is a time period which is divided into slots.", + "minimum": 0, + "example": 14 + }, + "epoch_start_time": { + "type": "string", + "format": "iso-8601-date-and-time", + "example": "2019-02-27T14:46:45+00:00" + } + }, + "nullable": true + } + }, + "description": "\nIf and when each era started or will start.\n\nThe object is keyed by era names. The values either describe the epoch boundary\nwhen the era starts (can be in the future or in the past), or are null if not yet\nconfirmed on-chain.\n\nIf you need to know the current era, see the `node_era` field of\n`GET /network/information`.\n\n> Due to complications with our current tooling, we cannot mark the era names\n> as required, but the keys are in fact always present.\n" + } + } + } + } + } + } + } + } + }, + "/proxy/transactions": { + "post": { + "operationId": "postExternalTransaction", + "tags": [ + "Proxy" + ], + "summary": "Submit External Transaction", + "description": "

status: stable

\n\nSubmits a transaction that was created and signed outside of cardano-wallet.\n", + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "description": "Signed transaction message binary blob.", + "type": "string", + "format": "binary" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "A unique identifier for this transaction", + "type": "string", + "format": "hex", + "maxLength": 64, + "minLength": 64, + "example": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1" + } + } + } + } + } + } + } + } + }, + "/addresses/{addressId}": { + "get": { + "operationId": "inspectAddress", + "tags": [ + "Addresses" + ], + "summary": "Inspect Address", + "description": "

status: stable

\n\nGive useful information about the structure of a given address.\n", + "parameters": [ + { + "in": "path", + "name": "addressId", + "required": true, + "schema": { + "type": "string", + "format": "base58", + "example": "DdzFFzCqrhtCNjPk5Lei7E1FxnoqMoAYtJ8VjAWbFmDb614nNBWBwv3kt6QHJa59cGezzf6piMWsbK7sWRB5sv325QqWdRuusMqqLdMt" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "address_style", + "stake_reference" + ], + "properties": { + "address_style": { + "type": "string", + "enum": [ + "Shelley", + "Icarus", + "Byron" + ] + }, + "stake_reference": { + "type": "string", + "enum": [ + "none", + "by value", + "by pointer" + ] + }, + "network_tag": { + "description": "Can be null for 'Icarus' and 'Byron' styles.", + "type": "integer", + "minimum": 0 + }, + "spending_key_hash": { + "type": "string", + "format": "base16", + "minLength": 56, + "maxLength": 56 + }, + "stake_key_hash": { + "type": "string", + "format": "base16", + "minLength": 56, + "maxLength": 56 + }, + "script_hash": { + "type": "string", + "format": "base16", + "minLength": 64, + "maxLength": 64 + }, + "pointer": { + "type": "object", + "additionalProperties": false, + "required": [ + "slot_num", + "transaction_index", + "output_index" + ], + "properties": { + "slot_num": { + "type": "integer", + "minimum": 0 + }, + "transaction_index": { + "type": "integer", + "minimum": 0 + }, + "output_index": { + "type": "integer", + "minimum": 0 + } + } + }, + "address_root": { + "description": "Only for 'Icarus' and 'Byron' styles.", + "type": "string", + "format": "base16" + }, + "derivation_path": { + "description": "Only for 'Byron' style.", + "type": "string", + "format": "base16" + } + } + } + } + } + } + } + } + }, + "/addresses": { + "post": { + "operationId": "postAnyAddress", + "tags": [ + "Addresses" + ], + "summary": "Construct Address", + "description": "

status: stable

\n\nConstruct any address by specyfying credential for payment or stake.\n\nIn Cardano, Addresses are made of three parts:\n\n```\n*---------*---------*-------*\n| NETWORK | PAYMENT | STAKE |\n*---------*---------*-------*\n```\n\nThe `NETWORK` part allows for distinguishing addresses between different networks like the mainnet or the testnet. It is implicitly\nhandled by the server without you having to worry about it. The `PAYMENT` and `STAKE` parts however can be constructed similarly, using\neither:\n\n- A public key\n- A script\n\nThe script itself is either constructed out of a public key, or one of the three following primitives:\n\n- all\n- any\n- some\n\nEach of which contains one or more script(s) that can be either keys or primitives, and so on. Schematically:\n\n```\n ┏─────────┓\nSCRIPT = ──┬───────────────────────┤ pub key ├─────────────────────┬──\n │ ┗─────────┛ │\n │ ╭─────╮ ╭────────╮ │\n ├──┤ ALL ├───┤ SCRIPT ├─┬───────────────────────────────┤\n │ ╰─────╯ ^ ╰────────╯ │ │\n │ │ ╭───╮ │ │\n │ └───┤ , ├────┘ │\n │ ╰───╯ │\n │ ╭─────╮ ╭────────╮ │\n ├──┤ ALL ├───┤ SCRIPT ├─┬───────────────────────────────┤\n │ ╰─────╯ ^ ╰────────╯ │ │\n │ │ ╭───╮ │ │\n │ └───┤ , ├────┘ │\n │ ╰───╯ │\n │ ╭──────╮ ╭──────────╮ ┏───┓ ╭──────╮ ╭────────╮ │\n └──┤ SOME ├─┤ AT_LEAST ├─┤ n ├─┤ FROM ├───┤ SCRIPT ├─┬──┘\n ╰──────╯ ╰──────────╯ ┗───┛ ╰──────╯ ^ ╰────────╯ │\n │ ╭───╮ │\n └───┤ , ├────┘\n ╰───╯\n```\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "nullable": false, + "properties": { + "payment": { + "nullable": false, + "oneOf": [ + { + "description": "A public key (public key without chain code) for credential - 32 bytes", + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk))1[0-9a-z]*$", + "example": [ + "stake_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d", + "addr_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7q3yvuv2" + ], + "title": "public key" + }, + { + "oneOf": [ + { + "title": "Key Hash", + "description": "Leaf value for a script designating a required verification key hash.", + "type": "string", + "format": "bech32", + "pattern": "^(script_vkh)1[0-9a-z]*$" + }, + { + "title": "All", + "type": "object", + "required": [ + "all" + ], + "properties": { + "all": { + "description": "Script primitive for which all signing keys corresponding to all list elements' verification keys are expected to make the script valid.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Any", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "description": "Script primitive for which a signing key corresponding to any of the list elements' verification keys is expected to make the script valid. It is equivalent to `some` with `\"at_least\"=1`.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Some", + "type": "object", + "required": [ + "some" + ], + "properties": { + "some": { + "description": "Script primitive for which at least a given number of signing keys corresponding to the list elements' verification keys are expected to make the script valid.", + "type": "object", + "required": [ + "at_least", + "from" + ], + "properties": { + "at_least": { + "type": "integer", + "minimum": 1 + }, + "from": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + } + } + } + ], + "title": "script" + } + ], + "example": { + "any": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + { + "all": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms" + ] + }, + { + "any": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + { + "all": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt36ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms" + ] + } + ] + }, + { + "some": { + "at_least": 2, + "from": [ + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt37ms", + "script_vkh18srsxr3khll7vl3w9mqfu55n6wzxxlxj7qzr2mhnyreluzt38ms" + ] + } + } + ] + } + }, + "stake": { + "nullable": false, + "oneOf": [ + { + "description": "A public key (public key without chain code) for credential - 32 bytes", + "type": "string", + "format": "bech32", + "pattern": "^((addr_vk)|(stake_vk))1[0-9a-z]*$", + "example": [ + "stake_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d", + "addr_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7q3yvuv2" + ], + "title": "public key" + }, + { + "oneOf": [ + { + "title": "Key Hash", + "description": "Leaf value for a script designating a required verification key hash.", + "type": "string", + "format": "bech32", + "pattern": "^(script_vkh)1[0-9a-z]*$" + }, + { + "title": "All", + "type": "object", + "required": [ + "all" + ], + "properties": { + "all": { + "description": "Script primitive for which all signing keys corresponding to all list elements' verification keys are expected to make the script valid.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Any", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "description": "Script primitive for which a signing key corresponding to any of the list elements' verification keys is expected to make the script valid. It is equivalent to `some` with `\"at_least\"=1`.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + }, + { + "title": "Some", + "type": "object", + "required": [ + "some" + ], + "properties": { + "some": { + "description": "Script primitive for which at least a given number of signing keys corresponding to the list elements' verification keys are expected to make the script valid.", + "type": "object", + "required": [ + "at_least", + "from" + ], + "properties": { + "at_least": { + "type": "integer", + "minimum": 1 + }, + "from": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/ScriptValue" + } + } + } + } + } + } + ], + "title": "script" + } + ], + "example": "stake_vk16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d" + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "code": { + "type": "string", + "description": "A specific error code for this error, more precise than HTTP ones.", + "example": "an_error_code" + } + } + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "A Shelley address representing either enterprise, reward account or delegating address", + "type": "string", + "format": "bech32", + "pattern": "^((addr)|(stake)|(addr_test)|(stake_test))1[0-9a-z]*$", + "example": [ + "stake17xt2z3pa7etaxp7jurdg0m8jhsmtp4r2z56pd3a5q3jhxycdxzmx9", + "addr1wy5np0m5x03tax3kcdh6e2cet98qcfs80wtv4cyvl5taclc6dnd8e", + "addr1xy5np0m5x03tax3kcdh6e2cet98qcfs80wtv4cyvl5tacluk59zrmajh6vra9cx6slk090pkkr2x59f5zmrmgpr9wvfs37hjk4" + ] + } + } + } + } + } + } + } + } + }, + "/settings": { + "put": { + "operationId": "putSettings", + "tags": [ + "Settings" + ], + "summary": "Update settings", + "description": "

status: stable

\n\nOverwrite current settings.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "settings": { + "description": "Settings", + "type": "object", + "required": [ + "pool_metadata_source" + ], + "properties": { + "pool_metadata_source": { + "description": "Select stake pool metadata fetching strategy:\n - `none` - metadata is not fetched at all,\n - `direct` - metadata is fetched directly URLs registered on chain,\n - `uri` - metadata is fetched from an external Stake-Pool Metadata Aggregation Server (SMASH)\n\nAfter update existing metadata will be dropped forcing it to re-sync automatically with the new setting.\n", + "type": "string", + "pattern": "^(none|direct|https?:\\/\\/[a-zA-Z0-9-_~.]+(:[0-9]+)?/?)$", + "example": "https://smash.cardano-mainnet.iohk.io/" + } + } + } + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Content-Type' header." + }, + "code": { + "type": "string", + "enum": [ + "unsupported_media_type" + ] + } + }, + "title": "unsupported_media_type" + } + } + } + }, + "204": { + "description": "No Content" + } + } + }, + "get": { + "operationId": "getSettings", + "tags": [ + "Settings" + ], + "summary": "Get settings", + "description": "

status: stable

\n\nReturn the current settings.\n", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "pool_metadata_source" + ], + "properties": { + "pool_metadata_source": { + "description": "Pool metadata source. This sets the metadata fetching strategy.\n\nPossible values are\n * none -> no fetching\n * direct -> direct fetching\n * uri -> use SMASH server\n", + "type": "string", + "pattern": "^(none|direct|https?:\\/\\/[a-zA-Z0-9-_~.]+(:[0-9]+)?/?)$", + "example": "https://smash.cardano-mainnet.iohk.io/" + } + } + } + } + } + } + } + } + }, + "/smash/health": { + "get": { + "operationId": "getCurrentSmashHealth", + "tags": [ + "Utils" + ], + "summary": "Current SMASH health", + "description": "Get health status of the currently active SMASH server.\n", + "parameters": [ + { + "in": "query", + "name": "url", + "schema": { + "type": "string", + "pattern": "^https?:\\/\\/[a-zA-Z0-9-_~.]+(:[0-9]+)?/?$", + "example": "https://smash.cardano-mainnet.iohk.io/", + "description": "A base SMASH uri without endpoint path." + }, + "required": false, + "description": "check this url for health instead of the currently configured one" + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when a request is not well-formed; that is, it fails to parse\nsuccessfully. This could be the case when some required parameters\nare missing or, when malformed values are provided.\n" + }, + "code": { + "type": "string", + "enum": [ + "bad_request" + ] + } + }, + "title": "bad_request" + } + } + } + }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "May occur when providing an invalid 'Accept' header." + }, + "code": { + "type": "string", + "enum": [ + "not_acceptable" + ] + } + }, + "title": "not_acceptable" + } + } + } + }, + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "health" + ], + "properties": { + "health": { + "type": "string", + "enum": [ + "available", + "unavailable", + "unreachable", + "no_smash_configured" + ] + } + }, + "description": "The status of the SMASH server. Possible values are:\n\nhealth | description\n--- | ---\n`\"available\"` | server is awaiting your requests\n`\"unavailable\"` | server is running, but currently unavailable, try again in a short time\n`\"unreachable\"` | server could not be reached or didn't return a health status\n`\"no_smash_configured\"` | SMASH is currently not configured, adjust the Settings first\n" + } + } + } + } + } + } + } + } +} diff --git a/specifications/api/swagger.yaml b/specifications/api/swagger.yaml index ee74407b24d..b74e4cf5042 100644 --- a/specifications/api/swagger.yaml +++ b/specifications/api/swagger.yaml @@ -1718,6 +1718,7 @@ components: required: - id - balance + - assets - discovery - name - state @@ -1725,6 +1726,7 @@ components: properties: id: *walletId balance: *byronWalletBalance + assets: *walletAssetsBalance discovery: *walletDiscovery name: *walletName passphrase: *walletPassphraseInfo