Skip to content

Commit b73f964

Browse files
authored
update protobuf messages (#239)
1 parent 5b9e40a commit b73f964

File tree

5 files changed

+243
-234
lines changed

5 files changed

+243
-234
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
6+
## 7.0.0 (WIP)
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
- Reformatted job notification message
11+
512
## 6.1.0 (2022-01-13)
613

714
### 🆕 Features

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The Orchestrate library provides convenient access to the Orchestrate API from a
1616

1717
| SDK versions | Orchestrate versions |
1818
| ------------------- | ------------------------------ |
19-
| master/HEAD | Orchestrate v21.12.0 or higher |
19+
| master/HEAD | Orchestrate main/HEAD |
2020
| SDK v6.1.x | Orchestrate v21.12.1 or higher |
2121
| SDK v6.0.x | Orchestrate v21.12.0 or higher |
2222
| ~~SDK v5.x.x~~ | Deprecated |

proto/tx/tx.proto

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
syntax = "proto3";
22

3-
import "types/error/error.proto";
4-
import "types/ethereum/receipt.proto";
5-
import "types/ethereum/transaction.proto";
3+
import "pkg/types/error/error.proto";
4+
import "pkg/types/ethereum/receipt.proto";
5+
import "pkg/types/ethereum/transaction.proto";
66

7-
option go_package = "github.com/consensys/orchestrate/types/tx";
7+
option go_package = "github.com/consensys/orchestrate/pkg/types/tx";
88

99
package tx;
1010

1111
message TxRequest {
12-
// Technical header (optional)
13-
map<string, string> headers = 1;
12+
// ID of the Request in UUID RFC 4122, ISO/IEC 9834-8:2005 format
13+
// e.g a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
14+
string id = 1;
1415

1516
// Name of the Chain as registered on the chain registry
1617
// e.g. 1 for mainnet, 3 for Ropsten
@@ -22,15 +23,14 @@ message TxRequest {
2223
// Params for the transaction
2324
Params params = 4;
2425

25-
// ID of the Request in UUID RFC 4122, ISO/IEC 9834-8:2005 format
26-
// e.g a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
27-
string id = 5;
26+
// Type of the job
27+
JobType jobType = 5;
2828

29-
// [option]
30-
map<string, string> context_labels = 6;
29+
// Technical header (optional)
30+
map<string, string> headers = 6;
3131

32-
// Type of the job
33-
JobType jobType = 7;
32+
// [option]
33+
map<string, string> context_labels = 7;
3434
}
3535

3636
message TxEnvelope {
@@ -59,10 +59,10 @@ enum Method {
5959
enum JobType {
6060
ETH_TX = 0;
6161
ETH_RAW_TX = 1;
62-
ETH_EEA_MARKING_TX = 2;
63-
ETH_EEA_PRIVATE_TX = 3;
64-
ETH_TESSERA_MARKING_TX = 4;
65-
ETH_TESSERA_PRIVATE_TX = 5;
62+
EEA_MARKING_TX = 2;
63+
EEA_PRIVATE_TX = 3;
64+
GO_QUORUM_MARKING_TX = 4;
65+
GO_QUORUM_PRIVATE_TX = 5;
6666
}
6767

6868
message Params {
@@ -134,25 +134,27 @@ message Params {
134134
}
135135

136136
message TxResponse {
137-
// Extra information (optional)
138-
map<string, string> headers = 1;
139137

140138
// ID of the Response in UUID RFC 4122, ISO/IEC 9834-8:2005 format
141139
// e.g a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
142-
string id = 2;
140+
string id = 1;
141+
142+
// Name of the Chain as registered on the chain registry
143+
// e.g. 1 for mainnet, 3 for Ropsten
144+
string chain = 2;
143145

144146
// ID of the Job created as part of transaction request
145147
// e.g 15276759-bbc6-4ead-ad51-ddfecf79cf09
146-
string jobUUID = 8;
148+
string jobUUID = 3;
149+
150+
// Extra information (optional)
151+
map<string, string> headers = 4;
147152

148153
// [option]
149-
map<string, string> context_labels = 3;
154+
map<string, string> context_labels = 5;
150155

151-
ethereum.Transaction transaction = 4;
152-
ethereum.Receipt receipt = 5;
153-
// Name of the Chain as registered on the chain registry
154-
// e.g. 1 for mainnet, 3 for Ropsten
155-
string chain = 7;
156+
ethereum.Transaction transaction = 6;
157+
ethereum.Receipt receipt = 7;
156158

157-
repeated error.Error errors = 6;
159+
repeated error.Error errors = 8;
158160
}

src/stubs/index.d.ts

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2830,19 +2830,19 @@ export namespace google {
28302830
constructor(properties?: google.api.IHttpRule);
28312831

28322832
/** HttpRule get. */
2833-
public get: string;
2833+
public get?: (string|null);
28342834

28352835
/** HttpRule put. */
2836-
public put: string;
2836+
public put?: (string|null);
28372837

28382838
/** HttpRule post. */
2839-
public post: string;
2839+
public post?: (string|null);
28402840

28412841
/** HttpRule delete. */
2842-
public delete: string;
2842+
public delete?: (string|null);
28432843

28442844
/** HttpRule patch. */
2845-
public patch: string;
2845+
public patch?: (string|null);
28462846

28472847
/** HttpRule custom. */
28482848
public custom?: (google.api.ICustomHttpPattern|null);
@@ -6600,8 +6600,8 @@ export namespace tx {
66006600
/** Properties of a TxRequest. */
66016601
interface ITxRequest {
66026602

6603-
/** TxRequest headers */
6604-
headers?: ({ [k: string]: string }|null);
6603+
/** TxRequest id */
6604+
id?: (string|null);
66056605

66066606
/** TxRequest chain */
66076607
chain?: (string|null);
@@ -6612,14 +6612,14 @@ export namespace tx {
66126612
/** TxRequest params */
66136613
params?: (tx.IParams|null);
66146614

6615-
/** TxRequest id */
6616-
id?: (string|null);
6615+
/** TxRequest jobType */
6616+
jobType?: (tx.JobType|null);
6617+
6618+
/** TxRequest headers */
6619+
headers?: ({ [k: string]: string }|null);
66176620

66186621
/** TxRequest contextLabels */
66196622
contextLabels?: ({ [k: string]: string }|null);
6620-
6621-
/** TxRequest jobType */
6622-
jobType?: (tx.JobType|null);
66236623
}
66246624

66256625
/** Represents a TxRequest. */
@@ -6631,8 +6631,8 @@ export namespace tx {
66316631
*/
66326632
constructor(properties?: tx.ITxRequest);
66336633

6634-
/** TxRequest headers. */
6635-
public headers: { [k: string]: string };
6634+
/** TxRequest id. */
6635+
public id: string;
66366636

66376637
/** TxRequest chain. */
66386638
public chain: string;
@@ -6643,15 +6643,15 @@ export namespace tx {
66436643
/** TxRequest params. */
66446644
public params?: (tx.IParams|null);
66456645

6646-
/** TxRequest id. */
6647-
public id: string;
6646+
/** TxRequest jobType. */
6647+
public jobType: tx.JobType;
6648+
6649+
/** TxRequest headers. */
6650+
public headers: { [k: string]: string };
66486651

66496652
/** TxRequest contextLabels. */
66506653
public contextLabels: { [k: string]: string };
66516654

6652-
/** TxRequest jobType. */
6653-
public jobType: tx.JobType;
6654-
66556655
/**
66566656
* Creates a new TxRequest instance using the specified properties.
66576657
* @param [properties] Properties to set
@@ -6840,10 +6840,10 @@ export namespace tx {
68406840
enum JobType {
68416841
ETH_TX = 0,
68426842
ETH_RAW_TX = 1,
6843-
ETH_EEA_MARKING_TX = 2,
6844-
ETH_EEA_PRIVATE_TX = 3,
6845-
ETH_TESSERA_MARKING_TX = 4,
6846-
ETH_TESSERA_PRIVATE_TX = 5
6843+
EEA_MARKING_TX = 2,
6844+
EEA_PRIVATE_TX = 3,
6845+
GO_QUORUM_MARKING_TX = 4,
6846+
GO_QUORUM_PRIVATE_TX = 5
68476847
}
68486848

68496849
/** Properties of a Params. */
@@ -7059,15 +7059,18 @@ export namespace tx {
70597059
/** Properties of a TxResponse. */
70607060
interface ITxResponse {
70617061

7062-
/** TxResponse headers */
7063-
headers?: ({ [k: string]: string }|null);
7064-
70657062
/** TxResponse id */
70667063
id?: (string|null);
70677064

7065+
/** TxResponse chain */
7066+
chain?: (string|null);
7067+
70687068
/** TxResponse jobUUID */
70697069
jobUUID?: (string|null);
70707070

7071+
/** TxResponse headers */
7072+
headers?: ({ [k: string]: string }|null);
7073+
70717074
/** TxResponse contextLabels */
70727075
contextLabels?: ({ [k: string]: string }|null);
70737076

@@ -7077,9 +7080,6 @@ export namespace tx {
70777080
/** TxResponse receipt */
70787081
receipt?: (ethereum.IReceipt|null);
70797082

7080-
/** TxResponse chain */
7081-
chain?: (string|null);
7082-
70837083
/** TxResponse errors */
70847084
errors?: (error.IError[]|null);
70857085
}
@@ -7093,15 +7093,18 @@ export namespace tx {
70937093
*/
70947094
constructor(properties?: tx.ITxResponse);
70957095

7096-
/** TxResponse headers. */
7097-
public headers: { [k: string]: string };
7098-
70997096
/** TxResponse id. */
71007097
public id: string;
71017098

7099+
/** TxResponse chain. */
7100+
public chain: string;
7101+
71027102
/** TxResponse jobUUID. */
71037103
public jobUUID: string;
71047104

7105+
/** TxResponse headers. */
7106+
public headers: { [k: string]: string };
7107+
71057108
/** TxResponse contextLabels. */
71067109
public contextLabels: { [k: string]: string };
71077110

@@ -7111,9 +7114,6 @@ export namespace tx {
71117114
/** TxResponse receipt. */
71127115
public receipt?: (ethereum.IReceipt|null);
71137116

7114-
/** TxResponse chain. */
7115-
public chain: string;
7116-
71177117
/** TxResponse errors. */
71187118
public errors: error.IError[];
71197119

0 commit comments

Comments
 (0)