@@ -178,7 +178,6 @@ const RShareStructure = t.type({
178178export const GenerateShareTSSBody = {
179179 /** Transaction request object with unsigned transaction data and walletId (either this or tssParams required) */
180180 txRequest : optional ( Json ) ,
181-
182181 /** TSS parameters containing transaction request and optional tracing/verification data */
183182 tssParams : optional (
184183 t . partial ( {
@@ -192,8 +191,6 @@ export const GenerateShareTSSBody = {
192191 txParams : Json ,
193192 } )
194193 ) ,
195-
196- // ============ EDDSA R Share Generation Fields ============
197194 /** Encrypted user-to-BitGo R share for EDDSA signing protocol */
198195 encryptedUserToBitgoRShare : optional (
199196 t . partial ( {
@@ -207,8 +204,6 @@ export const GenerateShareTSSBody = {
207204 type : t . string ,
208205 } )
209206 ) ,
210-
211- // ============ EDDSA G Share Generation Fields ============
212207 /** BitGo's R share sent to user for EDDSA G share generation */
213208 bitgoToUserRShare : optional (
214209 t . partial ( {
@@ -244,8 +239,6 @@ export const GenerateShareTSSBody = {
244239 ) ,
245240 /** BitGo's GPG public key for encrypted communication during EDDSA commitment generation */
246241 bitgoGpgPubKey : optional ( t . string ) ,
247-
248- // ============ ECDSA K Share Generation Fields ============
249242 /** Cryptographic challenges from enterprise and BitGo for ECDSA K share zero-knowledge proofs */
250243 challenges : optional (
251244 t . type ( {
@@ -257,34 +250,24 @@ export const GenerateShareTSSBody = {
257250 ) ,
258251 /** Type of signing request - 'tx' for transaction or 'message' for arbitrary message */
259252 requestType : optional ( t . string ) ,
260-
261- // ============ ECDSA MuDelta Share Generation Fields ============
262253 /** A share from BitGo containing range proof and commitment data for ECDSA MuDelta generation */
263254 aShareFromBitgo : optional ( AShare ) ,
264255 /** BitGo's challenge response for MuDelta share verification with ntilde, h1, h2, and n fields */
265256 bitgoChallenge : optional ( TxRequestChallengeResponse ) ,
266257 /** Encrypted W share from previous round for ECDSA MuDelta computation */
267258 encryptedWShare : optional ( t . string ) ,
268-
269- // ============ ECDSA S Share Generation Fields ============
270259 /** D share from BitGo containing final signature components for ECDSA S share generation */
271260 dShareFromBitgo : optional ( DShare ) ,
272261 /** Encrypted O share from MuDelta round for final ECDSA signature generation */
273262 encryptedOShare : optional ( t . string ) ,
274-
275- // ============ ECDSA MPCv2 Round2 Fields ============
276263 /** BitGo's GPG public key for secure communication in MPCv2 Round2 */
277264 bitgoPublicGpgKey : optional ( t . string ) ,
278265 /** User's encrypted GPG private key from Round1 for decryption in Round2 and Round3 */
279266 encryptedUserGpgPrvKey : optional ( t . string ) ,
280267 /** Encrypted session state from MPCv2 Round1 for continuing to Round2 */
281268 encryptedRound1Session : optional ( t . string ) ,
282-
283- // ============ ECDSA MPCv2 Round3 Fields ============
284269 /** Encrypted session state from MPCv2 Round2 for final signature generation in Round3 */
285270 encryptedRound2Session : optional ( t . string ) ,
286-
287- // ============ Message Signing Fields ============
288271 /** Raw message string to be signed (used for arbitrary message signing) */
289272 messageRaw : optional ( t . string ) ,
290273 /** Hex-encoded message string ready for signing */
@@ -298,11 +281,6 @@ export const GenerateShareTSSBody = {
298281 data : t . array ( t . number ) ,
299282 } )
300283 ) ,
301-
302- // ============ Auto-populated fields (added by handler) ============
303- // These fields are automatically added by the handler and should NOT be sent by the client:
304- // - prv: string (decrypted private key from filesystem)
305- // - walletPassphrase: string (from environment variable)
306284} as const ;
307285
308286/** Signature share record with participant routing and optional proofs */
@@ -541,52 +519,13 @@ export const GenerateShareTSSResponse = {
541519} ;
542520
543521/**
544- * Generate TSS share for multi-party signing (external signer mode)
545- *
546- * This endpoint is used when BitGo Express is configured with external signing
547- * (signerFileSystemPath config is set) for TSS (Threshold Signature Scheme) wallets.
548- *
549- * **Process Flow:**
550- * 1. Extracts walletId from either txRequest or tssParams.txRequest
551- * 2. Retrieves wallet passphrase from environment variable WALLET_{walletId}_PASSPHRASE
552- * 3. Reads encrypted private key from filesystem (signerFileSystemPath)
553- * 4. Decrypts the private key using the wallet passphrase
554- * 5. Generates the appropriate TSS share based on:
555- * - Coin's MPC algorithm (EDDSA or ECDSA)
556- * - Share type parameter (commitment, R, G, K, MuDelta, S, etc.)
557- *
558- * **Configuration Requirements:**
559- * - `signerFileSystemPath`: Path to JSON file containing encrypted private keys
560- * - Environment variable: `WALLET_{walletId}_PASSPHRASE` for each wallet
561- *
562- * **Supported Share Types:**
563- *
564- * *EDDSA (EdDSA algorithm - e.g., Solana, Sui):*
565- * - `commitment`: Generate commitment share (first step)
566- * - `R`: Generate R share (second step)
567- * - `G`: Generate G share (final step)
568- *
569- * *ECDSA (ECDSA algorithm - e.g., Bitcoin, Ethereum):*
570- * - `PaillierModulus`: Retrieve Paillier modulus from user's key
571- * - `K`: Generate K share (step 1)
572- * - `MuDelta`: Generate MuDelta share (step 2)
573- * - `S`: Generate S share (step 3, final signature)
574- *
575- * *ECDSA MPCv2 (Enhanced ECDSA with DKLS):*
576- * - `MPCv2Round1`: Generate round 1 signature share
577- * - `MPCv2Round2`: Generate round 2 signature share
578- * - `MPCv2Round3`: Generate round 3 signature share (final)
522+ * Generate cryptographic signature shares for TSS wallet transactions in external signer mode
579523 *
580- * **Error Cases:**
581- * - Missing walletId in request
582- * - Missing signerFileSystemPath configuration
583- * - Missing wallet passphrase in environment
584- * - Invalid or corrupted encrypted private key
585- * - Unsupported MPC algorithm or share type
586- * - Cryptographic operation failures
524+ * Decrypts stored private keys and generates MPC signing shares based on the coin's algorithm
525+ * (EDDSA or ECDSA/MPCv2) and requested share type. Requires signerFileSystemPath configuration.
587526 *
588- * @tag express
589527 * @operationId express.v2.tssshare.generate
528+ * @tag Express
590529 */
591530export const PostGenerateShareTSS = httpRoute ( {
592531 path : '/api/v2/{coin}/tssshare/{sharetype}' ,
0 commit comments