@atomiqlabs/chain-solana 7.3.8 → 8.0.0-beta.0
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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/solana/SolanaChains.d.ts +14 -0
- package/dist/solana/SolanaChains.js +18 -0
- package/dist/solana/SolanaInitializer.d.ts +18 -0
- package/dist/solana/SolanaInitializer.js +59 -0
- package/dist/solana/base/SolanaAction.js +25 -38
- package/dist/solana/base/modules/SolanaBlocks.js +18 -29
- package/dist/solana/base/modules/SolanaEvents.js +15 -26
- package/dist/solana/base/modules/SolanaFees.d.ts +4 -5
- package/dist/solana/base/modules/SolanaFees.js +168 -182
- package/dist/solana/base/modules/SolanaSlots.js +16 -29
- package/dist/solana/base/modules/SolanaTokens.d.ts +6 -7
- package/dist/solana/base/modules/SolanaTokens.js +63 -84
- package/dist/solana/base/modules/SolanaTransactions.d.ts +2 -2
- package/dist/solana/base/modules/SolanaTransactions.js +143 -165
- package/dist/solana/btcrelay/SolanaBtcRelay.d.ts +2 -3
- package/dist/solana/btcrelay/SolanaBtcRelay.js +185 -221
- package/dist/solana/events/SolanaChainEvents.js +113 -138
- package/dist/solana/events/SolanaChainEventsBrowser.js +56 -65
- package/dist/solana/program/modules/SolanaProgramEvents.js +13 -24
- package/dist/solana/swaps/SolanaSwapData.d.ts +15 -11
- package/dist/solana/swaps/SolanaSwapData.js +29 -13
- package/dist/solana/swaps/SolanaSwapProgram.d.ts +40 -41
- package/dist/solana/swaps/SolanaSwapProgram.js +212 -221
- package/dist/solana/swaps/modules/SolanaDataAccount.d.ts +2 -3
- package/dist/solana/swaps/modules/SolanaDataAccount.js +117 -141
- package/dist/solana/swaps/modules/SolanaLpVault.d.ts +4 -5
- package/dist/solana/swaps/modules/SolanaLpVault.js +87 -110
- package/dist/solana/swaps/modules/SwapClaim.d.ts +4 -4
- package/dist/solana/swaps/modules/SwapClaim.js +122 -134
- package/dist/solana/swaps/modules/SwapInit.d.ts +2 -3
- package/dist/solana/swaps/modules/SwapInit.js +254 -285
- package/dist/solana/swaps/modules/SwapRefund.d.ts +2 -3
- package/dist/solana/swaps/modules/SwapRefund.js +103 -113
- package/dist/utils/Utils.d.ts +10 -0
- package/dist/utils/Utils.js +62 -35
- package/package.json +9 -6
- package/src/index.ts +1 -0
- package/src/solana/SolanaChains.ts +16 -0
- package/src/solana/SolanaInitializer.ts +98 -0
- package/src/solana/base/SolanaBase.ts +1 -2
- package/src/solana/base/modules/SolanaEvents.ts +0 -1
- package/src/solana/base/modules/SolanaFees.ts +35 -31
- package/src/solana/base/modules/SolanaTokens.ts +26 -27
- package/src/solana/base/modules/SolanaTransactions.ts +33 -28
- package/src/solana/btcrelay/SolanaBtcRelay.ts +6 -10
- package/src/solana/events/SolanaChainEventsBrowser.ts +14 -10
- package/src/solana/program/modules/SolanaProgramEvents.ts +1 -1
- package/src/solana/swaps/SolanaSwapData.ts +38 -19
- package/src/solana/swaps/SolanaSwapProgram.ts +133 -105
- package/src/solana/swaps/modules/SolanaDataAccount.ts +4 -6
- package/src/solana/swaps/modules/SolanaLpVault.ts +18 -18
- package/src/solana/swaps/modules/SwapClaim.ts +14 -17
- package/src/solana/swaps/modules/SwapInit.ts +35 -38
- package/src/solana/swaps/modules/SwapRefund.ts +20 -23
- package/src/utils/Utils.ts +35 -0
|
@@ -7,6 +7,8 @@ const base_1 = require("@atomiqlabs/base");
|
|
|
7
7
|
const SwapTypeEnum_1 = require("./SwapTypeEnum");
|
|
8
8
|
const buffer_1 = require("buffer");
|
|
9
9
|
const spl_token_1 = require("@solana/spl-token");
|
|
10
|
+
const Utils_1 = require("../../utils/Utils");
|
|
11
|
+
const SolanaTokens_1 = require("../base/modules/SolanaTokens");
|
|
10
12
|
const EXPIRY_BLOCKHEIGHT_THRESHOLD = new BN("1000000000");
|
|
11
13
|
class SolanaSwapData extends base_1.SwapData {
|
|
12
14
|
constructor(offererOrData, claimer, token, amount, paymentHash, sequence, expiry, nonce, confirmations, payOut, kind, payIn, offererAta, claimerAta, securityDeposit, claimerBounty, txoHash) {
|
|
@@ -91,7 +93,7 @@ class SolanaSwapData extends base_1.SwapData {
|
|
|
91
93
|
};
|
|
92
94
|
}
|
|
93
95
|
getAmount() {
|
|
94
|
-
return this.amount;
|
|
96
|
+
return (0, Utils_1.toBigInt)(this.amount);
|
|
95
97
|
}
|
|
96
98
|
getToken() {
|
|
97
99
|
return this.token.toString();
|
|
@@ -105,13 +107,13 @@ class SolanaSwapData extends base_1.SwapData {
|
|
|
105
107
|
getExpiry() {
|
|
106
108
|
if (this.expiry.lt(EXPIRY_BLOCKHEIGHT_THRESHOLD))
|
|
107
109
|
return null;
|
|
108
|
-
return this.expiry;
|
|
110
|
+
return (0, Utils_1.toBigInt)(this.expiry);
|
|
109
111
|
}
|
|
110
|
-
|
|
112
|
+
getConfirmationsHint() {
|
|
111
113
|
return this.confirmations;
|
|
112
114
|
}
|
|
113
|
-
|
|
114
|
-
return this.nonce;
|
|
115
|
+
getNonceHint() {
|
|
116
|
+
return (0, Utils_1.toBigInt)(this.nonce);
|
|
115
117
|
}
|
|
116
118
|
isPayIn() {
|
|
117
119
|
return this.payIn;
|
|
@@ -119,26 +121,34 @@ class SolanaSwapData extends base_1.SwapData {
|
|
|
119
121
|
isPayOut() {
|
|
120
122
|
return this.payOut;
|
|
121
123
|
}
|
|
122
|
-
|
|
123
|
-
return this.paymentHash;
|
|
124
|
+
getClaimHash() {
|
|
125
|
+
return (0, Utils_1.toClaimHash)(this.paymentHash, (0, Utils_1.toBigInt)(this.nonce), this.confirmations);
|
|
126
|
+
}
|
|
127
|
+
getEscrowHash() {
|
|
128
|
+
return (0, Utils_1.toEscrowHash)(this.paymentHash, this.sequence);
|
|
124
129
|
}
|
|
125
130
|
getSequence() {
|
|
126
|
-
return this.sequence;
|
|
131
|
+
return (0, Utils_1.toBigInt)(this.sequence);
|
|
132
|
+
}
|
|
133
|
+
getTxoHashHint() {
|
|
134
|
+
if (this.txoHash === "0000000000000000000000000000000000000000000000000000000000000000")
|
|
135
|
+
return null; //Txo hash opt-out flag
|
|
136
|
+
return this.txoHash;
|
|
127
137
|
}
|
|
128
|
-
|
|
138
|
+
getExtraData() {
|
|
129
139
|
return this.txoHash;
|
|
130
140
|
}
|
|
131
|
-
|
|
141
|
+
setExtraData(txoHash) {
|
|
132
142
|
this.txoHash = txoHash;
|
|
133
143
|
}
|
|
134
144
|
getSecurityDeposit() {
|
|
135
|
-
return this.securityDeposit;
|
|
145
|
+
return (0, Utils_1.toBigInt)(this.securityDeposit);
|
|
136
146
|
}
|
|
137
147
|
getClaimerBounty() {
|
|
138
|
-
return this.claimerBounty;
|
|
148
|
+
return (0, Utils_1.toBigInt)(this.claimerBounty);
|
|
139
149
|
}
|
|
140
150
|
getTotalDeposit() {
|
|
141
|
-
return this.claimerBounty.lt(this.securityDeposit) ? this.securityDeposit : this.claimerBounty;
|
|
151
|
+
return (0, Utils_1.toBigInt)(this.claimerBounty.lt(this.securityDeposit) ? this.securityDeposit : this.claimerBounty);
|
|
142
152
|
}
|
|
143
153
|
toSwapDataStruct() {
|
|
144
154
|
return {
|
|
@@ -246,6 +256,12 @@ class SolanaSwapData extends base_1.SwapData {
|
|
|
246
256
|
isOfferer(address) {
|
|
247
257
|
return this.offerer.equals(new web3_js_1.PublicKey(address));
|
|
248
258
|
}
|
|
259
|
+
getDepositToken() {
|
|
260
|
+
return SolanaTokens_1.SolanaTokens.WSOL_ADDRESS.toString();
|
|
261
|
+
}
|
|
262
|
+
isDepositToken(token) {
|
|
263
|
+
return SolanaTokens_1.SolanaTokens.WSOL_ADDRESS.equals(new web3_js_1.PublicKey(token));
|
|
264
|
+
}
|
|
249
265
|
}
|
|
250
266
|
exports.SolanaSwapData = SolanaSwapData;
|
|
251
267
|
base_1.SwapData.deserializers["sol"] = SolanaSwapData;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { SolanaSwapData } from "./SolanaSwapData";
|
|
3
|
-
import * as BN from "bn.js";
|
|
4
3
|
import { Connection, PublicKey, SendOptions } from "@solana/web3.js";
|
|
5
4
|
import { SolanaBtcRelay } from "../btcrelay/SolanaBtcRelay";
|
|
6
5
|
import { IStorageManager, SwapContract, ChainSwapType, IntermediaryReputationType, SwapCommitStatus, TransactionConfirmationOptions, SignatureData, RelaySynchronizer } from "@atomiqlabs/base";
|
|
@@ -39,12 +38,12 @@ export declare class SolanaSwapProgram extends SolanaProgramBase<SwapProgram> im
|
|
|
39
38
|
start(): Promise<void>;
|
|
40
39
|
getClaimableDeposits(signer: string): Promise<{
|
|
41
40
|
count: number;
|
|
42
|
-
totalValue:
|
|
41
|
+
totalValue: bigint;
|
|
43
42
|
}>;
|
|
44
43
|
claimDeposits(signer: SolanaSigner): Promise<{
|
|
45
44
|
txIds: string[];
|
|
46
45
|
count: number;
|
|
47
|
-
totalValue:
|
|
46
|
+
totalValue: bigint;
|
|
48
47
|
}>;
|
|
49
48
|
preFetchForInitSignatureVerification(data: SolanaPreFetchData): Promise<SolanaPreFetchVerification>;
|
|
50
49
|
preFetchBlockDataForSignatures(): Promise<SolanaPreFetchData>;
|
|
@@ -92,7 +91,7 @@ export declare class SolanaSwapProgram extends SolanaProgramBase<SwapProgram> im
|
|
|
92
91
|
* @param signer
|
|
93
92
|
* @param data
|
|
94
93
|
*/
|
|
95
|
-
isExpired(signer: string, data: SolanaSwapData): boolean
|
|
94
|
+
isExpired(signer: string, data: SolanaSwapData): Promise<boolean>;
|
|
96
95
|
/**
|
|
97
96
|
* Checks if the swap is refundable by us, checks if we are offerer, if the swap is already expired & if the swap
|
|
98
97
|
* is still commited
|
|
@@ -106,9 +105,12 @@ export declare class SolanaSwapProgram extends SolanaProgramBase<SwapProgram> im
|
|
|
106
105
|
*
|
|
107
106
|
* @param outputScript output script required to claim the swap
|
|
108
107
|
* @param amount sats sent required to claim the swap
|
|
108
|
+
* @param confirmations
|
|
109
109
|
* @param nonce swap nonce uniquely identifying the transaction to prevent replay attacks
|
|
110
110
|
*/
|
|
111
|
-
getHashForOnchain(outputScript: Buffer, amount:
|
|
111
|
+
getHashForOnchain(outputScript: Buffer, amount: bigint, confirmations: number, nonce?: bigint): Buffer;
|
|
112
|
+
getHashForHtlc(swapHash: Buffer): Buffer;
|
|
113
|
+
getHashForTxId(txId: string, confirmations: number): Buffer;
|
|
112
114
|
/**
|
|
113
115
|
* Gets the status of the specific swap, this also checks if we are offerer/claimer & checks for expiry (to see
|
|
114
116
|
* if swap is refundable)
|
|
@@ -120,96 +122,92 @@ export declare class SolanaSwapProgram extends SolanaProgramBase<SwapProgram> im
|
|
|
120
122
|
/**
|
|
121
123
|
* Checks the status of the specific payment hash
|
|
122
124
|
*
|
|
123
|
-
* @param
|
|
125
|
+
* @param claimHash
|
|
124
126
|
*/
|
|
125
|
-
|
|
127
|
+
getClaimHashStatus(claimHash: string): Promise<SwapCommitStatus>;
|
|
126
128
|
/**
|
|
127
129
|
* Returns the data committed for a specific payment hash, or null if no data is currently commited for
|
|
128
130
|
* the specific swap
|
|
129
131
|
*
|
|
130
|
-
* @param
|
|
132
|
+
* @param claimHashHex
|
|
131
133
|
*/
|
|
132
|
-
getCommitedData(
|
|
133
|
-
createSwapData(type: ChainSwapType, offerer: string, claimer: string, token: string, amount:
|
|
134
|
-
getBalance(signer: string, tokenAddress: string, inContract: boolean): Promise<
|
|
134
|
+
getCommitedData(claimHashHex: string): Promise<SolanaSwapData>;
|
|
135
|
+
createSwapData(type: ChainSwapType, offerer: string, claimer: string, token: string, amount: bigint, claimHash: string, sequence: bigint, expiry: bigint, payIn: boolean, payOut: boolean, securityDeposit: bigint, claimerBounty: bigint, depositToken?: string): Promise<SolanaSwapData>;
|
|
136
|
+
getBalance(signer: string, tokenAddress: string, inContract: boolean): Promise<bigint>;
|
|
135
137
|
getIntermediaryData(address: string, token: string): Promise<{
|
|
136
|
-
balance:
|
|
138
|
+
balance: bigint;
|
|
137
139
|
reputation: IntermediaryReputationType;
|
|
138
140
|
}>;
|
|
139
141
|
getIntermediaryReputation(address: string, token: string): Promise<IntermediaryReputationType>;
|
|
140
|
-
getIntermediaryBalance(address: PublicKey, token: PublicKey): Promise<
|
|
142
|
+
getIntermediaryBalance(address: PublicKey, token: PublicKey): Promise<bigint>;
|
|
141
143
|
isValidAddress(address: string): boolean;
|
|
142
144
|
getNativeCurrencyAddress(): string;
|
|
143
145
|
txsClaimWithSecret(signer: string | SolanaSigner, swapData: SolanaSwapData, secret: string, checkExpiry?: boolean, initAta?: boolean, feeRate?: string, skipAtaCheck?: boolean): Promise<SolanaTx[]>;
|
|
144
|
-
txsClaimWithTxData(signer: string | SolanaSigner, swapData: SolanaSwapData,
|
|
146
|
+
txsClaimWithTxData(signer: string | SolanaSigner, swapData: SolanaSwapData, tx: {
|
|
145
147
|
blockhash: string;
|
|
146
148
|
confirmations: number;
|
|
147
149
|
txid: string;
|
|
148
150
|
hex: string;
|
|
149
|
-
|
|
151
|
+
height: number;
|
|
152
|
+
}, requiredConfirmations: number, vout: number, commitedHeader?: SolanaBtcStoredHeader, synchronizer?: RelaySynchronizer<any, SolanaTx, any>, initAta?: boolean, feeRate?: string, storageAccHolder?: {
|
|
150
153
|
storageAcc: PublicKey;
|
|
151
154
|
}): Promise<SolanaTx[] | null>;
|
|
152
|
-
txsRefund(swapData: SolanaSwapData, check?: boolean, initAta?: boolean, feeRate?: string): Promise<SolanaTx[]>;
|
|
153
|
-
txsRefundWithAuthorization(swapData: SolanaSwapData, { timeout, prefix, signature }: {
|
|
155
|
+
txsRefund(signer: string, swapData: SolanaSwapData, check?: boolean, initAta?: boolean, feeRate?: string): Promise<SolanaTx[]>;
|
|
156
|
+
txsRefundWithAuthorization(signer: string, swapData: SolanaSwapData, { timeout, prefix, signature }: {
|
|
154
157
|
timeout: any;
|
|
155
158
|
prefix: any;
|
|
156
159
|
signature: any;
|
|
157
160
|
}, check?: boolean, initAta?: boolean, feeRate?: string): Promise<SolanaTx[]>;
|
|
158
|
-
txsInitPayIn(swapData: SolanaSwapData, { timeout, prefix, signature }: {
|
|
159
|
-
timeout: any;
|
|
160
|
-
prefix: any;
|
|
161
|
-
signature: any;
|
|
162
|
-
}, skipChecks?: boolean, feeRate?: string): Promise<SolanaTx[]>;
|
|
163
161
|
txsInit(swapData: SolanaSwapData, { timeout, prefix, signature }: {
|
|
164
162
|
timeout: any;
|
|
165
163
|
prefix: any;
|
|
166
164
|
signature: any;
|
|
167
|
-
},
|
|
168
|
-
txsWithdraw(signer: string, token: string, amount:
|
|
169
|
-
txsDeposit(signer: string, token: string, amount:
|
|
170
|
-
txsTransfer(signer: string, token: string, amount:
|
|
165
|
+
}, skipChecks?: boolean, feeRate?: string): Promise<SolanaTx[]>;
|
|
166
|
+
txsWithdraw(signer: string, token: string, amount: bigint, feeRate?: string): Promise<SolanaTx[]>;
|
|
167
|
+
txsDeposit(signer: string, token: string, amount: bigint, feeRate?: string): Promise<SolanaTx[]>;
|
|
168
|
+
txsTransfer(signer: string, token: string, amount: bigint, dstAddress: string, feeRate?: string): Promise<SolanaTx[]>;
|
|
171
169
|
claimWithSecret(signer: SolanaSigner, swapData: SolanaSwapData, secret: string, checkExpiry?: boolean, initAta?: boolean, txOptions?: TransactionConfirmationOptions): Promise<string>;
|
|
172
|
-
claimWithTxData(signer: SolanaSigner, swapData: SolanaSwapData,
|
|
170
|
+
claimWithTxData(signer: SolanaSigner, swapData: SolanaSwapData, tx: {
|
|
173
171
|
blockhash: string;
|
|
174
172
|
confirmations: number;
|
|
175
173
|
txid: string;
|
|
176
174
|
hex: string;
|
|
177
|
-
|
|
175
|
+
height: number;
|
|
176
|
+
}, requiredConfirmations: number, vout: number, commitedHeader?: SolanaBtcStoredHeader, synchronizer?: RelaySynchronizer<any, SolanaTx, any>, initAta?: boolean, txOptions?: TransactionConfirmationOptions): Promise<string>;
|
|
178
177
|
refund(signer: SolanaSigner, swapData: SolanaSwapData, check?: boolean, initAta?: boolean, txOptions?: TransactionConfirmationOptions): Promise<string>;
|
|
179
178
|
refundWithAuthorization(signer: SolanaSigner, swapData: SolanaSwapData, signature: SignatureData, check?: boolean, initAta?: boolean, txOptions?: TransactionConfirmationOptions): Promise<string>;
|
|
180
|
-
|
|
181
|
-
init(signer: SolanaSigner, swapData: SolanaSwapData, signature: SignatureData, txoHash?: Buffer, skipChecks?: boolean, txOptions?: TransactionConfirmationOptions): Promise<string>;
|
|
179
|
+
init(signer: SolanaSigner, swapData: SolanaSwapData, signature: SignatureData, skipChecks?: boolean, txOptions?: TransactionConfirmationOptions): Promise<string>;
|
|
182
180
|
initAndClaimWithSecret(signer: SolanaSigner, swapData: SolanaSwapData, signature: SignatureData, secret: string, skipChecks?: boolean, txOptions?: TransactionConfirmationOptions): Promise<string[]>;
|
|
183
|
-
withdraw(signer: SolanaSigner, token: string, amount:
|
|
184
|
-
deposit(signer: SolanaSigner, token: string, amount:
|
|
185
|
-
transfer(signer: SolanaSigner, token: string, amount:
|
|
181
|
+
withdraw(signer: SolanaSigner, token: string, amount: bigint, txOptions?: TransactionConfirmationOptions): Promise<string>;
|
|
182
|
+
deposit(signer: SolanaSigner, token: string, amount: bigint, txOptions?: TransactionConfirmationOptions): Promise<string>;
|
|
183
|
+
transfer(signer: SolanaSigner, token: string, amount: bigint, dstAddress: string, txOptions?: TransactionConfirmationOptions): Promise<string>;
|
|
186
184
|
sendAndConfirm(signer: SolanaSigner, txs: SolanaTx[], waitForConfirmation?: boolean, abortSignal?: AbortSignal, parallel?: boolean, onBeforePublish?: (txId: string, rawTx: string) => Promise<void>): Promise<string[]>;
|
|
187
185
|
serializeTx(tx: SolanaTx): Promise<string>;
|
|
188
186
|
deserializeTx(txData: string): Promise<SolanaTx>;
|
|
189
187
|
getTxIdStatus(txId: string): Promise<"not_found" | "pending" | "success" | "reverted">;
|
|
190
188
|
getTxStatus(tx: string): Promise<"not_found" | "pending" | "success" | "reverted">;
|
|
191
|
-
getInitPayInFeeRate(offerer?: string, claimer?: string, token?: string,
|
|
192
|
-
getInitFeeRate(offerer?: string, claimer?: string, token?: string,
|
|
189
|
+
getInitPayInFeeRate(offerer?: string, claimer?: string, token?: string, claimHash?: string): Promise<string>;
|
|
190
|
+
getInitFeeRate(offerer?: string, claimer?: string, token?: string, claimHash?: string): Promise<string>;
|
|
193
191
|
getRefundFeeRate(swapData: SolanaSwapData): Promise<string>;
|
|
194
192
|
getClaimFeeRate(signer: string, swapData: SolanaSwapData): Promise<string>;
|
|
195
|
-
getClaimFee(signer: string, swapData: SolanaSwapData, feeRate?: string): Promise<
|
|
196
|
-
getRawClaimFee(signer: string, swapData: SolanaSwapData, feeRate?: string): Promise<
|
|
193
|
+
getClaimFee(signer: string, swapData: SolanaSwapData, feeRate?: string): Promise<bigint>;
|
|
194
|
+
getRawClaimFee(signer: string, swapData: SolanaSwapData, feeRate?: string): Promise<bigint>;
|
|
197
195
|
/**
|
|
198
196
|
* Get the estimated solana fee of the commit transaction
|
|
199
197
|
*/
|
|
200
|
-
getCommitFee(swapData: SolanaSwapData, feeRate?: string): Promise<
|
|
198
|
+
getCommitFee(swapData: SolanaSwapData, feeRate?: string): Promise<bigint>;
|
|
201
199
|
/**
|
|
202
200
|
* Get the estimated solana fee of the commit transaction, without any deposits
|
|
203
201
|
*/
|
|
204
|
-
getRawCommitFee(swapData: SolanaSwapData, feeRate?: string): Promise<
|
|
202
|
+
getRawCommitFee(swapData: SolanaSwapData, feeRate?: string): Promise<bigint>;
|
|
205
203
|
/**
|
|
206
204
|
* Get the estimated solana transaction fee of the refund transaction
|
|
207
205
|
*/
|
|
208
|
-
getRefundFee(swapData: SolanaSwapData, feeRate?: string): Promise<
|
|
206
|
+
getRefundFee(swapData: SolanaSwapData, feeRate?: string): Promise<bigint>;
|
|
209
207
|
/**
|
|
210
208
|
* Get the estimated solana transaction fee of the refund transaction
|
|
211
209
|
*/
|
|
212
|
-
getRawRefundFee(swapData: SolanaSwapData, feeRate?: string): Promise<
|
|
210
|
+
getRawRefundFee(swapData: SolanaSwapData, feeRate?: string): Promise<bigint>;
|
|
213
211
|
offBeforeTxReplace(callback: (oldTx: string, oldTxId: string, newTx: string, newTxId: string) => Promise<void>): boolean;
|
|
214
212
|
onBeforeTxReplace(callback: (oldTx: string, oldTxId: string, newTx: string, newTxId: string) => Promise<void>): void;
|
|
215
213
|
onBeforeTxSigned(callback: (tx: SolanaTx) => Promise<void>): void;
|
|
@@ -219,4 +217,5 @@ export declare class SolanaSwapProgram extends SolanaProgramBase<SwapProgram> im
|
|
|
219
217
|
isValidToken(tokenIdentifier: string): boolean;
|
|
220
218
|
randomAddress(): string;
|
|
221
219
|
randomSigner(): SolanaSigner;
|
|
220
|
+
getExtraData(outputScript: Buffer, amount: bigint, confirmations: number, nonce?: bigint): Buffer;
|
|
222
221
|
}
|