@haven-fi/solauto-sdk 1.0.574 → 1.0.575
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.
@@ -3,11 +3,12 @@ import { Connection, PublicKey } from "@solana/web3.js";
|
|
3
3
|
export declare abstract class TxHandler {
|
4
4
|
rpcUrl: string;
|
5
5
|
programId: PublicKey;
|
6
|
+
wsEndpoint?: string | undefined;
|
6
7
|
connection: Connection;
|
7
8
|
umi: Umi;
|
8
9
|
signer: Signer;
|
9
10
|
otherSigners: Signer[];
|
10
|
-
constructor(rpcUrl: string, localTest?: boolean, programId?: PublicKey);
|
11
|
+
constructor(rpcUrl: string, localTest?: boolean, programId?: PublicKey, wsEndpoint?: string | undefined);
|
11
12
|
log(...args: any[]): void;
|
12
13
|
abstract defaultLookupTables(): string[];
|
13
14
|
abstract resetLiveTxUpdates(success?: boolean): Promise<void>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"txHandler.d.ts","sourceRoot":"","sources":["../../src/clients/txHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
1
|
+
{"version":3,"file":"txHandler.d.ts","sourceRoot":"","sources":["../../src/clients/txHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIxD,8BAAsB,SAAS;IAOpB,MAAM,EAAE,MAAM;IAEd,SAAS,EAAE,SAAS;IACpB,UAAU,CAAC,EAAE,MAAM;IATrB,UAAU,EAAG,UAAU,CAAC;IACxB,GAAG,EAAG,GAAG,CAAC;IACV,MAAM,EAAG,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAM;gBAG1B,MAAM,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,OAAO,EACZ,SAAS,GAAE,SAAgC,EAC3C,UAAU,CAAC,EAAE,MAAM,YAAA;IAe5B,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIzB,QAAQ,CAAC,mBAAmB,IAAI,MAAM,EAAE;IAExC,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAC9D"}
|
@@ -4,11 +4,12 @@ exports.TxHandler = void 0;
|
|
4
4
|
const utils_1 = require("../utils");
|
5
5
|
const constants_1 = require("../constants");
|
6
6
|
class TxHandler {
|
7
|
-
constructor(rpcUrl, localTest, programId = constants_1.SOLAUTO_PROD_PROGRAM) {
|
7
|
+
constructor(rpcUrl, localTest, programId = constants_1.SOLAUTO_PROD_PROGRAM, wsEndpoint) {
|
8
8
|
this.rpcUrl = rpcUrl;
|
9
9
|
this.programId = programId;
|
10
|
+
this.wsEndpoint = wsEndpoint;
|
10
11
|
this.otherSigners = [];
|
11
|
-
const [connection, umi] = (0, utils_1.getSolanaRpcConnection)(this.rpcUrl, this.programId);
|
12
|
+
const [connection, umi] = (0, utils_1.getSolanaRpcConnection)(this.rpcUrl, this.programId, wsEndpoint);
|
12
13
|
this.connection = connection;
|
13
14
|
this.umi = umi;
|
14
15
|
if (!globalThis.LOCAL_TEST && localTest) {
|
package/package.json
CHANGED
package/src/clients/txHandler.ts
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
import { Signer, Umi } from "@metaplex-foundation/umi";
|
2
2
|
import { Connection, PublicKey } from "@solana/web3.js";
|
3
|
-
import {
|
4
|
-
consoleLog,
|
5
|
-
getSolanaRpcConnection,
|
6
|
-
} from "../utils";
|
3
|
+
import { consoleLog, getSolanaRpcConnection } from "../utils";
|
7
4
|
import { SOLAUTO_PROD_PROGRAM } from "../constants";
|
8
5
|
|
9
6
|
export abstract class TxHandler {
|
@@ -15,9 +12,14 @@ export abstract class TxHandler {
|
|
15
12
|
constructor(
|
16
13
|
public rpcUrl: string,
|
17
14
|
localTest?: boolean,
|
18
|
-
public programId: PublicKey = SOLAUTO_PROD_PROGRAM
|
15
|
+
public programId: PublicKey = SOLAUTO_PROD_PROGRAM,
|
16
|
+
public wsEndpoint?: string
|
19
17
|
) {
|
20
|
-
const [connection, umi] = getSolanaRpcConnection(
|
18
|
+
const [connection, umi] = getSolanaRpcConnection(
|
19
|
+
this.rpcUrl,
|
20
|
+
this.programId,
|
21
|
+
wsEndpoint
|
22
|
+
);
|
21
23
|
this.connection = connection;
|
22
24
|
this.umi = umi;
|
23
25
|
|