-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add admin service * go mod tidy * fix linter: grpc.Dial * fix ocean get balance * fix linter * add .vscode to gitignore * rework admin balance API * fix mockedwallet in covenantless pkg * make proto
- Loading branch information
1 parent
329ba55
commit 9fc49d9
Showing
27 changed files
with
2,510 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.DS_Store | ||
.DS_Store | ||
.vscode/ |
289 changes: 289 additions & 0 deletions
289
server/api-spec/openapi/swagger/ark/v1/admin.swagger.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,289 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "ark/v1/admin.proto", | ||
"version": "version not set" | ||
}, | ||
"tags": [ | ||
{ | ||
"name": "AdminService" | ||
} | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": { | ||
"/v1/admin/balance": { | ||
"get": { | ||
"operationId": "AdminService_GetBalance", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.", | ||
"schema": { | ||
"$ref": "#/definitions/v1GetBalanceResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "An unexpected error response.", | ||
"schema": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
} | ||
}, | ||
"tags": [ | ||
"AdminService" | ||
] | ||
} | ||
}, | ||
"/v1/admin/round/{roundId}": { | ||
"get": { | ||
"operationId": "AdminService_GetRoundDetails", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.", | ||
"schema": { | ||
"$ref": "#/definitions/v1GetRoundDetailsResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "An unexpected error response.", | ||
"schema": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "roundId", | ||
"in": "path", | ||
"required": true, | ||
"type": "string" | ||
} | ||
], | ||
"tags": [ | ||
"AdminService" | ||
] | ||
} | ||
}, | ||
"/v1/admin/rounds": { | ||
"post": { | ||
"operationId": "AdminService_GetRounds", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.", | ||
"schema": { | ||
"$ref": "#/definitions/v1GetRoundsResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "An unexpected error response.", | ||
"schema": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "body", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/v1GetRoundsRequest" | ||
} | ||
} | ||
], | ||
"tags": [ | ||
"AdminService" | ||
] | ||
} | ||
}, | ||
"/v1/admin/sweeps": { | ||
"get": { | ||
"operationId": "AdminService_GetScheduledSweep", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.", | ||
"schema": { | ||
"$ref": "#/definitions/v1GetScheduledSweepResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "An unexpected error response.", | ||
"schema": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
} | ||
}, | ||
"tags": [ | ||
"AdminService" | ||
] | ||
} | ||
} | ||
}, | ||
"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" | ||
} | ||
} | ||
} | ||
}, | ||
"v1Balance": { | ||
"type": "object", | ||
"properties": { | ||
"locked": { | ||
"type": "string" | ||
}, | ||
"available": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"v1GetBalanceResponse": { | ||
"type": "object", | ||
"properties": { | ||
"mainAccount": { | ||
"$ref": "#/definitions/v1Balance" | ||
}, | ||
"connectorsAccount": { | ||
"$ref": "#/definitions/v1Balance" | ||
} | ||
} | ||
}, | ||
"v1GetRoundDetailsResponse": { | ||
"type": "object", | ||
"properties": { | ||
"roundId": { | ||
"type": "string" | ||
}, | ||
"txid": { | ||
"type": "string" | ||
}, | ||
"forfeitedAmount": { | ||
"type": "string" | ||
}, | ||
"totalVtxosAmount": { | ||
"type": "string" | ||
}, | ||
"totalExitAmount": { | ||
"type": "string" | ||
}, | ||
"feesAmount": { | ||
"type": "string" | ||
}, | ||
"inputsVtxos": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"outputsVtxos": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"exitAddresses": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"v1GetRoundsRequest": { | ||
"type": "object", | ||
"properties": { | ||
"after": { | ||
"type": "string", | ||
"format": "int64" | ||
}, | ||
"before": { | ||
"type": "string", | ||
"format": "int64" | ||
} | ||
} | ||
}, | ||
"v1GetRoundsResponse": { | ||
"type": "object", | ||
"properties": { | ||
"rounds": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"v1GetScheduledSweepResponse": { | ||
"type": "object", | ||
"properties": { | ||
"sweeps": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"$ref": "#/definitions/v1ScheduledSweep" | ||
} | ||
} | ||
} | ||
}, | ||
"v1ScheduledSweep": { | ||
"type": "object", | ||
"properties": { | ||
"roundId": { | ||
"type": "string" | ||
}, | ||
"outputs": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"$ref": "#/definitions/v1SweepableOutput" | ||
} | ||
} | ||
} | ||
}, | ||
"v1SweepableOutput": { | ||
"type": "object", | ||
"properties": { | ||
"txid": { | ||
"type": "string" | ||
}, | ||
"vout": { | ||
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"amount": { | ||
"type": "string" | ||
}, | ||
"scheduledAt": { | ||
"type": "string", | ||
"format": "int64" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.