Rename folders (#97)

* Rename arkd folder & drop cli

* Rename ark cli folder & update docs

* Update readme

* Fix

* scripts: add build-all

* Add target to build cli for all platforms

* Update build scripts

---------

Co-authored-by: tiero <3596602+tiero@users.noreply.github.com>
This commit is contained in:
Pietralberto Mazza
2024-02-09 19:32:58 +01:00
committed by GitHub
parent 0d8c7bffb2
commit dc00d60585
119 changed files with 154 additions and 449 deletions

View File

@@ -0,0 +1,568 @@
{
"swagger": "2.0",
"info": {
"title": "ark/v1/service.proto",
"version": "version not set"
},
"tags": [
{
"name": "ArkService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/events": {
"get": {
"operationId": "ArkService_GetEventStream",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/v1GetEventStreamResponse"
},
"error": {
"$ref": "#/definitions/rpcStatus"
}
},
"title": "Stream result of v1GetEventStreamResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"ArkService"
]
}
},
"/v1/faucet/{address}": {
"post": {
"operationId": "ArkService_Faucet",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1FaucetResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"ArkService"
]
}
},
"/v1/payment/claim": {
"post": {
"operationId": "ArkService_ClaimPayment",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1ClaimPaymentResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1ClaimPaymentRequest"
}
}
],
"tags": [
"ArkService"
]
}
},
"/v1/payment/finalize": {
"post": {
"operationId": "ArkService_FinalizePayment",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1FinalizePaymentResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1FinalizePaymentRequest"
}
}
],
"tags": [
"ArkService"
]
}
},
"/v1/payment/register": {
"post": {
"operationId": "ArkService_RegisterPayment",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1RegisterPaymentResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1RegisterPaymentRequest"
}
}
],
"tags": [
"ArkService"
]
}
},
"/v1/ping/{paymentId}": {
"get": {
"operationId": "ArkService_Ping",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1PingResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "paymentId",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"ArkService"
]
}
},
"/v1/pubkey": {
"get": {
"operationId": "ArkService_GetPubkey",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1GetPubkeyResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"ArkService"
]
}
},
"/v1/round/{txid}": {
"get": {
"operationId": "ArkService_GetRound",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1GetRoundResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "txid",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"ArkService"
]
}
},
"/v1/vtxos/{address}": {
"get": {
"operationId": "ArkService_ListVtxos",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1ListVtxosResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"ArkService"
]
}
}
},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"v1ClaimPaymentRequest": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Mocks wabisabi's credentials."
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Output"
},
"description": "List of receivers for a registered payment."
}
}
},
"v1ClaimPaymentResponse": {
"type": "object"
},
"v1FaucetResponse": {
"type": "object"
},
"v1FinalizePaymentRequest": {
"type": "object",
"properties": {
"signedForfeitTxs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Forfeit txs signed by the user."
}
}
},
"v1FinalizePaymentResponse": {
"type": "object"
},
"v1GetEventStreamResponse": {
"type": "object",
"properties": {
"roundFinalization": {
"$ref": "#/definitions/v1RoundFinalizationEvent"
},
"roundFinalized": {
"$ref": "#/definitions/v1RoundFinalizedEvent"
},
"roundFailed": {
"$ref": "#/definitions/v1RoundFailed"
}
}
},
"v1GetPubkeyResponse": {
"type": "object",
"properties": {
"pubkey": {
"type": "string"
}
}
},
"v1GetRoundResponse": {
"type": "object",
"properties": {
"round": {
"$ref": "#/definitions/v1Round"
}
}
},
"v1Input": {
"type": "object",
"properties": {
"txid": {
"type": "string"
},
"vout": {
"type": "integer",
"format": "int64"
}
}
},
"v1ListVtxosResponse": {
"type": "object",
"properties": {
"vtxos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Vtxo"
}
}
}
},
"v1Node": {
"type": "object",
"properties": {
"txid": {
"type": "string"
},
"tx": {
"type": "string"
},
"parentTxid": {
"type": "string"
}
}
},
"v1Output": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "Either the offchain or onchain address."
},
"amount": {
"type": "string",
"format": "uint64",
"description": "Amount to send in satoshis."
}
}
},
"v1PingResponse": {
"type": "object"
},
"v1RegisterPaymentRequest": {
"type": "object",
"properties": {
"inputs": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Input"
}
}
}
},
"v1RegisterPaymentResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Mocks wabisabi's credentials."
}
}
},
"v1Round": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"start": {
"type": "string",
"format": "int64"
},
"end": {
"type": "string",
"format": "int64"
},
"txid": {
"type": "string"
},
"congestionTree": {
"$ref": "#/definitions/v1Tree"
}
}
},
"v1RoundFailed": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"reason": {
"type": "string"
}
}
},
"v1RoundFinalizationEvent": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"poolPartialTx": {
"type": "string"
},
"forfeitTxs": {
"type": "array",
"items": {
"type": "string"
}
},
"congestionTree": {
"$ref": "#/definitions/v1Tree"
}
}
},
"v1RoundFinalizedEvent": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"poolTxid": {
"type": "string"
}
}
},
"v1Tree": {
"type": "object",
"properties": {
"levels": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1TreeLevel"
}
}
}
},
"v1TreeLevel": {
"type": "object",
"properties": {
"nodes": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Node"
}
}
}
},
"v1Vtxo": {
"type": "object",
"properties": {
"outpoint": {
"$ref": "#/definitions/v1Input"
},
"receiver": {
"$ref": "#/definitions/v1Output"
},
"spent": {
"type": "boolean"
},
"poolTxid": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,325 @@
{
"swagger": "2.0",
"info": {
"title": "ocean/v1/account.proto",
"version": "version not set"
},
"tags": [
{
"name": "AccountService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"TemplateFormat": {
"type": "string",
"enum": [
"FORMAT_UNSPECIFIED",
"FORMAT_DESCRIPTOR",
"FORMAT_MINISCRIPT",
"FORMAT_IONIO",
"FORMAT_RAW"
],
"default": "FORMAT_UNSPECIFIED"
},
"googlerpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"v1AccountInfo": {
"type": "object",
"properties": {
"namespace": {
"type": "string",
"description": "Account namespace."
},
"label": {
"type": "string",
"description": "Account label."
},
"derivationPath": {
"type": "string",
"description": "Derivation path."
},
"xpubs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Xpubs."
},
"masterBlindingKey": {
"type": "string",
"description": "The master blinding key of the account to derive blinding keypairs from."
}
}
},
"v1BalanceInfo": {
"type": "object",
"properties": {
"confirmedBalance": {
"type": "string",
"format": "uint64",
"description": "Balance of utxos with 1+ confirmations."
},
"unconfirmedBalance": {
"type": "string",
"format": "uint64",
"description": "Balance of utxos with no confirmations."
},
"lockedBalance": {
"type": "string",
"format": "uint64",
"description": "Balance of locked utxos."
},
"totalBalance": {
"type": "string",
"format": "uint64",
"description": "Total balance."
}
}
},
"v1BalanceResponse": {
"type": "object",
"properties": {
"balance": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/v1BalanceInfo"
},
"description": "The balance (total, confirmed, unconfirmed) per each asset."
}
}
},
"v1BlockDetails": {
"type": "object",
"properties": {
"hash": {
"type": "string",
"description": "Hash of the block."
},
"height": {
"type": "string",
"format": "uint64",
"description": "Heighth (index) of the block."
},
"timestamp": {
"type": "string",
"format": "int64",
"description": "Timestamp of the block."
}
}
},
"v1CreateAccountBIP44Response": {
"type": "object",
"properties": {
"info": {
"$ref": "#/definitions/v1AccountInfo",
"description": "Info about the new account."
}
}
},
"v1CreateAccountCustomResponse": {
"type": "object",
"properties": {
"info": {
"$ref": "#/definitions/v1AccountInfo",
"description": "Info about the new account."
}
}
},
"v1CreateAccountMultiSigResponse": {
"type": "object",
"properties": {
"info": {
"$ref": "#/definitions/v1AccountInfo",
"description": "Info about the new account."
}
}
},
"v1DeleteAccountResponse": {
"type": "object"
},
"v1DeriveAddressesResponse": {
"type": "object",
"properties": {
"addresses": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"v1DeriveChangeAddressesResponse": {
"type": "object",
"properties": {
"addresses": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"v1ListAddressesResponse": {
"type": "object",
"properties": {
"addresses": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"v1ListUtxosResponse": {
"type": "object",
"properties": {
"spendableUtxos": {
"$ref": "#/definitions/v1Utxos",
"description": "List of spendable utxos."
},
"lockedUtxos": {
"$ref": "#/definitions/v1Utxos",
"description": "List of currently locked utxos."
}
}
},
"v1SetAccountLabelResponse": {
"type": "object",
"properties": {
"info": {
"$ref": "#/definitions/v1AccountInfo",
"description": "Info about the updated account."
}
}
},
"v1SetAccountTemplateResponse": {
"type": "object"
},
"v1Template": {
"type": "object",
"properties": {
"format": {
"$ref": "#/definitions/TemplateFormat"
},
"value": {
"type": "string"
}
}
},
"v1Utxo": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "Txid of the uxo."
},
"index": {
"type": "integer",
"format": "int64",
"description": "Output index."
},
"asset": {
"type": "string",
"description": "Asset."
},
"value": {
"type": "string",
"format": "uint64",
"description": "Value."
},
"script": {
"type": "string",
"description": "Script."
},
"assetBlinder": {
"type": "string",
"description": "Asset blinder for confidential utxo."
},
"valueBlinder": {
"type": "string",
"description": "Value blinder for confidential utxo."
},
"accountName": {
"type": "string",
"description": "Namespace of the account owning the utxo."
},
"spentStatus": {
"$ref": "#/definitions/v1UtxoStatus",
"description": "Info about utxo's spent status."
},
"confirmedStatus": {
"$ref": "#/definitions/v1UtxoStatus",
"description": "Info about utxo's confirmation status."
},
"redeemScript": {
"type": "string",
"description": "Redeem script locking the utxo in case its owned by a multisig account."
}
}
},
"v1UtxoStatus": {
"type": "object",
"properties": {
"txid": {
"type": "string"
},
"blockInfo": {
"$ref": "#/definitions/v1BlockDetails"
},
"txhex": {
"type": "string"
}
}
},
"v1Utxos": {
"type": "object",
"properties": {
"accountName": {
"type": "string",
"description": "Account namespace."
},
"utxos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Utxo"
},
"description": "List of utxos."
}
}
}
}
}

