@trezor/blockchain-link
Advanced tools
Comparing version 2.1.11 to 2.1.12
@@ -0,1 +1,7 @@ | ||
# 2.1.12 | ||
- 5711aa998 feat(blockchain-link): add getMempoolFilters method | ||
- 819c019d1 chore: use workspace:\* everywhere | ||
- 3e072b11f chore(blockchain-link): use `@trezor/e2e-utils` in tests | ||
# 2.1.11 | ||
@@ -2,0 +8,0 @@ |
@@ -1,2 +0,2 @@ | ||
import * as SocksProxyAgent from 'socks-proxy-agent'; | ||
import SocksProxyAgent from 'socks-proxy-agent'; | ||
import { WorkerState } from './state'; | ||
@@ -3,0 +3,0 @@ import type { Response, BlockchainSettings } from '@trezor/blockchain-link-types'; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BaseWorker = exports.CONTEXT = void 0; | ||
const SocksProxyAgent = require("socks-proxy-agent"); | ||
const socks_proxy_agent_1 = __importDefault(require("socks-proxy-agent")); | ||
const errors_1 = require("@trezor/blockchain-link-types/lib/constants/errors"); | ||
@@ -88,3 +91,3 @@ const state_1 = require("./state"); | ||
this.proxyAgent = data.settings.proxy | ||
? SocksProxyAgent(data.settings.proxy) | ||
? (0, socks_proxy_agent_1.default)(data.settings.proxy) | ||
: undefined; | ||
@@ -91,0 +94,0 @@ return true; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -7,3 +30,3 @@ const errors_1 = require("@trezor/blockchain-link-types/lib/constants/errors"); | ||
const websocket_1 = require("./websocket"); | ||
const utils = require("@trezor/blockchain-link-utils/lib/blockbook"); | ||
const utils = __importStar(require("@trezor/blockchain-link-utils/lib/blockbook")); | ||
const getInfo = async (request) => { | ||
@@ -10,0 +33,0 @@ const api = await request.connect(); |
/// <reference types="node" /> | ||
import * as WebSocket from 'ws'; | ||
import WebSocket from 'ws'; | ||
import { EventEmitter } from 'events'; | ||
@@ -55,2 +55,3 @@ import { Deferred } from '@trezor/utils'; | ||
getBlock(block: number | string): Promise<import("@trezor/blockchain-link-types/lib/blockbook").Block>; | ||
getMempoolFilters(fromTimestamp?: number): Promise<import("@trezor/blockchain-link-types/lib/blockbook").MempoolFilters>; | ||
getAccountInfo(payload: AccountInfoParams): Promise<import("@trezor/blockchain-link-types/lib/blockbook").AccountInfo>; | ||
@@ -57,0 +58,0 @@ getAccountUtxo(descriptor: string): Promise<import("@trezor/blockchain-link-types/lib/blockbook").AccountUtxo>; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BlockbookAPI = void 0; | ||
const WebSocket = require("ws"); | ||
const ws_1 = __importDefault(require("ws")); | ||
const events_1 = require("events"); | ||
@@ -121,3 +124,3 @@ const utils_1 = require("@trezor/utils"); | ||
} | ||
if (((_a = this.ws) === null || _a === void 0 ? void 0 : _a.readyState) === WebSocket.CLOSING) { | ||
if (((_a = this.ws) === null || _a === void 0 ? void 0 : _a.readyState) === ws_1.default.CLOSING) { | ||
await new Promise(resolve => this.once('disconnected', resolve)); | ||
@@ -142,3 +145,3 @@ } | ||
this.connectPromise = dfd.promise; | ||
const ws = new WebSocket(url, { | ||
const ws = new ws_1.default(url, { | ||
agent: this.options.agent, | ||
@@ -184,3 +187,3 @@ headers: Object.assign({ Origin: 'https://node.trezor.io', 'User-Agent': 'Trezor Suite' }, this.options.headers), | ||
const { ws } = this; | ||
return ws && ws.readyState === WebSocket.OPEN; | ||
return ws && ws.readyState === ws_1.default.OPEN; | ||
} | ||
@@ -196,2 +199,5 @@ getServerInfo() { | ||
} | ||
getMempoolFilters(fromTimestamp) { | ||
return this.send('getMempoolFilters', { fromTimestamp, scriptType: 'taproot' }); | ||
} | ||
getAccountInfo(payload) { | ||
@@ -198,0 +204,0 @@ return this.send('getAccountInfo', payload); |
/// <reference types="node" /> | ||
import * as WebSocket from 'ws'; | ||
import WebSocket from 'ws'; | ||
import { EventEmitter } from 'events'; | ||
@@ -4,0 +4,0 @@ import { Deferred } from '@trezor/utils/lib/createDeferred'; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BlockfrostAPI = void 0; | ||
const WebSocket = require("ws"); | ||
const ws_1 = __importDefault(require("ws")); | ||
const events_1 = require("events"); | ||
@@ -120,3 +123,3 @@ const createDeferred_1 = require("@trezor/utils/lib/createDeferred"); | ||
const dfd = (0, createDeferred_1.createDeferred)(-1); | ||
const ws = new WebSocket(url, { | ||
const ws = new ws_1.default(url, { | ||
agent: this.options.agent, | ||
@@ -159,3 +162,3 @@ }); | ||
const { ws } = this; | ||
return ws && ws.readyState === WebSocket.OPEN; | ||
return ws && ws.readyState === ws_1.default.OPEN; | ||
} | ||
@@ -162,0 +165,0 @@ getServerInfo() { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const _1 = require("."); | ||
const _1 = __importDefault(require(".")); | ||
const TOR_ADDRESS = '127.0.0.1:9050'; | ||
@@ -5,0 +8,0 @@ const LOCALHOST_CONFIG = 'localhost:50001:t'; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -6,4 +29,4 @@ const errors_1 = require("@trezor/blockchain-link-types/lib/constants/errors"); | ||
const base_1 = require("../base"); | ||
const M = require("./methods"); | ||
const L = require("./listeners"); | ||
const M = __importStar(require("./methods")); | ||
const L = __importStar(require("./listeners")); | ||
const sockets_1 = require("./sockets"); | ||
@@ -10,0 +33,0 @@ const caching_1 = require("./client/caching"); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const bignumber_js_1 = require("bignumber.js"); | ||
const bignumber_js_1 = __importDefault(require("bignumber.js")); | ||
const utxo_lib_1 = require("@trezor/utxo-lib"); | ||
@@ -5,0 +8,0 @@ const blockchain_link_utils_1 = require("@trezor/blockchain-link-utils"); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pushTransaction = exports.getTransaction = exports.getInfo = exports.getBlockHash = exports.getAccountUtxo = exports.getAccountInfo = exports.getAccountBalanceHistory = exports.estimateFee = void 0; | ||
var estimateFee_1 = require("./estimateFee"); | ||
Object.defineProperty(exports, "estimateFee", { enumerable: true, get: function () { return estimateFee_1.default; } }); | ||
Object.defineProperty(exports, "estimateFee", { enumerable: true, get: function () { return __importDefault(estimateFee_1).default; } }); | ||
var getAccountBalanceHistory_1 = require("./getAccountBalanceHistory"); | ||
Object.defineProperty(exports, "getAccountBalanceHistory", { enumerable: true, get: function () { return getAccountBalanceHistory_1.default; } }); | ||
Object.defineProperty(exports, "getAccountBalanceHistory", { enumerable: true, get: function () { return __importDefault(getAccountBalanceHistory_1).default; } }); | ||
var getAccountInfo_1 = require("./getAccountInfo"); | ||
Object.defineProperty(exports, "getAccountInfo", { enumerable: true, get: function () { return getAccountInfo_1.default; } }); | ||
Object.defineProperty(exports, "getAccountInfo", { enumerable: true, get: function () { return __importDefault(getAccountInfo_1).default; } }); | ||
var getAccountUtxo_1 = require("./getAccountUtxo"); | ||
Object.defineProperty(exports, "getAccountUtxo", { enumerable: true, get: function () { return getAccountUtxo_1.default; } }); | ||
Object.defineProperty(exports, "getAccountUtxo", { enumerable: true, get: function () { return __importDefault(getAccountUtxo_1).default; } }); | ||
var getBlockHash_1 = require("./getBlockHash"); | ||
Object.defineProperty(exports, "getBlockHash", { enumerable: true, get: function () { return getBlockHash_1.default; } }); | ||
Object.defineProperty(exports, "getBlockHash", { enumerable: true, get: function () { return __importDefault(getBlockHash_1).default; } }); | ||
var getInfo_1 = require("./getInfo"); | ||
Object.defineProperty(exports, "getInfo", { enumerable: true, get: function () { return getInfo_1.default; } }); | ||
Object.defineProperty(exports, "getInfo", { enumerable: true, get: function () { return __importDefault(getInfo_1).default; } }); | ||
var getTransaction_1 = require("./getTransaction"); | ||
Object.defineProperty(exports, "getTransaction", { enumerable: true, get: function () { return getTransaction_1.default; } }); | ||
Object.defineProperty(exports, "getTransaction", { enumerable: true, get: function () { return __importDefault(getTransaction_1).default; } }); | ||
var pushTransaction_1 = require("./pushTransaction"); | ||
Object.defineProperty(exports, "pushTransaction", { enumerable: true, get: function () { return pushTransaction_1.default; } }); | ||
Object.defineProperty(exports, "pushTransaction", { enumerable: true, get: function () { return __importDefault(pushTransaction_1).default; } }); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const ripple_lib_1 = require("ripple-lib"); | ||
const errors_1 = require("ripple-lib/dist/npm/common/errors"); | ||
const bignumber_js_1 = require("bignumber.js"); | ||
const bignumber_js_1 = __importDefault(require("bignumber.js")); | ||
const errors_2 = require("@trezor/blockchain-link-types/lib/constants/errors"); | ||
const constants_1 = require("@trezor/blockchain-link-types/lib/constants"); | ||
const base_1 = require("../base"); | ||
const utils = require("@trezor/blockchain-link-utils/lib/ripple"); | ||
const utils = __importStar(require("@trezor/blockchain-link-utils/lib/ripple")); | ||
const DEFAULT_TIMEOUT = 20 * 1000; | ||
@@ -11,0 +37,0 @@ const DEFAULT_PING_TIMEOUT = 3 * 60 * 1000; |
{ | ||
"name": "@trezor/blockchain-link", | ||
"version": "2.1.11", | ||
"version": "2.1.12", | ||
"author": "Trezor <info@trezor.io>", | ||
@@ -55,2 +55,3 @@ "homepage": "https://github.com/trezor/trezor-suite/tree/develop/packages/blockchain-link", | ||
"devDependencies": { | ||
"@trezor/e2e-utils": "1.0.0", | ||
"html-webpack-plugin": "^5.5.0", | ||
@@ -68,6 +69,6 @@ "jest": "^26.6.3", | ||
"dependencies": { | ||
"@trezor/blockchain-link-types": "1.0.1", | ||
"@trezor/blockchain-link-utils": "1.0.2", | ||
"@trezor/utils": "9.0.7", | ||
"@trezor/utxo-lib": "1.0.5", | ||
"@trezor/blockchain-link-types": "1.0.2", | ||
"@trezor/blockchain-link-utils": "1.0.3", | ||
"@trezor/utils": "9.0.8", | ||
"@trezor/utxo-lib": "1.0.6", | ||
"@types/web": "^0.0.99", | ||
@@ -74,0 +75,0 @@ "bignumber.js": "^9.1.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
182592
4412
11
+ Added@trezor/blockchain-link-types@1.0.2(transitive)
+ Added@trezor/blockchain-link-utils@1.0.3(transitive)
+ Added@trezor/utils@9.0.8(transitive)
+ Added@trezor/utxo-lib@1.0.6(transitive)
- Removed@trezor/blockchain-link-types@1.0.1(transitive)
- Removed@trezor/blockchain-link-utils@1.0.2(transitive)
- Removed@trezor/utils@9.0.7(transitive)
- Removed@trezor/utxo-lib@1.0.5(transitive)
Updated@trezor/utils@9.0.8
Updated@trezor/utxo-lib@1.0.6