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

web3-types

Package Overview
Dependencies
Maintainers
5
Versions
352
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-types - npm Package Compare versions

Comparing version 1.2.1-dev.66ddb7e.0 to 1.2.1-dev.80986bb.0

2

lib/commonjs/eth_abi_types.d.ts

@@ -14,3 +14,3 @@ import { Address } from './eth_types.js';

[key: string]: unknown;
name?: string;
name: string;
type: string;

@@ -17,0 +17,0 @@ }

@@ -5,2 +5,3 @@ import { Address, Uint } from './eth_types.js';

import { EthExecutionAPI } from './apis/eth_execution_api.js';
import { AbiFragment, ContractAbi } from './eth_abi_types.js';
export interface ContractInitOptions {

@@ -59,1 +60,76 @@ /**

}
export declare type ContractAbiWithSignature = ReadonlyArray<AbiFragment & {
signature: HexString;
}>;
export interface ContractOptions {
/**
* The maximum gas provided for a transaction (gas limit).
*/
readonly gas?: Uint;
/**
* The gas price in wei to use for transactions.
*/
readonly gasPrice?: Uint;
/**
* The address transactions should be made from.
*/
readonly from?: Address;
/**
* The byte code of the contract. Used when the contract gets {@link Contract.deploy | deployed}
*/
readonly input?: Bytes;
/**
* The byte code of the contract. Used when the contract gets {@link Contract.deploy | deployed}
*/
readonly data?: Bytes;
/**
* The {@doclink glossary/json_interface | json interface} object derived from the [ABI](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) of this contract.
*
* Re-setting this will regenerate the methods and events of the contract instance.
*
* ```ts
* myContract.options.jsonInterface;
* > [{
* "type":"function",
* "name":"foo",
* "inputs": [{"name":"a","type":"uint256"}],
* "outputs": [{"name":"b","type":"address"}],
* "signature": "0x...",
* },{
* "type":"event",
* "name":"Event",
* "inputs": [{"name":"a","type":"uint256","indexed":true},{"name":"b","type":"bytes32","indexed":false}],
* "signature": "0x...",
* }]
*
* // Set a new ABI interface
* // Note: the "signature" of every function and event's ABI is not needed to be provided when assigning.
* // It will be calculated and set automatically inside the setter.
* myContract.options.jsonInterface = [...];
* ```
*/
get jsonInterface(): ContractAbiWithSignature;
set jsonInterface(value: ContractAbi);
/**
* The address used for this contract instance. All transactions generated by web3.js from this contract will contain this address as the `to`.
*
* The address will be stored in lowercase.
*
* ```ts
* myContract.options.address;
* > '0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae'
*
* // set a new address
* myContract.options.address = '0x1234FFDD...';
* ```
*/
address?: Address;
/**
* The max priority fee per gas to use for transactions.
*/
maxPriorityFeePerGas?: Uint;
/**
* The max fee per gas to use for transactions.
*/
maxFeePerGas?: Uint;
}

@@ -259,2 +259,20 @@ import { Bytes, HexString, Numbers } from './primitives_types.js';

}
export interface EventLog {
readonly event: string;
readonly id?: string;
readonly logIndex?: bigint | number | string;
readonly transactionIndex?: bigint | number | string;
readonly transactionHash?: HexString32Bytes;
readonly blockHash?: HexString32Bytes;
readonly blockNumber?: bigint | number | string;
readonly address: string;
readonly topics: HexString[];
readonly data: HexString;
readonly raw?: {
data: string;
topics: unknown[];
};
readonly returnValues: Record<string, unknown>;
readonly signature?: HexString;
}
export interface TransactionReceiptBase<numberType, hashByteType, logsBloomByteType, logsType> {

@@ -276,2 +294,5 @@ readonly transactionHash: hashByteType;

readonly type?: numberType;
events?: {
[key: string]: EventLog;
};
}

@@ -278,0 +299,0 @@ export declare type TransactionReceipt = TransactionReceiptBase<Numbers, Bytes, Bytes, Log>;

@@ -14,3 +14,3 @@ import { Address } from './eth_types.js';

