@hybrd/types 0.7.6 → 1.4.0

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/src/xmtp.ts ADDED
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @fileoverview XMTP Types
3
+ *
4
+ * Type definitions for both the XMTP core client and service client library.
5
+ */
6
+
7
+ import { GroupUpdated } from "@xmtp/content-type-group-updated"
8
+ import { Reaction } from "@xmtp/content-type-reaction"
9
+ import { Reply } from "@xmtp/content-type-reply"
10
+ import { TransactionReference } from "@xmtp/content-type-transaction-reference"
11
+ import { WalletSendCallsParams } from "@xmtp/content-type-wallet-send-calls"
12
+ import { Client, Conversation, DecodedMessage } from "@xmtp/node-sdk"
13
+ import type { Resolver } from "./resolver"
14
+
15
+ export type HonoVariables = {
16
+ xmtpClient: XmtpClient
17
+ resolver?: Resolver
18
+ }
19
+
20
+ type Codec =
21
+ | GroupUpdated
22
+ | Reaction
23
+ | Reply
24
+ | TransactionReference
25
+ | WalletSendCallsParams
26
+
27
+ export type XmtpClient = Client<unknown>
28
+ export type XmtpConversation = Conversation<unknown>
29
+ export type XmtpMessage = DecodedMessage<unknown>
30
+ export type XmtpSender = {
31
+ address: string
32
+ inboxId: string
33
+ name: string
34
+ basename?: string
35
+ }
36
+ export type XmtpSubjects = Record<string, `0x${string}`>
package/LICENSE.md DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) [2023] [Hybrid INC]
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/dist/types.cjs DELETED
@@ -1,18 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
-
15
- // src/types.ts
16
- var types_exports = {};
17
- module.exports = __toCommonJS(types_exports);
18
- //# sourceMappingURL=types.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import { Abi } from \"abitype\"\nimport { Address } from \"@wagmi/core\"\nimport { providers } from \"ethers\"\nimport { Chain, Client as WagmiClient } from \"wagmi\"\n\nexport type CompiledContract = {\n abi: Abi\n bytecode: string\n}\n\nexport type DeployedContract = {\n address: `0x${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 SendTransactionResult = {\n hash: `0x${string}`\n wait: providers.TransactionResponse[\"wait\"]\n}\n\nexport type {\n TransactionReceipt as Receipt,\n TransactionResponse as Transaction,\n} from \"@ethersproject/providers\"\n\nexport type ProviderConfig = {\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 hooks: WalletConnectionHooks\n Provider: React.FC<WalletConnectorOpts>\n}\n\nexport type WalletConnectionHooks = {\n useWallet: () => UseWallet\n}\n\nexport type UseWallet = {\n readonly account: Address | undefined\n readonly isLoading: boolean\n readonly isConnected: boolean\n connect: () => void\n disconnect: () => void\n}\n\nexport type WalletConnectorConfig = {\n chains: Chain[]\n providers: providers.BaseProvider[]\n}\n\nexport type WalletConnector = (\n config: WalletConnectorConfig\n) => WalletConnection\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/dist/types.d.ts DELETED
@@ -1,53 +0,0 @@
1
- import { Abi } from 'abitype';
2
- import { Address } from '@wagmi/core';
3
- import { providers } from 'ethers';
4
- import { Client, Chain } from 'wagmi';
5
- export { TransactionReceipt as Receipt, TransactionResponse as Transaction } from '@ethersproject/providers';
6
-
7
- type CompiledContract = {
8
- abi: Abi;
9
- bytecode: string;
10
- };
11
- type DeployedContract = {
12
- address: `0x${string}`;
13
- chainId: number;
14
- } & CompiledContract;
15
- type DeployTarget = "test" | "prod";
16
- type Deployment = {
17
- address: string;
18
- deployer: string;
19
- txHash: string;
20
- blockHash: string;
21
- blockNumber: number;
22
- };
23
- type SendTransactionResult = {
24
- hash: `0x${string}`;
25
- wait: providers.TransactionResponse["wait"];
26
- };
27
-
28
- type ProviderConfig = {
29
- hybridKey?: string;
30
- };
31
- type WalletConnectorOpts = object;
32
- type WalletConnection = {
33
- client: Client;
34
- hooks: WalletConnectionHooks;
35
- Provider: React.FC<WalletConnectorOpts>;
36
- };
37
- type WalletConnectionHooks = {
38
- useWallet: () => UseWallet;
39
- };
40
- type UseWallet = {
41
- readonly account: Address | undefined;
42
- readonly isLoading: boolean;
43
- readonly isConnected: boolean;
44
- connect: () => void;
45
- disconnect: () => void;
46
- };
47
- type WalletConnectorConfig = {
48
- chains: Chain[];
49
- providers: providers.BaseProvider[];
50
- };
51
- type WalletConnector = (config: WalletConnectorConfig) => WalletConnection;
52
-
53
- export { CompiledContract, DeployTarget, DeployedContract, Deployment, ProviderConfig, SendTransactionResult, UseWallet, WalletConnection, WalletConnectionHooks, WalletConnector, WalletConnectorConfig, WalletConnectorOpts };
package/dist/types.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}