View File

@@ -0,0 +1,265 @@
{
"swagger": "2.0",
"info": {
"title": "ocean/v1/notification.proto",
"version": "version not set"
},
"tags": [
{
"name": "NotificationService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"googlerpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"v1AddWebhookResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id of the new webhook."
}
}
},
"v1BlockDetails": {
"type": "object",
"properties": {
"hash": {
"type": "string",
"description": "Hash of the block."
},
"height": {
"type": "string",
"format": "uint64",
"description": "Heighth (index) of the block."
},
"timestamp": {
"type": "string",
"format": "int64",
"description": "Timestamp of the block."
}
}
},
"v1ListWebhooksResponse": {
"type": "object",
"properties": {
"webhookInfo": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1WebhookInfo"
},
"description": "The list of info about the webhooks regitered for an action."
}
}
},
"v1RemoveWebhookResponse": {
"type": "object"
},
"v1TransactionNotificationsResponse": {
"type": "object",
"properties": {
"eventType": {
"$ref": "#/definitions/v1TxEventType",
"description": "Tx event type."
},
"accountNames": {
"type": "array",
"items": {
"type": "string"
},
"description": "Account names."
},
"txhex": {
"type": "string",
"description": "Tx in hex format."
},
"txid": {
"type": "string",
"description": "Txid of transaction."
},
"blockDetails": {
"$ref": "#/definitions/v1BlockDetails",
"description": "Details of the block including the tx."
}
}
},
"v1TxEventType": {
"type": "string",
"enum": [
"TX_EVENT_TYPE_UNSPECIFIED",
"TX_EVENT_TYPE_BROADCASTED",
"TX_EVENT_TYPE_UNCONFIRMED",
"TX_EVENT_TYPE_CONFIRMED"
],
"default": "TX_EVENT_TYPE_UNSPECIFIED",
"description": " - TX_EVENT_TYPE_BROADCASTED: Tx broadcasted.\n - TX_EVENT_TYPE_UNCONFIRMED: Tx unconfirmed.\n - TX_EVENT_TYPE_CONFIRMED: Tx confirmed."
},
"v1UnwatchExternalScriptResponse": {
"type": "object"
},
"v1Utxo": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "Txid of the uxo."
},
"index": {
"type": "integer",
"format": "int64",
"description": "Output index."
},
"asset": {
"type": "string",
"description": "Asset."
},
"value": {
"type": "string",
"format": "uint64",
"description": "Value."
},
"script": {
"type": "string",
"description": "Script."
},
"assetBlinder": {
"type": "string",
"description": "Asset blinder for confidential utxo."
},
"valueBlinder": {
"type": "string",
"description": "Value blinder for confidential utxo."
},
"accountName": {
"type": "string",
"description": "Namespace of the account owning the utxo."
},
"spentStatus": {
"$ref": "#/definitions/v1UtxoStatus",
"description": "Info about utxo's spent status."
},
"confirmedStatus": {
"$ref": "#/definitions/v1UtxoStatus",
"description": "Info about utxo's confirmation status."
},
"redeemScript": {
"type": "string",
"description": "Redeem script locking the utxo in case its owned by a multisig account."
}
}
},
"v1UtxoEventType": {
"type": "string",
"enum": [
"UTXO_EVENT_TYPE_UNSPECIFIED",
"UTXO_EVENT_TYPE_NEW",
"UTXO_EVENT_TYPE_CONFIRMED",
"UTXO_EVENT_TYPE_LOCKED",
"UTXO_EVENT_TYPE_UNLOCKED",
"UTXO_EVENT_TYPE_SPENT",
"UTXO_EVENT_TYPE_CONFIRMED_SPENT"
],
"default": "UTXO_EVENT_TYPE_UNSPECIFIED"
},
"v1UtxoStatus": {
"type": "object",
"properties": {
"txid": {
"type": "string"
},
"blockInfo": {
"$ref": "#/definitions/v1BlockDetails"
},
"txhex": {
"type": "string"
}
}
},
"v1UtxosNotificationsResponse": {
"type": "object",
"properties": {
"eventType": {
"$ref": "#/definitions/v1UtxoEventType",
"description": "The event's type occured for the utxos."
},
"utxos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Utxo"
},
"description": "List of utxos for which occured the event."
}
}
},
"v1WatchExternalScriptResponse": {
"type": "object",
"properties": {
"label": {
"type": "string"
}
}
},
"v1WebhookEventType": {
"type": "string",
"enum": [
"WEBHOOK_EVENT_TYPE_UNSPECIFIED",
"WEBHOOK_EVENT_TYPE_TRANSACTION",
"WEBHOOK_EVENT_TYPE_UTXO"
],
"default": "WEBHOOK_EVENT_TYPE_UNSPECIFIED",
"description": " - WEBHOOK_EVENT_TYPE_TRANSACTION: Receive notification about transactions.\n - WEBHOOK_EVENT_TYPE_UTXO: Receive notifications about utxos."
},
"v1WebhookInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id of the webhook."
},
"endpoint": {
"type": "string",
"description": "The endpoint of the external service to reach."
},
"isSecured": {
"type": "boolean",
"description": "Whether the outgoing requests are authenticated."
}
}
}
}
}