[key: string]: unknown;
name?: string;
name: string;
type: string;

@@ -17,0 +17,0 @@ }

@@ -5,2 +5,3 @@ import { Address, Uint } from './eth_types.js';

import { EthExecutionAPI } from './apis/eth_execution_api.js';
import { AbiFragment, ContractAbi } from './eth_abi_types.js';
export interface ContractInitOptions {

@@ -59,2 +60,77 @@ /**

}
export declare type ContractAbiWithSignature = ReadonlyArray<AbiFragment & {
signature: HexString;
}>;
export interface ContractOptions {
/**
* The maximum gas provided for a transaction (gas limit).
*/
readonly gas?: Uint;
/**
* The gas price in wei to use for transactions.
*/
readonly gasPrice?: Uint;
/**
* The address transactions should be made from.
*/
readonly from?: Address;
/**
* The byte code of the contract. Used when the contract gets {@link Contract.deploy | deployed}
*/
readonly input?: Bytes;
/**
* The byte code of the contract. Used when the contract gets {@link Contract.deploy | deployed}
*/
readonly data?: Bytes;
/**
* The {@doclink glossary/json_interface | json interface} object derived from the [ABI](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) of this contract.
*
* Re-setting this will regenerate the methods and events of the contract instance.
*
* ```ts
* myContract.options.jsonInterface;
* > [{
* "type":"function",
* "name":"foo",
* "inputs": [{"name":"a","type":"uint256"}],
* "outputs": [{"name":"b","type":"address"}],
* "signature": "0x...",
* },{
* "type":"event",
* "name":"Event",
* "inputs": [{"name":"a","type":"uint256","indexed":true},{"name":"b","type":"bytes32","indexed":false}],
* "signature": "0x...",
* }]
*
* // Set a new ABI interface
* // Note: the "signature" of every function and event's ABI is not needed to be provided when assigning.
* // It will be calculated and set automatically inside the setter.
* myContract.options.jsonInterface = [...];
* ```
*/
get jsonInterface(): ContractAbiWithSignature;
set jsonInterface(value: ContractAbi);
/**
* The address used for this contract instance. All transactions generated by web3.js from this contract will contain this address as the `to`.
*
* The address will be stored in lowercase.
*
* ```ts
* myContract.options.address;
* > '0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae'
*
* // set a new address
* myContract.options.address = '0x1234FFDD...';
* ```
*/
address?: Address;
/**
* The max priority fee per gas to use for transactions.
*/
maxPriorityFeePerGas?: Uint;
/**
* The max fee per gas to use for transactions.
*/
maxFeePerGas?: Uint;
}
//# sourceMappingURL=eth_contract_types.d.ts.map

@@ -259,2 +259,20 @@ import { Bytes, HexString, Numbers } from './primitives_types.js';

}
export interface EventLog {
readonly event: string;
readonly id?: string;
readonly logIndex?: bigint | number | string;
readonly transactionIndex?: bigint | number | string;
readonly transactionHash?: HexString32Bytes;
readonly blockHash?: HexString32Bytes;
readonly blockNumber?: bigint | number | string;
readonly address: string;
readonly topics: HexString[];
readonly data: HexString;
readonly raw?: {
data: string;
topics: unknown[];
};
readonly returnValues: Record<string, unknown>;
readonly signature?: HexString;
}
export interface TransactionReceiptBase<numberType, hashByteType, logsBloomByteType, logsType> {

@@ -276,2 +294,5 @@ readonly transactionHash: hashByteType;

readonly type?: numberType;
events?: {
[key: string]: EventLog;
};
}

@@ -278,0 +299,0 @@ export declare type TransactionReceipt = TransactionReceiptBase<Numbers, Bytes, Bytes, Log>;

