@0xsequence/network
Advanced tools
Comparing version 0.0.0-20231205222341 to 0.0.0-20231214172616
@@ -272,2 +272,4 @@ 'use strict'; | ||
constructor(middlewares, sender) { | ||
this.sender = void 0; | ||
this.handler = void 0; | ||
this.sender = sender; | ||
@@ -316,2 +318,5 @@ if (middlewares) { | ||
constructor(provider, defaultChainId) { | ||
this.send = void 0; | ||
this.request = void 0; | ||
this.defaultChainId = void 0; | ||
this.sendAsync = (request, callback, chainId) => { | ||
@@ -362,2 +367,3 @@ this.send(request.method, request.params, chainId || this.defaultChainId).then(r => { | ||
constructor(provider) { | ||
this.provider = provider; | ||
this.sendAsync = (request, callback) => { | ||
@@ -375,3 +381,2 @@ this.provider.send(request.method, request.params).then(r => { | ||
this.send = this.sendAsync; | ||
this.provider = provider; | ||
} | ||
@@ -382,2 +387,4 @@ } | ||
constructor(isAllowedFunc) { | ||
this.sendAsyncMiddleware = void 0; | ||
this.isAllowedFunc = void 0; | ||
if (isAllowedFunc) { | ||
@@ -408,6 +415,2 @@ this.isAllowedFunc = isAllowedFunc; | ||
class CachedProvider { | ||
// onUpdateCallback callback to be notified when cache values are set. | ||
// defaultChainId is used for default chain select with used with multi-chain provider | ||
constructor(options) { | ||
@@ -423,3 +426,11 @@ // cachableJsonRpcMethods which can be permanently cached for lifetime | ||
this.cachableJsonRpcMethodsByBlock = ['eth_call', 'eth_getCode']; | ||
// cache for life-time of provider (unless explicitly cleared) | ||
this.cache = void 0; | ||
// cache by block, simulated by using a 1 second life-time | ||
this.cacheByBlock = void 0; | ||
this.cacheByBlockResetLock = false; | ||
// onUpdateCallback callback to be notified when cache values are set. | ||
this.onUpdateCallback = void 0; | ||
// defaultChainId is used for default chain select with used with multi-chain provider | ||
this.defaultChainId = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -543,4 +554,6 @@ return (request, callback, chainId) => { | ||
// communicating to a specific network provider. | ||
class EagerProvider { | ||
constructor(options) { | ||
this.options = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -669,2 +682,3 @@ return (request, callback, chainId) => { | ||
constructor(provider) { | ||
this.provider = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -689,2 +703,4 @@ return (request, callback, chainId) => { | ||
this.privateJsonRpcMethods = ['net_version', 'eth_chainId', 'eth_accounts', ...SignerJsonRpcMethods]; | ||
this.provider = void 0; | ||
this.rpcUrl = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -732,2 +748,3 @@ return (request, callback) => { | ||
this.singleflightJsonRpcMethods = ['eth_chainId', 'net_version', 'eth_call', 'eth_getCode', 'eth_blockNumber', 'eth_getBalance', 'eth_getStorageAt', 'eth_getTransactionCount', 'eth_getBlockTransactionCountByHash', 'eth_getBlockTransactionCountByNumber', 'eth_getUncleCountByBlockHash', 'eth_getUncleCountByBlockNumber', 'eth_getBlockByHash', 'eth_getBlockByNumber', 'eth_getTransactionByHash', 'eth_getTransactionByBlockHashAndIndex', 'eth_getTransactionByBlockNumberAndIndex', 'eth_getTransactionReceipt', 'eth_getUncleByBlockHashAndIndex', 'eth_getUncleByBlockNumberAndIndex', 'eth_getLogs']; | ||
this.inflight = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -798,2 +815,4 @@ return (request, callback, chainId) => { | ||
super(url, options == null ? void 0 : options.chainId); | ||
this._chainId = void 0; | ||
this._sender = void 0; | ||
this.send = (method, params) => { | ||
@@ -800,0 +819,0 @@ return this._sender.send(method, params); |
@@ -272,2 +272,4 @@ 'use strict'; | ||
constructor(middlewares, sender) { | ||
this.sender = void 0; | ||
this.handler = void 0; | ||
this.sender = sender; | ||
@@ -316,2 +318,5 @@ if (middlewares) { | ||
constructor(provider, defaultChainId) { | ||
this.send = void 0; | ||
this.request = void 0; | ||
this.defaultChainId = void 0; | ||
this.sendAsync = (request, callback, chainId) => { | ||
@@ -362,2 +367,3 @@ this.send(request.method, request.params, chainId || this.defaultChainId).then(r => { | ||
constructor(provider) { | ||
this.provider = provider; | ||
this.sendAsync = (request, callback) => { | ||
@@ -375,3 +381,2 @@ this.provider.send(request.method, request.params).then(r => { | ||
this.send = this.sendAsync; | ||
this.provider = provider; | ||
} | ||
@@ -382,2 +387,4 @@ } | ||
constructor(isAllowedFunc) { | ||
this.sendAsyncMiddleware = void 0; | ||
this.isAllowedFunc = void 0; | ||
if (isAllowedFunc) { | ||
@@ -408,6 +415,2 @@ this.isAllowedFunc = isAllowedFunc; | ||
class CachedProvider { | ||
// onUpdateCallback callback to be notified when cache values are set. | ||
// defaultChainId is used for default chain select with used with multi-chain provider | ||
constructor(options) { | ||
@@ -423,3 +426,11 @@ // cachableJsonRpcMethods which can be permanently cached for lifetime | ||
this.cachableJsonRpcMethodsByBlock = ['eth_call', 'eth_getCode']; | ||
// cache for life-time of provider (unless explicitly cleared) | ||
this.cache = void 0; | ||
// cache by block, simulated by using a 1 second life-time | ||
this.cacheByBlock = void 0; | ||
this.cacheByBlockResetLock = false; | ||
// onUpdateCallback callback to be notified when cache values are set. | ||
this.onUpdateCallback = void 0; | ||
// defaultChainId is used for default chain select with used with multi-chain provider | ||
this.defaultChainId = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -543,4 +554,6 @@ return (request, callback, chainId) => { | ||
// communicating to a specific network provider. | ||
class EagerProvider { | ||
constructor(options) { | ||
this.options = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -669,2 +682,3 @@ return (request, callback, chainId) => { | ||
constructor(provider) { | ||
this.provider = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -689,2 +703,4 @@ return (request, callback, chainId) => { | ||
this.privateJsonRpcMethods = ['net_version', 'eth_chainId', 'eth_accounts', ...SignerJsonRpcMethods]; | ||
this.provider = void 0; | ||
this.rpcUrl = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -732,2 +748,3 @@ return (request, callback) => { | ||
this.singleflightJsonRpcMethods = ['eth_chainId', 'net_version', 'eth_call', 'eth_getCode', 'eth_blockNumber', 'eth_getBalance', 'eth_getStorageAt', 'eth_getTransactionCount', 'eth_getBlockTransactionCountByHash', 'eth_getBlockTransactionCountByNumber', 'eth_getUncleCountByBlockHash', 'eth_getUncleCountByBlockNumber', 'eth_getBlockByHash', 'eth_getBlockByNumber', 'eth_getTransactionByHash', 'eth_getTransactionByBlockHashAndIndex', 'eth_getTransactionByBlockNumberAndIndex', 'eth_getTransactionReceipt', 'eth_getUncleByBlockHashAndIndex', 'eth_getUncleByBlockNumberAndIndex', 'eth_getLogs']; | ||
this.inflight = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -798,2 +815,4 @@ return (request, callback, chainId) => { | ||
super(url, options == null ? void 0 : options.chainId); | ||
this._chainId = void 0; | ||
this._sender = void 0; | ||
this.send = (method, params) => { | ||
@@ -800,0 +819,0 @@ return this._sender.send(method, params); |
@@ -269,2 +269,4 @@ import { networks, ChainId } from '../constants/dist/0xsequence-network-constants.esm.js'; | ||
constructor(middlewares, sender) { | ||
this.sender = void 0; | ||
this.handler = void 0; | ||
this.sender = sender; | ||
@@ -313,2 +315,5 @@ if (middlewares) { | ||
constructor(provider, defaultChainId) { | ||
this.send = void 0; | ||
this.request = void 0; | ||
this.defaultChainId = void 0; | ||
this.sendAsync = (request, callback, chainId) => { | ||
@@ -359,2 +364,3 @@ this.send(request.method, request.params, chainId || this.defaultChainId).then(r => { | ||
constructor(provider) { | ||
this.provider = provider; | ||
this.sendAsync = (request, callback) => { | ||
@@ -372,3 +378,2 @@ this.provider.send(request.method, request.params).then(r => { | ||
this.send = this.sendAsync; | ||
this.provider = provider; | ||
} | ||
@@ -379,2 +384,4 @@ } | ||
constructor(isAllowedFunc) { | ||
this.sendAsyncMiddleware = void 0; | ||
this.isAllowedFunc = void 0; | ||
if (isAllowedFunc) { | ||
@@ -405,6 +412,2 @@ this.isAllowedFunc = isAllowedFunc; | ||
class CachedProvider { | ||
// onUpdateCallback callback to be notified when cache values are set. | ||
// defaultChainId is used for default chain select with used with multi-chain provider | ||
constructor(options) { | ||
@@ -420,3 +423,11 @@ // cachableJsonRpcMethods which can be permanently cached for lifetime | ||
this.cachableJsonRpcMethodsByBlock = ['eth_call', 'eth_getCode']; | ||
// cache for life-time of provider (unless explicitly cleared) | ||
this.cache = void 0; | ||
// cache by block, simulated by using a 1 second life-time | ||
this.cacheByBlock = void 0; | ||
this.cacheByBlockResetLock = false; | ||
// onUpdateCallback callback to be notified when cache values are set. | ||
this.onUpdateCallback = void 0; | ||
// defaultChainId is used for default chain select with used with multi-chain provider | ||
this.defaultChainId = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -540,4 +551,6 @@ return (request, callback, chainId) => { | ||
// communicating to a specific network provider. | ||
class EagerProvider { | ||
constructor(options) { | ||
this.options = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -666,2 +679,3 @@ return (request, callback, chainId) => { | ||
constructor(provider) { | ||
this.provider = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -686,2 +700,4 @@ return (request, callback, chainId) => { | ||
this.privateJsonRpcMethods = ['net_version', 'eth_chainId', 'eth_accounts', ...SignerJsonRpcMethods]; | ||
this.provider = void 0; | ||
this.rpcUrl = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -729,2 +745,3 @@ return (request, callback) => { | ||
this.singleflightJsonRpcMethods = ['eth_chainId', 'net_version', 'eth_call', 'eth_getCode', 'eth_blockNumber', 'eth_getBalance', 'eth_getStorageAt', 'eth_getTransactionCount', 'eth_getBlockTransactionCountByHash', 'eth_getBlockTransactionCountByNumber', 'eth_getUncleCountByBlockHash', 'eth_getUncleCountByBlockNumber', 'eth_getBlockByHash', 'eth_getBlockByNumber', 'eth_getTransactionByHash', 'eth_getTransactionByBlockHashAndIndex', 'eth_getTransactionByBlockNumberAndIndex', 'eth_getTransactionReceipt', 'eth_getUncleByBlockHashAndIndex', 'eth_getUncleByBlockNumberAndIndex', 'eth_getLogs']; | ||
this.inflight = void 0; | ||
this.sendAsyncMiddleware = next => { | ||
@@ -795,2 +812,4 @@ return (request, callback, chainId) => { | ||
super(url, options == null ? void 0 : options.chainId); | ||
this._chainId = void 0; | ||
this._sender = void 0; | ||
this.send = (method, params) => { | ||
@@ -797,0 +816,0 @@ return this._sender.send(method, params); |
export declare enum ChainId { | ||
MAINNET = 1, | ||
ROPSTEN = 3, | ||
RINKEBY = 4, | ||
GOERLI = 5, | ||
KOVAN = 42, | ||
ROPSTEN = 3,// network is deprecated | ||
RINKEBY = 4,// network is deprecated | ||
GOERLI = 5,// network is deprecated | ||
KOVAN = 42,// network is deprecated | ||
SEPOLIA = 11155111, | ||
@@ -14,7 +14,7 @@ POLYGON = 137, | ||
OPTIMISM = 10, | ||
OPTIMISM_KOVAN = 69, | ||
OPTIMISM_GOERLI = 420, | ||
OPTIMISM_KOVAN = 69,// network is deprecated | ||
OPTIMISM_GOERLI = 420,// network is deprecated | ||
OPTIMISM_SEPOLIA = 11155420, | ||
ARBITRUM = 42161, | ||
ARBITRUM_GOERLI = 421613, | ||
ARBITRUM_GOERLI = 421613,// network is deprecated | ||
ARBITRUM_SEPOLIA = 421614, | ||
@@ -26,3 +26,3 @@ ARBITRUM_NOVA = 42170, | ||
BASE = 8453, | ||
BASE_GOERLI = 84531, | ||
BASE_GOERLI = 84531,// network is deprecated | ||
BASE_SEPOLIA = 84532, | ||
@@ -29,0 +29,0 @@ HOMEVERSE_TESTNET = 40875, |
{ | ||
"name": "@0xsequence/network", | ||
"version": "0.0.0-20231205222341", | ||
"version": "0.0.0-20231214172616", | ||
"description": "network sub-package for Sequence", | ||
@@ -12,6 +12,6 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/network", | ||
"dependencies": { | ||
"@0xsequence/core": "0.0.0-20231205222341", | ||
"@0xsequence/indexer": "0.0.0-20231205222341", | ||
"@0xsequence/relayer": "0.0.0-20231205222341", | ||
"@0xsequence/utils": "0.0.0-20231205222341" | ||
"@0xsequence/core": "0.0.0-20231214172616", | ||
"@0xsequence/indexer": "0.0.0-20231214172616", | ||
"@0xsequence/relayer": "0.0.0-20231214172616", | ||
"@0xsequence/utils": "0.0.0-20231214172616" | ||
}, | ||
@@ -18,0 +18,0 @@ "peerDependencies": { |
203291
5435
+ Added@0xsequence/abi@0.0.0-20231214172616(transitive)
+ Added@0xsequence/core@0.0.0-20231214172616(transitive)
+ Added@0xsequence/indexer@0.0.0-20231214172616(transitive)
+ Added@0xsequence/relayer@0.0.0-20231214172616(transitive)
+ Added@0xsequence/utils@0.0.0-20231214172616(transitive)
- Removed@0xsequence/abi@0.0.0-20231205222341(transitive)
- Removed@0xsequence/core@0.0.0-20231205222341(transitive)
- Removed@0xsequence/indexer@0.0.0-20231205222341(transitive)
- Removed@0xsequence/relayer@0.0.0-20231205222341(transitive)
- Removed@0xsequence/utils@0.0.0-20231205222341(transitive)