View File

@@ -0,0 +1,393 @@
{
"swagger": "2.0",
"info": {
"title": "ocean/v1/transaction.proto",
"version": "version not set"
},
"tags": [
{
"name": "TransactionService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"SelectUtxosRequestStrategy": {
"type": "string",
"enum": [
"STRATEGY_UNSPECIFIED",
"STRATEGY_BRANCH_BOUND",
"STRATEGY_FRAGMENT"
],
"default": "STRATEGY_UNSPECIFIED",
"description": "Coin-selection algorithm."
},
"googlerpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"v1BlindPsetResponse": {
"type": "object",
"properties": {
"pset": {
"type": "string",
"description": "Updated partial transaction with blinded inputs/outputs in base64 format."
}
}
},
"v1BlockDetails": {
"type": "object",
"properties": {
"hash": {
"type": "string",
"description": "Hash of the block."
},
"height": {
"type": "string",
"format": "uint64",
"description": "Heighth (index) of the block."
},
"timestamp": {
"type": "string",
"format": "int64",
"description": "Timestamp of the block."
}
}
},
"v1BroadcastTransactionResponse": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "Hash of the broadcasted transaction."
}
}
},
"v1BurnResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Signed tx in hex format."
}
}
},
"v1ClaimPegInResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Signed tx in hex format."
}
}
},
"v1CreatePsetResponse": {
"type": "object",
"properties": {
"pset": {
"type": "string",
"description": "New partial transaction in base64 format."
}
}
},
"v1EstimateFeesResponse": {
"type": "object",
"properties": {
"feeAmount": {
"type": "string",
"format": "uint64"
}
}
},
"v1GetTransactionResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Raw transaction in hex format."
},
"blockDetails": {
"$ref": "#/definitions/v1BlockDetails",
"description": "Deatils of the block including the transaction."
}
}
},
"v1Input": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "Previous output txid."
},
"index": {
"type": "integer",
"format": "int64",
"description": "Previous tx output index."
},
"script": {
"type": "string",
"description": "Prevout script."
},
"scriptsigSize": {
"type": "string",
"format": "uint64",
"description": "Input scriptsig size."
},
"witnessSize": {
"type": "string",
"format": "uint64",
"description": "Input witness size."
}
}
},
"v1MintResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Signed tx in hex format."
}
}
},
"v1Output": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"description": "Asset hash."
},
"amount": {
"type": "string",
"format": "uint64",
"description": "Sent amount."
},
"address": {
"type": "string",
"description": "Address to send funds to."
},
"script": {
"type": "string",
"description": "ScriptPubkey to send funds to (alternative to address)."
},
"blindingPubkey": {
"type": "string",
"description": "Blinding public key to make output confidential (alternative to address)."
}
}
},
"v1PegInAddressResponse": {
"type": "object",
"properties": {
"accountName": {
"type": "string",
"description": "Account name."
},
"mainChainAddress": {
"type": "string",
"description": "Main-chain deposit address to send bitcoin to."
},
"claimScript": {
"type": "string",
"description": "Claim script committed to by the main-chain address."
}
}
},
"v1RemintResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Signed tx in hex format."
}
}
},
"v1SelectUtxosResponse": {
"type": "object",
"properties": {
"utxos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Utxo"
},
"description": "List of selected utxos."
},
"change": {
"type": "string",
"format": "uint64",
"description": "Eventual change amount if utxos cumulative sum exceeds the target amount."
},
"expirationDate": {
"type": "string",
"format": "int64",
"description": "Expiration date for the selected utxo, which are temporary locked to\nprevent double spending them."
}
}
},
"v1SignPsetResponse": {
"type": "object",
"properties": {
"pset": {
"type": "string",
"description": "Signed partial transaction in base64 format."
}
}
},
"v1SignPsetWithSchnorrKeyResponse": {
"type": "object",
"properties": {
"signedTx": {
"type": "string"
}
}
},
"v1SignTransactionResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Raw signed transaction."
}
}
},
"v1TransferResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Signed tx in hex format."
}
}
},
"v1UnblindedInput": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"format": "int64",
"description": "Index of the pset input."
},
"asset": {
"type": "string",
"description": "Revealed prevout asset."
},
"amount": {
"type": "string",
"format": "uint64",
"description": "Revealed prevout amount."
},
"assetBlinder": {
"type": "string",
"description": "Prevout asset blinder."
},
"amountBlinder": {
"type": "string",
"description": "Prevout amount blinder."
}
}
},
"v1UpdatePsetResponse": {
"type": "object",
"properties": {
"pset": {
"type": "string",
"description": "Updated partial transaction in base64 format."
}
}
},
"v1Utxo": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "Txid of the uxo."
},
"index": {
"type": "integer",
"format": "int64",
"description": "Output index."
},
"asset": {
"type": "string",
"description": "Asset."
},
"value": {
"type": "string",
"format": "uint64",
"description": "Value."
},
"script": {
"type": "string",
"description": "Script."
},
"assetBlinder": {
"type": "string",
"description": "Asset blinder for confidential utxo."
},
"valueBlinder": {
"type": "string",
"description": "Value blinder for confidential utxo."
},
"accountName": {
"type": "string",
"description": "Namespace of the account owning the utxo."
},
"spentStatus": {
"$ref": "#/definitions/v1UtxoStatus",
"description": "Info about utxo's spent status."
},
"confirmedStatus": {
"$ref": "#/definitions/v1UtxoStatus",
"description": "Info about utxo's confirmation status."
},
"redeemScript": {
"type": "string",
"description": "Redeem script locking the utxo in case its owned by a multisig account."
}
}
},
"v1UtxoStatus": {
"type": "object",
"properties": {
"txid": {
"type": "string"
},
"blockInfo": {
"$ref": "#/definitions/v1BlockDetails"
},
"txhex": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,44 @@
{
"swagger": "2.0",
"info": {
"title": "ocean/v1/types.proto",
"version": "version not set"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"googlerpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
}
}
}

View File

@@ -0,0 +1,197 @@
{
"swagger": "2.0",
"info": {
"title": "ocean/v1/wallet.proto",
"version": "version not set"
},
"tags": [
{
"name": "WalletService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"GetInfoResponseNetwork": {
"type": "string",
"enum": [
"NETWORK_UNSPECIFIED",
"NETWORK_MAINNET",
"NETWORK_TESTNET",
"NETWORK_REGTEST"
],
"default": "NETWORK_UNSPECIFIED"
},
"googlerpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"v1AccountInfo": {
"type": "object",
"properties": {
"namespace": {
"type": "string",
"description": "Account namespace."
},
"label": {
"type": "string",
"description": "Account label."
},
"derivationPath": {
"type": "string",
"description": "Derivation path."
},
"xpubs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Xpubs."
},
"masterBlindingKey": {
"type": "string",
"description": "The master blinding key of the account to derive blinding keypairs from."
}
}
},
"v1AuthResponse": {
"type": "object",
"properties": {
"verified": {
"type": "boolean"
}
}
},
"v1BuildInfo": {
"type": "object",
"properties": {
"version": {
"type": "string",
"description": "Number of the version."
},
"commit": {
"type": "string",
"description": "Hash of the commit."
},
"date": {
"type": "string",
"description": "Date of the commit."
}
}
},
"v1ChangePasswordResponse": {
"type": "object"
},
"v1CreateWalletResponse": {
"type": "object"
},
"v1GenSeedResponse": {
"type": "object",
"properties": {
"mnemonic": {
"type": "string",
"description": "A mnemonic from where deriving signing and blinding key pairs."
}
}
},
"v1GetInfoResponse": {
"type": "object",
"properties": {
"network": {
"$ref": "#/definitions/GetInfoResponseNetwork",
"title": "The Liquid network of the wallet"
},
"nativeAsset": {
"type": "string",
"description": "The Liquid Bitcoin (LBTC) asset hash of the network."
},
"rootPath": {
"type": "string",
"description": "The root derivation path of the HD wallet."
},
"birthdayBlockHash": {
"type": "string",
"description": "The hash of the block at wallet creation time."
},
"birthdayBlockHeight": {
"type": "integer",
"format": "int64",
"description": "The height of the block at wallet creation time."
},
"accounts": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1AccountInfo"
},
"description": "List containing info about the wallet accounts."
},
"buildInfo": {
"$ref": "#/definitions/v1BuildInfo",
"description": "Info about the current version of the ocean wallet."
}
}
},
"v1LockResponse": {
"type": "object"
},
"v1RestoreWalletResponse": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "String message returned within the process."
}
}
},
"v1StatusResponse": {
"type": "object",
"properties": {
"initialized": {
"type": "boolean",
"description": "Whether the wallet is initialized with seeds."
},
"synced": {
"type": "boolean",
"description": "Whether the wallet is in sync, meaning it's keeping track of every utxo\nof every account."
},
"unlocked": {
"type": "boolean",
"description": "Whether the wallet is unlocked."
}
}
},
"v1UnlockResponse": {
"type": "object"
}
}
}