New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@near-eth/aurora-nep141

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@near-eth/aurora-nep141 - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

11

dist/bridged-ether/sendToNear/index.js

@@ -301,3 +301,12 @@ "use strict";

}]);
const tx = await provider.getTransaction(txHash);
let tx = null;
while (!tx) {
try {
await new Promise(resolve => setTimeout(resolve, 1000));
tx = await provider.getTransaction(txHash);
}
catch (error) {
console.log(error);
}
}
return {

@@ -304,0 +313,0 @@ ...transfer,

11

dist/natural-nep141/sendToAurora/index.d.ts

@@ -127,13 +127,2 @@ import { ethers } from 'ethers';

}): Promise<Transfer>;
export declare function getMinStorageBalance({ nep141Address, nearProvider }: {
nep141Address: string;
nearProvider: najProviders.Provider;
}): Promise<string>;
export declare function getStorageBalance({ nep141Address, accountId, nearProvider }: {
nep141Address: string;
accountId: string;
nearProvider: najProviders.Provider;
}): Promise<null | {
total: string;
}>;
//# sourceMappingURL=index.d.ts.map

@@ -29,3 +29,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getStorageBalance = exports.getMinStorageBalance = exports.lockNear = exports.wrapAndSendNearToAurora = exports.lock = exports.sendToAurora = exports.checkLock = exports.recover = exports.findAllTransfers = exports.checkStatus = exports.act = exports.i18n = exports.TRANSFER_TYPE = exports.DESTINATION_NETWORK = exports.SOURCE_NETWORK = void 0;
exports.lockNear = exports.wrapAndSendNearToAurora = exports.lock = exports.sendToAurora = exports.checkLock = exports.recover = exports.findAllTransfers = exports.checkStatus = exports.act = exports.i18n = exports.TRANSFER_TYPE = exports.DESTINATION_NETWORK = exports.SOURCE_NETWORK = void 0;
const bn_js_1 = __importDefault(require("bn.js"));

@@ -493,6 +493,6 @@ const near_api_js_1 = require("near-api-js");

const actions = [];
const minStorageBalance = await getMinStorageBalance({
const minStorageBalance = await utils_2.nep141.getMinStorageBalance({
nep141Address: wNearNep141, nearProvider
});
const userStorageBalance = await getStorageBalance({
const userStorageBalance = await utils_2.nep141.getStorageBalance({
nep141Address: wNearNep141,

@@ -579,43 +579,3 @@ accountId: transfer.sender,

exports.lockNear = lockNear;
async function getMinStorageBalance({ nep141Address, nearProvider }) {
try {
const result = await nearProvider.query({
request_type: 'call_function',
account_id: nep141Address,
method_name: 'storage_balance_bounds',
args_base64: '',
finality: 'optimistic'
});
return JSON.parse(Buffer.from(result.result).toString()).min;
}
catch (e) {
const result = await nearProvider.query({
request_type: 'call_function',
account_id: nep141Address,
method_name: 'storage_minimum_balance',
args_base64: '',
finality: 'optimistic'
});
return JSON.parse(Buffer.from(result.result).toString());
}
}
exports.getMinStorageBalance = getMinStorageBalance;
async function getStorageBalance({ nep141Address, accountId, nearProvider }) {
try {
const result = await nearProvider.query({
request_type: 'call_function',
account_id: nep141Address,
method_name: 'storage_balance_of',
args_base64: Buffer.from(JSON.stringify({ account_id: accountId })).toString('base64'),
finality: 'optimistic'
});
return JSON.parse(Buffer.from(result.result).toString());
}
catch (e) {
console.warn(e, nep141Address);
return null;
}
}
exports.getStorageBalance = getStorageBalance;
const last = (arr) => arr[arr.length - 1];
//# sourceMappingURL=index.js.map
{
"name": "@near-eth/aurora-nep141",
"version": "1.5.1",
"version": "1.5.2",
"license": "(MIT AND Apache-2.0)",

@@ -18,4 +18,4 @@ "main": "dist/index.js",

"dependencies": {
"@near-eth/client": "1.11.1",
"@near-eth/utils": "2.5.0",
"@near-eth/client": "1.12.0",
"@near-eth/utils": "2.6.0",
"bn.js": "^5.1.3",

@@ -22,0 +22,0 @@ "bs58": "^4.0.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc