@hybrd/types 0.3.11 → 0.4.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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import { Abi } from \"abitype\"\n\nexport type CompiledContract = {\n abi: Abi\n bytecode: string\n}\n\nexport type DeployedContract = {\n address: string\n chainId: number\n} & CompiledContract\n\nexport type DeployTarget = \"test\" | \"prod\"\n\nexport type Deployment = {\n address: string\n deployer: string\n txHash: string\n blockHash: string\n blockNumber: number\n}\n\nexport type {\n TransactionReceipt as Receipt,\n TransactionResponse as Transaction\n} from \"@ethersproject/providers\"\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import { Abi } from \"abitype\"\nimport { Chain, Client as WagmiClient } from \"wagmi\"\n\nexport type CompiledContract = {\n abi: Abi\n bytecode: string\n}\n\nexport type DeployedContract = {\n address: string\n chainId: number\n} & CompiledContract\n\nexport type DeployTarget = \"test\" | \"prod\"\n\nexport type Deployment = {\n address: string\n deployer: string\n txHash: string\n blockHash: string\n blockNumber: number\n}\n\nexport type {\n TransactionReceipt as Receipt,\n TransactionResponse as Transaction\n} from \"@ethersproject/providers\"\n\nexport type ProviderKeys = {\n alchemyKey?: string\n infuraKey?: string\n // hybridKey?: string\n}\n\nexport type WalletConnectorOpts = object // todo - what config is common to all wallet plugins?\nexport type WalletConnection = {\n client: WagmiClient\n Provider: React.FC<WalletConnectorOpts>\n}\nexport type WalletConnectorConfig = {\n chains: Chain[]\n} & ProviderKeys\n\nexport type WalletConnector = (\n config: WalletConnectorConfig\n) => WalletConnection\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Abi } from 'abitype';
2
+ import { Client, Chain } from 'wagmi';
2
3
  export { TransactionReceipt as Receipt, TransactionResponse as Transaction } from '@ethersproject/providers';
3
4
 
4
5
  type CompiledContract = {
@@ -18,4 +19,18 @@ type Deployment = {
18
19
  blockNumber: number;
19
20
  };
20
21
 
21
- export { CompiledContract, DeployTarget, DeployedContract, Deployment };
22
+ type ProviderKeys = {
23
+ alchemyKey?: string;
24
+ infuraKey?: string;
25
+ };
26
+ type WalletConnectorOpts = object;
27
+ type WalletConnection = {
28
+ client: Client;
29
+ Provider: React.FC<WalletConnectorOpts>;
30
+ };
31
+ type WalletConnectorConfig = {
32
+ chains: Chain[];
33
+ } & ProviderKeys;
34
+ type WalletConnector = (config: WalletConnectorConfig) => WalletConnection;
35
+
36
+ export { CompiledContract, DeployTarget, DeployedContract, Deployment, ProviderKeys, WalletConnection, WalletConnector, WalletConnectorConfig, WalletConnectorOpts };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybrd/types",
3
- "version": "0.3.11",
3
+ "version": "0.4.1",
4
4
  "description": "Solidity + TypeScript Framework for Web3 Development",
5
5
  "author": "Ian Hunter <ian@ianh.xyz>",
6
6
  "homepage": "https://github.com/ian/hybrid#readme",
@@ -32,11 +32,14 @@
32
32
  "dependencies": {
33
33
  "abitype": "^0.7.1"
34
34
  },
35
+ "peerDependencies": {
36
+ "wagmi": "^0.12.1"
37
+ },
35
38
  "devDependencies": {
36
39
  "@types/node": "^18.14.6",
37
40
  "nodemon": "^2.0.21",
38
41
  "tsup": "^6.6.3",
39
42
  "typescript": "^4.9.5"
40
43
  },
41
- "gitHead": "abe0a17c24b509a64c49cfdb18256a6b02a8ce5e"
44
+ "gitHead": "bb8b851a3a972e0614d03cd998b27c5a89e9e27d"
42
45
  }