@rhea-finance/cross-chain-sdk 0.1.3 → 0.1.4
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/README.md +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -854,7 +854,7 @@ MIT
|
|
|
854
854
|
|
|
855
855
|
## Related Links
|
|
856
856
|
|
|
857
|
-
- Demo Project: [cross-chain-demo](https://github.com/
|
|
857
|
+
- Demo Project: [cross-chain-demo](https://github.com/rhea-finance/cross-chain-demo)
|
|
858
858
|
- Rhea Finance: https://rhea.finance
|
|
859
859
|
|
|
860
860
|
## Contributing
|
package/dist/index.cjs
CHANGED
|
@@ -239,7 +239,7 @@ var DEFAULT_POSITION = "REGULAR";
|
|
|
239
239
|
var lpTokenPrefix = "shadow_ref_v1";
|
|
240
240
|
|
|
241
241
|
// src/chains/near.ts
|
|
242
|
-
async function
|
|
242
|
+
async function getNearConnection() {
|
|
243
243
|
let keyStore;
|
|
244
244
|
if (typeof globalThis["window"] === "undefined") {
|
|
245
245
|
keyStore = new nearApiJs.keyStores.InMemoryKeyStore();
|
|
@@ -251,6 +251,10 @@ async function getAccountConnection(accountId) {
|
|
|
251
251
|
networkId: config_near.networkId,
|
|
252
252
|
nodeUrl: config_near.nodeUrl
|
|
253
253
|
});
|
|
254
|
+
return connection;
|
|
255
|
+
}
|
|
256
|
+
async function getAccountConnection(accountId) {
|
|
257
|
+
const connection = await getNearConnection();
|
|
254
258
|
const account = await connection.account(
|
|
255
259
|
accountId || config_near.LOGIC_CONTRACT_NAME
|
|
256
260
|
);
|
|
@@ -2824,6 +2828,7 @@ exports.fetchIntentsTransactionStatus = fetchIntentsTransactionStatus;
|
|
|
2824
2828
|
exports.format_wallet = format_wallet;
|
|
2825
2829
|
exports.getAccountAllPositions = getAccountAllPositions;
|
|
2826
2830
|
exports.getAccountBalance = getAccountBalance;
|
|
2831
|
+
exports.getAccountConnection = getAccountConnection;
|
|
2827
2832
|
exports.getAdjustedSum = getAdjustedSum;
|
|
2828
2833
|
exports.getAllFarms = getAllFarms;
|
|
2829
2834
|
exports.getAssets = getAssets;
|
|
@@ -2842,6 +2847,7 @@ exports.getMultichainLendingConfig = getMultichainLendingConfig;
|
|
|
2842
2847
|
exports.getMultichainLendingData = getMultichainLendingData;
|
|
2843
2848
|
exports.getMultichainLendingHistory = getMultichainLendingHistory;
|
|
2844
2849
|
exports.getMultichainTokensByChains = getMultichainTokensByChains;
|
|
2850
|
+
exports.getNearConnection = getNearConnection;
|
|
2845
2851
|
exports.getNearValue = getNearValue;
|
|
2846
2852
|
exports.getNearValuesPaged = getNearValuesPaged;
|
|
2847
2853
|
exports.getPrices = getPrices;
|