Skip to content

Commit

Permalink
update protobuf messages (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarri authored Mar 28, 2022
1 parent 5b9e40a commit b73f964
Show file tree
Hide file tree
Showing 5 changed files with 243 additions and 234 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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


## 7.0.0 (WIP)

### ⚠ BREAKING CHANGES

- Reformatted job notification message

## 6.1.0 (2022-01-13)

### 🆕 Features
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The Orchestrate library provides convenient access to the Orchestrate API from a

| SDK versions | Orchestrate versions |
| ------------------- | ------------------------------ |
| master/HEAD | Orchestrate v21.12.0 or higher |
| master/HEAD | Orchestrate main/HEAD |
| SDK v6.1.x | Orchestrate v21.12.1 or higher |
| SDK v6.0.x | Orchestrate v21.12.0 or higher |
| ~~SDK v5.x.x~~ | Deprecated |
Expand Down
58 changes: 30 additions & 28 deletions proto/tx/tx.proto
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
syntax = "proto3";

import "types/error/error.proto";
import "types/ethereum/receipt.proto";
import "types/ethereum/transaction.proto";
import "pkg/types/error/error.proto";
import "pkg/types/ethereum/receipt.proto";
import "pkg/types/ethereum/transaction.proto";

option go_package = "github.com/consensys/orchestrate/types/tx";
option go_package = "github.com/consensys/orchestrate/pkg/types/tx";

package tx;

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

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

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

// [option]
map<string, string> context_labels = 6;
// Technical header (optional)
map<string, string> headers = 6;

// Type of the job
JobType jobType = 7;
// [option]
map<string, string> context_labels = 7;
}

message TxEnvelope {
Expand Down Expand Up @@ -59,10 +59,10 @@ enum Method {
enum JobType {
ETH_TX = 0;
ETH_RAW_TX = 1;
ETH_EEA_MARKING_TX = 2;
ETH_EEA_PRIVATE_TX = 3;
ETH_TESSERA_MARKING_TX = 4;
ETH_TESSERA_PRIVATE_TX = 5;
EEA_MARKING_TX = 2;
EEA_PRIVATE_TX = 3;
GO_QUORUM_MARKING_TX = 4;
GO_QUORUM_PRIVATE_TX = 5;
}

message Params {
Expand Down Expand Up @@ -134,25 +134,27 @@ message Params {
}

message TxResponse {
// Extra information (optional)
map<string, string> headers = 1;

// ID of the Response in UUID RFC 4122, ISO/IEC 9834-8:2005 format
// e.g a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
string id = 2;
string id = 1;

// Name of the Chain as registered on the chain registry
// e.g. 1 for mainnet, 3 for Ropsten
string chain = 2;

// ID of the Job created as part of transaction request
// e.g 15276759-bbc6-4ead-ad51-ddfecf79cf09
string jobUUID = 8;
string jobUUID = 3;

// Extra information (optional)
map<string, string> headers = 4;

// [option]
map<string, string> context_labels = 3;
map<string, string> context_labels = 5;

ethereum.Transaction transaction = 4;
ethereum.Receipt receipt = 5;
// Name of the Chain as registered on the chain registry
// e.g. 1 for mainnet, 3 for Ropsten
string chain = 7;
ethereum.Transaction transaction = 6;
ethereum.Receipt receipt = 7;

repeated error.Error errors = 6;
repeated error.Error errors = 8;
}
70 changes: 35 additions & 35 deletions src/stubs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2830,19 +2830,19 @@ export namespace google {
constructor(properties?: google.api.IHttpRule);

/** HttpRule get. */
public get: string;
public get?: (string|null);

/** HttpRule put. */
public put: string;
public put?: (string|null);

/** HttpRule post. */
public post: string;
public post?: (string|null);

/** HttpRule delete. */
public delete: string;
public delete?: (string|null);

/** HttpRule patch. */
public patch: string;
public patch?: (string|null);

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

/** TxRequest headers */
headers?: ({ [k: string]: string }|null);
/** TxRequest id */
id?: (string|null);

/** TxRequest chain */
chain?: (string|null);
Expand All @@ -6612,14 +6612,14 @@ export namespace tx {
/** TxRequest params */
params?: (tx.IParams|null);

/** TxRequest id */
id?: (string|null);
/** TxRequest jobType */
jobType?: (tx.JobType|null);

/** TxRequest headers */
headers?: ({ [k: string]: string }|null);

/** TxRequest contextLabels */
contextLabels?: ({ [k: string]: string }|null);

/** TxRequest jobType */
jobType?: (tx.JobType|null);
}

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

/** TxRequest headers. */
public headers: { [k: string]: string };
/** TxRequest id. */
public id: string;

/** TxRequest chain. */
public chain: string;
Expand All @@ -6643,15 +6643,15 @@ export namespace tx {
/** TxRequest params. */
public params?: (tx.IParams|null);

/** TxRequest id. */
public id: string;
/** TxRequest jobType. */
public jobType: tx.JobType;

/** TxRequest headers. */
public headers: { [k: string]: string };

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

/** TxRequest jobType. */
public jobType: tx.JobType;

/**
* Creates a new TxRequest instance using the specified properties.
* @param [properties] Properties to set
Expand Down Expand Up @@ -6840,10 +6840,10 @@ export namespace tx {
enum JobType {
ETH_TX = 0,
ETH_RAW_TX = 1,
ETH_EEA_MARKING_TX = 2,
ETH_EEA_PRIVATE_TX = 3,
ETH_TESSERA_MARKING_TX = 4,
ETH_TESSERA_PRIVATE_TX = 5
EEA_MARKING_TX = 2,
EEA_PRIVATE_TX = 3,
GO_QUORUM_MARKING_TX = 4,
GO_QUORUM_PRIVATE_TX = 5
}

/** Properties of a Params. */
Expand Down Expand Up @@ -7059,15 +7059,18 @@ export namespace tx {
/** Properties of a TxResponse. */
interface ITxResponse {

/** TxResponse headers */
headers?: ({ [k: string]: string }|null);

/** TxResponse id */
id?: (string|null);

/** TxResponse chain */
chain?: (string|null);

/** TxResponse jobUUID */
jobUUID?: (string|null);

/** TxResponse headers */
headers?: ({ [k: string]: string }|null);

/** TxResponse contextLabels */
contextLabels?: ({ [k: string]: string }|null);

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

/** TxResponse chain */
chain?: (string|null);

/** TxResponse errors */
errors?: (error.IError[]|null);
}
Expand All @@ -7093,15 +7093,18 @@ export namespace tx {
*/
constructor(properties?: tx.ITxResponse);

/** TxResponse headers. */
public headers: { [k: string]: string };

/** TxResponse id. */
public id: string;

/** TxResponse chain. */
public chain: string;

/** TxResponse jobUUID. */
public jobUUID: string;

/** TxResponse headers. */
public headers: { [k: string]: string };

/** TxResponse contextLabels. */
public contextLabels: { [k: string]: string };

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

/** TxResponse chain. */
public chain: string;

/** TxResponse errors. */
public errors: error.IError[];

Expand Down
Loading

0 comments on commit b73f964

Please sign in to comment.