diff --git a/.changeset/fix-ledger-console-noise.md b/.changeset/fix-ledger-console-noise.md new file mode 100644 index 0000000000..28e1d01ce7 --- /dev/null +++ b/.changeset/fix-ledger-console-noise.md @@ -0,0 +1,5 @@ +--- +'@celo/wallet-ledger': patch +--- + +Replace `console.info` with `debug` for derivation path logging to avoid noisy test output diff --git a/.changeset/remove-delegate-debug-logs.md b/.changeset/remove-delegate-debug-logs.md new file mode 100644 index 0000000000..596777d15d --- /dev/null +++ b/.changeset/remove-delegate-debug-logs.md @@ -0,0 +1,5 @@ +--- +'@celo/celocli': patch +--- + +Remove debug console.log statements from lockedcelo:delegate command that were leaking internal values to stdout diff --git a/.changeset/remove-rpc-contract-promievent.md b/.changeset/remove-rpc-contract-promievent.md new file mode 100644 index 0000000000..0a53d9ca01 --- /dev/null +++ b/.changeset/remove-rpc-contract-promievent.md @@ -0,0 +1,17 @@ +--- +'@celo/connect': major +'@celo/contractkit': minor +'@celo/celocli': minor +'@celo/dev-utils': minor +--- + +**Remove rpc-contract.ts, PromiEvent, and legacy Contract interface from @celo/connect** + +- Deleted `rpc-contract.ts`, `promi-event.ts`, and `viem-contract.ts` — replaced with native viem `getContract()` / `GetContractReturnType` +- `CeloTxObject.send()` now returns `Promise` (tx hash) instead of `PromiEvent` +- Removed `Connection.createContract()` — use `Connection.getCeloContract()` instead +- Removed `PromiEvent` and `Contract` interfaces from types +- `Connection.getViemContract()` deprecated — delegates to `getCeloContract()` +- `ViemContract` deprecated — use `CeloContract` (viem's `GetContractReturnType`) +- Contract deployment rewritten to use viem's `encodeDeployData` + `connection.sendTransaction()` +- All contractkit wrappers, CLI commands, and test files updated diff --git a/.changeset/remove-web3-shim.md b/.changeset/remove-web3-shim.md new file mode 100644 index 0000000000..3ea2c5be39 --- /dev/null +++ b/.changeset/remove-web3-shim.md @@ -0,0 +1,10 @@ +--- +'@celo/connect': major +'@celo/contractkit': major +'@celo/celocli': major +'@celo/explorer': patch +'@celo/governance': patch +'@celo/dev-utils': patch +--- + +Remove Web3 shim from Connection and migrate contractkit to use viem ABIs with Connection.createContract(). Add backward-compatible kit.web3 shim (deprecated). Add newKitFromProvider() factory function. diff --git a/.changeset/strong-typing-contractkit.md b/.changeset/strong-typing-contractkit.md new file mode 100644 index 0000000000..70ad3f8601 --- /dev/null +++ b/.changeset/strong-typing-contractkit.md @@ -0,0 +1,5 @@ +--- +'@celo/contractkit': minor +--- + +**Improved type safety**: Added explicit type annotations to all wrapper methods that previously emitted `CeloTransactionObject` or `Promise` in their declaration files. All `proxySend` and `proxyCall` usages now have explicit return types, eliminating approximately 110 instances of `any` in the public API surface. This provides better IDE autocompletion and compile-time type checking for consumers of `@celo/contractkit`. diff --git a/.changeset/viem-native-migration.md b/.changeset/viem-native-migration.md new file mode 100644 index 0000000000..e6d69ad98a --- /dev/null +++ b/.changeset/viem-native-migration.md @@ -0,0 +1,15 @@ +--- +'@celo/connect': minor +'@celo/contractkit': minor +'@celo/explorer': patch +--- + +**Migrate internal contract interaction from web3-style RPC Contract to viem-native ViemContract** + +- Added `ViemContract` type and `createViemTxObject()` function in `@celo/connect` +- Added `Connection.getViemContract()` factory method +- Updated all 36 ContractKit wrappers to use viem-native contract interaction +- Updated `proxyCall`/`proxySend` to accept `ViemContract` + function name strings +- Migrated CLI commands, dev-utils, and explorer to use new API +- Deprecated `Connection.createContract()` (kept for backward compatibility with `.deploy()`) +- Public API unchanged: `CeloTransactionObject`, wrapper method signatures remain the same diff --git a/.yarn/patches/buffer-equal-constant-time-npm-1.0.1-41826f3419.patch b/.yarn/patches/buffer-equal-constant-time-npm-1.0.1-41826f3419.patch new file mode 100644 index 0000000000..5cef971d8b --- /dev/null +++ b/.yarn/patches/buffer-equal-constant-time-npm-1.0.1-41826f3419.patch @@ -0,0 +1,27 @@ +diff --git a/index.js b/index.js +index 5462c1f830bdbe79bf2b1fcfd811cd9799b4dd11..e8fe7e61083d95714bba6f2d4544d0426749a64f 100644 +--- a/index.js ++++ b/index.js +@@ -28,14 +28,19 @@ function bufferEq(a, b) { + } + + bufferEq.install = function() { +- Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { ++ Buffer.prototype.equal = function equal(that) { + return bufferEq(this, that); + }; ++ if (SlowBuffer) { ++ SlowBuffer.prototype.equal = Buffer.prototype.equal; ++ } + }; + + var origBufEqual = Buffer.prototype.equal; +-var origSlowBufEqual = SlowBuffer.prototype.equal; ++var origSlowBufEqual = SlowBuffer ? SlowBuffer.prototype.equal : undefined; + bufferEq.restore = function() { + Buffer.prototype.equal = origBufEqual; +- SlowBuffer.prototype.equal = origSlowBufEqual; ++ if (SlowBuffer && origSlowBufEqual) { ++ SlowBuffer.prototype.equal = origSlowBufEqual; ++ } + }; diff --git a/package.json b/package.json index 4981290282..7a8528cd14 100644 --- a/package.json +++ b/package.json @@ -54,11 +54,10 @@ "typescript": "5.3.3" }, "resolutions": { - "web3": "1.10.4", - "web3-utils": "1.10.4", "blind-threshold-bls": "npm:@celo/blind-threshold-bls@1.0.0-beta", "@types/bn.js": "4.11.6", - "bignumber.js": "9.0.0" + "bignumber.js": "9.0.0", + "buffer-equal-constant-time@npm:1.0.1": "patch:buffer-equal-constant-time@npm%3A1.0.1#~/.yarn/patches/buffer-equal-constant-time-npm-1.0.1-41826f3419.patch" }, "dependencies": { "@changesets/cli": "^2.29.5" diff --git a/packages/actions/tsconfig-base.json b/packages/actions/tsconfig-base.json index 16da1d902d..284c4e68b0 100644 --- a/packages/actions/tsconfig-base.json +++ b/packages/actions/tsconfig-base.json @@ -2,6 +2,7 @@ "compilerOptions": { "rootDir": "src", "declaration": true, + "declarationMap": true, "esModuleInterop": true, "types": ["node"], "lib": ["esnext"], diff --git a/packages/cli/src/commands/governance/executehotfix-l2-transactions.json b/packages/cli/src/commands/governance/executehotfix-l2-transactions.json new file mode 100644 index 0000000000..2c7a54e866 --- /dev/null +++ b/packages/cli/src/commands/governance/executehotfix-l2-transactions.json @@ -0,0 +1,8 @@ +[ + { + "address": "0x4200000000000000000000000000000000000018", + "function": "setValue(uint256,uint256,bool)", + "args": ["3", "4", true], + "value": 0 + } +] diff --git a/packages/cli/src/commands/governance/hashhotfix-l2-transactions.json b/packages/cli/src/commands/governance/hashhotfix-l2-transactions.json new file mode 100644 index 0000000000..2c7a54e866 --- /dev/null +++ b/packages/cli/src/commands/governance/hashhotfix-l2-transactions.json @@ -0,0 +1,8 @@ +[ + { + "address": "0x4200000000000000000000000000000000000018", + "function": "setValue(uint256,uint256,bool)", + "args": ["3", "4", true], + "value": 0 + } +] diff --git a/packages/sdk/connect/README.md b/packages/sdk/connect/README.md index 7b9ed70710..f1c17fc300 100644 --- a/packages/sdk/connect/README.md +++ b/packages/sdk/connect/README.md @@ -27,16 +27,17 @@ Please use GitHub to: ### Basic ```typescript -import { Connection, CeloProvider } from '@celo/connect' +import { Connection } from '@celo/connect' -const web3 = new Web3("YOUR_RPC_URL") -const connection = new Connection(web3) +const connection = new Connection('YOUR_RPC_URL') ``` For a raw transaction: ```ts -const oneCelo = connection.web3.utils.toWei('1', 'ether') +import { parseEther } from 'viem' + +const oneCelo = parseEther('1') const tx = connection.sendTransaction({ from: myAddress, diff --git a/packages/sdk/connect/package.json b/packages/sdk/connect/package.json index 1b96bfda83..433c0c9de8 100644 --- a/packages/sdk/connect/package.json +++ b/packages/sdk/connect/package.json @@ -27,27 +27,15 @@ "dependencies": { "@celo/base": "^7.0.3", "@celo/utils": "^8.0.3", - "@ethereumjs/util": "8.0.5", "@types/debug": "^4.1.5", "@types/utf8": "^2.1.6", - "bignumber.js": "^9.0.0", "debug": "^4.1.1", "utf8": "3.0.0", - "web3-core": "1.10.4", - "web3-eth": "1.10.4", - "web3-eth-contract": "1.10.4" + "viem": "^2.33.2" }, "devDependencies": { "@celo/typescript": "workspace:^", - "@types/debug": "^4.1.12", - "web3": "1.10.4", - "web3-core": "1.10.4", - "web3-eth": "1.10.4", - "web3-eth-abi": "1.10.4", - "web3-eth-contract": "1.10.4" - }, - "peerDependencies": { - "web3": "1.10.4" + "@types/debug": "^4.1.12" }, "engines": { "node": ">=20" diff --git a/packages/sdk/connect/src/abi-types.ts b/packages/sdk/connect/src/abi-types.ts index 632561875c..4ca60c0b90 100644 --- a/packages/sdk/connect/src/abi-types.ts +++ b/packages/sdk/connect/src/abi-types.ts @@ -1,68 +1,41 @@ -import { EventLog } from './types' +import type { AbiParameter } from 'viem' -/** @internal */ -export type ABIType = 'uint256' | 'boolean' | 'string' | 'bytes' | string // TODO complete list +/** @internal - Matches viem's AbiParameter, extended with indexed for event inputs */ +export type AbiInput = AbiParameter & { indexed?: boolean } +/** @internal - Matches viem's AbiParameter */ +export type AbiOutput = AbiParameter -/** @internal */ -export interface DecodedParamsArray { - [index: number]: any - __length__: number -} - -/** @internal */ -export interface DecodedParamsObject extends DecodedParamsArray { - [key: string]: any -} - -// Note the following types come from web3-utils: AbiInput, AbiOutput, AbiItem, AbiType StateMutabilityType, ABIDefinition type AbiType = 'function' | 'constructor' | 'event' | 'fallback' type StateMutabilityType = 'pure' | 'view' | 'nonpayable' | 'payable' -/** @internal */ -export interface AbiInput { - name: string - type: string - indexed?: boolean - components?: AbiInput[] - internalType?: string -} - -/** @internal */ -export interface AbiOutput { - name: string - type: string - components?: AbiOutput[] - internalType?: string -} /** @internal */ export interface AbiItem { anonymous?: boolean constant?: boolean - inputs?: AbiInput[] + inputs?: readonly AbiInput[] name?: string - outputs?: AbiOutput[] + outputs?: readonly AbiOutput[] payable?: boolean stateMutability?: StateMutabilityType type: AbiType gas?: number } + /** @internal */ export interface ABIDefinition extends AbiItem { signature: string } -/** @internal */ -export interface AbiCoder { - decodeLog(inputs: AbiInput[], hexString: string, topics: string[]): EventLog - - encodeParameter(type: ABIType, parameter: any): string - encodeParameters(types: ABIType[], paramaters: any[]): string - encodeEventSignature(name: string | object): string - encodeFunctionCall(jsonInterface: object, parameters: any[]): string - encodeFunctionSignature(name: string | object): string +/** @internal */ +export type ABIType = string - decodeParameter(type: ABIType, hex: string): any +/** @internal */ +export interface DecodedParamsArray { + [index: number]: unknown + __length__: number +} - decodeParameters(types: ABIType[], hex: string): DecodedParamsArray - decodeParameters(types: AbiInput[], hex: string): DecodedParamsObject +/** @internal */ +export interface DecodedParamsObject extends DecodedParamsArray { + [key: string]: unknown } diff --git a/packages/sdk/connect/src/celo-provider.test.ts b/packages/sdk/connect/src/celo-provider.test.ts index 596b8166ec..149efee1d2 100644 --- a/packages/sdk/connect/src/celo-provider.test.ts +++ b/packages/sdk/connect/src/celo-provider.test.ts @@ -1,16 +1,6 @@ -import Web3 from 'web3' import { CeloProvider } from './celo-provider' import { Connection } from './connection' -import { - Address, - Callback, - CeloTx, - EncodedTransaction, - Error, - JsonRpcPayload, - JsonRpcResponse, - Provider, -} from './types' +import { Address, CeloTx, EncodedTransaction, Provider } from './types' import { ReadOnlyWallet } from './wallet' const ACCOUNT_ADDRESS1 = '0x1234567890123456789012345678901234567890' @@ -66,8 +56,9 @@ class MockWallet implements ReadOnlyWallet { // These tests verify the signTransaction WITHOUT the ParamsPopulator describe('CeloProvider', () => { - let mockCallback: any + let mockRequest: jest.Mock let mockProvider: Provider + let connection: Connection let celoProvider: CeloProvider const interceptedByCeloProvider = [ 'eth_sendTransaction', @@ -81,45 +72,26 @@ describe('CeloProvider', () => { ] beforeEach(() => { - mockCallback = jest.fn((payload: JsonRpcPayload, callback: Callback): any => { - const response: JsonRpcResponse = { - jsonrpc: payload.jsonrpc, - id: Number(payload.id), - result: { - params: payload.params, - method: payload.method, - }, + mockRequest = jest.fn(async ({ method, params }: { method: string; params?: any[] }) => { + return { + params: params ?? [], + method, } - callback(null, response) }) mockProvider = { - send: mockCallback, + request: mockRequest, } - const web3 = new Web3() - web3.setProvider(mockProvider as any) - const connection = new Connection(web3, new MockWallet()) - celoProvider = connection.web3.currentProvider as any as CeloProvider + connection = new Connection(mockProvider, new MockWallet()) + celoProvider = connection.currentProvider }) describe("when celo provider don't have any local account", () => { interceptedByCeloProvider.forEach((method: string) => { - test(`fowards the call to '${method}' to the original provider`, (done) => { - const payload: JsonRpcPayload = { - id: 0, - jsonrpc: '2.0', - method, - params: ['1', '2'], - } - const callback: Callback = ( - _error: Error | null, - _result?: JsonRpcResponse - ) => { - expect(mockCallback.mock.calls.length).toBe(1) - expect(mockCallback.mock.calls[0][0].method).toBe(method) - done() - } - celoProvider.send(payload, callback) + test(`forwards the call to '${method}' to the original provider`, async () => { + await celoProvider.request({ method, params: ['1', '2'] }) + expect(mockRequest.mock.calls.length).toBe(1) + expect(mockRequest.mock.calls[0][0].method).toBe(method) }) }) }) @@ -187,74 +159,44 @@ describe('CeloProvider', () => { } beforeEach(() => { - celoProvider.addAccount(ACCOUNT_ADDRESS1) + connection.addAccount(ACCOUNT_ADDRESS1) }) describe('but tries to use it with a different account', () => { interceptedByCeloProvider.forEach((method: string) => { - test(`forwards the call to '${method}' to the original provider`, (done) => { - const payload: JsonRpcPayload = { - id: 0, - jsonrpc: '2.0', + test(`forwards the call to '${method}' to the original provider`, async () => { + await celoProvider.request({ method, params: paramsForMethod(method, ACCOUNT_ADDRESS2, ACCOUNT_ADDRESS1), - } - const callback: Callback = ( - _error: Error | null, - _result?: JsonRpcResponse - ) => { - expect(mockCallback.mock.calls.length).toBe(1) - expect(mockCallback.mock.calls[0][0].method).toBe(method) - done() - } - celoProvider.send(payload, callback) + }) + expect(mockRequest.mock.calls.length).toBe(1) + expect(mockRequest.mock.calls[0][0].method).toBe(method) }) }) }) describe('using that account', () => { - test("call 'send' with 'eth_sendTransaction' signs and send a eth_sendRawTransaction to the original provider", (done) => { - const payload: JsonRpcPayload = { - id: 0, - jsonrpc: '2.0', + test("'eth_sendTransaction' signs and sends eth_sendRawTransaction to the original provider", async () => { + await celoProvider.request({ method: 'eth_sendTransaction', params: paramsForMethod('eth_sendTransaction', ACCOUNT_ADDRESS1, ACCOUNT_ADDRESS2), - } - const callback: Callback = ( - _error: Error | null, - _result?: JsonRpcResponse - ) => { - expect(mockCallback.mock.calls.length).toBe(1) - expect(mockCallback.mock.calls[0][0].method).toBe('eth_sendRawTransaction') - done() - } - celoProvider.send(payload, callback) + }) + expect(mockRequest.mock.calls.length).toBe(1) + expect(mockRequest.mock.calls[0][0].method).toBe('eth_sendRawTransaction') }) - test.todo( - "call 'send' with 'eth_signTypedData' signs the message and don't call the original provider" - ) + test.todo("'eth_signTypedData' signs the message and doesn't call the original provider") interceptedByCeloProvider .filter((x) => x !== 'eth_sendTransaction' && !x.startsWith('eth_signTypedData')) .forEach((method: string) => { - test(`call 'send' with '${method}' signs the message and don't call the original provider`, (done) => { - const payload: JsonRpcPayload = { - id: 0, - jsonrpc: '2.0', + test(`'${method}' signs the message and doesn't call the original provider`, async () => { + const result = await celoProvider.request({ method, params: paramsForMethod(method, ACCOUNT_ADDRESS1, ACCOUNT_ADDRESS2), - } - const callback: Callback = ( - error: Error | null, - result?: JsonRpcResponse - ) => { - expect(error).toBeNull() - expect(result).not.toBeFalsy() - expect(mockCallback.mock.calls.length).toBe(0) - done() - } - celoProvider.send(payload, callback) + }) + expect(result).toBeTruthy() + expect(mockRequest.mock.calls.length).toBe(0) }) }) }) diff --git a/packages/sdk/connect/src/celo-provider.ts b/packages/sdk/connect/src/celo-provider.ts index 36a573cdd1..749a642faa 100644 --- a/packages/sdk/connect/src/celo-provider.ts +++ b/packages/sdk/connect/src/celo-provider.ts @@ -1,19 +1,10 @@ import { StrongAddress } from '@celo/base' import { Lock } from '@celo/base/lib/lock' import debugFactory from 'debug' +import type { EIP1193RequestFn } from 'viem' import { Connection } from './connection' -import { - Callback, - Eip1193Provider, - Eip1193RequestArguments, - EncodedTransaction, - Error, - JsonRpcPayload, - JsonRpcResponse, - Provider, -} from './types' +import { EncodedTransaction, Provider } from './types' import { hasProperty, stopProvider } from './utils/provider-utils' -import { rpcCallHandler } from './utils/rpc-caller' const debug = debugFactory('provider:connection') const debugPayload = debugFactory('provider:payload') @@ -21,19 +12,6 @@ const debugTxToSend = debugFactory('provider:tx-to-send') const debugEncodedTx = debugFactory('provider:encoded-tx') const debugResponse = debugFactory('provider:response') -enum InterceptedMethods { - accounts = 'eth_accounts', - sendTransaction = 'eth_sendTransaction', - signTransaction = 'eth_signTransaction', - sign = 'eth_sign', - personalSign = 'personal_sign', - signTypedData = 'eth_signTypedData', - signTypedDataV1 = 'eth_signTypedData_v1', - signTypedDataV3 = 'eth_signTypedData_v3', - signTypedDataV4 = 'eth_signTypedData_v4', - signTypedDataV5 = 'eth_signTypedData_v5', -} - export function assertIsCeloProvider(provider: any): asserts provider is CeloProvider { if (!(provider instanceof CeloProvider)) { throw new Error( @@ -43,7 +21,8 @@ export function assertIsCeloProvider(provider: any): asserts provider is CeloPro } /* - * CeloProvider wraps a web3.js provider for use with Celo + * CeloProvider wraps an EIP-1193 provider for use with Celo. + * Intercepts signing methods and delegates to a local wallet when available. */ export class CeloProvider implements Provider { private alreadyStopped: boolean = false @@ -60,105 +39,82 @@ export class CeloProvider implements Provider { this.addProviderDelegatedFunctions() } - // @deprecated Use the `addAccount` from the Connection - addAccount(privateKey: string) { - this.connection.addAccount(privateKey) - } - - // @deprecated Use the `removeAccount` from the Connection - removeAccount(address: string) { - this.connection.removeAccount(address) - } - - // @deprecated Use the `getAccounts` from the Connection - async getAccounts(): Promise { - return this.connection.getAccounts() - } - isLocalAccount(address?: string): boolean { return this.connection.wallet != null && this.connection.wallet.hasAccount(address) } /** - * Send method as expected by web3.js + * EIP-1193 request method — the single entry point for all JSON-RPC calls. */ - send(payload: JsonRpcPayload, callback: Callback): void { - let txParams: any - let address: StrongAddress - - debugPayload('%O', payload) + request: EIP1193RequestFn = async ({ method, params }) => { + const safeParams: any[] = Array.isArray(params) ? params : params != null ? [params] : [] - const decoratedCallback = (error: Error | null, result?: JsonRpcResponse) => { - debugResponse('%O', result) - callback(error, result) - } + debugPayload('%O', { method, params: safeParams }) if (this.alreadyStopped) { - throw Error('CeloProvider already stopped') + throw new Error('CeloProvider already stopped') } - switch (payload.method) { - case InterceptedMethods.accounts: { - rpcCallHandler(payload, this.handleAccounts.bind(this), decoratedCallback) - return - } - case InterceptedMethods.sendTransaction: { - this.checkPayloadWithAtLeastNParams(payload, 1) - txParams = payload.params[0] + let result: any + switch (method) { + case 'eth_accounts': { + result = await this.handleAccounts() + break + } + case 'eth_sendTransaction': { + this.checkAtLeastNParams(safeParams, 1) + const txParams = safeParams[0] if (this.connection.isLocalAccount(txParams.from)) { - rpcCallHandler(payload, this.handleSendTransaction.bind(this), decoratedCallback) + result = await this.handleSendTransaction(txParams) } else { - this.forwardSend(payload, callback) + result = await this.existingProvider.request({ method, params: safeParams } as any) } - return + break } - case InterceptedMethods.signTransaction: { - this.checkPayloadWithAtLeastNParams(payload, 1) - txParams = payload.params[0] - + case 'eth_signTransaction': { + this.checkAtLeastNParams(safeParams, 1) + const txParams = safeParams[0] if (this.connection.isLocalAccount(txParams.from)) { - rpcCallHandler(payload, this.handleSignTransaction.bind(this), decoratedCallback) + result = await this.handleSignTransaction(txParams) } else { - this.forwardSend(payload, callback) + result = await this.existingProvider.request({ method, params: safeParams } as any) } - return + break } - case InterceptedMethods.sign: - case InterceptedMethods.personalSign: { - this.checkPayloadWithAtLeastNParams(payload, 2) - - address = payload.method === InterceptedMethods.sign ? payload.params[0] : payload.params[1] - + case 'eth_sign': + case 'personal_sign': { + this.checkAtLeastNParams(safeParams, 2) + const address: StrongAddress = method === 'eth_sign' ? safeParams[0] : safeParams[1] if (this.connection.isLocalAccount(address)) { - rpcCallHandler(payload, this.handleSignPersonalMessage.bind(this), decoratedCallback) + result = await this.handleSignPersonalMessage(method, safeParams) } else { - this.forwardSend(payload, callback) + result = await this.existingProvider.request({ method, params: safeParams } as any) } - - return + break } - case InterceptedMethods.signTypedData: - case InterceptedMethods.signTypedDataV1: - case InterceptedMethods.signTypedDataV3: - case InterceptedMethods.signTypedDataV4: - case InterceptedMethods.signTypedDataV5: { - this.checkPayloadWithAtLeastNParams(payload, 1) - address = payload.params[0] - + case 'eth_signTypedData': + case 'eth_signTypedData_v1': + case 'eth_signTypedData_v3': + case 'eth_signTypedData_v4': + case 'eth_signTypedData_v5': { + this.checkAtLeastNParams(safeParams, 1) + const address: StrongAddress = safeParams[0] if (this.connection.isLocalAccount(address)) { - rpcCallHandler(payload, this.handleSignTypedData.bind(this), decoratedCallback) + result = await this.handleSignTypedData(safeParams) } else { - this.forwardSend(payload, callback) + result = await this.existingProvider.request({ method, params: safeParams } as any) } - return + break } - default: { - this.forwardSend(payload, callback) - return + result = await this.existingProvider.request({ method, params: safeParams } as any) + break } } + + debugResponse('%O', result) + return result } stop() { @@ -173,49 +129,22 @@ export class CeloProvider implements Provider { } } - toEip1193Provider(): Eip1193Provider { - return { - request: async (args: Eip1193RequestArguments) => { - return new Promise((resolve, reject) => { - this.send( - { - id: 0, - jsonrpc: '2.0', - method: args.method, - params: args.params as any[], - }, - (error: Error | null, result: unknown) => { - if (error) { - reject(error) - } else { - resolve((result as any).result) - } - } - ) - }) - }, - } - } - - private async handleAccounts(_payload: JsonRpcPayload): Promise { + private async handleAccounts(): Promise { return this.connection.getAccounts() } - private async handleSignTypedData(payload: JsonRpcPayload): Promise { - const [address, typedData] = payload.params - const signature = this.connection.wallet!.signTypedData(address, typedData) - return signature + private async handleSignTypedData(params: any[]): Promise { + const [address, typedData] = params + return this.connection.wallet!.signTypedData(address, typedData) } - private async handleSignPersonalMessage(payload: JsonRpcPayload): Promise { - const address = payload.method === 'eth_sign' ? payload.params[0] : payload.params[1] - const data = payload.method === 'eth_sign' ? payload.params[1] : payload.params[0] - const ecSignatureHex = this.connection.wallet!.signPersonalMessage(address, data) - return ecSignatureHex + private async handleSignPersonalMessage(method: string, params: any[]): Promise { + const address = method === 'eth_sign' ? params[0] : params[1] + const data = method === 'eth_sign' ? params[1] : params[0] + return this.connection.wallet!.signPersonalMessage(address, data) } - private async handleSignTransaction(payload: JsonRpcPayload): Promise { - const txParams = payload.params[0] + private async handleSignTransaction(txParams: any): Promise { const filledParams = await this.connection.paramsPopulator.populate(txParams) debugTxToSend('%O', filledParams) const signedTx = await this.connection.wallet!.signTransaction(filledParams) @@ -223,30 +152,26 @@ export class CeloProvider implements Provider { return signedTx } - private async handleSendTransaction(payload: JsonRpcPayload): Promise { + private async handleSendTransaction(txParams: any): Promise { await this.nonceLock.acquire() try { - const signedTx = await this.handleSignTransaction(payload) - const response = await this.connection.rpcCaller.call('eth_sendRawTransaction', [ - signedTx.raw, - ]) - return response.result + const signedTx = await this.handleSignTransaction(txParams) + return await this.connection.viemClient.request({ + method: 'eth_sendRawTransaction', + params: [signedTx.raw as `0x${string}`], + }) } finally { this.nonceLock.release() } } - private forwardSend(payload: JsonRpcPayload, callback: Callback): void { - this.connection.rpcCaller.send(payload, callback) - } - - private checkPayloadWithAtLeastNParams(payload: JsonRpcPayload, n: number) { - if (!payload.params || payload.params.length < n) { - throw Error('Invalid params') + private checkAtLeastNParams(params: any[], n: number) { + if (!params || params.length < n) { + throw new Error('Invalid params') } } - // Functions required to act as a delefator for the existingProvider + // Functions required to act as a delegator for the existingProvider private addProviderDelegatedFunctions(): void { if ( hasProperty<{ on: (type: string, callback: () => void) => void }>(this.existingProvider, 'on') diff --git a/packages/sdk/connect/src/connection.test.ts b/packages/sdk/connect/src/connection.test.ts index 8556e6eba4..ec63c7a08b 100644 --- a/packages/sdk/connect/src/connection.test.ts +++ b/packages/sdk/connect/src/connection.test.ts @@ -1,16 +1,24 @@ import { ensureLeading0x } from '@celo/base' -import Web3 from 'web3' import { Connection } from './connection' +import { Provider } from './types' -describe('Connection', () => { - let connection: Connection - beforeEach(() => { - const web3 = new Web3('http://localhost:8545') - connection = new Connection(web3) - }) +function createMockProvider(handler?: (method: string, params: any[]) => any): Provider { + return { + request: (async ({ method, params }: any) => { + if (handler) { + return handler(method, params || []) + } + }) as any, + } +} +describe('Connection', () => { describe('#setFeeMarketGas', () => { describe('when fee market gas is set', () => { + let connection: Connection + beforeEach(() => { + connection = new Connection(createMockProvider()) + }) it('returns with gasPrice undefined and feeMarketGas set', async () => { const result = await connection.setFeeMarketGas({ maxFeePerGas: '1', @@ -23,7 +31,11 @@ describe('Connection', () => { }) }) }) - describe('when fee market gas is set', () => { + describe('when fee market gas is set (duplicate)', () => { + let connection: Connection + beforeEach(() => { + connection = new Connection(createMockProvider()) + }) it('returns with gasPrice undefined and feeMarketGas set', async () => { const result = await connection.setFeeMarketGas({ maxFeePerGas: '1', @@ -42,42 +54,27 @@ describe('Connection', () => { const BASE_FEE_PER = 25000000000 const PRIORITYFEE = 200000 const multiple = BigInt(120) + let connection: Connection + let rpcHandler: jest.Mock beforeEach(() => { - connection.rpcCaller.call = jest.fn(async (method) => { + rpcHandler = jest.fn((method: string) => { if (method === 'eth_gasPrice') { - return { - result: ensureLeading0x(ETH_GAS_PRICE.toString(16)), - id: 22, - jsonrpc: '2.0', - } + return ensureLeading0x(ETH_GAS_PRICE.toString(16)) } if (method === 'eth_maxPriorityFeePerGas') { - return { - result: ensureLeading0x(PRIORITYFEE.toString(16)), - id: 23, - jsonrpc: '2.0', - } + return ensureLeading0x(PRIORITYFEE.toString(16)) } - if (method === 'eth_getBlockByNumber') { - return { - result: { gasLimit: 30000000, baseFeePerGas: BASE_FEE_PER }, - id: 24, - jsonrpc: '2.0', - } - } - return { - result: 0, - id: 25, - jsonrpc: '2.0', + if (method === 'eth_getBlockByNumber' || method === 'eth_getBlockByHash') { + return { gasLimit: 30000000, baseFeePerGas: BASE_FEE_PER } } + return 0 }) + connection = new Connection(createMockProvider(rpcHandler)) }) it('asked the rpc what they should be with feeCurrency', async () => { const result = await connection.setFeeMarketGas({ feeCurrency: '0x000001' }) - expect(connection.rpcCaller.call).toHaveBeenCalledWith('eth_maxPriorityFeePerGas', [ - '0x000001', - ]) - expect(connection.rpcCaller.call).toHaveBeenCalledWith('eth_gasPrice', ['0x000001']) + expect(rpcHandler).toHaveBeenCalledWith('eth_maxPriorityFeePerGas', ['0x000001']) + expect(rpcHandler).toHaveBeenCalledWith('eth_gasPrice', ['0x000001']) expect(BigInt(result.maxPriorityFeePerGas as string)).toEqual(BigInt(PRIORITYFEE)) expect(BigInt(result.maxFeePerGas as string)).toEqual( @@ -86,11 +83,11 @@ describe('Connection', () => { }) it('asked the rpc what they should be without feeCurrency', async () => { const result = await connection.setFeeMarketGas({}) - expect(connection.rpcCaller.call).toHaveBeenCalledWith('eth_maxPriorityFeePerGas', []) - expect(connection.rpcCaller.call).toHaveBeenCalledWith('eth_getBlockByNumber', [ - 'latest', - true, - ]) + expect(rpcHandler).toHaveBeenCalledWith('eth_maxPriorityFeePerGas', []) + expect(rpcHandler).toHaveBeenCalledWith( + expect.stringMatching(/eth_getBlockBy/), + expect.any(Array) + ) expect(BigInt(result.maxPriorityFeePerGas as string)).toEqual(BigInt(PRIORITYFEE)) expect(BigInt(result.maxFeePerGas as string)).toEqual( (BigInt(BASE_FEE_PER) * multiple) / BigInt(100) + BigInt(PRIORITYFEE) diff --git a/packages/sdk/connect/src/connection.ts b/packages/sdk/connect/src/connection.ts index d24297f96c..2e32c6544e 100644 --- a/packages/sdk/connect/src/connection.ts +++ b/packages/sdk/connect/src/connection.ts @@ -1,47 +1,35 @@ -// tslint:disable: ordered-imports import { StrongAddress } from '@celo/base' import { ensureLeading0x, toChecksumAddress } from '@celo/utils/lib/address' import { EIP712TypedData, generateTypedDataHash } from '@celo/utils/lib/sign-typed-data-utils' import { Signature, parseSignatureWithoutPrefix } from '@celo/utils/lib/signatureUtils' -import { bufferToHex } from '@ethereumjs/util' import debugFactory from 'debug' -import Web3 from 'web3' -import { AbiCoder } from './abi-types' -import { CeloProvider, assertIsCeloProvider } from './celo-provider' import { - Address, - Block, - BlockHeader, - BlockNumber, - CeloTx, - CeloTxObject, - CeloTxPending, - CeloTxReceipt, - Provider, - Syncing, -} from './types' + toHex, + createPublicClient, + createWalletClient, + custom, + toFunctionHash, + toEventHash, + type PublicClient, + type WalletClient, +} from 'viem' +import { AbiInput, AbiItem } from './abi-types' +import { isEmpty } from './viem-abi-coder' +import { type CeloContract, createCeloContract } from './contract-types' +import { CeloProvider, assertIsCeloProvider } from './celo-provider' +import { Address, CeloTx, Provider } from './types' import { decodeStringParameter } from './utils/abi-utils' -import { - hexToNumber, - inputAddressFormatter, - inputBlockNumberFormatter, - inputDefaultBlockNumberFormatter, - inputSignFormatter, - outputBigNumberFormatter, - outputBlockFormatter, - outputBlockHeaderFormatter, - outputCeloTxFormatter, - outputCeloTxReceiptFormatter, -} from './utils/formatter' +import { inputAddressFormatter, inputSignFormatter } from './utils/formatter' import { hasProperty } from './utils/provider-utils' -import { HttpRpcCaller, RpcCaller, getRandomId } from './utils/rpc-caller' import { TxParamsNormalizer } from './utils/tx-params-normalizer' -import { TransactionResult, toTxResult } from './utils/tx-result' import { ReadOnlyWallet } from './wallet' +import { readOnlyWalletToAccount } from './wallet-adapter' + +// Convenience re-export for consumers that import from @celo/connect +export { isPresent, isEmpty } from './viem-abi-coder' const debugGasEstimation = debugFactory('connection:gas-estimation') -type BN = ReturnType export interface ConnectionOptions { gasInflationFactor: number feeCurrency?: StrongAddress @@ -50,46 +38,100 @@ export interface ConnectionOptions { /** * Connection is a Class for connecting to Celo, sending Transactions, etc - * @param web3 an instance of web3 + * @param provider an EIP-1193 provider * @param wallet a child class of {@link WalletBase} - * @param handleRevert sets handleRevert on the web3.eth instance passed in */ export class Connection { private config: ConnectionOptions - private _chainID: number | undefined readonly paramsPopulator: TxParamsNormalizer - rpcCaller!: RpcCaller + private _provider!: CeloProvider + private _viemClient!: PublicClient + private _walletClient: WalletClient | undefined constructor( - readonly web3: Web3, - public wallet?: ReadOnlyWallet, - handleRevert = true + provider: Provider, + public wallet?: ReadOnlyWallet ) { - web3.eth.handleRevert = handleRevert - this.config = { gasInflationFactor: 1.3, } - const existingProvider: Provider = web3.currentProvider as Provider - this.setProvider(existingProvider) - // TODO: Add this line with the wallets separation completed - // this.wallet = _wallet ?? new LocalWallet() - this.config.from = (web3.eth.defaultAccount as StrongAddress) ?? undefined + this.setProvider(provider) this.paramsPopulator = new TxParamsNormalizer(this) } + /** Get the current provider */ + get currentProvider(): CeloProvider { + return this._provider + } + + /** Viem PublicClient bound to this connection's RPC */ + get viemClient(): PublicClient { + return this._viemClient + } + + /** + * Viem WalletClient bound to this connection's provider. + * Lazily sets the default account when the wallet gains accounts after construction. + */ + get walletClient(): WalletClient | undefined { + // If walletClient exists without a default account but the wallet now has accounts, recreate + if ( + this._walletClient && + !this._walletClient.account && + this.wallet && + this.wallet.getAccounts().length > 0 + ) { + this._walletClient = createWalletClient({ + account: readOnlyWalletToAccount( + this.wallet, + this.wallet.getAccounts()[0] as StrongAddress + ), + transport: custom({ + request: this._provider.request.bind(this._provider), + }), + }) + } + return this._walletClient + } + setProvider(provider: Provider) { if (!provider) { throw new Error('Must have a valid Provider') } - this._chainID = undefined try { + let celoProvider: CeloProvider if (!(provider instanceof CeloProvider)) { - this.rpcCaller = new HttpRpcCaller(provider) - provider = new CeloProvider(provider, this) + celoProvider = new CeloProvider(provider, this) + } else { + celoProvider = provider + } + this._provider = celoProvider + const rawProvider = provider instanceof CeloProvider ? provider.existingProvider : provider + this._viemClient = createPublicClient({ + transport: custom({ + request: rawProvider.request.bind(rawProvider), + }), + }) + if (this.wallet && this.wallet.getAccounts().length > 0) { + this._walletClient = createWalletClient({ + account: readOnlyWalletToAccount( + this.wallet, + this.wallet.getAccounts()[0] as StrongAddress + ), + transport: custom({ + request: celoProvider.request.bind(celoProvider), + }), + }) + } else { + // Always create a WalletClient so contract.write works for node accounts. + // Individual write calls provide the account via from -> account mapping. + this._walletClient = createWalletClient({ + transport: custom({ + request: celoProvider.request.bind(celoProvider), + }), + }) } - this.web3.setProvider(provider as any) return true } catch (error) { console.error(`could not attach provider`, error) @@ -97,20 +139,11 @@ export class Connection { } } - keccak256 = (value: string | BN): string => { - return this.web3.utils.keccak256(value) - } - - hexToAscii = (hex: string) => { - return this.web3.utils.hexToAscii(hex) - } - /** * Set default account for generated transactions (eg. tx.from ) */ set defaultAccount(address: StrongAddress | undefined) { this.config.from = address - this.web3.eth.defaultAccount = address ? address : null } /** @@ -173,8 +206,11 @@ export class Connection { } async getNodeAccounts(): Promise { - const nodeAccountsResp = await this.rpcCaller.call('eth_accounts', []) - return this.toChecksumAddresses(nodeAccountsResp.result ?? []) as StrongAddress[] + const accounts = await this._viemClient.request({ + method: 'eth_accounts' as any, + params: [] as any, + }) + return this.toChecksumAddresses((accounts as string[]) ?? []) as StrongAddress[] } getLocalAccounts(): StrongAddress[] { @@ -191,73 +227,35 @@ export class Connection { return addresses.map((value) => toChecksumAddress(value)) } - isListening(): Promise { - return this.web3.eth.net.isListening() - } - - isSyncing(): Promise { - return new Promise((resolve, reject) => { - this.web3.eth - .isSyncing() - .then((response: boolean | Syncing) => { - // isSyncing returns a syncProgress object when it's still syncing - if (typeof response === 'boolean') { - resolve(response) - } else { - resolve(true) - } - }) - .catch(reject) - }) - } - /** * Send a transaction to celo-blockchain. * - * Similar to `web3.eth.sendTransaction()` but with following differences: + * Similar to `eth_sendTransaction` but with following differences: * - applies connections tx's defaults * - estimatesGas before sending - * - returns a `TransactionResult` instead of `PromiEvent` + * - returns the transaction hash */ - sendTransaction = async (tx: CeloTx): Promise => { + sendTransaction = async (tx: CeloTx): Promise<`0x${string}`> => { tx = this.fillTxDefaults(tx) let gas = tx.gas - if (gas == null) { - gas = await this.estimateGasWithInflationFactor(tx) + if (!gas) { + const { gas: _omit, ...txWithoutGas } = tx + gas = await this.estimateGasWithInflationFactor(txWithoutGas) } - return toTxResult( - this.web3.eth.sendTransaction({ - ...tx, - gas, - }) - ) + return this.sendTransactionViaProvider({ + ...tx, + gas, + }) } - sendTransactionObject = async ( - txObj: CeloTxObject, - tx?: Omit - ): Promise => { - tx = this.fillTxDefaults(tx) - - let gas = tx.gas - if (gas == null) { - const gasEstimator = (_tx: CeloTx) => txObj.estimateGas({ ..._tx }) - const getCallTx = (_tx: CeloTx) => { - // @ts-ignore missing _parent property from TransactionObject type. - return { ..._tx, data: txObj.encodeABI(), to: txObj._parent._address } - } - const caller = (_tx: CeloTx) => this.web3.eth.call(getCallTx(_tx)) - gas = await this.estimateGasWithInflationFactor(tx, gasEstimator, caller) - } - - return toTxResult( - txObj.send({ - ...tx, - gas, - }) - ) + private async sendTransactionViaProvider(tx: CeloTx): Promise<`0x${string}`> { + const result = await this._provider.request({ + method: 'eth_sendTransaction', + params: [tx], + }) + return result as `0x${string}` } /* @@ -275,67 +273,32 @@ export class Connection { // stringify data for v3 & v4 based on https://github.com/MetaMask/metamask-extension/blob/c72199a1a6e4151c40c22f79d0f3b6ed7a2d59a7/app/scripts/lib/typed-message-manager.js#L185 const shouldStringify = version === 3 || version === 4 - // Uses the Provider and not the RpcCaller, because this method should be intercepted - // by the CeloProvider if there is a local wallet that could sign it. The RpcCaller - // would just forward it to the node - const signature = await new Promise((resolve, reject) => { - const method = version ? `eth_signTypedData_v${version}` : 'eth_signTypedData' - ;(this.web3.currentProvider as Provider).send( - { - id: getRandomId(), - jsonrpc: '2.0', - method, - params: [ - inputAddressFormatter(signer), - shouldStringify ? JSON.stringify(typedData) : typedData, - ], - }, - (error, resp) => { - if (error) { - reject(error) - } else if (resp) { - resolve(resp.result as string) - } else { - reject(new Error('empty-response')) - } - } - ) - }) - - const messageHash = bufferToHex(generateTypedDataHash(typedData)) + // Uses the CeloProvider so this method can be intercepted + // by a local wallet that could sign it. + const method = version ? `eth_signTypedData_v${version}` : 'eth_signTypedData' + const signature = (await this._provider.request({ + method, + params: [ + inputAddressFormatter(signer), + shouldStringify ? JSON.stringify(typedData) : typedData, + ], + })) as string + + const messageHash = toHex(generateTypedDataHash(typedData)) return parseSignatureWithoutPrefix(messageHash, signature, signer) } sign = async (dataToSign: string, address: Address | number): Promise => { - // Uses the Provider and not the RpcCaller, because this method should be intercepted - // by the CeloProvider if there is a local wallet that could sign it. The RpcCaller - // would just forward it to the node - const signature = await new Promise((resolve, reject) => { - ;(this.web3.currentProvider as Provider).send( - { - id: getRandomId(), - jsonrpc: '2.0', - method: 'eth_sign', - params: [inputAddressFormatter(address.toString()), inputSignFormatter(dataToSign)], - }, - (error, resp) => { - if (error) { - reject(error) - } else if (resp) { - resolve(resp.result as string) - } else { - reject(new Error('empty-response')) - } - } - ) - }) + // Uses the CeloProvider so this method can be intercepted + // by a local wallet that could sign it. + const signature = (await this._provider.request({ + method: 'eth_sign', + params: [inputAddressFormatter(address.toString()), inputSignFormatter(dataToSign)], + })) as string return signature } - sendSignedTransaction = async (signedTransactionData: string): Promise => { - return toTxResult(this.web3.eth.sendSignedTransaction(signedTransactionData)) - } // if neither gas price nor feeMarket fields are present set them. setFeeMarketGas = async (tx: CeloTx): Promise => { if (isEmpty(tx.maxPriorityFeePerGas)) { @@ -344,7 +307,9 @@ export class Connection { if (isEmpty(tx.maxFeePerGas)) { const baseFee = isEmpty(tx.feeCurrency) - ? await this.getBlock('latest').then((block) => block.baseFeePerGas) + ? await this._viemClient + .getBlock({ blockTag: 'latest' }) + .then((block) => block.baseFeePerGas) : await this.gasPrice(tx.feeCurrency) const withBuffer = addBufferToBaseFee(BigInt(baseFee!)) const maxFeePerGas = @@ -358,20 +323,39 @@ export class Connection { } } + private defaultGasEstimator = async (tx: CeloTx): Promise => { + const result = await this._viemClient.request({ + method: 'eth_estimateGas', + params: [tx] as any, + }) + return parseInt(result as string, 16) + } + + private defaultCaller = async (tx: CeloTx): Promise => { + const result = await this._viemClient.request({ + method: 'eth_call', + params: [{ data: tx.data, to: tx.to, from: tx.from }, 'latest'] as any, + }) + return result as string + } + estimateGas = async ( tx: CeloTx, - gasEstimator: (tx: CeloTx) => Promise = this.web3.eth.estimateGas, - caller: (tx: CeloTx) => Promise = this.web3.eth.call + gasEstimator?: (tx: CeloTx) => Promise, + caller?: (tx: CeloTx) => Promise ): Promise => { + const estimator = gasEstimator ?? this.defaultGasEstimator + const callFn = caller ?? this.defaultCaller + try { - const gas = await gasEstimator({ ...tx }) + const gas = await estimator({ ...tx }) debugGasEstimation('estimatedGas: %s', gas.toString()) return gas } catch (e) { - const called = await caller({ data: tx.data, to: tx.to, from: tx.from }) + const called = await callFn({ data: tx.data, to: tx.to, from: tx.from }) let revertReason = 'Could not decode transaction failure reason' if (called.startsWith('0x08c379a')) { - revertReason = decodeStringParameter(this.getAbiCoder(), called.substring(10)) + revertReason = decodeStringParameter(called.substring(10)) } debugGasEstimation('Recover transaction failure reason', { called, @@ -385,10 +369,6 @@ export class Connection { } } - getAbiCoder(): AbiCoder { - return this.web3.eth.abi as unknown as AbiCoder - } - estimateGasWithInflationFactor = async ( tx: CeloTx, gasEstimator?: (tx: CeloTx) => Promise, @@ -400,120 +380,28 @@ export class Connection { ) debugGasEstimation('estimatedGasWithInflationFactor: %s', gas) return gas - } catch (e: any) { - throw new Error(e) + } catch (e: unknown) { + throw new Error(String(e)) } } - // An instance of Connection will only change chain id if provider is changed. - chainId = async (): Promise => { - if (this._chainID) { - return this._chainID - } - // Reference: https://eth.wiki/json-rpc/API#net_version - const response = await this.rpcCaller.call('net_version', []) - const chainID = parseInt(response.result.toString(), 10) - this._chainID = chainID - return chainID - } - - getTransactionCount = async (address: Address): Promise => { - // Reference: https://eth.wiki/json-rpc/API#eth_gettransactioncount - const response = await this.rpcCaller.call('eth_getTransactionCount', [address, 'pending']) - - return hexToNumber(response.result)! - } - - nonce = async (address: Address): Promise => { - return this.getTransactionCount(address) - } - - coinbase = async (): Promise => { - // Reference: https://eth.wiki/json-rpc/API#eth_coinbase - const response = await this.rpcCaller.call('eth_coinbase', []) - return response.result.toString() - } - gasPrice = async (feeCurrency?: Address): Promise => { - // Required otherwise is not backward compatible const parameter = feeCurrency ? [feeCurrency] : [] - // Reference: https://eth.wiki/json-rpc/API#eth_gasprice - const response = await this.rpcCaller.call('eth_gasPrice', parameter) - const gasPriceInHex = response.result.toString() - return gasPriceInHex + const result = await this._viemClient.request({ + method: 'eth_gasPrice', + params: parameter as any, + }) + return (result as string).toString() } getMaxPriorityFeePerGas = async (feeCurrency?: Address): Promise => { const parameter = feeCurrency ? [feeCurrency] : [] - return this.rpcCaller.call('eth_maxPriorityFeePerGas', parameter).then((rpcResponse) => { - return rpcResponse.result + const result = await this._viemClient.request({ + method: 'eth_maxPriorityFeePerGas', + params: parameter as any, }) + return result as string } - - getBlockNumber = async (): Promise => { - const response = await this.rpcCaller.call('eth_blockNumber', []) - - return hexToNumber(response.result)! - } - - private isBlockNumberHash = (blockNumber: BlockNumber) => - blockNumber instanceof String && blockNumber.indexOf('0x') === 0 - - getBlock = async (blockHashOrBlockNumber: BlockNumber, fullTxObjects = true): Promise => { - const endpoint = this.isBlockNumberHash(blockHashOrBlockNumber) - ? 'eth_getBlockByHash' // Reference: https://eth.wiki/json-rpc/API#eth_getBlockByHash - : 'eth_getBlockByNumber' // Reference: https://eth.wiki/json-rpc/API#eth_getBlockByNumber - - const response = await this.rpcCaller.call(endpoint, [ - inputBlockNumberFormatter(blockHashOrBlockNumber), - fullTxObjects, - ]) - - return outputBlockFormatter(response.result) - } - - getBlockHeader = async (blockHashOrBlockNumber: BlockNumber): Promise => { - const endpoint = this.isBlockNumberHash(blockHashOrBlockNumber) - ? 'eth_getHeaderByHash' - : 'eth_getHeaderByNumber' - - const response = await this.rpcCaller.call(endpoint, [ - inputBlockNumberFormatter(blockHashOrBlockNumber), - ]) - - return outputBlockHeaderFormatter(response.result) - } - - getBalance = async (address: Address, defaultBlock?: BlockNumber): Promise => { - // Reference: https://eth.wiki/json-rpc/API#eth_getBalance - const response = await this.rpcCaller.call('eth_getBalance', [ - inputAddressFormatter(address), - inputDefaultBlockNumberFormatter(defaultBlock), - ]) - return outputBigNumberFormatter(response.result) - } - - getTransaction = async (transactionHash: string): Promise => { - // Reference: https://eth.wiki/json-rpc/API#eth_getTransactionByHash - const response = await this.rpcCaller.call('eth_getTransactionByHash', [ - ensureLeading0x(transactionHash), - ]) - return outputCeloTxFormatter(response.result) - } - - getTransactionReceipt = async (txhash: string): Promise => { - // Reference: https://eth.wiki/json-rpc/API#eth_getTransactionReceipt - const response = await this.rpcCaller.call('eth_getTransactionReceipt', [ - ensureLeading0x(txhash), - ]) - - if (response.result === null) { - return null - } - - return outputCeloTxReceiptFormatter(response.result) - } - private fillTxDefaults(tx?: CeloTx): CeloTx { const defaultTx: CeloTx = { from: this.config.from, @@ -526,28 +414,42 @@ export class Connection { } } + /** + * Create a viem-native contract instance bound to this connection. + * Returns a viem GetContractReturnType with type-safe .read, .simulate, .estimateGas namespaces. + * @param abi - The ABI of the contract + * @param address - The deployed contract address + */ + getCeloContract( + abi: TAbi | AbiItem[], + address: string + ): CeloContract { + // Enrich ABI items with function/event signatures for backward compatibility + const enrichedAbi = (abi as AbiItem[]).map((item: AbiItem) => { + if (item.type === 'function' && !('signature' in item)) { + const sig = `${item.name}(${(item.inputs || []).map((i: AbiInput) => i.type).join(',')})` + return { ...item, signature: toFunctionHash(sig).slice(0, 10) } + } + if (item.type === 'event' && !('signature' in item)) { + const sig = `${item.name}(${(item.inputs || []).map((i: AbiInput) => i.type).join(',')})` + return { ...item, signature: toEventHash(sig) } + } + return item + }) + return createCeloContract( + enrichedAbi as unknown as TAbi, + address as `0x${string}`, + this._viemClient, + this.walletClient, + () => this.config.from, + () => this._viemClient.getChainId() + ) + } + stop() { - assertIsCeloProvider(this.web3.currentProvider) - this.web3.currentProvider.stop() + assertIsCeloProvider(this._provider) + this._provider.stop() } } const addBufferToBaseFee = (gasPrice: bigint) => (gasPrice * BigInt(120)) / BigInt(100) - -function isEmpty(value: string | undefined | number | BN | bigint): value is undefined { - return ( - value === 0 || - value === undefined || - value === null || - value === '0' || - value === BigInt(0) || - (typeof value === 'string' && - (value.toLowerCase() === '0x' || value.toLowerCase() === '0x0')) || - Web3.utils.toBN(value.toString(10)).eq(Web3.utils.toBN(0)) - ) -} -export function isPresent( - value: string | undefined | number | BN | bigint -): value is string | number | BN | bigint { - return !isEmpty(value) -} diff --git a/packages/sdk/connect/src/contract-types.ts b/packages/sdk/connect/src/contract-types.ts new file mode 100644 index 0000000000..5ca75bf530 --- /dev/null +++ b/packages/sdk/connect/src/contract-types.ts @@ -0,0 +1,166 @@ +import { + type GetContractReturnType, + type PublicClient, + type WalletClient, + defineChain, + getContract, +} from 'viem' + +/** + * Viem-native contract type for Celo contracts. + * Replaces the custom ViemContract interface with viem's native GetContractReturnType. + * Provides type-safe `.read`, `.write`, `.simulate`, `.estimateGas` namespaces + * when a const-typed ABI is provided. + */ +export type CeloContract = + GetContractReturnType + +/** + * Wrap the `.write` proxy from viem's getContract so that CeloTx-style + * `{ from }` overrides are mapped to viem's `{ account }`, a dynamic + * default account is injected when neither is provided, and the `chain` + * is resolved from the connected RPC to satisfy viem's chain validation. + */ +function wrapWriteWithAccountMapping( + write: any, + estimateGasNs: any, + getDefaultAccount?: () => string | undefined, + getChainId?: () => Promise +): any { + let chainCache: ReturnType | undefined + + return new Proxy(write, { + get(target: any, prop: string | symbol, receiver: any) { + const method = Reflect.get(target, prop, receiver) + if (typeof method !== 'function') return method + return async (...args: any[]) => { + const lastIdx = args.length - 1 + const lastArg = lastIdx >= 0 ? args[lastIdx] : undefined + const isOverrides = + lastArg != null && typeof lastArg === 'object' && !Array.isArray(lastArg) + + // Map CeloTx 'from' -> viem 'account' + if (isOverrides && lastArg.from && !lastArg.account) { + args[lastIdx] = { ...lastArg, account: lastArg.from } + delete args[lastIdx].from + } + + // Inject default account when no account is present + const currentOverrides = isOverrides ? args[lastIdx] : undefined + if (!currentOverrides?.account && getDefaultAccount) { + const defaultAccount = getDefaultAccount() + if (defaultAccount) { + if (isOverrides) { + args[lastIdx] = { ...args[lastIdx], account: defaultAccount } + } else if (lastIdx >= 0 && args[lastIdx] == null) { + args[lastIdx] = { account: defaultAccount } + } else { + args.push({ account: defaultAccount }) + } + } + } + + // Inject chain from RPC so viem's chain validation passes + if (getChainId) { + if (!chainCache) { + const id = await getChainId() + chainCache = defineChain({ + id, + name: 'celo', + nativeCurrency: { name: 'CELO', symbol: 'CELO', decimals: 18 }, + rpcUrls: { default: { http: [] } }, + }) + } + // Ensure chain is in the last overrides object + const oIdx = args.length - 1 + const oArg = oIdx >= 0 ? args[oIdx] : undefined + if (oArg && typeof oArg === 'object' && !Array.isArray(oArg)) { + if (!oArg.chain) { + args[oIdx] = { ...oArg, chain: chainCache } + } + } else { + args.push({ chain: chainCache }) + } + } + + // Pre-flight gas estimation to catch reverts before sending the tx. + // Strip `gas` from estimation args — estimation determines gas, it shouldn't receive a gas limit. + if (estimateGasNs && typeof estimateGasNs[prop as string] === 'function') { + const estArgs = [...args] + const estLastIdx = estArgs.length - 1 + const estLast = estLastIdx >= 0 ? estArgs[estLastIdx] : undefined + if ( + estLast && + typeof estLast === 'object' && + !Array.isArray(estLast) && + 'gas' in estLast + ) { + const { gas, ...rest } = estLast + estArgs[estLastIdx] = rest + } + await estimateGasNs[prop as string](...estArgs) + } + + // Strip gas: 0 from write args — let viem estimate gas normally + { + const wLastIdx = args.length - 1 + const wLast = wLastIdx >= 0 ? args[wLastIdx] : undefined + if ( + wLast && + typeof wLast === 'object' && + !Array.isArray(wLast) && + 'gas' in wLast && + !wLast.gas + ) { + const { gas, ...rest } = wLast + args[wLastIdx] = rest + } + } + + return method(...args) + } + }, + }) +} + +/** + * Create a viem contract instance for a Celo contract. + * Direct replacement for Connection.getViemContract(). + * + * @param getDefaultAccount - optional callback returning the current default + * account address (e.g. Connection.defaultAccount). Evaluated lazily on each + * `.write` call so it picks up runtime changes. + * @param getChainId - optional async callback returning the chain ID of the + * connected RPC. Used to satisfy viem's chain validation on write calls. + */ +export function createCeloContract( + abi: TAbi, + address: `0x${string}`, + publicClient: PublicClient, + walletClient?: WalletClient, + getDefaultAccount?: () => string | undefined, + getChainId?: () => Promise +): CeloContract { + const contract: any = walletClient + ? getContract({ + abi, + address, + client: { public: publicClient, wallet: walletClient }, + }) + : getContract({ abi, address, client: publicClient }) + + // Wrap .write to handle CeloTx from -> viem account mapping + if (contract.write) { + return { + ...contract, + write: wrapWriteWithAccountMapping( + contract.write, + contract.estimateGas, + getDefaultAccount, + getChainId + ), + } as CeloContract + } + + return contract as CeloContract +} diff --git a/packages/sdk/connect/src/index.ts b/packages/sdk/connect/src/index.ts index 9011ff5a98..4af7df68f5 100644 --- a/packages/sdk/connect/src/index.ts +++ b/packages/sdk/connect/src/index.ts @@ -1,11 +1,10 @@ export * from './abi-types' export * from './connection' export * from './types' +export * from './contract-types' export * from './utils/abi-utils' -export * from './utils/celo-transaction-object' -export * from './utils/rpc-caller' -export * from './utils/tx-result' export * from './wallet' +export * from './wallet-adapter' // still used in some cases export const PROXY_ADMIN_ADDRESS = '0x4200000000000000000000000000000000000018' diff --git a/packages/sdk/connect/src/types.ts b/packages/sdk/connect/src/types.ts index 519349a7bd..84dcc2c8d5 100644 --- a/packages/sdk/connect/src/types.ts +++ b/packages/sdk/connect/src/types.ts @@ -1,23 +1,24 @@ +import type { EIP1193RequestFn } from 'viem' import { StrongAddress } from '@celo/base' -import Web3 from 'web3' -import { - AccessList, - PromiEvent, - Transaction, - TransactionConfig, - TransactionReceipt, -} from 'web3-core' -import { Contract } from 'web3-eth-contract' export type Address = string export type Hex = `0x${string}` export interface CeloParams { feeCurrency: StrongAddress - maxFeeInFeeCurrency?: Hex | string | bigint | ReturnType + maxFeeInFeeCurrency?: Hex | string | bigint } export type AccessListRaw = [string, string[]][] +/** EIP-2930 access list entry */ +export interface AccessListEntry { + address: string + storageKeys: string[] +} + +/** EIP-2930 access list */ +export type AccessList = AccessListEntry[] + export type HexOrMissing = Hex | undefined export interface FormattedCeloTx { chainId: number @@ -36,22 +37,82 @@ export interface FormattedCeloTx { type: TransactionTypes } -export type CeloTx = TransactionConfig & - Partial & { accessList?: AccessList; type?: TransactionTypes } +/** Transaction configuration */ +export interface CeloTx extends Partial { + from?: string + to?: string + value?: number | string | bigint + gas?: number | string | bigint + gasPrice?: number | string | bigint + maxFeePerGas?: number | string | bigint + maxPriorityFeePerGas?: number | string | bigint + data?: string + nonce?: number + chainId?: number + chain?: string + hardfork?: string + common?: Record + accessList?: AccessList + type?: TransactionTypes +} + export type WithSig = T & { v: number; s: string; r: string; yParity: 0 | 1 } export type CeloTxWithSig = WithSig -export interface CeloTxObject { - arguments: any[] - call(tx?: CeloTx): Promise - send(tx?: CeloTx): PromiEvent - estimateGas(tx?: CeloTx): Promise - encodeABI(): string - _parent: Contract -} -export { BlockNumber, EventLog, Log, PromiEvent, Sign } from 'web3-core' -export { Block, BlockHeader, Syncing } from 'web3-eth' -export { Contract, ContractSendMethod, PastEventOptions } from 'web3-eth-contract' +/** + * Minimal contract shape needed for tx object creation. + * CeloContract (GetContractReturnType) satisfies this interface. + * @internal + */ +export interface ContractRef { + readonly abi: readonly unknown[] + readonly address: `0x${string}` +} + +/** Block number can be a number, hex string, or named tag */ +export type BlockNumber = string | number + +/** Event log entry */ +export interface EventLog { + event: string + address: string + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- decoded event values have dynamic types based on ABI + returnValues: Record + logIndex: number + transactionIndex: number + transactionHash: string + blockHash: string + blockNumber: number + raw?: { data: string; topics: string[] } +} + +/** Block header */ +export interface BlockHeader { + number: number + hash: string + parentHash: string + nonce: string + sha3Uncles: string + logsBloom: string + transactionsRoot: string + stateRoot: string + receiptsRoot: string + miner: string + extraData: string + gasLimit: number + gasUsed: number + timestamp: number | string + baseFeePerGas?: number | string + size?: number +} + +/** PastEventOptions - retained for backward compatibility */ +export interface PastEventOptions { + filter?: Record + fromBlock?: BlockNumber + toBlock?: BlockNumber + topics?: string[] +} export type TransactionTypes = 'ethereum-legacy' | 'eip1559' | 'cip42' | 'cip64' | 'cip66' @@ -99,47 +160,32 @@ export interface EncodedTransaction { tx: EthereumLegacyTXProperties | EIP1559TXProperties | CIP64TXProperties | CIP66TXProperties } -export type CeloTxPending = Transaction & Partial -export type CeloTxReceipt = TransactionReceipt & Partial - -export type Callback = (error: Error | null, result?: T) => void - -export interface JsonRpcResponse { - jsonrpc: string - id: string | number - result?: any - error?: { - readonly code?: number - readonly data?: unknown - readonly message: string - } -} - -export interface JsonRpcPayload { - jsonrpc: string - method: string - params: any[] - id?: string | number +/** Pending transaction */ +export interface CeloTxPending extends Partial { + hash: string + nonce: number + blockHash: string | null + blockNumber: number | null + transactionIndex: number | null + from: string + to: string | null + value: string + gasPrice?: string + maxFeePerGas?: string + maxPriorityFeePerGas?: string + gas: number + input: string + v?: string + r?: string + s?: string } +/** + * EIP-1193 compliant provider interface. + * Uses viem's strongly-typed EIP1193RequestFn for full type safety. + */ export interface Provider { - send( - payload: JsonRpcPayload, - callback: (error: Error | null, result?: JsonRpcResponse) => void - ): void -} - -export interface Error { - readonly code?: number - readonly data?: unknown - readonly message: string -} - -export interface HttpProvider { - send( - payload: JsonRpcPayload, - callback: (error: Error | null, result?: JsonRpcResponse) => void - ): void + request: EIP1193RequestFn } export interface RLPEncodedTx { @@ -147,13 +193,3 @@ export interface RLPEncodedTx { rlpEncode: Hex type: TransactionTypes } - -// Based on https://eips.ethereum.org/EIPS/eip-1193 -export interface Eip1193RequestArguments { - readonly method: string - readonly params?: readonly unknown[] | object -} - -export interface Eip1193Provider { - request(args: Eip1193RequestArguments): Promise -} diff --git a/packages/sdk/connect/src/utils/abi-utils.ts b/packages/sdk/connect/src/utils/abi-utils.ts index e6bb60031d..85324ab538 100644 --- a/packages/sdk/connect/src/utils/abi-utils.ts +++ b/packages/sdk/connect/src/utils/abi-utils.ts @@ -1,5 +1,7 @@ import { ensureLeading0x } from '@celo/base/lib/address' -import { AbiCoder, ABIDefinition, AbiItem, DecodedParamsObject } from '../abi-types' +import { decodeAbiParameters, type AbiParameter } from 'viem' +import { ABIDefinition, AbiInput, AbiItem, DecodedParamsObject } from '../abi-types' +import { bigintToString } from '../viem-abi-coder' /** @internal */ export const getAbiByName = (abi: AbiItem[], methodName: string) => @@ -95,5 +97,29 @@ export const signatureToAbiDefinition = (fnSignature: string): ABIDefinition => } /** @internal */ -export const decodeStringParameter = (ethAbi: AbiCoder, str: string) => - ethAbi.decodeParameter('string', ensureLeading0x(str)) +export const decodeStringParameter = (str: string): string => { + const hex = ensureLeading0x(str) as `0x${string}` + const result = decodeAbiParameters([{ type: 'string' } as AbiParameter], hex) + return result[0] as string +} + +/** @internal */ +export const decodeParametersToObject = ( + types: readonly (string | AbiInput)[], + hex: string +): DecodedParamsObject => { + const abiParams = types.map((type) => + typeof type === 'string' ? ({ type } as AbiParameter) : (type as AbiParameter) + ) + const hexPrefixed = (hex.startsWith('0x') ? hex : `0x${hex}`) as `0x${string}` + const result = decodeAbiParameters(abiParams, hexPrefixed) + const output: DecodedParamsObject = { __length__: result.length } + for (let i = 0; i < result.length; i++) { + const val = bigintToString(result[i]) + output[i] = val + if (abiParams[i].name) { + output[abiParams[i].name!] = val + } + } + return output +} diff --git a/packages/sdk/connect/src/utils/celo-transaction-object.ts b/packages/sdk/connect/src/utils/celo-transaction-object.ts deleted file mode 100644 index b71948c2ca..0000000000 --- a/packages/sdk/connect/src/utils/celo-transaction-object.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Connection } from '../connection' -import { CeloTx, CeloTxObject, CeloTxReceipt } from '../types' -import { TransactionResult } from './tx-result' - -export type CeloTransactionParams = Omit - -export function toTransactionObject( - connection: Connection, - txo: CeloTxObject, - defaultParams?: CeloTransactionParams -): CeloTransactionObject { - return new CeloTransactionObject(connection, txo, defaultParams) -} - -export class CeloTransactionObject { - constructor( - private connection: Connection, - readonly txo: CeloTxObject, - readonly defaultParams?: CeloTransactionParams - ) {} - - /** send the transaction to the chain */ - send = (params?: CeloTransactionParams): Promise => { - return this.connection.sendTransactionObject(this.txo, { ...this.defaultParams, ...params }) - } - - /** send the transaction and waits for the receipt */ - sendAndWaitForReceipt = (params?: CeloTransactionParams): Promise => - this.send(params).then((result) => result.waitReceipt()) -} diff --git a/packages/sdk/connect/src/utils/formatter.test.ts b/packages/sdk/connect/src/utils/formatter.test.ts index 8051f79037..07feb2a724 100644 --- a/packages/sdk/connect/src/utils/formatter.test.ts +++ b/packages/sdk/connect/src/utils/formatter.test.ts @@ -1,5 +1,5 @@ import { CeloTx } from '../types' -import { inputAccessListFormatter, inputCeloTxFormatter, outputCeloTxFormatter } from './formatter' +import { inputAccessListFormatter, inputCeloTxFormatter } from './formatter' describe('inputAccessListFormatter', () => { test('with valid accessList', () => { @@ -160,163 +160,3 @@ describe('inputCeloTxFormatter', () => { }) }) }) - -describe('outputCeloTxFormatter', () => { - const base = { - nonce: '0x4', - data: '0x', - input: '0x3454645634534', - from: '0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe', - to: '0x11f4d0a3c12e86b4b5f39b213f7e19d048276dae', - value: '0x3e8', - gas: '0x3e8', - transactionIndex: '0x1', - blockNumber: '0x3e8', - blockHash: '0xc9b9cdc2092a9d6589d96662b1fd6949611163fb3910cf8a173cd060f17702f9', - } - describe('with blockNumber', () => { - test('when valid', () => { - expect(outputCeloTxFormatter({ ...base, blockNumber: '0x1' })).toMatchInlineSnapshot(` - { - "blockHash": "0xc9b9cdc2092a9d6589d96662b1fd6949611163fb3910cf8a173cd060f17702f9", - "blockNumber": 1, - "data": "0x", - "from": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "gas": 1000, - "input": "0x3454645634534", - "nonce": 4, - "to": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "transactionIndex": 1, - "value": "1000", - } - `) - }) - test('when invalid', () => { - expect(outputCeloTxFormatter({ ...base, blockNumber: null })).toMatchInlineSnapshot(` - { - "blockHash": "0xc9b9cdc2092a9d6589d96662b1fd6949611163fb3910cf8a173cd060f17702f9", - "blockNumber": null, - "data": "0x", - "from": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "gas": 1000, - "input": "0x3454645634534", - "nonce": 4, - "to": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "transactionIndex": 1, - "value": "1000", - } - `) - }) - }) - describe('with valid celo-legacy tx', () => { - const legacy = { - ...base, - gasPrice: '0x3e8', - } - test('when valid', () => { - expect(outputCeloTxFormatter(legacy)).toMatchInlineSnapshot(` - { - "blockHash": "0xc9b9cdc2092a9d6589d96662b1fd6949611163fb3910cf8a173cd060f17702f9", - "blockNumber": 1000, - "data": "0x", - "from": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "gas": 1000, - "gasPrice": "1000", - "input": "0x3454645634534", - "nonce": 4, - "to": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "transactionIndex": 1, - "value": "1000", - } - `) - }) - }) - describe('with valid cip42 tx', () => { - const cip42 = { - ...base, - gateWayFee: '0x3e8', - feeCurrency: '0x11f4d0a3c12e86b4b5f39b213f7e19d048276dae', - maxFeePerGas: '0x3e8', - maxPriorityFeePerGas: '0x3e8', - } - test('when valid', () => { - expect(outputCeloTxFormatter(cip42)).toMatchInlineSnapshot(` - { - "blockHash": "0xc9b9cdc2092a9d6589d96662b1fd6949611163fb3910cf8a173cd060f17702f9", - "blockNumber": 1000, - "data": "0x", - "feeCurrency": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "from": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "gas": 1000, - "gateWayFee": "0x3e8", - "input": "0x3454645634534", - "maxFeePerGas": "1000", - "maxPriorityFeePerGas": "1000", - "nonce": 4, - "to": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "transactionIndex": 1, - "value": "1000", - } - `) - }) - }) - describe('with valid eip1559 tx', () => { - const eip1559 = { - ...base, - maxFeePerGas: '0x3e8', - maxPriorityFeePerGas: '0x3e8', - } - test('when valid', () => { - expect(outputCeloTxFormatter(eip1559)).toMatchInlineSnapshot(` - { - "blockHash": "0xc9b9cdc2092a9d6589d96662b1fd6949611163fb3910cf8a173cd060f17702f9", - "blockNumber": 1000, - "data": "0x", - "from": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "gas": 1000, - "input": "0x3454645634534", - "maxFeePerGas": "1000", - "maxPriorityFeePerGas": "1000", - "nonce": 4, - "to": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "transactionIndex": 1, - "value": "1000", - } - `) - }) - }) - describe('when properties are missing', () => { - test('without from', () => { - expect(outputCeloTxFormatter({ ...base, from: null })).toMatchInlineSnapshot(` - { - "blockHash": "0xc9b9cdc2092a9d6589d96662b1fd6949611163fb3910cf8a173cd060f17702f9", - "blockNumber": 1000, - "data": "0x", - "from": null, - "gas": 1000, - "input": "0x3454645634534", - "nonce": 4, - "to": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "transactionIndex": 1, - "value": "1000", - } - `) - }) - test('without to', () => { - expect(outputCeloTxFormatter({ ...base, to: null })).toMatchInlineSnapshot(` - { - "blockHash": "0xc9b9cdc2092a9d6589d96662b1fd6949611163fb3910cf8a173cd060f17702f9", - "blockNumber": 1000, - "data": "0x", - "from": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", - "gas": 1000, - "input": "0x3454645634534", - "nonce": 4, - "to": null, - "transactionIndex": 1, - "value": "1000", - } - `) - }) - }) -}) diff --git a/packages/sdk/connect/src/utils/formatter.ts b/packages/sdk/connect/src/utils/formatter.ts index 15f5ec64b9..67587845c2 100644 --- a/packages/sdk/connect/src/utils/formatter.ts +++ b/packages/sdk/connect/src/utils/formatter.ts @@ -1,21 +1,7 @@ -import { ensureLeading0x, StrongAddress, trimLeading0x } from '@celo/base/lib/address' -import { isValidAddress, toChecksumAddress } from '@celo/utils/lib/address' -import { sha3 } from '@celo/utils/lib/solidity' -import BigNumber from 'bignumber.js' +import { ensureLeading0x, StrongAddress } from '@celo/base/lib/address' +import { isValidAddress } from '@celo/utils/lib/address' import { encode } from 'utf8' -import { AccessList } from 'web3-core' -import { - AccessListRaw, - Block, - BlockHeader, - BlockNumber, - CeloTx, - CeloTxPending, - CeloTxReceipt, - FormattedCeloTx, - Hex, - Log, -} from '../types' +import { AccessList, AccessListRaw, BlockNumber, CeloTx, FormattedCeloTx, Hex } from '../types' /** * Formats the input of a transaction and converts all values to HEX @@ -44,7 +30,7 @@ export function inputCeloTxFormatter(tx: CeloTx): FormattedCeloTx { formattedTX.from = inputAddressFormatter(from?.toString()) formattedTX.to = inputAddressFormatter(to) - formattedTX.gas = numberToHex(gas) + formattedTX.gas = numberToHex(gas != null ? gas.toString() : undefined) formattedTX.value = numberToHex(value?.toString()) formattedTX.nonce = numberToHex(nonce?.toString()) @@ -79,73 +65,6 @@ export function inputCeloTxFormatter(tx: CeloTx): FormattedCeloTx { return formattedTX as FormattedCeloTx } -export function outputCeloTxFormatter(tx: any): CeloTxPending { - if (tx.blockNumber !== null) { - tx.blockNumber = hexToNumber(tx.blockNumber) - } - if (tx.transactionIndex !== null) { - tx.transactionIndex = hexToNumber(tx.transactionIndex) - } - tx.nonce = hexToNumber(tx.nonce) - tx.gas = hexToNumber(tx.gas) - tx.value = outputBigNumberFormatter(tx.value) - - if (tx.gasPrice) { - tx.gasPrice = outputBigNumberFormatter(tx.gasPrice) - } - if (tx.maxFeePerGas) { - tx.maxFeePerGas = outputBigNumberFormatter(tx.maxFeePerGas) - } - if (tx.maxPriorityFeePerGas) { - tx.maxPriorityFeePerGas = outputBigNumberFormatter(tx.maxPriorityFeePerGas) - } - - tx.to = - tx.to && isValidAddress(tx.to) - ? // tx.to could be `0x0` or `null` while contract creation - (tx.to = toChecksumAddress(tx.to)) - : null // set to `null` if invalid address - - if (tx.from) { - tx.from = toChecksumAddress(tx.from) - } - - if (tx.feeCurrency) { - tx.feeCurrency = toChecksumAddress(tx.feeCurrency) - } - - return tx as CeloTxPending -} - -export function outputCeloTxReceiptFormatter(receipt: any): CeloTxReceipt { - if (typeof receipt !== 'object') { - throw new Error('Received receipt is invalid: ' + receipt) - } - - if (receipt.blockNumber !== null) { - receipt.blockNumber = hexToNumber(receipt.blockNumber) - } - if (receipt.transactionIndex !== null) { - receipt.transactionIndex = hexToNumber(receipt.transactionIndex) - } - receipt.cumulativeGasUsed = hexToNumber(receipt.cumulativeGasUsed) - receipt.gasUsed = hexToNumber(receipt.gasUsed) - - if (Array.isArray(receipt.logs)) { - receipt.logs = receipt.logs.map(outputLogFormatter) - } - - if (receipt.contractAddress) { - receipt.contractAddress = toChecksumAddress(receipt.contractAddress) - } - - if (typeof receipt.status !== 'undefined' && receipt.status !== null) { - receipt.status = Boolean(parseInt(trimLeading0x(receipt.status), 10)) - } - - return receipt as CeloTxReceipt -} - export function inputDefaultBlockNumberFormatter(blockNumber: BlockNumber | null | undefined) { if (blockNumber == null) { blockNumber = 'latest' @@ -172,88 +91,13 @@ export function inputBlockNumberFormatter(blockNumber: BlockNumber) { : numberToHex(blockNumber.toString())! } -// TODO prune after gingerbread hardfork -export function outputBlockHeaderFormatter(blockHeader: any): BlockHeader { - // transform to number - blockHeader.gasLimit = hexToNumber(blockHeader.gasLimit) - blockHeader.gasUsed = hexToNumber(blockHeader.gasUsed) - blockHeader.size = hexToNumber(blockHeader.size) - blockHeader.timestamp = hexToNumber(blockHeader.timestamp) - if (blockHeader.number !== null) { - blockHeader.number = hexToNumber(blockHeader.number) - } - if (blockHeader.miner) { - blockHeader.miner = toChecksumAddress(blockHeader.miner) - } - return blockHeader as BlockHeader -} - -export function outputBlockFormatter(block: any): Block { - block = outputBlockHeaderFormatter(block) - - if (block.difficulty) { - block.difficulty = outputBigNumberFormatter(block.difficulty) - } - if (block.totalDifficulty) { - block.totalDifficulty = outputBigNumberFormatter(block.totalDifficulty) - } - - if (Array.isArray(block.transactions)) { - block.transactions.forEach((item: any) => { - if (typeof item !== 'string' && !(item instanceof String)) { - return outputCeloTxFormatter(item) - } - }) - } - - return block as Block -} - export function hexToNumber(hex?: string): number | undefined { if (hex) { - return new BigNumber(hex).toNumber() + return Number(BigInt(hex)) } return undefined } -export function outputLogFormatter(log: any): Log { - // generate a custom log id - if ( - typeof log.blockHash === 'string' && - typeof log.transactionHash === 'string' && - typeof log.logIndex === 'string' - ) { - const shaId = sha3( - trimLeading0x(log.blockHash) + - trimLeading0x(log.transactionHash) + - trimLeading0x(log.logIndex) - )! - log.id = 'log_' + trimLeading0x(shaId).substring(0, 8) - } else if (!log.id) { - log.id = null - } - - if (log.blockNumber !== null) { - log.blockNumber = hexToNumber(log.blockNumber) - } - if (log.transactionIndex !== null) { - log.transactionIndex = hexToNumber(log.transactionIndex) - } - if (log.logIndex !== null) { - log.logIndex = hexToNumber(log.logIndex) - } - - if (log.address) { - log.address = toChecksumAddress(log.address) - } - - return log as Log -} - -export function outputBigNumberFormatter(hex: string): string { - return new BigNumber(hex).toString(10) -} - function isHash(value: string) { return isHex(value) && value.length === 32 } @@ -274,7 +118,7 @@ export function parseAccessList(accessListRaw: AccessListRaw | undefined): Acces if (isHash(key)) { return key } else { - // same behavior as web3 + // validate storage key format throw new Error(`Invalid storage key: ${key}`) } }), @@ -349,12 +193,14 @@ function isHexStrict(hex: string): boolean { return /^(-)?0x[0-9a-f]*$/i.test(hex) } -function numberToHex(value?: BigNumber.Value): Hex | undefined { +function numberToHex(value?: string | number | bigint): Hex | undefined { if (value) { - const numberValue = new BigNumber(value) - const result = ensureLeading0x(new BigNumber(value).toString(16)) - // Seen in web3, copied just in case - return (numberValue.lt(new BigNumber(0)) ? `-${result}` : result) as Hex + const bigValue = BigInt(value) + const zero = BigInt(0) + const result = ensureLeading0x( + bigValue < zero ? (-bigValue).toString(16) : bigValue.toString(16) + ) + return (bigValue < zero ? `-${result}` : result) as Hex } return undefined } diff --git a/packages/sdk/connect/src/utils/provider-utils.ts b/packages/sdk/connect/src/utils/provider-utils.ts index 06ede8d553..4aa649c10c 100644 --- a/packages/sdk/connect/src/utils/provider-utils.ts +++ b/packages/sdk/connect/src/utils/provider-utils.ts @@ -10,7 +10,7 @@ export function stopProvider(defaultProvider: Provider) { if (hasProperty<{ stop: () => void }>(defaultProvider, 'stop')) { defaultProvider.stop() } else { - // Close the web3 connection or the CLI hangs forever. + // Close the provider connection or the CLI hangs forever. if (hasProperty<{ connection: any }>(defaultProvider, 'connection')) { const connection = defaultProvider.connection // WS diff --git a/packages/sdk/connect/src/utils/rpc-caller.test.ts b/packages/sdk/connect/src/utils/rpc-caller.test.ts deleted file mode 100644 index 36b23833db..0000000000 --- a/packages/sdk/connect/src/utils/rpc-caller.test.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { Callback, Error, JsonRpcPayload, JsonRpcResponse, Provider } from '../types' -import { HttpRpcCaller, RpcCaller, rpcCallHandler } from './rpc-caller' - -const mockProvider: Provider = { - send: (payload: JsonRpcPayload, callback: Callback): any => { - const response: JsonRpcResponse = { - jsonrpc: payload.jsonrpc, - id: Number(payload.id), - result: { - params: payload.params, - method: payload.method, - }, - } - if (payload.method === 'mock_error_method') { - callback(new Error(payload.method)) - return - } else if (payload.method === 'mock_response_error_method') { - response.error = { - code: -32000, - message: 'foobar', - } - } - - callback(null, response) - }, -} - -describe('RPC Caller class', () => { - let rpcCaller: RpcCaller - - beforeEach(async () => { - rpcCaller = new HttpRpcCaller(mockProvider) - }) - - describe('when calling the provider', () => { - it('populates the payload id', async () => { - const result = await rpcCaller.call('mock_method', ['mock_param']) - expect(result.id).not.toBeUndefined() - expect(result.id).not.toBe(0) - }) - - it('populates the payload jsonrpc', async () => { - const result = await rpcCaller.call('mock_method', ['mock_param']) - expect(result.jsonrpc).not.toBeUndefined() - expect(result.jsonrpc).toBe('2.0') - }) - }) - - describe('when the provider fails', () => { - it('raises an error', async () => { - await expect(rpcCaller.call('mock_error_method', ['mock_param'])).rejects.toThrowError() - }) - }) - - describe('when the result contains an error', () => { - it('raises an error with the error message', async () => { - await expect( - rpcCaller.call('mock_response_error_method', ['mock_param']) - ).rejects.toThrowError('foobar') - }) - }) -}) - -function handleMock(payload: JsonRpcPayload): Promise { - if (payload.method === 'fail_not_promise') { - throw Error('fail') - } - return new Promise((resolve, reject) => { - if (payload.method === 'fail_promise') { - reject(Error('fail promise')) - } else { - resolve('mock_response') - } - }) -} - -describe('rpcCallHandler function', () => { - let payload: JsonRpcPayload - - beforeEach(async () => { - payload = { - jsonrpc: '2.0', - id: 1, - method: 'test', - params: [], - } - }) - - describe('when the handle promise fails', () => { - it('the callback receives a response with the error', (done) => { - const callback = (_error: Error | null, response?: JsonRpcResponse) => { - try { - expect((response as any).error.code).toBe(-32000) - done() - } catch (error) { - done(error) - } - } - expect.assertions(1) - payload.method = 'fail_promise' - rpcCallHandler(payload, handleMock, callback) - }) - }) - - describe('when the handle fails (not the promise)', () => { - it('the callback receives a response with the error', (done) => { - const callback = (_error: Error | null, response?: JsonRpcResponse) => { - try { - expect(response).toBeUndefined() - expect(_error).not.toBeNull() - done() - } catch (error) { - done(error) - } - } - expect.assertions(2) - payload.method = 'fail_not_promise' - rpcCallHandler(payload, handleMock, callback) - }) - }) - - describe('when the handle succeeds', () => { - it('the callback receives a response with a result', (done) => { - const callback = (_error: Error | null, response?: JsonRpcResponse) => { - try { - expect((response as any).error).toBeUndefined() - expect(response!.result).toBe('mock_response') - done() - } catch (error) { - done(error) - } - } - expect.assertions(2) - rpcCallHandler(payload, handleMock, callback) - }) - }) -}) diff --git a/packages/sdk/connect/src/utils/rpc-caller.ts b/packages/sdk/connect/src/utils/rpc-caller.ts deleted file mode 100644 index d8c4395723..0000000000 --- a/packages/sdk/connect/src/utils/rpc-caller.ts +++ /dev/null @@ -1,129 +0,0 @@ -import debugFactory from 'debug' -import { Callback, Error, HttpProvider, JsonRpcPayload, JsonRpcResponse } from '../types' - -const debugRpcPayload = debugFactory('rpc:payload') -const debugRpcResponse = debugFactory('rpc:response') -const debugRpcCallback = debugFactory('rpc:callback:exception') - -export function rpcCallHandler( - payload: JsonRpcPayload, - handler: (p: JsonRpcPayload) => Promise, - callback: Callback -) { - try { - handler(payload) - .then( - (result) => { - callback(null, toRPCResponse(payload, result)) - }, - // Called if the Promise of the 'handler' fails - (error) => { - callback(error, toRPCResponse(payload, null, error)) - } - ) - .catch((error) => { - // Called if the 'callback' fails - debugRpcCallback('Callback for handling the JsonRpcResponse fails') - debugRpcCallback('%O', error) - }) - } catch (error) { - // Called if the handler fails before making the promise - callback(error instanceof Error ? error : null) - } -} - -// Ported from: https://github.com/MetaMask/provider-engine/blob/master/util/random-id.js -export function getRandomId(): number { - const extraDigits = 3 - const baseTen = 10 - // 13 time digits - const datePart = new Date().getTime() * Math.pow(baseTen, extraDigits) - // 3 random digits - const extraPart = Math.floor(Math.random() * Math.pow(baseTen, extraDigits)) - // 16 digits - return datePart + extraPart -} - -function toRPCResponse(payload: JsonRpcPayload, result: any, error?: Error): JsonRpcResponse { - const response: JsonRpcResponse = { - id: Number(payload.id), - jsonrpc: payload.jsonrpc, - result, - } - - if (error != null) { - response.error = { - message: error.message || error.toString(), - code: -32000, - } - } - return response -} - -export interface RpcCaller { - call: (method: string, params: any[]) => Promise - send: ( - payload: JsonRpcPayload, - callback: (error: Error | null, result?: JsonRpcResponse) => void - ) => void -} - -export class HttpRpcCaller implements RpcCaller { - constructor( - readonly httpProvider: HttpProvider, - readonly jsonrpcVersion: string = '2.0' - ) {} - - public async call(method: string, params: any[]): Promise { - return new Promise((resolve, reject) => { - const payload: JsonRpcPayload = { - id: getRandomId(), - jsonrpc: this.jsonrpcVersion, - method, - params, - } - this.send(payload, (err: any, response?: JsonRpcResponse) => { - if (err != null || !response) { - reject(err) - } else { - resolve(response) - } - }) - }) - } - - public send( - payload: JsonRpcPayload, - callback: (error: Error | null, result?: JsonRpcResponse) => void - ): void { - debugRpcPayload('%O', payload) - - const decoratedCallback: Callback = ( - error: Error | null, - result?: JsonRpcResponse - ): void => { - let err: Error | null = null - // error could be false - if (error) { - err = error - } - debugRpcResponse('%O', result) - // The provider send call will not provide an error to the callback if - // the result itself specifies an error. Here, we extract the error in the - // result. - if ( - result && - result.error != null && - typeof result.error !== 'string' && - result.error.message != null - ) { - err = new Error(result.error.message) - } - callback(err, result) - } - - if (this.httpProvider && typeof this.httpProvider !== 'string') { - this.httpProvider.send!(payload, decoratedCallback) - } - } -} diff --git a/packages/sdk/connect/src/utils/tx-params-normalizer.test.ts b/packages/sdk/connect/src/utils/tx-params-normalizer.test.ts index c0f80bce03..413d0b6254 100644 --- a/packages/sdk/connect/src/utils/tx-params-normalizer.test.ts +++ b/packages/sdk/connect/src/utils/tx-params-normalizer.test.ts @@ -1,12 +1,18 @@ -import Web3 from 'web3' import { Connection } from '../connection' -import { Callback, CeloTx, JsonRpcPayload, JsonRpcResponse } from '../types' -import { RpcCaller } from './rpc-caller' +import { CeloTx, Provider } from '../types' import { TxParamsNormalizer } from './tx-params-normalizer' +function createMockProvider(handler: (method: string, params: any[]) => any): Provider { + return { + request: (async ({ method, params }: any) => { + return handler(method, params || []) + }) as any, + } +} + describe('TxParamsNormalizer class', () => { let populator: TxParamsNormalizer - let mockRpcCall: any + let mockRpcHandler: jest.Mock let mockGasEstimation: any const completeCeloTx: CeloTx = { nonce: 1, @@ -23,23 +29,16 @@ describe('TxParamsNormalizer class', () => { } beforeEach(() => { - mockRpcCall = jest.fn((method: string, _params: any[]): Promise => { - return new Promise((resolve, _reject) => - resolve({ - jsonrpc: '2.0', - id: 1, - result: method === 'net_version' ? '27' : '0x27', - }) - ) + mockRpcHandler = jest.fn((method: string, _params: any[]) => { + if (method === 'eth_chainId') { + // 27 in hex + return '0x1b' + } + // Default hex return for other methods + return '0x27' }) - const rpcMock: RpcCaller = { - call: mockRpcCall, - send: (_payload: JsonRpcPayload, _callback: Callback): void => { - // noop - }, - } - const connection = new Connection(new Web3('http://localhost:8545')) - connection.rpcCaller = rpcMock + const mockProvider = createMockProvider(mockRpcHandler) + const connection = new Connection(mockProvider) mockGasEstimation = jest.fn( ( _tx: CeloTx, @@ -59,8 +58,8 @@ describe('TxParamsNormalizer class', () => { celoTx.chainId = undefined const newCeloTx = await populator.populate(celoTx) expect(newCeloTx.chainId).toBe(27) - expect(mockRpcCall.mock.calls.length).toBe(1) - expect(mockRpcCall.mock.calls[0][0]).toBe('net_version') + // viemClient.getChainId() calls eth_chainId + expect(mockRpcHandler).toHaveBeenCalledWith('eth_chainId', expect.anything()) }) test('will retrieve only once the chaindId', async () => { @@ -72,8 +71,11 @@ describe('TxParamsNormalizer class', () => { const newCeloTx2 = await populator.populate(celoTx) expect(newCeloTx2.chainId).toBe(27) - expect(mockRpcCall.mock.calls.length).toBe(1) - expect(mockRpcCall.mock.calls[0][0]).toBe('net_version') + // eth_chainId should only be called once due to caching in TxParamsNormalizer + const chainIdCalls = mockRpcHandler.mock.calls.filter( + (call: any[]) => call[0] === 'eth_chainId' + ) + expect(chainIdCalls.length).toBe(1) }) test('will populate the nonce', async () => { @@ -81,8 +83,7 @@ describe('TxParamsNormalizer class', () => { celoTx.nonce = undefined const newCeloTx = await populator.populate(celoTx) expect(newCeloTx.nonce).toBe(39) // 0x27 => 39 - expect(mockRpcCall.mock.calls.length).toBe(1) - expect(mockRpcCall.mock.calls[0][0]).toBe('eth_getTransactionCount') + expect(mockRpcHandler).toHaveBeenCalledWith('eth_getTransactionCount', expect.anything()) }) test('will populate the gas', async () => { @@ -122,8 +123,8 @@ describe('TxParamsNormalizer class', () => { const newCeloTx = await populator.populate(celoTx) expect(newCeloTx.maxFeePerGas).toBe('0x2f') expect(newCeloTx.maxPriorityFeePerGas).toBe('0x27') - expect(mockRpcCall.mock.calls[0]).toEqual(['eth_gasPrice', []]) - expect(mockRpcCall.mock.calls[1]).toEqual(['eth_maxPriorityFeePerGas', []]) + expect(mockRpcHandler).toHaveBeenCalledWith('eth_gasPrice', []) + expect(mockRpcHandler).toHaveBeenCalledWith('eth_maxPriorityFeePerGas', []) }) test('will populate the maxFeePerGas and maxPriorityFeePerGas with fee currency', async () => { @@ -135,8 +136,8 @@ describe('TxParamsNormalizer class', () => { const newCeloTx = await populator.populate(celoTx) expect(newCeloTx.maxFeePerGas).toBe('0x2f') expect(newCeloTx.maxPriorityFeePerGas).toBe('0x27') - expect(mockRpcCall.mock.calls[0]).toEqual(['eth_gasPrice', ['0x1234']]) - expect(mockRpcCall.mock.calls[1]).toEqual(['eth_maxPriorityFeePerGas', []]) + expect(mockRpcHandler).toHaveBeenCalledWith('eth_gasPrice', ['0x1234']) + expect(mockRpcHandler).toHaveBeenCalledWith('eth_maxPriorityFeePerGas', []) }) }) }) diff --git a/packages/sdk/connect/src/utils/tx-params-normalizer.ts b/packages/sdk/connect/src/utils/tx-params-normalizer.ts index 77cd90655e..9bb2df524f 100644 --- a/packages/sdk/connect/src/utils/tx-params-normalizer.ts +++ b/packages/sdk/connect/src/utils/tx-params-normalizer.ts @@ -1,19 +1,6 @@ -import BigNumber from 'bignumber.js' import { Connection } from '../connection' import { CeloTx } from '../types' - -function isEmpty(value: string | undefined) { - return ( - value === undefined || - value === null || - value === '0' || - value.toLowerCase() === '0x' || - value.toLowerCase() === '0x0' - ) -} -function isPresent(value: string | undefined) { - return !isEmpty(value) -} +import { isEmpty, isPresent } from '../viem-abi-coder' export class TxParamsNormalizer { private chainId: number | null = null @@ -33,7 +20,10 @@ export class TxParamsNormalizer { }, async () => { if (txParams.nonce == null) { - return this.connection.nonce(txParams.from!.toString()) + return this.connection.viemClient.getTransactionCount({ + address: txParams.from!.toString() as `0x${string}`, + blockTag: 'pending', + }) } return txParams.nonce }, @@ -51,11 +41,10 @@ export class TxParamsNormalizer { ) { const suggestedPrice = await this.connection.gasPrice(txParams.feeCurrency) // add small buffer to suggested price like other libraries do - const priceWithRoom = new BigNumber(suggestedPrice) - .times(120) - .dividedBy(100) - .integerValue() - .toString(16) + // use ceiling division to match previous BigNumber.integerValue(ROUND_HALF_UP) behavior + const numerator = BigInt(suggestedPrice) * BigInt(120) + const denominator = BigInt(100) + const priceWithRoom = ((numerator + denominator - BigInt(1)) / denominator).toString(16) return `0x${priceWithRoom}` } return txParams.maxFeePerGas @@ -73,11 +62,7 @@ export class TxParamsNormalizer { isPresent(txParams.maxFeePerGas?.toString()) && isEmpty(txParams.maxPriorityFeePerGas?.toString()) ) { - const clientMaxPriorityFeePerGas = await this.connection.rpcCaller.call( - 'eth_maxPriorityFeePerGas', - [] - ) - txParams.maxPriorityFeePerGas = clientMaxPriorityFeePerGas.result + txParams.maxPriorityFeePerGas = await this.connection.getMaxPriorityFeePerGas() } // remove gasPrice if maxFeePerGas is set @@ -91,7 +76,7 @@ export class TxParamsNormalizer { private async getChainId(): Promise { if (this.chainId === null) { - this.chainId = await this.connection.chainId() + this.chainId = await this.connection.viemClient.getChainId() } return this.chainId } diff --git a/packages/sdk/connect/src/utils/tx-result.ts b/packages/sdk/connect/src/utils/tx-result.ts deleted file mode 100644 index be857011f1..0000000000 --- a/packages/sdk/connect/src/utils/tx-result.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Future } from '@celo/base/lib/future' -import debugFactory from 'debug' -import { CeloTxReceipt, PromiEvent } from '../types' - -const debug = debugFactory('connection:tx:result') - -/** - * Transforms a `PromiEvent` to a `TransactionResult`. - */ -export function toTxResult(pe: PromiEvent) { - return new TransactionResult(pe) -} - -/** - * Replacement interface for web3's `PromiEvent`. Instead of emiting events - * to signal different stages, eveything is exposed as a promise. Which ends - * up being nicer when doing promise/async based programming. - */ -export class TransactionResult { - private hashFuture = new Future() - private receiptFuture = new Future() - - constructor(pe: PromiEvent) { - void pe - .on('transactionHash', (hash: string) => { - debug('hash: %s', hash) - this.hashFuture.resolve(hash) - }) - .on('receipt', (receipt: CeloTxReceipt) => { - debug('receipt: %O', receipt) - this.receiptFuture.resolve(receipt) - }) - - .on('error', ((error: any, receipt: CeloTxReceipt | false) => { - if (!receipt) { - debug('send-error: %o', error) - this.hashFuture.reject(error) - } else { - debug('mining-error: %o, %O', error, receipt) - } - this.receiptFuture.reject(error) - }) as any) - } - - /** Get (& wait for) transaction hash */ - getHash() { - return this.hashFuture.wait().catch((err) => { - // if hashFuture fails => receiptFuture also fails - // we wait for it here; so not UnhandlePromise error occurrs - this.receiptFuture.wait().catch(() => { - // ignore - }) - throw err - }) - } - - /** Get (& wait for) transaction receipt */ - async waitReceipt() { - // Make sure `getHash()` promise is consumed - await this.getHash() - - return this.receiptFuture.wait() - } -} diff --git a/packages/sdk/connect/src/viem-abi-coder.test.ts b/packages/sdk/connect/src/viem-abi-coder.test.ts new file mode 100644 index 0000000000..da1a1bb675 --- /dev/null +++ b/packages/sdk/connect/src/viem-abi-coder.test.ts @@ -0,0 +1,164 @@ +import { coerceValueForType } from './viem-abi-coder' +import { + encodeAbiParameters, + decodeAbiParameters, + toFunctionHash, + toEventHash, + type AbiParameter, +} from 'viem' + +describe('viem ABI encoding/decoding', () => { + it('encodes and decodes a parameter', () => { + const encoded = encodeAbiParameters([{ type: 'uint256' }] as AbiParameter[], [BigInt(42)]) + const decoded = decodeAbiParameters([{ type: 'uint256' }] as AbiParameter[], encoded) + expect((decoded[0] as bigint).toString()).toBe('42') + }) + + it('encodes a function signature from string', () => { + const sig = toFunctionHash('transfer(address,uint256)').slice(0, 10) + expect(sig).toBe('0xa9059cbb') + }) + + it('encodes a function signature from ABI item', () => { + const sig = toFunctionHash('transfer(address,uint256)').slice(0, 10) + expect(sig).toBe('0xa9059cbb') + }) + + it('encodes an event signature', () => { + const sig = toEventHash('Transfer(address,address,uint256)') + expect(sig).toMatch(/^0x/) + expect(sig.length).toBe(66) // 0x + 64 hex chars + }) + + it('encodes and decodes multiple parameters', () => { + const encoded = encodeAbiParameters( + [{ type: 'address' }, { type: 'uint256' }] as AbiParameter[], + ['0x0000000000000000000000000000000000000001', BigInt(100)] + ) + const decoded = decodeAbiParameters( + [{ type: 'address' }, { type: 'uint256' }] as AbiParameter[], + encoded + ) + expect(decoded[0]).toBe('0x0000000000000000000000000000000000000001') + expect((decoded[1] as bigint).toString()).toBe('100') + expect(decoded.length).toBe(2) + }) +}) + +describe('#coerceValueForType - bool', () => { + it('coerces true boolean to true', () => { + expect(coerceValueForType('bool', true)).toBe(true) + }) + + it('coerces false boolean to false', () => { + expect(coerceValueForType('bool', false)).toBe(false) + }) + + it('coerces number 1 to true', () => { + expect(coerceValueForType('bool', 1)).toBe(true) + }) + + it('coerces number 0 to false', () => { + expect(coerceValueForType('bool', 0)).toBe(false) + }) + + it('coerces string "true" to true', () => { + expect(coerceValueForType('bool', 'true')).toBe(true) + }) + + it('coerces string "false" to true (non-empty string)', () => { + expect(coerceValueForType('bool', 'false')).toBe(true) + }) + + it('coerces empty string to false', () => { + expect(coerceValueForType('bool', '')).toBe(false) + }) + + it('coerces null to false', () => { + expect(coerceValueForType('bool', null)).toBe(false) + }) + + it('coerces undefined to false', () => { + expect(coerceValueForType('bool', undefined)).toBe(false) + }) +}) + +describe('#coerceValueForType - bytesN', () => { + it('does not pad exact-length hex for bytes1', () => { + const result = coerceValueForType('bytes1', '0x01') + expect(result).toBe('0x01') + }) + + it('pads short hex string for bytes2', () => { + const result = coerceValueForType('bytes2', '0x01') + expect(result).toBe('0x0100') + }) + + it('pads short hex string for bytes4', () => { + const result = coerceValueForType('bytes4', '0xdeadbeef') + expect(result).toBe('0xdeadbeef') + }) + + it('pads short hex string for bytes32', () => { + const result = coerceValueForType('bytes32', '0xaa') + expect(result).toBe('0xaa00000000000000000000000000000000000000000000000000000000000000') + }) + + it('handles hex string without 0x prefix for bytes2', () => { + const result = coerceValueForType('bytes2', '01') + expect(result).toBe('0x0100') + }) + + it('handles exact-length hex for bytes4', () => { + const result = coerceValueForType('bytes4', '0xdeadbeef') + expect(result).toBe('0xdeadbeef') + }) + + it('handles Buffer input for bytes2', () => { + const buffer = Buffer.from([0x01]) + const result = coerceValueForType('bytes2', buffer) + expect(result).toBe('0x0100') + }) + + it('handles Buffer input for bytes4', () => { + const buffer = Buffer.from([0xde, 0xad, 0xbe, 0xef]) + const result = coerceValueForType('bytes4', buffer) + expect(result).toBe('0xdeadbeef') + }) + + it('handles Uint8Array input for bytes2', () => { + const arr = new Uint8Array([0x01]) + const result = coerceValueForType('bytes2', arr) + expect(result).toBe('0x0100') + }) + + it('handles Uint8Array input for bytes32', () => { + const arr = new Uint8Array([0xaa]) + const result = coerceValueForType('bytes32', arr) + expect(result).toBe('0xaa00000000000000000000000000000000000000000000000000000000000000') + }) + + it('throws error for unsupported value type', () => { + expect(() => { + coerceValueForType('bytes1', { invalid: 'object' }) + }).toThrow() + }) +}) + +describe('viem decodeEventLog', () => { + it('decodes a basic event log', () => { + const data = encodeAbiParameters([{ type: 'uint256' }] as AbiParameter[], [BigInt(100)]) + const topics = [ + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + ] + // Basic event log encoding/decoding is tested through explorer + expect(data).toBeDefined() + expect(topics.length).toBe(2) + }) + + it('handles encoding with no indexed parameters', () => { + const data = encodeAbiParameters([{ type: 'uint256' }] as AbiParameter[], [BigInt(42)]) + expect(data).toBeDefined() + }) +}) diff --git a/packages/sdk/connect/src/viem-abi-coder.ts b/packages/sdk/connect/src/viem-abi-coder.ts new file mode 100644 index 0000000000..d0a19edeaa --- /dev/null +++ b/packages/sdk/connect/src/viem-abi-coder.ts @@ -0,0 +1,81 @@ +import { pad } from 'viem' +import { AbiInput } from './abi-types' + +/** + * Coerce a value to match the expected ABI type. + * The legacy SDK was lenient about types; viem is strict. This bridges the gap. + */ +export function coerceValueForType(type: string, value: unknown): unknown { + // bool: legacy SDK accepted numbers/strings; viem requires actual booleans + if (type === 'bool') { + if (typeof value === 'boolean') return value + return Boolean(value) + } + // bytesN (fixed-size): legacy SDK auto-padded short hex strings; viem requires exact size + const bytesMatch = type.match(/^bytes(\d+)$/) + if (bytesMatch) { + const expectedBytes = parseInt(bytesMatch[1], 10) + if (typeof value === 'string') { + const hex = value.startsWith('0x') ? value : `0x${value}` + // If the hex value is shorter than expected, right-pad with zeros + const actualBytes = (hex.length - 2) / 2 + if (actualBytes < expectedBytes) { + return pad(hex as `0x${string}`, { size: expectedBytes, dir: 'right' }) + } + return hex + } + // Buffer or Uint8Array + if (Buffer.isBuffer(value) || value instanceof Uint8Array) { + const buffer = Buffer.from(value) + const hex = `0x${buffer.toString('hex')}` as `0x${string}` + if (buffer.length < expectedBytes) { + return pad(hex, { size: expectedBytes, dir: 'right' }) + } + return hex + } + throw new Error(`Unsupported value type for ${type}: ${typeof value}`) + } + return value +} + +/** + * Coerce an array of values to match their expected ABI types. + */ +export function coerceArgsForAbi(abiInputs: readonly AbiInput[], args: unknown[]): unknown[] { + return args.map((arg, i) => { + if (i < abiInputs.length && abiInputs[i].type) { + return coerceValueForType(abiInputs[i].type, arg) + } + return arg + }) +} + +// Viem's ABI decoder returns uint/int values as bigint, while the legacy SDK returned strings. +// Downstream consumers (wrapper proxyCall transformers, CLI formatters, etc.) expect +// string values for large numbers, so we convert to preserve backward compatibility. +export function bigintToString(value: unknown): unknown { + if (typeof value === 'bigint') { + return value.toString() + } + if (Array.isArray(value)) { + return value.map(bigintToString) + } + return value +} + +export function isPresent( + value: string | undefined | number | bigint +): value is string | number | bigint { + return !isEmpty(value) +} + +export function isEmpty(value: string | undefined | number | bigint): value is undefined { + return ( + value === 0 || + value === undefined || + value === null || + value === '0' || + value === BigInt(0) || + (typeof value === 'string' && (value.toLowerCase() === '0x' || value.toLowerCase() === '0x0')) + ) +} diff --git a/packages/sdk/connect/src/wallet-adapter.ts b/packages/sdk/connect/src/wallet-adapter.ts new file mode 100644 index 0000000000..743d37e51a --- /dev/null +++ b/packages/sdk/connect/src/wallet-adapter.ts @@ -0,0 +1,80 @@ +import type { StrongAddress } from '@celo/base' +import type { EIP712TypedData } from '@celo/utils/lib/sign-typed-data-utils' +import { toHex } from 'viem' +import type { Hex, LocalAccount } from 'viem' +import { toAccount } from 'viem/accounts' +import type { CeloTransactionSerializable } from 'viem/celo' +import type { CeloTx } from './types' +import type { ReadOnlyWallet } from './wallet' + +/** + * Adapts a ReadOnlyWallet to a viem LocalAccount. + * This allows using any ReadOnlyWallet implementation (local, HSM, etc.) + * with viem's wallet client and contract write operations. + * + * @param wallet - A ReadOnlyWallet instance + * @param address - The account address to use for signing + * @returns A viem LocalAccount backed by the wallet + */ +export function readOnlyWalletToAccount( + wallet: ReadOnlyWallet, + address: StrongAddress +): LocalAccount { + return toAccount({ + address, + + async signTransaction(transaction: CeloTransactionSerializable) { + const celoTx: CeloTx = { + from: address, + to: transaction.to ?? undefined, + value: transaction.value, + data: transaction.data, + nonce: transaction.nonce, + chainId: transaction.chainId, + gas: transaction.gas, + } + + if ('maxFeePerGas' in transaction) { + celoTx.maxFeePerGas = transaction.maxFeePerGas + } + if ('maxPriorityFeePerGas' in transaction) { + celoTx.maxPriorityFeePerGas = transaction.maxPriorityFeePerGas + } + if ('gasPrice' in transaction) { + celoTx.gasPrice = transaction.gasPrice + } + if ('feeCurrency' in transaction && transaction.feeCurrency) { + celoTx.feeCurrency = transaction.feeCurrency as StrongAddress + } + if ('maxFeeInFeeCurrency' in transaction) { + celoTx.maxFeeInFeeCurrency = transaction.maxFeeInFeeCurrency as bigint + } + if ('accessList' in transaction && transaction.accessList) { + celoTx.accessList = transaction.accessList as CeloTx['accessList'] + } + + const encodedTx = await wallet.signTransaction(celoTx) + return encodedTx.raw + }, + + async signMessage({ message }) { + const data = + typeof message === 'string' + ? toHex(message) + : typeof message.raw === 'string' + ? message.raw + : toHex(message.raw) + return (await wallet.signPersonalMessage(address, data)) as Hex + }, + + async signTypedData(parameters) { + const sig = await wallet.signTypedData(address, { + types: parameters.types, + primaryType: parameters.primaryType, + domain: parameters.domain ?? {}, + message: parameters.message, + } as unknown as EIP712TypedData) + return sig as Hex + }, + }) +} diff --git a/packages/sdk/cryptographic-utils/package.json b/packages/sdk/cryptographic-utils/package.json index 85f4c204f5..b133997a8d 100644 --- a/packages/sdk/cryptographic-utils/package.json +++ b/packages/sdk/cryptographic-utils/package.json @@ -33,7 +33,6 @@ "@noble/hashes": "1.3.3", "@scure/bip32": "^1.3.3", "@scure/bip39": "^1.2.2", - "@types/bn.js": "^5.1.0", "@types/node": "^18.7.16" }, "devDependencies": { diff --git a/packages/sdk/cryptographic-utils/src/account.ts b/packages/sdk/cryptographic-utils/src/account.ts index 5afbc73f20..963f70e766 100644 --- a/packages/sdk/cryptographic-utils/src/account.ts +++ b/packages/sdk/cryptographic-utils/src/account.ts @@ -160,13 +160,6 @@ function isLatinBasedLanguage(language: MnemonicLanguages): boolean { } } -/** - * @deprecated now an alias for normalizeMnemonic. - */ -export function formatNonAccentedCharacters(mnemonic: string) { - return normalizeMnemonic(mnemonic) -} - // Unify the bip39.wordlists (otherwise depends on the instance of the bip39) export function getWordList(language: MnemonicLanguages = MnemonicLanguages.english): string[] { return wordlists[language] diff --git a/packages/sdk/utils/package.json b/packages/sdk/utils/package.json index 31ef2cda2b..54e8639515 100644 --- a/packages/sdk/utils/package.json +++ b/packages/sdk/utils/package.json @@ -26,18 +26,14 @@ ], "dependencies": { "@celo/base": "^7.0.3", - "@ethereumjs/rlp": "^5.0.2", - "@ethereumjs/util": "8.0.5", "@noble/ciphers": "1.1.3", "@noble/curves": "1.3.0", "@noble/hashes": "1.3.3", - "@types/bn.js": "^5.1.0", "@types/node": "^18.7.16", "bignumber.js": "^9.0.0", "fp-ts": "2.16.9", "io-ts": "2.0.1", - "web3-eth-abi": "1.10.4", - "web3-utils": "1.10.4" + "viem": "^2.33.2" }, "devDependencies": { "@celo/typescript": "workspace:^" diff --git a/packages/sdk/utils/src/address.ts b/packages/sdk/utils/src/address.ts index 4cf79afe6d..722cc70d3d 100644 --- a/packages/sdk/utils/src/address.ts +++ b/packages/sdk/utils/src/address.ts @@ -1,12 +1,7 @@ import { StrongAddress, ensureLeading0x, hexToBuffer } from '@celo/base/lib/address' -import { - isValidPrivate, - privateToAddress, - privateToPublic, - pubToAddress, - toBuffer, - toChecksumAddress, -} from '@ethereumjs/util' +import { secp256k1 } from '@noble/curves/secp256k1' +import { getAddress, isAddress } from 'viem' +import { publicKeyToAddress as viemPublicKeyToAddress } from 'viem/accounts' // Exports moved to @celo/base, forwarding them // here for backwards compatibility export { @@ -25,23 +20,40 @@ export { normalizeAddressWith0x, trimLeading0x, } from '@celo/base/lib/address' -export { isValidChecksumAddress, toChecksumAddress } from '@ethereumjs/util' +export { getAddress as toChecksumAddress } from 'viem' +export const isValidChecksumAddress = (address: string): boolean => + isAddress(address, { strict: true }) -export const privateKeyToAddress = (privateKey: string) => - toChecksumAddress( - ensureLeading0x(privateToAddress(hexToBuffer(privateKey)).toString('hex')) +export const privateKeyToAddress = (privateKey: string) => { + const pubKey = secp256k1.getPublicKey(hexToBuffer(privateKey), false) + return viemPublicKeyToAddress( + ensureLeading0x(Buffer.from(pubKey).toString('hex')) as `0x${string}` ) as StrongAddress +} export const privateKeyToPublicKey = (privateKey: string) => - toChecksumAddress(ensureLeading0x(privateToPublic(hexToBuffer(privateKey)).toString('hex'))) + ensureLeading0x( + Buffer.from(secp256k1.getPublicKey(hexToBuffer(privateKey), false).subarray(1)).toString('hex') + ) -export const publicKeyToAddress = (publicKey: string) => - toChecksumAddress( - ensureLeading0x(pubToAddress(toBuffer(ensureLeading0x(publicKey)), true).toString('hex')) - ) as StrongAddress +export const publicKeyToAddress = (publicKey: string) => { + let hex = ensureLeading0x(publicKey) as `0x${string}` + // If raw 64-byte key (128 hex chars, no 04 prefix), prepend the uncompressed prefix + if (hex.length === 130 && !hex.startsWith('0x04')) { + hex = `0x04${hex.slice(2)}` as `0x${string}` + } + return viemPublicKeyToAddress(hex) as StrongAddress +} -export const isValidPrivateKey = (privateKey: string) => - privateKey.startsWith('0x') && isValidPrivate(hexToBuffer(privateKey)) +export const isValidPrivateKey = (privateKey: string) => { + try { + if (!privateKey.startsWith('0x')) return false + secp256k1.getPublicKey(hexToBuffer(privateKey)) + return true + } catch { + return false + } +} export const isValidAddress = (input: string): input is StrongAddress => { if ('string' !== typeof input) { @@ -54,7 +66,7 @@ export const isValidAddress = (input: string): input is StrongAddress => { return true } - if (toChecksumAddress(input) === input) { + if (getAddress(input) === input) { return true } diff --git a/packages/sdk/utils/src/celoHistory.ts b/packages/sdk/utils/src/celoHistory.ts deleted file mode 100644 index 0e11c16f84..0000000000 --- a/packages/sdk/utils/src/celoHistory.ts +++ /dev/null @@ -1,7 +0,0 @@ -import BigNumber from 'bignumber.js' - -const WEI_PER_UNIT = 1000000000000000000 - -// A small amount returns a rate closer to the median rate -export const DOLLAR_AMOUNT_FOR_ESTIMATE = new BigNumber(0.01 * WEI_PER_UNIT) // 0.01 dollar -export const CELO_AMOUNT_FOR_ESTIMATE = new BigNumber(0.01 * WEI_PER_UNIT) // 0.01 celo diff --git a/packages/sdk/utils/src/ecies.ts b/packages/sdk/utils/src/ecies.ts index af09a28688..cc67bccdfc 100644 --- a/packages/sdk/utils/src/ecies.ts +++ b/packages/sdk/utils/src/ecies.ts @@ -150,8 +150,13 @@ export function Encrypt(pubKeyTo: PubKey, plaintext: Uint8Array) { pubKeyTo = secp256k1.ProjectivePoint.fromHex(pubKeyTo).toRawBytes() } - const pubKeyToEncoded = Buffer.concat([Buffer.from([0x04]), pubKeyTo as Buffer]) - const px = secp256k1.getSharedSecret(ephemPrivKey, pubKeyToEncoded).slice(1) + // Ensure the public key is in uncompressed form (65 bytes, starting with 0x04). + // HSM wallets may provide 64-byte raw keys (X+Y without prefix). + let pubKeyBuf = pubKeyTo instanceof Uint8Array ? pubKeyTo : Buffer.from(pubKeyTo as any) + if (pubKeyBuf.length === 64) { + pubKeyBuf = Buffer.concat([Buffer.from([0x04]), pubKeyBuf]) + } + const px = secp256k1.getSharedSecret(ephemPrivKey, pubKeyBuf).slice(1) // NOTE: // Can't swap to proper hkdf implementation because then there's ALWAYS a mac mismatch diff --git a/packages/sdk/utils/src/io.ts b/packages/sdk/utils/src/io.ts index b78ec2dadc..cbf79366ce 100644 --- a/packages/sdk/utils/src/io.ts +++ b/packages/sdk/utils/src/io.ts @@ -1,7 +1,8 @@ import { URL_REGEX } from '@celo/base/lib/io' -import { isValidPublic, toChecksumAddress } from '@ethereumjs/util' -import { either } from 'fp-ts/lib/Either' +import { secp256k1 } from '@noble/curves/secp256k1' +import { getAddress } from 'viem' import * as t from 'io-ts' +import { either } from 'fp-ts/lib/Either' import { isValidAddress } from './address' // Exports moved to @celo/base, forwarding them @@ -41,7 +42,7 @@ export const AddressType = new t.Type( (input, context) => either.chain(t.string.validate(input, context), (stringValue) => isValidAddress(stringValue) - ? t.success(toChecksumAddress(stringValue)) + ? t.success(getAddress(stringValue)) : t.failure(stringValue, context, 'is not a valid address') ), String @@ -51,11 +52,22 @@ export const PublicKeyType = new t.Type( 'Public Key', t.string.is, (input, context) => - either.chain(t.string.validate(input, context), (stringValue) => - stringValue.startsWith('0x') && isValidPublic(Buffer.from(stringValue.slice(2), 'hex'), true) - ? t.success(toChecksumAddress(stringValue)) - : t.failure(stringValue, context, 'is not a valid public key') - ), + either.chain(t.string.validate(input, context), (stringValue) => { + if (!stringValue.startsWith('0x')) { + return t.failure(stringValue, context, 'is not a valid public key') + } + // Accept both 64-byte raw (128 hex chars) and 65-byte uncompressed (130 hex chars with 04 prefix) + let hexKey = stringValue.slice(2) + if (hexKey.length === 128) { + hexKey = '04' + hexKey + } + try { + secp256k1.ProjectivePoint.fromHex(hexKey) + return t.success(stringValue) + } catch { + return t.failure(stringValue, context, 'is not a valid public key') + } + }), String ) diff --git a/packages/sdk/utils/src/istanbul.ts b/packages/sdk/utils/src/istanbul.ts index eb190ae5cb..4b946ec061 100644 --- a/packages/sdk/utils/src/istanbul.ts +++ b/packages/sdk/utils/src/istanbul.ts @@ -1,6 +1,5 @@ -import { bufferToHex, toChecksumAddress } from '@ethereumjs/util' +import { bytesToHex, fromRlp, getAddress, type Hex } from 'viem' import BigNumber from 'bignumber.js' -import * as rlp from '@ethereumjs/rlp' import { Address } from './address' // This file contains utilities that help with istanbul-specific block information. @@ -42,19 +41,24 @@ function sealFromBuffers(data: Buffer[]): Seal { // Parse RLP encoded block extra data into an IstanbulExtra object. export function parseBlockExtraData(data: string): IstanbulExtra { const buffer = Buffer.from(data.replace(/^0x/, ''), 'hex') - const decode = rlp.decode('0x' + buffer.subarray(ISTANBUL_EXTRA_VANITY_BYTES).toString('hex')) + const rlpHex = ('0x' + buffer.subarray(ISTANBUL_EXTRA_VANITY_BYTES).toString('hex')) as Hex + const decode = fromRlp(rlpHex, 'bytes') as Uint8Array[] return { - addedValidators: (decode.at(0) as Uint8Array[]).map((addr) => - toChecksumAddress(bufferToHex(Buffer.from(addr))) + addedValidators: (decode[0] as unknown as Uint8Array[]).map((addr) => + getAddress(bytesToHex(addr)) ), - addedValidatorsPublicKeys: (decode.at(1) as Uint8Array[]).map( + addedValidatorsPublicKeys: (decode[1] as unknown as Uint8Array[]).map( (key) => '0x' + Buffer.from(key).toString('hex') ), - removedValidators: bigNumberFromBuffer(Buffer.from(decode.at(2) as Uint8Array)), - seal: '0x' + Buffer.from(decode.at(3) as Uint8Array).toString('hex'), - aggregatedSeal: sealFromBuffers((decode.at(4) as Uint8Array[]).map(Buffer.from)), - parentAggregatedSeal: sealFromBuffers((decode.at(5) as Uint8Array[]).map(Buffer.from)), + removedValidators: bigNumberFromBuffer(Buffer.from(decode[2])), + seal: '0x' + Buffer.from(decode[3]).toString('hex'), + aggregatedSeal: sealFromBuffers( + (decode[4] as unknown as Uint8Array[]).map((b) => Buffer.from(b)) + ), + parentAggregatedSeal: sealFromBuffers( + (decode[5] as unknown as Uint8Array[]).map((b) => Buffer.from(b)) + ), } } diff --git a/packages/sdk/utils/src/sign-typed-data-utils.ts b/packages/sdk/utils/src/sign-typed-data-utils.ts index 4b60c07629..54059c431e 100644 --- a/packages/sdk/utils/src/sign-typed-data-utils.ts +++ b/packages/sdk/utils/src/sign-typed-data-utils.ts @@ -3,7 +3,7 @@ import { keccak_256 } from '@noble/hashes/sha3' import { hexToBytes, utf8ToBytes } from '@noble/hashes/utils' import { BigNumber } from 'bignumber.js' import * as t from 'io-ts' -import coder from 'web3-eth-abi' +import { type AbiParameter, encodeAbiParameters } from 'viem' export interface EIP712Parameter { name: string @@ -200,7 +200,10 @@ export function typeHash(primaryType: string, types: EIP712Types): Buffer { function encodeValue(valueType: string, value: EIP712ObjectValue, types: EIP712Types): Buffer { // Encode the atomic types as their corresponding soldity ABI type. if (EIP712_ATOMIC_TYPES.includes(valueType)) { - const hexEncoded = coder.encodeParameter(valueType, normalizeValue(valueType, value)) + const hexEncoded = encodeAbiParameters( + [{ type: valueType } as AbiParameter], + [normalizeValue(valueType, value)] + ) return Buffer.from(trimLeading0x(hexEncoded), 'hex') } diff --git a/packages/sdk/utils/src/signatureUtils.test.ts b/packages/sdk/utils/src/signatureUtils.test.ts index c2d6c62c0f..88eae4a9d7 100644 --- a/packages/sdk/utils/src/signatureUtils.test.ts +++ b/packages/sdk/utils/src/signatureUtils.test.ts @@ -1,5 +1,5 @@ -import * as Web3Utils from 'web3-utils' import { privateKeyToAddress } from './address' +import { soliditySha3 } from './solidity' import { parseSignature, parseSignatureWithoutPrefix, @@ -13,7 +13,7 @@ describe('signatures', () => { it('should sign appropriately with a hash of a message', () => { const pKey = '0x62633f7c9583780a7d3904a2f55d792707c345f21de1bacb2d389934d82796b2' const address = privateKeyToAddress(pKey) - const messageHash = Web3Utils.soliditySha3({ type: 'string', value: 'identifier' })! + const messageHash = soliditySha3({ type: 'string', value: 'identifier' })! const signature = signMessageWithoutPrefix(messageHash, pKey, address) const serializedSig = serializeSignature(signature) parseSignatureWithoutPrefix(messageHash, serializedSig, address) diff --git a/packages/sdk/utils/src/signatureUtils.ts b/packages/sdk/utils/src/signatureUtils.ts index ea86a7f775..e751af960b 100644 --- a/packages/sdk/utils/src/signatureUtils.ts +++ b/packages/sdk/utils/src/signatureUtils.ts @@ -1,14 +1,7 @@ import { NativeSigner, serializeSignature, Signature, Signer } from '@celo/base/lib/signatureUtils' -import { - bufferToHex, - ecrecover, - ecsign, - fromRpcSig, - privateToPublic, - pubToAddress, - toBuffer, -} from '@ethereumjs/util' -import { isHexStrict, soliditySha3 } from 'web3-utils' +import { secp256k1 } from '@noble/curves/secp256k1' +import { bytesToHex, hexToBytes, isHex, keccak256, stringToBytes, toBytes, toHex } from 'viem' +import { publicKeyToAddress as viemPublicKeyToAddress } from 'viem/accounts' import { ensureLeading0x, eqAddress, privateKeyToAddress, trimLeading0x } from './address' import { EIP712TypedData, generateTypedDataHash } from './sign-typed-data-utils' @@ -24,7 +17,7 @@ export { // If messages is a hex, the length of it should be the number of bytes function messageLength(message: string) { - if (isHexStrict(message)) { + if (isHex(message, { strict: true })) { return (message.length - 2) / 2 } return message.length @@ -33,11 +26,19 @@ function messageLength(message: string) { // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign export function hashMessageWithPrefix(message: string): string { const prefix = '\x19Ethereum Signed Message:\n' + messageLength(message) - return soliditySha3(prefix, message)! + // prefix is always a plain string (UTF-8), message can be hex or plain string + // toBytes handles both: hex strings → decoded bytes, plain strings → UTF-8 bytes + const prefixBytes = toBytes(prefix) + const messageBytes = toBytes(message) + const combined = new Uint8Array(prefixBytes.length + messageBytes.length) + combined.set(prefixBytes) + combined.set(messageBytes, prefixBytes.length) + return keccak256(combined) } export function hashMessage(message: string): string { - return soliditySha3({ type: 'string', value: message })! + // Always treat message as UTF-8 string (matching soliditySha3({type:'string', value})) + return keccak256(stringToBytes(message)) } export async function addressToPublicKey( @@ -49,16 +50,28 @@ export async function addressToPublicKey( // Note: Eth.sign typing displays incorrect parameter order const sig = await signFn(data, signer) - const rawsig = fromRpcSig(sig) + const trimmedSig = trimLeading0x(sig) + const r = hexToBytes(`0x${trimmedSig.slice(0, 64)}`) + const s = hexToBytes(`0x${trimmedSig.slice(64, 128)}`) + let v = parseInt(trimmedSig.slice(128, 130), 16) + if (v < 27) v += 27 + const prefixedMsg = hashMessageWithPrefix(data) - const pubKey = ecrecover(Buffer.from(prefixedMsg.slice(2), 'hex'), rawsig.v, rawsig.r, rawsig.s) + const msgHash = hexToBytes(prefixedMsg as `0x${string}`) + + const signature = new secp256k1.Signature( + BigInt(toHex(r, { size: 32 })), + BigInt(toHex(s, { size: 32 })) + ).addRecoveryBit(v - 27) + const pubKeyFull = signature.recoverPublicKey(msgHash).toRawBytes(false) - const computedAddr = pubToAddress(pubKey).toString('hex') + const computedAddr = viemPublicKeyToAddress(bytesToHex(pubKeyFull) as `0x${string}`) if (!eqAddress(computedAddr, signer)) { throw new Error('computed address !== signer') } - return '0x' + pubKey.toString('hex') + // Return raw 64-byte key (without 04 prefix) for on-chain compatibility + return bytesToHex(pubKeyFull.subarray(1)) } export function LocalSigner(privateKey: string): Signer { @@ -71,13 +84,11 @@ export function LocalSigner(privateKey: string): Signer { } export function signedMessageToPublicKey(message: string, v: number, r: string, s: string) { - const pubKeyBuf = ecrecover( - Buffer.from(message.slice(2), 'hex'), - BigInt(v), - Buffer.from(r.slice(2), 'hex'), - Buffer.from(s.slice(2), 'hex') - ) - return '0x' + pubKeyBuf.toString('hex') + const msgHash = hexToBytes(message as `0x${string}`) + const signature = new secp256k1.Signature(BigInt(r), BigInt(s)).addRecoveryBit(v - 27) + const pubKey = signature.recoverPublicKey(msgHash).toRawBytes(false) + // Return raw 64-byte key (without 04 prefix) for on-chain compatibility + return bytesToHex(pubKey.subarray(1)) } export function signMessage(message: string, privateKey: string, address: string) { @@ -89,16 +100,21 @@ export function signMessage(message: string, privateKey: string, address: string } export function signMessageWithoutPrefix(messageHash: string, privateKey: string, address: string) { - const publicKey = privateToPublic(toBuffer(privateKey)) - const derivedAddress: string = bufferToHex(pubToAddress(publicKey)) + const privKeyBytes = hexToBytes(ensureLeading0x(privateKey) as `0x${string}`) + const pubKey = secp256k1.getPublicKey(privKeyBytes, false) + const derivedAddress = viemPublicKeyToAddress(bytesToHex(pubKey) as `0x${string}`) if (derivedAddress.toLowerCase() !== address.toLowerCase()) { throw new Error('Provided private key does not match address of intended signer') } - const { r, s, v } = ecsign(toBuffer(messageHash), toBuffer(privateKey)) - if (!isValidSignature(address, messageHash, Number(v), bufferToHex(r), bufferToHex(s))) { + const msgHashBytes = hexToBytes(messageHash as `0x${string}`) + const sig = secp256k1.sign(msgHashBytes, privKeyBytes.slice(0, 32)) + const v = sig.recovery + 27 + const r = ensureLeading0x(sig.r.toString(16).padStart(64, '0')) + const s = ensureLeading0x(sig.s.toString(16).padStart(64, '0')) + if (!isValidSignature(address, messageHash, v, r, s)) { throw new Error('Unable to validate signature') } - return { v: Number(v), r: bufferToHex(r), s: bufferToHex(s) } + return { v, r, s } } export function verifySignature(message: string, signature: string, signer: string) { @@ -139,9 +155,10 @@ function recoverEIP712TypedDataSigner( ): string { const dataBuff = generateTypedDataHash(typedData) const { r, s, v } = parseFunction(trimLeading0x(signature)) - const publicKey = ecrecover(toBuffer(dataBuff), BigInt(v), toBuffer(r), toBuffer(s)) - // TODO test error handling on this - return bufferToHex(pubToAddress(publicKey)) + const msgHash = dataBuff instanceof Uint8Array ? dataBuff : hexToBytes(dataBuff as `0x${string}`) + const sig = new secp256k1.Signature(BigInt(r), BigInt(s)).addRecoveryBit(v - 27) + const publicKey = sig.recoverPublicKey(msgHash).toRawBytes(false) + return viemPublicKeyToAddress(bytesToHex(publicKey) as `0x${string}`) } /** @@ -196,8 +213,10 @@ export function verifyEIP712TypedDataSigner( export function guessSigner(message: string, signature: string): string { const messageHash = hashMessageWithPrefix(message) const { r, s, v } = parseSignatureAsRsv(signature.slice(2)) - const publicKey = ecrecover(toBuffer(messageHash), BigInt(v), toBuffer(r), toBuffer(s)) - return bufferToHex(pubToAddress(publicKey)) + const msgHash = hexToBytes(messageHash as `0x${string}`) + const sig = new secp256k1.Signature(BigInt(r), BigInt(s)).addRecoveryBit(v - 27) + const publicKey = sig.recoverPublicKey(msgHash).toRawBytes(false) + return viemPublicKeyToAddress(bytesToHex(publicKey) as `0x${string}`) } function parseSignatureAsVrs(signature: string) { @@ -222,10 +241,10 @@ function parseSignatureAsRsv(signature: string) { function isValidSignature(signer: string, message: string, v: number, r: string, s: string) { try { - const publicKey = ecrecover(toBuffer(message), BigInt(v), toBuffer(r), toBuffer(s)) - - const retrievedAddress: string = bufferToHex(pubToAddress(publicKey)) - + const msgHash = hexToBytes(message as `0x${string}`) + const sig = new secp256k1.Signature(BigInt(r), BigInt(s)).addRecoveryBit(v - 27) + const publicKey = sig.recoverPublicKey(msgHash).toRawBytes(false) + const retrievedAddress = viemPublicKeyToAddress(bytesToHex(publicKey) as `0x${string}`) return eqAddress(retrievedAddress, signer) } catch (err) { return false diff --git a/packages/sdk/utils/src/solidity.ts b/packages/sdk/utils/src/solidity.ts index 548931d5db..01c1bca4a4 100644 --- a/packages/sdk/utils/src/solidity.ts +++ b/packages/sdk/utils/src/solidity.ts @@ -1 +1,99 @@ -export { sha3, soliditySha3, soliditySha3Raw } from 'web3-utils' +import { encodePacked, type Hex, isHex, keccak256, pad, toBytes, toHex } from 'viem' + +export type SolidityValue = + | string + | number + | bigint + | boolean + | { type: string; value: unknown } + | { t: string; v: unknown } + +/** + * Computes keccak256 of Solidity-packed encoding of arguments. + * Replacement for the former web3-utils soliditySha3. + * + * Supports two calling conventions: + * 1. Typed objects: soliditySha3({ type: 'address', value: '0x...' }) + * 2. Auto-detected values: soliditySha3('hello', '0xdead') - strings auto-detected as + * 'bytes' if hex, 'string' otherwise; numbers as uint256; booleans as bool + */ +export function soliditySha3(...args: SolidityValue[]): string | null { + if (args.length === 0) return null + + const types: string[] = [] + const values: unknown[] = [] + + for (const arg of args) { + if (typeof arg === 'object' && arg !== null && 'type' in arg && 'value' in arg) { + types.push(arg.type as string) + values.push(arg.value) + } else if (typeof arg === 'object' && arg !== null && 't' in arg && 'v' in arg) { + // shorthand: { t: 'uint256', v: 123 } + types.push((arg as { t: string; v: unknown }).t) + values.push((arg as { t: string; v: unknown }).v) + } else if (typeof arg === 'string') { + if (isHex(arg, { strict: true })) { + types.push('bytes') + values.push(arg) + } else { + types.push('string') + values.push(arg) + } + } else if (typeof arg === 'number' || typeof arg === 'bigint') { + types.push('uint256') + values.push(BigInt(arg)) + } else if (typeof arg === 'boolean') { + types.push('bool') + values.push(arg) + } + } + + // Coerce values for bytesN types: the legacy API accepted plain strings and hex of wrong size + for (let i = 0; i < types.length; i++) { + const bytesMatch = types[i].match(/^bytes(\d+)$/) + if (bytesMatch && typeof values[i] === 'string') { + const size = parseInt(bytesMatch[1], 10) + let hex: Hex + if (isHex(values[i] as string, { strict: true })) { + hex = values[i] as Hex + } else { + hex = toHex(toBytes(values[i] as string)) + } + const byteLen = (hex.length - 2) / 2 + if (byteLen < size) { + values[i] = pad(hex, { size, dir: 'right' }) + } else if (byteLen > size) { + values[i] = ('0x' + hex.slice(2, 2 + size * 2)) as Hex + } + } + } + + const packed = encodePacked(types, values) + return keccak256(packed) +} + +/** + * Same as soliditySha3 but returns the zero hash instead of null for empty input. + * Replacement for the former web3-utils soliditySha3Raw. + */ +export function soliditySha3Raw(...args: SolidityValue[]): string { + return soliditySha3(...args) ?? keccak256(new Uint8Array()) +} + +/** + * Computes keccak256 hash. Replacement for the former web3-utils sha3. + * For a single string argument, hashes it directly (hex as bytes, otherwise UTF-8). + * For multiple or typed arguments, delegates to soliditySha3. + */ +export function sha3(...args: SolidityValue[]): string | null { + // When called with a single string (the common case for sha3), handle it directly + if (args.length === 1 && typeof args[0] === 'string') { + const input = args[0] + // sha3 with a single string auto-detects: hex → decode as bytes, otherwise UTF-8 + if (isHex(input, { strict: true })) { + return keccak256(input as Hex) + } + return keccak256(toBytes(input)) + } + return soliditySha3(...args) +} diff --git a/packages/typescript/tsconfig.library.json b/packages/typescript/tsconfig.library.json index 713cd7ebf0..5d726abef1 100644 --- a/packages/typescript/tsconfig.library.json +++ b/packages/typescript/tsconfig.library.json @@ -11,6 +11,7 @@ "strict": true, "declaration": true, "sourceMap": true, + "declarationMap": true, "skipLibCheck": true, "noImplicitAny": true, "noUnusedLocals": true, diff --git a/specs/standardize-viem-clients.md b/specs/standardize-viem-clients.md new file mode 100644 index 0000000000..7a10cf048a --- /dev/null +++ b/specs/standardize-viem-clients.md @@ -0,0 +1,345 @@ +# Standardize All Packages to Use Viem Clients Directly + +## Architecture Review + +### Current State — Two Coexisting Paradigms + +1. **Legacy (web3-based)**: `@celo/connect` defines a `Connection` class wrapping a JSON-RPC `Provider`. The actual web3.js npm package has already been removed — all RPC calls go through raw JSON-RPC via `rpcCaller.call(...)` and ABI encoding uses viem internally (`abi-coder.ts`, `rpc-contract.ts`). However, `@celo/contractkit` exposes a `get web3(): any` backward-compat shim (lines 138-202 of `kit.ts`) that emulates `web3.eth.*` and `web3.utils.*` using `Connection` methods. `@celo/dev-utils` has `createWeb3Shim()` for test harnesses. All legacy SDK packages and CLI test infrastructure depend on this shim surface. + +2. **Modern (viem-based)**: `@celo/actions` defines canonical types (`PublicCeloClient`, `WalletCeloClient`, `CeloClient`, `Clients`) in `src/client.ts`. The CLI's `BaseCommand` already constructs `publicClient` and `walletClient` via viem. `@celo/dev-utils` provides `viem_testWithAnvil()`. `@celo/viem-account-ledger` is pure viem. + +### Architecture Concerns + +- **Dual paradigm increases coupling and maintenance burden** — every new feature must consider both paths +- **Web3 shim is a compatibility layer with no unique functionality** — viem covers all use cases +- **Wallet packages become obsolete** — viem's account abstraction (`privateKeyToAccount`, custom accounts) replaces them +- **Single atomic PR** — all changes land together to avoid intermediate broken states + +### Complexity Hotspots + +- `@celo/contractkit` — deep dependency on `Connection.web3`, `Web3ContractCache`, `@celo/abis/web3/*` +- CLI — dual `getKit()` + `getPublicClient()` pattern throughout commands +- `@celo/governance` — heavy use of `kit.web3.utils.*` +- DKG commands — heavily web3-dependent (may be candidates for removal) + +### Key Finding: web3.js npm Package Already Removed + +The web3.js library is **not** in any `package.json` dependencies. What remains is: +- A **web3-like API surface** (`kit.web3` property, `Web3` type alias, `createWeb3Shim()`) +- These are pure TypeScript shims over `Connection` methods and viem utilities +- The shim exists solely for backward compatibility; removing it is a surface-level change, not a deep architectural one + +## Current Migration Status + +### Already Completed (Commit 7fe8c4478) + +- `Connection` class no longer wraps a `Web3` instance — uses raw JSON-RPC + viem internally +- `Connection.createContract()` replaces `new web3.eth.Contract(abi, address)` +- `viemAbiCoder` (in `abi-coder.ts`) replaces web3 ABI coder +- `RpcContract` (in `rpc-contract.ts`) replaces web3 Contract class +- `web3-contract-cache.ts` uses `@celo/abis` (viem ABIs) for ABI source +- All wrapper classes use `Connection.createContract()` instead of `new web3.eth.Contract()` +- `newKitFromProvider()` factory added as the recommended entry point + +### Remaining Web3 Surface (Quantified) + +| Pattern | Count | Location | +|---|---|---| +| `kit.web3` references | **67** | Test files across contractkit, CLI | +| `createWeb3Shim` | **3** | Definition + call in dev-utils, comment in connection.ts | +| `web3.eth.*` method calls | **43** | Test files and dev-utils helpers | +| `web3.utils.*` method calls | **16** | Test files and CLI chain-setup | +| `newKitFromWeb3` call sites | **~217** | Test files (2 definitions + ~215 calls) | +| `@celo/abis/web3/` imports | **24** | Governance source + test files | +| `testLocallyWithWeb3Node` | **~554** | CLI test helper used in nearly all CLI tests | +| `Web3ContractCache` | **16** | Internal contractkit class (cosmetic) | +| `displayWeb3Tx` | **11** | CLI DKG commands utility | +| `getWeb3ForKit` | **4** | Deprecated helper in setupForKits.ts | +| `Web3` type imports | **76** | From `@celo/connect` across packages | + +## Specification + +### Canonical Client Types + +All packages MUST use types from `@celo/actions/src/client.ts`: + +| Type | Definition | Purpose | +|---|---|---| +| `PublicCeloClient` | `PublicClient` | Read-only on-chain queries | +| `WalletCeloClient` | `WalletClient` | Signing & sending transactions | +| `CeloClient` | `Client` | Base type for generic contexts | +| `Clients` | `{ public: PublicCeloClient, wallet?: WalletCeloClient }` | Combined client bag | + +For tests, `@celo/dev-utils` exports `TestClientExtended` (via `createTestClient` + `publicActions` + `walletActions`). + +### Client Construction Sites + +| Context | Construction Site | Pattern | +|---|---|---| +| **Library packages** (`actions`, `core`) | Caller constructs clients | Functions accept `PublicCeloClient` / `WalletCeloClient` as params | +| **CLI** (`celocli`) | `BaseCommand.getPublicClient()` / `getWalletClient()` | Factory methods; transport from `--node` flag | +| **Tests** | `@celo/dev-utils` → `viem_testWithAnvil()` | Anvil-based; snapshot/revert per test | +| **User applications** | Users call `createPublicClient()` directly | Documented in migration guide | + +### Transport & Chain Configuration + +- **Transport**: `http()`, `webSocket()`, or `ipc()` from viem +- **Chain**: `celo` or `celoSepolia` from `viem/chains`; custom chain for dev/anvil +- **RPC URL**: Passed via transport factory; no global singleton + +### Account/Signer Handling + +| Environment | Mechanism | Result | +|---|---|---| +| Private key (Node/CLI) | `privateKeyToAccount(key)` → `createWalletClient({ account })` | `WalletCeloClient` | +| Ledger (Node/CLI) | `@celo/viem-account-ledger` → `ledgerToWalletClient()` | `WalletCeloClient` | +| RPC-managed (Node) | `createRpcWalletClient()` | `WalletCeloClient` | +| Browser wallet | Out of scope (standard viem patterns) | Documented | + +### Migration Tiers + +**Tier 1 — Core (blocking):** + +| Package | Migration | +|---|---| +| `@celo/connect` | Remove `createWeb3Shim()`, `Web3` type, `Connection.web3` getter. Keep `Connection` class stripped of shim. | +| `@celo/contractkit` | Replace `@celo/abis/web3/*` with viem ABIs + `getContract()`. Constructor accepts `PublicCeloClient`. Remove `getWeb3ForKit()`, `SimpleHttpProvider`, `SimpleIpcProvider` | +| `@celo/celocli` | Remove `getKit()`, `getWeb3()`, `_kit`, `_web3`. All commands use `getPublicClient()` / `getWalletClient()` | + +**Tier 2 — Dependent SDK packages:** + +| Package | Dependency to Remove | +|---|---| +| `@celo/governance` | `kit.web3.utils.*`, `@celo/abis/web3/*` | +| `@celo/explorer` | `connection.web3.eth.*`, `connection.web3.utils.*` | +| `@celo/metadata-claims` | `newKitFromWeb3()` in tests | +| `@celo/transactions-uri` | `newKitFromWeb3()` in tests | + +**Tier 3 — Wallet packages (deprecate):** + +`wallet-base`, `wallet-local`, `wallet-ledger`, `wallet-hsm-*`, `wallet-remote` — mark `@deprecated`, stop importing in monorepo. + +### Packages Already on Viem (No Changes) + +`@celo/actions`, `@celo/core`, `@celo/viem-account-ledger`, `@celo/base`, `@celo/phone-utils`, `@celo/cryptographic-utils`, `@celo/keystores` + +## Detailed Implementation Plan + +### Phase 1: Governance Production Code (2 files) + +| File | Line(s) | Current | Replacement | +|---|---|---|---| +| `packages/sdk/governance/src/proposals.ts` | 1-2 | `ABI as GovernanceABI` from `@celo/abis/web3/Governance`, `ABI as RegistryABI` from `@celo/abis/web3/Registry` | Import viem ABIs from `@celo/abis` (e.g., `governanceABI`, `registryABI`) | +| `packages/sdk/governance/src/interactive-proposal-builder.ts` | 138 | `require('@celo/abis/web3/${subPath}${contractName}').ABI` | `require('@celo/abis/${contractName}')` or static import from `@celo/abis` | + +### Phase 2: Test Infrastructure (5 files) + +These changes unblock the mass test file migration. + +| File | Change | +|---|---| +| `packages/dev-utils/src/anvil-test.ts` | Modify `testWithAnvilL2()` to provide `Provider` (or `TestClientExtended`) instead of `Web3` shim to callbacks. Alternatively, have it provide both a `kit` (via `newKitFromProvider`) and a `provider`, eliminating the need for callers to call `newKitFromWeb3()`. | +| `packages/dev-utils/src/test-utils.ts` | Remove `createWeb3Shim()` function and `Web3` type import. Update `testWithWeb3()` to use viem client. | +| `packages/dev-utils/src/ganache-test.ts` | Rewrite `timeTravel()`, `mineBlocks()`, `getContractFromEvent()` etc. to accept a `Provider` or viem `TestClient` instead of `Web3` shim. Most of these only need `jsonRpcCall()` which takes a provider. | +| `packages/dev-utils/src/chain-setup.ts` | Replace `new web3.eth.Contract(abi, address)` with `Connection.createContract(abi, address)` or viem `getContract()`. Replace `web3.eth.getTransactionReceipt()` with viem or Connection equivalent. | +| `packages/dev-utils/src/contracts.ts` | Replace `new client.eth.Contract(abi).deploy(...).send(...)` with viem `deployContract()` or raw RPC. | + +### Phase 3: Remove Core Shims (4 files) + +| File | Line(s) | Change | +|---|---|---| +| `packages/sdk/connect/src/connection.ts` | 63 | Remove `export type Web3 = any` | +| `packages/sdk/contractkit/src/kit.ts` | 76-84 | Remove `newKitFromWeb3()` definition | +| `packages/sdk/contractkit/src/kit.ts` | 138-202 | Remove `get web3(): any` shim | +| `packages/sdk/contractkit/src/mini-kit.ts` | 50-58 | Remove `newKitFromWeb3()` definition | +| `packages/sdk/contractkit/src/setupForKits.ts` | 141-148 | Remove `getWeb3ForKit()` | + +### Phase 4: Mass Test File Migration (~111 files) + +#### 4A: Replace `newKitFromWeb3(client)` (~217 call sites) + +**Pattern**: `newKitFromWeb3(client)` → `newKitFromProvider(provider)` (where `provider` comes from the updated test harness) + +If Phase 2 changes `testWithAnvilL2()` to directly provide a `provider`, then: +```typescript +// Before +testWithAnvilL2('test name', async (client: Web3) => { + const kit = newKitFromWeb3(client) + ... +}) + +// After +testWithAnvilL2('test name', async (provider: Provider) => { + const kit = newKitFromProvider(provider) + ... +}) +``` + +#### 4B: Replace `kit.web3.eth.*` calls (67 references) + +| Current Pattern | Viem/Connection Replacement | +|---|---| +| `kit.web3.eth.getAccounts()` | `kit.connection.getAccounts()` | +| `kit.web3.eth.getBlockNumber()` | `kit.connection.getBlockNumber()` | +| `kit.web3.eth.getChainId()` | `kit.connection.chainId()` | +| `kit.web3.eth.getBlock(n)` | `kit.connection.getBlock(n)` | +| `kit.web3.eth.getBalance(addr)` | `kit.connection.getBalance(addr)` | +| `kit.web3.eth.getTransactionReceipt(hash)` | `kit.connection.getTransactionReceipt(hash)` | +| `kit.web3.eth.sign(data, addr)` | `kit.connection.sign(data, addr)` | +| `kit.web3.eth.sendTransaction(tx)` | `kit.connection.sendTransaction(tx)` | +| `kit.web3.eth.accounts.create()` | `import { generatePrivateKey, privateKeyToAddress } from 'viem/accounts'` | +| `kit.web3.currentProvider` | `kit.connection.currentProvider` | + +#### 4C: Replace `kit.web3.utils.*` calls (16 references) + +| Current Pattern | Viem Replacement | +|---|---| +| `kit.web3.utils.toWei('1', 'ether')` | `parseEther('1').toString()` from `viem` | +| `kit.web3.utils.toWei('1', 'gwei')` | `parseGwei('1').toString()` from `viem` | +| `kit.web3.utils.soliditySha3(...)` | `keccak256(encodePacked(...))` from `viem` | +| `kit.web3.utils.sha3(...)` | `keccak256(toBytes(...))` from `viem` | +| `kit.web3.utils.toChecksumAddress(addr)` | `getAddress(addr)` from `viem` | +| `kit.web3.utils.isAddress(addr)` | `isAddress(addr)` from `viem` | +| `kit.web3.utils.keccak256(val)` | `keccak256(val)` from `viem` | + +#### 4D: Replace `@celo/abis/web3/*` factory functions (24 imports) + +| Current | Replacement | +|---|---| +| `import { newReleaseGold } from '@celo/abis/web3/ReleaseGold'` + `newReleaseGold(kit.web3, addr)` | `import { releaseGoldABI } from '@celo/abis'` + `kit.connection.createContract(releaseGoldABI, addr)` | +| `import { newRegistry } from '@celo/abis/web3/Registry'` + `newRegistry(kit.web3, addr)` | `import { registryABI } from '@celo/abis'` + `kit.connection.createContract(registryABI, addr)` | +| Same pattern for `newElection`, `newMultiSig`, `newSortedOracles`, `newGoldToken`, `newAttestations`, `newICeloVersionedContract` | Same pattern: import viem ABI from `@celo/abis` + `connection.createContract()` | + +#### 4E: Replace `testLocallyWithWeb3Node` (~554 call sites) + +The function only extracts the RPC URL from `web3.currentProvider`. Options: +1. **Rename to `testLocallyWithNode()`** and accept `{ currentProvider: Provider }` or `string` (URL directly) +2. **Keep function signature** accepting any object with `currentProvider` — since `Connection` has `currentProvider`, callers can pass `kit.connection` instead of `kit.web3` + +Recommended: rename + accept `kit.connection` (which has `.currentProvider`). + +#### 4F: Replace dev-utils helpers in CLI tests + +| Function | Current signature | New signature | +|---|---|---| +| `timeTravel(seconds, web3)` | Accepts `Web3` shim | Accept `Provider` or `Connection` | +| `mineBlocks(count, web3)` | Accepts `Web3` shim | Accept `Provider` or `Connection` | +| `impersonateAccount(web3, address)` | Accepts `Web3` shim | Accept `Provider` or `Connection` | +| `stopImpersonatingAccount(web3, address)` | Accepts `Web3` shim | Accept `Provider` or `Connection` | +| `withImpersonatedAccount(web3, address, fn)` | Accepts `Web3` shim | Accept `Provider` or `Connection` | +| `setBalance(web3, address, balance)` | Accepts `Web3` shim | Accept `Provider` or `Connection` | +| `setCode(web3, address, code)` | Accepts `Web3` shim | Accept `Provider` or `Connection` | + +These all only need `jsonRpcCall()`, which takes a `Provider`. + +### Phase 5: Cosmetic Cleanup + +| Item | Change | +|---|---| +| `Web3ContractCache` class | Rename to `ContractCache` | +| `web3-contract-cache.ts` file | Rename to `contract-cache.ts` | +| `displayWeb3Tx()` in CLI | Rename to `displayTx()` | +| `testLocallyWithWeb3Node()` | Rename to `testLocallyWithNode()` | +| `setupForKits.ts` | Remove if empty after `getWeb3ForKit()` removal | + +### Identified Blockers and Mitigations + +| # | Blocker | Severity | Mitigation | +|---|---|---|---| +| B1 | `ganache-test.ts` `getContractFromEvent()` uses `client.eth.getPastLogs()` and `client.utils.sha3()` | Medium | Rewrite to use raw RPC `eth_getLogs` + viem `keccak256()` | +| B2 | `dev-utils/contracts.ts` `deployAttestationsContract()` uses `new client.eth.Contract(abi).deploy(...).send(...)` | Medium | Rewrite using viem `deployContract()` or raw `eth_sendTransaction` | +| B3 | `@celo/abis/web3/*` factories used in governance production code | High | Switch to viem ABI imports from `@celo/abis` — must verify ABI format compatibility | +| B4 | `testLocallyWithWeb3Node` has 554 call sites | Low | Mechanical find-replace; function only uses `.currentProvider` | +| B5 | `newKitFromWeb3` has ~217 call sites | Low | Mechanical find-replace; already delegates to `newKitFromProvider` | +| B6 | `dev-utils/chain-setup.ts` uses `new web3.eth.Contract(abi, address)` for direct contract calls | Medium | Use `Connection.createContract()` or viem `getContract()` | + +## Acceptance Criteria + +1. **AC-1: `createWeb3Shim` Elimination** + - AC-1.1: `grep -r "createWeb3Shim" packages/` returns zero results + - AC-1.2: The `Web3` interface type is removed from `@celo/connect`'s public exports + - AC-1.3: `Connection.web3` getter is removed. `Connection` class is preserved but stripped of the Web3 shim. + +2. **AC-2: Canonical Client Type Adoption** + - AC-2.1: `PublicCeloClient` and `WalletCeloClient` remain in `@celo/actions/src/client.ts` as single source of truth + - AC-2.2: All packages that used `Connection` or `kit.web3` now use `PublicCeloClient` / `WalletCeloClient` + - AC-2.3: `grep -r "kit\.web3\b" packages/` returns zero results + - AC-2.4: `grep -r "@celo/abis/web3/" packages/` returns zero results + - AC-2.5: `@celo/abis/web3/*` contract constructors are rewritten to accept viem `PublicClient` instead of the `Web3` shim + +3. **AC-3: CLI Migration** + - AC-3.1: `BaseCommand` no longer has `_kit`, `_web3`, `getKit()`, `getWeb3()`, or `newWeb3()` + - AC-3.2: All CLI commands use `this.getPublicClient()` / `this.getWalletClient()` exclusively + - AC-3.3: `testLocallyWithWeb3Node()` is removed; tests use viem-based harness + - AC-3.4: Zero `import { Web3 } from '@celo/connect'` in `packages/cli/` + - AC-3.5: Zero `import { newKitFromWeb3 } from '@celo/contractkit'` in `packages/cli/` + +4. **AC-4: `@celo/connect` Cleanup** + - AC-4.1: `@celo/connect` no longer exports `Web3` type + - AC-4.2: `setupForKits.ts` exports removed from `@celo/contractkit` + - AC-4.3: `Connection.web3` is gone. `Connection` class remains without the shim. + +5. **AC-5: `@celo/contractkit` Refactoring** + - AC-5.1: `Web3ContractCache` replaced with viem-based contract cache + - AC-5.2: `ContractKit` constructor accepts `PublicCeloClient` (optionally `WalletCeloClient`) + - AC-5.3: `newKit()` / `newKitFromWeb3()` replaced with viem-transport factory + - AC-5.4: `kit.web3` property is removed + +6. **AC-6: Dependent SDK Packages** + - AC-6.1: `@celo/governance` uses viem ABIs and `PublicCeloClient` + - AC-6.2: `@celo/explorer` uses viem client methods + - AC-6.3: All test files use viem client construction + +7. **AC-7: Test Infrastructure** + - AC-7.1: `viem_testWithAnvil()` is the sole Anvil test harness; legacy `testWithAnvilL2()` removed + - AC-7.2: All migrated tests pass with `RUN_ANVIL_TESTS=true` + - AC-7.3: `yarn test` passes across the monorepo + +8. **AC-8: Account/Signer Handling** + - AC-8.1: Private-key signing uses `privateKeyToAccount()` → `createWalletClient()` + - AC-8.2: Ledger uses `@celo/viem-account-ledger` + - AC-8.3: RPC accounts use `createRpcWalletClient()` pattern + - AC-8.4: Legacy wallet packages deprecated with `@deprecated` tags, not imported by production code + +9. **AC-9: Documentation** + - AC-9.1: `MIGRATION-TO-VIEM.md` updated to reflect completed migration + - AC-9.2: `AGENTS.md` updated to state one paradigm (viem-based) + - AC-9.3: Migrated package READMEs show viem-based usage examples + +10. **AC-10: Build & CI** + - AC-10.1: `yarn build` succeeds with zero TypeScript errors + - AC-10.2: `yarn lint` passes + - AC-10.3: `yarn test` passes + - AC-10.4: Anvil tests pass with `RUN_ANVIL_TESTS=true` + - AC-10.5: Changesets created for all packages with public API changes (major bumps for `connect`, `contractkit`) + +## Non-goals + +1. **Removing `@celo/contractkit` entirely** — refactored to use viem internally but continues to exist as a convenience wrapper +2. **Removing `@celo/connect` entirely** — stripped of Web3 shim but retains needed types (`CeloTx`, `CeloTxReceipt`, etc.) +3. **Browser wallet integration** — out of scope; architecture supports it via standard viem patterns +4. **Migrating external consumers** — major version bump + migration guide provided, but their code is not part of this work +5. **Removing `@celo/abis` web3 exports** — the web3 constructors are rewritten for viem, but old web3 exports may remain as deprecated aliases for external consumers +6. **HSM wallet viem implementations** — separate effort; legacy wallet packages deprecated not deleted +7. **Performance optimization** — this is a correctness/architecture change +8. **DKG commands removal** — DKG commands will be migrated to viem as part of this work, not removed + +## Resolved Decisions + +| # | Question | Decision | +|---|---|---| +| Q1 | Should `@celo/contractkit` continue as a wrapper or be absorbed into `@celo/actions`? | **Keep contractkit** as a convenience wrapper that internally uses viem | +| Q2 | Should `Connection` class be preserved (without shim) or removed entirely? | **Keep `Connection`** stripped of the Web3 shim | +| Q3 | Are DKG CLI commands actively used? | **Migrate them** to viem | +| Q4 | Should wallet packages be deprecated in-place or unpublished? | **Deprecate in-place** — mark `@deprecated`, stop importing in monorepo, keep publishing for external consumers | +| Q5 | Should `@celo/abis/web3/*` constructors be rewritten for viem? | **Yes** — rewrite to accept viem `PublicClient` | +| Q6 | Semver bumps? | **Major** for `@celo/connect` and `@celo/contractkit`; minor/patch for others | +| Q7 | One large PR or phased? | **One large PR** — all changes land atomically | + +## Open Questions + +None — all questions resolved. + +--- + +AC_LOCKED: YES diff --git a/yarn.lock b/yarn.lock index 35b034e68e..bacb3bb443 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1773,7 +1773,6 @@ __metadata: "@celo/wallet-hsm-azure": "npm:^8.0.3" "@celo/wallet-ledger": "npm:^8.0.3" "@celo/wallet-local": "npm:^8.0.3" - "@ethereumjs/util": "npm:8.0.5" "@ledgerhq/hw-transport-node-hid": "npm:^6.28.5" "@oclif/core": "npm:^3.27.0" "@oclif/plugin-autocomplete": "npm:^3.2.0" @@ -1806,7 +1805,6 @@ __metadata: semver: "npm:^7.7.2" ts-jest: "npm:^29.1.5" viem: "npm:^2.33.2" - web3: "npm:1.10.4" bin: celocli: ./bin/run.js dev: .bin/dev.js @@ -1827,19 +1825,11 @@ __metadata: "@celo/base": "npm:^7.0.3" "@celo/typescript": "workspace:^" "@celo/utils": "npm:^8.0.3" - "@ethereumjs/util": "npm:8.0.5" "@types/debug": "npm:^4.1.12" "@types/utf8": "npm:^2.1.6" - bignumber.js: "npm:^9.0.0" debug: "npm:^4.1.1" utf8: "npm:3.0.0" - web3: "npm:1.10.4" - web3-core: "npm:1.10.4" - web3-eth: "npm:1.10.4" - web3-eth-abi: "npm:1.10.4" - web3-eth-contract: "npm:1.10.4" - peerDependencies: - web3: 1.10.4 + viem: "npm:^2.33.2" languageName: unknown linkType: soft @@ -1857,19 +1847,16 @@ __metadata: "@celo/utils": "npm:^8.0.3" "@celo/wallet-local": "npm:^8.0.1" "@jest/test-sequencer": "npm:^30.0.2" - "@types/bn.js": "npm:^5.1.0" "@types/debug": "npm:^4.1.5" "@types/node": "npm:18.7.16" bignumber.js: "npm:^9.0.0" - bn.js: "npm:^5.1.0" cross-fetch: "npm:3.1.5" debug: "npm:^4.1.1" fetch-mock: "npm:^10.0.7" fp-ts: "npm:2.16.9" jest: "npm:^29.7.0" semver: "npm:^7.7.2" - web3: "npm:1.10.4" - web3-core-helpers: "npm:1.10.4" + viem: "npm:^2.33.2" languageName: unknown linkType: soft @@ -1901,7 +1888,6 @@ __metadata: "@noble/hashes": "npm:1.3.3" "@scure/bip32": "npm:^1.3.3" "@scure/bip39": "npm:^1.2.2" - "@types/bn.js": "npm:^5.1.0" "@types/node": "npm:^18.7.16" languageName: unknown linkType: soft @@ -1926,9 +1912,6 @@ __metadata: targz: "npm:^1.0.1" tmp: "npm:^0.2.0" viem: "npm:^2.33.2" - web3: "npm:1.10.4" - web3-core-helpers: "npm:1.10.4" - web3-utils: "npm:1.10.4" peerDependencies: jest: ^29.7.0 vitest: ^3.1.3 @@ -1962,7 +1945,7 @@ __metadata: cross-fetch: "npm:3.1.5" debug: "npm:^4.1.1" fetch-mock: "npm:^10.0.7" - web3: "npm:1.10.4" + viem: "npm:^2.33.2" languageName: unknown linkType: soft @@ -1985,6 +1968,7 @@ __metadata: debug: "npm:^4.1.1" fetch-mock: "npm:^10.0.7" inquirer: "npm:^7.3.3" + viem: "npm:^2.33.2" languageName: unknown linkType: soft @@ -2081,15 +2065,13 @@ __metadata: "@celo/contractkit": "npm:^10.0.2-alpha.0" "@celo/dev-utils": "workspace:^" "@celo/typescript": "workspace:^" - "@types/bn.js": "npm:^5.1.0" "@types/debug": "npm:^4.1.5" "@types/qrcode": "npm:^1.3.4" - bn.js: "npm:^5.1.0" cross-fetch: "npm:3.1.5" dotenv: "npm:^8.2.0" fetch-mock: "npm:^10.0.7" qrcode: "npm:1.4.4" - web3-eth-abi: "npm:1.10.4" + viem: "npm:^2.33.2" languageName: unknown linkType: soft @@ -2105,18 +2087,14 @@ __metadata: dependencies: "@celo/base": "npm:^7.0.3" "@celo/typescript": "workspace:^" - "@ethereumjs/rlp": "npm:^5.0.2" - "@ethereumjs/util": "npm:8.0.5" "@noble/ciphers": "npm:1.1.3" "@noble/curves": "npm:1.3.0" "@noble/hashes": "npm:1.3.3" - "@types/bn.js": "npm:^5.1.0" "@types/node": "npm:^18.7.16" bignumber.js: "npm:^9.0.0" fp-ts: "npm:2.16.9" io-ts: "npm:2.0.1" - web3-eth-abi: "npm:1.10.4" - web3-utils: "npm:1.10.4" + viem: "npm:^2.33.2" languageName: unknown linkType: soft @@ -2131,9 +2109,9 @@ __metadata: "@celo/utils": "workspace:^" "@celo/wallet-base": "workspace:^" "@celo/wallet-remote": "workspace:^" - "@ethereumjs/util": "npm:8.0.5" "@ledgerhq/errors": "npm:^6.16.4" "@ledgerhq/hw-transport-node-hid": "npm:^6.29.5" + "@noble/curves": "npm:^1.3.0" "@types/semver": "npm:^7.7.0" "@vitest/coverage-v8": "npm:^3.1.3" dotenv: "npm:^8.2.0" @@ -2154,15 +2132,12 @@ __metadata: "@celo/connect": "npm:^7.0.0" "@celo/typescript": "workspace:^" "@celo/utils": "npm:^8.0.3" - "@ethereumjs/rlp": "npm:^5.0.2" - "@ethereumjs/util": "npm:8.0.5" "@noble/curves": "npm:^1.3.0" "@noble/hashes": "npm:^1.3.3" "@types/debug": "npm:^4.1.12" bignumber.js: "npm:^9.0.0" debug: "npm:^4.1.1" viem: "npm:~2.33.2" - web3: "npm:1.10.4" languageName: unknown linkType: soft @@ -2176,7 +2151,6 @@ __metadata: "@celo/wallet-base": "npm:^8.0.3" "@celo/wallet-hsm": "npm:^8.0.3" "@celo/wallet-remote": "npm:^8.0.3" - "@ethereumjs/util": "npm:8.0.5" "@noble/ciphers": "npm:1.1.3" "@noble/curves": "npm:1.3.0" "@noble/hashes": "npm:1.3.3" @@ -2186,7 +2160,7 @@ __metadata: bignumber.js: "npm:^9.0.0" debug: "npm:^4.1.1" dotenv: "npm:^8.2.0" - web3: "npm:1.10.4" + viem: "npm:^2.0.0" languageName: unknown linkType: soft @@ -2204,7 +2178,6 @@ __metadata: "@celo/wallet-base": "npm:^8.0.3" "@celo/wallet-hsm": "npm:^8.0.3" "@celo/wallet-remote": "npm:^8.0.3" - "@ethereumjs/util": "npm:8.0.5" "@noble/ciphers": "npm:1.1.3" "@noble/curves": "npm:1.3.0" "@noble/hashes": "npm:1.3.3" @@ -2213,7 +2186,6 @@ __metadata: bignumber.js: "npm:^9.0.0" debug: "npm:^4.1.1" dotenv: "npm:^8.2.0" - web3: "npm:1.10.4" languageName: unknown linkType: soft @@ -2227,7 +2199,6 @@ __metadata: "@celo/wallet-base": "npm:^8.0.3" "@celo/wallet-hsm": "npm:^8.0.3" "@celo/wallet-remote": "npm:^8.0.3" - "@ethereumjs/util": "npm:8.0.5" "@google-cloud/kms": "npm:~2.9.0" "@noble/ciphers": "npm:1.1.3" "@noble/curves": "npm:1.3.0" @@ -2237,7 +2208,6 @@ __metadata: bignumber.js: "npm:^9.0.0" debug: "npm:^4.1.1" dotenv: "npm:^8.2.0" - web3: "npm:1.10.4" languageName: unknown linkType: soft @@ -2247,7 +2217,6 @@ __metadata: dependencies: "@celo/base": "npm:^7.0.3" "@celo/typescript": "workspace:^" - "@ethereumjs/util": "npm:8.0.5" "@noble/ciphers": "npm:1.1.3" "@noble/curves": "npm:1.3.0" "@noble/hashes": "npm:1.3.3" @@ -2256,6 +2225,7 @@ __metadata: asn1js: "npm:^2.4.0" bignumber.js: "npm:^9.0.0" dotenv: "npm:^8.2.0" + viem: "npm:^2.33.2" languageName: unknown linkType: soft @@ -2272,7 +2242,6 @@ __metadata: "@celo/utils": "npm:^8.0.3" "@celo/wallet-base": "npm:^8.0.3" "@celo/wallet-remote": "npm:^8.0.3" - "@ethereumjs/util": "npm:8.0.5" "@ledgerhq/errors": "npm:^6.16.4" "@ledgerhq/hw-transport": "npm:^6.30.6" "@ledgerhq/hw-transport-node-hid": "npm:^6.28.5" @@ -2282,7 +2251,6 @@ __metadata: "@types/node": "npm:18.7.16" debug: "npm:^4.1.1" semver: "npm:^7.7.2" - web3: "npm:1.10.4" languageName: unknown linkType: soft @@ -2295,11 +2263,11 @@ __metadata: "@celo/typescript": "workspace:^" "@celo/utils": "npm:^8.0.3" "@celo/wallet-base": "npm:^8.0.3" - "@ethereumjs/util": "npm:8.0.5" + "@noble/curves": "npm:^1.3.0" + "@noble/hashes": "npm:^1.3.3" "@types/debug": "npm:^4.1.12" debug: "npm:^4.3.5" viem: "npm:~2.33.2" - web3: "npm:1.10.4" languageName: unknown linkType: soft @@ -2311,39 +2279,10 @@ __metadata: "@celo/typescript": "workspace:^" "@celo/utils": "npm:^8.0.3" "@celo/wallet-base": "npm:^8.0.3" - "@ethereumjs/util": "npm:8.0.5" "@types/debug": "npm:^4.1.5" - web3: "npm:1.10.4" languageName: unknown linkType: soft -"@chainsafe/as-sha256@npm:^0.3.1": - version: 0.3.1 - resolution: "@chainsafe/as-sha256@npm:0.3.1" - checksum: 3bae7b4bc6e307baa3cf1f9d2c75827874cd0fb458bc592656d741d374b48e71c042fe21616a506cb821487a5abfc6b92181e4b7fbf49b7370cee4df0b67d95a - languageName: node - linkType: hard - -"@chainsafe/persistent-merkle-tree@npm:^0.4.2": - version: 0.4.2 - resolution: "@chainsafe/persistent-merkle-tree@npm:0.4.2" - dependencies: - "@chainsafe/as-sha256": "npm:^0.3.1" - checksum: a7e59f80be3ce0a86fe452a3c003bd159a1719ed22cae22e9841668f0eda8c35412fa16b3b150d96f583a24f430a5cc2a1bfcabafc1b9cf6e1fdb227e98c4dc7 - languageName: node - linkType: hard - -"@chainsafe/ssz@npm:0.9.4": - version: 0.9.4 - resolution: "@chainsafe/ssz@npm:0.9.4" - dependencies: - "@chainsafe/as-sha256": "npm:^0.3.1" - "@chainsafe/persistent-merkle-tree": "npm:^0.4.2" - case: "npm:^1.6.3" - checksum: 2fe83d0b3ef131e14b51b88bb3343b14e7a02185fa9fd3da84b4726dbd857daaa4f7f6f4840fe3772fc1380352b1675a13b5f6153c4211c0f00ffa542b62bf2f - languageName: node - linkType: hard - "@changesets/apply-release-plan@npm:^7.0.12": version: 7.0.12 resolution: "@changesets/apply-release-plan@npm:7.0.12" @@ -2783,67 +2722,7 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:2.6.5, @ethereumjs/common@npm:^2.6.4": - version: 2.6.5 - resolution: "@ethereumjs/common@npm:2.6.5" - dependencies: - crc-32: "npm:^1.2.0" - ethereumjs-util: "npm:^7.1.5" - checksum: e931e16cafc908b086492ca5fcbb1820fff3edfb83cfd4ae48002517b3be0d1f7622c750874b3b347c122d06372e133ddae44ac129b5ba141f68808a79430135 - languageName: node - linkType: hard - -"@ethereumjs/rlp@npm:^4.0.1": - version: 4.0.1 - resolution: "@ethereumjs/rlp@npm:4.0.1" - bin: - rlp: bin/rlp - checksum: bfdffd634ce72f3b17e3d085d071f2fe7ce9680aebdf10713d74b30afd80ef882d17f19ff7175fcb049431a56e800bd3558d3b028bd0d82341927edb303ab450 - languageName: node - linkType: hard - -"@ethereumjs/rlp@npm:^5.0.2": - version: 5.0.2 - resolution: "@ethereumjs/rlp@npm:5.0.2" - bin: - rlp: bin/rlp.cjs - checksum: 2af80d98faf7f64dfb6d739c2df7da7350ff5ad52426c3219897e843ee441215db0ffa346873200a6be6d11142edb9536e66acd62436b5005fa935baaf7eb6bd - languageName: node - linkType: hard - -"@ethereumjs/tx@npm:3.5.2": - version: 3.5.2 - resolution: "@ethereumjs/tx@npm:3.5.2" - dependencies: - "@ethereumjs/common": "npm:^2.6.4" - ethereumjs-util: "npm:^7.1.5" - checksum: 891e12738206229ac428685536844f7765e8547ae794462b1e406399445bf1f6f918af6ebc33ee5fa4a1340f14f48871a579f11c0e1d7c142ba0dd525bae5df5 - languageName: node - linkType: hard - -"@ethereumjs/util@npm:8.0.5": - version: 8.0.5 - resolution: "@ethereumjs/util@npm:8.0.5" - dependencies: - "@chainsafe/ssz": "npm:0.9.4" - "@ethereumjs/rlp": "npm:^4.0.1" - ethereum-cryptography: "npm:^1.1.2" - checksum: 21d5d8f6ffacaa03aa7b2a9daab1f430db02aa60adb5e9e204e75b794af4888a80552e6eb3b54c3de9eca3a15cd60306354d56878118ab64c3a4643a0445cd0d - languageName: node - linkType: hard - -"@ethereumjs/util@npm:^8.1.0": - version: 8.1.0 - resolution: "@ethereumjs/util@npm:8.1.0" - dependencies: - "@ethereumjs/rlp": "npm:^4.0.1" - ethereum-cryptography: "npm:^2.0.0" - micro-ftch: "npm:^0.3.1" - checksum: cc35338932e49b15e54ca6e548b32a1f48eed7d7e1d34ee743e4d3600dd616668bd50f70139e86c5c35f55aac35fba3b6cc4e6f679cf650aeba66bf93016200c - languageName: node - linkType: hard - -"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.5.0, @ethersproject/abi@npm:^5.6.3, @ethersproject/abi@npm:^5.7.0": +"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.5.0, @ethersproject/abi@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/abi@npm:5.7.0" dependencies: @@ -3168,7 +3047,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/transactions@npm:5.7.0, @ethersproject/transactions@npm:^5.6.2, @ethersproject/transactions@npm:^5.7.0": +"@ethersproject/transactions@npm:5.7.0, @ethersproject/transactions@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/transactions@npm:5.7.0" dependencies: @@ -4326,15 +4205,6 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0": - version: 1.1.0 - resolution: "@noble/curves@npm:1.1.0" - dependencies: - "@noble/hashes": "npm:1.3.1" - checksum: 7028e3f19a4a2a601f9159e5423f51ae86ab231bed79a6e40649b063e1ed7f55f5da0475f1377bd2c5a8e5fc485af9ce0549ad89da6b983d6af48e5d0a2041ca - languageName: node - linkType: hard - "@noble/curves@npm:1.3.0, @noble/curves@npm:^1.3.0, @noble/curves@npm:~1.3.0": version: 1.3.0 resolution: "@noble/curves@npm:1.3.0" @@ -4353,6 +4223,15 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.9.1": + version: 1.9.1 + resolution: "@noble/curves@npm:1.9.1" + dependencies: + "@noble/hashes": "npm:1.8.0" + checksum: 5c82ec828ca4a4218b1666ba0ddffde17afd224d0bd5e07b64c2a0c83a3362483387f55c11cfd8db0fc046605394fe4e2c67fe024628a713e864acb541a7d2bb + languageName: node + linkType: hard + "@noble/curves@npm:1.9.2": version: 1.9.2 resolution: "@noble/curves@npm:1.9.2" @@ -4380,20 +4259,6 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.2.0, @noble/hashes@npm:~1.2.0": - version: 1.2.0 - resolution: "@noble/hashes@npm:1.2.0" - checksum: c295684a2799f4ddad10a855efd9b82c70c27ac5f7437642df9700e120087c796851dd95b12d2e7596802303fe6afbfdf0f8733b5c7453f70c4c080746dde6ff - languageName: node - linkType: hard - -"@noble/hashes@npm:1.3.1": - version: 1.3.1 - resolution: "@noble/hashes@npm:1.3.1" - checksum: 39474bab7e7813dbbfd8750476f48046d3004984e161fcd4333e40ca823f07b069010b35a20246e5b4ac20858e29913172a4d69720fd1e93620f7bedb70f9b72 - languageName: node - linkType: hard - "@noble/hashes@npm:1.3.3, @noble/hashes@npm:^1.3.3, @noble/hashes@npm:~1.3.2": version: 1.3.3 resolution: "@noble/hashes@npm:1.3.3" @@ -4422,20 +4287,6 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": - version: 1.3.2 - resolution: "@noble/hashes@npm:1.3.2" - checksum: 685f59d2d44d88e738114b71011d343a9f7dce9dfb0a121f1489132f9247baa60bc985e5ec6f3213d114fbd1e1168e7294644e46cbd0ce2eba37994f28eeb51b - languageName: node - linkType: hard - -"@noble/secp256k1@npm:1.7.1, @noble/secp256k1@npm:~1.7.0": - version: 1.7.1 - resolution: "@noble/secp256k1@npm:1.7.1" - checksum: 214d4756c20ed20809d948d0cc161e95664198cb127266faf747fd7deffe5444901f05fe9f833787738f2c6e60b09e544c2f737f42f73b3699e3999ba15b1b63 - languageName: node - linkType: hard - "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -5218,7 +5069,7 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:~1.1.0, @scure/base@npm:~1.1.4": +"@scure/base@npm:~1.1.4": version: 1.1.5 resolution: "@scure/base@npm:1.1.5" checksum: 543fa9991c6378b6a0d5ab7f1e27b30bb9c1e860d3ac81119b4213cfdf0ad7b61be004e06506e89de7ce0cec9391c17f5c082bb34c3b617a2ee6a04129f52481 @@ -5239,28 +5090,6 @@ __metadata: languageName: node linkType: hard -"@scure/bip32@npm:1.1.5": - version: 1.1.5 - resolution: "@scure/bip32@npm:1.1.5" - dependencies: - "@noble/hashes": "npm:~1.2.0" - "@noble/secp256k1": "npm:~1.7.0" - "@scure/base": "npm:~1.1.0" - checksum: 4c83e943a66e7b212d18f47b4650ed9b1dfeb69d8bdd8b491b12ba70ca8635cda67fb1ac920d642d66c8a3c2c03303b623c1faceafe7141a6f20a7cd7f66191e - languageName: node - linkType: hard - -"@scure/bip32@npm:1.3.1": - version: 1.3.1 - resolution: "@scure/bip32@npm:1.3.1" - dependencies: - "@noble/curves": "npm:~1.1.0" - "@noble/hashes": "npm:~1.3.1" - "@scure/base": "npm:~1.1.0" - checksum: 0595955374dfa54a60adfa33d4793fd8b27230e962aaceb5bb5fcf8ccbb935184aa2c45154ec9bdfb26a1877b2ae0a8e4808c9a5464d4ffd971120740b816def - languageName: node - linkType: hard - "@scure/bip32@npm:1.5.0": version: 1.5.0 resolution: "@scure/bip32@npm:1.5.0" @@ -5294,26 +5123,6 @@ __metadata: languageName: node linkType: hard -"@scure/bip39@npm:1.1.1": - version: 1.1.1 - resolution: "@scure/bip39@npm:1.1.1" - dependencies: - "@noble/hashes": "npm:~1.2.0" - "@scure/base": "npm:~1.1.0" - checksum: 08908145e0890e481e3398191424961d9ebfb8913fed6e6cdfc63eb1281bd1895244d46c0e8762b0e30d8dc6f498ed296311382fecbf034253838e3a50f60ca1 - languageName: node - linkType: hard - -"@scure/bip39@npm:1.2.1": - version: 1.2.1 - resolution: "@scure/bip39@npm:1.2.1" - dependencies: - "@noble/hashes": "npm:~1.3.0" - "@scure/base": "npm:~1.1.0" - checksum: 2ea368bbed34d6b1701c20683bf465e147f231a9e37e639b8c82f585d6f978bb0f3855fca7ceff04954ae248b3e313f5d322d0210614fb7acb402739415aaf31 - languageName: node - linkType: hard - "@scure/bip39@npm:1.4.0": version: 1.4.0 resolution: "@scure/bip39@npm:1.4.0" @@ -5461,13 +5270,6 @@ __metadata: languageName: node linkType: hard -"@sindresorhus/is@npm:^4.0.0, @sindresorhus/is@npm:^4.6.0": - version: 4.6.0 - resolution: "@sindresorhus/is@npm:4.6.0" - checksum: e7f36ed72abfcd5e0355f7423a72918b9748bb1ef370a59f3e5ad8d40b728b85d63b272f65f63eec1faf417cda89dcb0aeebe94015647b6054659c1442fe5ce0 - languageName: node - linkType: hard - "@sindresorhus/is@npm:^5.2.0": version: 5.6.0 resolution: "@sindresorhus/is@npm:5.6.0" @@ -6185,15 +5987,6 @@ __metadata: languageName: node linkType: hard -"@szmarczak/http-timer@npm:^4.0.5": - version: 4.0.6 - resolution: "@szmarczak/http-timer@npm:4.0.6" - dependencies: - defer-to-connect: "npm:^2.0.0" - checksum: c29df3bcec6fc3bdec2b17981d89d9c9fc9bd7d0c9bcfe92821dc533f4440bc890ccde79971838b4ceed1921d456973c4180d7175ee1d0023ad0562240a58d95 - languageName: node - linkType: hard - "@szmarczak/http-timer@npm:^5.0.1": version: 5.0.1 resolution: "@szmarczak/http-timer@npm:5.0.1" @@ -6338,18 +6131,6 @@ __metadata: languageName: node linkType: hard -"@types/cacheable-request@npm:^6.0.1, @types/cacheable-request@npm:^6.0.2": - version: 6.0.3 - resolution: "@types/cacheable-request@npm:6.0.3" - dependencies: - "@types/http-cache-semantics": "npm:*" - "@types/keyv": "npm:^3.1.4" - "@types/node": "npm:*" - "@types/responselike": "npm:^1.0.0" - checksum: 159f9fdb2a1b7175eef453ae2ced5ea04c0d2b9610cc9ccd9f9abb066d36dacb1f37acd879ace10ad7cbb649490723feb396fb7307004c9670be29636304b988 - languageName: node - linkType: hard - "@types/cli-progress@npm:^3.11.5": version: 3.11.5 resolution: "@types/cli-progress@npm:3.11.5" @@ -6449,13 +6230,6 @@ __metadata: languageName: node linkType: hard -"@types/http-cache-semantics@npm:*": - version: 4.0.1 - resolution: "@types/http-cache-semantics@npm:4.0.1" - checksum: d059bf8a15d5163cc60da51ba00d17620507f968d0b792cd55f62043016344a5f0e1aa94fa411089d41114035fcd0ea656f968bda7eabb6663a97787e3445a1c - languageName: node - linkType: hard - "@types/http-cache-semantics@npm:^4.0.2": version: 4.0.4 resolution: "@types/http-cache-semantics@npm:4.0.4" @@ -6538,15 +6312,6 @@ __metadata: languageName: node linkType: hard -"@types/keyv@npm:^3.1.4": - version: 3.1.4 - resolution: "@types/keyv@npm:3.1.4" - dependencies: - "@types/node": "npm:*" - checksum: e009a2bfb50e90ca9b7c6e8f648f8464067271fd99116f881073fa6fa76dc8d0133181dd65e6614d5fb1220d671d67b0124aef7d97dc02d7e342ab143a47779d - languageName: node - linkType: hard - "@types/ledgerhq__hw-transport-node-hid@npm:^4.22.5": version: 4.22.5 resolution: "@types/ledgerhq__hw-transport-node-hid@npm:4.22.5" @@ -6643,7 +6408,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^12.12.6, @types/node@npm:^12.7.1": +"@types/node@npm:^12.7.1": version: 12.20.55 resolution: "@types/node@npm:12.20.55" checksum: 1f916a06fff02faadb09a16ed6e31820ce170798b202ef0b14fc244bfbd721938c54a3a99836e185e4414ca461fe96c5bb5c67c3d248f153555b7e6347f061dd @@ -6719,15 +6484,6 @@ __metadata: languageName: node linkType: hard -"@types/responselike@npm:^1.0.0": - version: 1.0.0 - resolution: "@types/responselike@npm:1.0.0" - dependencies: - "@types/node": "npm:*" - checksum: e4972389457e4edce3cbba5e8474fb33684d73879433a9eec989d0afb7e550fd6fa3ffb8fe68dbb429288d10707796a193bc0007c4e8429fd267bdc4d8404632 - languageName: node - linkType: hard - "@types/rimraf@npm:3.0.2": version: 3.0.2 resolution: "@types/rimraf@npm:3.0.2" @@ -7035,6 +6791,21 @@ __metadata: languageName: node linkType: hard +"abitype@npm:1.2.3, abitype@npm:^1.2.3": + version: 1.2.3 + resolution: "abitype@npm:1.2.3" + peerDependencies: + typescript: ">=5.0.4" + zod: ^3.22.0 || ^4.0.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + checksum: 94e744c2fc301b1cff59163a21b499aae0ddecdf4d3bef1579ff16b705e6f5738fd314125d791ed142487db2473d4fadcdbabb1e05e4b5d35715bc4ef35e400a + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -7044,13 +6815,6 @@ __metadata: languageName: node linkType: hard -"abortcontroller-polyfill@npm:^1.7.5": - version: 1.7.5 - resolution: "abortcontroller-polyfill@npm:1.7.5" - checksum: aac398f7fc076235fe731adaffd2c319fe6c1527af8ca561890242d5396351350e0705726478778dc90326a69a4c044890c156fe867cba7f3ffeb670f8665a51 - languageName: node - linkType: hard - "abstract-level@npm:1.0.3": version: 1.0.3 resolution: "abstract-level@npm:1.0.3" @@ -7080,16 +6844,6 @@ __metadata: languageName: node linkType: hard -"accepts@npm:~1.3.8": - version: 1.3.8 - resolution: "accepts@npm:1.3.8" - dependencies: - mime-types: "npm:~2.1.34" - negotiator: "npm:0.6.3" - checksum: 67eaaa90e2917c58418e7a9b89392002d2b1ccd69bcca4799135d0c632f3b082f23f4ae4ddeedbced5aa59bcc7bdf4699c69ebed4593696c922462b7bc5744d6 - languageName: node - linkType: hard - "acorn-walk@npm:^8.1.1": version: 8.2.0 resolution: "acorn-walk@npm:8.2.0" @@ -7155,18 +6909,6 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.12.3": - version: 6.12.6 - resolution: "ajv@npm:6.12.6" - dependencies: - fast-deep-equal: "npm:^3.1.1" - fast-json-stable-stringify: "npm:^2.0.0" - json-schema-traverse: "npm:^0.4.1" - uri-js: "npm:^4.2.2" - checksum: 48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c - languageName: node - linkType: hard - "ansi-colors@npm:^4.1.1, ansi-colors@npm:^4.1.3": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" @@ -7320,13 +7062,6 @@ __metadata: languageName: node linkType: hard -"array-flatten@npm:1.1.1": - version: 1.1.1 - resolution: "array-flatten@npm:1.1.1" - checksum: e13c9d247241be82f8b4ec71d035ed7204baa82fae820d4db6948d30d3c4a9f2b3905eb2eec2b937d4aa3565200bd3a1c500480114cff649fa748747d2a50feb - languageName: node - linkType: hard - "array-union@npm:^2.1.0": version: 2.1.0 resolution: "array-union@npm:2.1.0" @@ -7341,15 +7076,6 @@ __metadata: languageName: node linkType: hard -"asn1@npm:~0.2.3": - version: 0.2.6 - resolution: "asn1@npm:0.2.6" - dependencies: - safer-buffer: "npm:~2.1.0" - checksum: cf629291fee6c1a6f530549939433ebf32200d7849f38b810ff26ee74235e845c0c12b2ed0f1607ac17383d19b219b69cefa009b920dab57924c5c544e495078 - languageName: node - linkType: hard - "asn1js@npm:^2.4.0": version: 2.4.0 resolution: "asn1js@npm:2.4.0" @@ -7359,13 +7085,6 @@ __metadata: languageName: node linkType: hard -"assert-plus@npm:1.0.0, assert-plus@npm:^1.0.0": - version: 1.0.0 - resolution: "assert-plus@npm:1.0.0" - checksum: f4f991ae2df849cc678b1afba52d512a7cbf0d09613ba111e72255409ff9158550c775162a47b12d015d1b82b3c273e8e25df0e4783d3ddb008a293486d00a07 - languageName: node - linkType: hard - "assertion-error@npm:^2.0.1": version: 2.0.1 resolution: "assertion-error@npm:2.0.1" @@ -7389,13 +7108,6 @@ __metadata: languageName: node linkType: hard -"async-limiter@npm:~1.0.0": - version: 1.0.1 - resolution: "async-limiter@npm:1.0.1" - checksum: 2b849695b465d93ad44c116220dee29a5aeb63adac16c1088983c339b0de57d76e82533e8e364a93a9f997f28bbfc6a92948cefc120652bd07f3b59f8d75cf2b - languageName: node - linkType: hard - "async-retry@npm:^1.3.3": version: 1.3.3 resolution: "async-retry@npm:1.3.3" @@ -7460,20 +7172,6 @@ __metadata: languageName: node linkType: hard -"aws-sign2@npm:~0.7.0": - version: 0.7.0 - resolution: "aws-sign2@npm:0.7.0" - checksum: 2ac497d739f71be3264cf096a33ab256a1fea7fe80b87dc51ec29374505bd5a661279ef1c22989d68528ea61ed634021ca63b31cf1d3c2a3682ffc106f7d0e96 - languageName: node - linkType: hard - -"aws4@npm:^1.8.0": - version: 1.12.0 - resolution: "aws4@npm:1.12.0" - checksum: 2b8455fe1eee87f0e7d5f32e81e7fec74dce060c72d03f528c8c631fa74209cef53aab6fede182ea17d0c9520cb1e5e3023c5fedb4f1139ae9f067fc720869a5 - languageName: node - linkType: hard - "axios@npm:1.7.7": version: 1.7.7 resolution: "axios@npm:1.7.7" @@ -7568,7 +7266,7 @@ __metadata: languageName: node linkType: hard -"base-x@npm:^3.0.2, base-x@npm:^3.0.8": +"base-x@npm:^3.0.2": version: 3.0.9 resolution: "base-x@npm:3.0.9" dependencies: @@ -7584,15 +7282,6 @@ __metadata: languageName: node linkType: hard -"bcrypt-pbkdf@npm:^1.0.0": - version: 1.0.2 - resolution: "bcrypt-pbkdf@npm:1.0.2" - dependencies: - tweetnacl: "npm:^0.14.3" - checksum: 13a4cde058250dbf1fa77a4f1b9a07d32ae2e3b9e28e88a0c7a1827835bc3482f3e478c4a0cfd4da6ff0c46dae07da1061123a995372b32cc563d9975f975404 - languageName: node - linkType: hard - "bech32@npm:1.1.4": version: 1.1.4 resolution: "bech32@npm:1.1.4" @@ -7680,74 +7369,20 @@ __metadata: languageName: node linkType: hard -"bluebird@npm:^3.5.0": - version: 3.7.2 - resolution: "bluebird@npm:3.7.2" - checksum: 007c7bad22c5d799c8dd49c85b47d012a1fe3045be57447721e6afbd1d5be43237af1db62e26cb9b0d9ba812d2e4ca3bac82f6d7e016b6b88de06ee25ceb96e7 - languageName: node - linkType: hard - -"bn.js@npm:4.11.6": - version: 4.11.6 - resolution: "bn.js@npm:4.11.6" - checksum: 22741b015c9fff60fce32fc9988331b298eb9b6db5bfb801babb23b846eaaf894e440e0d067b2b3ae4e46aab754e90972f8f333b31bf94a686bbcb054bfa7b14 - languageName: node - linkType: hard - -"bn.js@npm:^4.11.6, bn.js@npm:^4.11.9": +"bn.js@npm:^4.11.9": version: 4.12.0 resolution: "bn.js@npm:4.12.0" checksum: 10f8db196d3da5adfc3207d35d0a42aa29033eb33685f20ba2c36cadfe2de63dad05df0a20ab5aae01b418d1c4b3d4d205273085262fa020d17e93ff32b67527 languageName: node linkType: hard -"bn.js@npm:^5.1.0, bn.js@npm:^5.1.2, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": +"bn.js@npm:^5.1.2, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": version: 5.2.1 resolution: "bn.js@npm:5.2.1" checksum: 7a7e8764d7a6e9708b8b9841b2b3d6019cc154d2fc23716d0efecfe1e16921b7533c6f7361fb05471eab47986c4aa310c270f88e3507172104632ac8df2cfd84 languageName: node linkType: hard -"body-parser@npm:1.20.1": - version: 1.20.1 - resolution: "body-parser@npm:1.20.1" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.4" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.11.0" - raw-body: "npm:2.5.1" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 5f8d128022a2fb8b6e7990d30878a0182f300b70e46b3f9d358a9433ad6275f0de46add6d63206da3637c01c3b38b6111a7480f7e7ac2e9f7b989f6133fe5510 - languageName: node - linkType: hard - -"body-parser@npm:^1.16.0": - version: 1.20.2 - resolution: "body-parser@npm:1.20.2" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.5" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.11.0" - raw-body: "npm:2.5.2" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 3cf171b82190cf91495c262b073e425fc0d9e25cc2bf4540d43f7e7bbca27d6a9eae65ca367b6ef3993eea261159d9d2ab37ce444e8979323952e12eb3df319a - languageName: node - linkType: hard - "bowser@npm:^2.11.0": version: 2.11.0 resolution: "bowser@npm:2.11.0" @@ -7889,6 +7524,13 @@ __metadata: languageName: node linkType: hard +"buffer-equal-constant-time@patch:buffer-equal-constant-time@npm%3A1.0.1#~/.yarn/patches/buffer-equal-constant-time-npm-1.0.1-41826f3419.patch": + version: 1.0.1 + resolution: "buffer-equal-constant-time@patch:buffer-equal-constant-time@npm%3A1.0.1#~/.yarn/patches/buffer-equal-constant-time-npm-1.0.1-41826f3419.patch::version=1.0.1&hash=b43211" + checksum: b92a499e7e2773feae46a9245b8b151d128b0e4dfe9e62c7724de1f7ba7ae5ec6c7c96328f26556111b021ca61a9a273377ebe4239e015e6719c9e8c9cf0f15c + languageName: node + linkType: hard + "buffer-fill@npm:^1.0.0": version: 1.0.0 resolution: "buffer-fill@npm:1.0.0" @@ -7903,13 +7545,6 @@ __metadata: languageName: node linkType: hard -"buffer-to-arraybuffer@npm:^0.0.5": - version: 0.0.5 - resolution: "buffer-to-arraybuffer@npm:0.0.5" - checksum: df16190b3bf0ecdf70e761514ecc8dbb9b8310e7c2882c800dc6d2d06859b9c85baa67f4cad53aaf9f0cbdd936f4b1c09f549eed8ae33c1c1258d7b6b1648cde - languageName: node - linkType: hard - "buffer-xor@npm:^1.0.3": version: 1.0.3 resolution: "buffer-xor@npm:1.0.3" @@ -7928,7 +7563,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.0.5, buffer@npm:^5.4.3, buffer@npm:^5.5.0, buffer@npm:^5.6.0": +"buffer@npm:^5.4.3, buffer@npm:^5.5.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -7958,16 +7593,6 @@ __metadata: languageName: node linkType: hard -"bufferutil@npm:^4.0.1": - version: 4.0.7 - resolution: "bufferutil@npm:4.0.7" - dependencies: - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.3.0" - checksum: 01e2144e88a6cb1cd8e4e0bb1ec622c6e400646fb451a672d20e7d40cdc7d4a82a64dbcda6f5f92b36eeca0d1e5290baf7af707994f7b7c87e911d51a265bf07 - languageName: node - linkType: hard - "builtins@npm:^5.0.0": version: 5.0.1 resolution: "builtins@npm:5.0.1" @@ -7984,13 +7609,6 @@ __metadata: languageName: node linkType: hard -"bytes@npm:3.1.2": - version: 3.1.2 - resolution: "bytes@npm:3.1.2" - checksum: a10abf2ba70c784471d6b4f58778c0beeb2b5d405148e66affa91f23a9f13d07603d0a0354667310ae1d6dc141474ffd44e2a074be0f6e2254edb8fc21445388 - languageName: node - linkType: hard - "cac@npm:^6.7.14": version: 6.7.14 resolution: "cac@npm:6.7.14" @@ -8038,20 +7656,6 @@ __metadata: languageName: node linkType: hard -"cacheable-lookup@npm:^5.0.3": - version: 5.0.4 - resolution: "cacheable-lookup@npm:5.0.4" - checksum: 618a8b3eea314060e74cb3285a6154e8343c244a34235acf91cfe626ee0705c24e3cd11e4b1a7b3900bd749ee203ae65afe13adf610c8ab173e99d4a208faf75 - languageName: node - linkType: hard - -"cacheable-lookup@npm:^6.0.4": - version: 6.1.0 - resolution: "cacheable-lookup@npm:6.1.0" - checksum: 9b37d31fba27ff244254294814dfdad69e3d257cb283932f58823141de5043a46d35339fa81ec40fdbb5d76d1578324258995f41a4fd37ed05d4e9b54823802e - languageName: node - linkType: hard - "cacheable-lookup@npm:^7.0.0": version: 7.0.0 resolution: "cacheable-lookup@npm:7.0.0" @@ -8074,22 +7678,7 @@ __metadata: languageName: node linkType: hard -"cacheable-request@npm:^7.0.2": - version: 7.0.2 - resolution: "cacheable-request@npm:7.0.2" - dependencies: - clone-response: "npm:^1.0.2" - get-stream: "npm:^5.1.0" - http-cache-semantics: "npm:^4.0.0" - keyv: "npm:^4.0.0" - lowercase-keys: "npm:^2.0.0" - normalize-url: "npm:^6.0.1" - responselike: "npm:^2.0.0" - checksum: 51404dd0b669d34f68f191d88d84e0d223e274808f7ab668192bc65e2a9133b4f5948a509d8272766dd19e46decb25b53ca1e23d3ec3846937250f4eb1f9c7d9 - languageName: node - linkType: hard - -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": +"call-bind@npm:^1.0.2": version: 1.0.5 resolution: "call-bind@npm:1.0.5" dependencies: @@ -8161,20 +7750,6 @@ __metadata: languageName: node linkType: hard -"case@npm:^1.6.3": - version: 1.6.3 - resolution: "case@npm:1.6.3" - checksum: 2fc1df75bbb4118339e06141b9a54aba95cc62460ac92730290144fbec6b6a04f5bf7abf6a6486a1338f5821bd184402f216cec8cea0472451759c27e20fc332 - languageName: node - linkType: hard - -"caseless@npm:~0.12.0": - version: 0.12.0 - resolution: "caseless@npm:0.12.0" - checksum: ea1efdf430975fdbac3505cdd21007f7ac5aa29b6d4d1c091f965853cd1bf87e4b08ea07b31a6d688b038872b7cdf0589d9262d59c699d199585daad052aeb20 - languageName: node - linkType: hard - "catering@npm:^2.0.0, catering@npm:^2.1.0": version: 2.1.1 resolution: "catering@npm:2.1.1" @@ -8302,7 +7877,7 @@ __metadata: languageName: node linkType: hard -"chownr@npm:^1.0.1, chownr@npm:^1.1.1, chownr@npm:^1.1.4": +"chownr@npm:^1.0.1, chownr@npm:^1.1.1": version: 1.1.4 resolution: "chownr@npm:1.1.4" checksum: 115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d @@ -8367,19 +7942,6 @@ __metadata: languageName: node linkType: hard -"cids@npm:^0.7.1": - version: 0.7.5 - resolution: "cids@npm:0.7.5" - dependencies: - buffer: "npm:^5.5.0" - class-is: "npm:^1.1.0" - multibase: "npm:~0.6.0" - multicodec: "npm:^1.0.0" - multihashes: "npm:~0.4.15" - checksum: b916b0787e238dd9f84fb5e155333cadf07fd7ad34ea8dbd47f98bb618eecc9c70760767c0966d0eae73050c4fa6080fdc387e515565b009d2126253c7775fac - languageName: node - linkType: hard - "cipher-base@npm:^1.0.0, cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": version: 1.0.4 resolution: "cipher-base@npm:1.0.4" @@ -8397,13 +7959,6 @@ __metadata: languageName: node linkType: hard -"class-is@npm:^1.1.0": - version: 1.1.0 - resolution: "class-is@npm:1.1.0" - checksum: 8147a3e4ce86eb103d78621d665b87e8e33fcb3f54932fdca894b8222820903b43b2f6b4335d8822104702a5dc904c8f187127fdea4e7d48d905488b35c9e6a7 - languageName: node - linkType: hard - "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" @@ -8528,15 +8083,6 @@ __metadata: languageName: node linkType: hard -"clone-response@npm:^1.0.2": - version: 1.0.3 - resolution: "clone-response@npm:1.0.3" - dependencies: - mimic-response: "npm:^1.0.0" - checksum: 4e671cac39b11c60aa8ba0a450657194a5d6504df51bca3fac5b3bd0145c4f8e8464898f87c8406b83232e3bc5cca555f51c1f9c8ac023969ebfbf7f6bdabb2e - languageName: node - linkType: hard - "cmd-shim@npm:^7.0.0": version: 7.0.0 resolution: "cmd-shim@npm:7.0.0" @@ -8633,7 +8179,7 @@ __metadata: languageName: node linkType: hard -"combined-stream@npm:^1.0.6, combined-stream@npm:^1.0.8, combined-stream@npm:~1.0.6": +"combined-stream@npm:^1.0.8": version: 1.0.8 resolution: "combined-stream@npm:1.0.8" dependencies: @@ -8691,30 +8237,10 @@ __metadata: languageName: node linkType: hard -"content-disposition@npm:0.5.4": - version: 0.5.4 - resolution: "content-disposition@npm:0.5.4" - dependencies: - safe-buffer: "npm:5.2.1" - checksum: b7f4ce176e324f19324be69b05bf6f6e411160ac94bc523b782248129eb1ef3be006f6cff431aaea5e337fe5d176ce8830b8c2a1b721626ead8933f0cbe78720 - languageName: node - linkType: hard - -"content-hash@npm:^2.5.2": - version: 2.5.2 - resolution: "content-hash@npm:2.5.2" - dependencies: - cids: "npm:^0.7.1" - multicodec: "npm:^0.5.5" - multihashes: "npm:^0.4.15" - checksum: 7c5d05052aecead40a1bbdd251468a6cc9bf4c48b361b4f138d60e6d876dc3028da6142031578ddc42e44e0024f91cc01b7a539bdb0bf7187e36bec15052e02d - languageName: node - linkType: hard - -"content-type@npm:^1.0.4, content-type@npm:~1.0.4, content-type@npm:~1.0.5": - version: 1.0.5 - resolution: "content-type@npm:1.0.5" - checksum: 585847d98dc7fb8035c02ae2cb76c7a9bd7b25f84c447e5ed55c45c2175e83617c8813871b4ee22f368126af6b2b167df655829007b21aa10302873ea9c62662 +"content-type@npm:^1.0.4": + version: 1.0.5 + resolution: "content-type@npm:1.0.5" + checksum: 585847d98dc7fb8035c02ae2cb76c7a9bd7b25f84c447e5ed55c45c2175e83617c8813871b4ee22f368126af6b2b167df655829007b21aa10302873ea9c62662 languageName: node linkType: hard @@ -8739,27 +8265,6 @@ __metadata: languageName: node linkType: hard -"cookie-signature@npm:1.0.6": - version: 1.0.6 - resolution: "cookie-signature@npm:1.0.6" - checksum: f4e1b0a98a27a0e6e66fd7ea4e4e9d8e038f624058371bf4499cfcd8f3980be9a121486995202ba3fca74fbed93a407d6d54d43a43f96fd28d0bd7a06761591a - languageName: node - linkType: hard - -"cookie@npm:0.5.0": - version: 0.5.0 - resolution: "cookie@npm:0.5.0" - checksum: aae7911ddc5f444a9025fbd979ad1b5d60191011339bce48e555cb83343d0f98b865ff5c4d71fecdfb8555a5cafdc65632f6fce172f32aaf6936830a883a0380 - languageName: node - linkType: hard - -"core-util-is@npm:1.0.2": - version: 1.0.2 - resolution: "core-util-is@npm:1.0.2" - checksum: d0f7587346b44a1fe6c269267e037dd34b4787191e473c3e685f507229d88561c40eb18872fabfff02977301815d474300b7bfbd15396c13c5377393f7e87ec3 - languageName: node - linkType: hard - "core-util-is@npm:~1.0.0": version: 1.0.3 resolution: "core-util-is@npm:1.0.3" @@ -8767,16 +8272,6 @@ __metadata: languageName: node linkType: hard -"cors@npm:^2.8.1": - version: 2.8.5 - resolution: "cors@npm:2.8.5" - dependencies: - object-assign: "npm:^4" - vary: "npm:^1" - checksum: 66e88e08edee7cbce9d92b4d28a2028c88772a4c73e02f143ed8ca76789f9b59444eed6b1c167139e76fa662998c151322720093ba229f9941365ada5a6fc2c6 - languageName: node - linkType: hard - "country-data@npm:^0.0.31": version: 0.0.31 resolution: "country-data@npm:0.0.31" @@ -8787,15 +8282,6 @@ __metadata: languageName: node linkType: hard -"crc-32@npm:^1.2.0": - version: 1.2.2 - resolution: "crc-32@npm:1.2.2" - bin: - crc32: bin/crc32.njs - checksum: 824f696a5baaf617809aa9cd033313c8f94f12d15ebffa69f10202480396be44aef9831d900ab291638a8022ed91c360696dd5b1ba691eb3f34e60be8835b7c3 - languageName: node - linkType: hard - "create-hash@npm:^1.1.0, create-hash@npm:^1.1.2, create-hash@npm:^1.2.0": version: 1.2.0 resolution: "create-hash@npm:1.2.0" @@ -8856,15 +8342,6 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:^4.0.0": - version: 4.0.0 - resolution: "cross-fetch@npm:4.0.0" - dependencies: - node-fetch: "npm:^2.6.12" - checksum: e231a71926644ef122d334a3a4e73d9ba3ba4b480a8a277fb9badc434c1ba905b3d60c8034e18b348361a09afbec40ba9371036801ba2b675a7b84588f9f55d8 - languageName: node - linkType: hard - "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" @@ -8917,25 +8394,6 @@ __metadata: languageName: node linkType: hard -"d@npm:1, d@npm:^1.0.1": - version: 1.0.1 - resolution: "d@npm:1.0.1" - dependencies: - es5-ext: "npm:^0.10.50" - type: "npm:^1.0.1" - checksum: 1296e3f92e646895681c1cb564abd0eb23c29db7d62c5120a279e84e98915499a477808e9580760f09e3744c0ed7ac8f7cff98d096ba9770754f6ef0f1c97983 - languageName: node - linkType: hard - -"dashdash@npm:^1.12.0": - version: 1.14.1 - resolution: "dashdash@npm:1.14.1" - dependencies: - assert-plus: "npm:^1.0.0" - checksum: 137b287fa021201ce100cef772c8eeeaaafdd2aa7282864022acf3b873021e54cb809e9c060fa164840bf54ff72d00d6e2d8da1ee5a86d7200eeefa1123a8f7f - languageName: node - linkType: hard - "data-uri-to-buffer@npm:^4.0.0": version: 4.0.1 resolution: "data-uri-to-buffer@npm:4.0.1" @@ -8950,15 +8408,6 @@ __metadata: languageName: node linkType: hard -"debug@npm:2.6.9, debug@npm:^2.2.0": - version: 2.6.9 - resolution: "debug@npm:2.6.9" - dependencies: - ms: "npm:2.0.0" - checksum: e07005f2b40e04f1bd14a3dd20520e9c4f25f60224cb006ce9d6781732c917964e9ec029fc7f1a151083cd929025ad5133814d4dc624a9aaf020effe4914ed14 - languageName: node - linkType: hard - "debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" @@ -9014,22 +8463,6 @@ __metadata: languageName: node linkType: hard -"decode-uri-component@npm:^0.2.0": - version: 0.2.2 - resolution: "decode-uri-component@npm:0.2.2" - checksum: 17a0e5fa400bf9ea84432226e252aa7b5e72793e16bf80b907c99b46a799aeacc139ec20ea57121e50c7bd875a1a4365928f884e92abf02e21a5a13790a0f33e - languageName: node - linkType: hard - -"decompress-response@npm:^3.3.0": - version: 3.3.0 - resolution: "decompress-response@npm:3.3.0" - dependencies: - mimic-response: "npm:^1.0.0" - checksum: 952552ac3bd7de2fc18015086b09468645c9638d98a551305e485230ada278c039c91116e946d07894b39ee53c0f0d5b6473f25a224029344354513b412d7380 - languageName: node - linkType: hard - "decompress-response@npm:^6.0.0": version: 6.0.0 resolution: "decompress-response@npm:6.0.0" @@ -9072,7 +8505,7 @@ __metadata: languageName: node linkType: hard -"defer-to-connect@npm:^2.0.0, defer-to-connect@npm:^2.0.1": +"defer-to-connect@npm:^2.0.1": version: 2.0.1 resolution: "defer-to-connect@npm:2.0.1" checksum: 8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b @@ -9104,20 +8537,6 @@ __metadata: languageName: node linkType: hard -"depd@npm:2.0.0": - version: 2.0.0 - resolution: "depd@npm:2.0.0" - checksum: c0c8ff36079ce5ada64f46cc9d6fd47ebcf38241105b6e0c98f412e8ad91f084bcf906ff644cc3a4bd876ca27a62accb8b0fff72ea6ed1a414b89d8506f4a5ca - languageName: node - linkType: hard - -"destroy@npm:1.2.0": - version: 1.2.0 - resolution: "destroy@npm:1.2.0" - checksum: 0acb300b7478a08b92d810ab229d5afe0d2f4399272045ab22affa0d99dbaf12637659411530a6fcd597a9bdac718fc94373a61a95b4651bbc7b83684a565e38 - languageName: node - linkType: hard - "detect-indent@npm:^6.0.0": version: 6.1.0 resolution: "detect-indent@npm:6.1.0" @@ -9190,13 +8609,6 @@ __metadata: languageName: node linkType: hard -"dom-walk@npm:^0.1.0": - version: 0.1.2 - resolution: "dom-walk@npm:0.1.2" - checksum: 19eb0ce9c6de39d5e231530685248545d9cd2bd97b2cb3486e0bfc0f2a393a9addddfd5557463a932b52fdfcf68ad2a619020cd2c74a5fe46fbecaa8e80872f3 - languageName: node - linkType: hard - "dot-case@npm:^3.0.4": version: 3.0.4 resolution: "dot-case@npm:3.0.4" @@ -9233,16 +8645,6 @@ __metadata: languageName: node linkType: hard -"ecc-jsbn@npm:~0.1.1": - version: 0.1.2 - resolution: "ecc-jsbn@npm:0.1.2" - dependencies: - jsbn: "npm:~0.1.0" - safer-buffer: "npm:^2.1.0" - checksum: d43591f2396196266e186e6d6928038cc11c76c3699a912cb9c13757060f7bbc7f17f47c4cb16168cdeacffc7965aef021142577e646fb3cb88810c15173eb57 - languageName: node - linkType: hard - "ecdsa-sig-formatter@npm:1.0.11, ecdsa-sig-formatter@npm:^1.0.11": version: 1.0.11 resolution: "ecdsa-sig-formatter@npm:1.0.11" @@ -9252,13 +8654,6 @@ __metadata: languageName: node linkType: hard -"ee-first@npm:1.1.1": - version: 1.1.1 - resolution: "ee-first@npm:1.1.1" - checksum: 1b4cac778d64ce3b582a7e26b218afe07e207a0f9bfe13cc7395a6d307849cfe361e65033c3251e00c27dd060cab43014c2d6b2647676135e18b77d2d05b3f4f - languageName: node - linkType: hard - "eip55@npm:^2.1.1": version: 2.1.1 resolution: "eip55@npm:2.1.1" @@ -9286,7 +8681,7 @@ __metadata: languageName: node linkType: hard -"elliptic@npm:6.5.4, elliptic@npm:^6.4.0, elliptic@npm:^6.5.4": +"elliptic@npm:6.5.4, elliptic@npm:^6.5.4": version: 6.5.4 resolution: "elliptic@npm:6.5.4" dependencies: @@ -9343,13 +8738,6 @@ __metadata: languageName: node linkType: hard -"encodeurl@npm:~1.0.2": - version: 1.0.2 - resolution: "encodeurl@npm:1.0.2" - checksum: e50e3d508cdd9c4565ba72d2012e65038e5d71bdc9198cb125beb6237b5b1ade6c0d343998da9e170fb2eae52c1bed37d4d6d98a46ea423a0cddbed5ac3f780c - languageName: node - linkType: hard - "encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -9422,45 +8810,6 @@ __metadata: languageName: node linkType: hard -"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.50": - version: 0.10.62 - resolution: "es5-ext@npm:0.10.62" - dependencies: - es6-iterator: "npm:^2.0.3" - es6-symbol: "npm:^3.1.3" - next-tick: "npm:^1.1.0" - checksum: 3f6a3bcdb7ff82aaf65265799729828023c687a2645da04005b8f1dc6676a0c41fd06571b2517f89dcf143e0268d3d9ef0fdfd536ab74580083204c688d6fb45 - languageName: node - linkType: hard - -"es6-iterator@npm:^2.0.3": - version: 2.0.3 - resolution: "es6-iterator@npm:2.0.3" - dependencies: - d: "npm:1" - es5-ext: "npm:^0.10.35" - es6-symbol: "npm:^3.1.1" - checksum: dbadecf3d0e467692815c2b438dfa99e5a97cbbecf4a58720adcb467a04220e0e36282399ba297911fd472c50ae4158fffba7ed0b7d4273fe322b69d03f9e3a5 - languageName: node - linkType: hard - -"es6-promise@npm:^4.2.8": - version: 4.2.8 - resolution: "es6-promise@npm:4.2.8" - checksum: b250c55523c496c43c9216c2646e58ec182b819e036fe5eb8d83fa16f044ecc6b8dcefc88ace2097be3d3c4d02b6aa8eeae1a66deeaf13e7bee905ebabb350a3 - languageName: node - linkType: hard - -"es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3": - version: 3.1.3 - resolution: "es6-symbol@npm:3.1.3" - dependencies: - d: "npm:^1.0.1" - ext: "npm:^1.1.2" - checksum: b404e5ecae1a076058aa2ba2568d87e2cb4490cb1130784b84e7b4c09c570b487d4f58ed685a08db8d350bd4916500dd3d623b26e6b3520841d30d2ebb152f8d - languageName: node - linkType: hard - "esbuild@npm:^0.25.0": version: 0.25.4 resolution: "esbuild@npm:0.25.4" @@ -9554,13 +8903,6 @@ __metadata: languageName: node linkType: hard -"escape-html@npm:~1.0.3": - version: 1.0.3 - resolution: "escape-html@npm:1.0.3" - checksum: 6213ca9ae00d0ab8bccb6d8d4e0a98e76237b2410302cf7df70aaa6591d509a2a37ce8998008cbecae8fc8ffaadf3fb0229535e6a145f3ce0b211d060decbb24 - languageName: node - linkType: hard - "escape-string-regexp@npm:4.0.0": version: 4.0.0 resolution: "escape-string-regexp@npm:4.0.0" @@ -9601,57 +8943,6 @@ __metadata: languageName: node linkType: hard -"etag@npm:~1.8.1": - version: 1.8.1 - resolution: "etag@npm:1.8.1" - checksum: 571aeb3dbe0f2bbd4e4fadbdb44f325fc75335cd5f6f6b6a091e6a06a9f25ed5392f0863c5442acb0646787446e816f13cbfc6edce5b07658541dff573cab1ff - languageName: node - linkType: hard - -"eth-ens-namehash@npm:2.0.8": - version: 2.0.8 - resolution: "eth-ens-namehash@npm:2.0.8" - dependencies: - idna-uts46-hx: "npm:^2.3.1" - js-sha3: "npm:^0.5.7" - checksum: 098c04378b0b998191b4bcd2f1a59be976946bbb80cea7bc2a6d1df3a035e061b2fd120b16bf41558c4beb2dd846433742058b091b20195e4b0e1fc64b67979f - languageName: node - linkType: hard - -"eth-lib@npm:0.2.8": - version: 0.2.8 - resolution: "eth-lib@npm:0.2.8" - dependencies: - bn.js: "npm:^4.11.6" - elliptic: "npm:^6.4.0" - xhr-request-promise: "npm:^0.1.2" - checksum: 85a6f1673c7106252864fdf6c86973d6bfdf454b238ee8d07d8f642599fa9f390129b6fbd060742a5be7c197be924951535a0c0ebb3e912cfd9f2130b64f74ce - languageName: node - linkType: hard - -"eth-lib@npm:^0.1.26": - version: 0.1.29 - resolution: "eth-lib@npm:0.1.29" - dependencies: - bn.js: "npm:^4.11.6" - elliptic: "npm:^6.4.0" - nano-json-stream-parser: "npm:^0.1.2" - servify: "npm:^0.1.12" - ws: "npm:^3.0.0" - xhr-request-promise: "npm:^0.1.2" - checksum: ee4fcd8400fad0b637c25bd0a4483a54c986b78ac6c4d7fd2a5df12b41468abfa50a66684e315e16894b870d2fcf5d2273a81f429f89c460b275bf4477365f60 - languageName: node - linkType: hard - -"ethereum-bloom-filters@npm:^1.0.6": - version: 1.0.10 - resolution: "ethereum-bloom-filters@npm:1.0.10" - dependencies: - js-sha3: "npm:^0.8.0" - checksum: dc4191c5d810db864ace106886f340b541bf03f1ad3249459ac630cab9c191f1e45c03e935887cca903cca884326e3ac97acfef0a083c7e1a004108f5991f9ba - languageName: node - linkType: hard - "ethereum-cryptography@npm:^0.1.3": version: 0.1.3 resolution: "ethereum-cryptography@npm:0.1.3" @@ -9675,31 +8966,7 @@ __metadata: languageName: node linkType: hard -"ethereum-cryptography@npm:^1.1.2": - version: 1.2.0 - resolution: "ethereum-cryptography@npm:1.2.0" - dependencies: - "@noble/hashes": "npm:1.2.0" - "@noble/secp256k1": "npm:1.7.1" - "@scure/bip32": "npm:1.1.5" - "@scure/bip39": "npm:1.1.1" - checksum: e8b2ab91e0237ed83a6e6ab1aa2a61ee081dea137ac994c7daa935b0b620e866f70e2ac7eb2fb8db2dec044fe22283d2bf940598417e4dccd15a2b704a817a1b - languageName: node - linkType: hard - -"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2": - version: 2.1.2 - resolution: "ethereum-cryptography@npm:2.1.2" - dependencies: - "@noble/curves": "npm:1.1.0" - "@noble/hashes": "npm:1.3.1" - "@scure/bip32": "npm:1.3.1" - "@scure/bip39": "npm:1.2.1" - checksum: 78983d01ac95047158ec03237ba318152b2c707ccc6a44225da11c72ed6ca575ca0c1630eaf9878fc82fe26272d6624939ef6f020cc89ddddfb941a7393ab909 - languageName: node - linkType: hard - -"ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": +"ethereumjs-util@npm:^7.1.2": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -9766,16 +9033,6 @@ __metadata: languageName: node linkType: hard -"ethjs-unit@npm:0.1.6": - version: 0.1.6 - resolution: "ethjs-unit@npm:0.1.6" - dependencies: - bn.js: "npm:4.11.6" - number-to-bn: "npm:1.7.0" - checksum: 35086cb671806992ec36d5dd43ab67e68ad7a9237e42c0e963f9081c88e40147cda86c1a258b0a3180bf2b7bc1960e607c5bcaefdb2196e0f3564acf73276189 - languageName: node - linkType: hard - "event-target-shim@npm:^5.0.0": version: 5.0.1 resolution: "event-target-shim@npm:5.0.1" @@ -9783,13 +9040,6 @@ __metadata: languageName: node linkType: hard -"eventemitter3@npm:4.0.4": - version: 4.0.4 - resolution: "eventemitter3@npm:4.0.4" - checksum: 6a85beb36d7ff2363de71aa19a17c24ecde7a92f706347891befc5901793e41ac847ce9c04c96dc0f5095384890cc737e64f21ed334e75c523d2352056fc6a9e - languageName: node - linkType: hard - "eventemitter3@npm:5.0.1": version: 5.0.1 resolution: "eventemitter3@npm:5.0.1" @@ -9904,55 +9154,7 @@ __metadata: languageName: node linkType: hard -"express@npm:^4.14.0": - version: 4.18.2 - resolution: "express@npm:4.18.2" - dependencies: - accepts: "npm:~1.3.8" - array-flatten: "npm:1.1.1" - body-parser: "npm:1.20.1" - content-disposition: "npm:0.5.4" - content-type: "npm:~1.0.4" - cookie: "npm:0.5.0" - cookie-signature: "npm:1.0.6" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - finalhandler: "npm:1.2.0" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - merge-descriptors: "npm:1.0.1" - methods: "npm:~1.1.2" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - path-to-regexp: "npm:0.1.7" - proxy-addr: "npm:~2.0.7" - qs: "npm:6.11.0" - range-parser: "npm:~1.2.1" - safe-buffer: "npm:5.2.1" - send: "npm:0.18.0" - serve-static: "npm:1.15.0" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - type-is: "npm:~1.6.18" - utils-merge: "npm:1.0.1" - vary: "npm:~1.1.2" - checksum: 869ae89ed6ff4bed7b373079dc58e5dddcf2915a2669b36037ff78c99d675ae930e5fe052b35c24f56557d28a023bb1cbe3e2f2fb87eaab96a1cedd7e597809d - languageName: node - linkType: hard - -"ext@npm:^1.1.2": - version: 1.7.0 - resolution: "ext@npm:1.7.0" - dependencies: - type: "npm:^2.7.2" - checksum: 666a135980b002df0e75c8ac6c389140cdc59ac953db62770479ee2856d58ce69d2f845e5f2586716350b725400f6945e51e9159573158c39f369984c72dcd84 - languageName: node - linkType: hard - -"extend@npm:^3.0.2, extend@npm:~3.0.2": +"extend@npm:^3.0.2": version: 3.0.2 resolution: "extend@npm:3.0.2" checksum: 59e89e2dc798ec0f54b36d82f32a27d5f6472c53974f61ca098db5d4648430b725387b53449a34df38fd0392045434426b012f302b3cc049a6500ccf82877e4e @@ -9977,27 +9179,6 @@ __metadata: languageName: node linkType: hard -"extsprintf@npm:1.3.0": - version: 1.3.0 - resolution: "extsprintf@npm:1.3.0" - checksum: 26967d6c7ecbfb5bc5b7a6c43503dc5fafd9454802037e9fa1665e41f615da4ff5918bd6cb871a3beabed01a31eca1ccd0bdfb41231f50ad50d405a430f78377 - languageName: node - linkType: hard - -"extsprintf@npm:^1.2.0": - version: 1.4.1 - resolution: "extsprintf@npm:1.4.1" - checksum: bfd6d55f3c0c04d826fe0213264b383c03f32825af6b1ff777f3f2dc49467e599361993568d75b7b19a8ea1bb08c8e7cd8c3d87d179ced91bb0dcf81ca6938e0 - languageName: node - linkType: hard - -"fast-deep-equal@npm:^3.1.1": - version: 3.1.3 - resolution: "fast-deep-equal@npm:3.1.3" - checksum: e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d - languageName: node - linkType: hard - "fast-glob@npm:^3.2.9": version: 3.2.12 resolution: "fast-glob@npm:3.2.12" @@ -10011,7 +9192,7 @@ __metadata: languageName: node linkType: hard -"fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": +"fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" checksum: 2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e @@ -10164,21 +9345,6 @@ __metadata: languageName: node linkType: hard -"finalhandler@npm:1.2.0": - version: 1.2.0 - resolution: "finalhandler@npm:1.2.0" - dependencies: - debug: "npm:2.6.9" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - statuses: "npm:2.0.1" - unpipe: "npm:~1.0.0" - checksum: 635718cb203c6d18e6b48dfbb6c54ccb08ea470e4f474ddcef38c47edcf3227feec316f886dd701235997d8af35240cae49856721ce18f539ad038665ebbf163 - languageName: node - linkType: hard - "find-up@npm:^3.0.0": version: 3.0.0 resolution: "find-up@npm:3.0.0" @@ -10236,20 +9402,6 @@ __metadata: languageName: node linkType: hard -"forever-agent@npm:~0.6.1": - version: 0.6.1 - resolution: "forever-agent@npm:0.6.1" - checksum: c1e1644d5e074ac063ecbc3fb8582013ef91fff0e3fa41e76db23d2f62bc6d9677aac86db950917deed4fe1fdd772df780cfaa352075f23deec9c015313afb97 - languageName: node - linkType: hard - -"form-data-encoder@npm:1.7.1": - version: 1.7.1 - resolution: "form-data-encoder@npm:1.7.1" - checksum: 1abc9059d991b105ba4122a36f9b5c17fd0af77ce8fa59a826a5b9ce56d616807e7780963616dd7e7906ec7aa1ba28cfb7c9defd9747ad10484e039a2b946cca - languageName: node - linkType: hard - "form-data-encoder@npm:^2.1.2": version: 2.1.4 resolution: "form-data-encoder@npm:2.1.4" @@ -10268,17 +9420,6 @@ __metadata: languageName: node linkType: hard -"form-data@npm:~2.3.2": - version: 2.3.3 - resolution: "form-data@npm:2.3.3" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.6" - mime-types: "npm:^2.1.12" - checksum: 1b6f3ccbf4540e535887b42218a2431a3f6cfdea320119c2affa2a7a374ad8fdd1e60166fc865181f45d49b1684c3e90e7b2190d3fe016692957afb9cf0d0d02 - languageName: node - linkType: hard - "formdata-polyfill@npm:^4.0.10": version: 4.0.10 resolution: "formdata-polyfill@npm:4.0.10" @@ -10288,13 +9429,6 @@ __metadata: languageName: node linkType: hard -"forwarded@npm:0.2.0": - version: 0.2.0 - resolution: "forwarded@npm:0.2.0" - checksum: 29ba9fd347117144e97cbb8852baae5e8b2acb7d1b591ef85695ed96f5b933b1804a7fac4a15dd09ca7ac7d0cdc104410e8102aae2dd3faa570a797ba07adb81 - languageName: node - linkType: hard - "fp-ts@npm:2.16.9": version: 2.16.9 resolution: "fp-ts@npm:2.16.9" @@ -10302,13 +9436,6 @@ __metadata: languageName: node linkType: hard -"fresh@npm:0.5.2": - version: 0.5.2 - resolution: "fresh@npm:0.5.2" - checksum: 64c88e489b5d08e2f29664eb3c79c705ff9a8eb15d3e597198ef76546d4ade295897a44abb0abd2700e7ef784b2e3cbf1161e4fbf16f59129193fd1030d16da1 - languageName: node - linkType: hard - "fs-constants@npm:^1.0.0": version: 1.0.0 resolution: "fs-constants@npm:1.0.0" @@ -10316,17 +9443,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^4.0.2": - version: 4.0.3 - resolution: "fs-extra@npm:4.0.3" - dependencies: - graceful-fs: "npm:^4.1.2" - jsonfile: "npm:^4.0.0" - universalify: "npm:^0.1.0" - checksum: c1ab28ac6b19a1e37f9c0fb3a233b7333bd4d12ea2a514b5469ba956f022fa0e2aefa3b351d1117b80ed45495bb779427c8f64727c150bb1599c2ce9ab3b42ac - languageName: node - linkType: hard - "fs-extra@npm:^7.0.1": version: 7.0.1 resolution: "fs-extra@npm:7.0.1" @@ -10349,15 +9465,6 @@ __metadata: languageName: node linkType: hard -"fs-minipass@npm:^1.2.7": - version: 1.2.7 - resolution: "fs-minipass@npm:1.2.7" - dependencies: - minipass: "npm:^2.6.0" - checksum: 6a2d39963eaad748164530ffab49606d0f3462c7867748521af3b7039d13689be533636d50a04e8ba6bd327d4d2e899d0907f8830d1161fe2db467d59cc46dc3 - languageName: node - linkType: hard - "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -10509,7 +9616,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": version: 1.2.2 resolution: "get-intrinsic@npm:1.2.2" dependencies: @@ -10542,15 +9649,6 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^5.1.0": - version: 5.2.0 - resolution: "get-stream@npm:5.2.0" - dependencies: - pump: "npm:^3.0.0" - checksum: 13a73148dca795e41421013da6e3ebff8ccb7fba4d2f023fd0c6da2c166ec4e789bec9774a73a7b49c08daf2cae552f8a3e914042ac23b5f59dd278cc8f9cbfb - languageName: node - linkType: hard - "get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": version: 6.0.1 resolution: "get-stream@npm:6.0.1" @@ -10558,15 +9656,6 @@ __metadata: languageName: node linkType: hard -"getpass@npm:^0.1.1": - version: 0.1.7 - resolution: "getpass@npm:0.1.7" - dependencies: - assert-plus: "npm:^1.0.0" - checksum: ab18d55661db264e3eac6012c2d3daeafaab7a501c035ae0ccb193c3c23e9849c6e29b6ac762b9c2adae460266f925d55a3a2a3a3c8b94be2f222df94d70c046 - languageName: node - linkType: hard - "git-hooks-list@npm:^3.0.0": version: 3.1.0 resolution: "git-hooks-list@npm:3.1.0" @@ -10661,16 +9750,6 @@ __metadata: languageName: node linkType: hard -"global@npm:~4.4.0": - version: 4.4.0 - resolution: "global@npm:4.4.0" - dependencies: - min-document: "npm:^2.19.0" - process: "npm:^0.11.10" - checksum: 9c057557c8f5a5bcfbeb9378ba4fe2255d04679452be504608dd5f13b54edf79f7be1db1031ea06a4ec6edd3b9f5f17d2d172fb47e6c69dae57fd84b7e72b77f - languageName: node - linkType: hard - "globals@npm:^11.1.0": version: 11.12.0 resolution: "globals@npm:11.12.0" @@ -10759,46 +9838,6 @@ __metadata: languageName: node linkType: hard -"got@npm:12.1.0": - version: 12.1.0 - resolution: "got@npm:12.1.0" - dependencies: - "@sindresorhus/is": "npm:^4.6.0" - "@szmarczak/http-timer": "npm:^5.0.1" - "@types/cacheable-request": "npm:^6.0.2" - "@types/responselike": "npm:^1.0.0" - cacheable-lookup: "npm:^6.0.4" - cacheable-request: "npm:^7.0.2" - decompress-response: "npm:^6.0.0" - form-data-encoder: "npm:1.7.1" - get-stream: "npm:^6.0.1" - http2-wrapper: "npm:^2.1.10" - lowercase-keys: "npm:^3.0.0" - p-cancelable: "npm:^3.0.0" - responselike: "npm:^2.0.0" - checksum: d1dab1884b14d1f59d10005ee3834faf6d9b43530c7faf603c176d35dceb2b8e0e2e01b9e0d4fc320409ac1b4d958196ff928dc6df0ddd0a3e7a254aa9edfd45 - languageName: node - linkType: hard - -"got@npm:^11.8.5": - version: 11.8.6 - resolution: "got@npm:11.8.6" - dependencies: - "@sindresorhus/is": "npm:^4.0.0" - "@szmarczak/http-timer": "npm:^4.0.5" - "@types/cacheable-request": "npm:^6.0.1" - "@types/responselike": "npm:^1.0.0" - cacheable-lookup: "npm:^5.0.3" - cacheable-request: "npm:^7.0.2" - decompress-response: "npm:^6.0.0" - http2-wrapper: "npm:^1.0.0-beta.5.2" - lowercase-keys: "npm:^2.0.0" - p-cancelable: "npm:^2.0.0" - responselike: "npm:^2.0.0" - checksum: a30c74029d81bd5fe50dea1a0c970595d792c568e188ff8be254b5bc11e6158d1b014570772d4a30d0a97723e7dd34e7c8cc1a2f23018f60aece3070a7a5c2a5 - languageName: node - linkType: hard - "got@npm:^13": version: 13.0.0 resolution: "got@npm:13.0.0" @@ -10843,23 +9882,6 @@ __metadata: languageName: node linkType: hard -"har-schema@npm:^2.0.0": - version: 2.0.0 - resolution: "har-schema@npm:2.0.0" - checksum: d8946348f333fb09e2bf24cc4c67eabb47c8e1d1aa1c14184c7ffec1140a49ec8aa78aa93677ae452d71d5fc0fdeec20f0c8c1237291fc2bcb3f502a5d204f9b - languageName: node - linkType: hard - -"har-validator@npm:~5.1.3": - version: 5.1.5 - resolution: "har-validator@npm:5.1.5" - dependencies: - ajv: "npm:^6.12.3" - har-schema: "npm:^2.0.0" - checksum: b998a7269ca560d7f219eedc53e2c664cd87d487e428ae854a6af4573fc94f182fe9d2e3b92ab968249baec7ebaf9ead69cf975c931dc2ab282ec182ee988280 - languageName: node - linkType: hard - "has-flag@npm:^3.0.0": version: 3.0.0 resolution: "has-flag@npm:3.0.0" @@ -10982,7 +10004,7 @@ __metadata: languageName: node linkType: hard -"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.1": +"http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" checksum: 362d5ed66b12ceb9c0a328fb31200b590ab1b02f4a254a697dc796850cc4385603e75f53ec59f768b2dad3bfa1464bd229f7de278d2899a0e3beffc634b6683f @@ -11003,26 +10025,6 @@ __metadata: languageName: node linkType: hard -"http-errors@npm:2.0.0": - version: 2.0.0 - resolution: "http-errors@npm:2.0.0" - dependencies: - depd: "npm:2.0.0" - inherits: "npm:2.0.4" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - toidentifier: "npm:1.0.1" - checksum: 0e7f76ee8ff8a33e58a3281a469815b893c41357378f408be8f6d4aa7d1efafb0da064625518e7078381b6a92325949b119dc38fcb30bdbc4e3a35f78c44c439 - languageName: node - linkType: hard - -"http-https@npm:^1.0.0": - version: 1.0.0 - resolution: "http-https@npm:1.0.0" - checksum: fd3c0802982b1e951a03206690271dacb641b39b80d1820e95095db923d8f63cc7f0df1259969400c8487787a2a46f7b33383c0427ec780a78131b153741b144 - languageName: node - linkType: hard - "http-proxy-agent@npm:^5.0.0": version: 5.0.0 resolution: "http-proxy-agent@npm:5.0.0" @@ -11055,27 +10057,6 @@ __metadata: languageName: node linkType: hard -"http-signature@npm:~1.2.0": - version: 1.2.0 - resolution: "http-signature@npm:1.2.0" - dependencies: - assert-plus: "npm:^1.0.0" - jsprim: "npm:^1.2.2" - sshpk: "npm:^1.7.0" - checksum: 2ff7112e6b0d8f08b382dfe705078c655501f2ddd76cf589d108445a9dd388a0a9be928c37108261519a7f53e6bbd1651048d74057b804807cce1ec49e87a95b - languageName: node - linkType: hard - -"http2-wrapper@npm:^1.0.0-beta.5.2": - version: 1.0.3 - resolution: "http2-wrapper@npm:1.0.3" - dependencies: - quick-lru: "npm:^5.1.1" - resolve-alpn: "npm:^1.0.0" - checksum: 8097ee2699440c2e64bda52124990cc5b0fb347401c7797b1a0c1efd5a0f79a4ebaa68e8a6ac3e2dde5f09460c1602764da6da2412bad628ed0a3b0ae35e72d4 - languageName: node - linkType: hard - "http2-wrapper@npm:^2.1.10": version: 2.2.0 resolution: "http2-wrapper@npm:2.2.0" @@ -11152,7 +10133,7 @@ __metadata: languageName: node linkType: hard -"iconv-lite@npm:0.4.24, iconv-lite@npm:^0.4.24": +"iconv-lite@npm:^0.4.24": version: 0.4.24 resolution: "iconv-lite@npm:0.4.24" dependencies: @@ -11170,15 +10151,6 @@ __metadata: languageName: node linkType: hard -"idna-uts46-hx@npm:^2.3.1": - version: 2.3.1 - resolution: "idna-uts46-hx@npm:2.3.1" - dependencies: - punycode: "npm:2.1.0" - checksum: 5cb65dbc375d42ce9b38dab6e2a7f41b8c059f9a88d236bc9ca32084485f5f22fec11ea5b4e6b61239448148443c3f825fddaa5f298d22e12ecfe845de71a807 - languageName: node - linkType: hard - "ieee754@npm:1.1.13": version: 1.1.13 resolution: "ieee754@npm:1.1.13" @@ -11252,7 +10224,7 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3": +"inherits@npm:2, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 @@ -11383,13 +10355,6 @@ __metadata: languageName: node linkType: hard -"ipaddr.js@npm:1.9.1": - version: 1.9.1 - resolution: "ipaddr.js@npm:1.9.1" - checksum: 864d0cced0c0832700e9621913a6429ccdc67f37c1bd78fb8c6789fff35c9d167cb329134acad2290497a53336813ab4798d2794fd675d5eb33b5fdf0982b9ca - languageName: node - linkType: hard - "is-arguments@npm:^1.0.4": version: 1.1.1 resolution: "is-arguments@npm:1.1.1" @@ -11492,13 +10457,6 @@ __metadata: languageName: node linkType: hard -"is-function@npm:^1.0.1": - version: 1.0.2 - resolution: "is-function@npm:1.0.2" - checksum: 7d564562e07b4b51359547d3ccc10fb93bb392fd1b8177ae2601ee4982a0ece86d952323fc172a9000743a3971f09689495ab78a1d49a9b14fc97a7e28521dc0 - languageName: node - linkType: hard - "is-generator-fn@npm:^2.0.0": version: 2.1.0 resolution: "is-generator-fn@npm:2.1.0" @@ -11524,13 +10482,6 @@ __metadata: languageName: node linkType: hard -"is-hex-prefixed@npm:1.0.0": - version: 1.0.0 - resolution: "is-hex-prefixed@npm:1.0.0" - checksum: 5ac58e6e528fb029cc43140f6eeb380fad23d0041cc23154b87f7c9a1b728bcf05909974e47248fd0b7fcc11ba33cf7e58d64804883056fabd23e2b898be41de - languageName: node - linkType: hard - "is-in-ci@npm:^0.1.0": version: 0.1.0 resolution: "is-in-ci@npm:0.1.0" @@ -11618,13 +10569,6 @@ __metadata: languageName: node linkType: hard -"is-typedarray@npm:^1.0.0, is-typedarray@npm:~1.0.0": - version: 1.0.0 - resolution: "is-typedarray@npm:1.0.0" - checksum: 4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c - languageName: node - linkType: hard - "is-windows@npm:^1.0.0": version: 1.0.2 resolution: "is-windows@npm:1.0.2" @@ -11681,16 +10625,9 @@ __metadata: "isows@npm:1.0.7": version: 1.0.7 resolution: "isows@npm:1.0.7" - peerDependencies: - ws: "*" - checksum: 044b949b369872882af07b60b613b5801ae01b01a23b5b72b78af80c8103bbeed38352c3e8ceff13a7834bc91fd2eb41cf91ec01d59a041d8705680e6b0ec546 - languageName: node - linkType: hard - -"isstream@npm:~0.1.2": - version: 0.1.2 - resolution: "isstream@npm:0.1.2" - checksum: 22d9c181015226d4534a227539256897bbbcb7edd1066ca4fc4d3a06dbd976325dfdd16b3983c7d236a89f256805c1a685a772e0364e98873d3819b064ad35a1 + peerDependencies: + ws: "*" + checksum: 044b949b369872882af07b60b613b5801ae01b01a23b5b72b78af80c8103bbeed38352c3e8ceff13a7834bc91fd2eb41cf91ec01d59a041d8705680e6b0ec546 languageName: node linkType: hard @@ -12366,20 +11303,13 @@ __metadata: languageName: node linkType: hard -"js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0": +"js-sha3@npm:0.8.0": version: 0.8.0 resolution: "js-sha3@npm:0.8.0" checksum: a49ac6d3a6bfd7091472a28ab82a94c7fb8544cc584ee1906486536ba1cb4073a166f8c7bb2b0565eade23c5b3a7b8f7816231e0309ab5c549b737632377a20c languageName: node linkType: hard -"js-sha3@npm:^0.5.7": - version: 0.5.7 - resolution: "js-sha3@npm:0.5.7" - checksum: 32885c7edb50fca04017bacada8e5315c072d21d3d35e071e9640fc5577e200076a4718e0b2f33d86ab704accb68d2ade44f1e2ca424cc73a5929b9129dab948 - languageName: node - linkType: hard - "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -12406,13 +11336,6 @@ __metadata: languageName: node linkType: hard -"jsbn@npm:~0.1.0": - version: 0.1.1 - resolution: "jsbn@npm:0.1.1" - checksum: 5450133242845100e694f0ef9175f44c012691a9b770b2571e677314e6f70600abb10777cdfc9a0c6a9f2ac6d134577403633de73e2fcd0f97875a67744e2d14 - languageName: node - linkType: hard - "jsesc@npm:^2.5.1": version: 2.5.2 resolution: "jsesc@npm:2.5.2" @@ -12459,20 +11382,6 @@ __metadata: languageName: node linkType: hard -"json-schema-traverse@npm:^0.4.1": - version: 0.4.1 - resolution: "json-schema-traverse@npm:0.4.1" - checksum: 7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b - languageName: node - linkType: hard - -"json-schema@npm:0.4.0": - version: 0.4.0 - resolution: "json-schema@npm:0.4.0" - checksum: 8b3b64eff4a807dc2a3045b104ed1b9335cd8d57aa74c58718f07f0f48b8baa3293b00af4dcfbdc9144c3aafea1e97982cc27cc8e150fc5d93c540649507a458 - languageName: node - linkType: hard - "json-stringify-nice@npm:^1.1.4": version: 1.1.4 resolution: "json-stringify-nice@npm:1.1.4" @@ -12480,13 +11389,6 @@ __metadata: languageName: node linkType: hard -"json-stringify-safe@npm:~5.0.1": - version: 5.0.1 - resolution: "json-stringify-safe@npm:5.0.1" - checksum: 59169a081e4eeb6f9559ae1f938f656191c000e0512aa6df9f3c8b2437a4ab1823819c6b9fd1818a4e39593ccfd72e9a051fdd3e2d1e340ed913679e888ded8c - languageName: node - linkType: hard - "json5@npm:^1.0.2": version: 1.0.2 resolution: "json5@npm:1.0.2" @@ -12544,18 +11446,6 @@ __metadata: languageName: node linkType: hard -"jsprim@npm:^1.2.2": - version: 1.4.2 - resolution: "jsprim@npm:1.4.2" - dependencies: - assert-plus: "npm:1.0.0" - extsprintf: "npm:1.3.0" - json-schema: "npm:0.4.0" - verror: "npm:1.10.0" - checksum: df2bf234eab1b5078d01bcbff3553d50a243f7b5c10a169745efeda6344d62798bd1d85bcca6a8446f3b5d0495e989db45f9de8dae219f0f9796e70e0c776089 - languageName: node - linkType: hard - "just-diff-apply@npm:^5.2.0": version: 5.5.0 resolution: "just-diff-apply@npm:5.5.0" @@ -12636,7 +11526,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.0.0, keyv@npm:^4.5.3": +"keyv@npm:^4.5.3": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: @@ -13020,13 +11910,6 @@ __metadata: languageName: node linkType: hard -"lowercase-keys@npm:^2.0.0": - version: 2.0.0 - resolution: "lowercase-keys@npm:2.0.0" - checksum: 1c233d2da35056e8c49fae8097ee061b8c799b2f02e33c2bf32f9913c7de8fb481ab04dab7df35e94156c800f5f34e99acbf32b21781d87c3aa43ef7b748b79e - languageName: node - linkType: hard - "lowercase-keys@npm:^3.0.0": version: 3.0.0 resolution: "lowercase-keys@npm:3.0.0" @@ -13199,20 +12082,6 @@ __metadata: languageName: node linkType: hard -"media-typer@npm:0.3.0": - version: 0.3.0 - resolution: "media-typer@npm:0.3.0" - checksum: 38e0984db39139604756903a01397e29e17dcb04207bb3e081412ce725ab17338ecc47220c1b186b6bbe79a658aad1b0d41142884f5a481f36290cdefbe6aa46 - languageName: node - linkType: hard - -"merge-descriptors@npm:1.0.1": - version: 1.0.1 - resolution: "merge-descriptors@npm:1.0.1" - checksum: 5abc259d2ae25bb06d19ce2b94a21632583c74e2a9109ee1ba7fd147aa7362b380d971e0251069f8b3eb7d48c21ac839e21fa177b335e82c76ec172e30c31a26 - languageName: node - linkType: hard - "merge-stream@npm:^2.0.0": version: 2.0.0 resolution: "merge-stream@npm:2.0.0" @@ -13227,20 +12096,6 @@ __metadata: languageName: node linkType: hard -"methods@npm:~1.1.2": - version: 1.1.2 - resolution: "methods@npm:1.1.2" - checksum: a385dd974faa34b5dd021b2bbf78c722881bf6f003bfe6d391d7da3ea1ed625d1ff10ddd13c57531f628b3e785be38d3eed10ad03cebd90b76932413df9a1820 - languageName: node - linkType: hard - -"micro-ftch@npm:^0.3.1": - version: 0.3.1 - resolution: "micro-ftch@npm:0.3.1" - checksum: a7ab07d25e28ec4ae492ce4542ea9b06eee85538742b3b1263b247366ee8872f2c5ce9c8651138b2f1d22c8212f691a7b8b5384fe86ead5aff1852e211f1c035 - languageName: node - linkType: hard - "micromatch@npm:^4.0.2, micromatch@npm:^4.0.4": version: 4.0.5 resolution: "micromatch@npm:4.0.5" @@ -13268,7 +12123,7 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:^2.1.12, mime-types@npm:^2.1.16, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": +"mime-types@npm:^2.1.12": version: 2.1.35 resolution: "mime-types@npm:2.1.35" dependencies: @@ -13277,15 +12132,6 @@ __metadata: languageName: node linkType: hard -"mime@npm:1.6.0": - version: 1.6.0 - resolution: "mime@npm:1.6.0" - bin: - mime: cli.js - checksum: b7d98bb1e006c0e63e2c91b590fe1163b872abf8f7ef224d53dd31499c2197278a6d3d0864c45239b1a93d22feaf6f9477e9fc847eef945838150b8c02d03170 - languageName: node - linkType: hard - "mimic-fn@npm:^2.1.0": version: 2.1.0 resolution: "mimic-fn@npm:2.1.0" @@ -13300,13 +12146,6 @@ __metadata: languageName: node linkType: hard -"mimic-response@npm:^1.0.0": - version: 1.0.1 - resolution: "mimic-response@npm:1.0.1" - checksum: 034c78753b0e622bc03c983663b1cdf66d03861050e0c8606563d149bc2b02d63f62ce4d32be4ab50d0553ae0ffe647fc34d1f5281184c6e1e8cf4d85e8d9823 - languageName: node - linkType: hard - "mimic-response@npm:^3.1.0": version: 3.1.0 resolution: "mimic-response@npm:3.1.0" @@ -13321,15 +12160,6 @@ __metadata: languageName: node linkType: hard -"min-document@npm:^2.19.0": - version: 2.19.0 - resolution: "min-document@npm:2.19.0" - dependencies: - dom-walk: "npm:^0.1.0" - checksum: 4e45a0686c81cc04509989235dc6107e2678a59bb48ce017d3c546d7d9a18d782e341103e66c78081dd04544704e2196e529905c41c2550bca069b69f95f07c8 - languageName: node - linkType: hard - "minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": version: 1.0.1 resolution: "minimalistic-assert@npm:1.0.1" @@ -13462,16 +12292,6 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^2.6.0, minipass@npm:^2.9.0": - version: 2.9.0 - resolution: "minipass@npm:2.9.0" - dependencies: - safe-buffer: "npm:^5.1.2" - yallist: "npm:^3.0.0" - checksum: fdd1a77996c184991f8d2ce7c5b3979bec624e2a3225e2e1e140c4038fd65873d7eb90fb29779f8733735a8827b2686f283871a0c74c908f4f7694c56fa8dadf - languageName: node - linkType: hard - "minipass@npm:^3.0.0": version: 3.3.6 resolution: "minipass@npm:3.3.6" @@ -13509,15 +12329,6 @@ __metadata: languageName: node linkType: hard -"minizlib@npm:^1.3.3": - version: 1.3.3 - resolution: "minizlib@npm:1.3.3" - dependencies: - minipass: "npm:^2.9.0" - checksum: 9c2c47e5687d7f896431a9b5585988ef72f848b56c6a974c9489534e8f619388d500d986ef82e1c13aedd46f3a0e81b6a88110cb1b27de7524cc8dabe8885e17 - languageName: node - linkType: hard - "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": version: 2.1.2 resolution: "minizlib@npm:2.1.2" @@ -13545,25 +12356,7 @@ __metadata: languageName: node linkType: hard -"mkdirp-promise@npm:^5.0.1": - version: 5.0.1 - resolution: "mkdirp-promise@npm:5.0.1" - dependencies: - mkdirp: "npm:*" - checksum: 31ddc9478216adf6d6bee9ea7ce9ccfe90356d9fcd1dfb18128eac075390b4161356d64c3a7b0a75f9de01a90aadd990a0ec8c7434036563985c4b853a053ee2 - languageName: node - linkType: hard - -"mkdirp@npm:*": - version: 3.0.0 - resolution: "mkdirp@npm:3.0.0" - bin: - mkdirp: dist/cjs/src/bin.js - checksum: ca1fb0cb3ebe3d068d74738c264888151e099b150e8a4dde1d20e593a61952227d2f1dfd9fb4dc885ab4cdf18275909360041d2f5f35c4121052df93edae88dd - languageName: node - linkType: hard - -"mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.5": +"mkdirp@npm:^0.5.1": version: 0.5.6 resolution: "mkdirp@npm:0.5.6" dependencies: @@ -13592,13 +12385,6 @@ __metadata: languageName: node linkType: hard -"mock-fs@npm:^4.1.0": - version: 4.14.0 - resolution: "mock-fs@npm:4.14.0" - checksum: 20facbc85bb62df02dbfc946b354fcdd8b2b2aeafef4986adab18dc9a23efccb34ce49d4dac22aaed1a24420fc50c53d77e90984cc888bcce314e18e0e21872a - languageName: node - linkType: hard - "module-error@npm:^1.0.1": version: 1.0.2 resolution: "module-error@npm:1.0.2" @@ -13613,13 +12399,6 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.0.0": - version: 2.0.0 - resolution: "ms@npm:2.0.0" - checksum: 0e6a22b8b746d2e0b65a430519934fefd41b6db0682e3477c10f60c76e947c4c0ad06f63ffdf1d78d335f83edee8c0aa928aa66a36c7cd95b69b26f468d527f4 - languageName: node - linkType: hard - "ms@npm:2.1.2": version: 2.1.2 resolution: "ms@npm:2.1.2" @@ -13627,63 +12406,13 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.1.1, ms@npm:^2.1.2, ms@npm:^2.1.3": +"ms@npm:^2.1.1, ms@npm:^2.1.2, ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d languageName: node linkType: hard -"multibase@npm:^0.7.0": - version: 0.7.0 - resolution: "multibase@npm:0.7.0" - dependencies: - base-x: "npm:^3.0.8" - buffer: "npm:^5.5.0" - checksum: a5cbbf00b8aa61bcb92a706e210d8f258e8413cff2893584fedbc316c98bf2a44b8f648b57c124ddfaa29750c3b686ee5ba973cb8da84a896c19d63101b09445 - languageName: node - linkType: hard - -"multibase@npm:~0.6.0": - version: 0.6.1 - resolution: "multibase@npm:0.6.1" - dependencies: - base-x: "npm:^3.0.8" - buffer: "npm:^5.5.0" - checksum: c9e3bf20dc1b109019b94b14a76731ea0a6b0e654a4ef627ba154bfc2b8602ac43b160c44d8245d18cd6a9ed971826efb204230f22b929c8b3e72da13dbc1859 - languageName: node - linkType: hard - -"multicodec@npm:^0.5.5": - version: 0.5.7 - resolution: "multicodec@npm:0.5.7" - dependencies: - varint: "npm:^5.0.0" - checksum: b61bbf04e1bfff180f77693661b8111bf94f65580abc455e6d83d2240c227d8c2e8af99ca93b6c02500c5da43d16e2b028dbbec1b376a85145a774f542d9ca2c - languageName: node - linkType: hard - -"multicodec@npm:^1.0.0": - version: 1.0.4 - resolution: "multicodec@npm:1.0.4" - dependencies: - buffer: "npm:^5.6.0" - varint: "npm:^5.0.0" - checksum: 3a78ac54d3715e6b095a1805f63b4c4e7d5bb4642445691c0c4e6442cad9f97823469634e73ee362ba748596570db1050d69d5cc74a88928b1e9658916cdfbcd - languageName: node - linkType: hard - -"multihashes@npm:^0.4.15, multihashes@npm:~0.4.15": - version: 0.4.21 - resolution: "multihashes@npm:0.4.21" - dependencies: - buffer: "npm:^5.5.0" - multibase: "npm:^0.7.0" - varint: "npm:^5.0.0" - checksum: a482d9ba7ed0ad41db22ca589f228e4b7a30207a229a64dfc9888796752314fca00a8d03025fe40d6d73965bbb246f54b73626c5a235463e30c06c7bf7a8785f - languageName: node - linkType: hard - "mute-stream@npm:0.0.8": version: 0.0.8 resolution: "mute-stream@npm:0.0.8" @@ -13705,13 +12434,6 @@ __metadata: languageName: node linkType: hard -"nano-json-stream-parser@npm:^0.1.2": - version: 0.1.2 - resolution: "nano-json-stream-parser@npm:0.1.2" - checksum: 00a3ce63d3b66220def9fd6c26cd495100efd155e7bda54a11f1dfd185ba6750d5ce266076e0f229bad3f5ef892e2017f24da012669f146b404a8e47a44568ec - languageName: node - linkType: hard - "nanoid@npm:^3.3.8": version: 3.3.11 resolution: "nanoid@npm:3.3.11" @@ -13774,7 +12496,7 @@ __metadata: languageName: node linkType: hard -"negotiator@npm:0.6.3, negotiator@npm:^0.6.3": +"negotiator@npm:^0.6.3": version: 0.6.3 resolution: "negotiator@npm:0.6.3" checksum: 2723fb822a17ad55c93a588a4bc44d53b22855bf4be5499916ca0cab1e7165409d0b288ba2577d7b029f10ce18cf2ed8e703e5af31c984e1e2304277ef979837 @@ -13788,13 +12510,6 @@ __metadata: languageName: node linkType: hard -"next-tick@npm:^1.1.0": - version: 1.1.0 - resolution: "next-tick@npm:1.1.0" - checksum: 83b5cf36027a53ee6d8b7f9c0782f2ba87f4858d977342bfc3c20c21629290a2111f8374d13a81221179603ffc4364f38374b5655d17b6a8f8a8c77bdea4fe8b - languageName: node - linkType: hard - "no-case@npm:^3.0.4": version: 3.0.4 resolution: "no-case@npm:3.0.4" @@ -13871,7 +12586,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.5.0, node-fetch@npm:^2.6.12": +"node-fetch@npm:^2.5.0": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" dependencies: @@ -14058,13 +12773,6 @@ __metadata: languageName: node linkType: hard -"normalize-url@npm:^6.0.1": - version: 6.1.0 - resolution: "normalize-url@npm:6.1.0" - checksum: 5ae699402c9d5ffa330adc348fcd6fc6e6a155ab7c811b96e30b7ecab60ceef821d8f86443869671dda71bbc47f4b9625739c82ad247e883e9aefe875bfb8659 - languageName: node - linkType: hard - "normalize-url@npm:^8.0.0": version: 8.0.1 resolution: "normalize-url@npm:8.0.1" @@ -14279,30 +12987,6 @@ __metadata: languageName: node linkType: hard -"number-to-bn@npm:1.7.0": - version: 1.7.0 - resolution: "number-to-bn@npm:1.7.0" - dependencies: - bn.js: "npm:4.11.6" - strip-hex-prefix: "npm:1.0.0" - checksum: 702e8f00b6b90abd23f711056005179c3bd5ce3b063c47d468250f63ab3b9b4b82e27bff3b4642a9e71e06c717d5ed359873501746df0a64c3db1fa6d704e704 - languageName: node - linkType: hard - -"oauth-sign@npm:~0.9.0": - version: 0.9.0 - resolution: "oauth-sign@npm:0.9.0" - checksum: 1809a366d258f41fdf4ab5310cff3d1e15f96b187503bc7333cef4351de7bd0f52cb269bc95800f1fae5fb04dd886287df1471985fd67e8484729fdbcf857119 - languageName: node - linkType: hard - -"object-assign@npm:^4, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1": - version: 4.1.1 - resolution: "object-assign@npm:4.1.1" - checksum: fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f - languageName: node - linkType: hard - "object-hash@npm:^3.0.0": version: 3.0.0 resolution: "object-hash@npm:3.0.0" @@ -14310,13 +12994,6 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.9.0": - version: 1.12.3 - resolution: "object-inspect@npm:1.12.3" - checksum: 532b0036f0472f561180fac0d04fe328ee01f57637624c83fb054f81b5bfe966cdf4200612a499ed391a7ca3c46b20a0bc3a55fc8241d944abe687c556a32b39 - languageName: node - linkType: hard - "object-treeify@npm:^1.1.33": version: 1.1.33 resolution: "object-treeify@npm:1.1.33" @@ -14331,15 +13008,6 @@ __metadata: languageName: node linkType: hard -"oboe@npm:2.1.5": - version: 2.1.5 - resolution: "oboe@npm:2.1.5" - dependencies: - http-https: "npm:^1.0.0" - checksum: 451d0c28b45f518fc86d4689075cf74c7fea92fb09e2f994dd1208e5c5516a6958f9dc476714b61c62c959a3e7e0db8a69999c59ff63777c7a8af24fbddd0848 - languageName: node - linkType: hard - "oclif@npm:^4.17.32": version: 4.17.46 resolution: "oclif@npm:4.17.46" @@ -14374,15 +13042,6 @@ __metadata: languageName: node linkType: hard -"on-finished@npm:2.4.1": - version: 2.4.1 - resolution: "on-finished@npm:2.4.1" - dependencies: - ee-first: "npm:1.1.1" - checksum: 8e81472c5028125c8c39044ac4ab8ba51a7cdc19a9fbd4710f5d524a74c6d8c9ded4dd0eed83f28d3d33ac1d7a6a439ba948ccb765ac6ce87f30450a26bfe2ea - languageName: node - linkType: hard - "once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" @@ -14435,6 +13094,27 @@ __metadata: languageName: node linkType: hard +"ox@npm:0.12.4": + version: 0.12.4 + resolution: "ox@npm:0.12.4" + dependencies: + "@adraffy/ens-normalize": "npm:^1.11.0" + "@noble/ciphers": "npm:^1.3.0" + "@noble/curves": "npm:1.9.1" + "@noble/hashes": "npm:^1.8.0" + "@scure/bip32": "npm:^1.7.0" + "@scure/bip39": "npm:^1.6.0" + abitype: "npm:^1.2.3" + eventemitter3: "npm:5.0.1" + peerDependencies: + typescript: ">=5.4.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 077509b841658693a411df505d0bdbbee2d68734aa19736ccff5a6087c119c4aebc1d8d8c2039ca9f16ae7430cb44812e4c182f858cab67c9a755dd0e9914178 + languageName: node + linkType: hard + "ox@npm:0.8.6": version: 0.8.6 resolution: "ox@npm:0.8.6" @@ -14456,13 +13136,6 @@ __metadata: languageName: node linkType: hard -"p-cancelable@npm:^2.0.0": - version: 2.1.1 - resolution: "p-cancelable@npm:2.1.1" - checksum: 7f1b64db17fc54acf359167d62898115dcf2a64bf6b3b038e4faf36fc059e5ed762fb9624df8ed04b25bee8de3ab8d72dea9879a2a960cd12e23c420a4aca6ed - languageName: node - linkType: hard - "p-cancelable@npm:^3.0.0": version: 3.0.0 resolution: "p-cancelable@npm:3.0.0" @@ -14634,13 +13307,6 @@ __metadata: languageName: node linkType: hard -"parse-headers@npm:^2.0.0": - version: 2.0.5 - resolution: "parse-headers@npm:2.0.5" - checksum: 210b13bc0f99cf6f1183896f01de164797ac35b2720c9f1c82a3e2ceab256f87b9048e8e16a14cfd1b75448771f8379cd564bd1674a179ab0168c90005d4981b - languageName: node - linkType: hard - "parse-json@npm:^4.0.0": version: 4.0.0 resolution: "parse-json@npm:4.0.0" @@ -14663,13 +13329,6 @@ __metadata: languageName: node linkType: hard -"parseurl@npm:~1.3.3": - version: 1.3.3 - resolution: "parseurl@npm:1.3.3" - checksum: 407cee8e0a3a4c5cd472559bca8b6a45b82c124e9a4703302326e9ab60fc1081442ada4e02628efef1eb16197ddc7f8822f5a91fd7d7c86b51f530aedb17dfa2 - languageName: node - linkType: hard - "pascal-case@npm:^3.1.2": version: 3.1.2 resolution: "pascal-case@npm:3.1.2" @@ -14769,13 +13428,6 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:0.1.7": - version: 0.1.7 - resolution: "path-to-regexp@npm:0.1.7" - checksum: 701c99e1f08e3400bea4d701cf6f03517474bb1b608da71c78b1eb261415b645c5670dfae49808c89e12cea2dccd113b069f040a80de012da0400191c6dbd1c8 - languageName: node - linkType: hard - "path-to-regexp@npm:^2.2.1": version: 2.4.0 resolution: "path-to-regexp@npm:2.4.0" @@ -14817,13 +13469,6 @@ __metadata: languageName: node linkType: hard -"performance-now@npm:^2.1.0": - version: 2.1.0 - resolution: "performance-now@npm:2.1.0" - checksum: 534e641aa8f7cba160f0afec0599b6cecefbb516a2e837b512be0adbe6c1da5550e89c78059c7fabc5c9ffdf6627edabe23eb7c518c4500067a898fa65c2b550 - languageName: node - linkType: hard - "picocolors@npm:^1.0.0": version: 1.0.0 resolution: "picocolors@npm:1.0.0" @@ -14991,13 +13636,6 @@ __metadata: languageName: node linkType: hard -"process@npm:^0.11.10": - version: 0.11.10 - resolution: "process@npm:0.11.10" - checksum: dbaa7e8d1d5cf375c36963ff43116772a989ef2bb47c9bdee20f38fd8fc061119cf38140631cf90c781aca4d3f0f0d2c834711952b728953f04fd7d238f59f5b - languageName: node - linkType: hard - "proggy@npm:^3.0.0": version: 3.0.0 resolution: "proggy@npm:3.0.0" @@ -15132,16 +13770,6 @@ __metadata: languageName: node linkType: hard -"proxy-addr@npm:~2.0.7": - version: 2.0.7 - resolution: "proxy-addr@npm:2.0.7" - dependencies: - forwarded: "npm:0.2.0" - ipaddr.js: "npm:1.9.1" - checksum: f24a0c80af0e75d31e3451398670d73406ec642914da11a2965b80b1898ca6f66a0e3e091a11a4327079b2b268795f6fa06691923fef91887215c3d0e8ea3f68 - languageName: node - linkType: hard - "proxy-from-env@npm:^1.1.0": version: 1.1.0 resolution: "proxy-from-env@npm:1.1.0" @@ -15149,13 +13777,6 @@ __metadata: languageName: node linkType: hard -"psl@npm:^1.1.28": - version: 1.9.0 - resolution: "psl@npm:1.9.0" - checksum: d07879d4bfd0ac74796306a8e5a36a93cfb9c4f4e8ee8e63fbb909066c192fe1008cd8f12abd8ba2f62ca28247949a20c8fb32e1d18831d9e71285a1569720f9 - languageName: node - linkType: hard - "pump@npm:^1.0.0": version: 1.0.3 resolution: "pump@npm:1.0.3" @@ -15190,20 +13811,6 @@ __metadata: languageName: node linkType: hard -"punycode@npm:2.1.0": - version: 2.1.0 - resolution: "punycode@npm:2.1.0" - checksum: 012f9443fe56baf485db702d0d07cef7d89c0670ce1ac4da8fb8b5bd3677e42a8f5d2b35f595ffa31ba843661c9c6766f2feb1e1e3393e1ff1033120d0f94d60 - languageName: node - linkType: hard - -"punycode@npm:^2.1.0, punycode@npm:^2.1.1": - version: 2.3.0 - resolution: "punycode@npm:2.3.0" - checksum: d4e7fbb96f570c57d64b09a35a1182c879ac32833de7c6926a2c10619632c1377865af3dab5479f59d51da18bcd5035a20a5ef6ceb74020082a3e78025d9a9ca - languageName: node - linkType: hard - "pure-rand@npm:^6.0.0": version: 6.0.1 resolution: "pure-rand@npm:6.0.1" @@ -15244,33 +13851,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.11.0": - version: 6.11.0 - resolution: "qs@npm:6.11.0" - dependencies: - side-channel: "npm:^1.0.4" - checksum: 5a3bfea3e2f359ede1bfa5d2f0dbe54001aa55e40e27dc3e60fab814362d83a9b30758db057c2011b6f53a2d4e4e5150194b5bac45372652aecb3e3c0d4b256e - languageName: node - linkType: hard - -"qs@npm:~6.5.2": - version: 6.5.3 - resolution: "qs@npm:6.5.3" - checksum: 485c990fba7ad17671e16c92715fb064c1600337738f5d140024eb33a49fbc1ed31890d3db850117c760caeb9c9cc9f4ba22a15c20dd119968e41e3d3fe60b28 - languageName: node - linkType: hard - -"query-string@npm:^5.0.1": - version: 5.1.1 - resolution: "query-string@npm:5.1.1" - dependencies: - decode-uri-component: "npm:^0.2.0" - object-assign: "npm:^4.1.0" - strict-uri-encode: "npm:^1.0.0" - checksum: 8834591ed02c324ac10397094c2ae84a3d3460477ef30acd5efe03b1afbf15102ccc0829ab78cc58ecb12f70afeb7a1f81e604487a9ad4859742bb14748e98cc - languageName: node - linkType: hard - "querystring@npm:0.2.0": version: 0.2.0 resolution: "querystring@npm:0.2.0" @@ -15308,37 +13888,6 @@ __metadata: languageName: node linkType: hard -"range-parser@npm:~1.2.1": - version: 1.2.1 - resolution: "range-parser@npm:1.2.1" - checksum: ce21ef2a2dd40506893157970dc76e835c78cf56437e26e19189c48d5291e7279314477b06ac38abd6a401b661a6840f7b03bd0b1249da9b691deeaa15872c26 - languageName: node - linkType: hard - -"raw-body@npm:2.5.1": - version: 2.5.1 - resolution: "raw-body@npm:2.5.1" - dependencies: - bytes: "npm:3.1.2" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - unpipe: "npm:1.0.0" - checksum: 280bedc12db3490ecd06f740bdcf66093a07535374b51331242382c0e130bb273ebb611b7bc4cba1b4b4e016cc7b1f4b05a6df885a6af39c2bc3b94c02291c84 - languageName: node - linkType: hard - -"raw-body@npm:2.5.2": - version: 2.5.2 - resolution: "raw-body@npm:2.5.2" - dependencies: - bytes: "npm:3.1.2" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - unpipe: "npm:1.0.0" - checksum: 863b5171e140546a4d99f349b720abac4410338e23df5e409cfcc3752538c9caf947ce382c89129ba976f71894bd38b5806c774edac35ebf168d02aa1ac11a95 - languageName: node - linkType: hard - "rc@npm:^1.2.7": version: 1.2.8 resolution: "rc@npm:1.2.8" @@ -15505,34 +14054,6 @@ __metadata: languageName: node linkType: hard -"request@npm:^2.79.0": - version: 2.88.2 - resolution: "request@npm:2.88.2" - dependencies: - aws-sign2: "npm:~0.7.0" - aws4: "npm:^1.8.0" - caseless: "npm:~0.12.0" - combined-stream: "npm:~1.0.6" - extend: "npm:~3.0.2" - forever-agent: "npm:~0.6.1" - form-data: "npm:~2.3.2" - har-validator: "npm:~5.1.3" - http-signature: "npm:~1.2.0" - is-typedarray: "npm:~1.0.0" - isstream: "npm:~0.1.2" - json-stringify-safe: "npm:~5.0.1" - mime-types: "npm:~2.1.19" - oauth-sign: "npm:~0.9.0" - performance-now: "npm:^2.1.0" - qs: "npm:~6.5.2" - safe-buffer: "npm:^5.1.2" - tough-cookie: "npm:~2.5.0" - tunnel-agent: "npm:^0.6.0" - uuid: "npm:^3.3.2" - checksum: 005b8b237b56f1571cfd4ecc09772adaa2e82dcb884fc14ea2bb25e23dbf7c2009f9929e0b6d3fd5802e33ed8ee705a3b594c8f9467c1458cd973872bf89db8e - languageName: node - linkType: hard - "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -15554,7 +14075,7 @@ __metadata: languageName: node linkType: hard -"resolve-alpn@npm:^1.0.0, resolve-alpn@npm:^1.2.0": +"resolve-alpn@npm:^1.2.0": version: 1.2.1 resolution: "resolve-alpn@npm:1.2.1" checksum: 744e87888f0b6fa0b256ab454ca0b9c0b80808715e2ef1f3672773665c92a941f6181194e30ccae4a8cd0adbe0d955d3f133102636d2ee0cca0119fec0bc9aec @@ -15610,15 +14131,6 @@ __metadata: languageName: node linkType: hard -"responselike@npm:^2.0.0": - version: 2.0.1 - resolution: "responselike@npm:2.0.1" - dependencies: - lowercase-keys: "npm:^2.0.0" - checksum: b122535466e9c97b55e69c7f18e2be0ce3823c5d47ee8de0d9c0b114aa55741c6db8bfbfce3766a94d1272e61bfb1ebf0a15e9310ac5629fbb7446a861b4fd3a - languageName: node - linkType: hard - "responselike@npm:^3.0.0": version: 3.0.0 resolution: "responselike@npm:3.0.0" @@ -15842,7 +14354,7 @@ __metadata: languageName: node linkType: hard -"safe-buffer@npm:5.2.1, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": +"safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" checksum: 32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 @@ -15856,7 +14368,7 @@ __metadata: languageName: node linkType: hard -"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.0.2, safer-buffer@npm:^2.1.0, safer-buffer@npm:~2.1.0": +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" checksum: 7eaf7a0cf37cc27b42fb3ef6a9b1df6e93a1c6d98c6c6702b02fe262d5fcbd89db63320793b99b21cb5348097d0a53de81bd5f4e8b86e20cc9412e3f1cfb4e83 @@ -15984,27 +14496,6 @@ __metadata: languageName: node linkType: hard -"send@npm:0.18.0": - version: 0.18.0 - resolution: "send@npm:0.18.0" - dependencies: - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - mime: "npm:1.6.0" - ms: "npm:2.1.3" - on-finished: "npm:2.4.1" - range-parser: "npm:~1.2.1" - statuses: "npm:2.0.1" - checksum: ec66c0ad109680ad8141d507677cfd8b4e40b9559de23191871803ed241718e99026faa46c398dcfb9250676076573bd6bfe5d0ec347f88f4b7b8533d1d391cb - languageName: node - linkType: hard - "sentence-case@npm:^3.0.4": version: 3.0.4 resolution: "sentence-case@npm:3.0.4" @@ -16016,31 +14507,6 @@ __metadata: languageName: node linkType: hard -"serve-static@npm:1.15.0": - version: 1.15.0 - resolution: "serve-static@npm:1.15.0" - dependencies: - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - parseurl: "npm:~1.3.3" - send: "npm:0.18.0" - checksum: 699b2d4c29807a51d9b5e0f24955346911437aebb0178b3c4833ad30d3eca93385ff9927254f5c16da345903cad39d9cd4a532198c95a5129cc4ed43911b15a4 - languageName: node - linkType: hard - -"servify@npm:^0.1.12": - version: 0.1.12 - resolution: "servify@npm:0.1.12" - dependencies: - body-parser: "npm:^1.16.0" - cors: "npm:^2.8.1" - express: "npm:^4.14.0" - request: "npm:^2.79.0" - xhr: "npm:^2.3.3" - checksum: d61b145034aa26c143d7081a56c544aceff256eead27a5894b6785346254438d2b387ac7411bf664024d258779a00dc6c5d9da65f8d60382dac23a8cba0b0d9e - languageName: node - linkType: hard - "set-blocking@npm:^2.0.0": version: 2.0.0 resolution: "set-blocking@npm:2.0.0" @@ -16063,14 +14529,7 @@ __metadata: "setimmediate@npm:^1.0.5": version: 1.0.5 resolution: "setimmediate@npm:1.0.5" - checksum: 76e3f5d7f4b581b6100ff819761f04a984fa3f3990e72a6554b57188ded53efce2d3d6c0932c10f810b7c59414f85e2ab3c11521877d1dea1ce0b56dc906f485 - languageName: node - linkType: hard - -"setprototypeof@npm:1.2.0": - version: 1.2.0 - resolution: "setprototypeof@npm:1.2.0" - checksum: fde1630422502fbbc19e6844346778f99d449986b2f9cdcceb8326730d2f3d9964dbcb03c02aaadaefffecd0f2c063315ebea8b3ad895914bf1afc1747fc172e + checksum: 76e3f5d7f4b581b6100ff819761f04a984fa3f3990e72a6554b57188ded53efce2d3d6c0932c10f810b7c59414f85e2ab3c11521877d1dea1ce0b56dc906f485 languageName: node linkType: hard @@ -16102,17 +14561,6 @@ __metadata: languageName: node linkType: hard -"side-channel@npm:^1.0.4": - version: 1.0.4 - resolution: "side-channel@npm:1.0.4" - dependencies: - call-bind: "npm:^1.0.0" - get-intrinsic: "npm:^1.0.2" - object-inspect: "npm:^1.9.0" - checksum: c4998d9fc530b0e75a7fd791ad868fdc42846f072734f9080ff55cc8dc7d3899abcda24fd896aa6648c3ab7021b4bb478073eb4f44dfd55bce9714bc1a7c5d45 - languageName: node - linkType: hard - "siginfo@npm:^2.0.0": version: 2.0.0 resolution: "siginfo@npm:2.0.0" @@ -16155,17 +14603,6 @@ __metadata: languageName: node linkType: hard -"simple-get@npm:^2.7.0": - version: 2.8.2 - resolution: "simple-get@npm:2.8.2" - dependencies: - decompress-response: "npm:^3.3.0" - once: "npm:^1.3.1" - simple-concat: "npm:^1.0.0" - checksum: b827672695bbe504217311c47c6a106358babcfbf3d69c8d67ad56da40c2ed05185eec12538dfe3637e1cf0441bcd5931b022a84dc7f8f2d84969d595f7f7fda - languageName: node - linkType: hard - "simple-get@npm:^4.0.0": version: 4.0.1 resolution: "simple-get@npm:4.0.1" @@ -16424,27 +14861,6 @@ __metadata: languageName: node linkType: hard -"sshpk@npm:^1.7.0": - version: 1.17.0 - resolution: "sshpk@npm:1.17.0" - dependencies: - asn1: "npm:~0.2.3" - assert-plus: "npm:^1.0.0" - bcrypt-pbkdf: "npm:^1.0.0" - dashdash: "npm:^1.12.0" - ecc-jsbn: "npm:~0.1.1" - getpass: "npm:^0.1.1" - jsbn: "npm:~0.1.0" - safer-buffer: "npm:^2.0.2" - tweetnacl: "npm:~0.14.0" - bin: - sshpk-conv: bin/sshpk-conv - sshpk-sign: bin/sshpk-sign - sshpk-verify: bin/sshpk-verify - checksum: 668c2a279a6ce66fd739ce5684e37927dd75427cc020c828a208f85890a4c400705d4ba09f32fa44efca894339dc6931941664f6f6ba36dfa543de6d006cbe9c - languageName: node - linkType: hard - "ssri@npm:^10.0.0": version: 10.0.5 resolution: "ssri@npm:10.0.5" @@ -16479,13 +14895,6 @@ __metadata: languageName: node linkType: hard -"statuses@npm:2.0.1": - version: 2.0.1 - resolution: "statuses@npm:2.0.1" - checksum: 18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb - languageName: node - linkType: hard - "std-env@npm:^3.9.0": version: 3.9.0 resolution: "std-env@npm:3.9.0" @@ -16507,13 +14916,6 @@ __metadata: languageName: node linkType: hard -"strict-uri-encode@npm:^1.0.0": - version: 1.1.0 - resolution: "strict-uri-encode@npm:1.1.0" - checksum: 9466d371f7b36768d43f7803f26137657559e4c8b0161fb9e320efb8edba3ae22f8e99d4b0d91da023b05a13f62ec5412c3f4f764b5788fac11d1fea93720bb3 - languageName: node - linkType: hard - "string-length@npm:^4.0.1": version: 4.0.2 resolution: "string-length@npm:4.0.2" @@ -16641,15 +15043,6 @@ __metadata: languageName: node linkType: hard -"strip-hex-prefix@npm:1.0.0": - version: 1.0.0 - resolution: "strip-hex-prefix@npm:1.0.0" - dependencies: - is-hex-prefixed: "npm:1.0.0" - checksum: 4cafe7caee1d281d3694d14920fd5d3c11adf09371cef7e2ccedd5b83efd9e9bd2219b5d6ce6e809df6e0f437dc9d30db1192116580875698aad164a6d6b285b - languageName: node - linkType: hard - "strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -16722,25 +15115,6 @@ __metadata: languageName: node linkType: hard -"swarm-js@npm:^0.1.40": - version: 0.1.42 - resolution: "swarm-js@npm:0.1.42" - dependencies: - bluebird: "npm:^3.5.0" - buffer: "npm:^5.0.5" - eth-lib: "npm:^0.1.26" - fs-extra: "npm:^4.0.2" - got: "npm:^11.8.5" - mime-types: "npm:^2.1.16" - mkdirp-promise: "npm:^5.0.1" - mock-fs: "npm:^4.1.0" - setimmediate: "npm:^1.0.5" - tar: "npm:^4.0.2" - xhr-request: "npm:^1.0.1" - checksum: 341bcfef6daadc1904ea87b1781f10dc99ec14e33c9a9041e43e9617dcc3b7d632230e1baf2fafecb8e10e63c2e4eeb7cce7c85592dc0cf0dde935f49c77050b - languageName: node - linkType: hard - "tar-fs@npm:^1.8.1": version: 1.16.3 resolution: "tar-fs@npm:1.16.3" @@ -16793,21 +15167,6 @@ __metadata: languageName: node linkType: hard -"tar@npm:^4.0.2": - version: 4.4.19 - resolution: "tar@npm:4.4.19" - dependencies: - chownr: "npm:^1.1.4" - fs-minipass: "npm:^1.2.7" - minipass: "npm:^2.9.0" - minizlib: "npm:^1.3.3" - mkdirp: "npm:^0.5.5" - safe-buffer: "npm:^5.2.1" - yallist: "npm:^3.1.1" - checksum: 2715b5964578424ba5164632905a85e5a98c8dffeba657860aafa3a771b2602e6fd2a350bca891d78b8bda8cab5c53134c683ed2269b9925533477a24722e73b - languageName: node - linkType: hard - "tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.1.13 resolution: "tar@npm:6.1.13" @@ -16902,13 +15261,6 @@ __metadata: languageName: node linkType: hard -"timed-out@npm:^4.0.1": - version: 4.0.1 - resolution: "timed-out@npm:4.0.1" - checksum: d52648e5fc0ebb0cae1633737a1db1b7cb464d5d43d754bd120ddebd8067a1b8f42146c250d8cfb9952183b7b0f341a99fc71b59c52d659218afae293165004f - languageName: node - linkType: hard - "tiny-jsonc@npm:^1.0.2": version: 1.0.2 resolution: "tiny-jsonc@npm:1.0.2" @@ -17033,23 +15385,6 @@ __metadata: languageName: node linkType: hard -"toidentifier@npm:1.0.1": - version: 1.0.1 - resolution: "toidentifier@npm:1.0.1" - checksum: 952c29e2a85d7123239b5cfdd889a0dde47ab0497f0913d70588f19c53f7e0b5327c95f4651e413c74b785147f9637b17410ac8c846d5d4a20a5a33eb6dc3a45 - languageName: node - linkType: hard - -"tough-cookie@npm:~2.5.0": - version: 2.5.0 - resolution: "tough-cookie@npm:2.5.0" - dependencies: - psl: "npm:^1.1.28" - punycode: "npm:^2.1.1" - checksum: 024cb13a4d1fe9af57f4323dff765dd9b217cc2a69be77e3b8a1ca45600aa33a097b6ad949f225d885e904f4bd3ceccef104741ef202d8378e6ca78e850ff82f - languageName: node - linkType: hard - "tr46@npm:~0.0.3": version: 0.0.3 resolution: "tr46@npm:0.0.3" @@ -17198,13 +15533,6 @@ __metadata: languageName: node linkType: hard -"tweetnacl@npm:^0.14.3, tweetnacl@npm:~0.14.0": - version: 0.14.5 - resolution: "tweetnacl@npm:0.14.5" - checksum: 04ee27901cde46c1c0a64b9584e04c96c5fe45b38c0d74930710751ea991408b405747d01dfae72f80fc158137018aea94f9c38c651cb9c318f0861a310c3679 - languageName: node - linkType: hard - "type-detect@npm:4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" @@ -17226,39 +15554,6 @@ __metadata: languageName: node linkType: hard -"type-is@npm:~1.6.18": - version: 1.6.18 - resolution: "type-is@npm:1.6.18" - dependencies: - media-typer: "npm:0.3.0" - mime-types: "npm:~2.1.24" - checksum: 0bd9eeae5efd27d98fd63519f999908c009e148039d8e7179a074f105362d4fcc214c38b24f6cda79c87e563cbd12083a4691381ed28559220d4a10c2047bed4 - languageName: node - linkType: hard - -"type@npm:^1.0.1": - version: 1.2.0 - resolution: "type@npm:1.2.0" - checksum: b4d4b27d1926028be45fc5baaca205896e2a1fe9e5d24dc892046256efbe88de6acd0149e7353cd24dad596e1483e48ec60b0912aa47ca078d68cdd198b09885 - languageName: node - linkType: hard - -"type@npm:^2.7.2": - version: 2.7.2 - resolution: "type@npm:2.7.2" - checksum: 602f1b369fba60687fa4d0af6fcfb814075bcaf9ed3a87637fb384d9ff849e2ad15bc244a431f341374562e51a76c159527ffdb1f1f24b0f1f988f35a301c41d - languageName: node - linkType: hard - -"typedarray-to-buffer@npm:^3.1.5": - version: 3.1.5 - resolution: "typedarray-to-buffer@npm:3.1.5" - dependencies: - is-typedarray: "npm:^1.0.0" - checksum: 7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c - languageName: node - linkType: hard - "typedoc-plugin-markdown@npm:^4.6.3": version: 4.6.3 resolution: "typedoc-plugin-markdown@npm:4.6.3" @@ -17312,13 +15607,6 @@ __metadata: languageName: node linkType: hard -"ultron@npm:~1.1.0": - version: 1.1.1 - resolution: "ultron@npm:1.1.1" - checksum: 7cc6e8e98a2c62c87ab25a79a274f90492f13f5cf7c622dbda1ec85913e207aed392c26e76ed6250c4f05f842571b05dcce1f8ad0f5ecded64a99002b1fdf6e5 - languageName: node - linkType: hard - "underscore@npm:>1.4.4": version: 1.13.6 resolution: "underscore@npm:1.13.6" @@ -17397,13 +15685,6 @@ __metadata: languageName: node linkType: hard -"unpipe@npm:1.0.0, unpipe@npm:~1.0.0": - version: 1.0.0 - resolution: "unpipe@npm:1.0.0" - checksum: 4fa18d8d8d977c55cb09715385c203197105e10a6d220087ec819f50cb68870f02942244f1017565484237f1f8c5d3cd413631b1ae104d3096f24fdfde1b4aa2 - languageName: node - linkType: hard - "update-browserslist-db@npm:^1.0.10": version: 1.0.11 resolution: "update-browserslist-db@npm:1.0.11" @@ -17436,22 +15717,6 @@ __metadata: languageName: node linkType: hard -"uri-js@npm:^4.2.2": - version: 4.4.1 - resolution: "uri-js@npm:4.4.1" - dependencies: - punycode: "npm:^2.1.0" - checksum: b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb - languageName: node - linkType: hard - -"url-set-query@npm:^1.0.0": - version: 1.0.0 - resolution: "url-set-query@npm:1.0.0" - checksum: a6e4d1ac5c3e7db8644655a2774b9462d8d95ec7abae341ff53d4a3d03adc2dabc38650dc757659fcbce4859372bbea4a896ac842dd5b54cc22aae087ba35664 - languageName: node - linkType: hard - "url@npm:0.10.3": version: 0.10.3 resolution: "url@npm:0.10.3" @@ -17484,16 +15749,6 @@ __metadata: languageName: node linkType: hard -"utf-8-validate@npm:^5.0.2": - version: 5.0.10 - resolution: "utf-8-validate@npm:5.0.10" - dependencies: - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.3.0" - checksum: b89cbc13b4badad04828349ebb7aa2ab1edcb02b46ab12ce0ba5b2d6886d684ad4e93347819e3c8d36224c8742422d2dca69f5cc16c72ae4d7eeecc0c5cb544b - languageName: node - linkType: hard - "utf8@npm:3.0.0, utf8@npm:^3.0.0": version: 3.0.0 resolution: "utf8@npm:3.0.0" @@ -17508,7 +15763,7 @@ __metadata: languageName: node linkType: hard -"util@npm:^0.12.4, util@npm:^0.12.5": +"util@npm:^0.12.4": version: 0.12.5 resolution: "util@npm:0.12.5" dependencies: @@ -17528,13 +15783,6 @@ __metadata: languageName: node linkType: hard -"utils-merge@npm:1.0.1": - version: 1.0.1 - resolution: "utils-merge@npm:1.0.1" - checksum: 5d6949693d58cb2e636a84f3ee1c6e7b2f9c16cb1d42d0ecb386d8c025c69e327205aa1c69e2868cc06a01e5e20681fbba55a4e0ed0cce913d60334024eae798 - languageName: node - linkType: hard - "uuid@npm:8.0.0": version: 8.0.0 resolution: "uuid@npm:8.0.0" @@ -17544,15 +15792,6 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^3.3.2": - version: 3.4.0 - resolution: "uuid@npm:3.4.0" - bin: - uuid: ./bin/uuid - checksum: 4f2b86432b04cc7c73a0dd1bcf11f1fc18349d65d2e4e32dd0fc658909329a1e0cc9244aa93f34c0cccfdd5ae1af60a149251a5f420ec3ac4223a3dab198fb2e - languageName: node - linkType: hard - "uuid@npm:^8.3.0, uuid@npm:^8.3.2": version: 8.3.2 resolution: "uuid@npm:8.3.2" @@ -17562,15 +15801,6 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^9.0.0": - version: 9.0.0 - resolution: "uuid@npm:9.0.0" - bin: - uuid: dist/bin/uuid - checksum: 23857699a616d1b48224bc2b8440eae6e57d25463c3a0200e514ba8279dfa3bde7e92ea056122237839cfa32045e57d8f8f4a30e581d720fd72935572853ae2e - languageName: node - linkType: hard - "uuid@npm:^9.0.1": version: 9.0.1 resolution: "uuid@npm:9.0.1" @@ -17631,28 +15861,24 @@ __metadata: languageName: node linkType: hard -"varint@npm:^5.0.0": - version: 5.0.2 - resolution: "varint@npm:5.0.2" - checksum: e1a66bf9a6cea96d1f13259170d4d41b845833acf3a9df990ea1e760d279bd70d5b1f4c002a50197efd2168a2fd43eb0b808444600fd4d23651e8d42fe90eb05 - languageName: node - linkType: hard - -"vary@npm:^1, vary@npm:~1.1.2": - version: 1.1.2 - resolution: "vary@npm:1.1.2" - checksum: 31389debef15a480849b8331b220782230b9815a8e0dbb7b9a8369559aed2e9a7800cd904d4371ea74f4c3527db456dc8e7ac5befce5f0d289014dbdf47b2242 - languageName: node - linkType: hard - -"verror@npm:1.10.0": - version: 1.10.0 - resolution: "verror@npm:1.10.0" +"viem@npm:^2.0.0": + version: 2.46.3 + resolution: "viem@npm:2.46.3" dependencies: - assert-plus: "npm:^1.0.0" - core-util-is: "npm:1.0.2" - extsprintf: "npm:^1.2.0" - checksum: da548149dd9c130a8a2587c9ee71ea30128d1526925707e2d01ed9c5c45c9e9f86733c66a328247cdd5f7c1516fb25b0f959ba754bfbe15072aa99ff96468a29 + "@noble/curves": "npm:1.9.1" + "@noble/hashes": "npm:1.8.0" + "@scure/bip32": "npm:1.7.0" + "@scure/bip39": "npm:1.6.0" + abitype: "npm:1.2.3" + isows: "npm:1.0.7" + ox: "npm:0.12.4" + ws: "npm:8.18.3" + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: f3c916612f0f5a35f4368ccf402942247ae7901cd972f1ffb557d5a67353b74056dc6062bd0b6c470479ce281b60306192b02899aec0d428c66afb182afec431 languageName: node linkType: hard @@ -17846,278 +16072,6 @@ __metadata: languageName: node linkType: hard -"web3-bzz@npm:1.10.4": - version: 1.10.4 - resolution: "web3-bzz@npm:1.10.4" - dependencies: - "@types/node": "npm:^12.12.6" - got: "npm:12.1.0" - swarm-js: "npm:^0.1.40" - checksum: 03b9e48e85d97c0a0d2fdec06fb42188adaf81e83c35ab73b3f6eafbdda2b43c0a9ed1a3b4ce86360544818eec34c056f0e4b67395685df97c1901f4a1c4a02e - languageName: node - linkType: hard - -"web3-core-helpers@npm:1.10.4": - version: 1.10.4 - resolution: "web3-core-helpers@npm:1.10.4" - dependencies: - web3-eth-iban: "npm:1.10.4" - web3-utils: "npm:1.10.4" - checksum: 9c22942827bed0e46ae491a0bee3cd60cea636f9b0408b11bb341b0370e58a94358025657405142c2a24f3912a8f947e6e977d594d9ba66e11dedce3c5c4a7f4 - languageName: node - linkType: hard - -"web3-core-method@npm:1.10.4": - version: 1.10.4 - resolution: "web3-core-method@npm:1.10.4" - dependencies: - "@ethersproject/transactions": "npm:^5.6.2" - web3-core-helpers: "npm:1.10.4" - web3-core-promievent: "npm:1.10.4" - web3-core-subscriptions: "npm:1.10.4" - web3-utils: "npm:1.10.4" - checksum: d942beba3999c084333f5c808ada2a90930d55d148d5f8cc51a2135f8ab3f101fa5ce0d732a60830e8cad2af844bbed6cf0b6250863003adafb08c7ffa9fbd5f - languageName: node - linkType: hard - -"web3-core-promievent@npm:1.10.4": - version: 1.10.4 - resolution: "web3-core-promievent@npm:1.10.4" - dependencies: - eventemitter3: "npm:4.0.4" - checksum: a792c74aa5c91dc63fb493af04628ecfa08b9e6ceea402dfe53f718b019c41d63a0200bf3045dd23ec3c42b8d7474ac96eb4cb4456060becc551c2cacbd02bb1 - languageName: node - linkType: hard - -"web3-core-requestmanager@npm:1.10.4": - version: 1.10.4 - resolution: "web3-core-requestmanager@npm:1.10.4" - dependencies: - util: "npm:^0.12.5" - web3-core-helpers: "npm:1.10.4" - web3-providers-http: "npm:1.10.4" - web3-providers-ipc: "npm:1.10.4" - web3-providers-ws: "npm:1.10.4" - checksum: c26bf616cc156b2198bf634084978d66cf384cf2b174324b6ada071a8c9e9be7855d72c09453308d1a46b50874c18ff9b75193f8736c2b285cdc32209391880c - languageName: node - linkType: hard - -"web3-core-subscriptions@npm:1.10.4": - version: 1.10.4 - resolution: "web3-core-subscriptions@npm:1.10.4" - dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.10.4" - checksum: b1652988c0925ab1d5c27e67a816ec6bcb32f37f59c7314e1f02552233fbc486a0de579aeb660d77d82452b63e9feaa98317ec7897cd7aeb140595c8e176d0eb - languageName: node - linkType: hard - -"web3-core@npm:1.10.4": - version: 1.10.4 - resolution: "web3-core@npm:1.10.4" - dependencies: - "@types/bn.js": "npm:^5.1.1" - "@types/node": "npm:^12.12.6" - bignumber.js: "npm:^9.0.0" - web3-core-helpers: "npm:1.10.4" - web3-core-method: "npm:1.10.4" - web3-core-requestmanager: "npm:1.10.4" - web3-utils: "npm:1.10.4" - checksum: 138c5abff27a48d16584fdbe56b940f9efe7cd2463d768f42c5fcdfc97d0dc4fc41e09ff1ffb8c8ff79b22a69e9efbf5af27c4b6a0d888c351202f03a8b01b8e - languageName: node - linkType: hard - -"web3-eth-abi@npm:1.10.4": - version: 1.10.4 - resolution: "web3-eth-abi@npm:1.10.4" - dependencies: - "@ethersproject/abi": "npm:^5.6.3" - web3-utils: "npm:1.10.4" - checksum: c601e45303c607a18f6f8e793aa9c5432fcaf83a34732dc9667b7e2eeb53a4cb8c2dec6fff9f33061fcc5130ec6c8f656f3c3ef962d7ff2af3247f828cffe559 - languageName: node - linkType: hard - -"web3-eth-accounts@npm:1.10.4": - version: 1.10.4 - resolution: "web3-eth-accounts@npm:1.10.4" - dependencies: - "@ethereumjs/common": "npm:2.6.5" - "@ethereumjs/tx": "npm:3.5.2" - "@ethereumjs/util": "npm:^8.1.0" - eth-lib: "npm:0.2.8" - scrypt-js: "npm:^3.0.1" - uuid: "npm:^9.0.0" - web3-core: "npm:1.10.4" - web3-core-helpers: "npm:1.10.4" - web3-core-method: "npm:1.10.4" - web3-utils: "npm:1.10.4" - checksum: 994c9f8b3fd8c5fc72e1f2ca6770ad61a2618de2ddc38a898a7d956d22cbdedac7cc683319252a7c9a26c06f337942bf5af84a4ff4001e784e90d061c2733fc2 - languageName: node - linkType: hard - -"web3-eth-contract@npm:1.10.4": - version: 1.10.4 - resolution: "web3-eth-contract@npm:1.10.4" - dependencies: - "@types/bn.js": "npm:^5.1.1" - web3-core: "npm:1.10.4" - web3-core-helpers: "npm:1.10.4" - web3-core-method: "npm:1.10.4" - web3-core-promievent: "npm:1.10.4" - web3-core-subscriptions: "npm:1.10.4" - web3-eth-abi: "npm:1.10.4" - web3-utils: "npm:1.10.4" - checksum: 8b0aa58c268b4be94a2ee14ff7fbdd9a2a20b912e580a69cbbbf57493331f60b96d88108ad4deabac3c3810d94483c449b1e5a06b414bc7b1ef326c682603836 - languageName: node - linkType: hard - -"web3-eth-ens@npm:1.10.4": - version: 1.10.4 - resolution: "web3-eth-ens@npm:1.10.4" - dependencies: - content-hash: "npm:^2.5.2" - eth-ens-namehash: "npm:2.0.8" - web3-core: "npm:1.10.4" - web3-core-helpers: "npm:1.10.4" - web3-core-promievent: "npm:1.10.4" - web3-eth-abi: "npm:1.10.4" - web3-eth-contract: "npm:1.10.4" - web3-utils: "npm:1.10.4" - checksum: 1296b523a79bd46dc2485d21888454dbca7b7005af5156e58f2515e09f8b30973697a8032429fdaab01d2f8e3e605716789875dadc87cadd3ec9a2ce5d182742 - languageName: node - linkType: hard - -"web3-eth-iban@npm:1.10.4": - version: 1.10.4 - resolution: "web3-eth-iban@npm:1.10.4" - dependencies: - bn.js: "npm:^5.2.1" - web3-utils: "npm:1.10.4" - checksum: b5e33aaf3d41608ed59ea98c703271eefcd30aea15163cda4bc8713f9716eb40b816e8047022ebf71391250983acfe58e65551461109a53e266f4b824c4a0678 - languageName: node - linkType: hard - -"web3-eth-personal@npm:1.10.4": - version: 1.10.4 - resolution: "web3-eth-personal@npm:1.10.4" - dependencies: - "@types/node": "npm:^12.12.6" - web3-core: "npm:1.10.4" - web3-core-helpers: "npm:1.10.4" - web3-core-method: "npm:1.10.4" - web3-net: "npm:1.10.4" - web3-utils: "npm:1.10.4" - checksum: 1b0818aa3dc9d58ece45af85ea57ddd3fbc3cd2d8b325e18f2071236ab9e9ba2e878d3f77fddfb9ab1a37ee441209f07302638b13c86bc372b2e22989dc1d903 - languageName: node - linkType: hard - -"web3-eth@npm:1.10.4": - version: 1.10.4 - resolution: "web3-eth@npm:1.10.4" - dependencies: - web3-core: "npm:1.10.4" - web3-core-helpers: "npm:1.10.4" - web3-core-method: "npm:1.10.4" - web3-core-subscriptions: "npm:1.10.4" - web3-eth-abi: "npm:1.10.4" - web3-eth-accounts: "npm:1.10.4" - web3-eth-contract: "npm:1.10.4" - web3-eth-ens: "npm:1.10.4" - web3-eth-iban: "npm:1.10.4" - web3-eth-personal: "npm:1.10.4" - web3-net: "npm:1.10.4" - web3-utils: "npm:1.10.4" - checksum: 0da77f76715711cbae7ec0f13300cf5cf364eed2955077f55462f162de9e133305d6534203f50aa786f496b4064d6b46577f30b8f8d0a0cad4476f7e7f30980e - languageName: node - linkType: hard - -"web3-net@npm:1.10.4": - version: 1.10.4 - resolution: "web3-net@npm:1.10.4" - dependencies: - web3-core: "npm:1.10.4" - web3-core-method: "npm:1.10.4" - web3-utils: "npm:1.10.4" - checksum: 7f28f58ed1521bd805d63340994be436812e771e8edaa00aea568fa7ae3374746fb5f5aa6ac67632862a739833dfea6ffa92f4df4bca7c394b2608c603e1eda6 - languageName: node - linkType: hard - -"web3-providers-http@npm:1.10.4": - version: 1.10.4 - resolution: "web3-providers-http@npm:1.10.4" - dependencies: - abortcontroller-polyfill: "npm:^1.7.5" - cross-fetch: "npm:^4.0.0" - es6-promise: "npm:^4.2.8" - web3-core-helpers: "npm:1.10.4" - checksum: 2ff27d45cc7c7b1e8f07a7917fe1502fef59e211b2ee97851369f9b6dab99ce81b0bef50f9ecf36286137fc41f1230f04b55b090d30f870fbc5ef1972d165b5f - languageName: node - linkType: hard - -"web3-providers-ipc@npm:1.10.4": - version: 1.10.4 - resolution: "web3-providers-ipc@npm:1.10.4" - dependencies: - oboe: "npm:2.1.5" - web3-core-helpers: "npm:1.10.4" - checksum: cd33a954f59ba3a9ca466dca0d6563f46c56879dc249d885b8edfee077f9f58ccf591ba06855e1d69baba52a8719c03684b0ba7b33d836bfdd4c6166e289c0d4 - languageName: node - linkType: hard - -"web3-providers-ws@npm:1.10.4": - version: 1.10.4 - resolution: "web3-providers-ws@npm:1.10.4" - dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.10.4" - websocket: "npm:^1.0.32" - checksum: 98cb76473ae1060e21ff474768a04c6dcd91724f24a1fac2d4a5f186a35bd2f119605fbb28423dfe5be33755b1e5808b10514ddaf326b57573b447efc84ef730 - languageName: node - linkType: hard - -"web3-shh@npm:1.10.4": - version: 1.10.4 - resolution: "web3-shh@npm:1.10.4" - dependencies: - web3-core: "npm:1.10.4" - web3-core-method: "npm:1.10.4" - web3-core-subscriptions: "npm:1.10.4" - web3-net: "npm:1.10.4" - checksum: 73e497ba841ad378481fa786790fc929808b67d5824a41f48943332033a239028afb360723bcd463254fb0298c767289d749796718c07a3718e944b9b5fb156d - languageName: node - linkType: hard - -"web3-utils@npm:1.10.4": - version: 1.10.4 - resolution: "web3-utils@npm:1.10.4" - dependencies: - "@ethereumjs/util": "npm:^8.1.0" - bn.js: "npm:^5.2.1" - ethereum-bloom-filters: "npm:^1.0.6" - ethereum-cryptography: "npm:^2.1.2" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 3e586b638cdae9fa45b7698e8a511ae2cbf60e219a900351ae38d384beaaf67424ac6e1d9c5098c3fb8f2ff3cc65a70d977a20bdce3dad542cb50deb666ea2a3 - languageName: node - linkType: hard - -"web3@npm:1.10.4": - version: 1.10.4 - resolution: "web3@npm:1.10.4" - dependencies: - web3-bzz: "npm:1.10.4" - web3-core: "npm:1.10.4" - web3-eth: "npm:1.10.4" - web3-eth-personal: "npm:1.10.4" - web3-net: "npm:1.10.4" - web3-shh: "npm:1.10.4" - web3-utils: "npm:1.10.4" - checksum: 3e6132a6fe7a76d071ab89cd4895f816d0af2fea5db04721483e9850e23f8c955a905ad3e583473aff3dcdab6e385eb6d7f727cc05738fb795aeadc0075e2179 - languageName: node - linkType: hard - "webauthn-p256@npm:0.0.10": version: 0.0.10 resolution: "webauthn-p256@npm:0.0.10" @@ -18135,20 +16089,6 @@ __metadata: languageName: node linkType: hard -"websocket@npm:^1.0.32": - version: 1.0.34 - resolution: "websocket@npm:1.0.34" - dependencies: - bufferutil: "npm:^4.0.1" - debug: "npm:^2.2.0" - es5-ext: "npm:^0.10.50" - typedarray-to-buffer: "npm:^3.1.5" - utf-8-validate: "npm:^5.0.2" - yaeti: "npm:^0.0.6" - checksum: b72e3dcc3fa92b4a4511f0df89b25feed6ab06979cb9e522d2736f09855f4bf7588d826773b9405fcf3f05698200eb55ba9da7ef333584653d4912a5d3b13c18 - languageName: node - linkType: hard - "whatwg-url@npm:^5.0.0": version: 5.0.0 resolution: "whatwg-url@npm:5.0.0" @@ -18377,6 +16317,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:8.18.3": + version: 8.18.3 + resolution: "ws@npm:8.18.3" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 725964438d752f0ab0de582cd48d6eeada58d1511c3f613485b5598a83680bedac6187c765b0fe082e2d8cc4341fc57707c813ae780feee82d0c5efe6a4c61b6 + languageName: node + linkType: hard + "ws@npm:8.2.3": version: 8.2.3 resolution: "ws@npm:8.2.3" @@ -18392,17 +16347,6 @@ __metadata: languageName: node linkType: hard -"ws@npm:^3.0.0": - version: 3.3.3 - resolution: "ws@npm:3.3.3" - dependencies: - async-limiter: "npm:~1.0.0" - safe-buffer: "npm:~5.1.0" - ultron: "npm:~1.1.0" - checksum: 4b4a7e5d11025e399d82a7471bfb4818d563c892f5d953c2de937d262bd8e8acc8b340220001c01f8392574fccbc2df153d6031e285b8b38441187ea0c2cfd72 - languageName: node - linkType: hard - "ws@npm:^8.13.0": version: 8.16.0 resolution: "ws@npm:8.16.0" @@ -18433,42 +16377,6 @@ __metadata: languageName: node linkType: hard -"xhr-request-promise@npm:^0.1.2": - version: 0.1.3 - resolution: "xhr-request-promise@npm:0.1.3" - dependencies: - xhr-request: "npm:^1.1.0" - checksum: 49ec3474884858faa55349894b1879c872422a24485097c8b71ba9046027d27f1d54eb61dfdb9d72e78892c7371d22d9cc6a4e101b6767bb4df89a0b6d739f85 - languageName: node - linkType: hard - -"xhr-request@npm:^1.0.1, xhr-request@npm:^1.1.0": - version: 1.1.0 - resolution: "xhr-request@npm:1.1.0" - dependencies: - buffer-to-arraybuffer: "npm:^0.0.5" - object-assign: "npm:^4.1.1" - query-string: "npm:^5.0.1" - simple-get: "npm:^2.7.0" - timed-out: "npm:^4.0.1" - url-set-query: "npm:^1.0.0" - xhr: "npm:^2.0.4" - checksum: 531c5e1e47d2e680c1ae1296af7fa375d752cd83c3fa1f9bd9e82fc4fb305ce8e7aaf266256e82bbd34e2a4891ec535bcc4e9f8db2691ab64bb3b6ff40296b9a - languageName: node - linkType: hard - -"xhr@npm:^2.0.4, xhr@npm:^2.3.3": - version: 2.6.0 - resolution: "xhr@npm:2.6.0" - dependencies: - global: "npm:~4.4.0" - is-function: "npm:^1.0.1" - parse-headers: "npm:^2.0.0" - xtend: "npm:^4.0.0" - checksum: 31f34aba708955008c87bcd21482be6afc7ff8adc28090e633b1d3f8d3e8e93150bac47b262738b046d7729023a884b655d55cf34e9d14d5850a1275ab49fb37 - languageName: node - linkType: hard - "xml2js@npm:0.5.0": version: 0.5.0 resolution: "xml2js@npm:0.5.0" @@ -18507,14 +16415,7 @@ __metadata: languageName: node linkType: hard -"yaeti@npm:^0.0.6": - version: 0.0.6 - resolution: "yaeti@npm:0.0.6" - checksum: 6db12c152f7c363b80071086a3ebf5032e03332604eeda988872be50d6c8469e1f13316175544fa320f72edad696c2d83843ad0ff370659045c1a68bcecfcfea - languageName: node - linkType: hard - -"yallist@npm:^3.0.0, yallist@npm:^3.0.2, yallist@npm:^3.1.1": +"yallist@npm:^3.0.2": version: 3.1.1 resolution: "yallist@npm:3.1.1" checksum: 9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb