diff --git a/examples/with-ethers/src/typechain/WethContractAbi.ts b/examples/with-ethers/src/typechain/WethContractAbi.ts new file mode 100644 index 000000000..2c533bacf --- /dev/null +++ b/examples/with-ethers/src/typechain/WethContractAbi.ts @@ -0,0 +1,369 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface WethContractAbiInterface extends Interface { + getFunction( + nameOrSignature: + | "name" + | "approve" + | "totalSupply" + | "transferFrom" + | "withdraw" + | "decimals" + | "balanceOf" + | "symbol" + | "transfer" + | "deposit" + | "allowance" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: "Approval" | "Transfer" | "Deposit" | "Withdrawal" + ): EventFragment; + + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "approve", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "transfer", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "deposit", values?: undefined): string; + encodeFunctionData( + functionFragment: "allowance", + values: [AddressLike, AddressLike] + ): string; + + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; +} + +export namespace ApprovalEvent { + export type InputTuple = [ + src: AddressLike, + guy: AddressLike, + wad: BigNumberish + ]; + export type OutputTuple = [src: string, guy: string, wad: bigint]; + export interface OutputObject { + src: string; + guy: string; + wad: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransferEvent { + export type InputTuple = [ + src: AddressLike, + dst: AddressLike, + wad: BigNumberish + ]; + export type OutputTuple = [src: string, dst: string, wad: bigint]; + export interface OutputObject { + src: string; + dst: string; + wad: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace DepositEvent { + export type InputTuple = [dst: AddressLike, wad: BigNumberish]; + export type OutputTuple = [dst: string, wad: bigint]; + export interface OutputObject { + dst: string; + wad: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace WithdrawalEvent { + export type InputTuple = [src: AddressLike, wad: BigNumberish]; + export type OutputTuple = [src: string, wad: bigint]; + export interface OutputObject { + src: string; + wad: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface WethContractAbi extends BaseContract { + connect(runner?: ContractRunner | null): WethContractAbi; + waitForDeployment(): Promise; + + interface: WethContractAbiInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + name: TypedContractMethod<[], [string], "view">; + + approve: TypedContractMethod< + [guy: AddressLike, wad: BigNumberish], + [boolean], + "nonpayable" + >; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transferFrom: TypedContractMethod< + [src: AddressLike, dst: AddressLike, wad: BigNumberish], + [boolean], + "nonpayable" + >; + + withdraw: TypedContractMethod<[wad: BigNumberish], [void], "nonpayable">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + balanceOf: TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + transfer: TypedContractMethod< + [dst: AddressLike, wad: BigNumberish], + [boolean], + "nonpayable" + >; + + deposit: TypedContractMethod<[], [void], "payable">; + + allowance: TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [bigint], + "view" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [guy: AddressLike, wad: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [src: AddressLike, dst: AddressLike, wad: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "withdraw" + ): TypedContractMethod<[wad: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [dst: AddressLike, wad: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "deposit" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [arg0: AddressLike, arg1: AddressLike], + [bigint], + "view" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + getEvent( + key: "Deposit" + ): TypedContractEvent< + DepositEvent.InputTuple, + DepositEvent.OutputTuple, + DepositEvent.OutputObject + >; + getEvent( + key: "Withdrawal" + ): TypedContractEvent< + WithdrawalEvent.InputTuple, + WithdrawalEvent.OutputTuple, + WithdrawalEvent.OutputObject + >; + + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + "Deposit(address,uint256)": TypedContractEvent< + DepositEvent.InputTuple, + DepositEvent.OutputTuple, + DepositEvent.OutputObject + >; + Deposit: TypedContractEvent< + DepositEvent.InputTuple, + DepositEvent.OutputTuple, + DepositEvent.OutputObject + >; + + "Withdrawal(address,uint256)": TypedContractEvent< + WithdrawalEvent.InputTuple, + WithdrawalEvent.OutputTuple, + WithdrawalEvent.OutputObject + >; + Withdrawal: TypedContractEvent< + WithdrawalEvent.InputTuple, + WithdrawalEvent.OutputTuple, + WithdrawalEvent.OutputObject + >; + }; +} diff --git a/examples/with-ethers/src/typechain/common.ts b/examples/with-ethers/src/typechain/common.ts new file mode 100644 index 000000000..56b5f21e9 --- /dev/null +++ b/examples/with-ethers/src/typechain/common.ts @@ -0,0 +1,131 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + FunctionFragment, + Typed, + EventFragment, + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventLog, + TransactionRequest, + LogDescription, +} from "ethers"; + +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> + extends DeferredTopicFilter {} + +export interface TypedContractEvent< + InputTuple extends Array = any, + OutputTuple extends Array = any, + OutputObject = any +> { + (...args: Partial): TypedDeferredTopicFilter< + TypedContractEvent + >; + name: string; + fragment: EventFragment; + getFragment(...args: Partial): EventFragment; +} + +type __TypechainAOutputTuple = T extends TypedContractEvent< + infer _U, + infer W +> + ? W + : never; +type __TypechainOutputObject = T extends TypedContractEvent< + infer _U, + infer _W, + infer V +> + ? V + : never; + +export interface TypedEventLog + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export interface TypedLogDescription + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export type TypedListener = ( + ...listenerArg: [ + ...__TypechainAOutputTuple, + TypedEventLog, + ...undefined[] + ] +) => void; + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; + +export type StateMutability = "nonpayable" | "payable" | "view"; + +export type BaseOverrides = Omit; +export type NonPayableOverrides = Omit< + BaseOverrides, + "value" | "blockTag" | "enableCcipRead" +>; +export type PayableOverrides = Omit< + BaseOverrides, + "blockTag" | "enableCcipRead" +>; +export type ViewOverrides = Omit; +export type Overrides = S extends "nonpayable" + ? NonPayableOverrides + : S extends "payable" + ? PayableOverrides + : ViewOverrides; + +export type PostfixOverrides, S extends StateMutability> = + | A + | [...A, Overrides]; +export type ContractMethodArgs< + A extends Array, + S extends StateMutability +> = PostfixOverrides<{ [I in keyof A]-?: A[I] | Typed }, S>; + +export type DefaultReturnType = R extends Array ? R[0] : R; + +// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { +export interface TypedContractMethod< + A extends Array = Array, + R = any, + S extends StateMutability = "payable" +> { + (...args: ContractMethodArgs): S extends "view" + ? Promise> + : Promise; + + name: string; + + fragment: FunctionFragment; + + getFragment(...args: ContractMethodArgs): FunctionFragment; + + populateTransaction( + ...args: ContractMethodArgs + ): Promise; + staticCall( + ...args: ContractMethodArgs + ): Promise>; + send(...args: ContractMethodArgs): Promise; + estimateGas(...args: ContractMethodArgs): Promise; + staticCallResult(...args: ContractMethodArgs): Promise; +} diff --git a/examples/with-ethers/src/typechain/factories/WethContractAbi__factory.ts b/examples/with-ethers/src/typechain/factories/WethContractAbi__factory.ts new file mode 100644 index 000000000..72a572660 --- /dev/null +++ b/examples/with-ethers/src/typechain/factories/WethContractAbi__factory.ts @@ -0,0 +1,302 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + WethContractAbi, + WethContractAbiInterface, +} from "../WethContractAbi"; + +const _abi = [ + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "guy", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "src", + type: "address", + }, + { + name: "dst", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "wad", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "dst", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "deposit", + outputs: [], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "", + type: "address", + }, + { + name: "", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + payable: true, + stateMutability: "payable", + type: "fallback", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "src", + type: "address", + }, + { + indexed: true, + name: "guy", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "src", + type: "address", + }, + { + indexed: true, + name: "dst", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "dst", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Deposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "src", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Withdrawal", + type: "event", + }, +] as const; + +export class WethContractAbi__factory { + static readonly abi = _abi; + static createInterface(): WethContractAbiInterface { + return new Interface(_abi) as WethContractAbiInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): WethContractAbi { + return new Contract(address, _abi, runner) as unknown as WethContractAbi; + } +} diff --git a/examples/with-ethers/src/typechain/factories/index.ts b/examples/with-ethers/src/typechain/factories/index.ts new file mode 100644 index 000000000..492e8f3ec --- /dev/null +++ b/examples/with-ethers/src/typechain/factories/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { WethContractAbi__factory } from "./WethContractAbi__factory"; diff --git a/examples/with-ethers/src/typechain/index.ts b/examples/with-ethers/src/typechain/index.ts new file mode 100644 index 000000000..9dfbb4f6a --- /dev/null +++ b/examples/with-ethers/src/typechain/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { WethContractAbi } from "./WethContractAbi"; +export * as factories from "./factories"; +export { WethContractAbi__factory } from "./factories/WethContractAbi__factory"; diff --git a/examples/with-viem/package.json b/examples/with-viem/package.json index 17e85f322..fd115d9d7 100644 --- a/examples/with-viem/package.json +++ b/examples/with-viem/package.json @@ -12,9 +12,10 @@ "node": ">=18.0.0" }, "dependencies": { - "@turnkey/http": "workspace:*", "@turnkey/api-key-stamper": "workspace:*", + "@turnkey/http": "workspace:*", "@turnkey/viem": "workspace:*", + "abitype": "^0.10.1", "dotenv": "^16.0.3", "fetch": "^1.1.0", "typescript": "5.1", diff --git a/examples/with-viem/src/abi.json b/examples/with-viem/src/abi.json new file mode 100644 index 000000000..42519af3e --- /dev/null +++ b/examples/with-viem/src/abi.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/examples/with-viem/src/abi.ts b/examples/with-viem/src/abi.ts new file mode 100644 index 000000000..33541aa74 --- /dev/null +++ b/examples/with-viem/src/abi.ts @@ -0,0 +1,37 @@ +export const abi = [ + { + name: 'balanceOf', + type: 'function', + stateMutability: 'view', + inputs: [{ name: 'owner', type: 'address' }], + outputs: [{ name: 'balance', type: 'uint256' }], + }, + { + name: 'balanceOf', + type: 'function', + stateMutability: 'view', + inputs: [ + { name: 'owner', type: 'address' }, + { name: 'collectionId', type: 'uint256' }, + ], + outputs: [{ name: 'balance', type: 'uint256' }], + }, + { + name: 'tokenURI', + type: 'function', + stateMutability: 'pure', + inputs: [{ name: 'id', type: 'uint256' }], + outputs: [{ name: 'uri', type: 'string' }], + }, + { + name: 'safeTransferFrom', + type: 'function', + stateMutability: 'nonpayable', + inputs: [ + { name: 'from', type: 'address' }, + { name: 'to', type: 'address' }, + { name: 'tokenId', type: 'uint256' }, + ], + outputs: [], + }, + ] as const \ No newline at end of file diff --git a/examples/with-viem/src/advanced.ts b/examples/with-viem/src/advanced.ts index e4fbe51c7..d836394f0 100644 --- a/examples/with-viem/src/advanced.ts +++ b/examples/with-viem/src/advanced.ts @@ -6,15 +6,20 @@ import { TurnkeyClient } from "@turnkey/http"; import { ApiKeyStamper } from "@turnkey/api-key-stamper"; import { createWalletClient, + createPublicClient, http, recoverMessageAddress, recoverTypedDataAddress, stringToHex, hexToBytes, type Account, + formatEther, } from "viem"; -import { sepolia } from "viem/chains"; +// import { sepolia, goerli } from "viem/chains"; +import { goerli } from "viem/chains"; import { print, assertEqual } from "./util"; +import abi from "./abi.json"; +import wethAbi from "./weth-abi.json"; // Load environment variables from `.env.local` dotenv.config({ path: path.resolve(process.cwd(), ".env.local") }); @@ -38,9 +43,9 @@ async function main() { const client = createWalletClient({ account: turnkeyAccount as Account, - chain: sepolia, + chain: goerli, transport: http( - `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY!}` + `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY!}` ), }); @@ -97,7 +102,7 @@ async function main() { } as const; const typedData = { - account: turnkeyAccount, + account: turnkeyAccount as Account, domain, types, primaryType: "Mail", @@ -122,9 +127,83 @@ async function main() { print("Turnkey-powered signature - typed data (EIP-712):", `${signature}`); assertEqual(address, recoveredAddress); + + const account = client?.account?.address; + // this works (note the omission of the required "account" parameter + // const hash = await client.writeContract({ + // abi: wethAbi, + // address: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6", + // functionName: "deposit", + // chain: goerli, + // // args: ['0x1'], + // value: 1n, + // }); + + const hash = await client.writeContract({ + abi: abi, + address: "0x85111DF47D97Cc1aB3e76889fCF08594d053E85d", + functionName: "mint", + chain: goerli, + }); + + console.log("hash", hash); + + const publicClient = createPublicClient({ + transport: http("https://rpc.ankr.com/eth_goerli"), + chain: goerli, + }); + + // const { request } = await publicClient.simulateContract({ + // abi: wethAbi, + // address: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6", + // functionName: "deposit", + // chain: goerli, + // // args: ['0x1'], + // value: 1n, + // //account + // }); + + const { request } = await publicClient.simulateContract({ + abi: abi, + address: "0x85111DF47D97Cc1aB3e76889fCF08594d053E85d", + functionName: "mint", + chain: goerli, + }); + + const hash2 = await client.writeContract(request); + + console.log('hash again', hash2); } main().catch((error) => { console.error(error); process.exit(1); }); + +// import { +// Abi, +// AbiFunction, +// AbiParametersToPrimitiveTypes, +// ExtractAbiFunction, +// ExtractAbiFunctionNames, +// } from 'abitype' +// import { abi } from './abi' + +// declare function readContract< +// TAbi extends Abi, +// TFunctionName extends ExtractAbiFunctionNames, +// TAbiFunction extends AbiFunction = ExtractAbiFunction< +// TAbi, +// TFunctionName +// >, +// >(config: { +// abi: TAbi +// functionName: TFunctionName | ExtractAbiFunctionNames +// args: AbiParametersToPrimitiveTypes +// }): AbiParametersToPrimitiveTypes + +// const res = readContract({ +// abi, +// functionName: 'balanceOf', +// args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], +// }) diff --git a/examples/with-viem/src/index.ts b/examples/with-viem/src/index.ts index 60f1908d5..a0d051552 100644 --- a/examples/with-viem/src/index.ts +++ b/examples/with-viem/src/index.ts @@ -4,7 +4,7 @@ import * as dotenv from "dotenv"; import { createAccount } from "@turnkey/viem"; import { TurnkeyClient } from "@turnkey/http"; import { ApiKeyStamper } from "@turnkey/api-key-stamper"; -import { createWalletClient, http, recoverMessageAddress } from "viem"; +import { type Account, createWalletClient, http, recoverMessageAddress } from "viem"; import { sepolia } from "viem/chains"; import { print, assertEqual } from "./util"; @@ -29,7 +29,7 @@ async function main() { }); const client = createWalletClient({ - account: turnkeyAccount, + account: turnkeyAccount as Account, chain: sepolia, transport: http( `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY!}` diff --git a/examples/with-viem/src/weth-abi.json b/examples/with-viem/src/weth-abi.json new file mode 100644 index 000000000..66455e0ce --- /dev/null +++ b/examples/with-viem/src/weth-abi.json @@ -0,0 +1,154 @@ +[ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [{ "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "guy", "type": "address" }, + { "name": "wad", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [{ "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "src", "type": "address" }, + { "name": "dst", "type": "address" }, + { "name": "wad", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "name": "wad", "type": "uint256" }], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [{ "name": "", "type": "uint8" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [{ "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "dst", "type": "address" }, + { "name": "wad", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "deposit", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "name": "", "type": "address" }, + { "name": "", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { "payable": true, "stateMutability": "payable", "type": "fallback" }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "src", "type": "address" }, + { "indexed": true, "name": "guy", "type": "address" }, + { "indexed": false, "name": "wad", "type": "uint256" } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "src", "type": "address" }, + { "indexed": true, "name": "dst", "type": "address" }, + { "indexed": false, "name": "wad", "type": "uint256" } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "dst", "type": "address" }, + { "indexed": false, "name": "wad", "type": "uint256" } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "src", "type": "address" }, + { "indexed": false, "name": "wad", "type": "uint256" } + ], + "name": "Withdrawal", + "type": "event" + } + ] + \ No newline at end of file diff --git a/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/access/index.ts b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/access/index.ts new file mode 100644 index 000000000..999bcc77b --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/access/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { Ownable } from "./Ownable"; diff --git a/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/index.ts b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/index.ts new file mode 100644 index 000000000..c8c5c07b9 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/index.ts @@ -0,0 +1,9 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as access from "./access"; +export type { access }; +import type * as token from "./token"; +export type { token }; +import type * as utils from "./utils"; +export type { utils }; diff --git a/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/token/ERC721/extensions/index.ts b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/token/ERC721/extensions/index.ts new file mode 100644 index 000000000..aa8c2ff09 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/token/ERC721/extensions/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IERC721Metadata } from "./IERC721Metadata"; diff --git a/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/token/ERC721/index.ts b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/token/ERC721/index.ts new file mode 100644 index 000000000..e0a47f270 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/token/ERC721/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as extensions from "./extensions"; +export type { extensions }; +export type { ERC721 } from "./ERC721"; +export type { IERC721 } from "./IERC721"; +export type { IERC721Receiver } from "./IERC721Receiver"; diff --git a/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/token/index.ts b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/token/index.ts new file mode 100644 index 000000000..710d7d12f --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/token/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as erc721 from "./ERC721"; +export type { erc721 }; diff --git a/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/utils/index.ts b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/utils/index.ts new file mode 100644 index 000000000..3aa96c1c4 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/utils/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as introspection from "./introspection"; +export type { introspection }; diff --git a/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/utils/introspection/index.ts b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/utils/introspection/index.ts new file mode 100644 index 000000000..d7fccec73 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/@openzeppelin/contracts/utils/introspection/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ERC165 } from "./ERC165"; +export type { IERC165 } from "./IERC165"; diff --git a/packages/ethers/src/__tests__/typechain/@openzeppelin/index.ts b/packages/ethers/src/__tests__/typechain/@openzeppelin/index.ts new file mode 100644 index 000000000..a11e4ca29 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/@openzeppelin/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as contracts from "./contracts"; +export type { contracts }; diff --git a/packages/ethers/src/__tests__/typechain/common.ts b/packages/ethers/src/__tests__/typechain/common.ts new file mode 100644 index 000000000..56b5f21e9 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/common.ts @@ -0,0 +1,131 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + FunctionFragment, + Typed, + EventFragment, + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventLog, + TransactionRequest, + LogDescription, +} from "ethers"; + +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> + extends DeferredTopicFilter {} + +export interface TypedContractEvent< + InputTuple extends Array = any, + OutputTuple extends Array = any, + OutputObject = any +> { + (...args: Partial): TypedDeferredTopicFilter< + TypedContractEvent + >; + name: string; + fragment: EventFragment; + getFragment(...args: Partial): EventFragment; +} + +type __TypechainAOutputTuple = T extends TypedContractEvent< + infer _U, + infer W +> + ? W + : never; +type __TypechainOutputObject = T extends TypedContractEvent< + infer _U, + infer _W, + infer V +> + ? V + : never; + +export interface TypedEventLog + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export interface TypedLogDescription + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export type TypedListener = ( + ...listenerArg: [ + ...__TypechainAOutputTuple, + TypedEventLog, + ...undefined[] + ] +) => void; + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; + +export type StateMutability = "nonpayable" | "payable" | "view"; + +export type BaseOverrides = Omit; +export type NonPayableOverrides = Omit< + BaseOverrides, + "value" | "blockTag" | "enableCcipRead" +>; +export type PayableOverrides = Omit< + BaseOverrides, + "blockTag" | "enableCcipRead" +>; +export type ViewOverrides = Omit; +export type Overrides = S extends "nonpayable" + ? NonPayableOverrides + : S extends "payable" + ? PayableOverrides + : ViewOverrides; + +export type PostfixOverrides, S extends StateMutability> = + | A + | [...A, Overrides]; +export type ContractMethodArgs< + A extends Array, + S extends StateMutability +> = PostfixOverrides<{ [I in keyof A]-?: A[I] | Typed }, S>; + +export type DefaultReturnType = R extends Array ? R[0] : R; + +// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { +export interface TypedContractMethod< + A extends Array = Array, + R = any, + S extends StateMutability = "payable" +> { + (...args: ContractMethodArgs): S extends "view" + ? Promise> + : Promise; + + name: string; + + fragment: FunctionFragment; + + getFragment(...args: ContractMethodArgs): FunctionFragment; + + populateTransaction( + ...args: ContractMethodArgs + ): Promise; + staticCall( + ...args: ContractMethodArgs + ): Promise>; + send(...args: ContractMethodArgs): Promise; + estimateGas(...args: ContractMethodArgs): Promise; + staticCallResult(...args: ContractMethodArgs): Promise; +} diff --git a/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/access/index.ts b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/access/index.ts new file mode 100644 index 000000000..e332ae322 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/access/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { Ownable__factory } from "./Ownable__factory"; diff --git a/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/index.ts b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/index.ts new file mode 100644 index 000000000..ed5ad1bc1 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as access from "./access"; +export * as token from "./token"; +export * as utils from "./utils"; diff --git a/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/token/ERC721/extensions/index.ts b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/token/ERC721/extensions/index.ts new file mode 100644 index 000000000..c5073f8d6 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/token/ERC721/extensions/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IERC721Metadata__factory } from "./IERC721Metadata__factory"; diff --git a/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/token/ERC721/index.ts b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/token/ERC721/index.ts new file mode 100644 index 000000000..b1971ca62 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/token/ERC721/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as extensions from "./extensions"; +export { ERC721__factory } from "./ERC721__factory"; +export { IERC721__factory } from "./IERC721__factory"; +export { IERC721Receiver__factory } from "./IERC721Receiver__factory"; diff --git a/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/token/index.ts b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/token/index.ts new file mode 100644 index 000000000..54f1ca302 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/token/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as erc721 from "./ERC721"; diff --git a/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/utils/index.ts b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/utils/index.ts new file mode 100644 index 000000000..03cab1773 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/utils/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as introspection from "./introspection"; diff --git a/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/utils/introspection/index.ts b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/utils/introspection/index.ts new file mode 100644 index 000000000..8523e0a81 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/contracts/utils/introspection/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ERC165__factory } from "./ERC165__factory"; +export { IERC165__factory } from "./IERC165__factory"; diff --git a/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/index.ts b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/index.ts new file mode 100644 index 000000000..6397da096 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/@openzeppelin/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as contracts from "./contracts"; diff --git a/packages/ethers/src/__tests__/typechain/factories/index.ts b/packages/ethers/src/__tests__/typechain/factories/index.ts new file mode 100644 index 000000000..ae8984f32 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as openzeppelin from "./@openzeppelin"; +export * as src from "./src"; diff --git a/packages/ethers/src/__tests__/typechain/factories/src/__tests__/contracts/index.ts b/packages/ethers/src/__tests__/typechain/factories/src/__tests__/contracts/index.ts new file mode 100644 index 000000000..ec38e91ab --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/src/__tests__/contracts/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as source from "./source"; diff --git a/packages/ethers/src/__tests__/typechain/factories/src/__tests__/contracts/source/index.ts b/packages/ethers/src/__tests__/typechain/factories/src/__tests__/contracts/source/index.ts new file mode 100644 index 000000000..8a7be0cf0 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/src/__tests__/contracts/source/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { Test721__factory } from "./Test721__factory"; diff --git a/packages/ethers/src/__tests__/typechain/factories/src/__tests__/index.ts b/packages/ethers/src/__tests__/typechain/factories/src/__tests__/index.ts new file mode 100644 index 000000000..6397da096 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/src/__tests__/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as contracts from "./contracts"; diff --git a/packages/ethers/src/__tests__/typechain/factories/src/index.ts b/packages/ethers/src/__tests__/typechain/factories/src/index.ts new file mode 100644 index 000000000..76feec884 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/factories/src/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as tests from "./__tests__"; diff --git a/packages/ethers/src/__tests__/typechain/hardhat.d.ts b/packages/ethers/src/__tests__/typechain/hardhat.d.ts new file mode 100644 index 000000000..2a14bd5ef --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/hardhat.d.ts @@ -0,0 +1,189 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { ethers } from "ethers"; +import { + DeployContractOptions, + FactoryOptions, + HardhatEthersHelpers as HardhatEthersHelpersBase, +} from "@nomicfoundation/hardhat-ethers/types"; + +import * as Contracts from "."; + +declare module "hardhat/types/runtime" { + interface HardhatEthersHelpers extends HardhatEthersHelpersBase { + getContractFactory( + name: "Ownable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ERC721", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IERC721Metadata", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IERC721", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IERC721Receiver", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ERC165", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IERC165", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "Test721", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + + getContractAt( + name: "Ownable", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ERC721", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IERC721Metadata", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IERC721", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IERC721Receiver", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ERC165", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IERC165", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "Test721", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + + deployContract( + name: "Ownable", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ERC721", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Metadata", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Receiver", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ERC165", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC165", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Test721", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + + deployContract( + name: "Ownable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ERC721", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Metadata", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC721Receiver", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ERC165", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC165", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Test721", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + + // default types + getContractFactory( + name: string, + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + abi: any[], + bytecode: ethers.BytesLike, + signer?: ethers.Signer + ): Promise; + getContractAt( + nameOrAbi: string | any[], + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + deployContract( + name: string, + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: string, + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + } +} diff --git a/packages/ethers/src/__tests__/typechain/index.ts b/packages/ethers/src/__tests__/typechain/index.ts new file mode 100644 index 000000000..99f040d48 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/index.ts @@ -0,0 +1,24 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as openzeppelin from "./@openzeppelin"; +export type { openzeppelin }; +import type * as src from "./src"; +export type { src }; +export * as factories from "./factories"; +export type { Ownable } from "./@openzeppelin/contracts/access/Ownable"; +export { Ownable__factory } from "./factories/@openzeppelin/contracts/access/Ownable__factory"; +export type { ERC721 } from "./@openzeppelin/contracts/token/ERC721/ERC721"; +export { ERC721__factory } from "./factories/@openzeppelin/contracts/token/ERC721/ERC721__factory"; +export type { IERC721Metadata } from "./@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata"; +export { IERC721Metadata__factory } from "./factories/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata__factory"; +export type { IERC721 } from "./@openzeppelin/contracts/token/ERC721/IERC721"; +export { IERC721__factory } from "./factories/@openzeppelin/contracts/token/ERC721/IERC721__factory"; +export type { IERC721Receiver } from "./@openzeppelin/contracts/token/ERC721/IERC721Receiver"; +export { IERC721Receiver__factory } from "./factories/@openzeppelin/contracts/token/ERC721/IERC721Receiver__factory"; +export type { ERC165 } from "./@openzeppelin/contracts/utils/introspection/ERC165"; +export { ERC165__factory } from "./factories/@openzeppelin/contracts/utils/introspection/ERC165__factory"; +export type { IERC165 } from "./@openzeppelin/contracts/utils/introspection/IERC165"; +export { IERC165__factory } from "./factories/@openzeppelin/contracts/utils/introspection/IERC165__factory"; +export type { Test721 } from "./src/__tests__/contracts/source/Test721"; +export { Test721__factory } from "./factories/src/__tests__/contracts/source/Test721__factory"; diff --git a/packages/ethers/src/__tests__/typechain/src/__tests__/contracts/index.ts b/packages/ethers/src/__tests__/typechain/src/__tests__/contracts/index.ts new file mode 100644 index 000000000..2223d73ac --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/src/__tests__/contracts/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as source from "./source"; +export type { source }; diff --git a/packages/ethers/src/__tests__/typechain/src/__tests__/contracts/source/index.ts b/packages/ethers/src/__tests__/typechain/src/__tests__/contracts/source/index.ts new file mode 100644 index 000000000..41058c662 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/src/__tests__/contracts/source/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { Test721 } from "./Test721"; diff --git a/packages/ethers/src/__tests__/typechain/src/__tests__/index.ts b/packages/ethers/src/__tests__/typechain/src/__tests__/index.ts new file mode 100644 index 000000000..a11e4ca29 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/src/__tests__/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as contracts from "./contracts"; +export type { contracts }; diff --git a/packages/ethers/src/__tests__/typechain/src/index.ts b/packages/ethers/src/__tests__/typechain/src/index.ts new file mode 100644 index 000000000..a81f44150 --- /dev/null +++ b/packages/ethers/src/__tests__/typechain/src/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as tests from "./__tests__"; +export type { tests }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b9a8ab2b6..8c627b399 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -433,6 +433,9 @@ importers: '@turnkey/viem': specifier: workspace:* version: link:../../packages/viem + abitype: + specifier: ^0.10.1 + version: 0.10.1(typescript@5.1.3) dotenv: specifier: ^16.0.3 version: 16.0.3 @@ -617,7 +620,7 @@ importers: version: 29.4.3(@types/node@16.18.12) viem: specifier: ^1.10.0 - version: 1.10.0(typescript@5.1.3) + version: 1.16.5(typescript@5.1.3) packages/webauthn-stamper: dependencies: @@ -634,6 +637,11 @@ packages: /@adraffy/ens-normalize@1.9.0: resolution: {integrity: sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ==} + dev: false + + /@adraffy/ens-normalize@1.9.4: + resolution: {integrity: sha512-UK0bHA7hh9cR39V+4gl2/NnBBjoXIxkuWAPCaY4X7fbH4L/azIi7ilWOCjMUYfpJgraLUAqkRi2BqrjME8Rynw==} + dev: true /@ampproject/remapping@2.2.0: resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} @@ -2297,7 +2305,7 @@ packages: /@confio/ics23@0.6.8: resolution: {integrity: sha512-wB6uo+3A50m0sW/EWcU64xpV/8wShZ6bMTa7pF8eYsTrSkQA7oLUIJcs/wb8g4y2Oyq701BaGiO6n/ak5WXO1w==} dependencies: - '@noble/hashes': 1.3.1 + '@noble/hashes': 1.3.2 protobufjs: 7.2.4 dev: false @@ -3632,21 +3640,35 @@ packages: resolution: {integrity: sha512-2upgEu0iLiDVDZkNLeFV2+ht0BAVgQnEmCk6JsOch9Rp8xfkMCbvbAZlA2pBHQc73dbl+vFOXfqkf4uemdn0bw==} dependencies: '@noble/hashes': 1.3.0 + dev: false /@noble/curves@1.1.0: resolution: {integrity: sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==} dependencies: '@noble/hashes': 1.3.1 + dev: false + + /@noble/curves@1.2.0: + resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} + dependencies: + '@noble/hashes': 1.3.2 + dev: true /@noble/hashes@1.2.0: resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==} /@noble/hashes@1.3.0: resolution: {integrity: sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg==} + dev: false /@noble/hashes@1.3.1: resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==} engines: {node: '>= 16'} + dev: false + + /@noble/hashes@1.3.2: + resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} + engines: {node: '>= 16'} /@noble/secp256k1@1.7.1: resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==} @@ -4294,34 +4316,51 @@ packages: - utf-8-validate dev: false - /@scure/base@1.1.1: - resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==} + /@scure/base@1.1.3: + resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} /@scure/bip32@1.1.5: resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==} dependencies: '@noble/hashes': 1.2.0 '@noble/secp256k1': 1.7.1 - '@scure/base': 1.1.1 + '@scure/base': 1.1.3 /@scure/bip32@1.3.0: resolution: {integrity: sha512-bcKpo1oj54hGholplGLpqPHRbIsnbixFtc06nwuNM5/dwSXOq/AAYoIBRsBmnZJSdfeNW5rnff7NTAz3ZCqR9Q==} dependencies: '@noble/curves': 1.0.0 - '@noble/hashes': 1.3.1 - '@scure/base': 1.1.1 + '@noble/hashes': 1.3.2 + '@scure/base': 1.1.3 + dev: false + + /@scure/bip32@1.3.2: + resolution: {integrity: sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==} + dependencies: + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@scure/base': 1.1.3 + dev: true /@scure/bip39@1.1.1: resolution: {integrity: sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==} dependencies: '@noble/hashes': 1.2.0 - '@scure/base': 1.1.1 + '@scure/base': 1.1.3 /@scure/bip39@1.2.0: resolution: {integrity: sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==} dependencies: - '@noble/hashes': 1.3.1 - '@scure/base': 1.1.1 + '@noble/hashes': 1.3.2 + '@scure/base': 1.1.3 + dev: false + + /@scure/bip39@1.2.1: + resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} + dependencies: + '@noble/hashes': 1.3.2 + '@scure/base': 1.1.3 + dev: true /@sentry/core@5.30.0: resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==} @@ -4621,6 +4660,7 @@ packages: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: '@types/node': 16.18.12 + dev: false /@types/yargs-parser@21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} @@ -4841,6 +4881,20 @@ packages: through: 2.3.8 dev: false + /abitype@0.10.1(typescript@5.1.3): + resolution: {integrity: sha512-nFx5F2RniXGXw2Ci1uu6iDGnP/z3hW+H65G7cxrs5JDF3Ot9GuYkBJCRAB9EZ5QIi3dNByZaCrGFUn8LLkLQbw==} + peerDependencies: + typescript: '>=5.0.4' + zod: ^3 >=3.22.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + dependencies: + typescript: 5.1.3 + dev: false + /abitype@0.9.3(typescript@5.1.3): resolution: {integrity: sha512-dz4qCQLurx97FQhnb/EIYTk/ldQ+oafEDUqC0VVIeQS1Q48/YWt/9YNfMmp9SLFqN41ktxny3c8aYxHjmFIB/w==} peerDependencies: @@ -4853,6 +4907,21 @@ packages: optional: true dependencies: typescript: 5.1.3 + dev: false + + /abitype@0.9.8(typescript@5.1.3): + resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==} + peerDependencies: + typescript: '>=5.0.4' + zod: ^3 >=3.19.1 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + dependencies: + typescript: 5.1.3 + dev: true /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} @@ -5410,7 +5479,6 @@ packages: requiresBuild: true dependencies: node-gyp-build: 4.6.0 - dev: false /bundle-name@3.0.0: resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==} @@ -7547,6 +7615,15 @@ packages: ws: '*' dependencies: ws: 8.12.0 + dev: false + + /isows@1.0.3(ws@8.13.0): + resolution: {integrity: sha512-2cKei4vlmg2cxEjm3wVSqn8pcoRF/LX/wpifuuNquFO4SQmPwarClT+SUCA2lt+l581tTeZIPIZuIDo2jWN1fg==} + peerDependencies: + ws: '*' + dependencies: + ws: 8.13.0(bufferutil@4.0.7)(utf-8-validate@5.0.10) + dev: true /istanbul-lib-coverage@3.2.0: resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} @@ -10015,7 +10092,6 @@ packages: requiresBuild: true dependencies: node-gyp-build: 4.6.0 - dev: false /utf8@3.0.0: resolution: {integrity: sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==} @@ -10076,6 +10152,30 @@ packages: - bufferutil - utf-8-validate - zod + dev: false + + /viem@1.16.5(typescript@5.1.3): + resolution: {integrity: sha512-D8aE6cp/5w6PDtOOkJjkN+FtLyfsNWkfE78N4yTgCt4BG7KsBsePp4O68r1IaTVTVa41anebiZAy9kNEIwAXiw==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@adraffy/ens-normalize': 1.9.4 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@scure/bip32': 1.3.2 + '@scure/bip39': 1.2.1 + abitype: 0.9.8(typescript@5.1.3) + isows: 1.0.3(ws@8.13.0) + typescript: 5.1.3 + ws: 8.13.0(bufferutil@4.0.7)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + dev: true /walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} @@ -10347,6 +10447,7 @@ packages: optional: true utf-8-validate: optional: true + dev: false /ws@8.13.0(bufferutil@4.0.7)(utf-8-validate@5.0.10): resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} @@ -10362,7 +10463,6 @@ packages: dependencies: bufferutil: 4.0.7 utf-8-validate: 5.0.10 - dev: false /xstream@11.14.0: resolution: {integrity: sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw==}