{
"name": "web3-types",
"version": "1.2.1-dev.66ddb7e.0+66ddb7e",
"version": "1.2.1-dev.80986bb.0+80986bb",
"description": "Provide the common data structures and interfaces for web3 modules.",

@@ -28,3 +28,3 @@ "main": "./lib/commonjs/index.js",

"prebuild": "yarn clean",
"build": "yarn build:cjs & yarn build:esm & yarn build:types",
"build": "concurrently --kill-others-on-fail \"yarn:build:*(!check)\"",
"build:cjs": "tsc --build tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > ./lib/commonjs/package.json",

@@ -60,3 +60,3 @@ "build:esm": "tsc --build tsconfig.esm.json && echo '{\"type\": \"module\"}' > ./lib/esm/package.json",

},
"gitHead": "66ddb7e07a9547bfc6574f0f95dc2572f4b41452"
"gitHead": "80986bb998175ef367b3dc4fd7fd4f6aef8a9d18"
}

@@ -66,3 +66,3 @@ /*

[key: string]: unknown;
name?: string;
name: string;
type: string;

@@ -69,0 +69,0 @@ }

@@ -22,2 +22,3 @@ /*

import { EthExecutionAPI } from './apis/eth_execution_api.js';
import { AbiFragment, ContractAbi } from './eth_abi_types.js';

@@ -84,1 +85,76 @@ export interface ContractInitOptions {

}
export type ContractAbiWithSignature = ReadonlyArray<AbiFragment & { signature: HexString }>;
export interface ContractOptions {
/**
* The maximum gas provided for a transaction (gas limit).
*/
readonly gas?: Uint;
/**
* The gas price in wei to use for transactions.
*/
readonly gasPrice?: Uint;
/**
* The address transactions should be made from.
*/
readonly from?: Address;
/**
* The byte code of the contract. Used when the contract gets {@link Contract.deploy | deployed}
*/
readonly input?: Bytes;
/**
* The byte code of the contract. Used when the contract gets {@link Contract.deploy | deployed}
*/
readonly data?: Bytes;
/**
* The {@doclink glossary/json_interface | json interface} object derived from the [ABI](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) of this contract.
*
* Re-setting this will regenerate the methods and events of the contract instance.
*
* ```ts
* myContract.options.jsonInterface;
* > [{
* "type":"function",
* "name":"foo",
* "inputs": [{"name":"a","type":"uint256"}],
* "outputs": [{"name":"b","type":"address"}],
* "signature": "0x...",
* },{
* "type":"event",
* "name":"Event",
* "inputs": [{"name":"a","type":"uint256","indexed":true},{"name":"b","type":"bytes32","indexed":false}],
* "signature": "0x...",
* }]
*
* // Set a new ABI interface
* // Note: the "signature" of every function and event's ABI is not needed to be provided when assigning.
* // It will be calculated and set automatically inside the setter.
* myContract.options.jsonInterface = [...];
* ```
*/
get jsonInterface(): ContractAbiWithSignature;
set jsonInterface(value: ContractAbi);
/**
* The address used for this contract instance. All transactions generated by web3.js from this contract will contain this address as the `to`.
*
* The address will be stored in lowercase.
*
* ```ts
* myContract.options.address;
* > '0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae'
*
* // set a new address
* myContract.options.address = '0x1234FFDD...';
* ```
*/
address?: Address; // All transactions generated by web3.js from this contract will contain this address as the "to".
/**
* The max priority fee per gas to use for transactions.
*/
maxPriorityFeePerGas?: Uint;
/**
* The max fee per gas to use for transactions.
*/
maxFeePerGas?: Uint;
}

@@ -315,2 +315,19 @@ /*

}
export interface EventLog {
readonly event: string;
readonly id?: string;
readonly logIndex?: bigint | number | string;
readonly transactionIndex?: bigint | number | string;
readonly transactionHash?: HexString32Bytes;
readonly blockHash?: HexString32Bytes;
readonly blockNumber?: bigint | number | string;
readonly address: string;
readonly topics: HexString[];
readonly data: HexString;
readonly raw?: { data: string; topics: unknown[] };
readonly returnValues: Record<string, unknown>;
readonly signature?: HexString;
}
export interface TransactionReceiptBase<numberType, hashByteType, logsBloomByteType, logsType> {

@@ -332,2 +349,3 @@ readonly transactionHash: hashByteType;

readonly type?: numberType;
events?: { [key: string]: EventLog };
}

@@ -334,0 +352,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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