web3-types
Advanced tools
Comparing version 1.0.1-dev.6192d6f.0 to 1.0.1-dev.a2a232f.0
@@ -31,3 +31,3 @@ import { Address } from './eth_types.js'; | ||
}; | ||
declare type FragmentTypes = 'constructor' | 'event' | 'function' | 'fallback'; | ||
declare type FragmentTypes = 'constructor' | 'event' | 'function' | 'fallback' | 'receive'; | ||
export declare type AbiBaseFragment = { | ||
@@ -102,3 +102,3 @@ readonly type: string | FragmentTypes; | ||
export declare type PrimitiveBytesType<Type extends string> = Type extends `bytes${string}[${infer Size}]` ? _TypedArray<Bytes, Size> : Type extends 'bytes' | `bytes${string}` ? Bytes : never; | ||
export declare type PrimitiveTupleType<Type extends string, TypeComponents extends ReadonlyArray<AbiParameter> | undefined = []> = TypeComponents extends ReadonlyArray<AbiParameter> ? Type extends 'tuple' ? { | ||
export declare type PrimitiveTupleType<Type extends string, TypeComponents extends ReadonlyArray<AbiParameter> | undefined | unknown = []> = TypeComponents extends ReadonlyArray<AbiParameter> ? Type extends 'tuple' ? { | ||
[Param in TypeComponents[number] as Param['name']]: MatchPrimitiveType<Param['type'], Param['components']>; | ||
@@ -110,3 +110,3 @@ } : Type extends `tuple[${infer Size}]` ? _TypedArray<{ | ||
declare type ArrToObjectWithFunctions<T extends unknown[]> = Array<unknown> & ObjectToArray<T>; | ||
export declare type MatchPrimitiveType<Type extends string, TypeComponents extends ReadonlyArray<AbiParameter> | undefined> = PrimitiveAddressType<Type> | PrimitiveStringType<Type> | PrimitiveBooleanType<Type> | PrimitiveIntegerType<Type> | PrimitiveBytesType<Type> | PrimitiveTupleType<Type, TypeComponents> | never; | ||
export declare type MatchPrimitiveType<Type extends string, TypeComponents extends ReadonlyArray<AbiParameter> | undefined | unknown> = PrimitiveAddressType<Type> | PrimitiveStringType<Type> | PrimitiveBooleanType<Type> | PrimitiveIntegerType<Type> | PrimitiveBytesType<Type> | PrimitiveTupleType<Type, TypeComponents> | never; | ||
declare type ContractMethodOutputParametersRecursiveArray<Params extends ReadonlyArray<unknown> | undefined> = Params extends readonly [] ? [] : Params extends readonly [infer H, ...infer R] ? H extends AbiParameter ? [ | ||
@@ -113,0 +113,0 @@ MatchPrimitiveType<H['type'], H['components']>, |
@@ -31,3 +31,3 @@ import { Address } from './eth_types.js'; | ||
}; | ||
declare type FragmentTypes = 'constructor' | 'event' | 'function' | 'fallback'; | ||
declare type FragmentTypes = 'constructor' | 'event' | 'function' | 'fallback' | 'receive'; | ||
export declare type AbiBaseFragment = { | ||
@@ -102,3 +102,3 @@ readonly type: string | FragmentTypes; | ||
export declare type PrimitiveBytesType<Type extends string> = Type extends `bytes${string}[${infer Size}]` ? _TypedArray<Bytes, Size> : Type extends 'bytes' | `bytes${string}` ? Bytes : never; | ||
export declare type PrimitiveTupleType<Type extends string, TypeComponents extends ReadonlyArray<AbiParameter> | undefined = []> = TypeComponents extends ReadonlyArray<AbiParameter> ? Type extends 'tuple' ? { | ||
export declare type PrimitiveTupleType<Type extends string, TypeComponents extends ReadonlyArray<AbiParameter> | undefined | unknown = []> = TypeComponents extends ReadonlyArray<AbiParameter> ? Type extends 'tuple' ? { | ||
[Param in TypeComponents[number] as Param['name']]: MatchPrimitiveType<Param['type'], Param['components']>; | ||
@@ -110,3 +110,3 @@ } : Type extends `tuple[${infer Size}]` ? _TypedArray<{ | ||
declare type ArrToObjectWithFunctions<T extends unknown[]> = Array<unknown> & ObjectToArray<T>; | ||
export declare type MatchPrimitiveType<Type extends string, TypeComponents extends ReadonlyArray<AbiParameter> | undefined> = PrimitiveAddressType<Type> | PrimitiveStringType<Type> | PrimitiveBooleanType<Type> | PrimitiveIntegerType<Type> | PrimitiveBytesType<Type> | PrimitiveTupleType<Type, TypeComponents> | never; | ||
export declare type MatchPrimitiveType<Type extends string, TypeComponents extends ReadonlyArray<AbiParameter> | undefined | unknown> = PrimitiveAddressType<Type> | PrimitiveStringType<Type> | PrimitiveBooleanType<Type> | PrimitiveIntegerType<Type> | PrimitiveBytesType<Type> | PrimitiveTupleType<Type, TypeComponents> | never; | ||
declare type ContractMethodOutputParametersRecursiveArray<Params extends ReadonlyArray<unknown> | undefined> = Params extends readonly [] ? [] : Params extends readonly [infer H, ...infer R] ? H extends AbiParameter ? [ | ||
@@ -113,0 +113,0 @@ MatchPrimitiveType<H['type'], H['components']>, |
{ | ||
"name": "web3-types", | ||
"version": "1.0.1-dev.6192d6f.0+6192d6f", | ||
"version": "1.0.1-dev.a2a232f.0+a2a232f", | ||
"description": "Provide the common data structures and interfaces for web3 modules.", | ||
@@ -59,3 +59,3 @@ "main": "./lib/commonjs/index.js", | ||
}, | ||
"gitHead": "6192d6f19ade5b1a0183aa1d01fc07135108202c" | ||
"gitHead": "a2a232fe306636da05868039a934ee491e957d8a" | ||
} |
@@ -87,3 +87,3 @@ /* | ||
type FragmentTypes = 'constructor' | 'event' | 'function' | 'fallback'; | ||
type FragmentTypes = 'constructor' | 'event' | 'function' | 'fallback' | 'receive'; | ||
@@ -224,3 +224,3 @@ export type AbiBaseFragment = { | ||
Type extends string, | ||
TypeComponents extends ReadonlyArray<AbiParameter> | undefined = [], | ||
TypeComponents extends ReadonlyArray<AbiParameter> | undefined | unknown = [], | ||
> = TypeComponents extends ReadonlyArray<AbiParameter> | ||
@@ -256,3 +256,3 @@ ? Type extends 'tuple' | ||
Type extends string, | ||
TypeComponents extends ReadonlyArray<AbiParameter> | undefined, | ||
TypeComponents extends ReadonlyArray<AbiParameter> | undefined | unknown, | ||
> = | ||
@@ -259,0 +259,0 @@ | PrimitiveAddressType<Type> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
253121