|
373 | 373 | }
|
374 | 374 | }
|
375 | 375 | },
|
| 376 | + "RunTransactionResponseType": { |
| 377 | + "type": "string", |
| 378 | + "description": "Response format from transaction / query execution", |
| 379 | + "enum": [ |
| 380 | + "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.JSON", |
| 381 | + "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.UTF8" |
| 382 | + ], |
| 383 | + "x-enum-varnames": ["JSON", "UTF8"] |
| 384 | + }, |
376 | 385 | "RunTransactionRequest": {
|
377 | 386 | "type": "object",
|
378 | 387 | "required": [
|
|
386 | 395 | "additionalProperties": false,
|
387 | 396 | "properties": {
|
388 | 397 | "endorsingPeers": {
|
389 |
| - "description": "An array of MSP IDs to set as the list of endorsing peers for the transaction.", |
| 398 | + "description": "An array of endorsing peers (name or url) for the transaction.", |
| 399 | + "type": "array", |
| 400 | + "items": { |
| 401 | + "type": "string", |
| 402 | + "minLength": 1, |
| 403 | + "maxLength": 4096, |
| 404 | + "nullable": false |
| 405 | + } |
| 406 | + }, |
| 407 | + "endorsingOrgs": { |
| 408 | + "description": "An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction.", |
390 | 409 | "type": "array",
|
391 | 410 | "items": {
|
392 | 411 | "type": "string",
|
|
439 | 458 | "nullable": true
|
440 | 459 | }
|
441 | 460 | },
|
442 |
| - "endorsingParties": { |
443 |
| - "type": "array", |
444 |
| - "nullable": false, |
445 |
| - "default": [], |
446 |
| - "items": { |
447 |
| - "type": "string", |
448 |
| - "nullable": true |
449 |
| - } |
450 |
| - }, |
451 | 461 | "responseType": {
|
452 |
| - "type": "string" |
| 462 | + "$ref": "#/components/schemas/RunTransactionResponseType" |
453 | 463 | }
|
454 | 464 | }
|
455 | 465 | },
|
456 | 466 | "RunTransactionResponse": {
|
457 | 467 | "type": "object",
|
458 |
| - "required": ["functionOutput", "success", "transactionId"], |
| 468 | + "required": ["functionOutput", "transactionId"], |
459 | 469 | "properties": {
|
460 | 470 | "functionOutput": {
|
461 | 471 | "type": "string",
|
462 | 472 | "nullable": false
|
463 | 473 | },
|
464 |
| - "success": { |
465 |
| - "type": "boolean", |
| 474 | + "transactionId": { |
| 475 | + "type": "string", |
| 476 | + "nullable": false |
| 477 | + } |
| 478 | + } |
| 479 | + }, |
| 480 | + "RunDelegatedSignTransactionRequest": { |
| 481 | + "type": "object", |
| 482 | + "required": [ |
| 483 | + "signerCertificate", |
| 484 | + "signerMspID", |
| 485 | + "channelName", |
| 486 | + "contractName", |
| 487 | + "invocationType", |
| 488 | + "methodName", |
| 489 | + "params" |
| 490 | + ], |
| 491 | + "additionalProperties": false, |
| 492 | + "properties": { |
| 493 | + "endorsingPeers": { |
| 494 | + "description": "An array of endorsing peers (name or url) for the transaction.", |
| 495 | + "type": "array", |
| 496 | + "items": { |
| 497 | + "type": "string", |
| 498 | + "minLength": 1, |
| 499 | + "maxLength": 4096, |
| 500 | + "nullable": false |
| 501 | + } |
| 502 | + }, |
| 503 | + "endorsingOrgs": { |
| 504 | + "description": "An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction.", |
| 505 | + "type": "array", |
| 506 | + "items": { |
| 507 | + "type": "string", |
| 508 | + "minLength": 1, |
| 509 | + "maxLength": 4096, |
| 510 | + "nullable": false |
| 511 | + } |
| 512 | + }, |
| 513 | + "transientData": { |
| 514 | + "type": "object", |
| 515 | + "nullable": true |
| 516 | + }, |
| 517 | + "signerCertificate": { |
| 518 | + "type": "string", |
466 | 519 | "nullable": false
|
467 | 520 | },
|
468 |
| - "transactionId": { |
| 521 | + "signerMspID": { |
469 | 522 | "type": "string",
|
470 | 523 | "nullable": false
|
| 524 | + }, |
| 525 | + "uniqueTransactionData": { |
| 526 | + "description": "Can be used to uniquely identify and authorize signing request", |
| 527 | + "nullable": false |
| 528 | + }, |
| 529 | + "channelName": { |
| 530 | + "type": "string", |
| 531 | + "minLength": 1, |
| 532 | + "maxLength": 100, |
| 533 | + "nullable": false |
| 534 | + }, |
| 535 | + "contractName": { |
| 536 | + "type": "string", |
| 537 | + "minLength": 1, |
| 538 | + "maxLength": 100, |
| 539 | + "nullable": false |
| 540 | + }, |
| 541 | + "invocationType": { |
| 542 | + "$ref": "#/components/schemas/FabricContractInvocationType", |
| 543 | + "nullable": false, |
| 544 | + "description": "Indicates if it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." |
| 545 | + }, |
| 546 | + "methodName": { |
| 547 | + "type": "string", |
| 548 | + "minLength": 1, |
| 549 | + "maxLength": 100, |
| 550 | + "nullable": false |
| 551 | + }, |
| 552 | + "params": { |
| 553 | + "type": "array", |
| 554 | + "nullable": false, |
| 555 | + "default": [], |
| 556 | + "items": { |
| 557 | + "type": "string", |
| 558 | + "nullable": true |
| 559 | + } |
| 560 | + }, |
| 561 | + "responseType": { |
| 562 | + "$ref": "#/components/schemas/RunTransactionResponseType" |
471 | 563 | }
|
472 | 564 | }
|
473 | 565 | },
|
|
1030 | 1122 | "description": "Websocket requests for monitoring new blocks.",
|
1031 | 1123 | "enum": [
|
1032 | 1124 | "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Subscribe",
|
| 1125 | + "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.SubscribeDelegatedSign", |
1033 | 1126 | "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Next",
|
1034 | 1127 | "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Unsubscribe",
|
1035 | 1128 | "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Error",
|
1036 | 1129 | "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Complete"
|
1037 | 1130 | ],
|
1038 | 1131 | "x-enum-varnames": [
|
1039 | 1132 | "Subscribe",
|
| 1133 | + "SubscribeDelegatedSign", |
1040 | 1134 | "Next",
|
1041 | 1135 | "Unsubscribe",
|
1042 | 1136 | "Error",
|
|
1080 | 1174 | }
|
1081 | 1175 | }
|
1082 | 1176 | },
|
| 1177 | + "WatchBlocksDelegatedSignOptionsV1": { |
| 1178 | + "type": "object", |
| 1179 | + "description": "Options passed when subscribing to block monitoring with delegated signing.", |
| 1180 | + "required": ["type", "channelName", "signerCertificate", "signerMspID"], |
| 1181 | + "properties": { |
| 1182 | + "type": { |
| 1183 | + "$ref": "#/components/schemas/WatchBlocksListenerTypeV1", |
| 1184 | + "description": "Type of response block to return.", |
| 1185 | + "nullable": false |
| 1186 | + }, |
| 1187 | + "startBlock": { |
| 1188 | + "type": "string", |
| 1189 | + "description": "From which block start monitoring. Defaults to latest.", |
| 1190 | + "minLength": 1, |
| 1191 | + "maxLength": 100, |
| 1192 | + "nullable": false |
| 1193 | + }, |
| 1194 | + "channelName": { |
| 1195 | + "type": "string", |
| 1196 | + "minLength": 1, |
| 1197 | + "maxLength": 100, |
| 1198 | + "nullable": false |
| 1199 | + }, |
| 1200 | + "signerCertificate": { |
| 1201 | + "type": "string", |
| 1202 | + "nullable": false |
| 1203 | + }, |
| 1204 | + "signerMspID": { |
| 1205 | + "type": "string", |
| 1206 | + "nullable": false |
| 1207 | + }, |
| 1208 | + "uniqueTransactionData": { |
| 1209 | + "description": "Can be used to uniquely identify and authorize signing request", |
| 1210 | + "nullable": false |
| 1211 | + } |
| 1212 | + } |
| 1213 | + }, |
1083 | 1214 | "WatchBlocksCactusTransactionsEventV1": {
|
1084 | 1215 | "type": "object",
|
1085 | 1216 | "description": "Transaction summary from commited block.",
|
|
1240 | 1371 | }
|
1241 | 1372 | }
|
1242 | 1373 | },
|
1243 |
| - "404": { |
1244 |
| - "description": "" |
| 1374 | + "500": { |
| 1375 | + "description": "Internal Server Error", |
| 1376 | + "content": { |
| 1377 | + "application/json": { |
| 1378 | + "schema": { |
| 1379 | + "$ref": "#/components/schemas/ErrorExceptionResponseV1" |
| 1380 | + } |
| 1381 | + } |
| 1382 | + } |
| 1383 | + } |
| 1384 | + } |
| 1385 | + } |
| 1386 | + }, |
| 1387 | + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction": { |
| 1388 | + "post": { |
| 1389 | + "x-hyperledger-cactus": { |
| 1390 | + "http": { |
| 1391 | + "verbLowerCase": "post", |
| 1392 | + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction" |
| 1393 | + } |
| 1394 | + }, |
| 1395 | + "operationId": "runDelegatedSignTransactionV1", |
| 1396 | + "summary": "Runs a transaction on a Fabric ledger using user-provided signing callback.", |
| 1397 | + "description": "", |
| 1398 | + "parameters": [], |
| 1399 | + "requestBody": { |
| 1400 | + "required": true, |
| 1401 | + "content": { |
| 1402 | + "application/json": { |
| 1403 | + "schema": { |
| 1404 | + "$ref": "#/components/schemas/RunDelegatedSignTransactionRequest" |
| 1405 | + } |
| 1406 | + } |
| 1407 | + } |
| 1408 | + }, |
| 1409 | + "responses": { |
| 1410 | + "200": { |
| 1411 | + "description": "OK", |
| 1412 | + "content": { |
| 1413 | + "application/json": { |
| 1414 | + "schema": { |
| 1415 | + "$ref": "#/components/schemas/RunTransactionResponse" |
| 1416 | + } |
| 1417 | + } |
| 1418 | + } |
| 1419 | + }, |
| 1420 | + "500": { |
| 1421 | + "description": "Internal Server Error", |
| 1422 | + "content": { |
| 1423 | + "application/json": { |
| 1424 | + "schema": { |
| 1425 | + "$ref": "#/components/schemas/ErrorExceptionResponseV1" |
| 1426 | + } |
| 1427 | + } |
| 1428 | + } |
1245 | 1429 | }
|
1246 | 1430 | }
|
1247 | 1431 | }
|
|
0 commit comments