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

web3-plugin-example

Package Overview
Dependencies
Maintainers
2
Versions
356
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-plugin-example - npm Package Compare versions

Comparing version 0.1.0-alpha.0 to 0.1.0-alpha.1

dist/reexported_web3_context.d.ts

19

dist/contract_method_wrappers.d.ts

@@ -1,2 +0,2 @@

import { Web3Context, Web3PluginBase } from 'web3-core';
import { Web3PluginBase } from 'web3-core';
import { ContractAbi } from 'web3-eth-abi';

@@ -7,2 +7,3 @@ import Contract from 'web3-eth-contract';

import { ERC20TokenAbi } from './ERC20Token';
import { Web3Context } from './reexported_web3_context';
export declare class ContractMethodWrappersPlugin extends Web3PluginBase {

@@ -13,20 +14,26 @@ pluginNamespace: string;

link(parentContext: Web3Context): void;
getFormattedBalance<ReturnFormat extends DataFormat>(address: Address, returnFormat: ReturnFormat): Promise<[import("web3-utils").NumberTypes[ReturnFormat["number"]]]>;
getFormattedBalance<ReturnFormat extends DataFormat>(address: Address, returnFormat: ReturnFormat): Promise<import("web3-utils").NumberTypes[ReturnFormat["number"]]>;
transferAndGetBalances<ReturnFormat extends DataFormat>(sender: Address, recipient: Address, amount: Numbers, returnFormat?: ReturnFormat): Promise<{
sender: {
address: string;
balance: [import("web3-utils").NumberTypes[({
balance: import("web3-utils").NumberTypes[({
readonly number: import("web3-utils").FMT_NUMBER.BIGINT;
readonly bytes: import("web3-utils").FMT_BYTES.HEX;
} | NonNullable<ReturnFormat>)["number"]]];
} | NonNullable<ReturnFormat>)["number"]];
};
recipient: {
address: string;
balance: [import("web3-utils").NumberTypes[({
balance: import("web3-utils").NumberTypes[({
readonly number: import("web3-utils").FMT_NUMBER.BIGINT;
readonly bytes: import("web3-utils").FMT_BYTES.HEX;
} | NonNullable<ReturnFormat>)["number"]]];
} | NonNullable<ReturnFormat>)["number"]];
};
}>;
}
declare module './reexported_web3_context' {
interface Web3Context {
contractMethodWrappersPlugin: ContractMethodWrappersPlugin;
}
}
export { Web3Context };
//# sourceMappingURL=contract_method_wrappers.d.ts.map

@@ -15,6 +15,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ContractMethodWrappersPlugin = void 0;
exports.Web3Context = exports.ContractMethodWrappersPlugin = void 0;
const web3_core_1 = require("web3-core");
const web3_eth_contract_1 = __importDefault(require("web3-eth-contract"));
const web3_utils_1 = require("web3-utils");
const reexported_web3_context_1 = require("./reexported_web3_context");
Object.defineProperty(exports, "Web3Context", { enumerable: true, get: function () { return reexported_web3_context_1.Web3Context; } });
class ContractMethodWrappersPlugin extends web3_core_1.Web3PluginBase {

@@ -21,0 +23,0 @@ constructor(abi, address) {

import { Web3PluginBase } from 'web3-core';
import { Web3Context } from './reexported_web3_context';
declare type CustomRpcApi = {

@@ -11,3 +12,8 @@ custom_rpc_method: () => string;

}
export {};
declare module './reexported_web3_context' {
interface Web3Context {
customRpcMethods: CustomRpcMethodsPlugin;
}
}
export { Web3Context };
//# sourceMappingURL=custom_rpc_methods.d.ts.map

@@ -12,4 +12,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomRpcMethodsPlugin = void 0;
exports.Web3Context = exports.CustomRpcMethodsPlugin = void 0;
const web3_core_1 = require("web3-core");
const reexported_web3_context_1 = require("./reexported_web3_context");
Object.defineProperty(exports, "Web3Context", { enumerable: true, get: function () { return reexported_web3_context_1.Web3Context; } });
class CustomRpcMethodsPlugin extends web3_core_1.Web3PluginBase {

@@ -16,0 +18,0 @@ constructor() {

{
"name": "web3-plugin-example",
"version": "0.1.0-alpha.0",
"version": "0.1.0-alpha.1",
"description": "Example implementations of Web3.js' 4.x plugin system",

@@ -46,8 +46,8 @@ "repository": "https://github.com/ChainSafe/web3.js",

"typescript": "^4.7.4",
"web3": "^4.0.1-alpha.1",
"web3-core": "^4.0.1-alpha.1",
"web3-eth-abi": "^4.0.1-alpha.1",
"web3-eth-contract": "^4.0.1-alpha.1",
"web3-types": "^0.1.1-alpha.1",
"web3-utils": "^4.0.1-alpha.1"
"web3": "^4.0.1-alpha.2",
"web3-core": "^4.0.1-alpha.2",
"web3-eth-abi": "^4.0.1-alpha.2",
"web3-eth-contract": "^4.0.1-alpha.2",
"web3-types": "^0.1.1-alpha.2",
"web3-utils": "^4.0.1-alpha.2"
},

@@ -61,3 +61,3 @@ "peerDependencies": {

},
"gitHead": "a754e3a965c30f42a6e639df27462650062833ee"
"gitHead": "7d5de3b049bf7929669c89e474387b16bd27c612"
}

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

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