@polymarket/relayer-client 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,10 @@
1
1
  import { RelayClient } from "../client";
2
- import { RelayerTransactionResponse } from "../types";
2
+ import { RelayerTransaction, RelayerTransactionResponse } from "../types";
3
3
  export declare class ClientRelayerTransactionResponse implements RelayerTransactionResponse {
4
4
  readonly client: RelayClient;
5
5
  readonly transactionID: string;
6
6
  readonly state: string;
7
7
  constructor(transactionID: string, state: string, client: RelayClient);
8
- wait(): Promise<boolean>;
8
+ getTransaction(): Promise<RelayerTransaction[]>;
9
+ wait(): Promise<RelayerTransaction | undefined>;
9
10
  }
@@ -9,16 +9,17 @@ class ClientRelayerTransactionResponse {
9
9
  this.state = state;
10
10
  this.client = client;
11
11
  }
12
+ getTransaction() {
13
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
14
+ return this.client.getTransaction(this.transactionID);
15
+ });
16
+ }
12
17
  wait() {
13
18
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
14
- const txn = yield this.client.pollUntilState(this.transactionID, [
19
+ return this.client.pollUntilState(this.transactionID, [
15
20
  types_1.RelayerTransactionState.STATE_MINED,
16
21
  types_1.RelayerTransactionState.STATE_CONFIRMED,
17
22
  ], 30);
18
- if (txn == undefined) {
19
- return false;
20
- }
21
- return true;
22
23
  });
23
24
  }
24
25
  }
package/dist/types.d.ts CHANGED
@@ -89,11 +89,6 @@ export declare enum RelayerTransactionState {
89
89
  STATE_CONFIRMED = "STATE_CONFIRMED",
90
90
  STATE_FAILED = "STATE_FAILED"
91
91
  }
92
- export interface RelayerTransactionResponse {
93
- transactionID: string;
94
- state: string;
95
- wait: () => Promise<boolean>;
96
- }
97
92
  export interface RelayerSubRequest {
98
93
  address: string;
99
94
  transactions: string[];
@@ -118,6 +113,12 @@ export interface RelayerTransaction {
118
113
  createdAt: Date;
119
114
  updatedAt: Date;
120
115
  }
116
+ export interface RelayerTransactionResponse {
117
+ transactionID: string;
118
+ state: string;
119
+ getTransaction: () => Promise<RelayerTransaction[]>;
120
+ wait: () => Promise<RelayerTransaction | undefined>;
121
+ }
121
122
  export interface ManualOverrides {
122
123
  gasLimit?: BigNumberish;
123
124
  gasPrice?: BigNumberish;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@polymarket/relayer-client",
3
3
  "description": "Client for Polymarket relayers",
4
- "version": "1.0.6",
4
+ "version": "1.0.7",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [