@polymarket/relayer-client 1.0.19 → 2.0.1
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.
- package/dist/client.d.ts +2 -2
- package/dist/client.js +6 -1
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { JsonRpcSigner } from "@ethersproject/providers";
|
|
|
3
3
|
import { WalletClient } from "viem";
|
|
4
4
|
import { IAbstractSigner } from "@polymarket/abstract-signer";
|
|
5
5
|
import { HttpClient } from "./http-helpers";
|
|
6
|
-
import { AddressPayload, AuthArgs, IManualTransactionResponse, ManualOverrides, NoncePayload, ProxyTransaction, RelayerTransaction, RelayerTransactionResponse, RelayPayload, SafeTransaction } from "./types";
|
|
6
|
+
import { AddressPayload, AuthArgs, IManualTransactionResponse, ManualOverrides, NoncePayload, Overrides, ProxyTransaction, RelayerTransaction, RelayerTransactionResponse, RelayPayload, SafeTransaction } from "./types";
|
|
7
7
|
import { AuthHandler } from "./auth";
|
|
8
8
|
import { ContractConfig } from "./config";
|
|
9
9
|
export declare class RelayClient {
|
|
@@ -19,7 +19,7 @@ export declare class RelayClient {
|
|
|
19
19
|
getRelayPayload(signerAddress: string, signerType: string): Promise<RelayPayload>;
|
|
20
20
|
getTransaction(transactionId: string): Promise<RelayerTransaction[]>;
|
|
21
21
|
getTransactions(): Promise<RelayerTransaction[]>;
|
|
22
|
-
executeProxyTransactions(txns: ProxyTransaction[], metadata?: string): Promise<RelayerTransactionResponse>;
|
|
22
|
+
executeProxyTransactions(txns: ProxyTransaction[], metadata?: string, overrides?: Overrides): Promise<RelayerTransactionResponse>;
|
|
23
23
|
executeSafeTransactions(txns: SafeTransaction[], metadata?: string): Promise<RelayerTransactionResponse>;
|
|
24
24
|
executeManualTransactions(txns: SafeTransaction[], overrides?: ManualOverrides): Promise<IManualTransactionResponse>;
|
|
25
25
|
deploySafe(): Promise<RelayerTransactionResponse>;
|
package/dist/client.js
CHANGED
|
@@ -49,7 +49,7 @@ class RelayClient {
|
|
|
49
49
|
async getTransactions() {
|
|
50
50
|
return this.send(`${this.relayerUrl}${endpoints_1.GET_TRANSACTION}s`, http_helpers_1.GET);
|
|
51
51
|
}
|
|
52
|
-
async executeProxyTransactions(txns, metadata) {
|
|
52
|
+
async executeProxyTransactions(txns, metadata, overrides) {
|
|
53
53
|
if (this.signer == undefined) {
|
|
54
54
|
throw new Error("missing signer");
|
|
55
55
|
}
|
|
@@ -63,6 +63,11 @@ class RelayClient {
|
|
|
63
63
|
relay: rp.address,
|
|
64
64
|
nonce: rp.nonce,
|
|
65
65
|
};
|
|
66
|
+
let gasLimitStr = undefined;
|
|
67
|
+
if (overrides != undefined && overrides.gasLimit != undefined) {
|
|
68
|
+
gasLimitStr = overrides.gasLimit.toString();
|
|
69
|
+
}
|
|
70
|
+
args.gasLimit = gasLimitStr;
|
|
66
71
|
const proxyContractConfig = this.contractConfig.ProxyContracts;
|
|
67
72
|
const request = await (0, builder_1.buildProxyTransactionRequest)(this.signer, args, proxyContractConfig, metadata);
|
|
68
73
|
console.log(`Client side proxy request creation took: ${(Date.now() - start) / 1000} seconds`);
|
package/dist/types.d.ts
CHANGED
|
@@ -126,6 +126,9 @@ export interface RelayerTransactionResponse {
|
|
|
126
126
|
getTransaction: () => Promise<RelayerTransaction[]>;
|
|
127
127
|
wait: () => Promise<RelayerTransaction | undefined>;
|
|
128
128
|
}
|
|
129
|
+
export interface Overrides {
|
|
130
|
+
gasLimit?: bigint;
|
|
131
|
+
}
|
|
129
132
|
export interface ManualOverrides {
|
|
130
133
|
gasLimit?: bigint;
|
|
131
134
|
gasPrice?: bigint;
|