@atomiqlabs/chain-solana 13.5.6 → 13.5.8
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/solana/chain/SolanaChainInterface.d.ts +4 -0
- package/dist/solana/chain/SolanaChainInterface.js +7 -0
- package/dist/solana/connection/ConnectionWithRetries.js +1 -1
- package/package.json +2 -2
- package/src/solana/chain/SolanaChainInterface.ts +8 -0
- package/src/solana/connection/ConnectionWithRetries.ts +1 -1
- package/src/solana/swaps/v2/programIdl.json +951 -951
- package/src/solana/swaps/v2/programTypes.ts +1899 -1899
|
@@ -117,6 +117,10 @@ export declare class SolanaChainInterface implements ChainInterface<SolanaTx, Si
|
|
|
117
117
|
* @inheritDoc
|
|
118
118
|
*/
|
|
119
119
|
getNativeCurrencyAddress(): string;
|
|
120
|
+
/**
|
|
121
|
+
* @inheritDoc
|
|
122
|
+
*/
|
|
123
|
+
shouldGetNativeTokenDrop(tokenAddress: string): boolean;
|
|
120
124
|
/**
|
|
121
125
|
* @inheritDoc
|
|
122
126
|
*/
|
|
@@ -90,6 +90,13 @@ class SolanaChainInterface {
|
|
|
90
90
|
getNativeCurrencyAddress() {
|
|
91
91
|
return this.Tokens.getNativeCurrencyAddress().toString();
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* @inheritDoc
|
|
95
|
+
*/
|
|
96
|
+
shouldGetNativeTokenDrop(tokenAddress) {
|
|
97
|
+
// True for all the tokens, because the contracts don't support native SOL handling yet
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
93
100
|
/**
|
|
94
101
|
* @inheritDoc
|
|
95
102
|
*/
|
|
@@ -63,7 +63,7 @@ class ConnectionWithRetries extends web3_js_1.Connection {
|
|
|
63
63
|
e?.message !== "Network request timed out" &&
|
|
64
64
|
e?.message !== "Too many requests (429)", init?.signal ?? undefined);
|
|
65
65
|
config.disableRetryOnRateLimit = true;
|
|
66
|
-
super(endpoint,
|
|
66
|
+
super(endpoint, config);
|
|
67
67
|
this.retryPolicy = config?.retryPolicy;
|
|
68
68
|
this.requestTimeout = config?.requestTimeout ?? 15 * 1000;
|
|
69
69
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomiqlabs/chain-solana",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.8",
|
|
4
4
|
"description": "Solana specific base implementation",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types:": "./dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"author": "adambor",
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atomiqlabs/base": "
|
|
29
|
+
"@atomiqlabs/base": "^13.5.2",
|
|
30
30
|
"@coral-xyz/anchor": "0.29.0",
|
|
31
31
|
"@noble/hashes": "^1.7.1",
|
|
32
32
|
"@solana/spl-token": "0.4.14",
|
|
@@ -173,6 +173,14 @@ export class SolanaChainInterface implements ChainInterface<
|
|
|
173
173
|
return this.Tokens.getNativeCurrencyAddress().toString();
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
/**
|
|
177
|
+
* @inheritDoc
|
|
178
|
+
*/
|
|
179
|
+
shouldGetNativeTokenDrop(tokenAddress: string): boolean {
|
|
180
|
+
// True for all the tokens, because the contracts don't support native SOL handling yet
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
|
|
176
184
|
/**
|
|
177
185
|
* @inheritDoc
|
|
178
186
|
*/
|
|
@@ -88,7 +88,7 @@ export class ConnectionWithRetries extends Connection {
|
|
|
88
88
|
);
|
|
89
89
|
config.disableRetryOnRateLimit = true;
|
|
90
90
|
|
|
91
|
-
super(endpoint,
|
|
91
|
+
super(endpoint, config);
|
|
92
92
|
this.retryPolicy = config?.retryPolicy;
|
|
93
93
|
this.requestTimeout = config?.requestTimeout ?? 15*1000;
|
|
94
94
|
}
|