Skip to content

Commit 3f11d0f

Browse files
committed
fix(mbe): fix return type of certain MBE routes
fixes the return type of certain MBE routes and pump MBE docs Ticket: WP-6982
1 parent dd36be8 commit 3f11d0f

File tree

4 files changed

+14
-21
lines changed

4 files changed

+14
-21
lines changed

masterBitgoExpress.json

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"openapi": "3.0.3",
33
"info": {
44
"title": "@bitgo/master-bitgo-express",
5-
"version": "0.0.0-semantically-released",
5+
"version": "2.0.0",
66
"description": "Advanced Wallets - On-Premises Key Management with BitGo Express"
77
},
88
"paths": {
@@ -952,7 +952,7 @@
952952
},
953953
"/api/{coin}/wallet/generate": {
954954
"post": {
955-
"summary": "Generates a new onPrem self-managed cold wallet.",
955+
"summary": "Generates a new advanced wallet.",
956956
"description": "The wallet creation process involves several steps that happen automatically:\n1. User Keychain Creation: Creates the user keychain in the advanced wallet manager and encrypts it with the respective KMS.\n2. Backup Keychain Creation: Creates the backup keychain in the advanced wallet manager and encrypts it with the respective KMS.\n3. Keychain Upload: Uploads the user/backup public keys to BitGo.\n4. BitGo Key Creation: Creates the BitGo key on the BitGo service.\n5. Wallet Creation: Creates the wallet on BitGo with the 3 keys.",
957957
"parameters": [
958958
{
@@ -1678,13 +1678,13 @@
16781678
"status": {
16791679
"type": "string"
16801680
},
1681-
"advancedWalletManagerResponse": {
1681+
"awmResponse": {
16821682
"$ref": "#/components/schemas/PingResponseType"
16831683
}
16841684
},
16851685
"required": [
16861686
"status",
1687-
"advancedWalletManagerResponse"
1687+
"awmResponse"
16881688
]
16891689
}
16901690
}
@@ -1947,15 +1947,6 @@
19471947
"description": "Admin data (wallet policies)",
19481948
"example": {}
19491949
},
1950-
"pendingApprovals": {
1951-
"type": "array",
1952-
"example": [],
1953-
"items": {
1954-
"type": "object",
1955-
"additionalProperties": {},
1956-
"description": "Pending approvals on the wallet"
1957-
}
1958-
},
19591950
"allowBackupKeySigning": {
19601951
"type": "boolean",
19611952
"description": "Flag for allowing signing with backup key",
@@ -2064,6 +2055,13 @@
20642055
"pendingEcdsaTssInitialization": {
20652056
"type": "boolean"
20662057
},
2058+
"pendingApprovals": {
2059+
"type": "array",
2060+
"items": {
2061+
"type": "object",
2062+
"additionalProperties": {}
2063+
}
2064+
},
20672065
"multisigType": {
20682066
"type": "string"
20692067
},
@@ -2103,7 +2101,6 @@
21032101
"isCold",
21042102
"coinSpecific",
21052103
"admin",
2106-
"pendingApprovals",
21072104
"allowBackupKeySigning",
21082105
"clientFlags",
21092106
"recoverable",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"lint": "eslint --quiet --ignore-pattern scripts/bump-version.ts .",
1818
"lint:fix": "eslint --quiet --ignore-pattern scripts/bump-version.ts . --fix",
1919
"generate-test-ssl": "openssl req -x509 -newkey rsa:2048 -keyout demo.key -out demo.crt -days 365 -nodes -subj '/CN=localhost'",
20-
"generate:openapi:masterExpress": "npx @api-ts/openapi-generator --name @bitgo/master-bitgo-express ./src/api/master/routers/index.ts > masterBitgoExpress.json",
20+
"generate:openapi:masterExpress": "npx @api-ts/openapi-generator --name @bitgo/master-bitgo-express ./src/masterBitgoExpress/routers/index.ts > masterBitgoExpress.json",
2121
"container:build:master-bitgo-express": "podman build --build-arg PORT=3081 -t master-bitgo-express .",
2222
"container:build:advanced-wallet-manager": "podman build --build-arg PORT=3080 -t advanced-wallet-manager .",
2323
"bump-versions": "ts-node scripts/bump-version.ts"

src/masterBitgoExpress/routers/awmExpressHealth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { customDecodeErrorFormatter } from '../../shared/errorFormatters';
1313
const PingAwmResponse: HttpResponse = {
1414
200: t.type({
1515
status: t.string,
16-
advancedWalletManagerResponse: PingResponseType,
16+
awmResponse: PingResponseType,
1717
}),
1818
500: t.type({
1919
error: t.string,

src/masterBitgoExpress/routers/generateWalletRoute.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@ const WalletType = t.intersection([
9191
* @example {}
9292
*/
9393
admin: t.record(t.string, t.unknown),
94-
/**
95-
* Pending approvals on the wallet
96-
* @example []
97-
*/
98-
pendingApprovals: t.array(t.record(t.string, t.unknown)),
9994
/**
10095
* Flag for allowing signing with backup key
10196
* @example false
@@ -159,6 +154,7 @@ const WalletType = t.intersection([
159154
unspentCount: t.number,
160155
pendingChainInitialization: t.boolean,
161156
pendingEcdsaTssInitialization: t.boolean,
157+
pendingApprovals: t.array(t.record(t.string, t.unknown)),
162158
multisigType: t.string,
163159
multisigTypeVersion: t.string,
164160
type: t.string,

0 commit comments

Comments
 (0)