Skip to content

Commit a2d446c

Browse files
Merge pull request #69 from BitGo/update-bitgo-api-docs
Update API reference on BitGo Developer Portal
2 parents 2ede3ee + a90b458 commit a2d446c

File tree

1 file changed

+166
-0
lines changed

1 file changed

+166
-0
lines changed

api.yaml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18448,6 +18448,121 @@ paths:
1844818448
application/json:
1844918449
schema:
1845018450
$ref: '#/components/schemas/PlatformError3'
18451+
/api/v2/{coin}/wallet/{walletId}/state:
18452+
get:
18453+
tags:
18454+
- Express
18455+
summary: Lightning - Get node state
18456+
operationId: express.lightning.getState
18457+
description: Get the current state of the lightning node.
18458+
parameters:
18459+
- $ref: '#/components/parameters/pathLightningCoin'
18460+
- $ref: '#/components/parameters/pathWalletId'
18461+
responses:
18462+
'200':
18463+
description: OK
18464+
content:
18465+
application/json:
18466+
schema:
18467+
$ref: '#/components/schemas/ExpressLightningNodeStateResponse'
18468+
'400':
18469+
description: Bad Request
18470+
content:
18471+
application/json:
18472+
schema:
18473+
oneOf:
18474+
- $ref: '#/components/schemas/PlatformError3'
18475+
- $ref: '#/components/schemas/InvalidWalletId'
18476+
/api/v2/{coin}/wallet/{walletId}/initwallet:
18477+
post:
18478+
tags:
18479+
- Express
18480+
summary: Lightning - Initialize node
18481+
operationId: express.lightning.initWallet
18482+
description: Initialize a newly created Lightning Network Daemon (LND) for the first time. Returns the updated wallet with the encrypted admin macaroon in the 'coinSpecific' response field.
18483+
parameters:
18484+
- $ref: '#/components/parameters/pathLightningCoin'
18485+
- $ref: '#/components/parameters/pathWalletId'
18486+
requestBody:
18487+
content:
18488+
application/json:
18489+
schema:
18490+
$ref: '#/components/schemas/ExpressInitWalletRequest'
18491+
responses:
18492+
'200':
18493+
description: OK
18494+
content:
18495+
application/json:
18496+
schema:
18497+
$ref: '#/components/schemas/ExpressGenerateWalletResponse'
18498+
'400':
18499+
description: Bad Request
18500+
content:
18501+
application/json:
18502+
schema:
18503+
oneOf:
18504+
- $ref: '#/components/schemas/PlatformError3'
18505+
- $ref: '#/components/schemas/InvalidWalletId'
18506+
/api/v2/{coin}/wallet/{walletId}/signermacaroon:
18507+
post:
18508+
tags:
18509+
- Express
18510+
summary: Lightning - Create signer macaroon
18511+
operationId: express.lightning.signerMacaroon
18512+
description: Create the signer macaroon for the watch-only Lightning Network Daemon (LND) node. This macaroon derives from the signer node admin macaroon and is used by the watch-only node to request signatures from the signer node for operational tasks. Returns the updated wallet with the encrypted signer macaroon in the 'coinSpecific' response field.
18513+
parameters:
18514+
- $ref: '#/components/parameters/pathLightningCoin'
18515+
- $ref: '#/components/parameters/pathWalletId'
18516+
requestBody:
18517+
content:
18518+
application/json:
18519+
schema:
18520+
$ref: '#/components/schemas/ExpressGenerateSignerMacaroonRequest'
18521+
responses:
18522+
'200':
18523+
description: OK
18524+
content:
18525+
application/json:
18526+
schema:
18527+
$ref: '#/components/schemas/ExpressGenerateWalletResponse'
18528+
'400':
18529+
description: Bad Request
18530+
content:
18531+
application/json:
18532+
schema:
18533+
oneOf:
18534+
- $ref: '#/components/schemas/PlatformError3'
18535+
- $ref: '#/components/schemas/InvalidWalletId'
18536+
/api/v2/{coin}/wallet/{walletId}/unlockwallet:
18537+
post:
18538+
tags:
18539+
- Express
18540+
summary: Lightning - Unlock node
18541+
operationId: express.lightning.unlockWallet
18542+
description: Unlock the Lightning Network Daemon (LND) node with the given wallet password.
18543+
parameters:
18544+
- $ref: '#/components/parameters/pathLightningCoin'
18545+
- $ref: '#/components/parameters/pathWalletId'
18546+
requestBody:
18547+
content:
18548+
application/json:
18549+
schema:
18550+
$ref: '#/components/schemas/ExpressUnlockLightningWalletRequest'
18551+
responses:
18552+
'200':
18553+
description: OK
18554+
content:
18555+
application/json:
18556+
schema:
18557+
$ref: '#/components/schemas/ExpressUnlockLightningWalletResponse'
18558+
'400':
18559+
description: Bad Request
18560+
content:
18561+
application/json:
18562+
schema:
18563+
oneOf:
18564+
- $ref: '#/components/schemas/PlatformError3'
18565+
- $ref: '#/components/schemas/InvalidWalletId'
1845118566
/api/v2/{coin}/wallet/{walletId}/consolidateAccount:
1845218567
post:
1845318568
tags:
@@ -38514,6 +38629,11 @@ components:
3851438629
items:
3851538630
$ref: '#/components/schemas/AddressType'
3851638631
description: The address types for the change address. Order by preference and BitGo uses the first available. Any subset of 'p2sh', 'p2shP2wsh', 'p2wsh', 'p2tr' or 'p2trMusig2'.
38632+
LightningCoin:
38633+
title: Coin
38634+
description: A lightning coin name.
38635+
type: string
38636+
example: lnbtc
3851738637
CommitmentShare:
3851838638
type: object
3851938639
properties:
@@ -39330,6 +39450,27 @@ components:
3933039450
enum:
3933139451
- 1
3933239452
- 2
39453+
ExpressInitWalletRequest:
39454+
type: object
39455+
properties:
39456+
passphrase:
39457+
type: string
39458+
description: Passphrase to encrypt the admin macaroon of the signer node.
39459+
ExpressUnlockLightningWalletRequest:
39460+
type: object
39461+
properties:
39462+
passphrase:
39463+
type: string
39464+
description: Passphrase to decrypt the unlock the node.
39465+
ExpressGenerateSignerMacaroonRequest:
39466+
type: object
39467+
properties:
39468+
passphrase:
39469+
type: string
39470+
description: Passphrase to decrypt the admin macaroon of the signer node.
39471+
addIpCaveatToMacaroon:
39472+
type: boolean
39473+
description: If true, adds an IP caveat to the generated signer macaroon.
3933339474
ExpressConsolidateAccountRequest:
3933439475
type: object
3933539476
properties:
@@ -39745,6 +39886,25 @@ components:
3974539886
- signed
3974639887
- signed (suppressed)
3974739888
- pendingApproval
39889+
ExpressUnlockLightningWalletResponse:
39890+
type: object
39891+
properties:
39892+
message:
39893+
type: string
39894+
example: ok
39895+
ExpressLightningNodeStateResponse:
39896+
type: object
39897+
properties:
39898+
state:
39899+
description: Current state of the node
39900+
type: string
39901+
enum:
39902+
- NON_EXISTING
39903+
- LOCKED
39904+
- UNLOCKED
39905+
- RPC_ACTIVE
39906+
- SERVER_ACTIVE
39907+
- WAITING_TO_START
3974839908
ExpressSendConsolidationResponse:
3974939909
type: object
3975039910
properties:
@@ -52148,6 +52308,12 @@ components:
5214852308
type: string
5214952309
description: |
5215052310
A 'sequenceId' is a unique and arbitrary wallet identifier applied to transfers and transactions at creation. It is optional but highly recommended. With a 'sequenceId' you can easily reference transfers and transactions—for example, to safely retry sending. Because the system only confirms one send request per 'sequenceId' (and fails all subsequent attempts), you can retry sending without the risk of double spending. The 'sequenceId' is only visible to users on the wallet and is not shared publicly.
52311+
pathLightningCoin:
52312+
name: coin
52313+
in: path
52314+
required: true
52315+
schema:
52316+
$ref: '#/components/schemas/LightningCoin'
5215152317
pathBitcoin:
5215252318
name: coin
5215352319
in: path

0 commit comments

Comments
 (0)