@wagmi/core 0.4.0-test.0 → 0.4.0-test.1
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/chains/dist/wagmi-core-chains.cjs.d.ts +1 -11
- package/chains/dist/wagmi-core-chains.cjs.dev.js +23 -0
- package/chains/dist/wagmi-core-chains.cjs.js +6 -15
- package/chains/dist/wagmi-core-chains.cjs.prod.js +23 -0
- package/chains/dist/wagmi-core-chains.esm.js +2 -0
- package/connectors/coinbaseWallet/dist/wagmi-core-connectors-coinbaseWallet.cjs.d.ts +1 -11
- package/connectors/coinbaseWallet/dist/wagmi-core-connectors-coinbaseWallet.cjs.dev.js +263 -0
- package/connectors/coinbaseWallet/dist/wagmi-core-connectors-coinbaseWallet.cjs.js +6 -15
- package/connectors/coinbaseWallet/dist/wagmi-core-connectors-coinbaseWallet.cjs.prod.js +263 -0
- package/connectors/coinbaseWallet/dist/wagmi-core-connectors-coinbaseWallet.esm.js +241 -0
- package/connectors/metaMask/dist/wagmi-core-connectors-metaMask.cjs.d.ts +1 -11
- package/connectors/metaMask/dist/wagmi-core-connectors-metaMask.cjs.dev.js +78 -0
- package/connectors/metaMask/dist/wagmi-core-connectors-metaMask.cjs.js +6 -15
- package/connectors/metaMask/dist/wagmi-core-connectors-metaMask.cjs.prod.js +78 -0
- package/connectors/metaMask/dist/wagmi-core-connectors-metaMask.esm.js +74 -0
- package/connectors/mock/dist/wagmi-core-connectors-mock.cjs.d.ts +1 -11
- package/connectors/mock/dist/wagmi-core-connectors-mock.cjs.dev.js +260 -0
- package/connectors/mock/dist/wagmi-core-connectors-mock.cjs.js +6 -15
- package/connectors/mock/dist/wagmi-core-connectors-mock.cjs.prod.js +260 -0
- package/connectors/mock/dist/wagmi-core-connectors-mock.esm.js +255 -0
- package/connectors/walletConnect/dist/wagmi-core-connectors-walletConnect.cjs.d.ts +1 -11
- package/connectors/walletConnect/dist/wagmi-core-connectors-walletConnect.cjs.dev.js +226 -0
- package/connectors/walletConnect/dist/wagmi-core-connectors-walletConnect.cjs.js +6 -15
- package/connectors/walletConnect/dist/wagmi-core-connectors-walletConnect.cjs.prod.js +226 -0
- package/connectors/walletConnect/dist/wagmi-core-connectors-walletConnect.esm.js +204 -0
- package/dist/base-7f682723.cjs.prod.js +623 -0
- package/dist/base-ae774f26.cjs.dev.js +623 -0
- package/dist/base-c546f171.esm.js +603 -0
- package/dist/chains-7e369752.cjs.dev.js +364 -0
- package/dist/chains-d045862c.cjs.prod.js +364 -0
- package/dist/chains-fa406563.esm.js +343 -0
- package/dist/client-42cf11b7.cjs.dev.js +675 -0
- package/dist/client-60ee0298.esm.js +664 -0
- package/dist/client-ed3aaa6a.cjs.prod.js +675 -0
- package/dist/declarations/src/actions/accounts/connect.d.ts +18 -0
- package/dist/declarations/src/actions/accounts/disconnect.d.ts +1 -0
- package/dist/declarations/src/actions/accounts/fetchBalance.d.ts +20 -0
- package/dist/declarations/src/actions/accounts/fetchSigner.d.ts +3 -0
- package/dist/declarations/src/actions/accounts/getAccount.d.ts +7 -0
- package/dist/declarations/src/actions/accounts/getNetwork.d.ts +9 -0
- package/dist/declarations/src/actions/accounts/index.d.ts +12 -0
- package/dist/declarations/src/actions/accounts/signMessage.d.ts +9 -0
- package/dist/declarations/src/actions/accounts/signTypedData.d.ts +22 -0
- package/dist/declarations/src/actions/accounts/switchNetwork.d.ts +6 -0
- package/dist/declarations/src/actions/accounts/watchAccount.d.ts +4 -0
- package/dist/declarations/src/actions/accounts/watchNetwork.d.ts +3 -0
- package/dist/declarations/src/actions/accounts/watchSigner.d.ts +3 -0
- package/dist/declarations/src/actions/contracts/getContract.d.ts +10 -0
- package/dist/declarations/src/actions/contracts/index.d.ts +5 -0
- package/dist/declarations/src/actions/contracts/readContract.d.ts +14 -0
- package/dist/declarations/src/actions/contracts/watchContractEvent.d.ts +14 -0
- package/dist/declarations/src/actions/contracts/watchReadContract.d.ts +7 -0
- package/dist/declarations/src/actions/contracts/writeContract.d.ts +10 -0
- package/dist/declarations/src/actions/ens/fetchEnsAddress.d.ts +8 -0
- package/dist/declarations/src/actions/ens/fetchEnsAvatar.d.ts +8 -0
- package/dist/declarations/src/actions/ens/fetchEnsName.d.ts +8 -0
- package/dist/declarations/src/actions/ens/fetchEnsResolver.d.ts +9 -0
- package/dist/declarations/src/actions/ens/index.d.ts +4 -0
- package/dist/declarations/src/actions/index.d.ts +7 -0
- package/dist/declarations/src/actions/network-status/fetchBlockNumber.d.ts +5 -0
- package/dist/declarations/src/actions/network-status/fetchFeeData.d.ts +16 -0
- package/dist/declarations/src/actions/network-status/index.d.ts +3 -0
- package/dist/declarations/src/actions/network-status/watchBlockNumber.d.ts +6 -0
- package/dist/declarations/src/actions/providers/getProvider.d.ts +7 -0
- package/dist/declarations/src/actions/providers/getWebSocketProvider.d.ts +7 -0
- package/dist/declarations/src/actions/providers/index.d.ts +4 -0
- package/dist/declarations/src/actions/providers/watchProvider.d.ts +4 -0
- package/dist/declarations/src/actions/providers/watchWebSocketProvider.d.ts +4 -0
- package/dist/declarations/src/actions/tokens/fetchToken.d.ts +20 -0
- package/dist/declarations/src/actions/tokens/index.d.ts +1 -0
- package/dist/declarations/src/actions/transactions/index.d.ts +2 -0
- package/dist/declarations/src/actions/transactions/sendTransaction.d.ts +7 -0
- package/dist/declarations/src/actions/transactions/waitForTransaction.d.ts +17 -0
- package/dist/declarations/src/chains.d.ts +1 -0
- package/dist/declarations/src/client.d.ts +82 -0
- package/dist/declarations/src/connectors/base.d.ts +60 -0
- package/dist/declarations/src/connectors/coinbaseWallet.d.ts +54 -0
- package/dist/declarations/src/connectors/index.d.ts +2 -0
- package/dist/declarations/src/connectors/injected.d.ts +56 -0
- package/dist/declarations/src/connectors/metaMask.d.ts +13 -0
- package/dist/declarations/src/connectors/mock/connector.d.ts +41 -0
- package/dist/declarations/src/connectors/mock/index.d.ts +2 -0
- package/dist/declarations/src/connectors/mock/provider.d.ts +39 -0
- package/dist/declarations/src/connectors/walletConnect.d.ts +38 -0
- package/dist/declarations/src/constants/abis.d.ts +2 -0
- package/dist/declarations/src/constants/blockExplorers.d.ts +9 -0
- package/dist/declarations/src/constants/chains.d.ts +55 -0
- package/dist/declarations/src/constants/index.d.ts +7 -0
- package/dist/declarations/src/constants/rpcs.d.ts +9 -0
- package/dist/declarations/src/constants/units.d.ts +1 -0
- package/dist/declarations/src/errors.d.ts +72 -0
- package/dist/declarations/src/index.d.ts +13 -0
- package/dist/declarations/src/providers/alchemy.d.ts +7 -0
- package/dist/declarations/src/providers/infura.d.ts +7 -0
- package/dist/declarations/src/providers/jsonRpc.d.ts +11 -0
- package/dist/declarations/src/providers/public.d.ts +6 -0
- package/dist/declarations/src/storage.d.ts +12 -0
- package/dist/declarations/src/types/index.d.ts +151 -0
- package/dist/declarations/src/utils/configureChains.d.ts +20 -0
- package/dist/declarations/src/utils/eventemitter.d.ts +135 -0
- package/dist/declarations/src/utils/getInjectedName.d.ts +1 -0
- package/dist/declarations/src/utils/index.d.ts +5 -0
- package/dist/declarations/src/utils/normalizeChainId.d.ts +1 -0
- package/dist/declarations/src/utils/warn.d.ts +1 -0
- package/dist/rpcs-7cfbd91c.esm.js +30 -0
- package/dist/rpcs-9c4eb960.cjs.dev.js +35 -0
- package/dist/rpcs-b3c52116.cjs.prod.js +35 -0
- package/dist/wagmi-core.cjs.d.ts +1 -11
- package/dist/wagmi-core.cjs.dev.js +763 -0
- package/dist/wagmi-core.cjs.js +6 -15
- package/dist/wagmi-core.cjs.prod.js +763 -0
- package/dist/wagmi-core.esm.js +703 -0
- package/package.json +1 -1
- package/providers/alchemy/dist/wagmi-core-providers-alchemy.cjs.d.ts +1 -11
- package/providers/alchemy/dist/wagmi-core-providers-alchemy.cjs.dev.js +38 -0
- package/providers/alchemy/dist/wagmi-core-providers-alchemy.cjs.js +6 -15
- package/providers/alchemy/dist/wagmi-core-providers-alchemy.cjs.prod.js +38 -0
- package/providers/alchemy/dist/wagmi-core-providers-alchemy.esm.js +34 -0
- package/providers/infura/dist/wagmi-core-providers-infura.cjs.d.ts +1 -11
- package/providers/infura/dist/wagmi-core-providers-infura.cjs.dev.js +38 -0
- package/providers/infura/dist/wagmi-core-providers-infura.cjs.js +6 -15
- package/providers/infura/dist/wagmi-core-providers-infura.cjs.prod.js +38 -0
- package/providers/infura/dist/wagmi-core-providers-infura.esm.js +34 -0
- package/providers/jsonRpc/dist/wagmi-core-providers-jsonRpc.cjs.d.ts +1 -11
- package/providers/jsonRpc/dist/wagmi-core-providers-jsonRpc.cjs.dev.js +46 -0
- package/providers/jsonRpc/dist/wagmi-core-providers-jsonRpc.cjs.js +6 -15
- package/providers/jsonRpc/dist/wagmi-core-providers-jsonRpc.cjs.prod.js +46 -0
- package/providers/jsonRpc/dist/wagmi-core-providers-jsonRpc.esm.js +42 -0
- package/providers/public/dist/wagmi-core-providers-public.cjs.d.ts +1 -11
- package/providers/public/dist/wagmi-core-providers-public.cjs.dev.js +34 -0
- package/providers/public/dist/wagmi-core-providers-public.cjs.js +6 -15
- package/providers/public/dist/wagmi-core-providers-public.cjs.prod.js +34 -0
- package/providers/public/dist/wagmi-core-providers-public.esm.js +30 -0
package/package.json
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// you should run `yarn` or `yarn preconstruct dev` if preconstruct dev isn't in your postinstall hook
|
|
3
|
-
|
|
4
|
-
// curious why you need to?
|
|
5
|
-
// this file exists so that you can import from the entrypoint normally
|
|
6
|
-
// except that it points to your source file and you don't need to run build constantly
|
|
7
|
-
// which means we need to re-export all of the modules from your source file
|
|
8
|
-
// and since export * doesn't include default exports, we need to read your source file
|
|
9
|
-
// to check for a default export and re-export it if it exists
|
|
10
|
-
// it's not ideal, but it works pretty well ¯\_(ツ)_/¯
|
|
11
|
-
export * from "../../../src/providers/alchemy";
|
|
1
|
+
export * from "../../../dist/declarations/src/providers/alchemy";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var ethers = require('ethers');
|
|
6
|
+
var rpcs = require('../../../dist/rpcs-9c4eb960.cjs.dev.js');
|
|
7
|
+
|
|
8
|
+
function alchemyProvider() {
|
|
9
|
+
let {
|
|
10
|
+
alchemyId = rpcs.defaultAlchemyId,
|
|
11
|
+
pollingInterval,
|
|
12
|
+
priority,
|
|
13
|
+
stallTimeout,
|
|
14
|
+
weight
|
|
15
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
|
+
return function (chain) {
|
|
17
|
+
if (!chain.rpcUrls.alchemy) return null;
|
|
18
|
+
return {
|
|
19
|
+
chain: { ...chain,
|
|
20
|
+
rpcUrls: { ...chain.rpcUrls,
|
|
21
|
+
default: "".concat(chain.rpcUrls.alchemy, "/").concat(alchemyId)
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
provider: () => {
|
|
25
|
+
const provider = new ethers.providers.AlchemyProvider(chain.id, alchemyId);
|
|
26
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
27
|
+
return Object.assign(provider, {
|
|
28
|
+
priority,
|
|
29
|
+
stallTimeout,
|
|
30
|
+
weight
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
webSocketProvider: () => new ethers.providers.AlchemyWebSocketProvider(chain.id, alchemyId)
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
exports.alchemyProvider = alchemyProvider;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
// this file might look strange and you might be wondering what it's for
|
|
3
|
-
// it's lets you import your source files by importing this entrypoint
|
|
4
|
-
// as you would import it if it was built with preconstruct build
|
|
5
|
-
// this file is slightly different to some others though
|
|
6
|
-
// it has a require hook which compiles your code with Babel
|
|
7
|
-
// this means that you don't have to set up @babel/register or anything like that
|
|
8
|
-
// but you can still require this module and it'll be compiled
|
|
1
|
+
'use strict';
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
unregister();
|
|
3
|
+
if (process.env.NODE_ENV === "production") {
|
|
4
|
+
module.exports = require("./wagmi-core-providers-alchemy.cjs.prod.js");
|
|
5
|
+
} else {
|
|
6
|
+
module.exports = require("./wagmi-core-providers-alchemy.cjs.dev.js");
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var ethers = require('ethers');
|
|
6
|
+
var rpcs = require('../../../dist/rpcs-b3c52116.cjs.prod.js');
|
|
7
|
+
|
|
8
|
+
function alchemyProvider() {
|
|
9
|
+
let {
|
|
10
|
+
alchemyId = rpcs.defaultAlchemyId,
|
|
11
|
+
pollingInterval,
|
|
12
|
+
priority,
|
|
13
|
+
stallTimeout,
|
|
14
|
+
weight
|
|
15
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
|
+
return function (chain) {
|
|
17
|
+
if (!chain.rpcUrls.alchemy) return null;
|
|
18
|
+
return {
|
|
19
|
+
chain: { ...chain,
|
|
20
|
+
rpcUrls: { ...chain.rpcUrls,
|
|
21
|
+
default: "".concat(chain.rpcUrls.alchemy, "/").concat(alchemyId)
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
provider: () => {
|
|
25
|
+
const provider = new ethers.providers.AlchemyProvider(chain.id, alchemyId);
|
|
26
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
27
|
+
return Object.assign(provider, {
|
|
28
|
+
priority,
|
|
29
|
+
stallTimeout,
|
|
30
|
+
weight
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
webSocketProvider: () => new ethers.providers.AlchemyWebSocketProvider(chain.id, alchemyId)
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
exports.alchemyProvider = alchemyProvider;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { providers } from 'ethers';
|
|
2
|
+
import { d as defaultAlchemyId } from '../../../dist/rpcs-7cfbd91c.esm.js';
|
|
3
|
+
|
|
4
|
+
function alchemyProvider() {
|
|
5
|
+
let {
|
|
6
|
+
alchemyId = defaultAlchemyId,
|
|
7
|
+
pollingInterval,
|
|
8
|
+
priority,
|
|
9
|
+
stallTimeout,
|
|
10
|
+
weight
|
|
11
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12
|
+
return function (chain) {
|
|
13
|
+
if (!chain.rpcUrls.alchemy) return null;
|
|
14
|
+
return {
|
|
15
|
+
chain: { ...chain,
|
|
16
|
+
rpcUrls: { ...chain.rpcUrls,
|
|
17
|
+
default: "".concat(chain.rpcUrls.alchemy, "/").concat(alchemyId)
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
provider: () => {
|
|
21
|
+
const provider = new providers.AlchemyProvider(chain.id, alchemyId);
|
|
22
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
23
|
+
return Object.assign(provider, {
|
|
24
|
+
priority,
|
|
25
|
+
stallTimeout,
|
|
26
|
+
weight
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
webSocketProvider: () => new providers.AlchemyWebSocketProvider(chain.id, alchemyId)
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { alchemyProvider };
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// you should run `yarn` or `yarn preconstruct dev` if preconstruct dev isn't in your postinstall hook
|
|
3
|
-
|
|
4
|
-
// curious why you need to?
|
|
5
|
-
// this file exists so that you can import from the entrypoint normally
|
|
6
|
-
// except that it points to your source file and you don't need to run build constantly
|
|
7
|
-
// which means we need to re-export all of the modules from your source file
|
|
8
|
-
// and since export * doesn't include default exports, we need to read your source file
|
|
9
|
-
// to check for a default export and re-export it if it exists
|
|
10
|
-
// it's not ideal, but it works pretty well ¯\_(ツ)_/¯
|
|
11
|
-
export * from "../../../src/providers/infura";
|
|
1
|
+
export * from "../../../dist/declarations/src/providers/infura";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var ethers = require('ethers');
|
|
6
|
+
var rpcs = require('../../../dist/rpcs-9c4eb960.cjs.dev.js');
|
|
7
|
+
|
|
8
|
+
function infuraProvider() {
|
|
9
|
+
let {
|
|
10
|
+
infuraId = rpcs.defaultInfuraId,
|
|
11
|
+
pollingInterval,
|
|
12
|
+
priority,
|
|
13
|
+
stallTimeout,
|
|
14
|
+
weight
|
|
15
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
|
+
return function (chain) {
|
|
17
|
+
if (!chain.rpcUrls.infura) return null;
|
|
18
|
+
return {
|
|
19
|
+
chain: { ...chain,
|
|
20
|
+
rpcUrls: { ...chain.rpcUrls,
|
|
21
|
+
default: "".concat(chain.rpcUrls.infura, "/").concat(infuraId)
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
provider: () => {
|
|
25
|
+
const provider = new ethers.providers.InfuraProvider(chain.id, infuraId);
|
|
26
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
27
|
+
return Object.assign(provider, {
|
|
28
|
+
priority,
|
|
29
|
+
stallTimeout,
|
|
30
|
+
weight
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
webSocketProvider: () => new ethers.providers.InfuraWebSocketProvider(chain.id, infuraId)
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
exports.infuraProvider = infuraProvider;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
// this file might look strange and you might be wondering what it's for
|
|
3
|
-
// it's lets you import your source files by importing this entrypoint
|
|
4
|
-
// as you would import it if it was built with preconstruct build
|
|
5
|
-
// this file is slightly different to some others though
|
|
6
|
-
// it has a require hook which compiles your code with Babel
|
|
7
|
-
// this means that you don't have to set up @babel/register or anything like that
|
|
8
|
-
// but you can still require this module and it'll be compiled
|
|
1
|
+
'use strict';
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
unregister();
|
|
3
|
+
if (process.env.NODE_ENV === "production") {
|
|
4
|
+
module.exports = require("./wagmi-core-providers-infura.cjs.prod.js");
|
|
5
|
+
} else {
|
|
6
|
+
module.exports = require("./wagmi-core-providers-infura.cjs.dev.js");
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var ethers = require('ethers');
|
|
6
|
+
var rpcs = require('../../../dist/rpcs-b3c52116.cjs.prod.js');
|
|
7
|
+
|
|
8
|
+
function infuraProvider() {
|
|
9
|
+
let {
|
|
10
|
+
infuraId = rpcs.defaultInfuraId,
|
|
11
|
+
pollingInterval,
|
|
12
|
+
priority,
|
|
13
|
+
stallTimeout,
|
|
14
|
+
weight
|
|
15
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
|
+
return function (chain) {
|
|
17
|
+
if (!chain.rpcUrls.infura) return null;
|
|
18
|
+
return {
|
|
19
|
+
chain: { ...chain,
|
|
20
|
+
rpcUrls: { ...chain.rpcUrls,
|
|
21
|
+
default: "".concat(chain.rpcUrls.infura, "/").concat(infuraId)
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
provider: () => {
|
|
25
|
+
const provider = new ethers.providers.InfuraProvider(chain.id, infuraId);
|
|
26
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
27
|
+
return Object.assign(provider, {
|
|
28
|
+
priority,
|
|
29
|
+
stallTimeout,
|
|
30
|
+
weight
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
webSocketProvider: () => new ethers.providers.InfuraWebSocketProvider(chain.id, infuraId)
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
exports.infuraProvider = infuraProvider;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { providers } from 'ethers';
|
|
2
|
+
import { b as defaultInfuraId } from '../../../dist/rpcs-7cfbd91c.esm.js';
|
|
3
|
+
|
|
4
|
+
function infuraProvider() {
|
|
5
|
+
let {
|
|
6
|
+
infuraId = defaultInfuraId,
|
|
7
|
+
pollingInterval,
|
|
8
|
+
priority,
|
|
9
|
+
stallTimeout,
|
|
10
|
+
weight
|
|
11
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12
|
+
return function (chain) {
|
|
13
|
+
if (!chain.rpcUrls.infura) return null;
|
|
14
|
+
return {
|
|
15
|
+
chain: { ...chain,
|
|
16
|
+
rpcUrls: { ...chain.rpcUrls,
|
|
17
|
+
default: "".concat(chain.rpcUrls.infura, "/").concat(infuraId)
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
provider: () => {
|
|
21
|
+
const provider = new providers.InfuraProvider(chain.id, infuraId);
|
|
22
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
23
|
+
return Object.assign(provider, {
|
|
24
|
+
priority,
|
|
25
|
+
stallTimeout,
|
|
26
|
+
weight
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
webSocketProvider: () => new providers.InfuraWebSocketProvider(chain.id, infuraId)
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { infuraProvider };
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// you should run `yarn` or `yarn preconstruct dev` if preconstruct dev isn't in your postinstall hook
|
|
3
|
-
|
|
4
|
-
// curious why you need to?
|
|
5
|
-
// this file exists so that you can import from the entrypoint normally
|
|
6
|
-
// except that it points to your source file and you don't need to run build constantly
|
|
7
|
-
// which means we need to re-export all of the modules from your source file
|
|
8
|
-
// and since export * doesn't include default exports, we need to read your source file
|
|
9
|
-
// to check for a default export and re-export it if it exists
|
|
10
|
-
// it's not ideal, but it works pretty well ¯\_(ツ)_/¯
|
|
11
|
-
export * from "../../../src/providers/jsonRpc";
|
|
1
|
+
export * from "../../../dist/declarations/src/providers/jsonRpc";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var ethers = require('ethers');
|
|
6
|
+
|
|
7
|
+
function jsonRpcProvider(_ref) {
|
|
8
|
+
let {
|
|
9
|
+
pollingInterval,
|
|
10
|
+
priority,
|
|
11
|
+
rpc,
|
|
12
|
+
stallTimeout,
|
|
13
|
+
static: static_ = true,
|
|
14
|
+
weight
|
|
15
|
+
} = _ref;
|
|
16
|
+
return function (chain) {
|
|
17
|
+
const rpcConfig = rpc(chain);
|
|
18
|
+
if (!rpcConfig || rpcConfig.http === '') return null;
|
|
19
|
+
return {
|
|
20
|
+
chain: { ...chain,
|
|
21
|
+
rpcUrls: { ...chain.rpcUrls,
|
|
22
|
+
default: rpcConfig.http
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
provider: () => {
|
|
26
|
+
const RpcProvider = static_ ? ethers.providers.StaticJsonRpcProvider : ethers.providers.JsonRpcProvider;
|
|
27
|
+
const provider = new RpcProvider(rpcConfig.http, {
|
|
28
|
+
ensAddress: chain.ensAddress,
|
|
29
|
+
chainId: chain.id,
|
|
30
|
+
name: chain.network
|
|
31
|
+
});
|
|
32
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
33
|
+
return Object.assign(provider, {
|
|
34
|
+
priority,
|
|
35
|
+
stallTimeout,
|
|
36
|
+
weight
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
...(rpcConfig.webSocket && {
|
|
40
|
+
webSocketProvider: () => new ethers.providers.WebSocketProvider(rpcConfig.webSocket, chain.id)
|
|
41
|
+
})
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
exports.jsonRpcProvider = jsonRpcProvider;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
// this file might look strange and you might be wondering what it's for
|
|
3
|
-
// it's lets you import your source files by importing this entrypoint
|
|
4
|
-
// as you would import it if it was built with preconstruct build
|
|
5
|
-
// this file is slightly different to some others though
|
|
6
|
-
// it has a require hook which compiles your code with Babel
|
|
7
|
-
// this means that you don't have to set up @babel/register or anything like that
|
|
8
|
-
// but you can still require this module and it'll be compiled
|
|
1
|
+
'use strict';
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
unregister();
|
|
3
|
+
if (process.env.NODE_ENV === "production") {
|
|
4
|
+
module.exports = require("./wagmi-core-providers-jsonRpc.cjs.prod.js");
|
|
5
|
+
} else {
|
|
6
|
+
module.exports = require("./wagmi-core-providers-jsonRpc.cjs.dev.js");
|
|
7
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var ethers = require('ethers');
|
|
6
|
+
|
|
7
|
+
function jsonRpcProvider(_ref) {
|
|
8
|
+
let {
|
|
9
|
+
pollingInterval,
|
|
10
|
+
priority,
|
|
11
|
+
rpc,
|
|
12
|
+
stallTimeout,
|
|
13
|
+
static: static_ = true,
|
|
14
|
+
weight
|
|
15
|
+
} = _ref;
|
|
16
|
+
return function (chain) {
|
|
17
|
+
const rpcConfig = rpc(chain);
|
|
18
|
+
if (!rpcConfig || rpcConfig.http === '') return null;
|
|
19
|
+
return {
|
|
20
|
+
chain: { ...chain,
|
|
21
|
+
rpcUrls: { ...chain.rpcUrls,
|
|
22
|
+
default: rpcConfig.http
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
provider: () => {
|
|
26
|
+
const RpcProvider = static_ ? ethers.providers.StaticJsonRpcProvider : ethers.providers.JsonRpcProvider;
|
|
27
|
+
const provider = new RpcProvider(rpcConfig.http, {
|
|
28
|
+
ensAddress: chain.ensAddress,
|
|
29
|
+
chainId: chain.id,
|
|
30
|
+
name: chain.network
|
|
31
|
+
});
|
|
32
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
33
|
+
return Object.assign(provider, {
|
|
34
|
+
priority,
|
|
35
|
+
stallTimeout,
|
|
36
|
+
weight
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
...(rpcConfig.webSocket && {
|
|
40
|
+
webSocketProvider: () => new ethers.providers.WebSocketProvider(rpcConfig.webSocket, chain.id)
|
|
41
|
+
})
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
exports.jsonRpcProvider = jsonRpcProvider;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { providers } from 'ethers';
|
|
2
|
+
|
|
3
|
+
function jsonRpcProvider(_ref) {
|
|
4
|
+
let {
|
|
5
|
+
pollingInterval,
|
|
6
|
+
priority,
|
|
7
|
+
rpc,
|
|
8
|
+
stallTimeout,
|
|
9
|
+
static: static_ = true,
|
|
10
|
+
weight
|
|
11
|
+
} = _ref;
|
|
12
|
+
return function (chain) {
|
|
13
|
+
const rpcConfig = rpc(chain);
|
|
14
|
+
if (!rpcConfig || rpcConfig.http === '') return null;
|
|
15
|
+
return {
|
|
16
|
+
chain: { ...chain,
|
|
17
|
+
rpcUrls: { ...chain.rpcUrls,
|
|
18
|
+
default: rpcConfig.http
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
provider: () => {
|
|
22
|
+
const RpcProvider = static_ ? providers.StaticJsonRpcProvider : providers.JsonRpcProvider;
|
|
23
|
+
const provider = new RpcProvider(rpcConfig.http, {
|
|
24
|
+
ensAddress: chain.ensAddress,
|
|
25
|
+
chainId: chain.id,
|
|
26
|
+
name: chain.network
|
|
27
|
+
});
|
|
28
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
29
|
+
return Object.assign(provider, {
|
|
30
|
+
priority,
|
|
31
|
+
stallTimeout,
|
|
32
|
+
weight
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
...(rpcConfig.webSocket && {
|
|
36
|
+
webSocketProvider: () => new providers.WebSocketProvider(rpcConfig.webSocket, chain.id)
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { jsonRpcProvider };
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// you should run `yarn` or `yarn preconstruct dev` if preconstruct dev isn't in your postinstall hook
|
|
3
|
-
|
|
4
|
-
// curious why you need to?
|
|
5
|
-
// this file exists so that you can import from the entrypoint normally
|
|
6
|
-
// except that it points to your source file and you don't need to run build constantly
|
|
7
|
-
// which means we need to re-export all of the modules from your source file
|
|
8
|
-
// and since export * doesn't include default exports, we need to read your source file
|
|
9
|
-
// to check for a default export and re-export it if it exists
|
|
10
|
-
// it's not ideal, but it works pretty well ¯\_(ツ)_/¯
|
|
11
|
-
export * from "../../../src/providers/public";
|
|
1
|
+
export * from "../../../dist/declarations/src/providers/public";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var ethers = require('ethers');
|
|
6
|
+
|
|
7
|
+
function publicProvider() {
|
|
8
|
+
let {
|
|
9
|
+
pollingInterval,
|
|
10
|
+
priority,
|
|
11
|
+
stallTimeout,
|
|
12
|
+
weight
|
|
13
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14
|
+
return function (chain) {
|
|
15
|
+
if (!chain.rpcUrls.default) return null;
|
|
16
|
+
return {
|
|
17
|
+
chain,
|
|
18
|
+
provider: () => {
|
|
19
|
+
const provider = new ethers.providers.StaticJsonRpcProvider(chain.rpcUrls.default, {
|
|
20
|
+
chainId: chain.id,
|
|
21
|
+
name: chain.network
|
|
22
|
+
});
|
|
23
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
24
|
+
return Object.assign(provider, {
|
|
25
|
+
priority,
|
|
26
|
+
stallTimeout,
|
|
27
|
+
weight
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
exports.publicProvider = publicProvider;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
// this file might look strange and you might be wondering what it's for
|
|
3
|
-
// it's lets you import your source files by importing this entrypoint
|
|
4
|
-
// as you would import it if it was built with preconstruct build
|
|
5
|
-
// this file is slightly different to some others though
|
|
6
|
-
// it has a require hook which compiles your code with Babel
|
|
7
|
-
// this means that you don't have to set up @babel/register or anything like that
|
|
8
|
-
// but you can still require this module and it'll be compiled
|
|
1
|
+
'use strict';
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
unregister();
|
|
3
|
+
if (process.env.NODE_ENV === "production") {
|
|
4
|
+
module.exports = require("./wagmi-core-providers-public.cjs.prod.js");
|
|
5
|
+
} else {
|
|
6
|
+
module.exports = require("./wagmi-core-providers-public.cjs.dev.js");
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var ethers = require('ethers');
|
|
6
|
+
|
|
7
|
+
function publicProvider() {
|
|
8
|
+
let {
|
|
9
|
+
pollingInterval,
|
|
10
|
+
priority,
|
|
11
|
+
stallTimeout,
|
|
12
|
+
weight
|
|
13
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14
|
+
return function (chain) {
|
|
15
|
+
if (!chain.rpcUrls.default) return null;
|
|
16
|
+
return {
|
|
17
|
+
chain,
|
|
18
|
+
provider: () => {
|
|
19
|
+
const provider = new ethers.providers.StaticJsonRpcProvider(chain.rpcUrls.default, {
|
|
20
|
+
chainId: chain.id,
|
|
21
|
+
name: chain.network
|
|
22
|
+
});
|
|
23
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
24
|
+
return Object.assign(provider, {
|
|
25
|
+
priority,
|
|
26
|
+
stallTimeout,
|
|
27
|
+
weight
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
exports.publicProvider = publicProvider;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { providers } from 'ethers';
|
|
2
|
+
|
|
3
|
+
function publicProvider() {
|
|
4
|
+
let {
|
|
5
|
+
pollingInterval,
|
|
6
|
+
priority,
|
|
7
|
+
stallTimeout,
|
|
8
|
+
weight
|
|
9
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
10
|
+
return function (chain) {
|
|
11
|
+
if (!chain.rpcUrls.default) return null;
|
|
12
|
+
return {
|
|
13
|
+
chain,
|
|
14
|
+
provider: () => {
|
|
15
|
+
const provider = new providers.StaticJsonRpcProvider(chain.rpcUrls.default, {
|
|
16
|
+
chainId: chain.id,
|
|
17
|
+
name: chain.network
|
|
18
|
+
});
|
|
19
|
+
if (pollingInterval) provider.pollingInterval = pollingInterval;
|
|
20
|
+
return Object.assign(provider, {
|
|
21
|
+
priority,
|
|
22
|
+
stallTimeout,
|
|
23
|
+
weight
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { publicProvider };
|