Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

abitype

Package Overview
Dependencies
Maintainers
2
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abitype - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

3

dist/types.d.ts

@@ -5,3 +5,3 @@ /**

* @param T - Type to check
* @returns `true` if `T` is `unknown`, otherwise `false`
* @returns `true` if {@link T} is `unknown`, otherwise `false`
*

@@ -17,2 +17,3 @@ * @example

* @param Object2 - Object to merge and override keys from {@link Object1}
* @returns New object type with keys from {@link Object1} and {@link Object2}. If a key exists in both {@link Object1} and {@link Object2}, the key from {@link Object2} will be used.
*

@@ -19,0 +20,0 @@ * @example

@@ -193,6 +193,6 @@ import { Abi, AbiParameter, AbiStateMutability, AbiType, MBits, SolidityAddress, SolidityArray, SolidityBool, SolidityBytes, SolidityFixedArrayRange, SolidityFixedArraySizeLookup, SolidityFunction, SolidityInt, SolidityString, SolidityTuple, TypedData, TypedDataParameter, TypedDataType } from './abi';

[K in keyof TTypedData]: {
[K2 in TTypedData[K][number] as K2['name']]: K2['type'] extends keyof TTypedData ? TypedDataToPrimitiveTypes<Exclude<TTypedData, K>>[K2['type']] : K2['type'] extends `${infer TType extends keyof TTypedData & string}[${infer Tail}]` ? AbiParameterToPrimitiveType<Merge<K2, {
[K2 in TTypedData[K][number] as K2['name']]: K2['type'] extends K ? `Error: Cannot convert self-referencing struct '${K2['type']}' to primitive type.` : K2['type'] extends keyof TTypedData ? TypedDataToPrimitiveTypes<Exclude<TTypedData, K>>[K2['type']] : K2['type'] extends `${infer TType extends keyof TTypedData & string}[${infer Tail}]` ? AbiParameterToPrimitiveType<Merge<K2, {
type: `tuple[${Tail}]`;
components: _TypedDataParametersToAbiParameters<TTypedData[TType], TTypedData>;
}>> : AbiParameterToPrimitiveType<K2>;
}>> : K2['type'] extends TypedDataType ? AbiParameterToPrimitiveType<K2> : `Error: Cannot convert unknown type '${K2['type']}' to primitive type.`;
};

@@ -205,3 +205,3 @@ };

} ? TTypedDataParameter['type'] extends keyof TTypedData ? Merge<TTypedDataParameter, {
type: `tuple`;
type: 'tuple';
components: _TypedDataParametersToAbiParameters<TTypedData[TTypedDataParameter['type']], TTypedData>;

@@ -208,0 +208,0 @@ }> : TTypedDataParameter['type'] extends `${infer TType extends keyof TTypedData & string}[${infer Tail}]` ? Merge<TTypedDataParameter, {

@@ -5,3 +5,3 @@ {

"license": "WAGMIT",
"version": "0.1.3",
"version": "0.1.4",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -16,3 +16,3 @@ # ABIType

Works great for adding blazing fast [autocomplete](https://twitter.com/awkweb/status/1555678944770367493) and type checking to functions, variables, or your own types ([see examples](/src/examples.ts)). No need to generate types with third-party tools – just use your ABI and let TypeScript do the rest!
Works great for adding blazing fast [autocomplete](https://twitter.com/awkweb/status/1555678944770367493) and type checking to functions, variables, or your own types ([see examples](/src/examples/examples.ts)). No need to generate types with third-party tools – just use your ABI and let TypeScript do the rest!

@@ -19,0 +19,0 @@ ## Installation

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc