From 6b6f7057a86f46755d8e600f1fbc53e28cf75deb Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Sun, 20 Apr 2025 11:29:56 -0400 Subject: [PATCH 001/213] chore: snaps --- packages/core/src/actions/call.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/actions/call.test.ts b/packages/core/src/actions/call.test.ts index fb8cfc9030..d4ce5bfa51 100644 --- a/packages/core/src/actions/call.test.ts +++ b/packages/core/src/actions/call.test.ts @@ -116,14 +116,14 @@ test('contract revert (contract error)', async () => { to: address.wagmiMintExample, }), ).rejects.toThrowErrorMatchingInlineSnapshot(` - [CallExecutionError: Execution reverted with reason: revert: Token ID is taken. + [CallExecutionError: Execution reverted with reason: Token ID is taken. Raw Call Arguments: from: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 to: 0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2 data: 0xa0712d6800000000000000000000000000000000000000000000000000000000000001a4 - Details: execution reverted: revert: Token ID is taken + Details: execution reverted: Token ID is taken Version: viem@2.23.12] `) }) From 799ee4d4b23c2ecd64e3f3668e67634e81939719 Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Thu, 24 Apr 2025 05:11:13 +1000 Subject: [PATCH 002/213] feat: stabilize EIP-5792 (#4638) * feat: stabilize EIP-5792 * chore: changeset * chore: up * chore: up * chore: up * chore: up * chore: up --- .changeset/tough-garlics-promise.md | 6 ++ .github/workflows/verify.yml | 4 +- package.json | 2 +- packages/core/src/actions/call.test.ts | 8 +- packages/core/src/actions/connect.test.ts | 2 +- .../core/src/actions/deployContract.test.ts | 2 +- .../actions/getCallsStatus.test.ts | 8 +- .../actions/getCallsStatus.ts | 8 +- .../actions/getCapabilities.test.ts | 4 +- .../actions/getCapabilities.ts | 8 +- packages/core/src/actions/getToken.test.ts | 2 +- .../actions/prepareTransactionRequest.test.ts | 2 +- .../core/src/actions/readContracts.test.ts | 16 ++-- .../actions/sendCalls.test.ts | 16 +++- .../{experimental => }/actions/sendCalls.ts | 20 ++--- .../core/src/actions/sendTransaction.test.ts | 2 +- .../actions/showCallsStatus.test.ts | 6 +- .../actions/showCallsStatus.ts | 8 +- packages/core/src/actions/signMessage.test.ts | 2 +- .../core/src/actions/signTypedData.test.ts | 2 +- packages/core/src/actions/switchChain.test.ts | 2 +- .../actions/waitForCallsStatus.test.ts | 8 +- .../actions/waitForCallsStatus.ts | 8 +- .../actions/waitForTransactionReceipt.test.ts | 2 +- packages/core/src/connectors/mock.test.ts | 10 +-- packages/core/src/connectors/mock.ts | 35 ++++++-- .../actions/writeContracts.test.ts | 6 +- packages/core/src/exports/actions.test.ts | 5 ++ packages/core/src/exports/actions.ts | 35 ++++++++ packages/core/src/exports/experimental.ts | 77 +++++++++++++--- packages/core/src/exports/index.test.ts | 5 ++ packages/core/src/exports/index.ts | 35 ++++++++ packages/core/src/exports/query.test.ts | 8 ++ packages/core/src/exports/query.ts | 43 +++++++++ .../query/getCallsStatus.test.ts | 0 .../query/getCallsStatus.ts | 10 +-- .../query/getCapabilities.test.ts | 0 .../query/getCapabilities.ts | 10 +-- .../query/prepareTransactionRequest.test.ts | 2 +- .../query/sendCalls.test.ts | 0 .../src/{experimental => }/query/sendCalls.ts | 4 +- .../query/showCallsStatus.test.ts | 0 .../query/showCallsStatus.ts | 4 +- .../query/waitForCallsStatus.test.ts | 0 .../query/waitForCallsStatus.ts | 10 +-- .../core/src/transports/connector.test.ts | 6 +- .../hooks/useWriteContracts.test.ts | 6 +- packages/react/src/exports/actions.test.ts | 5 ++ packages/react/src/exports/experimental.ts | 28 ++++-- packages/react/src/exports/index.test.ts | 5 ++ packages/react/src/exports/index.ts | 30 +++++++ packages/react/src/exports/query.test.ts | 8 ++ .../hooks/useCallsStatus.test.ts | 14 ++- .../hooks/useCallsStatus.ts | 17 ++-- .../hooks/useCapabilities.test.ts | 0 .../hooks/useCapabilities.ts | 19 ++-- .../hooks/useSendCalls.test.ts | 6 +- .../{experimental => }/hooks/useSendCalls.ts | 13 ++- .../hooks/useShowCallsStatus.ts | 17 ++-- .../hooks/useWaitForCallsStatus.test.ts | 4 +- .../hooks/useWaitForCallsStatus.ts | 17 ++-- packages/vue/src/exports/actions.test.ts | 5 ++ packages/vue/src/exports/query.test.ts | 8 ++ pnpm-lock.yaml | 75 +++++++++------- site/.vitepress/sidebar.ts | 90 +++++++++---------- site/core/api/actions/getCallsStatus.md | 20 ++--- site/core/api/actions/getCapabilities.md | 20 ++--- site/core/api/actions/sendCalls.md | 26 +++--- site/core/api/actions/showCallsStatus.md | 20 ++--- site/core/api/actions/waitForCallsStatus.md | 24 +++-- site/core/api/actions/writeContracts.md | 4 +- site/react/api/hooks/useCallsStatus.md | 20 ++--- site/react/api/hooks/useCapabilities.md | 16 ++-- site/react/api/hooks/useSendCalls.md | 12 +-- site/react/api/hooks/useShowCallsStatus.md | 16 ++-- site/react/api/hooks/useWaitForCallsStatus.md | 20 ++--- 76 files changed, 666 insertions(+), 352 deletions(-) create mode 100644 .changeset/tough-garlics-promise.md rename packages/core/src/{experimental => }/actions/getCallsStatus.test.ts (90%) rename packages/core/src/{experimental => }/actions/getCallsStatus.ts (79%) rename packages/core/src/{experimental => }/actions/getCapabilities.test.ts (92%) rename packages/core/src/{experimental => }/actions/getCapabilities.ts (81%) rename packages/core/src/{experimental => }/actions/sendCalls.test.ts (89%) rename packages/core/src/{experimental => }/actions/sendCalls.ts (83%) rename packages/core/src/{experimental => }/actions/showCallsStatus.test.ts (83%) rename packages/core/src/{experimental => }/actions/showCallsStatus.ts (79%) rename packages/core/src/{experimental => }/actions/waitForCallsStatus.test.ts (90%) rename packages/core/src/{experimental => }/actions/waitForCallsStatus.ts (80%) rename packages/core/src/{experimental => }/query/getCallsStatus.test.ts (100%) rename packages/core/src/{experimental => }/query/getCallsStatus.ts (81%) rename packages/core/src/{experimental => }/query/getCapabilities.test.ts (100%) rename packages/core/src/{experimental => }/query/getCapabilities.ts (81%) rename packages/core/src/{experimental => }/query/sendCalls.test.ts (100%) rename packages/core/src/{experimental => }/query/sendCalls.ts (93%) rename packages/core/src/{experimental => }/query/showCallsStatus.test.ts (100%) rename packages/core/src/{experimental => }/query/showCallsStatus.ts (93%) rename packages/core/src/{experimental => }/query/waitForCallsStatus.test.ts (100%) rename packages/core/src/{experimental => }/query/waitForCallsStatus.ts (82%) rename packages/react/src/{experimental => }/hooks/useCallsStatus.test.ts (84%) rename packages/react/src/{experimental => }/hooks/useCallsStatus.ts (77%) rename packages/react/src/{experimental => }/hooks/useCapabilities.test.ts (100%) rename packages/react/src/{experimental => }/hooks/useCapabilities.ts (76%) rename packages/react/src/{experimental => }/hooks/useSendCalls.test.ts (89%) rename packages/react/src/{experimental => }/hooks/useSendCalls.ts (86%) rename packages/react/src/{experimental => }/hooks/useShowCallsStatus.ts (86%) rename packages/react/src/{experimental => }/hooks/useWaitForCallsStatus.test.ts (98%) rename packages/react/src/{experimental => }/hooks/useWaitForCallsStatus.ts (79%) diff --git a/.changeset/tough-garlics-promise.md b/.changeset/tough-garlics-promise.md new file mode 100644 index 0000000000..fc4e58fe46 --- /dev/null +++ b/.changeset/tough-garlics-promise.md @@ -0,0 +1,6 @@ +--- +"wagmi": minor +"@wagmi/core": minor +--- + +Stabilized EIP-5792 Actions & Hooks. diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 2ec609c42c..d4e71daddf 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -66,8 +66,8 @@ jobs: timeout-minutes: 5 strategy: matrix: - typescript-version: ['5.2.2', '5.3.3', '5.4.5', '5.5.2'] - viem-version: ['2.23.12', 'latest'] + typescript-version: ['5.5.2', '5.6.2', '5.7.2', '5.8.2', 'latest'] + viem-version: ['2.28.0', 'latest'] steps: - name: Clone repository diff --git a/package.json b/package.json index d7b3821bf0..c23646e11f 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "sherif": "^1.0.0", "simple-git-hooks": "^2.11.1", "typescript": "5.5.4", - "viem": "2.23.12", + "viem": "2.28.0", "vitest": "^2.1.1" }, "packageManager": "pnpm@9.11.0", diff --git a/packages/core/src/actions/call.test.ts b/packages/core/src/actions/call.test.ts index d4ce5bfa51..dd8e9b423a 100644 --- a/packages/core/src/actions/call.test.ts +++ b/packages/core/src/actions/call.test.ts @@ -81,7 +81,7 @@ test('insufficient funds', async () => { value: 100000 ETH Details: Insufficient funds for gas * price + value - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) @@ -104,7 +104,7 @@ test('maxFeePerGas less than maxPriorityFeePerGas', async () => { maxFeePerGas: 20 gwei maxPriorityFeePerGas: 22 gwei - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) @@ -124,7 +124,7 @@ test('contract revert (contract error)', async () => { data: 0xa0712d6800000000000000000000000000000000000000000000000000000000000001a4 Details: execution reverted: Token ID is taken - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) @@ -144,6 +144,6 @@ test('contract revert (insufficient params)', async () => { data: 0xa0712d68 Details: execution reverted - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) diff --git a/packages/core/src/actions/connect.test.ts b/packages/core/src/actions/connect.test.ts index a9c591895a..a8c49728a2 100644 --- a/packages/core/src/actions/connect.test.ts +++ b/packages/core/src/actions/connect.test.ts @@ -57,7 +57,7 @@ test('behavior: user rejected request', async () => { [UserRejectedRequestError: User rejected the request. Details: Failed to connect. - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) diff --git a/packages/core/src/actions/deployContract.test.ts b/packages/core/src/actions/deployContract.test.ts index 06b545a77e..47ebf34bf5 100644 --- a/packages/core/src/actions/deployContract.test.ts +++ b/packages/core/src/actions/deployContract.test.ts @@ -60,7 +60,7 @@ test('behavior: no funds', async () => { data: 0x608060405260405180602001604052806000815250600b90805190602001906200002b92919062000484565b506000600f60006101000a81548160ff0219169083151502179055503480156200005457600080fd5b50604051620046d0380380620046d0833981810160405260808110156200007a57600080fd5b81019080805160405193929190846401000000008211156200009b57600080fd5b83820191506020820185811115620000b257600080fd5b8251866001820283011164010000000082111715620000d057600080fd5b8083526020830192505050908051906020019080838360005b8381101562000106578082015181840152602081019050620000e9565b50505050905090810190601f168015620001345780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200015857600080fd5b838201915060208201858111156200016f57600080fd5b82518660018202830111640100000000821117156200018d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620001c3578082015181840152602081019050620001a6565b50505050905090810190601f168015620001f15780820380516001836020036101000a031916815260200191505b5060405260200180519060200190929190805190602001909291905050508383620002296301ffc9a760e01b6200037360201b60201c565b81600690805190602001906200024192919062000484565b5080600790805190602001906200025a92919062000484565b50620002736380ac58cd60e01b6200037360201b60201c565b6200028b635b5e139f60e01b6200037360201b60201c565b620002a363780e9d6360e01b6200037360201b60201c565b50506000620002b76200047c60201b60201c565b905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35081600e81905550620bdd808101601081905550505050506200052a565b63ffffffff60e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141562000410576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433136353a20696e76616c696420696e746572666163652069640000000081525060200191505060405180910390fd5b6001600080837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600033905090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004c757805160ff1916838001178555620004f8565b82800160010185558215620004f8579182015b82811115620004f7578251825591602001919060010190620004da565b5b5090506200050791906200050b565b5090565b5b80821115620005265760008160009055506001016200050c565b5090565b614196806200053a6000396000f3fe60806040526004361061021a5760003560e01c80636c0360eb11610123578063b0f67427116100ab578063e36d64981161006f578063e36d649814610ddf578063e985e9c514610e0a578063e986655014610e91578063eb8d244414610ea8578063f2fde38b14610ed55761021a565b8063b0f6742714610bac578063b88d4fde14610bc3578063bb8a16bd14610cd5578063c87b56dd14610d00578063cb774d4714610db45761021a565b80637d17fcbe116100f25780637d17fcbe14610a395780638da5cb5b14610a5057806395d89b4114610a91578063a22cb46514610b21578063a723533e14610b7e5761021a565b80636c0360eb1461090257806370a0823114610992578063715018a6146109f75780637a3f451e14610a0e5761021a565b80632f745c59116101a65780634f6ccce7116101755780634f6ccce7146106cb57806355f804b31461071a578063571dff3b146107e2578063607e20e31461080d5780636352211e1461089d5761021a565b80632f745c59146105b357806334918dfd146106225780633ccfd60b1461063957806342842e0e146106505761021a565b8063095ea7b3116101ed578063095ea7b3146103bf578063109695231461041a57806318160ddd146104e257806318e20a381461050d57806323b872dd146105385761021a565b8063018a2c371461021f57806301ffc9a71461025a57806306fdde03146102ca578063081812fc1461035a575b600080fd5b34801561022b57600080fd5b506102586004803603602081101561024257600080fd5b8101908080359060200190929190505050610f26565b005b34801561026657600080fd5b506102b26004803603602081101561027d57600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610fdf565b60405180821515815260200191505060405180910390f35b3480156102d657600080fd5b506102df611046565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561031f578082015181840152602081019050610304565b50505050905090810190601f16801561034c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561036657600080fd5b506103936004803603602081101561037d57600080fd5b81019080803590602001909291905050506110e8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103cb57600080fd5b50610418600480360360408110156103e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611183565b005b34801561042657600080fd5b506104e06004803603602081101561043d57600080fd5b810190808035906020019064010000000081111561045a57600080fd5b82018360208201111561046c57600080fd5b8035906020019184600183028401116401000000008311171561048e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506112c7565b005b3480156104ee57600080fd5b506104f7611390565b6040518082815260200191505060405180910390f35b34801561051957600080fd5b506105226113a1565b6040518082815260200191505060405180910390f35b34801561054457600080fd5b506105b16004803603606081101561055b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506113a7565b005b3480156105bf57600080fd5b5061060c600480360360408110156105d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061141d565b6040518082815260200191505060405180910390f35b34801561062e57600080fd5b50610637611478565b005b34801561064557600080fd5b5061064e611553565b005b34801561065c57600080fd5b506106c96004803603606081101561067357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611651565b005b3480156106d757600080fd5b50610704600480360360208110156106ee57600080fd5b8101908080359060200190929190505050611671565b6040518082815260200191505060405180910390f35b34801561072657600080fd5b506107e06004803603602081101561073d57600080fd5b810190808035906020019064010000000081111561075a57600080fd5b82018360208201111561076c57600080fd5b8035906020019184600183028401116401000000008311171561078e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611694565b005b3480156107ee57600080fd5b506107f761174f565b6040518082815260200191505060405180910390f35b34801561081957600080fd5b50610822611754565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610862578082015181840152602081019050610847565b50505050905090810190601f16801561088f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108a957600080fd5b506108d6600480360360208110156108c057600080fd5b81019080803590602001909291905050506117f2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561090e57600080fd5b50610917611829565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561095757808201518184015260208101905061093c565b50505050905090810190601f1680156109845780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561099e57600080fd5b506109e1600480360360208110156109b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cb565b6040518082815260200191505060405180910390f35b348015610a0357600080fd5b50610a0c6119a0565b005b348015610a1a57600080fd5b50610a23611b10565b6040518082815260200191505060405180910390f35b348015610a4557600080fd5b50610a4e611b1c565b005b348015610a5c57600080fd5b50610a65611c4c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610a9d57600080fd5b50610aa6611c76565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610ae6578082015181840152602081019050610acb565b50505050905090810190601f168015610b135780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610b2d57600080fd5b50610b7c60048036036040811015610b4457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611d18565b005b610baa60048036036020811015610b9457600080fd5b8101908080359060200190929190505050611ece565b005b348015610bb857600080fd5b50610bc1612127565b005b348015610bcf57600080fd5b50610cd360048036036080811015610be657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115610c4d57600080fd5b820183602082011115610c5f57600080fd5b80359060200191846001830284011164010000000083111715610c8157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061220b565b005b348015610ce157600080fd5b50610cea612283565b6040518082815260200191505060405180910390f35b348015610d0c57600080fd5b50610d3960048036036020811015610d2357600080fd5b8101908080359060200190929190505050612289565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610d79578082015181840152602081019050610d5e565b50505050905090810190601f168015610da65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610dc057600080fd5b50610dc961255a565b6040518082815260200191505060405180910390f35b348015610deb57600080fd5b50610df4612560565b6040518082815260200191505060405180910390f35b348015610e1657600080fd5b50610e7960048036036040811015610e2d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612566565b60405180821515815260200191505060405180910390f35b348015610e9d57600080fd5b50610ea66125fa565b005b348015610eb457600080fd5b50610ebd612764565b60405180821515815260200191505060405180910390f35b348015610ee157600080fd5b50610f2460048036036020811015610ef857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612777565b005b610f2e61296c565b73ffffffffffffffffffffffffffffffffffffffff16610f4c611c4c565b73ffffffffffffffffffffffffffffffffffffffff1614610fd5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060108190555050565b6000806000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff169050919050565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110de5780601f106110b3576101008083540402835291602001916110de565b820191906000526020600020905b8154815290600101906020018083116110c157829003601f168201915b5050505050905090565b60006110f382612974565b611148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061408b602c913960400191505060405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061118e826117f2565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061410f6021913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1661123461296c565b73ffffffffffffffffffffffffffffffffffffffff16148061126357506112628161125d61296c565b612566565b5b6112b8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180613f956038913960400191505060405180910390fd5b6112c28383612991565b505050565b6112cf61296c565b73ffffffffffffffffffffffffffffffffffffffff166112ed611c4c565b73ffffffffffffffffffffffffffffffffffffffff1614611376576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600b908051906020019061138c929190613de6565b5050565b600061139c6002612a4a565b905090565b60105481565b6113b86113b261296c565b82612a5f565b61140d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001806141306031913960400191505060405180910390fd5b611418838383612b53565b505050565b600061147082600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020612d9690919063ffffffff16565b905092915050565b61148061296c565b73ffffffffffffffffffffffffffffffffffffffff1661149e611c4c565b73ffffffffffffffffffffffffffffffffffffffff1614611527576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600f60009054906101000a900460ff1615600f60006101000a81548160ff021916908315150217905550565b61155b61296c565b73ffffffffffffffffffffffffffffffffffffffff16611579611c4c565b73ffffffffffffffffffffffffffffffffffffffff1614611602576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60004790503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561164d573d6000803e3d6000fd5b5050565b61166c8383836040518060200160405280600081525061220b565b505050565b600080611688836002612db090919063ffffffff16565b50905080915050919050565b61169c61296c565b73ffffffffffffffffffffffffffffffffffffffff166116ba611c4c565b73ffffffffffffffffffffffffffffffffffffffff1614611743576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61174c81612ddc565b50565b601481565b600b8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117ea5780601f106117bf576101008083540402835291602001916117ea565b820191906000526020600020905b8154815290600101906020018083116117cd57829003601f168201915b505050505081565b600061182282604051806060016040528060298152602001613ff7602991396002612df69092919063ffffffff16565b9050919050565b606060098054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156118c15780601f10611896576101008083540402835291602001916118c1565b820191906000526020600020905b8154815290600101906020018083116118a457829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613fcd602a913960400191505060405180910390fd5b611999600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020612e15565b9050919050565b6119a861296c565b73ffffffffffffffffffffffffffffffffffffffff166119c6611c4c565b73ffffffffffffffffffffffffffffffffffffffff1614611a4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b67011c37937e08000081565b611b2461296c565b73ffffffffffffffffffffffffffffffffffffffff16611b42611c4c565b73ffffffffffffffffffffffffffffffffffffffff1614611bcb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600d5414611c43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f5374617274696e6720696e64657820697320616c72656164792073657400000081525060200191505060405180910390fd5b43600c81905550565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060078054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d0e5780601f10611ce357610100808354040283529160200191611d0e565b820191906000526020600020905b815481529060010190602001808311611cf157829003601f168201915b5050505050905090565b611d2061296c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611dc1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552433732313a20617070726f766520746f2063616c6c65720000000000000081525060200191505060405180910390fd5b8060056000611dce61296c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611e7b61296c565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b600f60009054906101000a900460ff16611f50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f53616c65206d7573742062652061637469766520746f206d696e74204170650081525060200191505060405180910390fd5b6014811115611faa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613f746021913960400191505060405180910390fd5b600e54611fc782611fb9611390565b612e2a90919063ffffffff16565b111561201e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806140426028913960400191505060405180910390fd5b3461203a8267011c37937e080000612eb290919063ffffffff16565b11156120ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45746865722076616c75652073656e74206973206e6f7420636f72726563740081525060200191505060405180910390fd5b60005b818110156120ef5760006120c3611390565b9050600e546120d0611390565b10156120e1576120e03382612f38565b5b5080806001019150506120b1565b506000600c541480156121175750600e54612108611390565b148061211657506010544210155b5b156121245743600c819055505b50565b61212f61296c565b73ffffffffffffffffffffffffffffffffffffffff1661214d611c4c565b73ffffffffffffffffffffffffffffffffffffffff16146121d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006121e0611390565b905060005b601e811015612207576121fa33828401612f38565b80806001019150506121e5565b5050565b61221c61221661296c565b83612a5f565b612271576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001806141306031913960400191505060405180910390fd5b61227d84848484612f56565b50505050565b600e5481565b606061229482612974565b6122e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806140e0602f913960400191505060405180910390fd5b6060600860008481526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156123925780601f1061236757610100808354040283529160200191612392565b820191906000526020600020905b81548152906001019060200180831161237557829003601f168201915b5050505050905060606123a3611829565b90506000815114156123b9578192505050612555565b60008251111561248a5780826040516020018083805190602001908083835b602083106123fb57805182526020820191506020810190506020830392506123d8565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b6020831061244c5780518252602082019150602081019050602083039250612429565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050612555565b8061249485612fc8565b6040516020018083805190602001908083835b602083106124ca57805182526020820191506020810190506020830392506124a7565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b6020831061251b57805182526020820191506020810190506020830392506124f8565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052925050505b919050565b600d5481565b600c5481565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000600d5414612672576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f5374617274696e6720696e64657820697320616c72656164792073657400000081525060200191505060405180910390fd5b6000600c5414156126eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5374617274696e6720696e64657820626c6f636b206d7573742062652073657481525060200191505060405180910390fd5b600e54600c544060001c816126fc57fe5b06600d8190555060ff61271a600c544361310f90919063ffffffff16565b111561273a57600e54600143034060001c8161273257fe5b06600d819055505b6000600d5414156127625761275b6001600d54612e2a90919063ffffffff16565b600d819055505b565b600f60009054906101000a900460ff1681565b61277f61296c565b73ffffffffffffffffffffffffffffffffffffffff1661279d611c4c565b73ffffffffffffffffffffffffffffffffffffffff1614612826576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156128ac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180613ed86026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600061298a82600261319290919063ffffffff16565b9050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16612a04836117f2565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000612a58826000016131ac565b9050919050565b6000612a6a82612974565b612abf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180613f48602c913960400191505060405180910390fd5b6000612aca836117f2565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612b3957508373ffffffffffffffffffffffffffffffffffffffff16612b21846110e8565b73ffffffffffffffffffffffffffffffffffffffff16145b80612b4a5750612b498185612566565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612b73826117f2565b73ffffffffffffffffffffffffffffffffffffffff1614612bdf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806140b76029913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612c65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613efe6024913960400191505060405180910390fd5b612c708383836131bd565b612c7b600082612991565b612ccc81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206131c290919063ffffffff16565b50612d1e81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206131dc90919063ffffffff16565b50612d35818360026131f69092919063ffffffff16565b50808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000612da5836000018361322b565b60001c905092915050565b600080600080612dc386600001866132ae565b915091508160001c8160001c9350935050509250929050565b8060099080519060200190612df2929190613de6565b5050565b6000612e09846000018460001b84613347565b60001c90509392505050565b6000612e238260000161343d565b9050919050565b600080828401905083811015612ea8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600080831415612ec55760009050612f32565b6000828402905082848281612ed657fe5b0414612f2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061406a6021913960400191505060405180910390fd5b809150505b92915050565b612f5282826040518060200160405280600081525061344e565b5050565b612f61848484612b53565b612f6d848484846134bf565b612fc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180613ea66032913960400191505060405180910390fd5b50505050565b60606000821415613010576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061310a565b600082905060005b6000821461303a578080600101915050600a828161303257fe5b049150613018565b60608167ffffffffffffffff8111801561305357600080fd5b506040519080825280601f01601f1916602001820160405280156130865781602001600182028036833780820191505090505b50905060006001830390508593505b6000841461310257600a84816130a757fe5b0660300160f81b828280600190039350815181106130c157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84816130fa57fe5b049350613095565b819450505050505b919050565b600082821115613187576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b818303905092915050565b60006131a4836000018360001b6136d8565b905092915050565b600081600001805490509050919050565b505050565b60006131d4836000018360001b6136fb565b905092915050565b60006131ee836000018360001b6137e3565b905092915050565b6000613222846000018460001b8473ffffffffffffffffffffffffffffffffffffffff1660001b613853565b90509392505050565b60008183600001805490501161328c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613e846022913960400191505060405180910390fd5b82600001828154811061329b57fe5b9060005260206000200154905092915050565b60008082846000018054905011613310576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806140206022913960400191505060405180910390fd5b600084600001848154811061332157fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b6000808460010160008581526020019081526020016000205490506000811415839061340e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156133d35780820151818401526020810190506133b8565b50505050905090810190601f1680156134005780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061342157fe5b9060005260206000209060020201600101549150509392505050565b600081600001805490509050919050565b613458838361392f565b61346560008484846134bf565b6134ba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180613ea66032913960400191505060405180910390fd5b505050565b60006134e08473ffffffffffffffffffffffffffffffffffffffff16613b23565b6134ed57600190506136d0565b606061365763150b7a0260e01b61350261296c565b888787604051602401808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561358657808201518184015260208101905061356b565b50505050905090810190601f1680156135b35780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051806060016040528060328152602001613ea6603291398773ffffffffffffffffffffffffffffffffffffffff16613b369092919063ffffffff16565b9050600081806020019051602081101561367057600080fd5b8101908080519060200190929190505050905063150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614925050505b949350505050565b600080836001016000848152602001908152602001600020541415905092915050565b600080836001016000848152602001908152602001600020549050600081146137d7576000600182039050600060018660000180549050039050600086600001828154811061374657fe5b906000526020600020015490508087600001848154811061376357fe5b906000526020600020018190555060018301876001016000838152602001908152602001600020819055508660000180548061379b57fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506137dd565b60009150505b92915050565b60006137ef8383613b4e565b61384857826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905061384d565b600090505b92915050565b60008084600101600085815260200190815260200160002054905060008114156138fa57846000016040518060400160405280868152602001858152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550508460000180549050856001016000868152602001908152602001600020819055506001915050613928565b8285600001600183038154811061390d57fe5b90600052602060002090600202016001018190555060009150505b9392505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156139d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4552433732313a206d696e7420746f20746865207a65726f206164647265737381525060200191505060405180910390fd5b6139db81612974565b15613a4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000081525060200191505060405180910390fd5b613a5a600083836131bd565b613aab81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206131dc90919063ffffffff16565b50613ac2818360026131f69092919063ffffffff16565b50808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b600080823b905060008111915050919050565b6060613b458484600085613b71565b90509392505050565b600080836001016000848152602001908152602001600020541415905092915050565b606082471015613bcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180613f226026913960400191505060405180910390fd5b613bd585613b23565b613c47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310613c975780518252602082019150602081019050602083039250613c74565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613cf9576040519150601f19603f3d011682016040523d82523d6000602084013e613cfe565b606091505b5091509150613d0e828286613d1a565b92505050949350505050565b60608315613d2a57829050613ddf565b600083511115613d3d5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613da4578082015181840152602081019050613d89565b50505050905090810190601f168015613dd15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613e2757805160ff1916838001178555613e55565b82800160010185558215613e55579182015b82811115613e54578251825591602001919060010190613e39565b5b509050613e629190613e66565b5090565b5b80821115613e7f576000816000905550600101613e67565b509056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e43616e206f6e6c79206d696e7420323020746f6b656e7320617420612074696d654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e6473507572636861736520776f756c6420657863656564206d617820737570706c79206f662041706573536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a2646970667358221220b0e64d1fa6c4dbeb9c6f54607d7e1996943fe27624a80652f57b53fda084621b64736f6c63430007000033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000006080e6d70000000000000000000000000000000000000000000000000000000000000011426f7265644170655961636874436c756200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044241594300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000010f2c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014426f72656420417065205761676d6920436c756200000000000000000000000000000000000000000000000000000000000000000000000000000000000000044241594300000000000000000000000000000000000000000000000000000000 Details: Insufficient funds for gas * price + value - Version: viem@2.23.12] + Version: viem@2.28.0] `) await disconnect(config, { connector }) diff --git a/packages/core/src/experimental/actions/getCallsStatus.test.ts b/packages/core/src/actions/getCallsStatus.test.ts similarity index 90% rename from packages/core/src/experimental/actions/getCallsStatus.test.ts rename to packages/core/src/actions/getCallsStatus.test.ts index 367c33c303..72978a3c7f 100644 --- a/packages/core/src/experimental/actions/getCallsStatus.test.ts +++ b/packages/core/src/actions/getCallsStatus.test.ts @@ -2,8 +2,8 @@ import { accounts, config, testClient } from '@wagmi/test' import { parseEther } from 'viem' import { expect, test } from 'vitest' -import { connect } from '../../actions/connect.js' -import { disconnect } from '../../actions/disconnect.js' +import { connect } from './connect.js' +import { disconnect } from './disconnect.js' import { getCallsStatus } from './getCallsStatus.js' import { sendCalls } from './sendCalls.js' @@ -11,7 +11,7 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const id = await sendCalls(config, { + const { id } = await sendCalls(config, { calls: [ { data: '0xdeadbeef', @@ -33,7 +33,7 @@ test('default', async () => { id, }) - expect(status).toBe('CONFIRMED') + expect(status).toBe('success') expect( receipts?.map((x) => ({ ...x, blockHash: undefined })), ).toMatchInlineSnapshot( diff --git a/packages/core/src/experimental/actions/getCallsStatus.ts b/packages/core/src/actions/getCallsStatus.ts similarity index 79% rename from packages/core/src/experimental/actions/getCallsStatus.ts rename to packages/core/src/actions/getCallsStatus.ts index 214a6c8cae..85f7a592c5 100644 --- a/packages/core/src/experimental/actions/getCallsStatus.ts +++ b/packages/core/src/actions/getCallsStatus.ts @@ -3,11 +3,11 @@ import { type GetCallsStatusParameters as viem_GetCallsStatusParameters, type GetCallsStatusReturnType as viem_GetCallsStatusReturnType, getCallsStatus as viem_getCallsStatus, -} from 'viem/experimental' +} from 'viem/actions' -import { getConnectorClient } from '../../actions/getConnectorClient.js' -import type { Config } from '../../createConfig.js' -import type { ConnectorParameter } from '../../types/properties.js' +import type { Config } from '../createConfig.js' +import type { ConnectorParameter } from '../types/properties.js' +import { getConnectorClient } from './getConnectorClient.js' export type GetCallsStatusParameters = viem_GetCallsStatusParameters & ConnectorParameter diff --git a/packages/core/src/experimental/actions/getCapabilities.test.ts b/packages/core/src/actions/getCapabilities.test.ts similarity index 92% rename from packages/core/src/experimental/actions/getCapabilities.test.ts rename to packages/core/src/actions/getCapabilities.test.ts index 2946e27a5c..e7c02ec444 100644 --- a/packages/core/src/experimental/actions/getCapabilities.test.ts +++ b/packages/core/src/actions/getCapabilities.test.ts @@ -1,8 +1,8 @@ import { accounts, config } from '@wagmi/test' import { expect, test } from 'vitest' -import { connect } from '../../actions/connect.js' -import { disconnect } from '../../actions/disconnect.js' +import { connect } from './connect.js' +import { disconnect } from './disconnect.js' import { getCapabilities } from './getCapabilities.js' const connector = config.connectors[0]! diff --git a/packages/core/src/experimental/actions/getCapabilities.ts b/packages/core/src/actions/getCapabilities.ts similarity index 81% rename from packages/core/src/experimental/actions/getCapabilities.ts rename to packages/core/src/actions/getCapabilities.ts index 095451081b..fe99c327ab 100644 --- a/packages/core/src/experimental/actions/getCapabilities.ts +++ b/packages/core/src/actions/getCapabilities.ts @@ -4,11 +4,11 @@ import { type GetCapabilitiesParameters as viem_GetCapabilitiesParameters, type GetCapabilitiesReturnType as viem_GetCapabilitiesReturnType, getCapabilities as viem_getCapabilities, -} from 'viem/experimental' +} from 'viem/actions' -import { getConnectorClient } from '../../actions/getConnectorClient.js' -import type { Config } from '../../createConfig.js' -import type { ConnectorParameter } from '../../types/properties.js' +import type { Config } from '../createConfig.js' +import type { ConnectorParameter } from '../types/properties.js' +import { getConnectorClient } from './getConnectorClient.js' export type GetCapabilitiesParameters = viem_GetCapabilitiesParameters & ConnectorParameter diff --git a/packages/core/src/actions/getToken.test.ts b/packages/core/src/actions/getToken.test.ts index 8af08736a7..384eca1a91 100644 --- a/packages/core/src/actions/getToken.test.ts +++ b/packages/core/src/actions/getToken.test.ts @@ -79,6 +79,6 @@ test('behavior: bogus token', async () => { function: decimals() Docs: https://viem.sh/docs/contract/multicall - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) diff --git a/packages/core/src/actions/prepareTransactionRequest.test.ts b/packages/core/src/actions/prepareTransactionRequest.test.ts index 1411011e3e..271037af8f 100644 --- a/packages/core/src/actions/prepareTransactionRequest.test.ts +++ b/packages/core/src/actions/prepareTransactionRequest.test.ts @@ -88,10 +88,10 @@ test('behavior: local account', async () => { { "account": { "address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", - "experimental_signAuthorization": [Function], "nonceManager": undefined, "publicKey": "0x048318535b54105d4a7aae60c08fc45f9687181b4fdfc625bd1a753fa7397fed753547f11ca8696646f2f3acb08e31016afac23e630c5d11f59f61fef57b0d2aa5", "sign": [Function], + "signAuthorization": [Function], "signMessage": [Function], "signTransaction": [Function], "signTypedData": [Function], diff --git a/packages/core/src/actions/readContracts.test.ts b/packages/core/src/actions/readContracts.test.ts index c5e85ff3a8..076bb36a6f 100644 --- a/packages/core/src/actions/readContracts.test.ts +++ b/packages/core/src/actions/readContracts.test.ts @@ -397,7 +397,7 @@ test('throws if allowFailure=false & a contract method fails', async () => { args: (0xA0Cf798816D4b9b9866b5330EEa46a18382f251e, 69420) Docs: https://viem.sh/docs/contract/readContract - Version: viem@2.23.12] + Version: viem@2.28.0] `, ) }) @@ -450,7 +450,7 @@ test('allowFailure=true & a contract method fails', async () => { args: (0xA0Cf798816D4b9b9866b5330EEa46a18382f251e, 69420) Docs: https://viem.sh/docs/contract/readContract - Version: viem@2.23.12], + Version: viem@2.28.0], "result": undefined, "status": "failure", }, @@ -464,7 +464,7 @@ test('allowFailure=true & a contract method fails', async () => { args: (0xA0Cf798816D4b9b9866b5330EEa46a18382f251e, 69421) Docs: https://viem.sh/docs/contract/readContract - Version: viem@2.23.12], + Version: viem@2.28.0], "result": undefined, "status": "failure", }, @@ -502,7 +502,7 @@ test('throws if allowFailure=false & encoding contract function data fails', asy args: (1e+31) Docs: https://viem.sh/docs/contract/readContract - Version: viem@2.23.12] + Version: viem@2.28.0] `, ) }) @@ -561,7 +561,7 @@ test('allowFailure=true & encoding contract function data fails', async () => { args: (1e+31) Docs: https://viem.sh/docs/contract/readContract - Version: viem@2.23.12], + Version: viem@2.28.0], "result": undefined, "status": "failure", }, @@ -579,7 +579,7 @@ test('allowFailure=true & encoding contract function data fails', async () => { args: (1e+31) Docs: https://viem.sh/docs/contract/readContract - Version: viem@2.23.12], + Version: viem@2.28.0], "result": undefined, "status": "failure", }, @@ -617,7 +617,7 @@ test('should throw if allowFailure=false & a contract has no response', async () args: (0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC) Docs: https://viem.sh/docs/contract/readContract - Version: viem@2.23.12] + Version: viem@2.28.0] `, ) }) @@ -669,7 +669,7 @@ test('allowFailure=true & a contract has no response', async () => { args: (0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC) Docs: https://viem.sh/docs/contract/readContract - Version: viem@2.23.12], + Version: viem@2.28.0], "result": undefined, "status": "failure", }, diff --git a/packages/core/src/experimental/actions/sendCalls.test.ts b/packages/core/src/actions/sendCalls.test.ts similarity index 89% rename from packages/core/src/experimental/actions/sendCalls.test.ts rename to packages/core/src/actions/sendCalls.test.ts index 34e0db028e..cb25e2b0ba 100644 --- a/packages/core/src/experimental/actions/sendCalls.test.ts +++ b/packages/core/src/actions/sendCalls.test.ts @@ -2,8 +2,8 @@ import { accounts, config } from '@wagmi/test' import { parseEther } from 'viem' import { expect, test } from 'vitest' -import { connect } from '../../actions/connect.js' -import { disconnect } from '../../actions/disconnect.js' +import { connect } from './connect.js' +import { disconnect } from './disconnect.js' import { sendCalls } from './sendCalls.js' const connector = config.connectors[0]! @@ -29,7 +29,11 @@ test('default', async () => { ], }), ).resolves.toMatchInlineSnapshot( - `"0x5dedb5a4ff8968db37459b52b83cbdc92b01c9c709c9cff26e345ef5cf27f92e"`, + ` + { + "id": "0x5dedb5a4ff8968db37459b52b83cbdc92b01c9c709c9cff26e345ef5cf27f92e", + } + `, ) await disconnect(config, { connector }) }) @@ -80,7 +84,11 @@ test('behavior: nullish account (account filled by wallet)', async () => { ], }), ).resolves.toMatchInlineSnapshot( - `"0x035b56a56a5b2fea10e194bae4c846b415de48a8288c7eb704ba7880edcc29a0"`, + ` + { + "id": "0x035b56a56a5b2fea10e194bae4c846b415de48a8288c7eb704ba7880edcc29a0", + } + `, ) }) diff --git a/packages/core/src/experimental/actions/sendCalls.ts b/packages/core/src/actions/sendCalls.ts similarity index 83% rename from packages/core/src/experimental/actions/sendCalls.ts rename to packages/core/src/actions/sendCalls.ts index cabce545d9..5911e4cf87 100644 --- a/packages/core/src/experimental/actions/sendCalls.ts +++ b/packages/core/src/actions/sendCalls.ts @@ -4,20 +4,20 @@ import { type SendCallsParameters as viem_SendCallsParameters, type SendCallsReturnType as viem_SendCallsReturnType, sendCalls as viem_sendCalls, -} from 'viem/experimental' +} from 'viem/actions' -import { - type GetConnectorClientErrorType, - getConnectorClient, -} from '../../actions/getConnectorClient.js' -import type { Config } from '../../createConfig.js' -import type { BaseErrorType, ErrorType } from '../../errors/base.js' -import type { SelectChains } from '../../types/chain.js' +import type { Config } from '../createConfig.js' +import type { BaseErrorType, ErrorType } from '../errors/base.js' +import type { SelectChains } from '../types/chain.js' import type { ChainIdParameter, ConnectorParameter, -} from '../../types/properties.js' -import type { Compute } from '../../types/utils.js' +} from '../types/properties.js' +import type { Compute } from '../types/utils.js' +import { + type GetConnectorClientErrorType, + getConnectorClient, +} from './getConnectorClient.js' export type SendCallsParameters< config extends Config = Config, diff --git a/packages/core/src/actions/sendTransaction.test.ts b/packages/core/src/actions/sendTransaction.test.ts index 627d29b8fd..b8063be531 100644 --- a/packages/core/src/actions/sendTransaction.test.ts +++ b/packages/core/src/actions/sendTransaction.test.ts @@ -88,7 +88,7 @@ test('behavior: value exceeds balance', async () => { value: 99999 ETH Details: Insufficient funds for gas * price + value - Version: viem@2.23.12] + Version: viem@2.28.0] `) await disconnect(config, { connector }) }) diff --git a/packages/core/src/experimental/actions/showCallsStatus.test.ts b/packages/core/src/actions/showCallsStatus.test.ts similarity index 83% rename from packages/core/src/experimental/actions/showCallsStatus.test.ts rename to packages/core/src/actions/showCallsStatus.test.ts index d397886e05..5822242382 100644 --- a/packages/core/src/experimental/actions/showCallsStatus.test.ts +++ b/packages/core/src/actions/showCallsStatus.test.ts @@ -2,8 +2,8 @@ import { accounts, config, testClient } from '@wagmi/test' import { parseEther } from 'viem' import { test } from 'vitest' -import { connect } from '../../actions/connect.js' -import { disconnect } from '../../actions/disconnect.js' +import { connect } from './connect.js' +import { disconnect } from './disconnect.js' import { sendCalls } from './sendCalls.js' import { showCallsStatus } from './showCallsStatus.js' @@ -11,7 +11,7 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const id = await sendCalls(config, { + const { id } = await sendCalls(config, { calls: [ { data: '0xdeadbeef', diff --git a/packages/core/src/experimental/actions/showCallsStatus.ts b/packages/core/src/actions/showCallsStatus.ts similarity index 79% rename from packages/core/src/experimental/actions/showCallsStatus.ts rename to packages/core/src/actions/showCallsStatus.ts index a170ffe163..e3c6ae067d 100644 --- a/packages/core/src/experimental/actions/showCallsStatus.ts +++ b/packages/core/src/actions/showCallsStatus.ts @@ -3,11 +3,11 @@ import { type ShowCallsStatusParameters as viem_ShowCallsStatusParameters, type ShowCallsStatusReturnType as viem_ShowCallsStatusReturnType, showCallsStatus as viem_showCallsStatus, -} from 'viem/experimental' +} from 'viem/actions' -import { getConnectorClient } from '../../actions/getConnectorClient.js' -import type { Config } from '../../createConfig.js' -import type { ConnectorParameter } from '../../types/properties.js' +import type { Config } from '../createConfig.js' +import type { ConnectorParameter } from '../types/properties.js' +import { getConnectorClient } from './getConnectorClient.js' export type ShowCallsStatusParameters = viem_ShowCallsStatusParameters & ConnectorParameter diff --git a/packages/core/src/actions/signMessage.test.ts b/packages/core/src/actions/signMessage.test.ts index 62e0abfa3d..51702bc9a2 100644 --- a/packages/core/src/actions/signMessage.test.ts +++ b/packages/core/src/actions/signMessage.test.ts @@ -51,7 +51,7 @@ test('behavior: user rejected request', async () => { [UserRejectedRequestError: User rejected the request. Details: Failed to sign message. - Version: viem@2.23.12] + Version: viem@2.28.0] `) await disconnect(config, { connector: connector_ }) }) diff --git a/packages/core/src/actions/signTypedData.test.ts b/packages/core/src/actions/signTypedData.test.ts index 68a0eca25a..c9de7e64aa 100644 --- a/packages/core/src/actions/signTypedData.test.ts +++ b/packages/core/src/actions/signTypedData.test.ts @@ -47,7 +47,7 @@ test('behavior: user rejected request', async () => { [UserRejectedRequestError: User rejected the request. Details: Failed to sign typed data. - Version: viem@2.23.12] + Version: viem@2.28.0] `) await disconnect(config, { connector: connector_ }) }) diff --git a/packages/core/src/actions/switchChain.test.ts b/packages/core/src/actions/switchChain.test.ts index 807b443a94..c35f514d73 100644 --- a/packages/core/src/actions/switchChain.test.ts +++ b/packages/core/src/actions/switchChain.test.ts @@ -43,7 +43,7 @@ test('behavior: user rejected request', async () => { [UserRejectedRequestError: User rejected the request. Details: Failed to switch chain. - Version: viem@2.23.12] + Version: viem@2.28.0] `) await disconnect(config, { connector: connector_ }) }) diff --git a/packages/core/src/experimental/actions/waitForCallsStatus.test.ts b/packages/core/src/actions/waitForCallsStatus.test.ts similarity index 90% rename from packages/core/src/experimental/actions/waitForCallsStatus.test.ts rename to packages/core/src/actions/waitForCallsStatus.test.ts index 0d3ce44998..338fe02616 100644 --- a/packages/core/src/experimental/actions/waitForCallsStatus.test.ts +++ b/packages/core/src/actions/waitForCallsStatus.test.ts @@ -2,8 +2,8 @@ import { accounts, config, testClient, wait } from '@wagmi/test' import { parseEther } from 'viem' import { expect, test } from 'vitest' -import { connect } from '../../actions/connect.js' -import { disconnect } from '../../actions/disconnect.js' +import { connect } from './connect.js' +import { disconnect } from './disconnect.js' import { sendCalls } from './sendCalls.js' import { waitForCallsStatus } from './waitForCallsStatus.js' @@ -12,7 +12,7 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const id = await sendCalls(config, { + const { id } = await sendCalls(config, { calls: [ { data: '0xdeadbeef', @@ -40,7 +40,7 @@ test('default', async () => { })(), ]) - expect(status).toBe('CONFIRMED') + expect(status).toBe('success') expect( receipts?.map((x) => ({ ...x, blockHash: undefined })), ).toMatchInlineSnapshot( diff --git a/packages/core/src/experimental/actions/waitForCallsStatus.ts b/packages/core/src/actions/waitForCallsStatus.ts similarity index 80% rename from packages/core/src/experimental/actions/waitForCallsStatus.ts rename to packages/core/src/actions/waitForCallsStatus.ts index 2a02df2f48..2a93539dc4 100644 --- a/packages/core/src/experimental/actions/waitForCallsStatus.ts +++ b/packages/core/src/actions/waitForCallsStatus.ts @@ -3,11 +3,11 @@ import { type WaitForCallsStatusParameters as viem_WaitForCallsStatusParameters, type WaitForCallsStatusReturnType as viem_WaitForCallsStatusReturnType, waitForCallsStatus as viem_waitForCallsStatus, -} from 'viem/experimental' +} from 'viem/actions' -import { getConnectorClient } from '../../actions/getConnectorClient.js' -import type { Config } from '../../createConfig.js' -import type { ConnectorParameter } from '../../types/properties.js' +import type { Config } from '../createConfig.js' +import type { ConnectorParameter } from '../types/properties.js' +import { getConnectorClient } from './getConnectorClient.js' export type WaitForCallsStatusParameters = viem_WaitForCallsStatusParameters & ConnectorParameter diff --git a/packages/core/src/actions/waitForTransactionReceipt.test.ts b/packages/core/src/actions/waitForTransactionReceipt.test.ts index 2a5146d8b1..1a442cb787 100644 --- a/packages/core/src/actions/waitForTransactionReceipt.test.ts +++ b/packages/core/src/actions/waitForTransactionReceipt.test.ts @@ -53,6 +53,6 @@ test('behavior: transaction reverted', async () => { nonce: 43 Details: execution reverted: PartyBid::claim: contribution already claimed - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) diff --git a/packages/core/src/connectors/mock.test.ts b/packages/core/src/connectors/mock.test.ts index 5beef19aa4..98b4372dbf 100644 --- a/packages/core/src/connectors/mock.test.ts +++ b/packages/core/src/connectors/mock.test.ts @@ -30,7 +30,7 @@ test('behavior: features.connectError', () => { [UserRejectedRequestError: User rejected the request. Details: Failed to connect. - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) @@ -58,7 +58,7 @@ test('behavior: connector.getProvider request errors', async () => { [UserRejectedRequestError: User rejected the request. Details: Failed to sign typed data. - Version: viem@2.23.12] + Version: viem@2.28.0] `) expect( @@ -70,7 +70,7 @@ test('behavior: connector.getProvider request errors', async () => { [UserRejectedRequestError: User rejected the request. Details: Failed to switch chain. - Version: viem@2.23.12] + Version: viem@2.28.0] `) expect( @@ -82,7 +82,7 @@ test('behavior: connector.getProvider request errors', async () => { [UserRejectedRequestError: User rejected the request. Details: Failed to switch chain. - Version: viem@2.23.12] + Version: viem@2.28.0] `) expect( @@ -94,7 +94,7 @@ test('behavior: connector.getProvider request errors', async () => { [UserRejectedRequestError: User rejected the request. Details: Failed to sign message. - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) diff --git a/packages/core/src/connectors/mock.ts b/packages/core/src/connectors/mock.ts index 8a2dd8a6e6..9d4dc9d846 100644 --- a/packages/core/src/connectors/mock.ts +++ b/packages/core/src/connectors/mock.ts @@ -7,6 +7,7 @@ import { type Transport, UserRejectedRequestError, type WalletCallReceipt, + type WalletGetCallsStatusReturnType, type WalletRpcSchema, custom, fromHex, @@ -224,12 +225,21 @@ export function mock(parameters: MockParameters) { } const id = keccak256(stringToHex(JSON.stringify(calls))) transactionCache.set(id, hashes) - return id + return { id } } if (method === 'wallet_getCallsStatus') { const hashes = transactionCache.get((params as any)[0]) - if (!hashes) return null + if (!hashes) + return { + atomic: false, + chainId: '0x1', + id: (params as any)[0], + status: 100, + receipts: [], + version: '2.0.0', + } satisfies WalletGetCallsStatusReturnType + const receipts = await Promise.all( hashes.map(async (hash) => { const { result, error } = await rpc.http(url, { @@ -256,9 +266,24 @@ export function mock(parameters: MockParameters) { } satisfies WalletCallReceipt }), ) - if (receipts.some((x) => !x)) - return { status: 'PENDING', receipts: [] } - return { status: 'CONFIRMED', receipts } + const receipts_ = receipts.filter((x) => x !== null) + if (receipts_.length === 0) + return { + atomic: false, + chainId: '0x1', + id: (params as any)[0], + status: 100, + receipts: [], + version: '2.0.0', + } satisfies WalletGetCallsStatusReturnType + return { + atomic: false, + chainId: '0x1', + id: (params as any)[0], + status: 200, + receipts: receipts_, + version: '2.0.0', + } satisfies WalletGetCallsStatusReturnType } if (method === 'wallet_showCallsStatus') return diff --git a/packages/core/src/experimental/actions/writeContracts.test.ts b/packages/core/src/experimental/actions/writeContracts.test.ts index 0f9b1c4211..b74cd780ef 100644 --- a/packages/core/src/experimental/actions/writeContracts.test.ts +++ b/packages/core/src/experimental/actions/writeContracts.test.ts @@ -30,7 +30,11 @@ test('default', async () => { ], }), ).resolves.toMatchInlineSnapshot( - `"0x8913636bd97cf4bcc0a6343c730905a27ead0f7480ff82190072e916439eb212"`, + ` + { + "id": "0x8913636bd97cf4bcc0a6343c730905a27ead0f7480ff82190072e916439eb212", + } + `, ) await disconnect(config, { connector }) }) diff --git a/packages/core/src/exports/actions.test.ts b/packages/core/src/exports/actions.test.ts index 77f805d96c..eaaedba14f 100644 --- a/packages/core/src/exports/actions.test.ts +++ b/packages/core/src/exports/actions.test.ts @@ -20,6 +20,8 @@ test('exports', () => { "fetchBlockNumber", "getBlockTransactionCount", "getBytecode", + "getCallsStatus", + "getCapabilities", "getChainId", "getChains", "getClient", @@ -53,7 +55,9 @@ test('exports', () => { "readContract", "readContracts", "reconnect", + "sendCalls", "sendTransaction", + "showCallsStatus", "signMessage", "signTypedData", "simulateContract", @@ -62,6 +66,7 @@ test('exports', () => { "switchNetwork", "verifyMessage", "verifyTypedData", + "waitForCallsStatus", "watchAccount", "watchAsset", "watchBlocks", diff --git a/packages/core/src/exports/actions.ts b/packages/core/src/exports/actions.ts index d5d6b21760..d03c2adb76 100644 --- a/packages/core/src/exports/actions.ts +++ b/packages/core/src/exports/actions.ts @@ -96,6 +96,20 @@ export { getBytecode, } from '../actions/getBytecode.js' +export { + type GetCallsStatusErrorType, + type GetCallsStatusParameters, + type GetCallsStatusReturnType, + getCallsStatus, +} from '../actions/getCallsStatus.js' + +export { + type GetCapabilitiesErrorType, + type GetCapabilitiesParameters, + type GetCapabilitiesReturnType, + getCapabilities, +} from '../actions/getCapabilities.js' + export { type GetChainIdReturnType, getChainId, @@ -286,6 +300,13 @@ export { reconnect, } from '../actions/reconnect.js' +export { + type SendCallsErrorType, + type SendCallsParameters, + type SendCallsReturnType, + sendCalls, +} from '../actions/sendCalls.js' + export { type SendTransactionErrorType, type SendTransactionParameters, @@ -293,6 +314,13 @@ export { sendTransaction, } from '../actions/sendTransaction.js' +export { + type ShowCallsStatusErrorType, + type ShowCallsStatusParameters, + type ShowCallsStatusReturnType, + showCallsStatus, +} from '../actions/showCallsStatus.js' + export { type SignMessageErrorType, type SignMessageParameters, @@ -342,6 +370,13 @@ export { verifyTypedData, } from '../actions/verifyTypedData.js' +export { + type WaitForCallsStatusErrorType, + type WaitForCallsStatusParameters, + type WaitForCallsStatusReturnType, + waitForCallsStatus, +} from '../actions/waitForCallsStatus.js' + export { type WatchAccountParameters, type WatchAccountReturnType, diff --git a/packages/core/src/exports/experimental.ts b/packages/core/src/exports/experimental.ts index 77955e5166..f74baa82cb 100644 --- a/packages/core/src/exports/experimental.ts +++ b/packages/core/src/exports/experimental.ts @@ -4,44 +4,68 @@ // biome-ignore lint/performance/noBarrelFile: entrypoint module export { + /** @deprecated This is no longer experimental – use `import type { GetCallsStatusErrorType } from '@wagmi/core'` instead. */ type GetCallsStatusErrorType, + /** @deprecated This is no longer experimental – use `import type { GetCallsStatusParameters } from '@wagmi/core'` instead. */ type GetCallsStatusParameters, + /** @deprecated This is no longer experimental – use `import type { GetCallsStatusReturnType } from '@wagmi/core'` instead. */ type GetCallsStatusReturnType, + /** @deprecated This is no longer experimental – use `import { getCallsStatus } from '@wagmi/core'` instead. */ getCallsStatus, -} from '../experimental/actions/getCallsStatus.js' +} from '../actions/getCallsStatus.js' export { + /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesErrorType } from '@wagmi/core'` instead. */ type GetCapabilitiesErrorType, + /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesParameters } from '@wagmi/core'` instead. */ type GetCapabilitiesParameters, + /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesReturnType } from '@wagmi/core'` instead. */ type GetCapabilitiesReturnType, + /** @deprecated This is no longer experimental – use `import { getCapabilities } from '@wagmi/core'` instead. */ getCapabilities, -} from '../experimental/actions/getCapabilities.js' +} from '../actions/getCapabilities.js' export { + /** @deprecated This is no longer experimental – use `import type { SendCallsErrorType } from '@wagmi/core'` instead. */ type SendCallsErrorType, + /** @deprecated This is no longer experimental – use `import type { SendCallsParameters } from '@wagmi/core'` instead. */ type SendCallsParameters, + /** @deprecated This is no longer experimental – use `import type { SendCallsReturnType } from '@wagmi/core'` instead. */ type SendCallsReturnType, + /** @deprecated This is no longer experimental – use `import { sendCalls } from '@wagmi/core'` instead. */ sendCalls, -} from '../experimental/actions/sendCalls.js' +} from '../actions/sendCalls.js' export { + /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusErrorType } from '@wagmi/core'` instead. */ type ShowCallsStatusErrorType, + /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusParameters } from '@wagmi/core'` instead. */ type ShowCallsStatusParameters, + /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusReturnType } from '@wagmi/core'` instead. */ type ShowCallsStatusReturnType, + /** @deprecated This is no longer experimental – use `import { showCallsStatus } from '@wagmi/core'` instead. */ showCallsStatus, -} from '../experimental/actions/showCallsStatus.js' +} from '../actions/showCallsStatus.js' export { + /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusErrorType } from '@wagmi/core'` instead. */ type WaitForCallsStatusErrorType, + /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusParameters } from '@wagmi/core'` instead. */ type WaitForCallsStatusParameters, + /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusReturnType } from '@wagmi/core'` instead. */ type WaitForCallsStatusReturnType, + /** @deprecated This is no longer experimental – use `import { waitForCallsStatus } from '@wagmi/core'` instead. */ waitForCallsStatus, -} from '../experimental/actions/waitForCallsStatus.js' +} from '../actions/waitForCallsStatus.js' export { + /** @deprecated Use `SendCallsErrorType` instead. */ type WriteContractsErrorType, + /** @deprecated Use `SendCallsParameters` instead. */ type WriteContractsParameters, + /** @deprecated Use `SendCallsReturnType` instead. */ type WriteContractsReturnType, + /** @deprecated Use `sendCalls` instead. */ writeContracts, } from '../experimental/actions/writeContracts.js' @@ -50,52 +74,85 @@ export { //////////////////////////////////////////////////////////////////////////////// export { + /** @deprecated This is no longer experimental – use `import type { GetCallsStatusData } from '@wagmi/core/query'` instead. */ type GetCallsStatusData, + /** @deprecated This is no longer experimental – use `import type { GetCallsStatusOptions } from '@wagmi/core/query'` instead. */ type GetCallsStatusOptions, + /** @deprecated This is no longer experimental – use `import type { GetCallsStatusQueryFnData } from '@wagmi/core/query'` instead. */ type GetCallsStatusQueryFnData, + /** @deprecated This is no longer experimental – use `import type { GetCallsStatusQueryKey } from '@wagmi/core/query'` instead. */ type GetCallsStatusQueryKey, + /** @deprecated This is no longer experimental – use `import { getCallsStatusQueryOptions } from '@wagmi/core/query'` instead. */ getCallsStatusQueryOptions, + /** @deprecated This is no longer experimental – use `import { getCallsStatusQueryKey } from '@wagmi/core/query'` instead. */ getCallsStatusQueryKey, -} from '../experimental/query/getCallsStatus.js' +} from '../query/getCallsStatus.js' export { + /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesData } from '@wagmi/core/query'` instead. */ type GetCapabilitiesData, + /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesOptions } from '@wagmi/core/query'` instead. */ type GetCapabilitiesOptions, + /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesQueryFnData } from '@wagmi/core/query'` instead. */ type GetCapabilitiesQueryFnData, + /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesQueryKey } from '@wagmi/core/query'` instead. */ type GetCapabilitiesQueryKey, + /** @deprecated This is no longer experimental – use `import { getCapabilitiesQueryOptions } from '@wagmi/core/query'` instead. */ getCapabilitiesQueryOptions, + /** @deprecated This is no longer experimental – use `import { getCapabilitiesQueryKey } from '@wagmi/core/query'` instead. */ getCapabilitiesQueryKey, -} from '../experimental/query/getCapabilities.js' +} from '../query/getCapabilities.js' export { + /** @deprecated This is no longer experimental – use `import type { SendCallsData } from '@wagmi/core/query'` instead. */ type SendCallsData, + /** @deprecated This is no longer experimental – use `import type { SendCallsMutate } from '@wagmi/core/query'` instead. */ type SendCallsMutate, + /** @deprecated This is no longer experimental – use `import type { SendCallsMutateAsync } from '@wagmi/core/query'` instead. */ type SendCallsMutateAsync, + /** @deprecated This is no longer experimental – use `import type { SendCallsVariables } from '@wagmi/core/query'` instead. */ type SendCallsVariables, + /** @deprecated This is no longer experimental – use `import { sendCallsMutationOptions } from '@wagmi/core/query'` instead. */ sendCallsMutationOptions, -} from '../experimental/query/sendCalls.js' +} from '../query/sendCalls.js' export { + /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusData } from '@wagmi/core/query'` instead. */ type ShowCallsStatusData, + /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusMutate } from '@wagmi/core/query'` instead. */ type ShowCallsStatusMutate, + /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusMutateAsync } from '@wagmi/core/query'` instead. */ type ShowCallsStatusMutateAsync, + /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusVariables } from '@wagmi/core/query'` instead. */ type ShowCallsStatusVariables, + /** @deprecated This is no longer experimental – use `import { showCallsStatusMutationOptions } from '@wagmi/core/query'` instead. */ showCallsStatusMutationOptions, -} from '../experimental/query/showCallsStatus.js' +} from '../query/showCallsStatus.js' export { + /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusData } from '@wagmi/core/query'` instead. */ type WaitForCallsStatusData, + /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusOptions } from '@wagmi/core/query'` instead. */ type WaitForCallsStatusOptions, + /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusQueryFnData } from '@wagmi/core/query'` instead. */ type WaitForCallsStatusQueryFnData, + /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusQueryKey } from '@wagmi/core/query'` instead. */ type WaitForCallsStatusQueryKey, + /** @deprecated This is no longer experimental – use `import { waitForCallsStatusQueryKey } from '@wagmi/core/query'` instead. */ waitForCallsStatusQueryKey, + /** @deprecated This is no longer experimental – use `import { waitForCallsStatusQueryOptions } from '@wagmi/core/query'` instead. */ waitForCallsStatusQueryOptions, -} from '../experimental/query/waitForCallsStatus.js' +} from '../query/waitForCallsStatus.js' export { + /** @deprecated Use `SendCallsData` instead. */ type WriteContractsData, + /** @deprecated Use `SendCallsMutate` instead. */ type WriteContractsMutate, + /** @deprecated Use `SendCallsMutateAsync` instead. */ type WriteContractsMutateAsync, + /** @deprecated Use `SendCallsVariables` instead. */ type WriteContractsVariables, + /** @deprecated Use `sendCallsMutationOptions` instead. */ writeContractsMutationOptions, } from '../experimental/query/writeContracts.js' diff --git a/packages/core/src/exports/index.test.ts b/packages/core/src/exports/index.test.ts index 2d6953b9cc..55f3885806 100644 --- a/packages/core/src/exports/index.test.ts +++ b/packages/core/src/exports/index.test.ts @@ -20,6 +20,8 @@ test('exports', () => { "fetchBlockNumber", "getBlockTransactionCount", "getBytecode", + "getCallsStatus", + "getCapabilities", "getChainId", "getChains", "getClient", @@ -53,7 +55,9 @@ test('exports', () => { "readContract", "readContracts", "reconnect", + "sendCalls", "sendTransaction", + "showCallsStatus", "signMessage", "signTypedData", "simulateContract", @@ -62,6 +66,7 @@ test('exports', () => { "switchNetwork", "verifyMessage", "verifyTypedData", + "waitForCallsStatus", "watchAccount", "watchAsset", "watchBlocks", diff --git a/packages/core/src/exports/index.ts b/packages/core/src/exports/index.ts index af78c71c9b..1e0e210ea2 100644 --- a/packages/core/src/exports/index.ts +++ b/packages/core/src/exports/index.ts @@ -96,6 +96,20 @@ export { getBytecode, } from '../actions/getBytecode.js' +export { + type GetCallsStatusErrorType, + type GetCallsStatusParameters, + type GetCallsStatusReturnType, + getCallsStatus, +} from '../actions/getCallsStatus.js' + +export { + type GetCapabilitiesErrorType, + type GetCapabilitiesParameters, + type GetCapabilitiesReturnType, + getCapabilities, +} from '../actions/getCapabilities.js' + export { type GetChainIdReturnType, getChainId, @@ -286,6 +300,13 @@ export { reconnect, } from '../actions/reconnect.js' +export { + type SendCallsErrorType, + type SendCallsParameters, + type SendCallsReturnType, + sendCalls, +} from '../actions/sendCalls.js' + export { type SendTransactionErrorType, type SendTransactionParameters, @@ -293,6 +314,13 @@ export { sendTransaction, } from '../actions/sendTransaction.js' +export { + type ShowCallsStatusErrorType, + type ShowCallsStatusParameters, + type ShowCallsStatusReturnType, + showCallsStatus, +} from '../actions/showCallsStatus.js' + export { type SignMessageErrorType, type SignMessageParameters, @@ -344,6 +372,13 @@ export { verifyTypedData, } from '../actions/verifyTypedData.js' +export { + type WaitForCallsStatusErrorType, + type WaitForCallsStatusParameters, + type WaitForCallsStatusReturnType, + waitForCallsStatus, +} from '../actions/waitForCallsStatus.js' + export { type WatchAccountParameters, type WatchAccountReturnType, diff --git a/packages/core/src/exports/query.test.ts b/packages/core/src/exports/query.test.ts index 777bfe9abe..cbdaf925de 100644 --- a/packages/core/src/exports/query.test.ts +++ b/packages/core/src/exports/query.test.ts @@ -26,6 +26,10 @@ test('exports', () => { "getBlockTransactionCountQueryOptions", "getBytecodeQueryKey", "getBytecodeQueryOptions", + "getCallsStatusQueryKey", + "getCallsStatusQueryOptions", + "getCapabilitiesQueryKey", + "getCapabilitiesQueryOptions", "getConnectorClientQueryKey", "getConnectorClientQueryOptions", "getEnsAddressQueryKey", @@ -67,6 +71,8 @@ test('exports', () => { "readContractsQueryKey", "readContractsQueryOptions", "reconnectMutationOptions", + "sendCallsMutationOptions", + "showCallsStatusMutationOptions", "sendTransactionMutationOptions", "signMessageMutationOptions", "signTypedDataMutationOptions", @@ -78,6 +84,8 @@ test('exports', () => { "verifyMessageQueryOptions", "verifyTypedDataQueryKey", "verifyTypedDataQueryOptions", + "waitForCallsStatusQueryKey", + "waitForCallsStatusQueryOptions", "waitForTransactionReceiptQueryKey", "waitForTransactionReceiptQueryOptions", "watchAssetMutationOptions", diff --git a/packages/core/src/exports/query.ts b/packages/core/src/exports/query.ts index 5746148bab..d689f558d5 100644 --- a/packages/core/src/exports/query.ts +++ b/packages/core/src/exports/query.ts @@ -108,6 +108,24 @@ export { getBytecodeQueryOptions, } from '../query/getBytecode.js' +export { + type GetCallsStatusData, + type GetCallsStatusOptions, + type GetCallsStatusQueryFnData, + type GetCallsStatusQueryKey, + getCallsStatusQueryKey, + getCallsStatusQueryOptions, +} from '../query/getCallsStatus.js' + +export { + type GetCapabilitiesData, + type GetCapabilitiesOptions, + type GetCapabilitiesQueryFnData, + type GetCapabilitiesQueryKey, + getCapabilitiesQueryKey, + getCapabilitiesQueryOptions, +} from '../query/getCapabilities.js' + export { type GetConnectorClientData, type GetConnectorClientOptions, @@ -296,6 +314,22 @@ export { reconnectMutationOptions, } from '../query/reconnect.js' +export { + type SendCallsData, + type SendCallsVariables, + type SendCallsMutate, + type SendCallsMutateAsync, + sendCallsMutationOptions, +} from '../query/sendCalls.js' + +export { + type ShowCallsStatusData, + type ShowCallsStatusVariables, + type ShowCallsStatusMutate, + type ShowCallsStatusMutateAsync, + showCallsStatusMutationOptions, +} from '../query/showCallsStatus.js' + export { type SendTransactionData, type SendTransactionVariables, @@ -363,6 +397,15 @@ export { verifyTypedDataQueryOptions, } from '../query/verifyTypedData.js' +export { + type WaitForCallsStatusData, + type WaitForCallsStatusOptions, + type WaitForCallsStatusQueryFnData, + type WaitForCallsStatusQueryKey, + waitForCallsStatusQueryKey, + waitForCallsStatusQueryOptions, +} from '../query/waitForCallsStatus.js' + export { type WaitForTransactionReceiptData, type WaitForTransactionReceiptOptions, diff --git a/packages/core/src/experimental/query/getCallsStatus.test.ts b/packages/core/src/query/getCallsStatus.test.ts similarity index 100% rename from packages/core/src/experimental/query/getCallsStatus.test.ts rename to packages/core/src/query/getCallsStatus.test.ts diff --git a/packages/core/src/experimental/query/getCallsStatus.ts b/packages/core/src/query/getCallsStatus.ts similarity index 81% rename from packages/core/src/experimental/query/getCallsStatus.ts rename to packages/core/src/query/getCallsStatus.ts index e520701ad3..869263eef0 100644 --- a/packages/core/src/experimental/query/getCallsStatus.ts +++ b/packages/core/src/query/getCallsStatus.ts @@ -1,16 +1,16 @@ import type { QueryOptions } from '@tanstack/query-core' -import type { Config } from '../../createConfig.js' -import { ConnectorNotConnectedError } from '../../errors/config.js' -import { filterQueryOptions } from '../../query/utils.js' -import type { ScopeKeyParameter } from '../../types/properties.js' -import type { Compute } from '../../types/utils.js' import { type GetCallsStatusErrorType, type GetCallsStatusParameters, type GetCallsStatusReturnType, getCallsStatus, } from '../actions/getCallsStatus.js' +import type { Config } from '../createConfig.js' +import { ConnectorNotConnectedError } from '../errors/config.js' +import { filterQueryOptions } from '../query/utils.js' +import type { ScopeKeyParameter } from '../types/properties.js' +import type { Compute } from '../types/utils.js' export type GetCallsStatusOptions = Compute< GetCallsStatusParameters & ScopeKeyParameter diff --git a/packages/core/src/experimental/query/getCapabilities.test.ts b/packages/core/src/query/getCapabilities.test.ts similarity index 100% rename from packages/core/src/experimental/query/getCapabilities.test.ts rename to packages/core/src/query/getCapabilities.test.ts diff --git a/packages/core/src/experimental/query/getCapabilities.ts b/packages/core/src/query/getCapabilities.ts similarity index 81% rename from packages/core/src/experimental/query/getCapabilities.ts rename to packages/core/src/query/getCapabilities.ts index 4d21e780db..4bd3b9f272 100644 --- a/packages/core/src/experimental/query/getCapabilities.ts +++ b/packages/core/src/query/getCapabilities.ts @@ -1,16 +1,16 @@ import type { QueryOptions } from '@tanstack/query-core' -import type { Config } from '../../createConfig.js' -import { ConnectorNotConnectedError } from '../../errors/config.js' -import { filterQueryOptions } from '../../query/utils.js' -import type { ScopeKeyParameter } from '../../types/properties.js' -import type { Compute, ExactPartial } from '../../types/utils.js' import { type GetCapabilitiesErrorType, type GetCapabilitiesParameters, type GetCapabilitiesReturnType, getCapabilities, } from '../actions/getCapabilities.js' +import type { Config } from '../createConfig.js' +import { ConnectorNotConnectedError } from '../errors/config.js' +import { filterQueryOptions } from '../query/utils.js' +import type { ScopeKeyParameter } from '../types/properties.js' +import type { Compute, ExactPartial } from '../types/utils.js' export type GetCapabilitiesOptions = Compute< ExactPartial & ScopeKeyParameter diff --git a/packages/core/src/query/prepareTransactionRequest.test.ts b/packages/core/src/query/prepareTransactionRequest.test.ts index e1a70e50b0..d33c156be4 100644 --- a/packages/core/src/query/prepareTransactionRequest.test.ts +++ b/packages/core/src/query/prepareTransactionRequest.test.ts @@ -44,10 +44,10 @@ test('parameters: account', () => { { "account": { "address": "0x14791697260E4c9A71f18484C9f997B308e59325", - "experimental_signAuthorization": [Function], "nonceManager": undefined, "publicKey": "0x046655feed4d214c261e0a6b554395596f1f1476a77d999560e5a8df9b8a1a3515217e88dd05e938efdd71b2cce322bf01da96cd42087b236e8f5043157a9c068e", "sign": [Function], + "signAuthorization": [Function], "signMessage": [Function], "signTransaction": [Function], "signTypedData": [Function], diff --git a/packages/core/src/experimental/query/sendCalls.test.ts b/packages/core/src/query/sendCalls.test.ts similarity index 100% rename from packages/core/src/experimental/query/sendCalls.test.ts rename to packages/core/src/query/sendCalls.test.ts diff --git a/packages/core/src/experimental/query/sendCalls.ts b/packages/core/src/query/sendCalls.ts similarity index 93% rename from packages/core/src/experimental/query/sendCalls.ts rename to packages/core/src/query/sendCalls.ts index a28b970943..e5384c79e2 100644 --- a/packages/core/src/experimental/query/sendCalls.ts +++ b/packages/core/src/query/sendCalls.ts @@ -1,13 +1,13 @@ import type { MutateOptions, MutationOptions } from '@tanstack/query-core' -import type { Config } from '../../createConfig.js' -import type { Compute } from '../../types/utils.js' import { type SendCallsErrorType, type SendCallsParameters, type SendCallsReturnType, sendCalls, } from '../actions/sendCalls.js' +import type { Config } from '../createConfig.js' +import type { Compute } from '../types/utils.js' export function sendCallsMutationOptions( config: config, diff --git a/packages/core/src/experimental/query/showCallsStatus.test.ts b/packages/core/src/query/showCallsStatus.test.ts similarity index 100% rename from packages/core/src/experimental/query/showCallsStatus.test.ts rename to packages/core/src/query/showCallsStatus.test.ts diff --git a/packages/core/src/experimental/query/showCallsStatus.ts b/packages/core/src/query/showCallsStatus.ts similarity index 93% rename from packages/core/src/experimental/query/showCallsStatus.ts rename to packages/core/src/query/showCallsStatus.ts index 1d684e9523..86a703cbc8 100644 --- a/packages/core/src/experimental/query/showCallsStatus.ts +++ b/packages/core/src/query/showCallsStatus.ts @@ -1,13 +1,13 @@ import type { MutateOptions, MutationOptions } from '@tanstack/query-core' -import type { Config } from '../../createConfig.js' -import type { Compute } from '../../types/utils.js' import { type ShowCallsStatusErrorType, type ShowCallsStatusParameters, type ShowCallsStatusReturnType, showCallsStatus, } from '../actions/showCallsStatus.js' +import type { Config } from '../createConfig.js' +import type { Compute } from '../types/utils.js' export function showCallsStatusMutationOptions( config: config, diff --git a/packages/core/src/experimental/query/waitForCallsStatus.test.ts b/packages/core/src/query/waitForCallsStatus.test.ts similarity index 100% rename from packages/core/src/experimental/query/waitForCallsStatus.test.ts rename to packages/core/src/query/waitForCallsStatus.test.ts diff --git a/packages/core/src/experimental/query/waitForCallsStatus.ts b/packages/core/src/query/waitForCallsStatus.ts similarity index 82% rename from packages/core/src/experimental/query/waitForCallsStatus.ts rename to packages/core/src/query/waitForCallsStatus.ts index 37d559049a..197c279e93 100644 --- a/packages/core/src/experimental/query/waitForCallsStatus.ts +++ b/packages/core/src/query/waitForCallsStatus.ts @@ -1,16 +1,16 @@ import type { QueryOptions } from '@tanstack/query-core' -import type { Config } from '../../createConfig.js' -import { ConnectorNotConnectedError } from '../../errors/config.js' -import { filterQueryOptions } from '../../query/utils.js' -import type { ScopeKeyParameter } from '../../types/properties.js' -import type { Compute, PartialBy } from '../../types/utils.js' import { type WaitForCallsStatusErrorType, type WaitForCallsStatusParameters, type WaitForCallsStatusReturnType, waitForCallsStatus, } from '../actions/waitForCallsStatus.js' +import type { Config } from '../createConfig.js' +import { ConnectorNotConnectedError } from '../errors/config.js' +import { filterQueryOptions } from '../query/utils.js' +import type { ScopeKeyParameter } from '../types/properties.js' +import type { Compute, PartialBy } from '../types/utils.js' export type WaitForCallsStatusOptions = Compute< PartialBy & ScopeKeyParameter diff --git a/packages/core/src/transports/connector.test.ts b/packages/core/src/transports/connector.test.ts index 2af97a420b..67869325b6 100644 --- a/packages/core/src/transports/connector.test.ts +++ b/packages/core/src/transports/connector.test.ts @@ -36,7 +36,7 @@ test('behavior: connector type not found', () => { [ProviderDisconnectedError: The Provider is disconnected from all chains. Details: Could not find connector of type "foo" in \`connectors\` passed to \`createConfig\`. - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) @@ -58,7 +58,7 @@ test('behavior: provider is disconnected', () => { [ProviderDisconnectedError: The Provider is disconnected from all chains. Details: Provider is disconnected. - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) @@ -82,7 +82,7 @@ test('behavior: chainId mismatch', () => { [ChainDisconnectedError: The Provider is not connected to the requested chain. Details: The current chain of the connector (id: 1) does not match the target chain for the request (id: 10 – OP Mainnet). - Version: viem@2.23.12] + Version: viem@2.28.0] `) }) diff --git a/packages/react/src/experimental/hooks/useWriteContracts.test.ts b/packages/react/src/experimental/hooks/useWriteContracts.test.ts index 6dd83f60eb..ea6d4815de 100644 --- a/packages/react/src/experimental/hooks/useWriteContracts.test.ts +++ b/packages/react/src/experimental/hooks/useWriteContracts.test.ts @@ -34,7 +34,11 @@ test('default', async () => { await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) expect(result.current.data).toMatchInlineSnapshot( - `"0x8913636bd97cf4bcc0a6343c730905a27ead0f7480ff82190072e916439eb212"`, + ` + { + "id": "0x8913636bd97cf4bcc0a6343c730905a27ead0f7480ff82190072e916439eb212", + } + `, ) await disconnect(config, { connector }) diff --git a/packages/react/src/exports/actions.test.ts b/packages/react/src/exports/actions.test.ts index 77f805d96c..eaaedba14f 100644 --- a/packages/react/src/exports/actions.test.ts +++ b/packages/react/src/exports/actions.test.ts @@ -20,6 +20,8 @@ test('exports', () => { "fetchBlockNumber", "getBlockTransactionCount", "getBytecode", + "getCallsStatus", + "getCapabilities", "getChainId", "getChains", "getClient", @@ -53,7 +55,9 @@ test('exports', () => { "readContract", "readContracts", "reconnect", + "sendCalls", "sendTransaction", + "showCallsStatus", "signMessage", "signTypedData", "simulateContract", @@ -62,6 +66,7 @@ test('exports', () => { "switchNetwork", "verifyMessage", "verifyTypedData", + "waitForCallsStatus", "watchAccount", "watchAsset", "watchBlocks", diff --git a/packages/react/src/exports/experimental.ts b/packages/react/src/exports/experimental.ts index a8668fe948..996eb56a73 100644 --- a/packages/react/src/exports/experimental.ts +++ b/packages/react/src/exports/experimental.ts @@ -4,37 +4,55 @@ // biome-ignore lint/performance/noBarrelFile: entrypoint module export { + /** @deprecated This is no longer experimental – use `import type { UseCallsStatusParameters } from 'wagmi'` instead. */ type UseCallsStatusParameters, + /** @deprecated This is no longer experimental – use `import type { UseCallsStatusReturnType } from 'wagmi'` instead. */ type UseCallsStatusReturnType, + /** @deprecated This is no longer experimental – use `import { useCallsStatus } from 'wagmi'` instead. */ useCallsStatus, -} from '../experimental/hooks/useCallsStatus.js' +} from '../hooks/useCallsStatus.js' export { + /** @deprecated This is no longer experimental – use `import type { UseCapabilitiesParameters } from 'wagmi'` instead. */ type UseCapabilitiesParameters, + /** @deprecated This is no longer experimental – use `import type { UseCapabilitiesReturnType } from 'wagmi'` instead. */ type UseCapabilitiesReturnType, + /** @deprecated This is no longer experimental – use `import { useCapabilities } from 'wagmi'` instead. */ useCapabilities, -} from '../experimental/hooks/useCapabilities.js' +} from '../hooks/useCapabilities.js' export { + /** @deprecated This is no longer experimental – use `import type { UseSendCallsParameters } from 'wagmi'` instead. */ type UseSendCallsParameters, + /** @deprecated This is no longer experimental – use `import type { UseSendCallsReturnType } from 'wagmi'` instead. */ type UseSendCallsReturnType, + /** @deprecated This is no longer experimental – use `import { useSendCalls } from 'wagmi'` instead. */ useSendCalls, -} from '../experimental/hooks/useSendCalls.js' +} from '../hooks/useSendCalls.js' export { + /** @deprecated This is no longer experimental – use `import type { UseShowCallsStatusParameters } from 'wagmi'` instead. */ type UseShowCallsStatusParameters, + /** @deprecated This is no longer experimental – use `import type { UseShowCallsStatusReturnType } from 'wagmi'` instead. */ type UseShowCallsStatusReturnType, + /** @deprecated This is no longer experimental – use `import { useShowCallsStatus } from 'wagmi'` instead. */ useShowCallsStatus, -} from '../experimental/hooks/useShowCallsStatus.js' +} from '../hooks/useShowCallsStatus.js' export { + /** @deprecated This is no longer experimental – use `import type { UseWaitForCallsStatusParameters } from 'wagmi'` instead. */ type UseWaitForCallsStatusParameters, + /** @deprecated This is no longer experimental – use `import type { UseWaitForCallsStatusReturnType } from 'wagmi'` instead. */ type UseWaitForCallsStatusReturnType, + /** @deprecated This is no longer experimental – use `import { useWaitForCallsStatus } from 'wagmi'` instead. */ useWaitForCallsStatus, -} from '../experimental/hooks/useWaitForCallsStatus.js' +} from '../hooks/useWaitForCallsStatus.js' export { + /** @deprecated Use `UseSendCallsParameters` instead. */ type UseWriteContractsParameters, + /** @deprecated Use `UseSendCallsReturnType` instead. */ type UseWriteContractsReturnType, + /** @deprecated Use `useSendCalls` instead. */ useWriteContracts, } from '../experimental/hooks/useWriteContracts.js' diff --git a/packages/react/src/exports/index.test.ts b/packages/react/src/exports/index.test.ts index 954492c22e..d8d6f7c6d5 100644 --- a/packages/react/src/exports/index.test.ts +++ b/packages/react/src/exports/index.test.ts @@ -18,6 +18,8 @@ test('exports', () => { "useBlockNumber", "useBlockTransactionCount", "useBytecode", + "useCallsStatus", + "useCapabilities", "useCall", "useChainId", "useChains", @@ -50,7 +52,9 @@ test('exports', () => { "useReadContracts", "useContractReads", "useReconnect", + "useSendCalls", "useSendTransaction", + "useShowCallsStatus", "useSignMessage", "useSignTypedData", "useSimulateContract", @@ -65,6 +69,7 @@ test('exports', () => { "useVerifyMessage", "useVerifyTypedData", "useWalletClient", + "useWaitForCallsStatus", "useWaitForTransactionReceipt", "useWatchAsset", "useWatchBlocks", diff --git a/packages/react/src/exports/index.ts b/packages/react/src/exports/index.ts index 9cb8bc6b4d..a4b8502982 100644 --- a/packages/react/src/exports/index.ts +++ b/packages/react/src/exports/index.ts @@ -69,6 +69,18 @@ export { useBytecode, } from '../hooks/useBytecode.js' +export { + type UseCallsStatusParameters, + type UseCallsStatusReturnType, + useCallsStatus, +} from '../hooks/useCallsStatus.js' + +export { + type UseCapabilitiesParameters, + type UseCapabilitiesReturnType, + useCapabilities, +} from '../hooks/useCapabilities.js' + export { type UseCallParameters, type UseCallReturnType, @@ -245,12 +257,24 @@ export { useReconnect, } from '../hooks/useReconnect.js' +export { + type UseSendCallsParameters, + type UseSendCallsReturnType, + useSendCalls, +} from '../hooks/useSendCalls.js' + export { type UseSendTransactionParameters, type UseSendTransactionReturnType, useSendTransaction, } from '../hooks/useSendTransaction.js' +export { + type UseShowCallsStatusParameters, + type UseShowCallsStatusReturnType, + useShowCallsStatus, +} from '../hooks/useShowCallsStatus.js' + export { type UseSignMessageParameters, type UseSignMessageReturnType, @@ -336,6 +360,12 @@ export { useWalletClient, } from '../hooks/useWalletClient.js' +export { + type UseWaitForCallsStatusParameters, + type UseWaitForCallsStatusReturnType, + useWaitForCallsStatus, +} from '../hooks/useWaitForCallsStatus.js' + export { type UseWaitForTransactionReceiptParameters, type UseWaitForTransactionReceiptReturnType, diff --git a/packages/react/src/exports/query.test.ts b/packages/react/src/exports/query.test.ts index fe4130815d..002b6abaab 100644 --- a/packages/react/src/exports/query.test.ts +++ b/packages/react/src/exports/query.test.ts @@ -26,6 +26,10 @@ test('exports', () => { "getBlockTransactionCountQueryOptions", "getBytecodeQueryKey", "getBytecodeQueryOptions", + "getCallsStatusQueryKey", + "getCallsStatusQueryOptions", + "getCapabilitiesQueryKey", + "getCapabilitiesQueryOptions", "getConnectorClientQueryKey", "getConnectorClientQueryOptions", "getEnsAddressQueryKey", @@ -67,6 +71,8 @@ test('exports', () => { "readContractsQueryKey", "readContractsQueryOptions", "reconnectMutationOptions", + "sendCallsMutationOptions", + "showCallsStatusMutationOptions", "sendTransactionMutationOptions", "signMessageMutationOptions", "signTypedDataMutationOptions", @@ -78,6 +84,8 @@ test('exports', () => { "verifyMessageQueryOptions", "verifyTypedDataQueryKey", "verifyTypedDataQueryOptions", + "waitForCallsStatusQueryKey", + "waitForCallsStatusQueryOptions", "waitForTransactionReceiptQueryKey", "waitForTransactionReceiptQueryOptions", "watchAssetMutationOptions", diff --git a/packages/react/src/experimental/hooks/useCallsStatus.test.ts b/packages/react/src/hooks/useCallsStatus.test.ts similarity index 84% rename from packages/react/src/experimental/hooks/useCallsStatus.test.ts rename to packages/react/src/hooks/useCallsStatus.test.ts index 7a7eb46f0a..f3af1c24bc 100644 --- a/packages/react/src/experimental/hooks/useCallsStatus.test.ts +++ b/packages/react/src/hooks/useCallsStatus.test.ts @@ -34,15 +34,20 @@ test('default', async () => { await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) const { result: result_2 } = renderHook(() => - useCallsStatus({ id: result.current.data! }), + useCallsStatus({ id: result.current.data?.id! }), ) await waitFor(() => expect(result_2.current.isSuccess).toBeTruthy()) expect(result_2.current.data).toMatchInlineSnapshot( ` { + "atomic": false, + "chainId": 1, + "id": "0x5dedb5a4ff8968db37459b52b83cbdc92b01c9c709c9cff26e345ef5cf27f92e", "receipts": [], - "status": "PENDING", + "status": "pending", + "statusCode": 100, + "version": "2.0.0", } `, ) @@ -50,11 +55,12 @@ test('default', async () => { await testClient.mainnet.mine({ blocks: 1 }) const { result: result_3 } = renderHook(() => - useCallsStatus({ id: result.current.data! }), + useCallsStatus({ id: result.current.data?.id! }), ) await waitFor(() => expect(result_3.current.isSuccess).toBeTruthy()) - expect(result_3.current.data?.status).toBe('CONFIRMED') + expect(result_3.current.data?.status).toBe('success') + expect(result_3.current.data?.statusCode).toBe(200) expect( result_3.current.data?.receipts?.map((x) => ({ ...x, diff --git a/packages/react/src/experimental/hooks/useCallsStatus.ts b/packages/react/src/hooks/useCallsStatus.ts similarity index 77% rename from packages/react/src/experimental/hooks/useCallsStatus.ts rename to packages/react/src/hooks/useCallsStatus.ts index c3858cdcfc..ab4c90c1f2 100644 --- a/packages/react/src/experimental/hooks/useCallsStatus.ts +++ b/packages/react/src/hooks/useCallsStatus.ts @@ -1,19 +1,22 @@ 'use client' -import type { Config, ResolvedRegister } from '@wagmi/core' +import type { + Config, + GetCallsStatusErrorType, + ResolvedRegister, +} from '@wagmi/core' +import type { Compute } from '@wagmi/core/internal' import { type GetCallsStatusData, - type GetCallsStatusErrorType, type GetCallsStatusOptions, type GetCallsStatusQueryFnData, type GetCallsStatusQueryKey, getCallsStatusQueryOptions, -} from '@wagmi/core/experimental' -import type { Compute } from '@wagmi/core/internal' +} from '@wagmi/core/query' -import { useConfig } from '../../hooks/useConfig.js' -import type { ConfigParameter, QueryParameter } from '../../types/properties.js' -import { type UseQueryReturnType, useQuery } from '../../utils/query.js' +import type { ConfigParameter, QueryParameter } from '../types/properties.js' +import { type UseQueryReturnType, useQuery } from '../utils/query.js' +import { useConfig } from './useConfig.js' export type UseCallsStatusParameters< config extends Config = Config, diff --git a/packages/react/src/experimental/hooks/useCapabilities.test.ts b/packages/react/src/hooks/useCapabilities.test.ts similarity index 100% rename from packages/react/src/experimental/hooks/useCapabilities.test.ts rename to packages/react/src/hooks/useCapabilities.test.ts diff --git a/packages/react/src/experimental/hooks/useCapabilities.ts b/packages/react/src/hooks/useCapabilities.ts similarity index 76% rename from packages/react/src/experimental/hooks/useCapabilities.ts rename to packages/react/src/hooks/useCapabilities.ts index 34398c4256..42c0d6afb1 100644 --- a/packages/react/src/experimental/hooks/useCapabilities.ts +++ b/packages/react/src/hooks/useCapabilities.ts @@ -1,20 +1,23 @@ 'use client' -import type { Config, ResolvedRegister } from '@wagmi/core' +import type { + Config, + GetCapabilitiesErrorType, + ResolvedRegister, +} from '@wagmi/core' +import type { Compute } from '@wagmi/core/internal' import { type GetCapabilitiesData, - type GetCapabilitiesErrorType, type GetCapabilitiesOptions, type GetCapabilitiesQueryFnData, type GetCapabilitiesQueryKey, getCapabilitiesQueryOptions, -} from '@wagmi/core/experimental' -import type { Compute } from '@wagmi/core/internal' +} from '@wagmi/core/query' -import { useAccount } from '../../hooks/useAccount.js' -import { useConfig } from '../../hooks/useConfig.js' -import type { ConfigParameter, QueryParameter } from '../../types/properties.js' -import { type UseQueryReturnType, useQuery } from '../../utils/query.js' +import type { ConfigParameter, QueryParameter } from '../types/properties.js' +import { type UseQueryReturnType, useQuery } from '../utils/query.js' +import { useAccount } from './useAccount.js' +import { useConfig } from './useConfig.js' export type UseCapabilitiesParameters< config extends Config = Config, diff --git a/packages/react/src/experimental/hooks/useSendCalls.test.ts b/packages/react/src/hooks/useSendCalls.test.ts similarity index 89% rename from packages/react/src/experimental/hooks/useSendCalls.test.ts rename to packages/react/src/hooks/useSendCalls.test.ts index 1eeebdf902..a088dcf221 100644 --- a/packages/react/src/experimental/hooks/useSendCalls.test.ts +++ b/packages/react/src/hooks/useSendCalls.test.ts @@ -33,7 +33,11 @@ test('default', async () => { await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) expect(result.current.data).toMatchInlineSnapshot( - `"0x5dedb5a4ff8968db37459b52b83cbdc92b01c9c709c9cff26e345ef5cf27f92e"`, + ` + { + "id": "0x5dedb5a4ff8968db37459b52b83cbdc92b01c9c709c9cff26e345ef5cf27f92e", + } + `, ) await disconnect(config, { connector }) diff --git a/packages/react/src/experimental/hooks/useSendCalls.ts b/packages/react/src/hooks/useSendCalls.ts similarity index 86% rename from packages/react/src/experimental/hooks/useSendCalls.ts rename to packages/react/src/hooks/useSendCalls.ts index 7a4c776e7a..49366cb218 100644 --- a/packages/react/src/experimental/hooks/useSendCalls.ts +++ b/packages/react/src/hooks/useSendCalls.ts @@ -1,23 +1,22 @@ 'use client' import { useMutation } from '@tanstack/react-query' -import type { Config, ResolvedRegister } from '@wagmi/core' +import type { Config, ResolvedRegister, SendCallsErrorType } from '@wagmi/core' +import type { Compute } from '@wagmi/core/internal' import { type SendCallsData, - type SendCallsErrorType, type SendCallsMutate, type SendCallsMutateAsync, type SendCallsVariables, sendCallsMutationOptions, -} from '@wagmi/core/experimental' -import type { Compute } from '@wagmi/core/internal' +} from '@wagmi/core/query' -import { useConfig } from '../../hooks/useConfig.js' -import type { ConfigParameter } from '../../types/properties.js' +import type { ConfigParameter } from '../types/properties.js' import type { UseMutationParameters, UseMutationReturnType, -} from '../../utils/query.js' +} from '../utils/query.js' +import { useConfig } from './useConfig.js' export type UseSendCallsParameters< config extends Config = Config, diff --git a/packages/react/src/experimental/hooks/useShowCallsStatus.ts b/packages/react/src/hooks/useShowCallsStatus.ts similarity index 86% rename from packages/react/src/experimental/hooks/useShowCallsStatus.ts rename to packages/react/src/hooks/useShowCallsStatus.ts index 439891584f..82a4dd3909 100644 --- a/packages/react/src/experimental/hooks/useShowCallsStatus.ts +++ b/packages/react/src/hooks/useShowCallsStatus.ts @@ -1,23 +1,26 @@ 'use client' import { useMutation } from '@tanstack/react-query' -import type { Config, ResolvedRegister } from '@wagmi/core' +import type { + Config, + ResolvedRegister, + ShowCallsStatusErrorType, +} from '@wagmi/core' +import type { Compute } from '@wagmi/core/internal' import { type ShowCallsStatusData, - type ShowCallsStatusErrorType, type ShowCallsStatusMutate, type ShowCallsStatusMutateAsync, type ShowCallsStatusVariables, showCallsStatusMutationOptions, -} from '@wagmi/core/experimental' -import type { Compute } from '@wagmi/core/internal' +} from '@wagmi/core/query' -import { useConfig } from '../../hooks/useConfig.js' -import type { ConfigParameter } from '../../types/properties.js' +import type { ConfigParameter } from '../types/properties.js' import type { UseMutationParameters, UseMutationReturnType, -} from '../../utils/query.js' +} from '../utils/query.js' +import { useConfig } from './useConfig.js' export type UseShowCallsStatusParameters< config extends Config = Config, diff --git a/packages/react/src/experimental/hooks/useWaitForCallsStatus.test.ts b/packages/react/src/hooks/useWaitForCallsStatus.test.ts similarity index 98% rename from packages/react/src/experimental/hooks/useWaitForCallsStatus.test.ts rename to packages/react/src/hooks/useWaitForCallsStatus.test.ts index 2042422d2a..96f5a2a7e4 100644 --- a/packages/react/src/experimental/hooks/useWaitForCallsStatus.test.ts +++ b/packages/react/src/hooks/useWaitForCallsStatus.test.ts @@ -14,7 +14,7 @@ test('default', async () => { const useSendCalls_render = renderHook(() => useSendCalls()) const useWaitForCallsStatus_render = renderHook(() => - useWaitForCallsStatus({ id: useSendCalls_render.result.current.data }), + useWaitForCallsStatus({ id: useSendCalls_render.result.current.data?.id }), ) useSendCalls_render.result.current.sendCalls({ @@ -57,7 +57,7 @@ test('default', async () => { ]) expect(useWaitForCallsStatus_render.result.current.data?.status).toBe( - 'CONFIRMED', + 'success', ) expect( useWaitForCallsStatus_render.result.current.data?.receipts?.map((x) => ({ diff --git a/packages/react/src/experimental/hooks/useWaitForCallsStatus.ts b/packages/react/src/hooks/useWaitForCallsStatus.ts similarity index 79% rename from packages/react/src/experimental/hooks/useWaitForCallsStatus.ts rename to packages/react/src/hooks/useWaitForCallsStatus.ts index d55bff456c..7c428c9405 100644 --- a/packages/react/src/experimental/hooks/useWaitForCallsStatus.ts +++ b/packages/react/src/hooks/useWaitForCallsStatus.ts @@ -1,19 +1,22 @@ 'use client' -import type { Config, ResolvedRegister } from '@wagmi/core' +import type { + Config, + ResolvedRegister, + WaitForCallsStatusErrorType, +} from '@wagmi/core' +import type { Compute } from '@wagmi/core/internal' import { type WaitForCallsStatusData, - type WaitForCallsStatusErrorType, type WaitForCallsStatusOptions, type WaitForCallsStatusQueryFnData, type WaitForCallsStatusQueryKey, waitForCallsStatusQueryOptions, -} from '@wagmi/core/experimental' -import type { Compute } from '@wagmi/core/internal' +} from '@wagmi/core/query' -import { useConfig } from '../../hooks/useConfig.js' -import type { ConfigParameter, QueryParameter } from '../../types/properties.js' -import { type UseQueryReturnType, useQuery } from '../../utils/query.js' +import type { ConfigParameter, QueryParameter } from '../types/properties.js' +import { type UseQueryReturnType, useQuery } from '../utils/query.js' +import { useConfig } from './useConfig.js' export type UseWaitForCallsStatusParameters< config extends Config = Config, diff --git a/packages/vue/src/exports/actions.test.ts b/packages/vue/src/exports/actions.test.ts index 77f805d96c..eaaedba14f 100644 --- a/packages/vue/src/exports/actions.test.ts +++ b/packages/vue/src/exports/actions.test.ts @@ -20,6 +20,8 @@ test('exports', () => { "fetchBlockNumber", "getBlockTransactionCount", "getBytecode", + "getCallsStatus", + "getCapabilities", "getChainId", "getChains", "getClient", @@ -53,7 +55,9 @@ test('exports', () => { "readContract", "readContracts", "reconnect", + "sendCalls", "sendTransaction", + "showCallsStatus", "signMessage", "signTypedData", "simulateContract", @@ -62,6 +66,7 @@ test('exports', () => { "switchNetwork", "verifyMessage", "verifyTypedData", + "waitForCallsStatus", "watchAccount", "watchAsset", "watchBlocks", diff --git a/packages/vue/src/exports/query.test.ts b/packages/vue/src/exports/query.test.ts index d2b3386c33..758d45c907 100644 --- a/packages/vue/src/exports/query.test.ts +++ b/packages/vue/src/exports/query.test.ts @@ -26,6 +26,10 @@ test('exports', () => { "getBlockTransactionCountQueryOptions", "getBytecodeQueryKey", "getBytecodeQueryOptions", + "getCallsStatusQueryKey", + "getCallsStatusQueryOptions", + "getCapabilitiesQueryKey", + "getCapabilitiesQueryOptions", "getConnectorClientQueryKey", "getConnectorClientQueryOptions", "getEnsAddressQueryKey", @@ -67,6 +71,8 @@ test('exports', () => { "readContractsQueryKey", "readContractsQueryOptions", "reconnectMutationOptions", + "sendCallsMutationOptions", + "showCallsStatusMutationOptions", "sendTransactionMutationOptions", "signMessageMutationOptions", "signTypedDataMutationOptions", @@ -78,6 +84,8 @@ test('exports', () => { "verifyMessageQueryOptions", "verifyTypedDataQueryKey", "verifyTypedDataQueryOptions", + "waitForCallsStatusQueryKey", + "waitForCallsStatusQueryOptions", "waitForTransactionReceiptQueryKey", "waitForTransactionReceiptQueryOptions", "watchAssetMutationOptions", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e4d54814f3..9d1643c8c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -87,8 +87,8 @@ importers: specifier: 5.5.4 version: 5.5.4 viem: - specifier: 2.23.12 - version: 2.23.12(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.22.4) + specifier: 2.28.0 + version: 2.28.0(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.22.4) vitest: specifier: ^2.1.1 version: 2.1.1(@types/node@20.12.10)(happy-dom@15.7.4)(msw@2.4.9(typescript@5.5.4))(terser@5.31.0) @@ -1902,6 +1902,10 @@ packages: resolution: {integrity: sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==} engines: {node: ^14.21.3 || >=16} + '@noble/curves@1.8.2': + resolution: {integrity: sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g==} + engines: {node: ^14.21.3 || >=16} + '@noble/hashes@1.2.0': resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==} @@ -1929,6 +1933,10 @@ packages: resolution: {integrity: sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==} engines: {node: ^14.21.3 || >=16} + '@noble/hashes@1.7.2': + resolution: {integrity: sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ==} + engines: {node: ^14.21.3 || >=16} + '@noble/secp256k1@1.7.1': resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==} @@ -2631,9 +2639,6 @@ packages: '@scure/base@1.1.3': resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} - '@scure/base@1.1.7': - resolution: {integrity: sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g==} - '@scure/base@1.1.9': resolution: {integrity: sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==} @@ -7755,16 +7760,16 @@ packages: typescript: optional: true - viem@2.23.12: - resolution: {integrity: sha512-zq2mL4KcUfpVMLMaKjwzRG3akjjVUo9AhaNohrQ86ufltX1aUxapE+Z6YQ0U6F6MBQEMBgLiFTWgalgVDWqQyQ==} + viem@2.23.2: + resolution: {integrity: sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: typescript: optional: true - viem@2.23.2: - resolution: {integrity: sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA==} + viem@2.28.0: + resolution: {integrity: sha512-Z4W5O1pe+6pirYTFm451FcZmfGAUxUWt2L/eWC+YfTF28j/8rd7q6MBAi05lMN4KhLJjhN0s5YGIPB+kf1L20g==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -9612,7 +9617,7 @@ snapshots: dependencies: '@ethereumjs/tx': 4.2.0 '@noble/hashes': 1.7.1 - '@scure/base': 1.1.9 + '@scure/base': 1.2.4 '@types/debug': 4.1.7 debug: 4.3.7 pony-cause: 2.1.11 @@ -9766,6 +9771,10 @@ snapshots: dependencies: '@noble/hashes': 1.7.1 + '@noble/curves@1.8.2': + dependencies: + '@noble/hashes': 1.7.2 + '@noble/hashes@1.2.0': {} '@noble/hashes@1.3.1': {} @@ -9780,6 +9789,8 @@ snapshots: '@noble/hashes@1.7.1': {} + '@noble/hashes@1.7.2': {} + '@noble/secp256k1@1.7.1': {} '@nodelib/fs.scandir@2.1.5': @@ -10030,7 +10041,7 @@ snapshots: vite-plugin-inspect: 0.8.4(@nuxt/kit@3.11.2(rollup@4.24.4))(rollup@4.24.4)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)) vite-plugin-vue-inspector: 5.1.0(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)) which: 3.0.1 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - '@unocss/reset' - '@vue/composition-api' @@ -10095,7 +10106,7 @@ snapshots: vite-plugin-inspect: 0.8.4(@nuxt/kit@3.11.2(rollup@4.24.4))(rollup@4.24.4)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)) vite-plugin-vue-inspector: 5.1.0(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)) which: 3.0.1 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - '@unocss/reset' - '@vue/composition-api' @@ -10689,8 +10700,6 @@ snapshots: '@scure/base@1.1.3': {} - '@scure/base@1.1.7': {} - '@scure/base@1.1.9': {} '@scure/base@1.2.4': {} @@ -10699,7 +10708,7 @@ snapshots: dependencies: '@noble/hashes': 1.2.0 '@noble/secp256k1': 1.7.1 - '@scure/base': 1.1.3 + '@scure/base': 1.1.9 '@scure/bip32@1.3.1': dependencies: @@ -10717,18 +10726,18 @@ snapshots: dependencies: '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 - '@scure/base': 1.1.7 + '@scure/base': 1.1.9 '@scure/bip32@1.6.2': dependencies: - '@noble/curves': 1.8.1 - '@noble/hashes': 1.7.1 + '@noble/curves': 1.8.2 + '@noble/hashes': 1.7.2 '@scure/base': 1.2.4 '@scure/bip39@1.1.1': dependencies: '@noble/hashes': 1.2.0 - '@scure/base': 1.1.3 + '@scure/base': 1.1.9 '@scure/bip39@1.2.1': dependencies: @@ -10738,11 +10747,11 @@ snapshots: '@scure/bip39@1.3.0': dependencies: '@noble/hashes': 1.4.0 - '@scure/base': 1.1.7 + '@scure/base': 1.1.9 '@scure/bip39@1.5.4': dependencies: - '@noble/hashes': 1.7.1 + '@noble/hashes': 1.7.2 '@scure/base': 1.2.4 '@sec-ant/readable-stream@0.4.1': {} @@ -15726,8 +15735,8 @@ snapshots: ox@0.6.9(typescript@5.5.4)(zod@3.22.4): dependencies: '@adraffy/ens-normalize': 1.11.0 - '@noble/curves': 1.8.1 - '@noble/hashes': 1.7.1 + '@noble/curves': 1.8.2 + '@noble/hashes': 1.7.2 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 abitype: 1.0.8(typescript@5.5.4)(zod@3.22.4) @@ -17415,16 +17424,16 @@ snapshots: - utf-8-validate - zod - viem@2.23.12(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.22.4): + viem@2.23.2(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.22.4): dependencies: '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 abitype: 1.0.8(typescript@5.5.4)(zod@3.22.4) - isows: 1.0.6(ws@8.18.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - ox: 0.6.9(typescript@5.5.4)(zod@3.22.4) - ws: 8.18.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + ox: 0.6.7(typescript@5.5.4)(zod@3.22.4) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -17432,16 +17441,16 @@ snapshots: - utf-8-validate - zod - viem@2.23.2(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.22.4): + viem@2.28.0(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.22.4): dependencies: - '@noble/curves': 1.8.1 - '@noble/hashes': 1.7.1 + '@noble/curves': 1.8.2 + '@noble/hashes': 1.7.2 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 abitype: 1.0.8(typescript@5.5.4)(zod@3.22.4) - isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - ox: 0.6.7(typescript@5.5.4)(zod@3.22.4) - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + isows: 1.0.6(ws@8.18.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + ox: 0.6.9(typescript@5.5.4)(zod@3.22.4) + ws: 8.18.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: diff --git a/site/.vitepress/sidebar.ts b/site/.vitepress/sidebar.ts index 4307a0556b..29ea14bc52 100644 --- a/site/.vitepress/sidebar.ts +++ b/site/.vitepress/sidebar.ts @@ -161,6 +161,14 @@ export function getSidebar() { link: '/react/api/hooks/useBytecode', }, { text: 'useCall', link: '/react/api/hooks/useCall' }, + { + text: 'useCallsStatus', + link: '/react/api/hooks/useCallsStatus', + }, + { + text: 'useCapabilities', + link: '/react/api/hooks/useCapabilities', + }, { text: 'useChainId', link: '/react/api/hooks/useChainId' }, { text: 'useChains', link: '/react/api/hooks/useChains' }, { text: 'useClient', link: '/react/api/hooks/useClient' }, @@ -239,10 +247,18 @@ export function getSidebar() { link: '/react/api/hooks/useReadContracts', }, { text: 'useReconnect', link: '/react/api/hooks/useReconnect' }, + { + text: 'useSendCalls', + link: '/react/api/hooks/useSendCalls', + }, { text: 'useSendTransaction', link: '/react/api/hooks/useSendTransaction', }, + { + text: 'useShowCallsStatus', + link: '/react/api/hooks/useShowCallsStatus', + }, { text: 'useSignMessage', link: '/react/api/hooks/useSignMessage', @@ -287,6 +303,10 @@ export function getSidebar() { text: 'useToken', link: '/react/api/hooks/useToken', }, + { + text: 'useWaitForCallsStatus', + link: '/react/api/hooks/useWaitForCallsStatus', + }, { text: 'useWaitForTransactionReceipt', link: '/react/api/hooks/useWaitForTransactionReceipt', @@ -352,31 +372,6 @@ export function getSidebar() { }, ], }, - { - text: 'Experimental', - items: [ - { - text: 'useCallsStatus', - link: '/react/api/hooks/useCallsStatus', - }, - { - text: 'useCapabilities', - link: '/react/api/hooks/useCapabilities', - }, - { - text: 'useSendCalls', - link: '/react/api/hooks/useSendCalls', - }, - { - text: 'useShowCallsStatus', - link: '/react/api/hooks/useShowCallsStatus', - }, - { - text: 'useWaitForCallsStatus', - link: '/react/api/hooks/useWaitForCallsStatus', - }, - ], - }, ], '/vue': [ { @@ -778,6 +773,14 @@ export function getSidebar() { text: 'getBytecode', link: '/core/api/actions/getBytecode', }, + { + text: 'getCallsStatus', + link: '/core/api/actions/getCallsStatus', + }, + { + text: 'getCapabilities', + link: '/core/api/actions/getCapabilities', + }, { text: 'getChainId', link: '/core/api/actions/getChainId' }, { text: 'getChains', link: '/core/api/actions/getChains' }, { @@ -868,10 +871,18 @@ export function getSidebar() { text: 'readContracts', link: '/core/api/actions/readContracts', }, + { + text: 'sendCalls', + link: '/core/api/actions/sendCalls', + }, { text: 'sendTransaction', link: '/core/api/actions/sendTransaction', }, + { + text: 'showCallsStatus', + link: '/core/api/actions/showCallsStatus', + }, { text: 'signMessage', link: '/core/api/actions/signMessage', @@ -900,6 +911,10 @@ export function getSidebar() { text: 'verifyTypedData', link: '/core/api/actions/verifyTypedData', }, + { + text: 'waitForCallsStatus', + link: '/core/api/actions/waitForCallsStatus', + }, { text: 'waitForTransactionReceipt', link: '/core/api/actions/waitForTransactionReceipt', @@ -976,31 +991,6 @@ export function getSidebar() { }, ], }, - { - text: 'Experimental', - items: [ - { - text: 'getCallsStatus', - link: '/core/api/actions/getCallsStatus', - }, - { - text: 'getCapabilities', - link: '/core/api/actions/getCapabilities', - }, - { - text: 'sendCalls', - link: '/core/api/actions/sendCalls', - }, - { - text: 'showCallsStatus', - link: '/core/api/actions/showCallsStatus', - }, - { - text: 'waitForCallsStatus', - link: '/core/api/actions/waitForCallsStatus', - }, - ], - }, ], '/cli': [ { diff --git a/site/core/api/actions/getCallsStatus.md b/site/core/api/actions/getCallsStatus.md index 70ff75f74b..dc03862b19 100644 --- a/site/core/api/actions/getCallsStatus.md +++ b/site/core/api/actions/getCallsStatus.md @@ -1,5 +1,5 @@ @@ -10,21 +10,17 @@ Action to fetch the status and receipts of a call batch that was sent via [`send [Read more.](https://github.com/ethereum/EIPs/blob/1663ea2e7a683285f977eda51c32cec86553f585/EIPS/eip-5792.md#wallet_getcallsstatus) -::: warning -This is an experimental action that is not supported in most wallets. It is recommended to have a fallback mechanism if using this in production. -::: - ## Import ```ts -import { getCallsStatus } from '@wagmi/core/experimental' +import { getCallsStatus } from '@wagmi/core' ``` ## Usage ::: code-group ```ts [index.ts] -import { getCallsStatus } from '@wagmi/core/experimental' +import { getCallsStatus } from '@wagmi/core' import { config } from './config' const status = await getCallsStatus(config, { @@ -37,7 +33,7 @@ const status = await getCallsStatus(config, { ## Parameters ```ts -import { type GetCallsStatusParameters } from '@wagmi/core/experimental' +import { type GetCallsStatusParameters } from '@wagmi/core' ``` ### connector @@ -48,7 +44,7 @@ Connector to get call statuses with. ::: code-group ```ts [index.ts] -import { getConnections, getCallsStatus } from '@wagmi/core/experimental' +import { getConnections, getCallsStatus } from '@wagmi/core' import { config } from './config' const connections = getConnections(config) @@ -68,7 +64,7 @@ Identifier of the call batch. ::: code-group ```ts [index.ts] -import { getCallsStatus } from '@wagmi/core/experimental' +import { getCallsStatus } from '@wagmi/core' import { config } from './config' const status = await getCallsStatus(config, { @@ -81,7 +77,7 @@ const status = await getCallsStatus(config, { ## Return Type ```ts -import { type GetCallsStatusReturnType } from '@wagmi/core/experimental' +import { type GetCallsStatusReturnType } from '@wagmi/core' ``` `{ status: 'PENDING' | 'CONFIRMED', receipts: TransactionReceipt[] }` @@ -91,7 +87,7 @@ The status and receipts of the call batch. ## Error ```ts -import { type GetCallsStatusErrorType } from '@wagmi/core/experimental' +import { type GetCallsStatusErrorType } from '@wagmi/core' ``` diff --git a/site/core/api/actions/getCapabilities.md b/site/core/api/actions/getCapabilities.md index 6fe8cd99e9..36bad2bdda 100644 --- a/site/core/api/actions/getCapabilities.md +++ b/site/core/api/actions/getCapabilities.md @@ -1,5 +1,5 @@ @@ -10,21 +10,19 @@ Action to extract capabilities (grouped by chain ID) that a connected wallet sup [Read more.](https://github.com/ethereum/EIPs/blob/815028dc634463e1716fc5ce44c019a6040f0bef/EIPS/eip-5792.md#wallet_getcapabilities) -::: warning -This is an experimental action that is not supported in most wallets. It is recommended to have a fallback mechanism if using this in production. -::: + ## Import ```ts -import { getCapabilities } from '@wagmi/core/experimental' +import { getCapabilities } from '@wagmi/core' ``` ## Usage ::: code-group ```ts [index.ts] -import { getCapabilities } from '@wagmi/core/experimental' +import { getCapabilities } from '@wagmi/core' import { config } from './config' const capabilities = await getCapabilities(config) @@ -35,7 +33,7 @@ const capabilities = await getCapabilities(config) ## Parameters ```ts -import { type GetCapabilitiesParameters } from '@wagmi/core/experimental' +import { type GetCapabilitiesParameters } from '@wagmi/core' ``` ### account @@ -46,7 +44,7 @@ Fetch capabilities for the provided account. ::: code-group ```ts [index.ts] -import { getCapabilities } from '@wagmi/core/experimental' +import { getCapabilities } from '@wagmi/core' import { config } from './config' const capabilities = await getCapabilities(config, { @@ -64,7 +62,7 @@ Connector to get capabilities from. ::: code-group ```ts [index.ts] -import { getConnections, getCapabilities } from '@wagmi/core/experimental' +import { getConnections, getCapabilities } from '@wagmi/core' import { config } from './config' const connections = getConnections(config) @@ -78,7 +76,7 @@ const capabilities = await getCapabilities(config, { ## Return Type ```ts -import { type GetCapabilitiesReturnType } from '@wagmi/core/experimental' +import { type GetCapabilitiesReturnType } from '@wagmi/core' ``` `bigint` @@ -88,7 +86,7 @@ Most recent block number seen. ## Error ```ts -import { type GetCapabilitiesErrorType } from '@wagmi/core/experimental' +import { type GetCapabilitiesErrorType } from '@wagmi/core' ``` diff --git a/site/core/api/actions/sendCalls.md b/site/core/api/actions/sendCalls.md index 6707802f20..8e65890e5e 100644 --- a/site/core/api/actions/sendCalls.md +++ b/site/core/api/actions/sendCalls.md @@ -1,5 +1,5 @@ @@ -10,14 +10,12 @@ Action that requests for the wallet to sign and broadcast a batch of calls (tran [Read more.](https://github.com/ethereum/EIPs/blob/815028dc634463e1716fc5ce44c019a6040f0bef/EIPS/eip-5792.md#wallet_sendcalls) -::: warning -This is an experimental action that is not supported in most wallets. It is recommended to have a fallback mechanism if using this in production. -::: + ## Import ```ts -import { sendCalls } from '@wagmi/core/experimental' +import { sendCalls } from '@wagmi/core' ``` ## Usage @@ -25,7 +23,7 @@ import { sendCalls } from '@wagmi/core/experimental' ::: code-group ```ts [index.ts] import { parseEther } from 'viem' -import { sendCalls } from '@wagmi/core/experimental' +import { sendCalls } from '@wagmi/core' import { config } from './config' const id = await sendCalls(config, { @@ -47,7 +45,7 @@ const id = await sendCalls(config, { ## Parameters ```ts -import { type SendCallsParameters } from '@wagmi/core/experimental' +import { type SendCallsParameters } from '@wagmi/core' ``` ### account @@ -61,7 +59,7 @@ If set to `null`, it is assumed that the wallet will handle filling the sender o ::: code-group ```ts [index.ts] import { parseEther } from 'viem' -import { sendCalls } from '@wagmi/core/experimental' +import { sendCalls } from '@wagmi/core' import { config } from './config' const id = await sendCalls(config, { @@ -90,7 +88,7 @@ Calls to execute. ::: code-group ```ts [index.ts] import { parseEther } from 'viem' -import { sendCalls } from '@wagmi/core/experimental' +import { sendCalls } from '@wagmi/core' import { config } from './config' const id = await sendCalls(config, { @@ -118,7 +116,7 @@ Capability metadata for the calls (e.g. specifying a paymaster). ::: code-group ```ts [index.ts] import { parseEther } from 'viem' -import { sendCalls } from '@wagmi/core/experimental' +import { sendCalls } from '@wagmi/core' import { config } from './config' const id = await sendCalls(config, { @@ -151,7 +149,7 @@ The target chain ID to broadcast the calls. ::: code-group ```ts [index.ts] import { parseEther } from 'viem' -import { sendCalls } from '@wagmi/core/experimental' +import { sendCalls } from '@wagmi/core' import { config } from './config' const id = await sendCalls(config, { @@ -181,7 +179,7 @@ Connector to get send the calls with. ```ts [index.ts] import { parseEther } from 'viem' import { getConnections } from '@wagmi/core' -import { sendCalls } from '@wagmi/core/experimental' +import { sendCalls } from '@wagmi/core' import { config } from './config' const connections = getConnections(config) @@ -205,7 +203,7 @@ const id = await sendCalls(config, { ## Return Type ```ts -import { type SendCallsReturnType } from '@wagmi/core/experimental' +import { type SendCallsReturnType } from '@wagmi/core' ``` `bigint` @@ -215,7 +213,7 @@ Most recent block number seen. ## Error ```ts -import { type SendCallsErrorType } from '@wagmi/core/experimental' +import { type SendCallsErrorType } from '@wagmi/core' ``` diff --git a/site/core/api/actions/showCallsStatus.md b/site/core/api/actions/showCallsStatus.md index dba02841ff..c47d1fb88d 100644 --- a/site/core/api/actions/showCallsStatus.md +++ b/site/core/api/actions/showCallsStatus.md @@ -1,5 +1,5 @@ @@ -10,21 +10,19 @@ Action to request for the wallet to show information about a call batch that was [Read more.](https://github.com/ethereum/EIPs/blob/1663ea2e7a683285f977eda51c32cec86553f585/EIPS/eip-5792.md#wallet_showcallsstatus) -::: warning -This is an experimental action that is not supported in most wallets. It is recommended to have a fallback mechanism if using this in production. -::: + ## Import ```ts -import { showCallsStatus } from '@wagmi/core/experimental' +import { showCallsStatus } from '@wagmi/core' ``` ## Usage ::: code-group ```ts [index.ts] -import { showCallsStatus } from '@wagmi/core/experimental' +import { showCallsStatus } from '@wagmi/core' import { config } from './config' await showCallsStatus(config, { @@ -37,7 +35,7 @@ await showCallsStatus(config, { ## Parameters ```ts -import { type ShowCallsStatusParameters } from '@wagmi/core/experimental' +import { type ShowCallsStatusParameters } from '@wagmi/core' ``` ### connector @@ -48,7 +46,7 @@ Connector to show call statuses with. ::: code-group ```ts [index.ts] -import { getConnections, showCallsStatus } from '@wagmi/core/experimental' +import { getConnections, showCallsStatus } from '@wagmi/core' import { config } from './config' const connections = getConnections(config) @@ -68,7 +66,7 @@ Identifier of the call batch. ::: code-group ```ts [index.ts] -import { showCallsStatus } from '@wagmi/core/experimental' +import { showCallsStatus } from '@wagmi/core' import { config } from './config' await showCallsStatus(config, { @@ -81,7 +79,7 @@ await showCallsStatus(config, { ## Return Type ```ts -import { type ShowCallsStatusReturnType } from '@wagmi/core/experimental' +import { type ShowCallsStatusReturnType } from '@wagmi/core' ``` `bigint` @@ -91,7 +89,7 @@ Most recent block number seen. ## Error ```ts -import { type ShowCallsStatusErrorType } from '@wagmi/core/experimental' +import { type ShowCallsStatusErrorType } from '@wagmi/core' ``` diff --git a/site/core/api/actions/waitForCallsStatus.md b/site/core/api/actions/waitForCallsStatus.md index a6739d3a4b..8261801046 100644 --- a/site/core/api/actions/waitForCallsStatus.md +++ b/site/core/api/actions/waitForCallsStatus.md @@ -1,5 +1,5 @@ @@ -8,14 +8,12 @@ const typeName = 'WaitForCallsStatus' Waits for a call bundle to be confirmed & included on a block before returning the status & receipts. -::: warning -This is an experimental action that is not supported in most wallets. It is recommended to have a fallback mechanism if using this in production. -::: + ## Import ```ts -import { waitForCallsStatus } from '@wagmi/core/experimental' +import { waitForCallsStatus } from '@wagmi/core' ``` ## Usage @@ -23,7 +21,7 @@ import { waitForCallsStatus } from '@wagmi/core/experimental' ::: code-group ```ts [index.ts] import { parseEther } from 'viem' -import { sendCalls, waitForCallsStatus } from '@wagmi/core/experimental' +import { sendCalls, waitForCallsStatus } from '@wagmi/core' import { config } from './config' const id = await sendCalls(config, { @@ -43,7 +41,7 @@ const { status, receipts } = await waitForCallsStatus(config, { // [!code focus] ## Parameters ```ts -import { type WaitForCallsStatusParameters } from '@wagmi/core/experimental' +import { type WaitForCallsStatusParameters } from '@wagmi/core' ``` ### connector @@ -54,7 +52,7 @@ Connector to get call statuses with. ::: code-group ```ts [index.ts] -import { getConnections, waitForCallsStatus } from '@wagmi/core/experimental' +import { getConnections, waitForCallsStatus } from '@wagmi/core' import { config } from './config' const connections = getConnections(config) @@ -74,7 +72,7 @@ Identifier of the call batch. ::: code-group ```ts [index.ts] -import { waitForCallsStatus } from '@wagmi/core/experimental' +import { waitForCallsStatus } from '@wagmi/core' import { config } from './config' const status = await waitForCallsStatus(config, { @@ -92,7 +90,7 @@ Polling interval in milliseconds. ::: code-group ```ts [index.ts] -import { waitForCallsStatus } from '@wagmi/core/experimental' +import { waitForCallsStatus } from '@wagmi/core' import { config } from './config' const status = await waitForCallsStatus(config, { @@ -111,7 +109,7 @@ Timeout in milliseconds before `waitForCallsStatus` stops polling. ::: code-group ```ts [index.ts] -import { waitForCallsStatus } from '@wagmi/core/experimental' +import { waitForCallsStatus } from '@wagmi/core' import { config } from './config' const status = await waitForCallsStatus(config, { @@ -125,7 +123,7 @@ const status = await waitForCallsStatus(config, { ## Return Type ```ts -import { type WaitForCallsStatusReturnType } from '@wagmi/core/experimental' +import { type WaitForCallsStatusReturnType } from '@wagmi/core' ``` `{ status: 'PENDING' | 'CONFIRMED', receipts: TransactionReceipt[] }` @@ -135,7 +133,7 @@ The status and receipts of the call batch. ## Error ```ts -import { type WaitForCallsStatusErrorType } from '@wagmi/core/experimental' +import { type WaitForCallsStatusErrorType } from '@wagmi/core' ``` diff --git a/site/core/api/actions/writeContracts.md b/site/core/api/actions/writeContracts.md index c782330707..a6afe42ff6 100644 --- a/site/core/api/actions/writeContracts.md +++ b/site/core/api/actions/writeContracts.md @@ -10,9 +10,7 @@ Action that requests for the wallet to sign and broadcast a batch of write contr [Read more.](https://github.com/ethereum/EIPs/blob/815028dc634463e1716fc5ce44c019a6040f0bef/EIPS/eip-5792.md#wallet_sendcalls) -::: warning -This is an experimental action that is not supported in most wallets. It is recommended to have a fallback mechanism if using this in production. -::: + ## Import diff --git a/site/react/api/hooks/useCallsStatus.md b/site/react/api/hooks/useCallsStatus.md index 94b333b7c7..48135c53eb 100644 --- a/site/react/api/hooks/useCallsStatus.md +++ b/site/react/api/hooks/useCallsStatus.md @@ -4,7 +4,7 @@ description: Hook for fetching the number of the most recent block seen. --- + + \ No newline at end of file diff --git a/site/react/api/connectors/baseAccount.md b/site/react/api/connectors/baseAccount.md new file mode 100644 index 0000000000..032d853374 --- /dev/null +++ b/site/react/api/connectors/baseAccount.md @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/site/shared/connectors/baseAccount.md b/site/shared/connectors/baseAccount.md new file mode 100644 index 0000000000..24e9eb7990 --- /dev/null +++ b/site/shared/connectors/baseAccount.md @@ -0,0 +1,74 @@ + + +# baseAccount + +Connector for the [Base Account SDK](https://github.com/base/account-sdk). + +## Import + +```ts-vue +import { baseAccount } from '{{connectorsPackageName}}' +``` + +## Usage + +```ts-vue +import { createConfig, http } from '{{packageName}}' +import { mainnet, sepolia } from '{{packageName}}/chains' +import { baseAccount } from '{{connectorsPackageName}}' // [!code hl] + +export const config = createConfig({ + chains: [mainnet, sepolia], + connectors: [baseAccount()], // [!code hl] + transports: { + [mainnet.id]: http(), + [sepolia.id]: http(), + }, +}) +``` + +:::warning +Before going to production, it is highly recommended to set an [`appName`](#appname) and [`appLogoUrl`](#applogourl) for your application that can be displayed upon connection to the wallet. +::: + +## Parameters + +```ts-vue +import { type baseAccountParameters } from '{{connectorsPackageName}}' +``` + +Check out the [Base Account SDK docs](https://www.base.org/build/base-account) for more info. + +### appName + +`string` + +Application name. + +```ts-vue +import { baseAccount } from '{{connectorsPackageName}}' + +const connector = baseAccount({ + appName: 'My Wagmi App', // [!code focus] +}) +``` + +### appLogoUrl + +`string | null | undefined` + +Application logo image URL; favicon is used if unspecified. + +```ts-vue +import { baseAccount } from '{{connectorsPackageName}}' + +const connector = baseAccount({ + appName: 'My Wagmi App', + appLogoUrl: 'https://example.com/myLogoUrl.png', // [!code focus] +}) +``` + + diff --git a/site/vue/api/connectors/baseAccount.md b/site/vue/api/connectors/baseAccount.md new file mode 100644 index 0000000000..6975f4c516 --- /dev/null +++ b/site/vue/api/connectors/baseAccount.md @@ -0,0 +1,6 @@ + + + \ No newline at end of file From 953013f6a916aa8e9718773bd2bc3bcc7f71f45b Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Sat, 19 Jul 2025 16:27:43 +0200 Subject: [PATCH 041/213] chore: up changeset --- .changeset/pink-cows-rhyme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.changeset/pink-cows-rhyme.md b/.changeset/pink-cows-rhyme.md index b4158694a7..ac7e76d4de 100644 --- a/.changeset/pink-cows-rhyme.md +++ b/.changeset/pink-cows-rhyme.md @@ -1,5 +1,8 @@ --- "@wagmi/connectors": minor +"@wagmi/core": minor +"@wagmi/vue": minor +"wagmi": minor --- Added `baseAccount` connector. From 07fa7cb6d9d578c17ecad23d79e0960a31154a14 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 19 Jul 2025 16:42:36 +0200 Subject: [PATCH 042/213] chore: version packages (#4736) * chore: version packages * Update CHANGELOG.md * Update package.json * Update CHANGELOG.md * Update package.json * Update version.ts * Update version.ts --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: jxom <7336481+jxom@users.noreply.github.com> --- .changeset/pink-cows-rhyme.md | 8 -------- packages/connectors/CHANGELOG.md | 11 +++++++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/core/src/version.ts | 2 +- packages/react/CHANGELOG.md | 12 ++++++++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 12 ++++++++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 13 files changed, 49 insertions(+), 16 deletions(-) delete mode 100644 .changeset/pink-cows-rhyme.md diff --git a/.changeset/pink-cows-rhyme.md b/.changeset/pink-cows-rhyme.md deleted file mode 100644 index ac7e76d4de..0000000000 --- a/.changeset/pink-cows-rhyme.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@wagmi/connectors": minor -"@wagmi/core": minor -"@wagmi/vue": minor -"wagmi": minor ---- - -Added `baseAccount` connector. diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 154f7e293f..e6721b7dca 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,16 @@ # @wagmi/connectors +## 5.9.0 + +### Minor Changes + +- [#4734](https://github.com/wevm/wagmi/pull/4734) [`eac550ae5b49f96a7e3404a6d88adc62d3889013`](https://github.com/wevm/wagmi/commit/eac550ae5b49f96a7e3404a6d88adc62d3889013) Thanks [@jxom](https://github.com/jxom)! - Added `baseAccount` connector. + +### Patch Changes + +- Updated dependencies [[`eac550ae5b49f96a7e3404a6d88adc62d3889013`](https://github.com/wevm/wagmi/commit/eac550ae5b49f96a7e3404a6d88adc62d3889013)]: + - @wagmi/core@2.18.0 + ## 5.8.6 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 4965c41bee..70069bbedd 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "5.8.6", + "version": "5.9.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index cc06d6963f..763146bbcf 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '5.8.6' +export const version = '5.9.0' diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index d5e4cfebcb..5ce52471a7 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/core +## 2.18.0 + +### Minor Changes + +- [#4734](https://github.com/wevm/wagmi/pull/4734) [`eac550ae5b49f96a7e3404a6d88adc62d3889013`](https://github.com/wevm/wagmi/commit/eac550ae5b49f96a7e3404a6d88adc62d3889013) Thanks [@jxom](https://github.com/jxom)! - Added `baseAccount` connector. + ## 2.17.3 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 53b47faaa1..bb55f8bef9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/core", "description": "VanillaJS library for Ethereum", - "version": "2.17.3", + "version": "2.18.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/core/src/version.ts b/packages/core/src/version.ts index 6f4070650a..8bbbbfc3d7 100644 --- a/packages/core/src/version.ts +++ b/packages/core/src/version.ts @@ -1 +1 @@ -export const version = '2.17.3' +export const version = '2.18.0' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index ab1337ad39..b47d59ca4b 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,17 @@ # wagmi +## 2.16.0 + +### Minor Changes + +- [#4734](https://github.com/wevm/wagmi/pull/4734) [`eac550ae5b49f96a7e3404a6d88adc62d3889013`](https://github.com/wevm/wagmi/commit/eac550ae5b49f96a7e3404a6d88adc62d3889013) Thanks [@jxom](https://github.com/jxom)! - Added `baseAccount` connector. + +### Patch Changes + +- Updated dependencies [[`eac550ae5b49f96a7e3404a6d88adc62d3889013`](https://github.com/wevm/wagmi/commit/eac550ae5b49f96a7e3404a6d88adc62d3889013)]: + - @wagmi/connectors@6.0.0 + - @wagmi/core@2.18.0 + ## 2.15.7 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 65006dc244..0b62afbaaa 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.15.7", + "version": "2.16.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index 695564003b..a394cd69f1 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.15.7' +export const version = '2.16.0' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index 8fced4fa03..c40a5858c1 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,17 @@ # @wagmi/vue +## 0.1.24 + +### Minor Changes + +- [#4734](https://github.com/wevm/wagmi/pull/4734) [`eac550ae5b49f96a7e3404a6d88adc62d3889013`](https://github.com/wevm/wagmi/commit/eac550ae5b49f96a7e3404a6d88adc62d3889013) Thanks [@jxom](https://github.com/jxom)! - Added `baseAccount` connector. + +### Patch Changes + +- Updated dependencies [[`eac550ae5b49f96a7e3404a6d88adc62d3889013`](https://github.com/wevm/wagmi/commit/eac550ae5b49f96a7e3404a6d88adc62d3889013)]: + - @wagmi/connectors@6.0.0 + - @wagmi/core@2.18.0 + ## 0.1.23 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index f84a16d2a6..4078ff4b1e 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.1.23", + "version": "0.1.24", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index ad0451dd61..9ab8d86ed7 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.1.23' +export const version = '0.1.24' From 6fbafd425e488dbeee8404162dbeb3c737eeb8cf Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Tue, 29 Jul 2025 21:35:53 +0100 Subject: [PATCH 043/213] feat: up `@base-org/account` --- .changeset/heavy-lemons-teach.md | 5 +++++ packages/connectors/package.json | 2 +- pnpm-lock.yaml | 17 +++++------------ 3 files changed, 11 insertions(+), 13 deletions(-) create mode 100644 .changeset/heavy-lemons-teach.md diff --git a/.changeset/heavy-lemons-teach.md b/.changeset/heavy-lemons-teach.md new file mode 100644 index 0000000000..a7d366a75c --- /dev/null +++ b/.changeset/heavy-lemons-teach.md @@ -0,0 +1,5 @@ +--- +"@wagmi/connectors": patch +--- + +Updated `@base-org/account` diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 70069bbedd..a754cfc50e 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -45,7 +45,7 @@ } }, "dependencies": { - "@base-org/account": "1.0.2", + "@base-org/account": "1.1.1", "@coinbase/wallet-sdk": "4.3.6", "@metamask/sdk": "0.32.0", "@safe-global/safe-apps-provider": "0.18.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index adbca96674..97d882ae5a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -172,8 +172,8 @@ importers: packages/connectors: dependencies: '@base-org/account': - specifier: 1.0.2 - version: 1.0.2(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.8.3)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(wagmi@packages+react)(zod@3.22.4) + specifier: 1.1.1 + version: 1.1.1(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.8.3)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.22.4) '@coinbase/wallet-sdk': specifier: 4.3.6 version: 4.3.6(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.8.3)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.22.4) @@ -933,13 +933,8 @@ packages: resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} - '@base-org/account@1.0.2': - resolution: {integrity: sha512-jVRmMgGWQSqL4EiKoj5koXPNnTbdf4a5h+ljRU0hL8wzbGJ0hM/ZyFm/j5VNrFAX5dLLmBoa9Tf+RRwyfTvdvQ==} - peerDependencies: - wagmi: '*' - peerDependenciesMeta: - wagmi: - optional: true + '@base-org/account@1.1.1': + resolution: {integrity: sha512-IfVJPrDPhHfqXRDb89472hXkpvJuQQR7FDI9isLPHEqSYt/45whIoBxSPgZ0ssTt379VhQo4+87PWI1DoLSfAQ==} '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} @@ -8800,7 +8795,7 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 - '@base-org/account@1.0.2(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.8.3)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(wagmi@packages+react)(zod@3.22.4)': + '@base-org/account@1.1.1(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.8.3)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: '@noble/hashes': 1.4.0 clsx: 1.2.1 @@ -8810,8 +8805,6 @@ snapshots: preact: 10.24.2 viem: 2.31.7(bufferutil@4.0.8)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.22.4) zustand: 5.0.3(@types/react@18.3.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) - optionalDependencies: - wagmi: link:packages/react transitivePeerDependencies: - '@types/react' - bufferutil From edd084be2be4a2e39442a5d14884617986c83dcb Mon Sep 17 00:00:00 2001 From: tmm Date: Wed, 30 Jul 2025 15:33:51 -0400 Subject: [PATCH 044/213] feat: upgrade vitest, biome (#4740) * refactor: up vitest * chore: up tests * chore: up pnpm catalog * ci: install playwright * chore: template tweaks * test: bump timeout --- .github/workflows/verify.yml | 3 + biome.json | 51 +- package.json | 60 +- packages/cli/package.json | 23 +- packages/cli/src/exports/config.test.ts | 2 +- packages/cli/src/exports/config.ts | 10 +- packages/cli/src/exports/index.ts | 2 +- packages/cli/src/exports/plugins.ts | 16 +- packages/cli/src/logger.ts | 5 +- packages/cli/src/plugins/blockExplorer.ts | 4 +- packages/cli/src/plugins/foundry.test.ts | 2 +- packages/cli/src/plugins/hardhat.test.ts | 4 +- packages/cli/src/plugins/sourcify.test.ts | 18 +- packages/cli/src/utils/loadEnv.ts | 10 +- packages/cli/test/setup.ts | 3 +- packages/cli/test/utils.ts | 11 +- packages/connectors/package.json | 5 +- packages/connectors/src/baseAccount.ts | 6 +- packages/connectors/src/coinbaseWallet.ts | 6 +- packages/connectors/src/exports/index.test.ts | 2 +- packages/connectors/src/exports/index.ts | 4 +- packages/connectors/src/metaMask.ts | 8 +- packages/connectors/src/safe.ts | 2 +- packages/connectors/src/walletConnect.test.ts | 2 +- packages/connectors/src/walletConnect.ts | 10 +- packages/core/package.json | 38 +- .../codegen/createSimulateContract.test-d.ts | 2 +- .../core/src/actions/estimateFeesPerGas.ts | 3 +- packages/core/src/actions/getBalance.ts | 2 +- packages/core/src/actions/getBlock.test-d.ts | 2 +- packages/core/src/actions/getClient.ts | 8 +- .../getTransactionConfirmations.test-d.ts | 3 +- .../src/actions/getTransactionCount.test.ts | 3 +- .../src/actions/getWalletClient.test-d.ts | 3 +- .../actions/prepareTransactionRequest.test.ts | 3 +- packages/core/src/actions/readContract.ts | 3 +- .../core/src/actions/sendTransaction.test.ts | 3 +- .../core/src/actions/signTypedData.test.ts | 3 +- .../src/actions/simulateContract.test-d.ts | 2 +- .../core/src/actions/watchBlockNumber.test.ts | 7 +- packages/core/src/actions/watchBlockNumber.ts | 3 +- packages/core/src/actions/watchBlocks.test.ts | 10 +- packages/core/src/actions/watchBlocks.ts | 3 +- .../src/actions/watchContractEvent.test.ts | 2 +- .../core/src/actions/writeContract.test-d.ts | 2 +- packages/core/src/connectors/injected.ts | 4 +- packages/core/src/connectors/mock.test.ts | 14 +- packages/core/src/connectors/mock.ts | 12 +- packages/core/src/createConfig.test-d.ts | 4 +- packages/core/src/createConfig.test.ts | 2 +- packages/core/src/createConfig.ts | 17 +- packages/core/src/createStorage.test-d.ts | 3 +- packages/core/src/exports/actions.test.ts | 10 +- packages/core/src/exports/actions.ts | 69 +- packages/core/src/exports/codegen.test.ts | 2 +- packages/core/src/exports/codegen.ts | 11 +- packages/core/src/exports/experimental.ts | 37 +- packages/core/src/exports/index.test.ts | 16 +- packages/core/src/exports/index.ts | 103 +- packages/core/src/exports/internal.test.ts | 2 +- packages/core/src/exports/internal.ts | 8 +- packages/core/src/exports/query.test.ts | 8 +- packages/core/src/exports/query.ts | 63 +- packages/core/src/query/call.test.ts | 3 +- packages/core/src/query/connect.ts | 3 +- packages/core/src/query/estimateGas.test-d.ts | 2 +- packages/core/src/query/getFeeHistory.test.ts | 4 +- .../core/src/query/getTransactionReceipt.ts | 3 +- packages/core/src/query/readContracts.ts | 6 +- .../core/src/query/simulateContract.test-d.ts | 2 +- packages/core/src/query/utils.ts | 8 +- .../core/src/transports/connector.test.ts | 16 +- packages/core/src/transports/connector.ts | 4 +- packages/core/src/types/register.ts | 2 +- packages/core/src/utils/cookie.ts | 2 + packages/core/src/utils/deepEqual.ts | 5 +- packages/create-wagmi/package.json | 15 +- packages/create-wagmi/src/cli.ts | 14 +- .../create-wagmi/templates/next/src/wagmi.ts | 2 +- packages/create-wagmi/templates/nuxt/wagmi.ts | 2 +- .../templates/vite-react/biome.json | 13 - .../templates/vite-react/package.json | 2 - .../templates/vite-react/src/main.tsx | 2 +- .../templates/vite-react/src/wagmi.ts | 2 +- .../templates/vite-vanilla/src/main.ts | 2 +- .../templates/vite-vanilla/src/wagmi.ts | 2 +- .../templates/vite-vue/biome.json | 13 - .../templates/vite-vue/package.json | 1 - .../templates/vite-vue/src/main.ts | 2 +- .../templates/vite-vue/src/wagmi.ts | 2 +- packages/react/package.json | 31 +- packages/react/src/context.test.tsx | 37 +- .../hooks/useWriteContracts.test.ts | 8 +- packages/react/src/exports/actions.test.ts | 26 +- .../src/exports/actions/experimental.test.ts | 14 +- packages/react/src/exports/codegen.test.ts | 8 +- packages/react/src/exports/codegen.ts | 11 +- packages/react/src/exports/connectors.test.ts | 6 +- packages/react/src/exports/experimental.ts | 21 +- packages/react/src/exports/index.test.ts | 78 +- packages/react/src/exports/index.ts | 132 +- packages/react/src/exports/query.test.ts | 22 +- .../codegen/createUseReadContract.test.ts | 16 +- .../codegen/createUseSimulateContract.test.ts | 16 +- .../createUseWatchContractEvent.test-d.ts | 2 +- packages/react/src/hooks/useAccount.test.ts | 11 +- packages/react/src/hooks/useAccount.ts | 2 +- .../react/src/hooks/useAccountEffect.test.ts | 26 +- packages/react/src/hooks/useBalance.test.ts | 30 +- packages/react/src/hooks/useBalance.ts | 2 +- packages/react/src/hooks/useBlock.test-d.ts | 2 +- packages/react/src/hooks/useBlock.test.ts | 16 +- .../react/src/hooks/useBlockNumber.test-d.ts | 2 +- .../react/src/hooks/useBlockNumber.test.ts | 18 +- .../hooks/useBlockTransactionCount.test.ts | 24 +- .../react/src/hooks/useBytecode.test-d.ts | 3 +- packages/react/src/hooks/useBytecode.test.ts | 42 +- packages/react/src/hooks/useBytecode.ts | 2 +- packages/react/src/hooks/useCall.test.ts | 20 +- packages/react/src/hooks/useCall.ts | 2 +- .../react/src/hooks/useCallsStatus.test.ts | 16 +- .../react/src/hooks/useCapabilities.test.ts | 20 +- packages/react/src/hooks/useChainId.test.ts | 8 +- packages/react/src/hooks/useChainId.ts | 2 +- packages/react/src/hooks/useChains.test.ts | 8 +- packages/react/src/hooks/useChains.ts | 2 +- packages/react/src/hooks/useClient.test.ts | 12 +- packages/react/src/hooks/useClient.ts | 2 +- packages/react/src/hooks/useConfig.test.ts | 4 +- packages/react/src/hooks/useConfig.ts | 1 + packages/react/src/hooks/useConnect.test.ts | 8 +- .../react/src/hooks/useConnections.test.ts | 8 +- .../src/hooks/useConnectorClient.test.tsx | 98 +- .../react/src/hooks/useConnectors.test.ts | 8 +- packages/react/src/hooks/useConnectors.ts | 2 +- .../react/src/hooks/useDeployContract.test.ts | 8 +- .../react/src/hooks/useDisconnect.test.ts | 8 +- .../react/src/hooks/useEnsAddress.test.ts | 8 +- packages/react/src/hooks/useEnsAvatar.test.ts | 8 +- packages/react/src/hooks/useEnsName.test.ts | 8 +- .../react/src/hooks/useEnsResolver.test.ts | 8 +- packages/react/src/hooks/useEnsText.test.ts | 31 +- .../src/hooks/useEstimateFeesPerGas.test.ts | 8 +- .../react/src/hooks/useEstimateGas.test.ts | 20 +- .../useEstimateMaxPriorityFeePerGas.test.ts | 12 +- .../react/src/hooks/useFeeHistory.test.ts | 62 +- packages/react/src/hooks/useGasPrice.test.ts | 14 +- .../hooks/useInfiniteReadContracts.test.ts | 103 +- .../usePrepareTransactionRequest.test.ts | 8 +- .../src/hooks/usePrepareTransactionRequest.ts | 2 +- packages/react/src/hooks/useProof.test.ts | 38 +- packages/react/src/hooks/useProof.ts | 2 +- .../react/src/hooks/usePublicClient.test.ts | 14 +- packages/react/src/hooks/usePublicClient.ts | 2 +- .../react/src/hooks/useReadContract.test.ts | 24 +- .../react/src/hooks/useReadContracts.test.ts | 12 +- .../react/src/hooks/useReconnect.test-d.ts | 3 +- packages/react/src/hooks/useReconnect.test.ts | 18 +- packages/react/src/hooks/useSendCalls.test.ts | 8 +- .../src/hooks/useSendTransaction.test.ts | 8 +- .../react/src/hooks/useSignMessage.test.ts | 13 +- .../react/src/hooks/useSignTypedData.test.ts | 13 +- .../src/hooks/useSimulateContract.test.ts | 12 +- .../react/src/hooks/useStorageAt.test-d.ts | 3 +- packages/react/src/hooks/useStorageAt.test.ts | 44 +- packages/react/src/hooks/useStorageAt.ts | 2 +- .../src/hooks/useSwitchAccount.test-d.ts | 3 +- .../react/src/hooks/useSwitchAccount.test.ts | 14 +- .../react/src/hooks/useSwitchChain.test-d.ts | 3 +- .../react/src/hooks/useSwitchChain.test.ts | 30 +- .../useSyncExternalStoreWithTracked.test.tsx | 36 +- packages/react/src/hooks/useToken.test.ts | 8 +- .../react/src/hooks/useTransaction.test.ts | 8 +- .../hooks/useTransactionConfirmations.test.ts | 38 +- .../src/hooks/useTransactionCount.test.ts | 26 +- .../src/hooks/useTransactionReceipt.test.ts | 35 +- .../react/src/hooks/useTransactionReceipt.ts | 2 +- .../react/src/hooks/useVerifyMessage.test.ts | 50 +- packages/react/src/hooks/useVerifyMessage.ts | 2 +- .../src/hooks/useVerifyTypedData.test-d.ts | 3 +- .../src/hooks/useVerifyTypedData.test.ts | 47 +- .../react/src/hooks/useVerifyTypedData.ts | 2 +- .../src/hooks/useWaitForCallsStatus.test.ts | 33 +- .../useWaitForTransactionReceipt.test.ts | 12 +- .../react/src/hooks/useWalletClient.test.tsx | 92 +- .../react/src/hooks/useWatchAsset.test.ts | 8 +- .../src/hooks/useWatchBlockNumber.test.ts | 7 +- .../react/src/hooks/useWatchBlocks.test.ts | 11 +- .../src/hooks/useWatchContractEvent.test-d.ts | 2 +- .../src/hooks/useWatchContractEvent.test.ts | 2 +- .../src/hooks/useWriteContract.test-d.ts | 2 +- .../react/src/hooks/useWriteContract.test.ts | 8 +- packages/react/src/hydrate.ts | 2 +- packages/react/src/utils/query.ts | 4 +- packages/test/package.json | 29 +- packages/test/src/chains.ts | 18 +- packages/test/src/clients.ts | 4 +- packages/test/src/constants.ts | 11 +- packages/test/src/exports/index.test.ts | 10 +- packages/test/src/exports/index.ts | 17 +- packages/test/src/exports/react.ts | 54 +- packages/test/src/exports/vue.ts | 4 +- packages/test/src/globalSetup.ts | 2 +- packages/test/src/utils.ts | 5 +- packages/test/src/vite-env.d.ts | 11 + packages/vue/package.json | 25 +- packages/vue/src/composables/useAccount.ts | 4 +- .../src/composables/useAccountEffect.test.ts | 2 +- packages/vue/src/composables/useBalance.ts | 2 +- .../src/composables/useBlockNumber.test-d.ts | 2 +- packages/vue/src/composables/useBytecode.ts | 8 +- packages/vue/src/composables/useChainId.ts | 4 +- packages/vue/src/composables/useChains.ts | 4 +- packages/vue/src/composables/useClient.ts | 4 +- .../vue/src/composables/useConnections.ts | 2 +- packages/vue/src/composables/useConnectors.ts | 4 +- packages/vue/src/composables/useDisconnect.ts | 2 +- .../src/composables/useReconnect.test-d.ts | 3 +- .../src/composables/useSignMessage.test.ts | 3 +- .../src/composables/useSignTypedData.test.ts | 3 +- .../src/composables/useSimulateContract.ts | 2 +- .../composables/useSwitchAccount.test-d.ts | 3 +- .../vue/src/composables/useSwitchAccount.ts | 2 +- .../src/composables/useSwitchChain.test-d.ts | 3 +- .../src/composables/useTransactionReceipt.ts | 2 +- .../useWatchContractEvent.test-d.ts | 2 +- .../composables/useWatchContractEvent.test.ts | 2 +- packages/vue/src/exports/actions.test.ts | 10 +- .../src/exports/actions/experimental.test.ts | 6 +- packages/vue/src/exports/connectors.test.ts | 2 +- packages/vue/src/exports/index.test.ts | 38 +- packages/vue/src/exports/index.ts | 119 +- packages/vue/src/exports/query.test.ts | 8 +- packages/vue/src/exports/query.ts | 6 +- packages/vue/src/nuxt/module.ts | 2 +- packages/vue/src/plugin.ts | 2 +- packages/vue/src/types/ref.ts | 4 +- packages/vue/src/utils/cloneDeep.ts | 2 +- packages/vue/src/utils/query.ts | 4 +- patches/prool.patch | 12 + playgrounds/next/src/app/page.tsx | 3 +- playgrounds/next/src/wagmi.ts | 2 +- playgrounds/nuxt/wagmi.ts | 2 +- playgrounds/vite-core/package.json | 2 +- playgrounds/vite-core/src/App.tsx | 5 +- playgrounds/vite-core/src/wagmi.ts | 2 +- playgrounds/vite-react/package.json | 2 +- playgrounds/vite-react/src/App.tsx | 2 +- playgrounds/vite-react/src/main.tsx | 4 +- playgrounds/vite-react/src/wagmi.ts | 4 +- playgrounds/vite-vue/src/main.ts | 2 +- playgrounds/vite-vue/src/wagmi.ts | 2 +- pnpm-lock.yaml | 1517 ++++++++++------- pnpm-workspace.yaml | 3 +- scripts/updateViemVersion.ts | 2 +- site/snippets/core/config-chain-properties.ts | 2 +- site/snippets/core/config.ts | 2 +- .../snippets/react/config-chain-properties.ts | 2 +- site/snippets/react/config.ts | 2 +- site/snippets/vue/config-chain-properties.ts | 2 +- site/snippets/vue/config.ts | 2 +- tsconfig.json | 4 +- vitest.config.ts | 91 + vitest.workspace.ts | 85 - 264 files changed, 2583 insertions(+), 2367 deletions(-) delete mode 100644 packages/create-wagmi/templates/vite-react/biome.json delete mode 100644 packages/create-wagmi/templates/vite-vue/biome.json create mode 100644 packages/test/src/vite-env.d.ts create mode 100644 patches/prool.patch delete mode 100644 vitest.workspace.ts diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index bda6887575..d06333d217 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -111,6 +111,9 @@ jobs: with: version: nightly + - name: Install Playwright + run: pnpx playwright@1.54.1 install --with-deps + - name: Run tests uses: nick-fields/retry@v3 with: diff --git a/biome.json b/biome.json index ce99662cb0..7bca8dda05 100644 --- a/biome.json +++ b/biome.json @@ -1,7 +1,12 @@ { "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", "files": { - "ignore": ["CHANGELOG.md", "pnpm-lock.yaml", "tsconfig.base.json"] + "includes": [ + "**", + "!**/CHANGELOG.md", + "!**/pnpm-lock.yaml", + "!**/tsconfig.base.json" + ] }, "formatter": { "enabled": true, @@ -11,7 +16,7 @@ "lineWidth": 80 }, "linter": { - "ignore": ["packages/create-wagmi/templates/*"], + "includes": ["**", "!**/packages/create-wagmi/templates/**/*"], "enabled": true, "rules": { "recommended": true, @@ -29,13 +34,26 @@ }, "style": { "noNonNullAssertion": "off", - "useShorthandArrayType": "error" + "noParameterAssign": "error", + "useAsConstAssertion": "error", + "useDefaultParameterLast": "error", + "useEnumInitializers": "error", + "useSelfClosingElements": "error", + "useSingleVarDeclarator": "error", + "noUnusedTemplateLiteral": "error", + "useNumberNamespace": "error", + "noInferrableTypes": "error", + "noUselessElse": "error", + "useConsistentArrayType": { + "level": "error", + "options": { "syntax": "shorthand" } + } }, "suspicious": { "noArrayIndexKey": "off", "noConfusingVoidType": "off", - "noConsoleLog": "error", - "noExplicitAny": "off" + "noExplicitAny": "off", + "noConsole": { "level": "error", "options": { "allow": ["log"] } } } } }, @@ -46,32 +64,41 @@ "semicolons": "asNeeded" } }, - "organizeImports": { - "enabled": true - }, + "assist": { "actions": { "source": { "organizeImports": "on" } } }, "overrides": [ { - "include": ["*.vue"], + "includes": ["**/*.vue"], "linter": { "rules": { "correctness": { + "noUnusedImports": "off", "noUnusedVariables": "off" } } } }, { - "include": ["./scripts/**/*.ts"], + "includes": ["site/snippets/**"], + "linter": { + "rules": { + "correctness": { + "noUnusedImports": "off" + } + } + } + }, + { + "includes": ["scripts/**/*.ts"], "linter": { "rules": { "suspicious": { - "noConsoleLog": "off" + "noConsole": { "level": "off", "options": { "allow": ["log"] } } } } } }, { - "include": ["./playgrounds/**"], + "includes": ["playgrounds/**"], "linter": { "rules": { "style": { diff --git a/package.json b/package.json index 8a76b74387..0c4f76e2c6 100644 --- a/package.json +++ b/package.json @@ -42,22 +42,28 @@ }, "devDependencies": { "@arethetypeswrong/cli": "^0.16.4", - "@biomejs/biome": "^1.9.4", + "@biomejs/biome": "^2.0.6", "@changesets/changelog-github": "0.4.6", "@changesets/cli": "^2.27.8", "@types/bun": "^1.1.10", - "@vitest/coverage-v8": "^2.1.1", + "@vitejs/plugin-react": "catalog:", + "@vitest/browser": "^3.2.4", + "@vitest/coverage-v8": "^3.2.4", "@wagmi/test": "workspace:*", "bun": "^1.1.29", - "happy-dom": "^15.7.4", + "happy-dom": "^18.0.1", "knip": "^5.30.6", - "prool": "^0.0.23", + "playwright": "1.54.1", + "prool": "^0.0.24", "publint": "^0.2.11", + "react": "catalog:", + "react-dom": "catalog:", "sherif": "^1.0.0", "simple-git-hooks": "^2.11.1", "typescript": "5.8.3", "viem": "2.31.7", - "vitest": "^2.1.1" + "vitest": "^3.2.4", + "vitest-browser-react": "^2.0.0-beta.1" }, "packageManager": "pnpm@9.11.0", "pnpm": { @@ -68,6 +74,9 @@ "react-native", "search-insights" ] + }, + "patchedDependencies": { + "prool": "patches/prool.patch" } }, "engines": { @@ -77,32 +86,39 @@ "pre-commit": "pnpm check" }, "knip": { - "ignore": ["**/templates/**", "**/hardhat.config.js"], - "ignoreBinaries": ["only-allow"], + "ignore": [ + "**/templates/**", + "**/hardhat.config.js", + "scripts/**" + ], "ignoreWorkspaces": [ "packages/register-tests/**", "packages/test", - "playgrounds/**" + "playgrounds/**", + "site/**" ], "workspaces": { - ".": { - "project": "scripts/*.ts" - }, "packages/cli": { "entry": [ "src/cli.ts!", "src/exports/{config,index,plugins}.ts!", "types/*.d.ts!" ], - "ignore": ["test/{constants,setup,utils}.ts"] + "ignore": [ + "test/{constants,setup,utils}.ts" + ] }, "packages/connectors": { "entry": "src/exports/index.ts!" }, "packages/core": { "entry": "src/exports/{actions,chains,codegen,experimental,index,internal,query}.ts!", - "ignore": ["test/setup.ts"], - "ignoreDependencies": ["@tanstack/query-core"] + "ignore": [ + "test/setup.ts" + ], + "ignoreDependencies": [ + "@tanstack/query-core" + ] }, "packages/create-wagmi": { "entry": "src/cli.ts!" @@ -112,7 +128,9 @@ "src/exports/{actions,chains,codegen,connectors,experimental,index,query}.ts!", "src/exports/actions/experimental.ts!" ], - "ignore": ["test/setup.ts"] + "ignore": [ + "test/setup.ts" + ] }, "packages/test": { "entry": [ @@ -125,11 +143,13 @@ "src/exports/{actions,chains,connectors,index,nuxt,query}.ts!", "src/exports/actions/experimental.ts!" ], - "ignore": ["src/nuxt/runtime/*", "test/setup.ts"], - "ignoreDependencies": ["nuxt"] - }, - "site": { - "project": ["**/*.ts", "**/*.tsx"] + "ignore": [ + "src/nuxt/runtime/*", + "test/setup.ts" + ], + "ignoreDependencies": [ + "nuxt" + ] } } } diff --git a/packages/cli/package.json b/packages/cli/package.json index cc375fbddd..12a97fb289 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -50,8 +50,12 @@ }, "typesVersions": { "*": { - "config": ["./dist/types/exports/config.d.ts"], - "plugins": ["./dist/types/exports/plugins.d.ts"] + "config": [ + "./dist/types/exports/config.d.ts" + ], + "plugins": [ + "./dist/types/exports/plugins.d.ts" + ] } }, "peerDependencies": { @@ -88,7 +92,18 @@ "fixturez": "^1.1.0", "msw": "^2.4.9" }, - "contributors": ["awkweb.eth ", "jxom.eth "], + "contributors": [ + "awkweb.eth ", + "jxom.eth " + ], "funding": "https://github.com/sponsors/wevm", - "keywords": ["wagmi", "eth", "ethereum", "dapps", "wallet", "web3", "cli"] + "keywords": [ + "wagmi", + "eth", + "ethereum", + "dapps", + "wallet", + "web3", + "cli" + ] } diff --git a/packages/cli/src/exports/config.test.ts b/packages/cli/src/exports/config.test.ts index c833780ffc..f8154635b2 100644 --- a/packages/cli/src/exports/config.test.ts +++ b/packages/cli/src/exports/config.test.ts @@ -5,8 +5,8 @@ import * as Exports from './config.js' test('exports', () => { expect(Object.keys(Exports)).toMatchInlineSnapshot(` [ - "defineConfig", "defaultConfig", + "defineConfig", ] `) }) diff --git a/packages/cli/src/exports/config.ts b/packages/cli/src/exports/config.ts index b3c4a83ba4..6dea251a10 100644 --- a/packages/cli/src/exports/config.ts +++ b/packages/cli/src/exports/config.ts @@ -1,10 +1,10 @@ // biome-ignore lint/performance/noBarrelFile: entrypoint module export { - type ContractConfig, - type Contract, - type Watch, - type Plugin, type Config, - defineConfig, + type Contract, + type ContractConfig, defaultConfig, + defineConfig, + type Plugin, + type Watch, } from '../config.js' diff --git a/packages/cli/src/exports/index.ts b/packages/cli/src/exports/index.ts index 1c5e624df6..4ab9b10ab3 100644 --- a/packages/cli/src/exports/index.ts +++ b/packages/cli/src/exports/index.ts @@ -1,8 +1,8 @@ // biome-ignore lint/performance/noBarrelFile: entrypoint module export { - defineConfig, type Config, type ContractConfig, + defineConfig, type Plugin, } from '../config.js' diff --git a/packages/cli/src/exports/plugins.ts b/packages/cli/src/exports/plugins.ts index a289b5c576..d527c8e2eb 100644 --- a/packages/cli/src/exports/plugins.ts +++ b/packages/cli/src/exports/plugins.ts @@ -1,27 +1,27 @@ // biome-ignore lint/performance/noBarrelFile: entrypoint module -export { actions, type ActionsConfig } from '../plugins/actions.js' +export { type ActionsConfig, actions } from '../plugins/actions.js' export { - blockExplorer, type BlockExplorerConfig, + blockExplorer, } from '../plugins/blockExplorer.js' -export { etherscan, type EtherscanConfig } from '../plugins/etherscan.js' +export { type EtherscanConfig, etherscan } from '../plugins/etherscan.js' -export { fetch, type FetchConfig } from '../plugins/fetch.js' +export { type FetchConfig, fetch } from '../plugins/fetch.js' export { + type FoundryConfig, foundry, foundryDefaultExcludes, - type FoundryConfig, } from '../plugins/foundry.js' export { + type HardhatConfig, hardhat, hardhatDefaultExcludes, - type HardhatConfig, } from '../plugins/hardhat.js' -export { react, type ReactConfig } from '../plugins/react.js' +export { type ReactConfig, react } from '../plugins/react.js' -export { sourcify, type SourcifyConfig } from '../plugins/sourcify.js' +export { type SourcifyConfig, sourcify } from '../plugins/sourcify.js' diff --git a/packages/cli/src/logger.ts b/packages/cli/src/logger.ts index b56fb9728b..758eb16ed5 100644 --- a/packages/cli/src/logger.ts +++ b/packages/cli/src/logger.ts @@ -9,24 +9,25 @@ function format(args: any[]) { } export function success(...args: any[]) { - // biome-ignore lint/suspicious/noConsoleLog: console.log is used for logging console.log(pc.green(format(args))) } export function info(...args: any[]) { + // biome-ignore lint/suspicious/noConsole: logger console.info(pc.blue(format(args))) } export function log(...args: any[]) { - // biome-ignore lint/suspicious/noConsoleLog: console.log is used for logging console.log(pc.white(format(args))) } export function warn(...args: any[]) { + // biome-ignore lint/suspicious/noConsole: logger console.warn(pc.yellow(format(args))) } export function error(...args: any[]) { + // biome-ignore lint/suspicious/noConsole: logger console.error(pc.red(format(args))) } diff --git a/packages/cli/src/plugins/blockExplorer.ts b/packages/cli/src/plugins/blockExplorer.ts index 2518b6e936..907f072908 100644 --- a/packages/cli/src/plugins/blockExplorer.ts +++ b/packages/cli/src/plugins/blockExplorer.ts @@ -34,9 +34,7 @@ export type BlockExplorerConfig = { * Function to get address from contract config. */ getAddress?: - | ((config: { - address: NonNullable - }) => Address) + | ((config: { address: NonNullable }) => Address) | undefined /** * Name of source. diff --git a/packages/cli/src/plugins/foundry.test.ts b/packages/cli/src/plugins/foundry.test.ts index 75e5ec73ee..9bc794a059 100644 --- a/packages/cli/src/plugins/foundry.test.ts +++ b/packages/cli/src/plugins/foundry.test.ts @@ -12,7 +12,7 @@ afterEach(() => { test('forge not installed', async () => { const dir = f.temp() - expect( + await expect( foundry({ project: dir, forge: { diff --git a/packages/cli/src/plugins/hardhat.test.ts b/packages/cli/src/plugins/hardhat.test.ts index efb416c5e6..108b25abde 100644 --- a/packages/cli/src/plugins/hardhat.test.ts +++ b/packages/cli/src/plugins/hardhat.test.ts @@ -12,7 +12,7 @@ afterEach(() => { test('validate', async () => { const temp = f.temp() - expect( + await expect( hardhat({ project: temp }).validate?.(), ).rejects.toThrowErrorMatchingInlineSnapshot( '[Error: hardhat must be installed to use Hardhat plugin.]', @@ -34,7 +34,7 @@ test('project does not exist', async () => { }) test('contracts', async () => { - expect( + await expect( hardhat({ project: resolve(__dirname, '__fixtures__/hardhat/'), exclude: ['Foo.sol/**'], diff --git a/packages/cli/src/plugins/sourcify.test.ts b/packages/cli/src/plugins/sourcify.test.ts index 842a291147..6ca0ecb536 100644 --- a/packages/cli/src/plugins/sourcify.test.ts +++ b/packages/cli/src/plugins/sourcify.test.ts @@ -1,4 +1,4 @@ -import { http, HttpResponse } from 'msw' +import { HttpResponse, http } from 'msw' import { setupServer } from 'msw/node' import { afterAll, afterEach, beforeAll, expect, test } from 'vitest' @@ -36,8 +36,8 @@ beforeAll(() => server.listen()) afterEach(() => server.resetHandlers()) afterAll(() => server.close()) -test('fetches ABI', () => { - expect( +test('fetches ABI', async () => { + await expect( sourcify({ chainId: chainId, contracts: [{ name: 'DepositContract', address }], @@ -45,8 +45,8 @@ test('fetches ABI', () => { ).resolves.toMatchSnapshot() }) -test('fetches ABI with multichain deployment', () => { - expect( +test('fetches ABI with multichain deployment', async () => { + await expect( sourcify({ chainId: 100, contracts: [ @@ -59,8 +59,8 @@ test('fetches ABI with multichain deployment', () => { ).resolves.toMatchSnapshot() }) -test('fails to fetch for unverified contract', () => { - expect( +test('fails to fetch for unverified contract', async () => { + await expect( sourcify({ chainId: 100, contracts: [{ name: 'DepositContract', address }], @@ -70,8 +70,8 @@ test('fails to fetch for unverified contract', () => { ) }) -test('missing address for chainId', () => { - expect( +test('missing address for chainId', async () => { + await expect( sourcify({ chainId: 1, // @ts-expect-error `chainId` and `keyof typeof contracts[number].address` mismatch diff --git a/packages/cli/src/utils/loadEnv.ts b/packages/cli/src/utils/loadEnv.ts index d7ffa99919..8a1f26c85f 100644 --- a/packages/cli/src/utils/loadEnv.ts +++ b/packages/cli/src/utils/loadEnv.ts @@ -1,15 +1,11 @@ -import { parse } from 'dotenv' -import { expand } from 'dotenv-expand' - import { existsSync, readFileSync, statSync } from 'node:fs' import { dirname, join } from 'node:path' +import { parse } from 'dotenv' +import { expand } from 'dotenv-expand' // https://github.com/vitejs/vite/blob/main/packages/vite/src/node/env.ts#L7 export function loadEnv( - config: { - mode?: string - envDir?: string - } = {}, + config: { mode?: string; envDir?: string } = {}, ): Record { const mode = config.mode if (mode === 'local') { diff --git a/packages/cli/test/setup.ts b/packages/cli/test/setup.ts index d2eed4a5e5..4f926cab74 100644 --- a/packages/cli/test/setup.ts +++ b/packages/cli/test/setup.ts @@ -21,17 +21,16 @@ vi.mock('nanospinner', async (importOriginal) => { return { ...spinner, start(text = initialText) { - // biome-ignore lint/suspicious/noConsoleLog: console.log is used for logging console.log(`- ${text}`) spinner.start(text) currentText = text }, success(text = currentText) { - // biome-ignore lint/suspicious/noConsoleLog: console.log is used for logging console.log(`√ ${text}`) spinner.success(text) }, error(text = currentText) { + // biome-ignore lint/suspicious/noConsole: logging error console.error(`× ${text}`) spinner.error(text) }, diff --git a/packages/cli/test/utils.ts b/packages/cli/test/utils.ts index 4ea6c6051e..27a3ee652a 100644 --- a/packages/cli/test/utils.ts +++ b/packages/cli/test/utils.ts @@ -1,7 +1,7 @@ import { spawnSync } from 'node:child_process' import { cp, mkdir, symlink, writeFile } from 'node:fs/promises' import fixtures from 'fixturez' -import { http, HttpResponse } from 'msw' +import { HttpResponse, http } from 'msw' import * as path from 'pathe' import { vi } from 'vitest' @@ -19,13 +19,7 @@ export async function createFixture< TFiles extends { [filename: string]: string | Json } & { tsconfig?: true }, ->( - config: { - copyNodeModules?: boolean - dir?: string - files?: TFiles - } = {}, -) { +>(config: { copyNodeModules?: boolean; dir?: string; files?: TFiles } = {}) { const dir = config.dir ?? f.temp() await mkdir(dir, { recursive: true }) @@ -130,6 +124,7 @@ export function watchConsole() { } } return { + // biome-ignore lint/suspicious/noConsole: logging debug: console.debug, info: vi.spyOn(console, 'info').mockImplementation(handleOutput('info')), log: vi.spyOn(console, 'log').mockImplementation(handleOutput('log')), diff --git a/packages/connectors/package.json b/packages/connectors/package.json index a754cfc50e..2ee4e53de0 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -57,7 +57,10 @@ "@wagmi/core": "workspace:*", "msw": "^2.4.9" }, - "contributors": ["awkweb.eth ", "jxom.eth "], + "contributors": [ + "awkweb.eth ", + "jxom.eth " + ], "funding": "https://github.com/sponsors/wevm", "keywords": [ "react", diff --git a/packages/connectors/src/baseAccount.ts b/packages/connectors/src/baseAccount.ts index 7212214fe9..35c620c4fa 100644 --- a/packages/connectors/src/baseAccount.ts +++ b/packages/connectors/src/baseAccount.ts @@ -1,4 +1,4 @@ -import type { ProviderInterface, createBaseAccountSDK } from '@base-org/account' +import type { createBaseAccountSDK, ProviderInterface } from '@base-org/account' import { ChainNotConfiguredError, type Connector, @@ -8,12 +8,12 @@ import type { Mutable, Omit } from '@wagmi/core/internal' import { type AddEthereumChainParameter, type Address, + getAddress, type Hex, + numberToHex, type ProviderRpcError, SwitchChainError, UserRejectedRequestError, - getAddress, - numberToHex, } from 'viem' export type BaseAccountParameters = Mutable< diff --git a/packages/connectors/src/coinbaseWallet.ts b/packages/connectors/src/coinbaseWallet.ts index 630c91261e..cf8fea7967 100644 --- a/packages/connectors/src/coinbaseWallet.ts +++ b/packages/connectors/src/coinbaseWallet.ts @@ -1,7 +1,7 @@ import type { + createCoinbaseWalletSDK, Preference, ProviderInterface, - createCoinbaseWalletSDK, } from '@coinbase/wallet-sdk' import { ChainNotConfiguredError, @@ -16,12 +16,12 @@ import type { import { type AddEthereumChainParameter, type Address, + getAddress, type Hex, + numberToHex, type ProviderRpcError, SwitchChainError, UserRejectedRequestError, - getAddress, - numberToHex, } from 'viem' type Version = '3' | '4' diff --git a/packages/connectors/src/exports/index.test.ts b/packages/connectors/src/exports/index.test.ts index 174f8d7155..dff4ee4045 100644 --- a/packages/connectors/src/exports/index.test.ts +++ b/packages/connectors/src/exports/index.test.ts @@ -11,8 +11,8 @@ test('exports', () => { "coinbaseWallet", "metaMask", "safe", - "walletConnect", "version", + "walletConnect", ] `) }) diff --git a/packages/connectors/src/exports/index.ts b/packages/connectors/src/exports/index.ts index ef60d41c15..e06fe1512b 100644 --- a/packages/connectors/src/exports/index.ts +++ b/packages/connectors/src/exports/index.ts @@ -16,10 +16,8 @@ export { export { type MetaMaskParameters, metaMask } from '../metaMask.js' export { type SafeParameters, safe } from '../safe.js' - +export { version } from '../version.js' export { type WalletConnectParameters, walletConnect, } from '../walletConnect.js' - -export { version } from '../version.js' diff --git a/packages/connectors/src/metaMask.ts b/packages/connectors/src/metaMask.ts index 02ab4c3fb3..bc4447c621 100644 --- a/packages/connectors/src/metaMask.ts +++ b/packages/connectors/src/metaMask.ts @@ -7,9 +7,9 @@ import type { import { ChainNotConfiguredError, type Connector, - ProviderNotFoundError, createConnector, extractRpcUrls, + ProviderNotFoundError, } from '@wagmi/core' import type { Compute, @@ -21,16 +21,16 @@ import type { import { type AddEthereumChainParameter, type Address, + getAddress, type Hex, + hexToNumber, + numberToHex, type ProviderConnectInfo, type ProviderRpcError, ResourceUnavailableRpcError, type RpcError, SwitchChainError, UserRejectedRequestError, - getAddress, - hexToNumber, - numberToHex, withRetry, withTimeout, } from 'viem' diff --git a/packages/connectors/src/safe.ts b/packages/connectors/src/safe.ts index 13153e106f..9a96b5d6ba 100644 --- a/packages/connectors/src/safe.ts +++ b/packages/connectors/src/safe.ts @@ -2,8 +2,8 @@ import type { SafeAppProvider } from '@safe-global/safe-apps-provider' import type { Opts } from '@safe-global/safe-apps-sdk' import { type Connector, - ProviderNotFoundError, createConnector, + ProviderNotFoundError, } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' import { getAddress, withTimeout } from 'viem' diff --git a/packages/connectors/src/walletConnect.test.ts b/packages/connectors/src/walletConnect.test.ts index 4e8a74ebfe..960d02a18b 100644 --- a/packages/connectors/src/walletConnect.test.ts +++ b/packages/connectors/src/walletConnect.test.ts @@ -1,5 +1,5 @@ import { config, walletConnectProjectId } from '@wagmi/test' -import { http, HttpResponse } from 'msw' +import { HttpResponse, http } from 'msw' import { setupServer } from 'msw/node' import { afterAll, diff --git a/packages/connectors/src/walletConnect.ts b/packages/connectors/src/walletConnect.ts index fc4f794c1f..c3649b0453 100644 --- a/packages/connectors/src/walletConnect.ts +++ b/packages/connectors/src/walletConnect.ts @@ -1,22 +1,22 @@ import { ChainNotConfiguredError, type Connector, - ProviderNotFoundError, createConnector, extractRpcUrls, + ProviderNotFoundError, } from '@wagmi/core' import type { Compute, ExactPartial, Omit } from '@wagmi/core/internal' import type { EthereumProvider } from '@walletconnect/ethereum-provider' import { type AddEthereumChainParameter, type Address, + getAddress, + numberToHex, type ProviderConnectInfo, type ProviderRpcError, type RpcError, SwitchChainError, UserRejectedRequestError, - getAddress, - numberToHex, } from 'viem' type WalletConnectConnector = Connector & { @@ -311,7 +311,9 @@ export function walletConnect(parameters: WalletConnectParameters) { new Promise((resolve) => { const listener = ({ chainId: currentChainId, - }: { chainId?: number | undefined }) => { + }: { + chainId?: number | undefined + }) => { if (currentChainId === chainId) { config.emitter.off('change', listener) resolve() diff --git a/packages/core/package.json b/packages/core/package.json index bb55f8bef9..a57a425052 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -65,12 +65,24 @@ }, "typesVersions": { "*": { - "actions": ["./dist/types/exports/actions.d.ts"], - "chains": ["./dist/types/exports/chains.d.ts"], - "codegen": ["./dist/types/exports/codegen.d.ts"], - "experimental": ["./dist/types/exports/experimental.d.ts"], - "internal": ["./dist/types/exports/internal.d.ts"], - "query": ["./dist/types/exports/query.d.ts"] + "actions": [ + "./dist/types/exports/actions.d.ts" + ], + "chains": [ + "./dist/types/exports/chains.d.ts" + ], + "codegen": [ + "./dist/types/exports/codegen.d.ts" + ], + "experimental": [ + "./dist/types/exports/experimental.d.ts" + ], + "internal": [ + "./dist/types/exports/internal.d.ts" + ], + "query": [ + "./dist/types/exports/query.d.ts" + ] } }, "peerDependencies": { @@ -94,7 +106,17 @@ "devDependencies": { "@tanstack/query-core": "catalog:" }, - "contributors": ["awkweb.eth ", "jxom.eth "], + "contributors": [ + "awkweb.eth ", + "jxom.eth " + ], "funding": "https://github.com/sponsors/wevm", - "keywords": ["wagmi", "eth", "ethereum", "dapps", "wallet", "web3"] + "keywords": [ + "wagmi", + "eth", + "ethereum", + "dapps", + "wallet", + "web3" + ] } diff --git a/packages/core/src/actions/codegen/createSimulateContract.test-d.ts b/packages/core/src/actions/codegen/createSimulateContract.test-d.ts index 91e5998977..764d3075f9 100644 --- a/packages/core/src/actions/codegen/createSimulateContract.test-d.ts +++ b/packages/core/src/actions/codegen/createSimulateContract.test-d.ts @@ -1,5 +1,5 @@ import { abi, config, mainnet, optimism } from '@wagmi/test' -import { http, type Address } from 'viem' +import { type Address, http } from 'viem' import { celo } from 'viem/chains' import { assertType, expectTypeOf, test } from 'vitest' diff --git a/packages/core/src/actions/estimateFeesPerGas.ts b/packages/core/src/actions/estimateFeesPerGas.ts index 66915f010a..915c65eba9 100644 --- a/packages/core/src/actions/estimateFeesPerGas.ts +++ b/packages/core/src/actions/estimateFeesPerGas.ts @@ -15,8 +15,7 @@ import { import type { Config } from '../createConfig.js' import type { ChainIdParameter } from '../types/properties.js' import type { Unit } from '../types/unit.js' -import type { Compute } from '../types/utils.js' -import type { UnionCompute, UnionLooseOmit } from '../types/utils.js' +import type { Compute, UnionCompute, UnionLooseOmit } from '../types/utils.js' import { getAction } from '../utils/getAction.js' import { getUnit } from '../utils/getUnit.js' diff --git a/packages/core/src/actions/getBalance.ts b/packages/core/src/actions/getBalance.ts index 1aae5667b1..44ad018ccc 100644 --- a/packages/core/src/actions/getBalance.ts +++ b/packages/core/src/actions/getBalance.ts @@ -1,4 +1,4 @@ -import { type Address, type Hex, formatUnits, hexToString, trim } from 'viem' +import { type Address, formatUnits, type Hex, hexToString, trim } from 'viem' import { type GetBalanceErrorType as viem_GetBalanceErrorType, type GetBalanceParameters as viem_GetBalanceParameters, diff --git a/packages/core/src/actions/getBlock.test-d.ts b/packages/core/src/actions/getBlock.test-d.ts index 2344c50267..4041c841af 100644 --- a/packages/core/src/actions/getBlock.test-d.ts +++ b/packages/core/src/actions/getBlock.test-d.ts @@ -1,4 +1,4 @@ -import { http, type Hex } from 'viem' +import { type Hex, http } from 'viem' import { celo, mainnet } from 'viem/chains' import { expectTypeOf, test } from 'vitest' diff --git a/packages/core/src/actions/getClient.ts b/packages/core/src/actions/getClient.ts index 82f1c6c171..ba78cafa34 100644 --- a/packages/core/src/actions/getClient.ts +++ b/packages/core/src/actions/getClient.ts @@ -44,9 +44,9 @@ export function getClient< config: config, parameters: GetClientParameters = {}, ): GetClientReturnType { - let client = undefined try { - client = config.getClient(parameters) - } catch {} - return client as GetClientReturnType + return config.getClient(parameters) as GetClientReturnType + } catch { + return undefined as never + } } diff --git a/packages/core/src/actions/getTransactionConfirmations.test-d.ts b/packages/core/src/actions/getTransactionConfirmations.test-d.ts index fd9168dfa2..42474ca6c7 100644 --- a/packages/core/src/actions/getTransactionConfirmations.test-d.ts +++ b/packages/core/src/actions/getTransactionConfirmations.test-d.ts @@ -1,8 +1,7 @@ import { config } from '@wagmi/test' +import { http } from 'viem' import { mainnet, zkSync } from 'viem/chains' import { test } from 'vitest' - -import { http } from 'viem' import { createConfig } from '../createConfig.js' import { getTransactionConfirmations } from './getTransactionConfirmations.js' diff --git a/packages/core/src/actions/getTransactionCount.test.ts b/packages/core/src/actions/getTransactionCount.test.ts index 95f0e6ddee..7f4561571e 100644 --- a/packages/core/src/actions/getTransactionCount.test.ts +++ b/packages/core/src/actions/getTransactionCount.test.ts @@ -1,7 +1,6 @@ import { accounts, chain, config, testClient } from '@wagmi/test' -import { expect, test } from 'vitest' - import type { BlockTag } from 'viem' +import { expect, test } from 'vitest' import { getTransactionCount } from './getTransactionCount.js' const address = accounts[0] diff --git a/packages/core/src/actions/getWalletClient.test-d.ts b/packages/core/src/actions/getWalletClient.test-d.ts index d1d87f5e97..8f1d20ebba 100644 --- a/packages/core/src/actions/getWalletClient.test-d.ts +++ b/packages/core/src/actions/getWalletClient.test-d.ts @@ -1,7 +1,6 @@ import { chain, config } from '@wagmi/test' -import { expectTypeOf, test } from 'vitest' - import type { Account } from 'viem' +import { expectTypeOf, test } from 'vitest' import { getWalletClient } from './getWalletClient.js' test('default', async () => { diff --git a/packages/core/src/actions/prepareTransactionRequest.test.ts b/packages/core/src/actions/prepareTransactionRequest.test.ts index 271037af8f..715e4eea68 100644 --- a/packages/core/src/actions/prepareTransactionRequest.test.ts +++ b/packages/core/src/actions/prepareTransactionRequest.test.ts @@ -1,8 +1,7 @@ import { accounts, config, privateKey } from '@wagmi/test' -import { expect, test } from 'vitest' - import { parseEther } from 'viem' import { privateKeyToAccount } from 'viem/accounts' +import { expect, test } from 'vitest' import { connect } from './connect.js' import { disconnect } from './disconnect.js' import { prepareTransactionRequest } from './prepareTransactionRequest.js' diff --git a/packages/core/src/actions/readContract.ts b/packages/core/src/actions/readContract.ts index e01e74e9f2..81ea62d365 100644 --- a/packages/core/src/actions/readContract.ts +++ b/packages/core/src/actions/readContract.ts @@ -1,5 +1,4 @@ -import type { Abi } from 'viem' -import type { ContractFunctionArgs, ContractFunctionName } from 'viem' +import type { Abi, ContractFunctionArgs, ContractFunctionName } from 'viem' import { type ReadContractErrorType as viem_ReadContractErrorType, type ReadContractParameters as viem_ReadContractParameters, diff --git a/packages/core/src/actions/sendTransaction.test.ts b/packages/core/src/actions/sendTransaction.test.ts index 1247a20146..41792b9e6c 100644 --- a/packages/core/src/actions/sendTransaction.test.ts +++ b/packages/core/src/actions/sendTransaction.test.ts @@ -1,8 +1,7 @@ import { config, privateKey, transactionHashRegex } from '@wagmi/test' import { parseEther } from 'viem' -import { beforeEach, expect, test } from 'vitest' - import { privateKeyToAccount } from 'viem/accounts' +import { beforeEach, expect, test } from 'vitest' import { connect } from './connect.js' import { disconnect } from './disconnect.js' import { sendTransaction } from './sendTransaction.js' diff --git a/packages/core/src/actions/signTypedData.test.ts b/packages/core/src/actions/signTypedData.test.ts index 6d9f09fceb..402f8eda70 100644 --- a/packages/core/src/actions/signTypedData.test.ts +++ b/packages/core/src/actions/signTypedData.test.ts @@ -1,8 +1,7 @@ import { accounts, config, privateKey, typedData } from '@wagmi/test' import { recoverTypedDataAddress } from 'viem' -import { expect, test } from 'vitest' - import { privateKeyToAccount } from 'viem/accounts' +import { expect, test } from 'vitest' import { mock } from '../connectors/mock.js' import { connect } from './connect.js' import { disconnect } from './disconnect.js' diff --git a/packages/core/src/actions/simulateContract.test-d.ts b/packages/core/src/actions/simulateContract.test-d.ts index 3f893ff8f8..eef332966e 100644 --- a/packages/core/src/actions/simulateContract.test-d.ts +++ b/packages/core/src/actions/simulateContract.test-d.ts @@ -1,5 +1,5 @@ import { abi, config } from '@wagmi/test' -import { http, type Address } from 'viem' +import { type Address, http } from 'viem' import { celo, mainnet } from 'viem/chains' import { expectTypeOf, test } from 'vitest' diff --git a/packages/core/src/actions/watchBlockNumber.test.ts b/packages/core/src/actions/watchBlockNumber.test.ts index 0a4299db58..004fbacb07 100644 --- a/packages/core/src/actions/watchBlockNumber.test.ts +++ b/packages/core/src/actions/watchBlockNumber.test.ts @@ -1,5 +1,5 @@ import { config, testClient, wait } from '@wagmi/test' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { watchBlockNumber } from './watchBlockNumber.js' @@ -16,12 +16,9 @@ test('default', async () => { await testClient.mainnet.mine({ blocks: 1 }) await wait(100) await testClient.mainnet.mine({ blocks: 1 }) - await wait(100) + await vi.waitUntil(() => blockNumbers.length === 3, { timeout: 5_000 }) expect(blockNumbers.length).toBe(3) - expect( - blockNumbers.map((blockNumber) => blockNumber - blockNumbers[0]!), - ).toEqual([0n, 1n, 2n]) unwatch() }) diff --git a/packages/core/src/actions/watchBlockNumber.ts b/packages/core/src/actions/watchBlockNumber.ts index 712849080a..75379a6927 100644 --- a/packages/core/src/actions/watchBlockNumber.ts +++ b/packages/core/src/actions/watchBlockNumber.ts @@ -1,10 +1,9 @@ +import type { Chain, Transport, WebSocketTransport } from 'viem' import { type WatchBlockNumberParameters as viem_WatchBlockNumberParameters, type WatchBlockNumberReturnType as viem_WatchBlockNumberReturnType, watchBlockNumber as viem_watchBlockNumber, } from 'viem/actions' - -import type { Chain, Transport, WebSocketTransport } from 'viem' import type { Config } from '../createConfig.js' import type { SelectChains } from '../types/chain.js' import type { diff --git a/packages/core/src/actions/watchBlocks.test.ts b/packages/core/src/actions/watchBlocks.test.ts index caf4c0dc61..567fe24eaa 100644 --- a/packages/core/src/actions/watchBlocks.test.ts +++ b/packages/core/src/actions/watchBlocks.test.ts @@ -1,7 +1,6 @@ import { config, testClient, wait } from '@wagmi/test' -import { expect, test } from 'vitest' - import type { Block } from 'viem' +import { expect, test, vi } from 'vitest' import { watchBlocks } from './watchBlocks.js' test('default', async () => { @@ -17,14 +16,9 @@ test('default', async () => { await testClient.mainnet.mine({ blocks: 1 }) await wait(100) await testClient.mainnet.mine({ blocks: 1 }) - await wait(100) + await vi.waitUntil(() => blocks.length === 3, { timeout: 5_000 }) expect(blocks.length).toBe(3) - expect(blocks.map((block) => block.number! - blocks[0]?.number!)).toEqual([ - 0n, - 1n, - 2n, - ]) unwatch() }) diff --git a/packages/core/src/actions/watchBlocks.ts b/packages/core/src/actions/watchBlocks.ts index c6f3225dc9..cd2dcf0676 100644 --- a/packages/core/src/actions/watchBlocks.ts +++ b/packages/core/src/actions/watchBlocks.ts @@ -1,10 +1,9 @@ +import type { BlockTag, Chain, Transport, WebSocketTransport } from 'viem' import { type WatchBlocksParameters as viem_WatchBlocksParameters, type WatchBlocksReturnType as viem_WatchBlocksReturnType, watchBlocks as viem_watchBlocks, } from 'viem/actions' - -import type { BlockTag, Chain, Transport, WebSocketTransport } from 'viem' import type { Config } from '../createConfig.js' import type { SelectChains } from '../types/chain.js' import type { diff --git a/packages/core/src/actions/watchContractEvent.test.ts b/packages/core/src/actions/watchContractEvent.test.ts index 759a21dd19..438792d9fa 100644 --- a/packages/core/src/actions/watchContractEvent.test.ts +++ b/packages/core/src/actions/watchContractEvent.test.ts @@ -7,7 +7,7 @@ import { transactionHashRegex, wait, } from '@wagmi/test' -import { http, createWalletClient, parseEther } from 'viem' +import { createWalletClient, http, parseEther } from 'viem' import type { WatchEventOnLogsParameter } from 'viem/actions' import { beforeEach, expect, test } from 'vitest' diff --git a/packages/core/src/actions/writeContract.test-d.ts b/packages/core/src/actions/writeContract.test-d.ts index 68009a3773..29098787d5 100644 --- a/packages/core/src/actions/writeContract.test-d.ts +++ b/packages/core/src/actions/writeContract.test-d.ts @@ -1,5 +1,5 @@ import { abi, config } from '@wagmi/test' -import { http, type Address, parseAbi } from 'viem' +import { type Address, http, parseAbi } from 'viem' import { celo, mainnet } from 'viem/chains' import { expectTypeOf, test } from 'vitest' diff --git a/packages/core/src/connectors/injected.ts b/packages/core/src/connectors/injected.ts index d686d0aa29..3fb5bc6feb 100644 --- a/packages/core/src/connectors/injected.ts +++ b/packages/core/src/connectors/injected.ts @@ -2,14 +2,14 @@ import { type AddEthereumChainParameter, type Address, type EIP1193Provider, + getAddress, + numberToHex, type ProviderConnectInfo, type ProviderRpcError, ResourceUnavailableRpcError, type RpcError, SwitchChainError, UserRejectedRequestError, - getAddress, - numberToHex, withRetry, withTimeout, } from 'viem' diff --git a/packages/core/src/connectors/mock.test.ts b/packages/core/src/connectors/mock.test.ts index f8c6350b58..dc0da8995d 100644 --- a/packages/core/src/connectors/mock.test.ts +++ b/packages/core/src/connectors/mock.test.ts @@ -23,10 +23,12 @@ test('setup', () => { expectTypeOf().toMatchTypeOf() }) -test('behavior: features.connectError', () => { +test('behavior: features.connectError', async () => { const connectorFn = mock({ accounts, features: { connectError: true } }) const connector = config._internal.connectors.setup(connectorFn) - expect(() => connector.connect()).rejects.toThrowErrorMatchingInlineSnapshot(` + await expect(() => + connector.connect(), + ).rejects.toThrowErrorMatchingInlineSnapshot(` [UserRejectedRequestError: User rejected the request. Details: Failed to connect. @@ -49,7 +51,7 @@ test('behavior: connector.getProvider request errors', async () => { ) as ReturnType const provider = await connector.getProvider() - expect( + await expect( provider.request({ method: 'eth_signTypedData_v4', params: [] as any, @@ -61,7 +63,7 @@ test('behavior: connector.getProvider request errors', async () => { Version: viem@2.31.7] `) - expect( + await expect( provider.request({ method: 'wallet_switchEthereumChain', params: [] as any, @@ -73,7 +75,7 @@ test('behavior: connector.getProvider request errors', async () => { Version: viem@2.31.7] `) - expect( + await expect( provider.request({ method: 'wallet_watchAsset', params: [] as any, @@ -85,7 +87,7 @@ test('behavior: connector.getProvider request errors', async () => { Version: viem@2.31.7] `) - expect( + await expect( provider.request({ method: 'personal_sign', params: [] as any, diff --git a/packages/core/src/connectors/mock.ts b/packages/core/src/connectors/mock.ts index 9d4dc9d846..afca227b2f 100644 --- a/packages/core/src/connectors/mock.ts +++ b/packages/core/src/connectors/mock.ts @@ -1,20 +1,20 @@ import { type Address, + custom, type EIP1193RequestFn, + fromHex, + getAddress, type Hex, + keccak256, + numberToHex, RpcRequestError, SwitchChainError, + stringToHex, type Transport, UserRejectedRequestError, type WalletCallReceipt, type WalletGetCallsStatusReturnType, type WalletRpcSchema, - custom, - fromHex, - getAddress, - keccak256, - numberToHex, - stringToHex, } from 'viem' import { rpc } from 'viem/utils' diff --git a/packages/core/src/createConfig.test-d.ts b/packages/core/src/createConfig.test-d.ts index 3daa57bd5f..fb693fa594 100644 --- a/packages/core/src/createConfig.test-d.ts +++ b/packages/core/src/createConfig.test-d.ts @@ -1,5 +1,5 @@ import { accounts } from '@wagmi/test' -import { http, createClient, webSocket } from 'viem' +import { createClient, http, webSocket } from 'viem' import { mainnet, sepolia } from 'viem/chains' import { expectTypeOf, test } from 'vitest' @@ -73,7 +73,7 @@ test('behavior: missing transport for chain', () => { transports: { [mainnet.id]: http(), // @ts-expect-error - [123]: http(), + 123: http(), }, }) }) diff --git a/packages/core/src/createConfig.test.ts b/packages/core/src/createConfig.test.ts index a6ae41e280..37d8843525 100644 --- a/packages/core/src/createConfig.test.ts +++ b/packages/core/src/createConfig.test.ts @@ -1,8 +1,8 @@ import { accounts, chain, wait } from '@wagmi/test' import { + announceProvider, type EIP1193Provider, type EIP6963ProviderDetail, - announceProvider, } from 'mipd' import { http } from 'viem' import { expect, test, vi } from 'vitest' diff --git a/packages/core/src/createConfig.ts b/packages/core/src/createConfig.ts index 154eef5f6d..275efe8a47 100644 --- a/packages/core/src/createConfig.ts +++ b/packages/core/src/createConfig.ts @@ -1,30 +1,30 @@ import { + createStore as createMipd, type EIP6963ProviderDetail, type Store as MipdStore, - createStore as createMipd, } from 'mipd' import { type Address, type Chain, type Client, - type EIP1193RequestFn, createClient, + type EIP1193RequestFn, type ClientConfig as viem_ClientConfig, type Transport as viem_Transport, } from 'viem' import { persist, subscribeWithSelector } from 'zustand/middleware' -import { type Mutate, type StoreApi, createStore } from 'zustand/vanilla' +import { createStore, type Mutate, type StoreApi } from 'zustand/vanilla' import type { ConnectorEventMap, CreateConnectorFn, } from './connectors/createConnector.js' import { injected } from './connectors/injected.js' -import { type Emitter, type EventData, createEmitter } from './createEmitter.js' +import { createEmitter, type Emitter, type EventData } from './createEmitter.js' import { - type Storage, createStorage, getDefaultStorage, + type Storage, } from './createStorage.js' import { ChainNotConfiguredError } from './errors/config.js' import type { @@ -515,10 +515,9 @@ export type CreateConfigParameters< | undefined }) | { - client(parameters: { chain: chains[number] }): Client< - transports[chains[number]['id']], - chains[number] - > + client(parameters: { + chain: chains[number] + }): Client } > > diff --git a/packages/core/src/createStorage.test-d.ts b/packages/core/src/createStorage.test-d.ts index 6bb4c7f300..75cd0e7492 100644 --- a/packages/core/src/createStorage.test-d.ts +++ b/packages/core/src/createStorage.test-d.ts @@ -1,7 +1,6 @@ import { expectTypeOf, test } from 'vitest' -import { createStorage } from './createStorage.js' - import type { Connection } from './createConfig.js' +import { createStorage } from './createStorage.js' test('getItem', () => { const storage = createStorage({ storage: localStorage }) diff --git a/packages/core/src/exports/actions.test.ts b/packages/core/src/exports/actions.test.ts index eaaedba14f..69183c0724 100644 --- a/packages/core/src/exports/actions.test.ts +++ b/packages/core/src/exports/actions.test.ts @@ -9,8 +9,8 @@ test('exports', () => { "connect", "deployContract", "disconnect", - "estimateGas", "estimateFeesPerGas", + "estimateGas", "estimateMaxPriorityFeePerGas", "getAccount", "getBalance", @@ -26,8 +26,8 @@ test('exports', () => { "getChains", "getClient", "getConnections", - "getConnectors", "getConnectorClient", + "getConnectors", "getEnsAddress", "fetchEnsAddress", "getEnsAvatar", @@ -67,10 +67,12 @@ test('exports', () => { "verifyMessage", "verifyTypedData", "waitForCallsStatus", + "waitForTransactionReceipt", + "waitForTransaction", "watchAccount", "watchAsset", - "watchBlocks", "watchBlockNumber", + "watchBlocks", "watchChainId", "watchClient", "watchConnections", @@ -78,8 +80,6 @@ test('exports', () => { "watchContractEvent", "watchPendingTransactions", "watchPublicClient", - "waitForTransactionReceipt", - "waitForTransaction", "writeContract", ] `) diff --git a/packages/core/src/exports/actions.ts b/packages/core/src/exports/actions.ts index d03c2adb76..539e4afea2 100644 --- a/packages/core/src/exports/actions.ts +++ b/packages/core/src/exports/actions.ts @@ -30,20 +30,18 @@ export { type DisconnectReturnType, disconnect, } from '../actions/disconnect.js' - -export { - type EstimateGasErrorType, - type EstimateGasParameters, - type EstimateGasReturnType, - estimateGas, -} from '../actions/estimateGas.js' - export { type EstimateFeesPerGasErrorType, type EstimateFeesPerGasParameters, type EstimateFeesPerGasReturnType, estimateFeesPerGas, } from '../actions/estimateFeesPerGas.js' +export { + type EstimateGasErrorType, + type EstimateGasParameters, + type EstimateGasReturnType, + estimateGas, +} from '../actions/estimateGas.js' export { type EstimateMaxPriorityFeePerGasErrorType, @@ -58,9 +56,9 @@ export { } from '../actions/getAccount.js' export { + type GetBalanceErrorType, type GetBalanceParameters, type GetBalanceReturnType, - type GetBalanceErrorType, getBalance, /** @deprecated use `getBalance` instead */ getBalance as fetchBalance, @@ -130,18 +128,16 @@ export { type GetConnectionsReturnType, getConnections, } from '../actions/getConnections.js' - -export { - type GetConnectorsReturnType, - getConnectors, -} from '../actions/getConnectors.js' - export { type GetConnectorClientErrorType, type GetConnectorClientParameters, type GetConnectorClientReturnType, getConnectorClient, } from '../actions/getConnectorClient.js' +export { + type GetConnectorsReturnType, + getConnectors, +} from '../actions/getConnectors.js' export { type GetEnsAddressErrorType, @@ -273,23 +269,23 @@ export { } from '../actions/multicall.js' export { + type PrepareTransactionRequestErrorType, type PrepareTransactionRequestParameters, type PrepareTransactionRequestReturnType, - type PrepareTransactionRequestErrorType, prepareTransactionRequest, } from '../actions/prepareTransactionRequest.js' export { + type ReadContractErrorType, type ReadContractParameters, type ReadContractReturnType, - type ReadContractErrorType, readContract, } from '../actions/readContract.js' export { + type ReadContractsErrorType, type ReadContractsParameters, type ReadContractsReturnType, - type ReadContractsErrorType, readContracts, } from '../actions/readContracts.js' @@ -376,82 +372,71 @@ export { type WaitForCallsStatusReturnType, waitForCallsStatus, } from '../actions/waitForCallsStatus.js' - +export { + type WaitForTransactionReceiptErrorType, + type WaitForTransactionReceiptParameters, + type WaitForTransactionReceiptReturnType, + waitForTransactionReceipt, + /** @deprecated use `waitForTransactionReceipt` instead */ + waitForTransactionReceipt as waitForTransaction, +} from '../actions/waitForTransactionReceipt.js' export { type WatchAccountParameters, type WatchAccountReturnType, watchAccount, } from '../actions/watchAccount.js' - export { type WatchAssetParameters, type WatchAssetReturnType, watchAsset, } from '../actions/watchAsset.js' -export { - type WatchBlocksParameters, - type WatchBlocksReturnType, - watchBlocks, -} from '../actions/watchBlocks.js' - export { type WatchBlockNumberParameters, type WatchBlockNumberReturnType, watchBlockNumber, } from '../actions/watchBlockNumber.js' - +export { + type WatchBlocksParameters, + type WatchBlocksReturnType, + watchBlocks, +} from '../actions/watchBlocks.js' export { type WatchChainIdParameters, type WatchChainIdReturnType, watchChainId, } from '../actions/watchChainId.js' - export { type WatchClientParameters, type WatchClientReturnType, watchClient, } from '../actions/watchClient.js' - export { type WatchConnectionsParameters, type WatchConnectionsReturnType, watchConnections, } from '../actions/watchConnections.js' - export { type WatchConnectorsParameters, type WatchConnectorsReturnType, watchConnectors, } from '../actions/watchConnectors.js' - export { type WatchContractEventParameters, type WatchContractEventReturnType, watchContractEvent, } from '../actions/watchContractEvent.js' - export { type WatchPendingTransactionsParameters, type WatchPendingTransactionsReturnType, watchPendingTransactions, } from '../actions/watchPendingTransactions.js' - export { type WatchPublicClientParameters, type WatchPublicClientReturnType, watchPublicClient, } from '../actions/watchPublicClient.js' -export { - type WaitForTransactionReceiptErrorType, - type WaitForTransactionReceiptParameters, - type WaitForTransactionReceiptReturnType, - waitForTransactionReceipt, - /** @deprecated use `waitForTransactionReceipt` instead */ - waitForTransactionReceipt as waitForTransaction, -} from '../actions/waitForTransactionReceipt.js' - export { type WriteContractErrorType, type WriteContractParameters, diff --git a/packages/core/src/exports/codegen.test.ts b/packages/core/src/exports/codegen.test.ts index c947b7d188..e26af5c6e0 100644 --- a/packages/core/src/exports/codegen.test.ts +++ b/packages/core/src/exports/codegen.test.ts @@ -5,8 +5,8 @@ import * as codegen from './codegen.js' test('exports', () => { expect(Object.keys(codegen)).toMatchInlineSnapshot(` [ - "createSimulateContract", "createReadContract", + "createSimulateContract", "createWatchContractEvent", "createWriteContract", ] diff --git a/packages/core/src/exports/codegen.ts b/packages/core/src/exports/codegen.ts index bed8aa1cc7..e3eeb16219 100644 --- a/packages/core/src/exports/codegen.ts +++ b/packages/core/src/exports/codegen.ts @@ -1,15 +1,14 @@ // biome-ignore lint/performance/noBarrelFile: entrypoint module -export { - type CreateSimulateContractParameters, - type CreateSimulateContractReturnType, - createSimulateContract, -} from '../actions/codegen/createSimulateContract.js' - export { type CreateReadContractParameters, type CreateReadContractReturnType, createReadContract, } from '../actions/codegen/createReadContract.js' +export { + type CreateSimulateContractParameters, + type CreateSimulateContractReturnType, + createSimulateContract, +} from '../actions/codegen/createSimulateContract.js' export { type CreateWatchContractEventParameters, diff --git a/packages/core/src/exports/experimental.ts b/packages/core/src/exports/experimental.ts index f74baa82cb..65fbb4a4d1 100644 --- a/packages/core/src/exports/experimental.ts +++ b/packages/core/src/exports/experimental.ts @@ -73,6 +73,18 @@ export { // Tanstack Query //////////////////////////////////////////////////////////////////////////////// +export { + /** @deprecated Use `SendCallsData` instead. */ + type WriteContractsData, + /** @deprecated Use `SendCallsMutate` instead. */ + type WriteContractsMutate, + /** @deprecated Use `SendCallsMutateAsync` instead. */ + type WriteContractsMutateAsync, + /** @deprecated Use `SendCallsVariables` instead. */ + type WriteContractsVariables, + /** @deprecated Use `sendCallsMutationOptions` instead. */ + writeContractsMutationOptions, +} from '../experimental/query/writeContracts.js' export { /** @deprecated This is no longer experimental – use `import type { GetCallsStatusData } from '@wagmi/core/query'` instead. */ type GetCallsStatusData, @@ -82,12 +94,11 @@ export { type GetCallsStatusQueryFnData, /** @deprecated This is no longer experimental – use `import type { GetCallsStatusQueryKey } from '@wagmi/core/query'` instead. */ type GetCallsStatusQueryKey, - /** @deprecated This is no longer experimental – use `import { getCallsStatusQueryOptions } from '@wagmi/core/query'` instead. */ - getCallsStatusQueryOptions, /** @deprecated This is no longer experimental – use `import { getCallsStatusQueryKey } from '@wagmi/core/query'` instead. */ getCallsStatusQueryKey, + /** @deprecated This is no longer experimental – use `import { getCallsStatusQueryOptions } from '@wagmi/core/query'` instead. */ + getCallsStatusQueryOptions, } from '../query/getCallsStatus.js' - export { /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesData } from '@wagmi/core/query'` instead. */ type GetCapabilitiesData, @@ -97,12 +108,11 @@ export { type GetCapabilitiesQueryFnData, /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesQueryKey } from '@wagmi/core/query'` instead. */ type GetCapabilitiesQueryKey, - /** @deprecated This is no longer experimental – use `import { getCapabilitiesQueryOptions } from '@wagmi/core/query'` instead. */ - getCapabilitiesQueryOptions, /** @deprecated This is no longer experimental – use `import { getCapabilitiesQueryKey } from '@wagmi/core/query'` instead. */ getCapabilitiesQueryKey, + /** @deprecated This is no longer experimental – use `import { getCapabilitiesQueryOptions } from '@wagmi/core/query'` instead. */ + getCapabilitiesQueryOptions, } from '../query/getCapabilities.js' - export { /** @deprecated This is no longer experimental – use `import type { SendCallsData } from '@wagmi/core/query'` instead. */ type SendCallsData, @@ -115,7 +125,6 @@ export { /** @deprecated This is no longer experimental – use `import { sendCallsMutationOptions } from '@wagmi/core/query'` instead. */ sendCallsMutationOptions, } from '../query/sendCalls.js' - export { /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusData } from '@wagmi/core/query'` instead. */ type ShowCallsStatusData, @@ -128,7 +137,6 @@ export { /** @deprecated This is no longer experimental – use `import { showCallsStatusMutationOptions } from '@wagmi/core/query'` instead. */ showCallsStatusMutationOptions, } from '../query/showCallsStatus.js' - export { /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusData } from '@wagmi/core/query'` instead. */ type WaitForCallsStatusData, @@ -143,16 +151,3 @@ export { /** @deprecated This is no longer experimental – use `import { waitForCallsStatusQueryOptions } from '@wagmi/core/query'` instead. */ waitForCallsStatusQueryOptions, } from '../query/waitForCallsStatus.js' - -export { - /** @deprecated Use `SendCallsData` instead. */ - type WriteContractsData, - /** @deprecated Use `SendCallsMutate` instead. */ - type WriteContractsMutate, - /** @deprecated Use `SendCallsMutateAsync` instead. */ - type WriteContractsMutateAsync, - /** @deprecated Use `SendCallsVariables` instead. */ - type WriteContractsVariables, - /** @deprecated Use `sendCallsMutationOptions` instead. */ - writeContractsMutationOptions, -} from '../experimental/query/writeContracts.js' diff --git a/packages/core/src/exports/index.test.ts b/packages/core/src/exports/index.test.ts index 55f3885806..7b6e904e18 100644 --- a/packages/core/src/exports/index.test.ts +++ b/packages/core/src/exports/index.test.ts @@ -9,8 +9,8 @@ test('exports', () => { "connect", "deployContract", "disconnect", - "estimateGas", "estimateFeesPerGas", + "estimateGas", "estimateMaxPriorityFeePerGas", "getAccount", "getBalance", @@ -26,8 +26,8 @@ test('exports', () => { "getChains", "getClient", "getConnections", - "getConnectors", "getConnectorClient", + "getConnectors", "getEnsAddress", "fetchEnsAddress", "getEnsAvatar", @@ -67,10 +67,12 @@ test('exports', () => { "verifyMessage", "verifyTypedData", "waitForCallsStatus", + "waitForTransactionReceipt", + "waitForTransaction", "watchAccount", "watchAsset", - "watchBlocks", "watchBlockNumber", + "watchBlocks", "watchChainId", "watchClient", "watchConnections", @@ -78,8 +80,6 @@ test('exports', () => { "watchContractEvent", "watchPendingTransactions", "watchPublicClient", - "waitForTransactionReceipt", - "waitForTransaction", "writeContract", "createConnector", "injected", @@ -90,11 +90,11 @@ test('exports', () => { "hydrate", "BaseError", "ChainNotConfiguredError", - "ConnectorNotConnectedError", - "ConnectorAlreadyConnectedError", - "ConnectorNotFoundError", "ConnectorAccountNotFoundError", + "ConnectorAlreadyConnectedError", "ConnectorChainMismatchError", + "ConnectorNotConnectedError", + "ConnectorNotFoundError", "ConnectorUnavailableReconnectingError", "ProviderNotFoundError", "SwitchChainNotSupportedError", diff --git a/packages/core/src/exports/index.ts b/packages/core/src/exports/index.ts index 1e0e210ea2..03028f519b 100644 --- a/packages/core/src/exports/index.ts +++ b/packages/core/src/exports/index.ts @@ -30,20 +30,18 @@ export { type DisconnectReturnType, disconnect, } from '../actions/disconnect.js' - -export { - type EstimateGasErrorType, - type EstimateGasParameters, - type EstimateGasReturnType, - estimateGas, -} from '../actions/estimateGas.js' - export { type EstimateFeesPerGasErrorType, type EstimateFeesPerGasParameters, type EstimateFeesPerGasReturnType, estimateFeesPerGas, } from '../actions/estimateFeesPerGas.js' +export { + type EstimateGasErrorType, + type EstimateGasParameters, + type EstimateGasReturnType, + estimateGas, +} from '../actions/estimateGas.js' export { type EstimateMaxPriorityFeePerGasErrorType, @@ -58,9 +56,9 @@ export { } from '../actions/getAccount.js' export { + type GetBalanceErrorType, type GetBalanceParameters, type GetBalanceReturnType, - type GetBalanceErrorType, getBalance, /** @deprecated use `getBalance` instead */ getBalance as fetchBalance, @@ -130,18 +128,16 @@ export { type GetConnectionsReturnType, getConnections, } from '../actions/getConnections.js' - -export { - type GetConnectorsReturnType, - getConnectors, -} from '../actions/getConnectors.js' - export { type GetConnectorClientErrorType, type GetConnectorClientParameters, type GetConnectorClientReturnType, getConnectorClient, } from '../actions/getConnectorClient.js' +export { + type GetConnectorsReturnType, + getConnectors, +} from '../actions/getConnectors.js' export { type GetEnsAddressErrorType, @@ -280,16 +276,16 @@ export { } from '../actions/prepareTransactionRequest.js' export { + type ReadContractErrorType, type ReadContractParameters, type ReadContractReturnType, - type ReadContractErrorType, readContract, } from '../actions/readContract.js' export { + type ReadContractsErrorType, type ReadContractsParameters, type ReadContractsReturnType, - type ReadContractsErrorType, readContracts, } from '../actions/readContracts.js' @@ -378,83 +374,72 @@ export { type WaitForCallsStatusReturnType, waitForCallsStatus, } from '../actions/waitForCallsStatus.js' - +export { + type WaitForTransactionReceiptErrorType, + type WaitForTransactionReceiptParameters, + type WaitForTransactionReceiptReturnType, + waitForTransactionReceipt, + /** @deprecated use `waitForTransactionReceipt` instead */ + waitForTransactionReceipt as waitForTransaction, +} from '../actions/waitForTransactionReceipt.js' export { type WatchAccountParameters, type WatchAccountReturnType, watchAccount, } from '../actions/watchAccount.js' - export { - type WatchAssetParameters, type WatchAssetErrorType, + type WatchAssetParameters, type WatchAssetReturnType, watchAsset, } from '../actions/watchAsset.js' -export { - type WatchBlocksParameters, - type WatchBlocksReturnType, - watchBlocks, -} from '../actions/watchBlocks.js' - export { type WatchBlockNumberParameters, type WatchBlockNumberReturnType, watchBlockNumber, } from '../actions/watchBlockNumber.js' - +export { + type WatchBlocksParameters, + type WatchBlocksReturnType, + watchBlocks, +} from '../actions/watchBlocks.js' export { type WatchChainIdParameters, type WatchChainIdReturnType, watchChainId, } from '../actions/watchChainId.js' - export { type WatchClientParameters, type WatchClientReturnType, watchClient, } from '../actions/watchClient.js' - export { type WatchConnectionsParameters, type WatchConnectionsReturnType, watchConnections, } from '../actions/watchConnections.js' - export { type WatchConnectorsParameters, type WatchConnectorsReturnType, watchConnectors, } from '../actions/watchConnectors.js' - export { type WatchContractEventParameters, type WatchContractEventReturnType, watchContractEvent, } from '../actions/watchContractEvent.js' - export { type WatchPendingTransactionsParameters, type WatchPendingTransactionsReturnType, watchPendingTransactions, } from '../actions/watchPendingTransactions.js' - export { type WatchPublicClientParameters, type WatchPublicClientReturnType, watchPublicClient, } from '../actions/watchPublicClient.js' -export { - type WaitForTransactionReceiptErrorType, - type WaitForTransactionReceiptParameters, - type WaitForTransactionReceiptReturnType, - waitForTransactionReceipt, - /** @deprecated use `waitForTransactionReceipt` instead */ - waitForTransactionReceipt as waitForTransaction, -} from '../actions/waitForTransactionReceipt.js' - export { type WriteContractErrorType, type WriteContractParameters, @@ -487,14 +472,14 @@ export { //////////////////////////////////////////////////////////////////////////////// export { + type Config, type Connection, type Connector, - type Config, type CreateConfigParameters, + createConfig, type PartializedState, type State, type Transport, - createConfig, } from '../createConfig.js' //////////////////////////////////////////////////////////////////////////////// @@ -503,10 +488,10 @@ export { export { type CreateStorageParameters, - type Storage, - type StorageItemMap, createStorage, noopStorage, + type Storage, + type StorageItemMap, } from '../createStorage.js' //////////////////////////////////////////////////////////////////////////////// @@ -522,27 +507,27 @@ export { hydrate } from '../hydrate.js' export { BaseError } from '../errors/base.js' export { - type ChainNotConfiguredErrorType, ChainNotConfiguredError, - type ConnectorNotConnectedErrorType, - ConnectorNotConnectedError, - type ConnectorAlreadyConnectedErrorType, - ConnectorAlreadyConnectedError, - type ConnectorNotFoundErrorType, - ConnectorNotFoundError, - type ConnectorAccountNotFoundErrorType, + type ChainNotConfiguredErrorType, ConnectorAccountNotFoundError, - type ConnectorChainMismatchErrorType, + type ConnectorAccountNotFoundErrorType, + ConnectorAlreadyConnectedError, + type ConnectorAlreadyConnectedErrorType, ConnectorChainMismatchError, - type ConnectorUnavailableReconnectingErrorType, + type ConnectorChainMismatchErrorType, + ConnectorNotConnectedError, + type ConnectorNotConnectedErrorType, + ConnectorNotFoundError, + type ConnectorNotFoundErrorType, ConnectorUnavailableReconnectingError, + type ConnectorUnavailableReconnectingErrorType, } from '../errors/config.js' export { - type ProviderNotFoundErrorType, ProviderNotFoundError, - type SwitchChainNotSupportedErrorType, + type ProviderNotFoundErrorType, SwitchChainNotSupportedError, + type SwitchChainNotSupportedErrorType, } from '../errors/connector.js' //////////////////////////////////////////////////////////////////////////////// @@ -552,8 +537,8 @@ export { export { custom, http, webSocket } from 'viem' export { - type ConnectorTransportConfig, type ConnectorTransport, + type ConnectorTransportConfig, unstable_connector, } from '../transports/connector.js' diff --git a/packages/core/src/exports/internal.test.ts b/packages/core/src/exports/internal.test.ts index 425a1b4eba..a0f7209899 100644 --- a/packages/core/src/exports/internal.test.ts +++ b/packages/core/src/exports/internal.test.ts @@ -6,8 +6,8 @@ test('exports', () => { expect(Object.keys(internal)).toMatchInlineSnapshot(` [ "watchChains", - "Emitter", "createEmitter", + "Emitter", "deepEqual", "uid", ] diff --git a/packages/core/src/exports/internal.ts b/packages/core/src/exports/internal.ts index 670420d89a..6b04580185 100644 --- a/packages/core/src/exports/internal.ts +++ b/packages/core/src/exports/internal.ts @@ -14,9 +14,9 @@ export { //////////////////////////////////////////////////////////////////////////////// export { - type EventData, - Emitter, createEmitter, + Emitter, + type EventData, } from '../createEmitter.js' //////////////////////////////////////////////////////////////////////////////// @@ -35,12 +35,12 @@ export type { Compute, ExactPartial, Mutable, - StrictOmit as Omit, OneOf, RemoveUndefined, + StrictOmit as Omit, UnionCompute, - UnionStrictOmit, UnionExactPartial, + UnionStrictOmit, } from '../types/utils.js' //////////////////////////////////////////////////////////////////////////////// diff --git a/packages/core/src/exports/query.test.ts b/packages/core/src/exports/query.test.ts index cbdaf925de..aff9b2eda2 100644 --- a/packages/core/src/exports/query.test.ts +++ b/packages/core/src/exports/query.test.ts @@ -72,14 +72,16 @@ test('exports', () => { "readContractsQueryOptions", "reconnectMutationOptions", "sendCallsMutationOptions", - "showCallsStatusMutationOptions", "sendTransactionMutationOptions", + "showCallsStatusMutationOptions", "signMessageMutationOptions", "signTypedDataMutationOptions", - "switchAccountMutationOptions", "simulateContractQueryKey", "simulateContractQueryOptions", + "switchAccountMutationOptions", "switchChainMutationOptions", + "hashFn", + "structuralSharing", "verifyMessageQueryKey", "verifyMessageQueryOptions", "verifyTypedDataQueryKey", @@ -90,8 +92,6 @@ test('exports', () => { "waitForTransactionReceiptQueryOptions", "watchAssetMutationOptions", "writeContractMutationOptions", - "hashFn", - "structuralSharing", ] `) }) diff --git a/packages/core/src/exports/query.ts b/packages/core/src/exports/query.ts index d689f558d5..a32173d97f 100644 --- a/packages/core/src/exports/query.ts +++ b/packages/core/src/exports/query.ts @@ -14,25 +14,25 @@ export { export { type ConnectData, - type ConnectVariables, type ConnectMutate, type ConnectMutateAsync, + type ConnectVariables, connectMutationOptions, } from '../query/connect.js' export { type DeployContractData, - type DeployContractVariables, type DeployContractMutate, type DeployContractMutateAsync, + type DeployContractVariables, deployContractMutationOptions, } from '../query/deployContract.js' export { type DisconnectData, - type DisconnectVariables, type DisconnectMutate, type DisconnectMutateAsync, + type DisconnectVariables, disconnectMutationOptions, } from '../query/disconnect.js' @@ -308,60 +308,49 @@ export { export { type ReconnectData, - type ReconnectVariables, type ReconnectMutate, type ReconnectMutateAsync, + type ReconnectVariables, reconnectMutationOptions, } from '../query/reconnect.js' export { type SendCallsData, - type SendCallsVariables, type SendCallsMutate, type SendCallsMutateAsync, + type SendCallsVariables, sendCallsMutationOptions, } from '../query/sendCalls.js' - -export { - type ShowCallsStatusData, - type ShowCallsStatusVariables, - type ShowCallsStatusMutate, - type ShowCallsStatusMutateAsync, - showCallsStatusMutationOptions, -} from '../query/showCallsStatus.js' - export { type SendTransactionData, - type SendTransactionVariables, type SendTransactionMutate, type SendTransactionMutateAsync, + type SendTransactionVariables, sendTransactionMutationOptions, } from '../query/sendTransaction.js' +export { + type ShowCallsStatusData, + type ShowCallsStatusMutate, + type ShowCallsStatusMutateAsync, + type ShowCallsStatusVariables, + showCallsStatusMutationOptions, +} from '../query/showCallsStatus.js' export { type SignMessageData, - type SignMessageVariables, type SignMessageMutate, type SignMessageMutateAsync, + type SignMessageVariables, signMessageMutationOptions, } from '../query/signMessage.js' export { type SignTypedDataData, - type SignTypedDataVariables, type SignTypedDataMutate, type SignTypedDataMutateAsync, + type SignTypedDataVariables, signTypedDataMutationOptions, } from '../query/signTypedData.js' - -export { - type SwitchAccountData, - type SwitchAccountVariables, - type SwitchAccountMutate, - type SwitchAccountMutateAsync, - switchAccountMutationOptions, -} from '../query/switchAccount.js' - export { type SimulateContractData, type SimulateContractOptions, @@ -370,15 +359,22 @@ export { simulateContractQueryKey, simulateContractQueryOptions, } from '../query/simulateContract.js' +export { + type SwitchAccountData, + type SwitchAccountMutate, + type SwitchAccountMutateAsync, + type SwitchAccountVariables, + switchAccountMutationOptions, +} from '../query/switchAccount.js' export { type SwitchChainData, - type SwitchChainVariables, type SwitchChainMutate, type SwitchChainMutateAsync, + type SwitchChainVariables, switchChainMutationOptions, } from '../query/switchChain.js' - +export { hashFn, structuralSharing } from '../query/utils.js' export { type VerifyMessageData, type VerifyMessageOptions, @@ -387,7 +383,6 @@ export { verifyMessageQueryKey, verifyMessageQueryOptions, } from '../query/verifyMessage.js' - export { type VerifyTypedDataData, type VerifyTypedDataOptions, @@ -396,7 +391,6 @@ export { verifyTypedDataQueryKey, verifyTypedDataQueryOptions, } from '../query/verifyTypedData.js' - export { type WaitForCallsStatusData, type WaitForCallsStatusOptions, @@ -405,7 +399,6 @@ export { waitForCallsStatusQueryKey, waitForCallsStatusQueryOptions, } from '../query/waitForCallsStatus.js' - export { type WaitForTransactionReceiptData, type WaitForTransactionReceiptOptions, @@ -414,21 +407,17 @@ export { waitForTransactionReceiptQueryKey, waitForTransactionReceiptQueryOptions, } from '../query/waitForTransactionReceipt.js' - export { type WatchAssetData, - type WatchAssetVariables, type WatchAssetMutate, type WatchAssetMutateAsync, + type WatchAssetVariables, watchAssetMutationOptions, } from '../query/watchAsset.js' - export { type WriteContractData, - type WriteContractVariables, type WriteContractMutate, type WriteContractMutateAsync, + type WriteContractVariables, writeContractMutationOptions, } from '../query/writeContract.js' - -export { hashFn, structuralSharing } from '../query/utils.js' diff --git a/packages/core/src/query/call.test.ts b/packages/core/src/query/call.test.ts index 1e9ee03f7a..b359c3f1ca 100644 --- a/packages/core/src/query/call.test.ts +++ b/packages/core/src/query/call.test.ts @@ -1,7 +1,6 @@ import { accounts, address, chain, config } from '@wagmi/test' -import { expect, test } from 'vitest' - import { parseEther, parseGwei } from 'viem' +import { expect, test } from 'vitest' import { callQueryOptions } from './call.js' const name4bytes = '0x06fdde03' diff --git a/packages/core/src/query/connect.ts b/packages/core/src/query/connect.ts index f521512789..fae985ab0e 100644 --- a/packages/core/src/query/connect.ts +++ b/packages/core/src/query/connect.ts @@ -6,9 +6,8 @@ import { type ConnectReturnType, connect, } from '../actions/connect.js' -import type { Config, Connector } from '../createConfig.js' - import type { CreateConnectorFn } from '../connectors/createConnector.js' +import type { Config, Connector } from '../createConfig.js' import type { Compute } from '../types/utils.js' export function connectMutationOptions(config: config) { diff --git a/packages/core/src/query/estimateGas.test-d.ts b/packages/core/src/query/estimateGas.test-d.ts index e48c4b089a..0b7aae06b2 100644 --- a/packages/core/src/query/estimateGas.test-d.ts +++ b/packages/core/src/query/estimateGas.test-d.ts @@ -1,4 +1,4 @@ -import { http, type Address, parseEther } from 'viem' +import { type Address, http, parseEther } from 'viem' import { celo, mainnet } from 'viem/chains' import { expectTypeOf, test } from 'vitest' diff --git a/packages/core/src/query/getFeeHistory.test.ts b/packages/core/src/query/getFeeHistory.test.ts index aa40793235..ef63e321c1 100644 --- a/packages/core/src/query/getFeeHistory.test.ts +++ b/packages/core/src/query/getFeeHistory.test.ts @@ -103,7 +103,7 @@ test('parameters: blockTag', async () => { test('behavior: blockCount is required', async () => { const options = getFeeHistoryQueryOptions(config, {}) - expect( + await expect( options.queryFn({ queryKey: options.queryKey, signal: new AbortSignal(), @@ -116,7 +116,7 @@ test('behavior: blockCount is required', async () => { test('behavior: rewardPercentiles is required', async () => { const options = getFeeHistoryQueryOptions(config, { blockCount: 4 }) - expect( + await expect( options.queryFn({ queryKey: options.queryKey, signal: new AbortSignal(), diff --git a/packages/core/src/query/getTransactionReceipt.ts b/packages/core/src/query/getTransactionReceipt.ts index 0d7d559d49..acd464ebae 100644 --- a/packages/core/src/query/getTransactionReceipt.ts +++ b/packages/core/src/query/getTransactionReceipt.ts @@ -1,11 +1,10 @@ import type { QueryOptions } from '@tanstack/query-core' - +import type { GetTransactionReceiptReturnType } from '../actions/getTransactionReceipt.js' import { type GetTransactionReceiptErrorType, type GetTransactionReceiptParameters, getTransactionReceipt, } from '../actions/getTransactionReceipt.js' -import type { GetTransactionReceiptReturnType } from '../actions/getTransactionReceipt.js' import type { Config } from '../createConfig.js' import type { ScopeKeyParameter } from '../types/properties.js' import type { Compute, ExactPartial } from '../types/utils.js' diff --git a/packages/core/src/query/readContracts.ts b/packages/core/src/query/readContracts.ts index 96bb2163cd..2ea591c683 100644 --- a/packages/core/src/query/readContracts.ts +++ b/packages/core/src/query/readContracts.ts @@ -10,8 +10,10 @@ import { readContracts, } from '../actions/readContracts.js' import type { Config } from '../createConfig.js' -import type { ChainIdParameter } from '../types/properties.js' -import type { ScopeKeyParameter } from '../types/properties.js' +import type { + ChainIdParameter, + ScopeKeyParameter, +} from '../types/properties.js' import type { ExactPartial } from '../types/utils.js' import { filterQueryOptions } from './utils.js' diff --git a/packages/core/src/query/simulateContract.test-d.ts b/packages/core/src/query/simulateContract.test-d.ts index 11023e7297..53ec980dc3 100644 --- a/packages/core/src/query/simulateContract.test-d.ts +++ b/packages/core/src/query/simulateContract.test-d.ts @@ -1,5 +1,5 @@ import { abi } from '@wagmi/test' -import { http, type Address } from 'viem' +import { type Address, http } from 'viem' import { celo, mainnet } from 'viem/chains' import { expectTypeOf, test } from 'vitest' diff --git a/packages/core/src/query/utils.ts b/packages/core/src/query/utils.ts index ab4ea3b989..9c34bb809b 100644 --- a/packages/core/src/query/utils.ts +++ b/packages/core/src/query/utils.ts @@ -21,7 +21,7 @@ export function hashFn(queryKey: QueryKey): string { }) } -// biome-ignore lint/complexity/noBannedTypes: +// biome-ignore lint/complexity/noBannedTypes: using function isPlainObject(value: any): value is Object { if (!hasObjectPrototype(value)) { return false @@ -36,7 +36,7 @@ function isPlainObject(value: any): value is Object { if (!hasObjectPrototype(prot)) return false // If constructor does not have an Object-specific method - // biome-ignore lint/suspicious/noPrototypeBuiltins: + // biome-ignore lint/suspicious/noPrototypeBuiltins: using if (!prot.hasOwnProperty('isPrototypeOf')) return false // Most likely a plain Object @@ -54,17 +54,21 @@ export function filterQueryOptions>( // biome-ignore format: no formatting const { // import('@tanstack/query-core').QueryOptions + // biome-ignore lint/correctness/noUnusedVariables: tossing _defaulted, behavior, gcTime, initialData, initialDataUpdatedAt, maxPages, meta, networkMode, queryFn, queryHash, queryKey, queryKeyHashFn, retry, retryDelay, structuralSharing, // import('@tanstack/query-core').InfiniteQueryObserverOptions + // biome-ignore lint/correctness/noUnusedVariables: tossing getPreviousPageParam, getNextPageParam, initialPageParam, // import('@tanstack/react-query').UseQueryOptions + // biome-ignore lint/correctness/noUnusedVariables: tossing _optimisticResults, enabled, notifyOnChangeProps, placeholderData, refetchInterval, refetchIntervalInBackground, refetchOnMount, refetchOnReconnect, refetchOnWindowFocus, retryOnMount, select, staleTime, suspense, throwOnError, //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // wagmi //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // biome-ignore lint/correctness/noUnusedVariables: tossing config, connector, query, ...rest } = options diff --git a/packages/core/src/transports/connector.test.ts b/packages/core/src/transports/connector.test.ts index d4af6c65ae..b9b103a5dc 100644 --- a/packages/core/src/transports/connector.test.ts +++ b/packages/core/src/transports/connector.test.ts @@ -28,9 +28,9 @@ test('setup', () => { `) }) -test('behavior: connector type not found', () => { +test('behavior: connector type not found', async () => { const transport = unstable_connector({ type: 'foo' })({}) - expect(() => + await expect(() => transport.request({ method: 'eth_chainId' }), ).rejects.toThrowErrorMatchingInlineSnapshot(` [ProviderDisconnectedError: The Provider is disconnected from all chains. @@ -40,7 +40,7 @@ test('behavior: connector type not found', () => { `) }) -test('behavior: provider is disconnected', () => { +test('behavior: provider is disconnected', async () => { const transport = unstable_connector(mock)({ connectors: createStore(() => [ { @@ -52,7 +52,7 @@ test('behavior: provider is disconnected', () => { ]), }) - expect(() => + await expect(() => transport.request({ method: 'eth_chainId' }), ).rejects.toThrowErrorMatchingInlineSnapshot(` [ProviderDisconnectedError: The Provider is disconnected from all chains. @@ -62,7 +62,7 @@ test('behavior: provider is disconnected', () => { `) }) -test('behavior: chainId mismatch', () => { +test('behavior: chainId mismatch', async () => { const transport = unstable_connector(mock)({ chain: optimism, connectors: createStore(() => [ @@ -76,7 +76,7 @@ test('behavior: chainId mismatch', () => { ]), }) - expect(() => + await expect(() => transport.request({ method: 'eth_chainId' }), ).rejects.toThrowErrorMatchingInlineSnapshot(` [ChainDisconnectedError: The Provider is not connected to the requested chain. @@ -86,12 +86,12 @@ test('behavior: chainId mismatch', () => { `) }) -test('behavior: request', () => { +test('behavior: request', async () => { const transport = unstable_connector(mock)({ connectors: createStore(() => [connector]), }) - expect( + await expect( transport.request({ method: 'eth_chainId' }), ).resolves.toThrowErrorMatchingInlineSnapshot(`"0x1"`) }) diff --git a/packages/core/src/transports/connector.ts b/packages/core/src/transports/connector.ts index 0f03d43188..d56f63ae3b 100644 --- a/packages/core/src/transports/connector.ts +++ b/packages/core/src/transports/connector.ts @@ -1,13 +1,13 @@ import { ChainDisconnectedError, + createTransport, type EIP1193Parameters, type EIP1193Provider, type EIP1193RequestFn, + hexToNumber, ProviderDisconnectedError, type TransportConfig, type WalletRpcSchema, - createTransport, - hexToNumber, withRetry, withTimeout, } from 'viem' diff --git a/packages/core/src/types/register.ts b/packages/core/src/types/register.ts index db420adfdc..70e473d320 100644 --- a/packages/core/src/types/register.ts +++ b/packages/core/src/types/register.ts @@ -1,6 +1,6 @@ import type { Config } from '../createConfig.js' -// biome-ignore lint/suspicious/noEmptyInterface: +// biome-ignore lint/suspicious/noEmptyInterface: using export interface Register {} export type ResolvedRegister = { config: Register extends { config: infer config extends Config } diff --git a/packages/core/src/utils/cookie.ts b/packages/core/src/utils/cookie.ts index ccd07bc7b7..e8c46bc0b5 100644 --- a/packages/core/src/utils/cookie.ts +++ b/packages/core/src/utils/cookie.ts @@ -10,10 +10,12 @@ export const cookieStorage = { }, setItem(key, value) { if (typeof window === 'undefined') return + // biome-ignore lint/suspicious/noDocumentCookie: using document.cookie = `${key}=${value};path=/;samesite=Lax` }, removeItem(key) { if (typeof window === 'undefined') return + // biome-ignore lint/suspicious/noDocumentCookie: using document.cookie = `${key}=;max-age=-1;path=/` }, } satisfies BaseStorage diff --git a/packages/core/src/utils/deepEqual.ts b/packages/core/src/utils/deepEqual.ts index 89b47a6bdd..760801c6bc 100644 --- a/packages/core/src/utils/deepEqual.ts +++ b/packages/core/src/utils/deepEqual.ts @@ -25,8 +25,7 @@ export function deepEqual(a: any, b: any) { length = keys.length if (length !== Object.keys(b).length) return false - for (i = length; i-- !== 0; ) - if (!Object.prototype.hasOwnProperty.call(b, keys[i]!)) return false + for (i = length; i-- !== 0; ) if (!Object.hasOwn(b, keys[i]!)) return false for (i = length; i-- !== 0; ) { const key = keys[i] @@ -38,6 +37,6 @@ export function deepEqual(a: any, b: any) { } // true if both NaN, false otherwise - // biome-ignore lint/suspicious/noSelfCompare: + // biome-ignore lint/suspicious/noSelfCompare: using return a !== a && b !== b } diff --git a/packages/create-wagmi/package.json b/packages/create-wagmi/package.json index b594422ae9..ad6fba1c0e 100644 --- a/packages/create-wagmi/package.json +++ b/packages/create-wagmi/package.json @@ -43,7 +43,18 @@ "@types/node": "^20.12.10", "@types/prompts": "^2.4.9" }, - "contributors": ["awkweb.eth ", "jxom.eth "], + "contributors": [ + "awkweb.eth ", + "jxom.eth " + ], "funding": "https://github.com/sponsors/wevm", - "keywords": ["wagmi", "eth", "ethereum", "dapps", "wallet", "web3", "cli"] + "keywords": [ + "wagmi", + "eth", + "ethereum", + "dapps", + "wallet", + "web3", + "cli" + ] } diff --git a/packages/create-wagmi/src/cli.ts b/packages/create-wagmi/src/cli.ts index ecb6a25a4c..47cbd4fdbf 100644 --- a/packages/create-wagmi/src/cli.ts +++ b/packages/create-wagmi/src/cli.ts @@ -98,7 +98,7 @@ async function init() { { type(_, { overwrite }: { overwrite?: boolean }) { if (overwrite === false) - throw new Error(`${pc.red('✖')} Operation cancelled`) + throw new Error(`${pc.red('×')} Operation cancelled`) return null }, name: 'overwriteChecker', @@ -154,12 +154,11 @@ async function init() { ], { onCancel() { - throw new Error(`${pc.red('✖')} Operation cancelled`) + throw new Error(`${pc.red('×')} Operation cancelled`) }, }, ) } catch (error) { - // biome-ignore lint/suspicious/noConsoleLog: console.log((error as Error).message) return } @@ -222,7 +221,6 @@ async function init() { process.exit(status ?? 0) } - // biome-ignore lint/suspicious/noConsoleLog: console.log(`\nScaffolding project in ${root}...`) const templateDir = path.resolve( @@ -251,10 +249,8 @@ async function init() { write('package.json', `${JSON.stringify(pkg, null, 2)}\n`) const cdProjectName = path.relative(cwd, root) - // biome-ignore lint/suspicious/noConsoleLog: console.log('\nDone. Now run:\n') if (root !== cwd) - // biome-ignore lint/suspicious/noConsoleLog: console.log( ` cd ${ cdProjectName.includes(' ') ? `"${cdProjectName}"` : cdProjectName @@ -263,22 +259,18 @@ async function init() { switch (pkgManager) { case 'yarn': - // biome-ignore lint/suspicious/noConsoleLog: console.log(' yarn') - // biome-ignore lint/suspicious/noConsoleLog: console.log(' yarn dev') break default: - // biome-ignore lint/suspicious/noConsoleLog: console.log(` ${pkgManager} install`) - // biome-ignore lint/suspicious/noConsoleLog: console.log(` ${pkgManager} run dev`) break } - // biome-ignore lint/suspicious/noConsoleLog: console.log() } init().catch((e) => { + // biome-ignore lint/suspicious/noConsole: logging error console.error(e) }) diff --git a/packages/create-wagmi/templates/next/src/wagmi.ts b/packages/create-wagmi/templates/next/src/wagmi.ts index 83aab7349f..0f97fd88cf 100644 --- a/packages/create-wagmi/templates/next/src/wagmi.ts +++ b/packages/create-wagmi/templates/next/src/wagmi.ts @@ -1,4 +1,4 @@ -import { http, cookieStorage, createConfig, createStorage } from 'wagmi' +import { cookieStorage, createConfig, createStorage, http } from 'wagmi' import { mainnet, sepolia } from 'wagmi/chains' import { baseAccount, injected, walletConnect } from 'wagmi/connectors' diff --git a/packages/create-wagmi/templates/nuxt/wagmi.ts b/packages/create-wagmi/templates/nuxt/wagmi.ts index 83e8569ea8..cd18ed80da 100644 --- a/packages/create-wagmi/templates/nuxt/wagmi.ts +++ b/packages/create-wagmi/templates/nuxt/wagmi.ts @@ -1,4 +1,4 @@ -import { http, cookieStorage, createConfig, createStorage } from '@wagmi/vue' +import { cookieStorage, createConfig, createStorage, http } from '@wagmi/vue' import { mainnet, optimism, sepolia } from '@wagmi/vue/chains' import { injected, metaMask, walletConnect } from '@wagmi/vue/connectors' diff --git a/packages/create-wagmi/templates/vite-react/biome.json b/packages/create-wagmi/templates/vite-react/biome.json deleted file mode 100644 index 08eb8a26ab..0000000000 --- a/packages/create-wagmi/templates/vite-react/biome.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "formatter": { - "enabled": true, - "indentStyle": "space", - "lineWidth": 120 - }, - "linter": { - "enabled": true - }, - "organizeImports": { - "enabled": true - } -} diff --git a/packages/create-wagmi/templates/vite-react/package.json b/packages/create-wagmi/templates/vite-react/package.json index 0eeaab9a10..601fa91066 100644 --- a/packages/create-wagmi/templates/vite-react/package.json +++ b/packages/create-wagmi/templates/vite-react/package.json @@ -6,7 +6,6 @@ "scripts": { "dev": "vite", "build": "tsc && vite build", - "lint": "biome check .", "preview": "vite preview" }, "dependencies": { @@ -17,7 +16,6 @@ "wagmi": "latest" }, "devDependencies": { - "@biomejs/biome": "^1.8.0", "@types/react": "^18.3.1", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.2.1", diff --git a/packages/create-wagmi/templates/vite-react/src/main.tsx b/packages/create-wagmi/templates/vite-react/src/main.tsx index d999e1a932..3afa816623 100644 --- a/packages/create-wagmi/templates/vite-react/src/main.tsx +++ b/packages/create-wagmi/templates/vite-react/src/main.tsx @@ -1,5 +1,5 @@ -import { Buffer } from 'buffer' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { Buffer } from 'buffer' import React from 'react' import ReactDOM from 'react-dom/client' import { WagmiProvider } from 'wagmi' diff --git a/packages/create-wagmi/templates/vite-react/src/wagmi.ts b/packages/create-wagmi/templates/vite-react/src/wagmi.ts index e565d78ad9..caeed5432f 100644 --- a/packages/create-wagmi/templates/vite-react/src/wagmi.ts +++ b/packages/create-wagmi/templates/vite-react/src/wagmi.ts @@ -1,4 +1,4 @@ -import { http, createConfig } from 'wagmi' +import { createConfig, http } from 'wagmi' import { mainnet, sepolia } from 'wagmi/chains' import { baseAccount, injected, walletConnect } from 'wagmi/connectors' diff --git a/packages/create-wagmi/templates/vite-vanilla/src/main.ts b/packages/create-wagmi/templates/vite-vanilla/src/main.ts index f2b80f3459..257488e20f 100644 --- a/packages/create-wagmi/templates/vite-vanilla/src/main.ts +++ b/packages/create-wagmi/templates/vite-vanilla/src/main.ts @@ -1,5 +1,5 @@ -import { Buffer } from 'buffer' import { connect, disconnect, reconnect, watchAccount } from '@wagmi/core' +import { Buffer } from 'buffer' import './style.css' import { config } from './wagmi' diff --git a/packages/create-wagmi/templates/vite-vanilla/src/wagmi.ts b/packages/create-wagmi/templates/vite-vanilla/src/wagmi.ts index ea7624d2a8..d6220895c4 100644 --- a/packages/create-wagmi/templates/vite-vanilla/src/wagmi.ts +++ b/packages/create-wagmi/templates/vite-vanilla/src/wagmi.ts @@ -1,5 +1,5 @@ import { baseAccount, injected, walletConnect } from '@wagmi/connectors' -import { http, createConfig } from '@wagmi/core' +import { createConfig, http } from '@wagmi/core' import { mainnet, sepolia } from '@wagmi/core/chains' export const config = createConfig({ diff --git a/packages/create-wagmi/templates/vite-vue/biome.json b/packages/create-wagmi/templates/vite-vue/biome.json deleted file mode 100644 index 08eb8a26ab..0000000000 --- a/packages/create-wagmi/templates/vite-vue/biome.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "formatter": { - "enabled": true, - "indentStyle": "space", - "lineWidth": 120 - }, - "linter": { - "enabled": true - }, - "organizeImports": { - "enabled": true - } -} diff --git a/packages/create-wagmi/templates/vite-vue/package.json b/packages/create-wagmi/templates/vite-vue/package.json index 8d306e620c..4e35e6ffa3 100644 --- a/packages/create-wagmi/templates/vite-vue/package.json +++ b/packages/create-wagmi/templates/vite-vue/package.json @@ -6,7 +6,6 @@ "scripts": { "dev": "vite", "build": "vue-tsc && vite build", - "lint": "biome check .", "preview": "vite preview" }, "dependencies": { diff --git a/packages/create-wagmi/templates/vite-vue/src/main.ts b/packages/create-wagmi/templates/vite-vue/src/main.ts index 820eed3722..ae37ed2a08 100644 --- a/packages/create-wagmi/templates/vite-vue/src/main.ts +++ b/packages/create-wagmi/templates/vite-vue/src/main.ts @@ -1,6 +1,6 @@ -import { Buffer } from 'buffer' import { VueQueryPlugin } from '@tanstack/vue-query' import { WagmiPlugin } from '@wagmi/vue' +import { Buffer } from 'buffer' import { createApp } from 'vue' // `@coinbase-wallet/sdk` uses `Buffer` diff --git a/packages/create-wagmi/templates/vite-vue/src/wagmi.ts b/packages/create-wagmi/templates/vite-vue/src/wagmi.ts index 964e48e5d4..3dc33f8bed 100644 --- a/packages/create-wagmi/templates/vite-vue/src/wagmi.ts +++ b/packages/create-wagmi/templates/vite-vue/src/wagmi.ts @@ -1,4 +1,4 @@ -import { http, createConfig, createStorage } from '@wagmi/vue' +import { createConfig, createStorage, http } from '@wagmi/vue' import { mainnet, optimism, sepolia } from '@wagmi/vue/chains' import { baseAccount, walletConnect } from '@wagmi/vue/connectors' diff --git a/packages/react/package.json b/packages/react/package.json index 0b62afbaaa..9750c9e4dc 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -70,12 +70,24 @@ }, "typesVersions": { "*": { - "actions": ["./dist/types/exports/actions.d.ts"], - "chains": ["./dist/types/exports/chains.d.ts"], - "codegen": ["./dist/types/exports/codegen.d.ts"], - "connectors": ["./dist/types/exports/connectors.d.ts"], - "experimental": ["./dist/types/exports/experimental.d.ts"], - "query": ["./dist/types/exports/query.d.ts"] + "actions": [ + "./dist/types/exports/actions.d.ts" + ], + "chains": [ + "./dist/types/exports/chains.d.ts" + ], + "codegen": [ + "./dist/types/exports/codegen.d.ts" + ], + "connectors": [ + "./dist/types/exports/connectors.d.ts" + ], + "experimental": [ + "./dist/types/exports/experimental.d.ts" + ], + "query": [ + "./dist/types/exports/query.d.ts" + ] } }, "peerDependencies": { @@ -96,15 +108,16 @@ }, "devDependencies": { "@tanstack/react-query": "catalog:", - "@testing-library/dom": "catalog:", - "@testing-library/react": "catalog:", "@types/react": "catalog:", "@types/react-dom": "catalog:", "@types/use-sync-external-store": "^0.0.6", "react": "catalog:", "react-dom": "catalog:" }, - "contributors": ["awkweb.eth ", "jxom.eth "], + "contributors": [ + "awkweb.eth ", + "jxom.eth " + ], "funding": "https://github.com/sponsors/wevm", "keywords": [ "wagmi", diff --git a/packages/react/src/context.test.tsx b/packages/react/src/context.test.tsx index 7a716ac685..485def6f26 100644 --- a/packages/react/src/context.test.tsx +++ b/packages/react/src/context.test.tsx @@ -1,15 +1,14 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import { render, waitFor } from '@testing-library/react' -import { http, connect, createConfig, mock } from '@wagmi/core' +import { connect, createConfig, http, mock } from '@wagmi/core' import { accounts, addressRegex, config, mainnet } from '@wagmi/test' -import React from 'react' +import { render } from '@wagmi/test/react' import { expect, test } from 'vitest' import { WagmiProvider } from './context.js' import { useAccount } from './hooks/useAccount.js' import { useConnectorClient } from './hooks/useConnectorClient.js' -test('default', () => { +test('default', async () => { function Component() { const { address } = useAccount() const { data } = useConnectorClient() @@ -23,18 +22,18 @@ test('default', () => { } const queryClient = new QueryClient() - const result = render( + const screen = await render( , ) - expect(result.getByRole('heading').innerText).toMatchInlineSnapshot(`"wevm"`) - result.unmount() + await expect.element(screen.getByRole('heading')).toHaveTextContent('wevm') + screen.unmount() }) -test('fake ssr config', () => { +test('fake ssr config', async () => { const config = createConfig({ chains: [mainnet], pollingInterval: 100, @@ -45,21 +44,15 @@ test('fake ssr config', () => { }) const queryClient = new QueryClient() - const result = render( + const screen = await render(

wevm

, ) - expect(result.getAllByRole('heading')).toMatchInlineSnapshot(` - [ -

- wevm -

, - ] - `) - result.unmount() + await expect.element(screen.getByRole('heading')).toHaveTextContent('wevm') + screen.unmount() }) test('mock reconnect', async () => { @@ -87,15 +80,15 @@ test('mock reconnect', async () => { await connect(config, { connector }) const queryClient = new QueryClient() - const result = render( + const screen = await render( , ) - await waitFor(() => - expect(result.getByRole('heading').innerText).toMatch(addressRegex), - ) - result.unmount() + await expect + .element(screen.getByRole('heading')) + .toHaveTextContent(addressRegex) + screen.unmount() }) diff --git a/packages/react/src/experimental/hooks/useWriteContracts.test.ts b/packages/react/src/experimental/hooks/useWriteContracts.test.ts index ea6d4815de..376bd7276a 100644 --- a/packages/react/src/experimental/hooks/useWriteContracts.test.ts +++ b/packages/react/src/experimental/hooks/useWriteContracts.test.ts @@ -1,7 +1,7 @@ import { connect, disconnect } from '@wagmi/core' import { abi, address, config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useWriteContracts } from './useWriteContracts.js' @@ -10,7 +10,7 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useWriteContracts()) + const { result } = await renderHook(() => useWriteContracts()) result.current.writeContracts({ contracts: [ @@ -31,7 +31,7 @@ test('default', async () => { }, ], }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess, 5_000) expect(result.current.data).toMatchInlineSnapshot( ` diff --git a/packages/react/src/exports/actions.test.ts b/packages/react/src/exports/actions.test.ts index eaaedba14f..d180eb8b7c 100644 --- a/packages/react/src/exports/actions.test.ts +++ b/packages/react/src/exports/actions.test.ts @@ -9,15 +9,21 @@ test('exports', () => { "connect", "deployContract", "disconnect", - "estimateGas", "estimateFeesPerGas", + "estimateGas", "estimateMaxPriorityFeePerGas", + "fetchBalance", + "fetchBlockNumber", + "fetchEnsAddress", + "fetchEnsAvatar", + "fetchEnsName", + "fetchEnsResolver", + "fetchToken", + "fetchTransaction", "getAccount", "getBalance", - "fetchBalance", "getBlock", "getBlockNumber", - "fetchBlockNumber", "getBlockTransactionCount", "getBytecode", "getCallsStatus", @@ -26,16 +32,12 @@ test('exports', () => { "getChains", "getClient", "getConnections", - "getConnectors", "getConnectorClient", + "getConnectors", "getEnsAddress", - "fetchEnsAddress", "getEnsAvatar", - "fetchEnsAvatar", "getEnsName", - "fetchEnsName", "getEnsResolver", - "fetchEnsResolver", "getEnsText", "getFeeHistory", "getGasPrice", @@ -43,9 +45,7 @@ test('exports', () => { "getPublicClient", "getStorageAt", "getToken", - "fetchToken", "getTransaction", - "fetchTransaction", "getTransactionConfirmations", "getTransactionCount", "getTransactionReceipt", @@ -67,10 +67,12 @@ test('exports', () => { "verifyMessage", "verifyTypedData", "waitForCallsStatus", + "waitForTransaction", + "waitForTransactionReceipt", "watchAccount", "watchAsset", - "watchBlocks", "watchBlockNumber", + "watchBlocks", "watchChainId", "watchClient", "watchConnections", @@ -78,8 +80,6 @@ test('exports', () => { "watchContractEvent", "watchPendingTransactions", "watchPublicClient", - "waitForTransactionReceipt", - "waitForTransaction", "writeContract", ] `) diff --git a/packages/react/src/exports/actions/experimental.test.ts b/packages/react/src/exports/actions/experimental.test.ts index 7c4b92df8c..4363c84636 100644 --- a/packages/react/src/exports/actions/experimental.test.ts +++ b/packages/react/src/exports/actions/experimental.test.ts @@ -6,19 +6,19 @@ test('exports', () => { expect(Object.keys(experimentalActions)).toMatchInlineSnapshot(` [ "getCallsStatus", - "getCapabilities", - "sendCalls", - "showCallsStatus", - "waitForCallsStatus", - "writeContracts", - "getCallsStatusQueryOptions", "getCallsStatusQueryKey", - "getCapabilitiesQueryOptions", + "getCallsStatusQueryOptions", + "getCapabilities", "getCapabilitiesQueryKey", + "getCapabilitiesQueryOptions", + "sendCalls", "sendCallsMutationOptions", + "showCallsStatus", "showCallsStatusMutationOptions", + "waitForCallsStatus", "waitForCallsStatusQueryKey", "waitForCallsStatusQueryOptions", + "writeContracts", "writeContractsMutationOptions", ] `) diff --git a/packages/react/src/exports/codegen.test.ts b/packages/react/src/exports/codegen.test.ts index 19697cc9a9..ec618b773d 100644 --- a/packages/react/src/exports/codegen.test.ts +++ b/packages/react/src/exports/codegen.test.ts @@ -5,14 +5,14 @@ import * as codegen from './codegen.js' test('exports', () => { expect(Object.keys(codegen)).toMatchInlineSnapshot(` [ - "createSimulateContract", "createReadContract", - "createWatchContractEvent", - "createWriteContract", - "createUseSimulateContract", + "createSimulateContract", "createUseReadContract", + "createUseSimulateContract", "createUseWatchContractEvent", "createUseWriteContract", + "createWatchContractEvent", + "createWriteContract", ] `) }) diff --git a/packages/react/src/exports/codegen.ts b/packages/react/src/exports/codegen.ts index c642f63bcb..2543f77e23 100644 --- a/packages/react/src/exports/codegen.ts +++ b/packages/react/src/exports/codegen.ts @@ -10,17 +10,16 @@ export * from '@wagmi/core/codegen' // Hooks //////////////////////////////////////////////////////////////////////////////// -export { - type CreateUseSimulateContractParameters, - type CreateUseSimulateContractReturnType, - createUseSimulateContract, -} from '../hooks/codegen/createUseSimulateContract.js' - export { type CreateUseReadContractParameters, type CreateUseReadContractReturnType, createUseReadContract, } from '../hooks/codegen/createUseReadContract.js' +export { + type CreateUseSimulateContractParameters, + type CreateUseSimulateContractReturnType, + createUseSimulateContract, +} from '../hooks/codegen/createUseSimulateContract.js' export { type CreateUseWatchContractEventParameters, diff --git a/packages/react/src/exports/connectors.test.ts b/packages/react/src/exports/connectors.test.ts index 6d03486b18..57438966bd 100644 --- a/packages/react/src/exports/connectors.test.ts +++ b/packages/react/src/exports/connectors.test.ts @@ -5,14 +5,14 @@ import * as connectors from './connectors.js' test('exports', () => { expect(Object.keys(connectors)).toMatchInlineSnapshot(` [ - "injected", - "mock", "baseAccount", "coinbaseWallet", + "injected", "metaMask", + "mock", "safe", - "walletConnect", "version", + "walletConnect", ] `) }) diff --git a/packages/react/src/exports/experimental.ts b/packages/react/src/exports/experimental.ts index 996eb56a73..176a13d82d 100644 --- a/packages/react/src/exports/experimental.ts +++ b/packages/react/src/exports/experimental.ts @@ -3,6 +3,14 @@ //////////////////////////////////////////////////////////////////////////////// // biome-ignore lint/performance/noBarrelFile: entrypoint module +export { + /** @deprecated Use `UseSendCallsParameters` instead. */ + type UseWriteContractsParameters, + /** @deprecated Use `UseSendCallsReturnType` instead. */ + type UseWriteContractsReturnType, + /** @deprecated Use `useSendCalls` instead. */ + useWriteContracts, +} from '../experimental/hooks/useWriteContracts.js' export { /** @deprecated This is no longer experimental – use `import type { UseCallsStatusParameters } from 'wagmi'` instead. */ type UseCallsStatusParameters, @@ -11,7 +19,6 @@ export { /** @deprecated This is no longer experimental – use `import { useCallsStatus } from 'wagmi'` instead. */ useCallsStatus, } from '../hooks/useCallsStatus.js' - export { /** @deprecated This is no longer experimental – use `import type { UseCapabilitiesParameters } from 'wagmi'` instead. */ type UseCapabilitiesParameters, @@ -20,7 +27,6 @@ export { /** @deprecated This is no longer experimental – use `import { useCapabilities } from 'wagmi'` instead. */ useCapabilities, } from '../hooks/useCapabilities.js' - export { /** @deprecated This is no longer experimental – use `import type { UseSendCallsParameters } from 'wagmi'` instead. */ type UseSendCallsParameters, @@ -29,7 +35,6 @@ export { /** @deprecated This is no longer experimental – use `import { useSendCalls } from 'wagmi'` instead. */ useSendCalls, } from '../hooks/useSendCalls.js' - export { /** @deprecated This is no longer experimental – use `import type { UseShowCallsStatusParameters } from 'wagmi'` instead. */ type UseShowCallsStatusParameters, @@ -38,7 +43,6 @@ export { /** @deprecated This is no longer experimental – use `import { useShowCallsStatus } from 'wagmi'` instead. */ useShowCallsStatus, } from '../hooks/useShowCallsStatus.js' - export { /** @deprecated This is no longer experimental – use `import type { UseWaitForCallsStatusParameters } from 'wagmi'` instead. */ type UseWaitForCallsStatusParameters, @@ -47,12 +51,3 @@ export { /** @deprecated This is no longer experimental – use `import { useWaitForCallsStatus } from 'wagmi'` instead. */ useWaitForCallsStatus, } from '../hooks/useWaitForCallsStatus.js' - -export { - /** @deprecated Use `UseSendCallsParameters` instead. */ - type UseWriteContractsParameters, - /** @deprecated Use `UseSendCallsReturnType` instead. */ - type UseWriteContractsReturnType, - /** @deprecated Use `useSendCalls` instead. */ - useWriteContracts, -} from '../experimental/hooks/useWriteContracts.js' diff --git a/packages/react/src/exports/index.test.ts b/packages/react/src/exports/index.test.ts index d8d6f7c6d5..6b20bcfbdd 100644 --- a/packages/react/src/exports/index.test.ts +++ b/packages/react/src/exports/index.test.ts @@ -5,12 +5,38 @@ import * as react from './index.js' test('exports', () => { expect(Object.keys(react)).toMatchInlineSnapshot(` [ - "WagmiContext", - "WagmiProvider", + "BaseError", + "ChainNotConfiguredError", + "ConnectorAccountNotFoundError", + "ConnectorAlreadyConnectedError", + "ConnectorChainMismatchError", + "ConnectorNotFoundError", + "ConnectorUnavailableReconnectingError", "Context", + "Hydrate", + "ProviderNotFoundError", + "SwitchChainNotSupportedError", "WagmiConfig", - "BaseError", + "WagmiContext", + "WagmiProvider", "WagmiProviderNotFoundError", + "cookieStorage", + "cookieToInitialState", + "createConfig", + "createConnector", + "createStorage", + "custom", + "deepEqual", + "deserialize", + "fallback", + "http", + "injected", + "mock", + "noopStorage", + "normalizeChainId", + "parseCookie", + "serialize", + "unstable_connector", "useAccount", "useAccountEffect", "useBalance", @@ -18,17 +44,21 @@ test('exports', () => { "useBlockNumber", "useBlockTransactionCount", "useBytecode", + "useCall", "useCallsStatus", "useCapabilities", - "useCall", "useChainId", "useChains", "useClient", "useConfig", "useConnect", "useConnections", - "useConnectors", "useConnectorClient", + "useConnectors", + "useContractInfiniteReads", + "useContractRead", + "useContractReads", + "useContractWrite", "useDeployContract", "useDisconnect", "useEnsAddress", @@ -37,20 +67,17 @@ test('exports', () => { "useEnsResolver", "useEnsText", "useEstimateFeesPerGas", - "useFeeData", "useEstimateGas", "useEstimateMaxPriorityFeePerGas", + "useFeeData", "useFeeHistory", "useGasPrice", "useInfiniteReadContracts", - "useContractInfiniteReads", "usePrepareTransactionRequest", "useProof", "usePublicClient", "useReadContract", - "useContractRead", "useReadContracts", - "useContractReads", "useReconnect", "useSendCalls", "useSendTransaction", @@ -68,44 +95,17 @@ test('exports', () => { "useTransactionReceipt", "useVerifyMessage", "useVerifyTypedData", - "useWalletClient", "useWaitForCallsStatus", "useWaitForTransactionReceipt", + "useWalletClient", "useWatchAsset", - "useWatchBlocks", "useWatchBlockNumber", + "useWatchBlocks", "useWatchContractEvent", "useWatchPendingTransactions", "useWriteContract", - "useContractWrite", - "Hydrate", - "createConfig", - "createConnector", - "injected", - "mock", - "ChainNotConfiguredError", - "ConnectorAlreadyConnectedError", - "ConnectorNotFoundError", - "ConnectorAccountNotFoundError", - "ConnectorChainMismatchError", - "ConnectorUnavailableReconnectingError", - "ProviderNotFoundError", - "SwitchChainNotSupportedError", - "createStorage", - "noopStorage", - "custom", - "fallback", - "http", - "webSocket", - "unstable_connector", - "cookieStorage", - "cookieToInitialState", - "deepEqual", - "deserialize", - "normalizeChainId", - "parseCookie", - "serialize", "version", + "webSocket", ] `) }) diff --git a/packages/react/src/exports/index.ts b/packages/react/src/exports/index.ts index a4b8502982..cfe2ac15b5 100644 --- a/packages/react/src/exports/index.ts +++ b/packages/react/src/exports/index.ts @@ -4,24 +4,24 @@ // biome-ignore lint/performance/noBarrelFile: entrypoint module export { - type WagmiProviderProps, WagmiContext, - WagmiProvider, /** @deprecated Use `WagmiContext` instead */ WagmiContext as Context, + WagmiProvider, /** @deprecated Use `WagmiProvider` instead */ WagmiProvider as WagmiConfig, + type WagmiProviderProps, } from '../context.js' //////////////////////////////////////////////////////////////////////////////// // Errors //////////////////////////////////////////////////////////////////////////////// -export { type BaseErrorType, BaseError } from '../errors/base.js' +export { BaseError, type BaseErrorType } from '../errors/base.js' export { - type WagmiProviderNotFoundErrorType, WagmiProviderNotFoundError, + type WagmiProviderNotFoundErrorType, } from '../errors/context.js' //////////////////////////////////////////////////////////////////////////////// @@ -68,25 +68,22 @@ export { type UseBytecodeReturnType, useBytecode, } from '../hooks/useBytecode.js' - +export { + type UseCallParameters, + type UseCallReturnType, + useCall, +} from '../hooks/useCall.js' export { type UseCallsStatusParameters, type UseCallsStatusReturnType, useCallsStatus, } from '../hooks/useCallsStatus.js' - export { type UseCapabilitiesParameters, type UseCapabilitiesReturnType, useCapabilities, } from '../hooks/useCapabilities.js' -export { - type UseCallParameters, - type UseCallReturnType, - useCall, -} from '../hooks/useCall.js' - export { type UseChainIdParameters, type UseChainIdReturnType, @@ -122,18 +119,16 @@ export { type UseConnectionsReturnType, useConnections, } from '../hooks/useConnections.js' - -export { - type UseConnectorsParameters, - type UseConnectorsReturnType, - useConnectors, -} from '../hooks/useConnectors.js' - export { type UseConnectorClientParameters, type UseConnectorClientReturnType, useConnectorClient, } from '../hooks/useConnectorClient.js' +export { + type UseConnectorsParameters, + type UseConnectorsReturnType, + useConnectors, +} from '../hooks/useConnectors.js' export { type UseDeployContractParameters, @@ -353,42 +348,37 @@ export { type UseVerifyTypedDataReturnType, useVerifyTypedData, } from '../hooks/useVerifyTypedData.js' - -export { - type UseWalletClientParameters, - type UseWalletClientReturnType, - useWalletClient, -} from '../hooks/useWalletClient.js' - export { type UseWaitForCallsStatusParameters, type UseWaitForCallsStatusReturnType, useWaitForCallsStatus, } from '../hooks/useWaitForCallsStatus.js' - export { type UseWaitForTransactionReceiptParameters, type UseWaitForTransactionReceiptReturnType, useWaitForTransactionReceipt, } from '../hooks/useWaitForTransactionReceipt.js' +export { + type UseWalletClientParameters, + type UseWalletClientReturnType, + useWalletClient, +} from '../hooks/useWalletClient.js' export { type UseWatchAssetParameters, type UseWatchAssetReturnType, useWatchAsset, } from '../hooks/useWatchAsset.js' - -export { - type UseWatchBlocksParameters, - type UseWatchBlocksReturnType, - useWatchBlocks, -} from '../hooks/useWatchBlocks.js' - export { type UseWatchBlockNumberParameters, type UseWatchBlockNumberReturnType, useWatchBlockNumber, } from '../hooks/useWatchBlockNumber.js' +export { + type UseWatchBlocksParameters, + type UseWatchBlocksReturnType, + useWatchBlocks, +} from '../hooks/useWatchBlocks.js' export { type UseWatchContractEventParameters, @@ -415,8 +405,8 @@ export { //////////////////////////////////////////////////////////////////////////////// export { - type HydrateProps, Hydrate, + type HydrateProps, } from '../hydrate.js' //////////////////////////////////////////////////////////////////////////////// @@ -424,60 +414,60 @@ export { //////////////////////////////////////////////////////////////////////////////// export { + ChainNotConfiguredError, + // Errors + type ChainNotConfiguredErrorType, + type Config, // Config type Connection, type Connector, - type Config, - type CreateConfigParameters, - type PartializedState, - type State, - createConfig, + ConnectorAccountNotFoundError, + type ConnectorAccountNotFoundErrorType, + ConnectorAlreadyConnectedError, + type ConnectorAlreadyConnectedErrorType, + ConnectorChainMismatchError, + type ConnectorChainMismatchErrorType, // Connector type ConnectorEventMap, - type CreateConnectorFn, - createConnector, - injected, - mock, - // Errors - type ChainNotConfiguredErrorType, - ChainNotConfiguredError, - type ConnectorAlreadyConnectedErrorType, - ConnectorAlreadyConnectedError, - type ConnectorNotFoundErrorType, ConnectorNotFoundError, - type ConnectorAccountNotFoundErrorType, - ConnectorAccountNotFoundError, - type ConnectorChainMismatchErrorType, - ConnectorChainMismatchError, - type ConnectorUnavailableReconnectingErrorType, + type ConnectorNotFoundErrorType, ConnectorUnavailableReconnectingError, - type ProviderNotFoundErrorType, - ProviderNotFoundError, - type SwitchChainNotSupportedErrorType, - SwitchChainNotSupportedError, + type ConnectorUnavailableReconnectingErrorType, + type CreateConfigParameters, + type CreateConnectorFn, // Storage type CreateStorageParameters, - type Storage, + // Utilities + cookieStorage, + cookieToInitialState, + createConfig, + createConnector, createStorage, - noopStorage, // Transports custom, + deepEqual, + deserialize, fallback, http, - webSocket, - unstable_connector, - type Transport, + injected, + mock, + noopStorage, + normalizeChainId, + type PartializedState, + ProviderNotFoundError, + type ProviderNotFoundErrorType, + parseCookie, // Types type Register, type ResolvedRegister, - // Utilities - cookieStorage, - cookieToInitialState, - deepEqual, - deserialize, - normalizeChainId, - parseCookie, + type State, + type Storage, + SwitchChainNotSupportedError, + type SwitchChainNotSupportedErrorType, serialize, + type Transport, + unstable_connector, + webSocket, } from '@wagmi/core' //////////////////////////////////////////////////////////////////////////////// diff --git a/packages/react/src/exports/query.test.ts b/packages/react/src/exports/query.test.ts index 002b6abaab..3f401a409e 100644 --- a/packages/react/src/exports/query.test.ts +++ b/packages/react/src/exports/query.test.ts @@ -18,10 +18,10 @@ test('exports', () => { "estimateMaxPriorityFeePerGasQueryOptions", "getBalanceQueryKey", "getBalanceQueryOptions", - "getBlockQueryKey", - "getBlockQueryOptions", "getBlockNumberQueryKey", "getBlockNumberQueryOptions", + "getBlockQueryKey", + "getBlockQueryOptions", "getBlockTransactionCountQueryKey", "getBlockTransactionCountQueryOptions", "getBytecodeQueryKey", @@ -52,16 +52,17 @@ test('exports', () => { "getStorageAtQueryOptions", "getTokenQueryKey", "getTokenQueryOptions", - "getTransactionQueryKey", - "getTransactionQueryOptions", "getTransactionConfirmationsQueryKey", "getTransactionConfirmationsQueryOptions", "getTransactionCountQueryKey", "getTransactionCountQueryOptions", + "getTransactionQueryKey", + "getTransactionQueryOptions", "getTransactionReceiptQueryKey", "getTransactionReceiptQueryOptions", "getWalletClientQueryKey", "getWalletClientQueryOptions", + "hashFn", "infiniteReadContractsQueryKey", "infiniteReadContractsQueryOptions", "prepareTransactionRequestQueryKey", @@ -72,14 +73,18 @@ test('exports', () => { "readContractsQueryOptions", "reconnectMutationOptions", "sendCallsMutationOptions", - "showCallsStatusMutationOptions", "sendTransactionMutationOptions", + "showCallsStatusMutationOptions", "signMessageMutationOptions", "signTypedDataMutationOptions", - "switchAccountMutationOptions", "simulateContractQueryKey", "simulateContractQueryOptions", + "structuralSharing", + "switchAccountMutationOptions", "switchChainMutationOptions", + "useInfiniteQuery", + "useMutation", + "useQuery", "verifyMessageQueryKey", "verifyMessageQueryOptions", "verifyTypedDataQueryKey", @@ -90,11 +95,6 @@ test('exports', () => { "waitForTransactionReceiptQueryOptions", "watchAssetMutationOptions", "writeContractMutationOptions", - "hashFn", - "structuralSharing", - "useInfiniteQuery", - "useMutation", - "useQuery", ] `) }) diff --git a/packages/react/src/hooks/codegen/createUseReadContract.test.ts b/packages/react/src/hooks/codegen/createUseReadContract.test.ts index 4419c030c5..e9f69bf14a 100644 --- a/packages/react/src/hooks/codegen/createUseReadContract.test.ts +++ b/packages/react/src/hooks/codegen/createUseReadContract.test.ts @@ -1,6 +1,6 @@ import { abi, address, chain } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { createUseReadContract } from './createUseReadContract.js' @@ -10,14 +10,14 @@ test('default', async () => { abi: abi.wagmiMintExample, }) - const { result } = renderHook(() => + const { result } = await renderHook(() => useReadWagmiMintExample({ functionName: 'balanceOf', args: ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'], }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -69,7 +69,7 @@ test('multichain', async () => { abi: abi.wagmiMintExample, }) - const { result } = renderHook(() => + const { result } = await renderHook(() => useReadWagmiMintExample({ functionName: 'balanceOf', args: ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'], @@ -77,7 +77,7 @@ test('multichain', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -127,13 +127,13 @@ test('functionName', async () => { functionName: 'balanceOf', }) - const { result } = renderHook(() => + const { result } = await renderHook(() => useReadWagmiMintExampleBalanceOf({ args: ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'], }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/codegen/createUseSimulateContract.test.ts b/packages/react/src/hooks/codegen/createUseSimulateContract.test.ts index c6e70b90ca..851620192d 100644 --- a/packages/react/src/hooks/codegen/createUseSimulateContract.test.ts +++ b/packages/react/src/hooks/codegen/createUseSimulateContract.test.ts @@ -1,7 +1,7 @@ import { connect, disconnect } from '@wagmi/core' import { abi, address, chain, config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { createUseSimulateContract } from './createUseSimulateContract.js' @@ -15,13 +15,13 @@ test('default', async () => { abi: abi.wagmiMintExample, }) - const { result } = renderHook(() => + const { result } = await renderHook(() => useSimulateWagmiMintExample({ functionName: 'mint', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) expect(result.current).toMatchInlineSnapshot(` { @@ -101,14 +101,14 @@ test('multichain', async () => { abi: abi.wagmiMintExample, }) - const { result } = renderHook(() => + const { result } = await renderHook(() => useReadWagmiMintExample({ functionName: 'mint', chainId: chain.mainnet2.id, }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) expect(result.current).toMatchInlineSnapshot(` { @@ -186,9 +186,9 @@ test('functionName', async () => { functionName: 'mint', }) - const { result } = renderHook(() => useSimulateWagmiMintExample({})) + const { result } = await renderHook(() => useSimulateWagmiMintExample({})) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/codegen/createUseWatchContractEvent.test-d.ts b/packages/react/src/hooks/codegen/createUseWatchContractEvent.test-d.ts index b3a69775b8..6bf08774d8 100644 --- a/packages/react/src/hooks/codegen/createUseWatchContractEvent.test-d.ts +++ b/packages/react/src/hooks/codegen/createUseWatchContractEvent.test-d.ts @@ -1,4 +1,4 @@ -import { http, createConfig, webSocket } from '@wagmi/core' +import { createConfig, http, webSocket } from '@wagmi/core' import { abi, mainnet, optimism } from '@wagmi/test' import { expectTypeOf, test } from 'vitest' diff --git a/packages/react/src/hooks/useAccount.test.ts b/packages/react/src/hooks/useAccount.test.ts index 3c4af3c3f9..91ea8b6cf9 100644 --- a/packages/react/src/hooks/useAccount.test.ts +++ b/packages/react/src/hooks/useAccount.test.ts @@ -1,13 +1,13 @@ import { connect, disconnect } from '@wagmi/core' import { config } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' -import { Fragment, createElement } from 'react' +import * as React from 'react' import { expect, test } from 'vitest' import { useAccount } from './useAccount.js' test('default', async () => { - const { result, rerender } = renderHook(() => useAccount()) + const { result, rerender } = await renderHook(() => useAccount()) expect(result.current.address).not.toBeDefined() expect(result.current.status).toEqual('disconnected') @@ -21,9 +21,10 @@ test('default', async () => { await disconnect(config) }) -test('parameters: config', () => { - const { result } = renderHook(() => useAccount({ config }), { - wrapper: ({ children }) => createElement(Fragment, { children }), +test('parameters: config', async () => { + const { result } = await renderHook(() => useAccount({ config }), { + wrapper: ({ children }) => + React.createElement(React.Fragment, { children }), }) expect(result.current).toBeDefined() }) diff --git a/packages/react/src/hooks/useAccount.ts b/packages/react/src/hooks/useAccount.ts index c7c1779469..acabfdfa5d 100644 --- a/packages/react/src/hooks/useAccount.ts +++ b/packages/react/src/hooks/useAccount.ts @@ -3,8 +3,8 @@ import { type Config, type GetAccountReturnType, - type ResolvedRegister, getAccount, + type ResolvedRegister, watchAccount, } from '@wagmi/core' diff --git a/packages/react/src/hooks/useAccountEffect.test.ts b/packages/react/src/hooks/useAccountEffect.test.ts index b252ee0f98..415a2be039 100644 --- a/packages/react/src/hooks/useAccountEffect.test.ts +++ b/packages/react/src/hooks/useAccountEffect.test.ts @@ -1,8 +1,8 @@ import { mock } from '@wagmi/connectors' -import { http, connect, createConfig, disconnect } from '@wagmi/core' +import { connect, createConfig, disconnect, http } from '@wagmi/core' import { accounts, chain, config } from '@wagmi/test' -import { createWrapper, renderHook, waitFor } from '@wagmi/test/react' -import { Fragment, createElement } from 'react' +import { createWrapper, renderHook } from '@wagmi/test/react' +import { createElement, Fragment } from 'react' import { expect, test, vi } from 'vitest' import { WagmiProvider } from '../context.js' @@ -10,8 +10,8 @@ import { useAccountEffect } from './useAccountEffect.js' import { useConnect } from './useConnect.js' import { useDisconnect } from './useDisconnect.js' -test('parameters: config', () => { - const { result } = renderHook(() => useAccountEffect({ config }), { +test('parameters: config', async () => { + const { result } = await renderHook(() => useAccountEffect({ config }), { wrapper: ({ children }) => createElement(Fragment, { children }), }) expect(result.current).toBeUndefined() @@ -21,7 +21,7 @@ test('behavior: connect and disconnect called once', async () => { const onConnect = vi.fn() const onDisconnect = vi.fn() - const { result } = renderHook(() => ({ + const { result } = await renderHook(() => ({ useAccountEffect: useAccountEffect({ onConnect, onDisconnect }), useConnect: useConnect(), useDisconnect: useDisconnect(), @@ -30,19 +30,23 @@ test('behavior: connect and disconnect called once', async () => { result.current.useConnect.connect({ connector: result.current.useConnect.connectors[0]!, }) - await waitFor(() => expect(result.current.useConnect.isSuccess).toBeTruthy()) + await vi.waitFor(() => + expect(result.current.useConnect.isSuccess).toBeTruthy(), + ) result.current.useConnect.connect({ connector: result.current.useConnect.connectors[0]!, }) - await waitFor(() => expect(result.current.useConnect.isSuccess).toBeTruthy()) + await vi.waitFor(() => + expect(result.current.useConnect.isSuccess).toBeTruthy(), + ) result.current.useDisconnect.disconnect() - await waitFor(() => + await vi.waitFor(() => expect(result.current.useDisconnect.isSuccess).toBeTruthy(), ) result.current.useDisconnect.disconnect() - await waitFor(() => + await vi.waitFor(() => expect(result.current.useDisconnect.isSuccess).toBeTruthy(), ) @@ -71,7 +75,7 @@ test('behavior: connect called on reconnect', async () => { wrapper: createWrapper(WagmiProvider, { config, reconnectOnMount: true }), }) - await waitFor(() => expect(onConnect).toBeCalledTimes(1)) + await vi.waitFor(() => expect(onConnect).toBeCalledTimes(1)) await disconnect(config) }) diff --git a/packages/react/src/hooks/useBalance.test.ts b/packages/react/src/hooks/useBalance.test.ts index ba7f857808..b4b6f59e21 100644 --- a/packages/react/src/hooks/useBalance.test.ts +++ b/packages/react/src/hooks/useBalance.test.ts @@ -1,7 +1,7 @@ import { accounts, chain, testClient, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import { type Address, parseEther } from 'viem' -import { beforeEach, expect, test } from 'vitest' +import { beforeEach, expect, test, vi } from 'vitest' import { useBalance } from './useBalance.js' @@ -15,9 +15,9 @@ beforeEach(async () => { }) test('default', async () => { - const { result } = renderHook(() => useBalance({ address })) + const { result } = await renderHook(() => useBalance({ address })) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toMatchObject( @@ -65,11 +65,11 @@ test('default', async () => { }) test('parameters: chainId', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useBalance({ address, chainId: chain.mainnet2.id }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -114,14 +114,14 @@ test('parameters: chainId', async () => { }) test('parameters: token', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useBalance({ address: '0x4557B18E779944BFE9d78A672452331C186a9f48', token: '0x6B175474E89094C44Da98b954EedeAC495271d0F', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -167,11 +167,11 @@ test('parameters: token', async () => { }) test('parameters: unit', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useBalance({ address, chainId: chain.mainnet2.id, unit: 'wei' }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -217,9 +217,9 @@ test('parameters: unit', async () => { }) test('behavior: address: undefined -> defined', async () => { - let address: Address | undefined = undefined + let address: Address | undefined - const { result, rerender } = renderHook(() => useBalance({ address })) + const { result, rerender } = await renderHook(() => useBalance({ address })) expect(result.current).toMatchInlineSnapshot(` { @@ -260,7 +260,7 @@ test('behavior: address: undefined -> defined', async () => { address = accounts[0] rerender() - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -305,8 +305,8 @@ test('behavior: address: undefined -> defined', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useBalance()) + const { result } = await renderHook(() => useBalance()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useBalance.ts b/packages/react/src/hooks/useBalance.ts index 93568089f7..2ba41e60a5 100644 --- a/packages/react/src/hooks/useBalance.ts +++ b/packages/react/src/hooks/useBalance.ts @@ -2,13 +2,13 @@ import type { Config, GetBalanceErrorType, ResolvedRegister } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' +import type { GetBalanceQueryFnData } from '@wagmi/core/query' import { type GetBalanceData, type GetBalanceOptions, type GetBalanceQueryKey, getBalanceQueryOptions, } from '@wagmi/core/query' -import type { GetBalanceQueryFnData } from '@wagmi/core/query' import type { ConfigParameter, QueryParameter } from '../types/properties.js' import { type UseQueryReturnType, useQuery } from '../utils/query.js' diff --git a/packages/react/src/hooks/useBlock.test-d.ts b/packages/react/src/hooks/useBlock.test-d.ts index 04aae75076..60db00facb 100644 --- a/packages/react/src/hooks/useBlock.test-d.ts +++ b/packages/react/src/hooks/useBlock.test-d.ts @@ -1,4 +1,4 @@ -import { http, createConfig, webSocket } from '@wagmi/core' +import { createConfig, http, webSocket } from '@wagmi/core' import { mainnet, optimism } from '@wagmi/core/chains' import { expectTypeOf, test } from 'vitest' diff --git a/packages/react/src/hooks/useBlock.test.ts b/packages/react/src/hooks/useBlock.test.ts index 0d2095ec61..64a0a6c6ec 100644 --- a/packages/react/src/hooks/useBlock.test.ts +++ b/packages/react/src/hooks/useBlock.test.ts @@ -1,13 +1,13 @@ import { testClient } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useBlock } from './useBlock.js' test('mounts', async () => { - const { result } = renderHook(() => useBlock()) + const { result } = await renderHook(() => useBlock()) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) const { data, ...rest } = result.current expect(data).toBeDefined() @@ -49,19 +49,19 @@ test('mounts', async () => { test('parameters: watch', async () => { await testClient.mainnet.restart() - const { result } = renderHook(() => useBlock({ watch: true })) + const { result } = await renderHook(() => useBlock({ watch: true })) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const block = result.current.data! expect(block).toBeDefined() await testClient.mainnet.mine({ blocks: 1 }) - await waitFor(() => { + await vi.waitFor(() => { expect(result.current.data?.number).toEqual(block.number + 1n) }) await testClient.mainnet.mine({ blocks: 1 }) - await waitFor(() => { + await vi.waitFor(() => { expect(result.current.data?.number).toEqual(block.number + 2n) }) }) diff --git a/packages/react/src/hooks/useBlockNumber.test-d.ts b/packages/react/src/hooks/useBlockNumber.test-d.ts index dfb4ca4dbe..6d1c406734 100644 --- a/packages/react/src/hooks/useBlockNumber.test-d.ts +++ b/packages/react/src/hooks/useBlockNumber.test-d.ts @@ -1,4 +1,4 @@ -import { http, createConfig, webSocket } from '@wagmi/core' +import { createConfig, http, webSocket } from '@wagmi/core' import { mainnet, optimism } from '@wagmi/core/chains' import { expectTypeOf, test } from 'vitest' diff --git a/packages/react/src/hooks/useBlockNumber.test.ts b/packages/react/src/hooks/useBlockNumber.test.ts index 93006a6663..325895251d 100644 --- a/packages/react/src/hooks/useBlockNumber.test.ts +++ b/packages/react/src/hooks/useBlockNumber.test.ts @@ -1,15 +1,15 @@ import { testClient } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useBlockNumber } from './useBlockNumber.js' test('mounts', async () => { await testClient.mainnet.resetFork() - const { result } = renderHook(() => useBlockNumber()) + const { result } = await renderHook(() => useBlockNumber()) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -50,19 +50,19 @@ test('mounts', async () => { test('parameters: watch', async () => { await testClient.mainnet.restart() - const { result } = renderHook(() => useBlockNumber({ watch: true })) + const { result } = await renderHook(() => useBlockNumber({ watch: true })) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const blockNumber = result.current.data! - expect(result.current.data).toMatchInlineSnapshot('19258213n') + expect(result.current.data).toBeTypeOf('bigint') await testClient.mainnet.mine({ blocks: 1 }) - await waitFor(() => { + await vi.waitFor(() => { expect(result.current.data).toEqual(blockNumber + 1n) }) await testClient.mainnet.mine({ blocks: 1 }) - await waitFor(() => { + await vi.waitFor(() => { expect(result.current.data).toEqual(blockNumber + 2n) }) }) diff --git a/packages/react/src/hooks/useBlockTransactionCount.test.ts b/packages/react/src/hooks/useBlockTransactionCount.test.ts index dad6c95506..2fd9fc1f38 100644 --- a/packages/react/src/hooks/useBlockTransactionCount.test.ts +++ b/packages/react/src/hooks/useBlockTransactionCount.test.ts @@ -1,13 +1,13 @@ import { chain } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useBlockTransactionCount } from './useBlockTransactionCount.js' test('default', async () => { - const { result } = renderHook(() => useBlockTransactionCount({})) + const { result } = await renderHook(() => useBlockTransactionCount({})) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('number') @@ -47,11 +47,11 @@ test('default', async () => { }) test('parameters: chainId', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useBlockTransactionCount({ chainId: chain.mainnet2.id }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('number') @@ -91,11 +91,11 @@ test('parameters: chainId', async () => { }) test('parameters: blockNumber', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useBlockTransactionCount({ blockNumber: 13677382n }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('number') @@ -136,14 +136,14 @@ test('parameters: blockNumber', async () => { }) test('parameters: blockHash', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useBlockTransactionCount({ blockHash: '0x6201f37a245850d1f11e4be3ac45bc51bd9d43ee4a127192cad550f351cfa575', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('number') @@ -184,13 +184,13 @@ test('parameters: blockHash', async () => { }) test('parameters: blockTag', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useBlockTransactionCount({ blockTag: 'safe', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('number') diff --git a/packages/react/src/hooks/useBytecode.test-d.ts b/packages/react/src/hooks/useBytecode.test-d.ts index eff094e710..ba290ab09a 100644 --- a/packages/react/src/hooks/useBytecode.test-d.ts +++ b/packages/react/src/hooks/useBytecode.test-d.ts @@ -1,6 +1,5 @@ -import { expectTypeOf, test } from 'vitest' - import type { Hex } from 'viem' +import { expectTypeOf, test } from 'vitest' import { useBytecode } from './useBytecode.js' test('select data', () => { diff --git a/packages/react/src/hooks/useBytecode.test.ts b/packages/react/src/hooks/useBytecode.test.ts index 4c25fa9558..c0967e03ce 100644 --- a/packages/react/src/hooks/useBytecode.test.ts +++ b/packages/react/src/hooks/useBytecode.test.ts @@ -1,18 +1,17 @@ import { address, chain, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' - +import { renderHook } from '@wagmi/test/react' import type { Address } from 'viem' +import { expect, test, vi } from 'vitest' import { useBytecode } from './useBytecode.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useBytecode({ address: address.wagmiMintExample, }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(rest).toMatchInlineSnapshot(` @@ -53,14 +52,14 @@ test('default', async () => { }) test('parameters: blockNumber', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useBytecode({ address: address.wagmiMintExample, blockNumber: 15564163n, }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -101,14 +100,14 @@ test('parameters: blockNumber', async () => { }) test('parameters: blockTag', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useBytecode({ address: address.wagmiMintExample, blockTag: 'earliest', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -149,14 +148,14 @@ test('parameters: blockTag', async () => { }) test('parameters: chainId', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useBytecode({ address: address.wagmiMintExample, chainId: chain.optimism.id, }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -196,12 +195,12 @@ test('parameters: chainId', async () => { }) test('behavior: address: undefined -> defined', async () => { - let contractAddress: Address | undefined = undefined - - const { result, rerender } = renderHook(() => - useBytecode({ - address: contractAddress, - }), + const { result, rerender } = await renderHook( + (props) => + useBytecode({ + address: props?.address, + }), + { initialProps: { address: undefined as Address | undefined } }, ) expect(result.current).toMatchInlineSnapshot(` @@ -240,10 +239,9 @@ test('behavior: address: undefined -> defined', async () => { } `) - contractAddress = address.wagmiMintExample - rerender() + rerender({ address: address.wagmiMintExample }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(rest).toMatchInlineSnapshot(` @@ -284,8 +282,8 @@ test('behavior: address: undefined -> defined', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useBytecode()) + const { result } = await renderHook(() => useBytecode()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useBytecode.ts b/packages/react/src/hooks/useBytecode.ts index 3dd01d438a..a850ed536a 100644 --- a/packages/react/src/hooks/useBytecode.ts +++ b/packages/react/src/hooks/useBytecode.ts @@ -6,13 +6,13 @@ import type { ResolvedRegister, } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' +import type { GetBytecodeQueryFnData } from '@wagmi/core/query' import { type GetBytecodeData, type GetBytecodeOptions, type GetBytecodeQueryKey, getBytecodeQueryOptions, } from '@wagmi/core/query' -import type { GetBytecodeQueryFnData } from '@wagmi/core/query' import type { ConfigParameter, QueryParameter } from '../types/properties.js' import { type UseQueryReturnType, useQuery } from '../utils/query.js' import { useChainId } from './useChainId.js' diff --git a/packages/react/src/hooks/useCall.test.ts b/packages/react/src/hooks/useCall.test.ts index ee8ce813c4..03fd467881 100644 --- a/packages/react/src/hooks/useCall.test.ts +++ b/packages/react/src/hooks/useCall.test.ts @@ -1,6 +1,6 @@ import { accounts, address, chain } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useCall } from './useCall.js' @@ -9,7 +9,7 @@ const name4bytes = '0x06fdde03' const account = accounts[0] test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useCall({ account, data: name4bytes, @@ -17,7 +17,7 @@ test('default', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -62,7 +62,7 @@ test('default', async () => { // TODO: Re-enable test.skip('parameters: blockTag', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useCall({ account, data: name4bytes, @@ -71,7 +71,7 @@ test.skip('parameters: blockTag', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -117,7 +117,7 @@ test.skip('parameters: blockTag', async () => { // TODO: Re-enable test.skip('parameters: blockNumber', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useCall({ account, data: name4bytes, @@ -126,7 +126,7 @@ test.skip('parameters: blockNumber', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -171,7 +171,7 @@ test.skip('parameters: blockNumber', async () => { }) test('parameters: chainId', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useCall({ account, data: name4bytes, @@ -180,7 +180,7 @@ test('parameters: chainId', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/useCall.ts b/packages/react/src/hooks/useCall.ts index 423e04fbff..744268a70d 100644 --- a/packages/react/src/hooks/useCall.ts +++ b/packages/react/src/hooks/useCall.ts @@ -2,13 +2,13 @@ import type { CallErrorType, Config, ResolvedRegister } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' +import type { CallQueryFnData } from '@wagmi/core/query' import { type CallData, type CallOptions, type CallQueryKey, callQueryOptions, } from '@wagmi/core/query' -import type { CallQueryFnData } from '@wagmi/core/query' import type { ConfigParameter, QueryParameter } from '../types/properties.js' import { type UseQueryReturnType, useQuery } from '../utils/query.js' diff --git a/packages/react/src/hooks/useCallsStatus.test.ts b/packages/react/src/hooks/useCallsStatus.test.ts index f3af1c24bc..c34452987f 100644 --- a/packages/react/src/hooks/useCallsStatus.test.ts +++ b/packages/react/src/hooks/useCallsStatus.test.ts @@ -1,8 +1,8 @@ import { connect, disconnect } from '@wagmi/core' import { accounts, config, testClient } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import { parseEther } from 'viem' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useCallsStatus } from './useCallsStatus.js' import { useSendCalls } from './useSendCalls.js' @@ -12,7 +12,7 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useSendCalls()) + const { result } = await renderHook(() => useSendCalls()) result.current.sendCalls({ calls: [ @@ -31,12 +31,12 @@ test('default', async () => { }, ], }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) - const { result: result_2 } = renderHook(() => + const { result: result_2 } = await renderHook(() => useCallsStatus({ id: result.current.data?.id! }), ) - await waitFor(() => expect(result_2.current.isSuccess).toBeTruthy()) + await vi.waitFor(() => expect(result_2.current.isSuccess).toBeTruthy()) expect(result_2.current.data).toMatchInlineSnapshot( ` @@ -54,10 +54,10 @@ test('default', async () => { await testClient.mainnet.mine({ blocks: 1 }) - const { result: result_3 } = renderHook(() => + const { result: result_3 } = await renderHook(() => useCallsStatus({ id: result.current.data?.id! }), ) - await waitFor(() => expect(result_3.current.isSuccess).toBeTruthy()) + await vi.waitFor(() => expect(result_3.current.isSuccess).toBeTruthy()) expect(result_3.current.data?.status).toBe('success') expect(result_3.current.data?.statusCode).toBe(200) diff --git a/packages/react/src/hooks/useCapabilities.test.ts b/packages/react/src/hooks/useCapabilities.test.ts index 65dcf171b5..0ac6b9c050 100644 --- a/packages/react/src/hooks/useCapabilities.test.ts +++ b/packages/react/src/hooks/useCapabilities.test.ts @@ -1,7 +1,7 @@ import { connect, disconnect } from '@wagmi/core' import { accounts, config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useCapabilities } from './useCapabilities.js' @@ -10,9 +10,9 @@ const connector = config.connectors[0]! test('mounts', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useCapabilities()) + const { result } = await renderHook(() => useCapabilities()) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -69,9 +69,11 @@ test('mounts', async () => { test('args: account', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useCapabilities({ account: accounts[1] })) + const { result } = await renderHook(() => + useCapabilities({ account: accounts[1] }), + ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -126,9 +128,9 @@ test('args: account', async () => { }) test('behavior: not connected', async () => { - const { result } = renderHook(() => useCapabilities()) + const { result } = await renderHook(() => useCapabilities()) - await waitFor(() => expect(result.current.isError).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isError).toBeTruthy()) const { error, failureReason: _, ...rest } = result.current expect(error?.message.includes('Connector not connected.')).toBeTruthy() @@ -136,7 +138,7 @@ test('behavior: not connected', async () => { { "data": undefined, "dataUpdatedAt": 0, - "errorUpdateCount": 2, + "errorUpdateCount": 1, "errorUpdatedAt": 1675209600000, "failureCount": 1, "fetchStatus": "idle", diff --git a/packages/react/src/hooks/useChainId.test.ts b/packages/react/src/hooks/useChainId.test.ts index e4745b46e3..a66b46770a 100644 --- a/packages/react/src/hooks/useChainId.test.ts +++ b/packages/react/src/hooks/useChainId.test.ts @@ -1,12 +1,12 @@ import { config } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' -import { Fragment, createElement } from 'react' +import { createElement, Fragment } from 'react' import { expect, test } from 'vitest' import { useChainId } from './useChainId.js' test('default', async () => { - const { result, rerender } = renderHook(() => useChainId()) + const { result, rerender } = await renderHook(() => useChainId()) expect(result.current).toMatchInlineSnapshot('1') @@ -16,8 +16,8 @@ test('default', async () => { expect(result.current).toMatchInlineSnapshot('456') }) -test('parameters: config', () => { - const { result } = renderHook(() => useChainId({ config }), { +test('parameters: config', async () => { + const { result } = await renderHook(() => useChainId({ config }), { wrapper: ({ children }) => createElement(Fragment, { children }), }) expect(result.current).toBeDefined() diff --git a/packages/react/src/hooks/useChainId.ts b/packages/react/src/hooks/useChainId.ts index ce7cb208dd..2370fa0800 100644 --- a/packages/react/src/hooks/useChainId.ts +++ b/packages/react/src/hooks/useChainId.ts @@ -3,8 +3,8 @@ import { type Config, type GetChainIdReturnType, - type ResolvedRegister, getChainId, + type ResolvedRegister, watchChainId, } from '@wagmi/core' import { useSyncExternalStore } from 'react' diff --git a/packages/react/src/hooks/useChains.test.ts b/packages/react/src/hooks/useChains.test.ts index 1d9d6fca4f..c62dc89966 100644 --- a/packages/react/src/hooks/useChains.test.ts +++ b/packages/react/src/hooks/useChains.test.ts @@ -1,12 +1,12 @@ import { config } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' -import { Fragment, createElement } from 'react' +import { createElement, Fragment } from 'react' import { expect, test } from 'vitest' import { useChains } from './useChains.js' test('default', async () => { - const { result } = renderHook(() => useChains()) + const { result } = await renderHook(() => useChains()) expect(result.current.map((x) => x.id)).toMatchInlineSnapshot(` [ @@ -17,8 +17,8 @@ test('default', async () => { `) }) -test('parameters: config', () => { - const { result } = renderHook(() => useChains({ config }), { +test('parameters: config', async () => { + const { result } = await renderHook(() => useChains({ config }), { wrapper: ({ children }) => createElement(Fragment, { children }), }) expect(result.current.map((x) => x.id)).toMatchInlineSnapshot(` diff --git a/packages/react/src/hooks/useChains.ts b/packages/react/src/hooks/useChains.ts index b3e93b417a..0b89fe40e2 100644 --- a/packages/react/src/hooks/useChains.ts +++ b/packages/react/src/hooks/useChains.ts @@ -3,8 +3,8 @@ import { type Config, type GetChainsReturnType, - type ResolvedRegister, getChains, + type ResolvedRegister, } from '@wagmi/core' import { watchChains } from '@wagmi/core/internal' import { useSyncExternalStore } from 'react' diff --git a/packages/react/src/hooks/useClient.test.ts b/packages/react/src/hooks/useClient.test.ts index 93ef8d9fa9..04e76b7bbf 100644 --- a/packages/react/src/hooks/useClient.test.ts +++ b/packages/react/src/hooks/useClient.test.ts @@ -1,13 +1,13 @@ import { switchChain } from '@wagmi/core' import { config } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' -import { Fragment, createElement } from 'react' +import { createElement, Fragment } from 'react' import { expect, test } from 'vitest' import { useClient } from './useClient.js' test('default', async () => { - const { result, rerender } = renderHook(() => useClient()) + const { result, rerender } = await renderHook(() => useClient()) expect(result.current?.chain.id).toEqual(1) @@ -17,14 +17,14 @@ test('default', async () => { expect(result.current?.chain.id).toEqual(456) }) -test('parameters: config', () => { - const { result } = renderHook(() => useClient({ config }), { +test('parameters: config', async () => { + const { result } = await renderHook(() => useClient({ config }), { wrapper: ({ children }) => createElement(Fragment, { children }), }) expect(result.current).toBeDefined() }) -test('behavior: unconfigured chain', () => { - const { result } = renderHook(() => useClient({ chainId: 123456 })) +test('behavior: unconfigured chain', async () => { + const { result } = await renderHook(() => useClient({ chainId: 123456 })) expect(result.current).toBeUndefined() }) diff --git a/packages/react/src/hooks/useClient.ts b/packages/react/src/hooks/useClient.ts index abfee745b3..520d1594b1 100644 --- a/packages/react/src/hooks/useClient.ts +++ b/packages/react/src/hooks/useClient.ts @@ -4,8 +4,8 @@ import { type Config, type GetClientParameters, type GetClientReturnType, - type ResolvedRegister, getClient, + type ResolvedRegister, watchClient, } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' diff --git a/packages/react/src/hooks/useConfig.test.ts b/packages/react/src/hooks/useConfig.test.ts index e0fc9c40ce..0c4ad86586 100644 --- a/packages/react/src/hooks/useConfig.test.ts +++ b/packages/react/src/hooks/useConfig.test.ts @@ -3,8 +3,8 @@ import { expect, test, vi } from 'vitest' import { useConfig } from './useConfig.js' -test('mounts', () => { - const { result } = renderHook(() => useConfig()) +test('mounts', async () => { + const { result } = await renderHook(() => useConfig()) expect(result.current).toBeDefined() }) diff --git a/packages/react/src/hooks/useConfig.ts b/packages/react/src/hooks/useConfig.ts index af9ea5b9c0..9fbe39779d 100644 --- a/packages/react/src/hooks/useConfig.ts +++ b/packages/react/src/hooks/useConfig.ts @@ -16,6 +16,7 @@ export type UseConfigReturnType = config export function useConfig( parameters: UseConfigParameters = {}, ): UseConfigReturnType { + // biome-ignore lint/correctness/useHookAtTopLevel: false alarm const config = parameters.config ?? useContext(WagmiContext) if (!config) throw new WagmiProviderNotFoundError() return config as UseConfigReturnType diff --git a/packages/react/src/hooks/useConnect.test.ts b/packages/react/src/hooks/useConnect.test.ts index d80ff30509..a37db099e4 100644 --- a/packages/react/src/hooks/useConnect.test.ts +++ b/packages/react/src/hooks/useConnect.test.ts @@ -1,7 +1,7 @@ import { disconnect } from '@wagmi/core' import { config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { afterEach, expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { afterEach, expect, test, vi } from 'vitest' import { useAccount } from './useAccount.js' import { useConnect } from './useConnect.js' @@ -14,7 +14,7 @@ afterEach(async () => { }) test('default', async () => { - const { result } = renderHook(() => ({ + const { result } = await renderHook(() => ({ useAccount: useAccount(), useConnect: useConnect(), })) @@ -26,7 +26,7 @@ test('default', async () => { connector: result.current.useConnect.connectors[0]!, }) - await waitFor(() => + await vi.waitFor(() => expect(result.current.useAccount.isConnected).toBeTruthy(), ) diff --git a/packages/react/src/hooks/useConnections.test.ts b/packages/react/src/hooks/useConnections.test.ts index 1eb4febcdb..eb926805e8 100644 --- a/packages/react/src/hooks/useConnections.test.ts +++ b/packages/react/src/hooks/useConnections.test.ts @@ -1,13 +1,13 @@ import { connect } from '@wagmi/core' import { config } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' -import { Fragment, createElement } from 'react' +import { createElement, Fragment } from 'react' import { expect, test } from 'vitest' import { useConnections } from './useConnections.js' test('default', async () => { - const { result, rerender } = renderHook(() => useConnections()) + const { result, rerender } = await renderHook(() => useConnections()) expect(result.current).toEqual([]) @@ -17,8 +17,8 @@ test('default', async () => { expect(result.current.length).toBe(1) }) -test('parameters: config', () => { - const { result } = renderHook(() => useConnections({ config }), { +test('parameters: config', async () => { + const { result } = await renderHook(() => useConnections({ config }), { wrapper: ({ children }) => createElement(Fragment, { children }), }) expect(result.current).toBeDefined() diff --git a/packages/react/src/hooks/useConnectorClient.test.tsx b/packages/react/src/hooks/useConnectorClient.test.tsx index f8737c53ec..ddff87c4f4 100644 --- a/packages/react/src/hooks/useConnectorClient.test.tsx +++ b/packages/react/src/hooks/useConnectorClient.test.tsx @@ -1,8 +1,8 @@ import { connect, disconnect } from '@wagmi/core' import { config, wait } from '@wagmi/test' -import { render, renderHook, waitFor } from '@wagmi/test/react' +import { render, renderHook } from '@wagmi/test/react' import * as React from 'react' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useAccount } from './useAccount.js' import { useConnect } from './useConnect.js' @@ -13,9 +13,9 @@ import { useSwitchChain } from './useSwitchChain.js' const connector = config.connectors[0]! test('default', async () => { - const { result } = renderHook(() => useConnectorClient()) + const { result } = await renderHook(() => useConnectorClient()) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) expect(result.current).toMatchInlineSnapshot(` { @@ -57,9 +57,9 @@ test('default', async () => { test('behavior: connected on mount', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useConnectorClient()) + const { result } = await renderHook(() => useConnectorClient()) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, queryKey: _, ...rest } = result.current expect(data).toMatchObject( @@ -100,7 +100,7 @@ test('behavior: connected on mount', async () => { }) test('behavior: connect and disconnect', async () => { - const { result } = renderHook(() => ({ + const { result } = await renderHook(() => ({ useConnect: useConnect(), useConnectorClient: useConnectorClient(), useDisconnect: useDisconnect(), @@ -112,13 +112,13 @@ test('behavior: connect and disconnect', async () => { connector: result.current.useConnect.connectors[0]!, }) - await waitFor(() => + await vi.waitFor(() => expect(result.current.useConnectorClient.data).toBeDefined(), ) result.current.useDisconnect.disconnect() - await waitFor(() => + await vi.waitFor(() => expect(result.current.useConnectorClient.data).not.toBeDefined(), ) }) @@ -126,72 +126,84 @@ test('behavior: connect and disconnect', async () => { test('behavior: switch chains', async () => { await connect(config, { connector }) - const { result } = renderHook(() => ({ + const { act, result } = await renderHook(() => ({ useConnectorClient: useConnectorClient(), useSwitchChain: useSwitchChain(), })) expect(result.current.useConnectorClient.data).not.toBeDefined() - - await waitFor(() => + await vi.waitFor(() => expect(result.current.useConnectorClient.data).toBeDefined(), ) - result.current.useSwitchChain.switchChain({ chainId: 456 }) - await waitFor(() => { - expect(result.current.useSwitchChain.isSuccess).toBeTruthy() - result.current.useSwitchChain.reset() + await act(() => result.current.useSwitchChain.switchChain({ chainId: 456 })) + await vi.waitUntil(() => result.current.useSwitchChain.isSuccess, { + timeout: 5_000, + }) + await act(() => result.current.useSwitchChain.reset()) + await vi.waitUntil(() => result.current.useConnectorClient.isSuccess, { + timeout: 5_000, }) expect(result.current.useConnectorClient.data?.chain.id).toEqual(456) - result.current.useSwitchChain.switchChain({ chainId: 1 }) - await waitFor(() => - expect(result.current.useSwitchChain.isSuccess).toBeTruthy(), - ) + await act(() => result.current.useSwitchChain.switchChain({ chainId: 1 })) + await vi.waitUntil(() => result.current.useSwitchChain.isSuccess, { + timeout: 5_000, + }) + await vi.waitUntil(() => result.current.useConnectorClient.isSuccess, { + timeout: 5_000, + }) expect(result.current.useConnectorClient.data?.chain.id).toEqual(1) await disconnect(config, { connector }) }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useConnectorClient()) + await disconnect(config, { connector }) - await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + const { result } = await renderHook(() => useConnectorClient()) + + await wait(0) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) test('behavior: disabled when connecting', async () => { - const { result } = renderHook(() => useConnectorClient()) + const { result } = await renderHook(() => useConnectorClient()) config.setState((x) => ({ ...x, status: 'connecting' })) - await wait(100) + await wait(0) expect(result.current.isLoading).not.toBeTruthy() }) test('behavior: re-render does not invalidate query', async () => { - const { getByTestId } = render() + await disconnect(config, { connector }) + + const screen = await render() - getByTestId('connect').click() - await waitFor(() => { - expect(getByTestId('address').innerText).toContain( - '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', - ) - expect(getByTestId('client').innerText).toBeTruthy() + await screen.getByTestId('connect').click() + await vi.waitFor(async () => { + await expect + .element(screen.getByTestId('address')) + .toHaveTextContent('0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266') + await expect.element(screen.getByTestId('client')).toBeVisible() - expect(getByTestId('child-client').innerText).toBeTruthy() - expect(getByTestId('render-count').innerText).toEqual('1') + await expect.element(screen.getByTestId('child-client')).toBeVisible() + await expect + .element(screen.getByTestId('render-count')) + .toHaveTextContent('1') }) - const initialClient = getByTestId('child-client').innerText + const initialClient = screen.getByTestId('child-client') - getByTestId('rerender').click() - await waitFor(() => { - expect(getByTestId('render-count').innerText).toEqual('2') - }) - await wait(200) + await screen.getByTestId('rerender').click() + await vi.waitFor(() => + expect.element(screen.getByTestId('render-count')).toHaveTextContent('2'), + ) - expect(getByTestId('child-client').innerText).toEqual(initialClient) + await expect + .element(screen.getByTestId('child-client').element()) + .toEqual(initialClient.element()) }) function Parent() { @@ -225,9 +237,7 @@ function Parent() { ) } -function Child(props: { - renderCount: number -}) { +function Child(props: { renderCount: number }) { const { renderCount } = props const { data } = useConnectorClient() return ( diff --git a/packages/react/src/hooks/useConnectors.test.ts b/packages/react/src/hooks/useConnectors.test.ts index f287cceb32..bc6dc796c3 100644 --- a/packages/react/src/hooks/useConnectors.test.ts +++ b/packages/react/src/hooks/useConnectors.test.ts @@ -1,13 +1,13 @@ import { mock } from '@wagmi/connectors' import { accounts, config } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' -import { Fragment, createElement } from 'react' +import { createElement, Fragment } from 'react' import { expect, test } from 'vitest' import { useConnectors } from './useConnectors.js' test('default', async () => { - const { result, rerender } = renderHook(() => useConnectors()) + const { result, rerender } = await renderHook(() => useConnectors()) const count = config.connectors.length expect(result.current.length).toBe(count) @@ -22,8 +22,8 @@ test('default', async () => { expect(result.current.length).toBe(count + 1) }) -test('parameters: config', () => { - const { result } = renderHook(() => useConnectors({ config }), { +test('parameters: config', async () => { + const { result } = await renderHook(() => useConnectors({ config }), { wrapper: ({ children }) => createElement(Fragment, { children }), }) expect(result.current).toBeDefined() diff --git a/packages/react/src/hooks/useConnectors.ts b/packages/react/src/hooks/useConnectors.ts index 40a681689d..d5a3935fde 100644 --- a/packages/react/src/hooks/useConnectors.ts +++ b/packages/react/src/hooks/useConnectors.ts @@ -3,8 +3,8 @@ import { type Config, type GetConnectorsReturnType, - type ResolvedRegister, getConnectors, + type ResolvedRegister, watchConnectors, } from '@wagmi/core' import { useSyncExternalStore } from 'react' diff --git a/packages/react/src/hooks/useDeployContract.test.ts b/packages/react/src/hooks/useDeployContract.test.ts index 561129bdbc..8bf2764d8c 100644 --- a/packages/react/src/hooks/useDeployContract.test.ts +++ b/packages/react/src/hooks/useDeployContract.test.ts @@ -1,7 +1,7 @@ import { connect, disconnect } from '@wagmi/core' import { abi, bytecode, config, transactionHashRegex } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useDeployContract } from './useDeployContract.js' @@ -9,14 +9,14 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useDeployContract()) + const { result } = await renderHook(() => useDeployContract()) result.current.deployContract({ abi: abi.bayc, bytecode: bytecode.bayc, args: ['Bored Ape Wagmi Club', 'BAYC', 69420n, 0n], }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current.data).toMatch(transactionHashRegex) diff --git a/packages/react/src/hooks/useDisconnect.test.ts b/packages/react/src/hooks/useDisconnect.test.ts index 26c7787d98..9ae3799452 100644 --- a/packages/react/src/hooks/useDisconnect.test.ts +++ b/packages/react/src/hooks/useDisconnect.test.ts @@ -1,7 +1,7 @@ import { connect } from '@wagmi/core' import { config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { beforeEach, expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { beforeEach, expect, test, vi } from 'vitest' import { useAccount } from './useAccount.js' import { useDisconnect } from './useDisconnect.js' @@ -13,7 +13,7 @@ beforeEach(async () => { }) test('default', async () => { - const { result } = renderHook(() => ({ + const { result } = await renderHook(() => ({ useAccount: useAccount(), useDisconnect: useDisconnect(), })) @@ -23,7 +23,7 @@ test('default', async () => { result.current.useDisconnect.disconnect() - await waitFor(() => + await vi.waitFor(() => expect(result.current.useAccount.isDisconnected).toBeTruthy(), ) diff --git a/packages/react/src/hooks/useEnsAddress.test.ts b/packages/react/src/hooks/useEnsAddress.test.ts index ff73c45f9d..3ba6cb318b 100644 --- a/packages/react/src/hooks/useEnsAddress.test.ts +++ b/packages/react/src/hooks/useEnsAddress.test.ts @@ -1,16 +1,16 @@ -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useEnsAddress } from './useEnsAddress.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useEnsAddress({ name: 'wevm.eth', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/useEnsAvatar.test.ts b/packages/react/src/hooks/useEnsAvatar.test.ts index d1f558be13..47f5e92f9e 100644 --- a/packages/react/src/hooks/useEnsAvatar.test.ts +++ b/packages/react/src/hooks/useEnsAvatar.test.ts @@ -1,16 +1,16 @@ -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useEnsAvatar } from './useEnsAvatar.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useEnsAvatar({ name: 'wevm.eth', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/useEnsName.test.ts b/packages/react/src/hooks/useEnsName.test.ts index 8a069b076d..d49640800e 100644 --- a/packages/react/src/hooks/useEnsName.test.ts +++ b/packages/react/src/hooks/useEnsName.test.ts @@ -1,16 +1,16 @@ -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useEnsName } from './useEnsName.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/useEnsResolver.test.ts b/packages/react/src/hooks/useEnsResolver.test.ts index f5b89d8f63..a28de48dc0 100644 --- a/packages/react/src/hooks/useEnsResolver.test.ts +++ b/packages/react/src/hooks/useEnsResolver.test.ts @@ -1,16 +1,16 @@ -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useEnsResolver } from './useEnsResolver.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useEnsResolver({ name: 'wevm.eth', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/useEnsText.test.ts b/packages/react/src/hooks/useEnsText.test.ts index 5e1c4b1d8c..18da218c98 100644 --- a/packages/react/src/hooks/useEnsText.test.ts +++ b/packages/react/src/hooks/useEnsText.test.ts @@ -1,18 +1,18 @@ import { wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useEnsText } from './useEnsText.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useEnsText({ key: 'com.twitter', name: 'wevm.eth', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -53,13 +53,13 @@ test('default', async () => { }) test('behavior: name: undefined -> defined', async () => { - let name: string | undefined = undefined - - const { result, rerender } = renderHook(() => - useEnsText({ - key: 'com.twitter', - name, - }), + const { result, rerender } = await renderHook( + (props) => + useEnsText({ + key: 'com.twitter', + name: props?.name, + }), + { initialProps: { name: undefined as string | undefined } }, ) expect(result.current).toMatchInlineSnapshot(` @@ -99,10 +99,9 @@ test('behavior: name: undefined -> defined', async () => { } `) - name = 'wevm.eth' - rerender() + rerender({ name: 'wevm.eth' }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -143,8 +142,8 @@ test('behavior: name: undefined -> defined', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useEnsText()) + const { result } = await renderHook(() => useEnsText()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useEstimateFeesPerGas.test.ts b/packages/react/src/hooks/useEstimateFeesPerGas.test.ts index 5d1859eda9..be2173bd68 100644 --- a/packages/react/src/hooks/useEstimateFeesPerGas.test.ts +++ b/packages/react/src/hooks/useEstimateFeesPerGas.test.ts @@ -1,12 +1,12 @@ -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useEstimateFeesPerGas } from './useEstimateFeesPerGas.js' test('default', async () => { - const { result } = renderHook(() => useEstimateFeesPerGas()) + const { result } = await renderHook(() => useEstimateFeesPerGas()) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(Object.keys(result.current.data!)).toMatchInlineSnapshot(` [ diff --git a/packages/react/src/hooks/useEstimateGas.test.ts b/packages/react/src/hooks/useEstimateGas.test.ts index 0c3ab08324..6db2c64b74 100644 --- a/packages/react/src/hooks/useEstimateGas.test.ts +++ b/packages/react/src/hooks/useEstimateGas.test.ts @@ -1,12 +1,12 @@ import { accounts } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import { type Address, parseEther } from 'viem' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useEstimateGas } from './useEstimateGas.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useEstimateGas({ account: accounts[0], to: '0xd2135CfB216b74109775236E36d4b433F1DF507B', @@ -14,7 +14,7 @@ test('default', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -56,9 +56,10 @@ test('default', async () => { }) test('behavior: address: undefined -> defined', async () => { - let account: Address | undefined = undefined - - const { result, rerender } = renderHook(() => useEstimateGas({ account })) + const { result, rerender } = await renderHook( + (props) => useEstimateGas({ account: props?.account }), + { initialProps: { account: undefined as Address | undefined } }, + ) expect(result.current).toMatchInlineSnapshot(` { @@ -96,10 +97,9 @@ test('behavior: address: undefined -> defined', async () => { } `) - account = accounts[0] - rerender() + rerender({ account: accounts[0] }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/useEstimateMaxPriorityFeePerGas.test.ts b/packages/react/src/hooks/useEstimateMaxPriorityFeePerGas.test.ts index 21c09188e3..2b40d65b9d 100644 --- a/packages/react/src/hooks/useEstimateMaxPriorityFeePerGas.test.ts +++ b/packages/react/src/hooks/useEstimateMaxPriorityFeePerGas.test.ts @@ -1,15 +1,15 @@ import { chain, testClient } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useEstimateMaxPriorityFeePerGas } from './useEstimateMaxPriorityFeePerGas.js' test('default', async () => { await testClient.mainnet.restart() - const { result } = renderHook(() => useEstimateMaxPriorityFeePerGas()) + const { result } = await renderHook(() => useEstimateMaxPriorityFeePerGas()) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('bigint') @@ -52,11 +52,11 @@ test('parameters: chainId', async () => { await testClient.mainnet2.restart() await testClient.mainnet2.mine({ blocks: 1 }) - const { result } = renderHook(() => + const { result } = await renderHook(() => useEstimateMaxPriorityFeePerGas({ chainId: chain.mainnet2.id }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('bigint') diff --git a/packages/react/src/hooks/useFeeHistory.test.ts b/packages/react/src/hooks/useFeeHistory.test.ts index 53b6a8c55b..65a70928f6 100644 --- a/packages/react/src/hooks/useFeeHistory.test.ts +++ b/packages/react/src/hooks/useFeeHistory.test.ts @@ -1,18 +1,18 @@ import { chain, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useFeeHistory } from './useFeeHistory.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toMatchObject({ @@ -62,7 +62,7 @@ test('default', async () => { }) test('parameters: chainId', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], @@ -70,7 +70,7 @@ test('parameters: chainId', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toMatchObject({ @@ -120,7 +120,7 @@ test('parameters: chainId', async () => { }) test('parameters: blockNumber', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], @@ -128,7 +128,7 @@ test('parameters: blockNumber', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toMatchObject({ @@ -179,7 +179,7 @@ test('parameters: blockNumber', async () => { }) test('parameters: blockTag', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], @@ -187,7 +187,7 @@ test('parameters: blockTag', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toMatchObject({ @@ -238,13 +238,13 @@ test('parameters: blockTag', async () => { }) test('behavior: blockCount: undefined -> defined', async () => { - let blockCount: number | undefined = undefined - - const { result, rerender } = renderHook(() => - useFeeHistory({ - blockCount, - rewardPercentiles: [25, 75], - }), + const { result, rerender } = await renderHook( + (props) => + useFeeHistory({ + blockCount: props?.blockCount, + rewardPercentiles: [25, 75], + }), + { initialProps: { blockCount: undefined as number | undefined } }, ) { @@ -290,10 +290,9 @@ test('behavior: blockCount: undefined -> defined', async () => { `) } - blockCount = 4 - rerender() + rerender({ blockCount: 4 }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toMatchObject({ @@ -343,13 +342,13 @@ test('behavior: blockCount: undefined -> defined', async () => { }) test('behavior: rewardPercentiles: undefined -> defined', async () => { - let rewardPercentiles: number[] | undefined = undefined - - const { result, rerender } = renderHook(() => - useFeeHistory({ - blockCount: 4, - rewardPercentiles, - }), + const { result, rerender } = await renderHook( + (props) => + useFeeHistory({ + blockCount: 4, + rewardPercentiles: props?.rewardPercentiles, + }), + { initialProps: { rewardPercentiles: undefined as number[] | undefined } }, ) { @@ -392,10 +391,9 @@ test('behavior: rewardPercentiles: undefined -> defined', async () => { `) } - rewardPercentiles = [25, 75] - rerender() + rerender({ rewardPercentiles: [25, 75] }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toMatchObject({ @@ -445,8 +443,8 @@ test('behavior: rewardPercentiles: undefined -> defined', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useFeeHistory()) + const { result } = await renderHook(() => useFeeHistory()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useGasPrice.test.ts b/packages/react/src/hooks/useGasPrice.test.ts index 5dd97cc96c..fec331fb43 100644 --- a/packages/react/src/hooks/useGasPrice.test.ts +++ b/packages/react/src/hooks/useGasPrice.test.ts @@ -1,6 +1,6 @@ import { chain, testClient } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useGasPrice } from './useGasPrice.js' @@ -12,9 +12,9 @@ test('default', async () => { }) await testClient.mainnet.mine({ blocks: 1 }) - const { result } = renderHook(() => useGasPrice()) + const { result } = await renderHook(() => useGasPrice()) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -52,7 +52,7 @@ test('default', async () => { `) }) -test('parameters: chainId', async () => { +test.skip('parameters: chainId', async () => { await testClient.mainnet2.restart() await testClient.mainnet2.setNextBlockBaseFeePerGas({ @@ -60,11 +60,11 @@ test('parameters: chainId', async () => { }) await testClient.mainnet2.mine({ blocks: 1 }) - const { result } = renderHook(() => + const { result } = await renderHook(() => useGasPrice({ chainId: chain.mainnet2.id }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/useInfiniteReadContracts.test.ts b/packages/react/src/hooks/useInfiniteReadContracts.test.ts index 0feb1e0e98..72cc43b841 100644 --- a/packages/react/src/hooks/useInfiniteReadContracts.test.ts +++ b/packages/react/src/hooks/useInfiniteReadContracts.test.ts @@ -1,54 +1,53 @@ -import { abi, address } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { abi, address, wait } from '@wagmi/test' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useInfiniteReadContracts } from './useInfiniteReadContracts.js' -test( - 'default', - async () => { - const limit = 3 +test('default', async () => { + const limit = 3 - const { result } = renderHook(() => - useInfiniteReadContracts({ - cacheKey: 'foo', - contracts(pageParam) { - return [...new Array(limit)].map( - (_, i) => - ({ - address: address.shields, - abi: abi.shields, - functionName: 'tokenURI', - args: [BigInt(pageParam + i + 1)], - }) as const, - ) + const { result } = await renderHook(() => + useInfiniteReadContracts({ + cacheKey: 'foo', + contracts(pageParam) { + return [...new Array(limit)].map( + (_, i) => + ({ + address: address.shields, + abi: abi.shields, + functionName: 'tokenURI', + args: [BigInt(pageParam + i + 1)], + }) as const, + ) + }, + query: { + initialPageParam: 0, + getNextPageParam(_lastPage, _allPages, lastPageParam) { + return lastPageParam + limit }, - query: { - initialPageParam: 0, - getNextPageParam(_lastPage, _allPages, lastPageParam) { - return lastPageParam + limit - }, - select(data) { - const results = [] - for (const page of data.pages) { - for (const response of page) { - if (response.status === 'success') { - const decoded = atob( - response.result.replace(/(^.*base64,)/, ''), - ) - const json = JSON.parse(decoded) as { name: string } - results.push(json.name) - } else results.push('Error fetching shield') - } + select(data) { + const results = [] + for (const page of data.pages) { + for (const response of page) { + if (response.status === 'success') { + const decoded = atob( + response.result.replace(/(^.*base64,)/, ''), + ) + const json = JSON.parse(decoded) as { name: string } + results.push(json.name) + } else results.push('Error fetching shield') } - return results - }, + } + return results }, - }), - ) + }, + }), + ) + await wait(0) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) - expect(result.current.data).toMatchInlineSnapshot(` + await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) + expect(result.current.data).toMatchInlineSnapshot(` [ "Three Shields on Pink Perfect", "Three Shields on Sky Perfect", @@ -56,10 +55,11 @@ test( ] `) - await result.current.fetchNextPage() + await result.current.fetchNextPage() + await wait(0) - await waitFor(() => expect(result.current.hasNextPage).toBeTruthy()) - expect(result.current.data).toMatchInlineSnapshot(` + await vi.waitFor(() => expect(result.current.hasNextPage).toBeTruthy()) + expect(result.current.data).toMatchInlineSnapshot(` [ "Three Shields on Pink Perfect", "Three Shields on Sky Perfect", @@ -70,10 +70,11 @@ test( ] `) - await result.current.fetchNextPage() + await result.current.fetchNextPage() + await wait(0) - await waitFor(() => expect(result.current.hasNextPage).toBeTruthy()) - expect(result.current.data).toMatchInlineSnapshot(` + await vi.waitFor(() => expect(result.current.hasNextPage).toBeTruthy()) + expect(result.current.data).toMatchInlineSnapshot(` [ "Three Shields on Pink Perfect", "Three Shields on Sky Perfect", @@ -86,6 +87,4 @@ test( "Secured: Telescope and Stars on Ultraviolet and Sky Doppler", ] `) - }, - { timeout: 20_000 }, -) +}, 20_000) diff --git a/packages/react/src/hooks/usePrepareTransactionRequest.test.ts b/packages/react/src/hooks/usePrepareTransactionRequest.test.ts index 7b90729dbf..bf49dd4724 100644 --- a/packages/react/src/hooks/usePrepareTransactionRequest.test.ts +++ b/packages/react/src/hooks/usePrepareTransactionRequest.test.ts @@ -1,8 +1,8 @@ import { connect, disconnect } from '@wagmi/core' import { config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import { parseEther } from 'viem' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { usePrepareTransactionRequest } from './usePrepareTransactionRequest.js' @@ -11,14 +11,14 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => + const { result } = await renderHook(() => usePrepareTransactionRequest({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) const { data: { diff --git a/packages/react/src/hooks/usePrepareTransactionRequest.ts b/packages/react/src/hooks/usePrepareTransactionRequest.ts index 509d85eb08..bd4aaf32ee 100644 --- a/packages/react/src/hooks/usePrepareTransactionRequest.ts +++ b/packages/react/src/hooks/usePrepareTransactionRequest.ts @@ -6,13 +6,13 @@ import type { ResolvedRegister, SelectChains, } from '@wagmi/core' +import type { PrepareTransactionRequestQueryFnData } from '@wagmi/core/query' import { type PrepareTransactionRequestData, type PrepareTransactionRequestOptions, type PrepareTransactionRequestQueryKey, prepareTransactionRequestQueryOptions, } from '@wagmi/core/query' -import type { PrepareTransactionRequestQueryFnData } from '@wagmi/core/query' import type { PrepareTransactionRequestRequest as viem_PrepareTransactionRequestRequest } from 'viem' import type { ConfigParameter, QueryParameter } from '../types/properties.js' diff --git a/packages/react/src/hooks/useProof.test.ts b/packages/react/src/hooks/useProof.test.ts index 3c3cb51945..3ea43f5bf9 100644 --- a/packages/react/src/hooks/useProof.test.ts +++ b/packages/react/src/hooks/useProof.test.ts @@ -1,12 +1,11 @@ import { chain, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' - +import { renderHook } from '@wagmi/test/react' import type { Address } from 'viem' +import { expect, test, vi } from 'vitest' import { useProof } from './useProof.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useProof({ address: '0x4200000000000000000000000000000000000016', chainId: chain.optimism.id, @@ -16,7 +15,7 @@ test('default', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect({ ...result.current, data: null }).toMatchInlineSnapshot(` { @@ -59,16 +58,16 @@ test('default', async () => { }) test('behavior: address: undefined -> defined', async () => { - let address: Address | undefined = undefined - - const { result, rerender } = renderHook(() => - useProof({ - address, - chainId: chain.optimism.id, - storageKeys: [ - '0x4a932049252365b3eedbc5190e18949f2ec11f39d3bef2d259764799a1b27d99', - ], - }), + const { result, rerender } = await renderHook( + (props) => + useProof({ + address: props?.address, + chainId: chain.optimism.id, + storageKeys: [ + '0x4a932049252365b3eedbc5190e18949f2ec11f39d3bef2d259764799a1b27d99', + ], + }), + { initialProps: { address: undefined as Address | undefined } }, ) expect(result.current).toMatchInlineSnapshot(` @@ -110,10 +109,9 @@ test('behavior: address: undefined -> defined', async () => { } `) - address = '0x4200000000000000000000000000000000000016' - rerender() + rerender({ address: '0x4200000000000000000000000000000000000016' }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect({ ...result.current, data: null }).toMatchInlineSnapshot(` { @@ -156,8 +154,8 @@ test('behavior: address: undefined -> defined', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useProof()) + const { result } = await renderHook(() => useProof()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useProof.ts b/packages/react/src/hooks/useProof.ts index f473d509aa..6361ddd946 100644 --- a/packages/react/src/hooks/useProof.ts +++ b/packages/react/src/hooks/useProof.ts @@ -2,13 +2,13 @@ import type { Config, GetProofErrorType, ResolvedRegister } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' +import type { GetProofQueryFnData } from '@wagmi/core/query' import { type GetProofData, type GetProofOptions, type GetProofQueryKey, getProofQueryOptions, } from '@wagmi/core/query' -import type { GetProofQueryFnData } from '@wagmi/core/query' import type { ConfigParameter, QueryParameter } from '../types/properties.js' import { type UseQueryReturnType, useQuery } from '../utils/query.js' diff --git a/packages/react/src/hooks/usePublicClient.test.ts b/packages/react/src/hooks/usePublicClient.test.ts index 93602746bb..bdb23e1f59 100644 --- a/packages/react/src/hooks/usePublicClient.test.ts +++ b/packages/react/src/hooks/usePublicClient.test.ts @@ -1,13 +1,13 @@ import { switchChain } from '@wagmi/core' import { config } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' -import { Fragment, createElement } from 'react' +import { createElement, Fragment } from 'react' import { expect, test } from 'vitest' import { usePublicClient } from './usePublicClient.js' test('default', async () => { - const { result, rerender } = renderHook(() => usePublicClient()) + const { result, rerender } = await renderHook(() => usePublicClient()) expect(result.current?.chain.id).toEqual(1) @@ -17,14 +17,16 @@ test('default', async () => { expect(result.current?.chain.id).toEqual(456) }) -test('parameters: config', () => { - const { result } = renderHook(() => usePublicClient({ config }), { +test('parameters: config', async () => { + const { result } = await renderHook(() => usePublicClient({ config }), { wrapper: ({ children }) => createElement(Fragment, { children }), }) expect(result.current).toBeDefined() }) -test('behavior: unconfigured chain', () => { - const { result } = renderHook(() => usePublicClient({ chainId: 123456 })) +test('behavior: unconfigured chain', async () => { + const { result } = await renderHook(() => + usePublicClient({ chainId: 123456 }), + ) expect(result.current).toBeUndefined() }) diff --git a/packages/react/src/hooks/usePublicClient.ts b/packages/react/src/hooks/usePublicClient.ts index 5193f170b6..6a9eefd251 100644 --- a/packages/react/src/hooks/usePublicClient.ts +++ b/packages/react/src/hooks/usePublicClient.ts @@ -4,8 +4,8 @@ import { type Config, type GetPublicClientParameters, type GetPublicClientReturnType, - type ResolvedRegister, getPublicClient, + type ResolvedRegister, watchPublicClient, } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' diff --git a/packages/react/src/hooks/useReadContract.test.ts b/packages/react/src/hooks/useReadContract.test.ts index c94ca996ce..aa2b066732 100644 --- a/packages/react/src/hooks/useReadContract.test.ts +++ b/packages/react/src/hooks/useReadContract.test.ts @@ -1,13 +1,13 @@ import { QueryClientProvider } from '@tanstack/react-query' import { abi, address, bytecode, chain, config, wait } from '@wagmi/test' -import { queryClient, renderHook, waitFor } from '@wagmi/test/react' +import { queryClient, renderHook } from '@wagmi/test/react' import { createElement } from 'react' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useReadContract } from './useReadContract.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useReadContract({ address: address.wagmiMintExample, abi: abi.wagmiMintExample, @@ -16,7 +16,7 @@ test('default', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) expect(result.current).toMatchInlineSnapshot(` { @@ -60,7 +60,7 @@ test('default', async () => { }) test('parameters: chainId', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useReadContract({ address: address.wagmiMintExample, abi: abi.wagmiMintExample, @@ -70,7 +70,7 @@ test('parameters: chainId', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -114,7 +114,7 @@ test('parameters: chainId', async () => { }) test('parameters: config', async () => { - const { result } = renderHook( + const { result } = await renderHook( () => useReadContract({ address: address.wagmiMintExample, @@ -129,7 +129,7 @@ test('parameters: config', async () => { }, ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -173,7 +173,7 @@ test('parameters: config', async () => { }) test('parameters: deployless read (bytecode)', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useReadContract({ abi: abi.wagmiMintExample, functionName: 'name', @@ -181,14 +181,14 @@ test('parameters: deployless read (bytecode)', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current.data).toMatchInlineSnapshot(`"wagmi"`) }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useReadContract()) + const { result } = await renderHook(() => useReadContract()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useReadContracts.test.ts b/packages/react/src/hooks/useReadContracts.test.ts index e7636b254e..4af5f52ae7 100644 --- a/packages/react/src/hooks/useReadContracts.test.ts +++ b/packages/react/src/hooks/useReadContracts.test.ts @@ -1,11 +1,11 @@ import { abi, address, chain } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useReadContracts } from './useReadContracts.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useReadContracts({ contracts: [ { @@ -23,7 +23,7 @@ test('default', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -87,7 +87,7 @@ test('default', async () => { test.skip('multichain', async () => { const { mainnet, mainnet2, optimism } = chain - const { result } = renderHook(() => + const { result } = await renderHook(() => useReadContracts({ contracts: [ { @@ -141,7 +141,7 @@ test.skip('multichain', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/useReconnect.test-d.ts b/packages/react/src/hooks/useReconnect.test-d.ts index 424159e469..e1b4c3d573 100644 --- a/packages/react/src/hooks/useReconnect.test-d.ts +++ b/packages/react/src/hooks/useReconnect.test-d.ts @@ -4,9 +4,8 @@ import type { ReconnectErrorType, } from '@wagmi/core' import { config } from '@wagmi/test' -import { expectTypeOf, test } from 'vitest' - import type { Address } from 'viem' +import { expectTypeOf, test } from 'vitest' import { useReconnect } from './useReconnect.js' const connectors = [config.connectors[0]!] diff --git a/packages/react/src/hooks/useReconnect.test.ts b/packages/react/src/hooks/useReconnect.test.ts index be783b2440..10fe6bb26a 100644 --- a/packages/react/src/hooks/useReconnect.test.ts +++ b/packages/react/src/hooks/useReconnect.test.ts @@ -1,8 +1,8 @@ import { mock } from '@wagmi/connectors' import { connect, disconnect } from '@wagmi/core' import { accounts, config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { afterEach, expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { afterEach, expect, test, vi } from 'vitest' import { useReconnect } from './useReconnect.js' @@ -18,12 +18,12 @@ afterEach(async () => { }) test('default', async () => { - const { result } = renderHook(() => useReconnect()) + const { result } = await renderHook(() => useReconnect()) expect(result.current.connectors).toBeDefined() result.current.reconnect() - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current.data).toStrictEqual([]) }) @@ -31,12 +31,12 @@ test('default', async () => { test('parameters: connectors (Connector)', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useReconnect()) + const { result } = await renderHook(() => useReconnect()) expect(result.current.connectors).toBeDefined() result.current.reconnect({ connectors: [connector] }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current.data).toMatchObject( expect.arrayContaining([ @@ -55,12 +55,12 @@ test('parameters: connectors (CreateConnectorFn)', async () => { }) await connect(config, { connector }) - const { result } = renderHook(() => useReconnect()) + const { result } = await renderHook(() => useReconnect()) expect(result.current.connectors).toBeDefined() result.current.reconnect({ connectors: [connector] }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current.data).toMatchObject( expect.arrayContaining([ @@ -75,7 +75,7 @@ test('parameters: connectors (CreateConnectorFn)', async () => { test("behavior: doesn't reconnect if already reconnecting", async () => { const previousStatus = config.state.status config.setState((x) => ({ ...x, status: 'reconnecting' })) - const { result } = renderHook(() => useReconnect()) + const { result } = await renderHook(() => useReconnect()) await expect( result.current.reconnectAsync({ connectors: [connector] }), ).resolves.toStrictEqual([]) diff --git a/packages/react/src/hooks/useSendCalls.test.ts b/packages/react/src/hooks/useSendCalls.test.ts index a088dcf221..e77f506f46 100644 --- a/packages/react/src/hooks/useSendCalls.test.ts +++ b/packages/react/src/hooks/useSendCalls.test.ts @@ -1,8 +1,8 @@ import { connect, disconnect } from '@wagmi/core' import { accounts, config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import { parseEther } from 'viem' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useSendCalls } from './useSendCalls.js' @@ -11,7 +11,7 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useSendCalls()) + const { result } = await renderHook(() => useSendCalls()) result.current.sendCalls({ calls: [ @@ -30,7 +30,7 @@ test('default', async () => { }, ], }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current.data).toMatchInlineSnapshot( ` diff --git a/packages/react/src/hooks/useSendTransaction.test.ts b/packages/react/src/hooks/useSendTransaction.test.ts index a2e8977e2f..9600ea36d7 100644 --- a/packages/react/src/hooks/useSendTransaction.test.ts +++ b/packages/react/src/hooks/useSendTransaction.test.ts @@ -1,8 +1,8 @@ import { connect, disconnect } from '@wagmi/core' import { config, transactionHashRegex } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import { parseEther } from 'viem' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useSendTransaction } from './useSendTransaction.js' @@ -11,13 +11,13 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useSendTransaction()) + const { result } = await renderHook(() => useSendTransaction()) result.current.sendTransaction({ to: '0xd2135CfB216b74109775236E36d4b433F1DF507B', value: parseEther('0.01'), }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current.data).toMatch(transactionHashRegex) diff --git a/packages/react/src/hooks/useSignMessage.test.ts b/packages/react/src/hooks/useSignMessage.test.ts index aa6dd4a184..4897ff4bf6 100644 --- a/packages/react/src/hooks/useSignMessage.test.ts +++ b/packages/react/src/hooks/useSignMessage.test.ts @@ -1,10 +1,9 @@ import { connect, disconnect, getAccount } from '@wagmi/core' import { config, privateKey } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import { recoverMessageAddress } from 'viem' -import { expect, test } from 'vitest' - import { privateKeyToAccount } from 'viem/accounts' +import { expect, test, vi } from 'vitest' import { useSignMessage } from './useSignMessage.js' const connector = config.connectors[0]! @@ -12,10 +11,10 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useSignMessage()) + const { result } = await renderHook(() => useSignMessage()) result.current.signMessage({ message: 'foo bar baz' }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) await expect( recoverMessageAddress({ @@ -28,11 +27,11 @@ test('default', async () => { }) test('behavior: local account', async () => { - const { result } = renderHook(() => useSignMessage()) + const { result } = await renderHook(() => useSignMessage()) const account = privateKeyToAccount(privateKey) result.current.signMessage({ account, message: 'foo bar baz' }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) await expect( recoverMessageAddress({ diff --git a/packages/react/src/hooks/useSignTypedData.test.ts b/packages/react/src/hooks/useSignTypedData.test.ts index 3a38daa0da..26c763e55c 100644 --- a/packages/react/src/hooks/useSignTypedData.test.ts +++ b/packages/react/src/hooks/useSignTypedData.test.ts @@ -1,10 +1,9 @@ import { connect, disconnect, getAccount } from '@wagmi/core' import { config, privateKey, typedData } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import { recoverTypedDataAddress } from 'viem' -import { expect, test } from 'vitest' - import { privateKeyToAccount } from 'viem/accounts' +import { expect, test, vi } from 'vitest' import { useSignTypedData } from './useSignTypedData.js' const connector = config.connectors[0]! @@ -12,14 +11,14 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useSignTypedData()) + const { result } = await renderHook(() => useSignTypedData()) result.current.signTypedData({ types: typedData.basic.types, primaryType: 'Mail', message: typedData.basic.message, }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) await expect( recoverTypedDataAddress({ @@ -34,7 +33,7 @@ test('default', async () => { }) test('behavior: local account', async () => { - const { result } = renderHook(() => useSignTypedData()) + const { result } = await renderHook(() => useSignTypedData()) const account = privateKeyToAccount(privateKey) result.current.signTypedData({ @@ -43,7 +42,7 @@ test('behavior: local account', async () => { primaryType: 'Mail', message: typedData.basic.message, }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) await expect( recoverTypedDataAddress({ diff --git a/packages/react/src/hooks/useSimulateContract.test.ts b/packages/react/src/hooks/useSimulateContract.test.ts index 3c785133c9..e9c7de2ac1 100644 --- a/packages/react/src/hooks/useSimulateContract.test.ts +++ b/packages/react/src/hooks/useSimulateContract.test.ts @@ -1,7 +1,7 @@ import { connect, disconnect } from '@wagmi/core' import { abi, address, config, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useSimulateContract } from './useSimulateContract.js' @@ -10,7 +10,7 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => + const { result } = await renderHook(() => useSimulateContract({ address: address.wagmiMintExample, abi: abi.wagmiMintExample, @@ -18,7 +18,7 @@ test('default', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -88,8 +88,8 @@ test('default', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useSimulateContract()) + const { result } = await renderHook(() => useSimulateContract()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useStorageAt.test-d.ts b/packages/react/src/hooks/useStorageAt.test-d.ts index bbc37fa03d..ba7126f38c 100644 --- a/packages/react/src/hooks/useStorageAt.test-d.ts +++ b/packages/react/src/hooks/useStorageAt.test-d.ts @@ -1,6 +1,5 @@ -import { expectTypeOf, test } from 'vitest' - import type { Hex } from 'viem' +import { expectTypeOf, test } from 'vitest' import { useStorageAt } from './useStorageAt.js' test('select data', () => { diff --git a/packages/react/src/hooks/useStorageAt.test.ts b/packages/react/src/hooks/useStorageAt.test.ts index 9386480c93..6de2c8e34d 100644 --- a/packages/react/src/hooks/useStorageAt.test.ts +++ b/packages/react/src/hooks/useStorageAt.test.ts @@ -1,19 +1,18 @@ import { address, chain, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' - +import { renderHook } from '@wagmi/test/react' import type { Address } from 'viem' +import { expect, test, vi } from 'vitest' import { useStorageAt } from './useStorageAt.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useStorageAt({ address: address.wagmiMintExample, slot: '0x0', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -54,7 +53,7 @@ test('default', async () => { }) test('parameters: blockNumber', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useStorageAt({ address: address.wagmiMintExample, blockNumber: 16280770n, @@ -62,7 +61,7 @@ test('parameters: blockNumber', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -104,7 +103,7 @@ test('parameters: blockNumber', async () => { }) test('parameters: blockTag', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useStorageAt({ address: address.wagmiMintExample, blockTag: 'safe', @@ -112,7 +111,7 @@ test('parameters: blockTag', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -154,7 +153,7 @@ test('parameters: blockTag', async () => { }) test('parameters: chainId', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useStorageAt({ address: address.wagmiMintExample, chainId: chain.optimism.id, @@ -162,7 +161,7 @@ test('parameters: chainId', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -203,13 +202,13 @@ test('parameters: chainId', async () => { }) test('behavior: address: undefined -> defined', async () => { - let contractAddress: Address | undefined = undefined - - const { result, rerender } = renderHook(() => - useStorageAt({ - address: contractAddress, - slot: '0x0', - }), + const { result, rerender } = await renderHook( + (props) => + useStorageAt({ + address: props?.address, + slot: '0x0', + }), + { initialProps: { address: undefined as Address | undefined } }, ) expect(result.current).toMatchInlineSnapshot(` @@ -249,10 +248,9 @@ test('behavior: address: undefined -> defined', async () => { } `) - contractAddress = address.wagmiMintExample - rerender() + rerender({ address: address.wagmiMintExample }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { "data": "0x7761676d6900000000000000000000000000000000000000000000000000000a", @@ -292,8 +290,8 @@ test('behavior: address: undefined -> defined', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useStorageAt()) + const { result } = await renderHook(() => useStorageAt()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useStorageAt.ts b/packages/react/src/hooks/useStorageAt.ts index 3a58376fd4..236c7228ef 100644 --- a/packages/react/src/hooks/useStorageAt.ts +++ b/packages/react/src/hooks/useStorageAt.ts @@ -6,13 +6,13 @@ import type { ResolvedRegister, } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' +import type { GetStorageAtQueryFnData } from '@wagmi/core/query' import { type GetStorageAtData, type GetStorageAtOptions, type GetStorageAtQueryKey, getStorageAtQueryOptions, } from '@wagmi/core/query' -import type { GetStorageAtQueryFnData } from '@wagmi/core/query' import type { ConfigParameter, QueryParameter } from '../types/properties.js' import { type UseQueryReturnType, useQuery } from '../utils/query.js' import { useChainId } from './useChainId.js' diff --git a/packages/react/src/hooks/useSwitchAccount.test-d.ts b/packages/react/src/hooks/useSwitchAccount.test-d.ts index f7d97355a3..21fa1a56f4 100644 --- a/packages/react/src/hooks/useSwitchAccount.test-d.ts +++ b/packages/react/src/hooks/useSwitchAccount.test-d.ts @@ -1,8 +1,7 @@ import type { Connector, SwitchAccountErrorType } from '@wagmi/core' import { config } from '@wagmi/test' -import { expectTypeOf, test } from 'vitest' - import type { Address } from 'viem' +import { expectTypeOf, test } from 'vitest' import { useSwitchAccount } from './useSwitchAccount.js' const connector = config.connectors[0]! diff --git a/packages/react/src/hooks/useSwitchAccount.test.ts b/packages/react/src/hooks/useSwitchAccount.test.ts index 5461d08213..2184f7d931 100644 --- a/packages/react/src/hooks/useSwitchAccount.test.ts +++ b/packages/react/src/hooks/useSwitchAccount.test.ts @@ -1,7 +1,7 @@ import { connect, disconnect } from '@wagmi/core' -import { config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { config, wait } from '@wagmi/test' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useAccount } from './useAccount.js' import { useSwitchAccount } from './useSwitchAccount.js' @@ -13,7 +13,7 @@ test('default', async () => { await connect(config, { connector: connector2 }) await connect(config, { connector: connector1 }) - const { result } = renderHook(() => ({ + const { result } = await renderHook(() => ({ useAccount: useAccount(), useSwitchAccount: useSwitchAccount(), })) @@ -22,18 +22,20 @@ test('default', async () => { expect(address1).toBeDefined() result.current.useSwitchAccount.switchAccount({ connector: connector2 }) - await waitFor(() => + await vi.waitFor(() => expect(result.current.useSwitchAccount.isSuccess).toBeTruthy(), ) + await wait(0) const address2 = result.current.useAccount.address expect(address2).toBeDefined() expect(address1).not.toBe(address2) result.current.useSwitchAccount.switchAccount({ connector: connector1 }) - await waitFor(() => + await vi.waitFor(() => expect(result.current.useSwitchAccount.isSuccess).toBeTruthy(), ) + await wait(0) const address3 = result.current.useAccount.address expect(address3).toBeDefined() diff --git a/packages/react/src/hooks/useSwitchChain.test-d.ts b/packages/react/src/hooks/useSwitchChain.test-d.ts index 07098c7724..d39b885f7a 100644 --- a/packages/react/src/hooks/useSwitchChain.test-d.ts +++ b/packages/react/src/hooks/useSwitchChain.test-d.ts @@ -2,9 +2,8 @@ import type { Connector, SwitchChainErrorType } from '@wagmi/core' import type { Chain } from '@wagmi/core/chains' import type { Compute, ExactPartial } from '@wagmi/core/internal' import { chain } from '@wagmi/test' -import { expectTypeOf, test } from 'vitest' - import type { AddEthereumChainParameter } from 'viem' +import { expectTypeOf, test } from 'vitest' import { useSwitchChain } from './useSwitchChain.js' const chainId = chain.mainnet.id diff --git a/packages/react/src/hooks/useSwitchChain.test.ts b/packages/react/src/hooks/useSwitchChain.test.ts index 1fe0ca46b2..165f89f07c 100644 --- a/packages/react/src/hooks/useSwitchChain.test.ts +++ b/packages/react/src/hooks/useSwitchChain.test.ts @@ -1,7 +1,7 @@ import { connect, disconnect } from '@wagmi/core' import { chain, config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useAccount } from './useAccount.js' import { useSwitchChain } from './useSwitchChain.js' @@ -11,7 +11,7 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => ({ + const { result, act } = await renderHook(() => ({ useAccount: useAccount(), useSwitchChain: useSwitchChain(), })) @@ -19,8 +19,10 @@ test('default', async () => { const chainId1 = result.current.useAccount.chainId expect(chainId1).toBeDefined() - result.current.useSwitchChain.switchChain({ chainId: chain.mainnet2.id }) - await waitFor(() => + await act(() => + result.current.useSwitchChain.switchChain({ chainId: chain.mainnet2.id }), + ) + await vi.waitFor(() => expect(result.current.useSwitchChain.isSuccess).toBeTruthy(), ) @@ -28,8 +30,10 @@ test('default', async () => { expect(chainId2).toBeDefined() expect(chainId1).not.toBe(chainId2) - result.current.useSwitchChain.switchChain({ chainId: chain.mainnet.id }) - await waitFor(() => + await act(() => + result.current.useSwitchChain.switchChain({ chainId: chain.mainnet.id }), + ) + await vi.waitFor(() => expect(result.current.useSwitchChain.isSuccess).toBeTruthy(), ) @@ -40,8 +44,8 @@ test('default', async () => { await disconnect(config, { connector }) }) -test('behavior: chains updates', () => { - const { result, rerender } = renderHook(() => useSwitchChain()) +test('behavior: chains updates', async () => { + const { act, result } = await renderHook(() => useSwitchChain()) const chains = result.current.chains expect( @@ -66,8 +70,9 @@ test('behavior: chains updates', () => { ] `) - config._internal.chains.setState([chain.mainnet, chain.mainnet2]) - rerender() + await act(() => + config._internal.chains.setState([chain.mainnet, chain.mainnet2]), + ) expect( result.current.chains.map(({ id, name }) => ({ @@ -87,8 +92,7 @@ test('behavior: chains updates', () => { ] `) - config._internal.chains.setState(chains) - rerender() + await act(() => config._internal.chains.setState(chains)) expect( result.current.chains.map(({ id, name }) => ({ diff --git a/packages/react/src/hooks/useSyncExternalStoreWithTracked.test.tsx b/packages/react/src/hooks/useSyncExternalStoreWithTracked.test.tsx index e0b1e71a94..80a9118c6b 100644 --- a/packages/react/src/hooks/useSyncExternalStoreWithTracked.test.tsx +++ b/packages/react/src/hooks/useSyncExternalStoreWithTracked.test.tsx @@ -1,8 +1,7 @@ -import { fireEvent, screen } from '@testing-library/react' -import { act, cleanup, render, renderHook } from '@wagmi/test/react' +import { render, renderHook } from '@wagmi/test/react' import React from 'react' import * as ReactDOM from 'react-dom' -import { afterEach, expect, test } from 'vitest' +import { expect, test } from 'vitest' import { useSyncExternalStoreWithTracked } from './useSyncExternalStoreWithTracked.js' @@ -41,10 +40,6 @@ function useExternalStore( return state as any } -afterEach(() => { - cleanup() -}) - test('rerenders only when the tracked value changes', async () => { const externalStore = createExternalStore({ foo: 'bar', @@ -54,11 +49,10 @@ test('rerenders only when the tracked value changes', async () => { const renders: any[] = [] - renderHook(() => { + const { act } = await renderHook(() => { const { gm } = useExternalStore(externalStore, (state) => { renders.push(state) }) - return gm }) @@ -105,7 +99,7 @@ test('rerenders when all values are being tracked', async () => { const renders: any[] = [] - renderHook(() => { + const { act } = await renderHook(() => { const { foo, gm, isGonnaMakeIt } = useExternalStore( externalStore, (state) => { @@ -149,7 +143,7 @@ test('rerenders when no values are being tracked', async () => { const renders: any[] = [] - renderHook(() => { + const { act } = await renderHook(() => { useExternalStore(externalStore, (state) => { renders.push(state) }) @@ -200,25 +194,31 @@ test('store object reference is stable across rerenders', async () => { <> + ) } - render() + const screen = await render() - const forceRerenderBtn = screen.getByRole('button') + const forceRerenderButton = screen.getByText('rerender') expect(childRenderCount).toBe(1) expect(renders.length).toBe(1) // updating parent state, child should not rerender - fireEvent.click(forceRerenderBtn) + await forceRerenderButton.click() expect(childRenderCount).toBe(1) expect(renders.length).toBe(2) // child and parent both rerender when store changes - act(() => { - externalStore.set((x) => ({ ...x, isGonnaMakeIt: true })) - }) + const updateExternalStoreButton = screen.getByText('update') + await updateExternalStoreButton.click() expect(childRenderCount).toBe(2) expect(renders.length).toBe(3) }) @@ -228,7 +228,7 @@ test('array', async () => { const renders: any[] = [] - renderHook(() => { + const { act } = await renderHook(() => { const array = useExternalStore(externalStore, (state) => { renders.push(state) }) diff --git a/packages/react/src/hooks/useToken.test.ts b/packages/react/src/hooks/useToken.test.ts index 6023797532..07a883cbd7 100644 --- a/packages/react/src/hooks/useToken.test.ts +++ b/packages/react/src/hooks/useToken.test.ts @@ -1,16 +1,16 @@ -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useToken } from './useToken.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useToken({ address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/useTransaction.test.ts b/packages/react/src/hooks/useTransaction.test.ts index 190cffb1fe..a9de1d9172 100644 --- a/packages/react/src/hooks/useTransaction.test.ts +++ b/packages/react/src/hooks/useTransaction.test.ts @@ -1,16 +1,16 @@ -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useTransaction } from './useTransaction.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useTransaction({ hash: '0x60668ed8c2dc110d61d945a936fcd45b8f13654e5c78481c8c825d1148c7ef30', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { diff --git a/packages/react/src/hooks/useTransactionConfirmations.test.ts b/packages/react/src/hooks/useTransactionConfirmations.test.ts index 4f4a79c251..7dea50c683 100644 --- a/packages/react/src/hooks/useTransactionConfirmations.test.ts +++ b/packages/react/src/hooks/useTransactionConfirmations.test.ts @@ -1,19 +1,18 @@ +import { getTransactionReceipt } from '@wagmi/core' import { config, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import type { Hash } from 'viem' -import { expect, test } from 'vitest' - -import { getTransactionReceipt } from '@wagmi/core' +import { expect, test, vi } from 'vitest' import { useTransactionConfirmations } from './useTransactionConfirmations.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useTransactionConfirmations({ hash: '0x60668ed8c2dc110d61d945a936fcd45b8f13654e5c78481c8c825d1148c7ef30', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('bigint') @@ -58,13 +57,13 @@ test('parameters: transactionReceipt', async () => { hash: '0x60668ed8c2dc110d61d945a936fcd45b8f13654e5c78481c8c825d1148c7ef30', }) - const { result } = renderHook(() => + const { result } = await renderHook(() => useTransactionConfirmations({ transactionReceipt, }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('bigint') @@ -120,12 +119,12 @@ test('parameters: transactionReceipt', async () => { }) test('behavior: hash: undefined -> defined', async () => { - let hash: Hash | undefined = undefined - - const { result, rerender } = renderHook(() => - useTransactionConfirmations({ - hash, - }), + const { result, rerender } = await renderHook( + (props) => + useTransactionConfirmations({ + hash: props?.hash, + }), + { initialProps: { hash: undefined as Hash | undefined } }, ) expect(result.current).toMatchInlineSnapshot(` @@ -164,10 +163,11 @@ test('behavior: hash: undefined -> defined', async () => { } `) - hash = '0x60668ed8c2dc110d61d945a936fcd45b8f13654e5c78481c8c825d1148c7ef30' - rerender() + rerender({ + hash: '0x60668ed8c2dc110d61d945a936fcd45b8f13654e5c78481c8c825d1148c7ef30', + }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('bigint') @@ -208,8 +208,8 @@ test('behavior: hash: undefined -> defined', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useTransactionConfirmations()) + const { result } = await renderHook(() => useTransactionConfirmations()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useTransactionCount.test.ts b/packages/react/src/hooks/useTransactionCount.test.ts index 13a241ea88..fefbe506a7 100644 --- a/packages/react/src/hooks/useTransactionCount.test.ts +++ b/packages/react/src/hooks/useTransactionCount.test.ts @@ -1,16 +1,16 @@ import { accounts, chain, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import type { Address } from 'viem' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useTransactionCount } from './useTransactionCount.js' const address = accounts[0] test('default', async () => { - const { result } = renderHook(() => useTransactionCount({ address })) + const { result } = await renderHook(() => useTransactionCount({ address })) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('number') @@ -51,11 +51,11 @@ test('default', async () => { }) test('parameters: chainId', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useTransactionCount({ address, chainId: chain.mainnet2.id }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('number') @@ -96,11 +96,11 @@ test('parameters: chainId', async () => { }) test('parameters: blockNumber', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useTransactionCount({ address, blockNumber: 13677382n }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('number') @@ -142,9 +142,9 @@ test('parameters: blockNumber', async () => { }) test('behavior: address: undefined -> defined', async () => { - let address: Address | undefined = undefined + let address: Address | undefined - const { result, rerender } = renderHook(() => + const { result, rerender } = await renderHook(() => useTransactionCount({ address }), ) @@ -190,7 +190,7 @@ test('behavior: address: undefined -> defined', async () => { address = accounts[0] rerender() - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, ...rest } = result.current expect(data).toBeTypeOf('number') @@ -231,8 +231,8 @@ test('behavior: address: undefined -> defined', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useTransactionCount()) + const { result } = await renderHook(() => useTransactionCount()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useTransactionReceipt.test.ts b/packages/react/src/hooks/useTransactionReceipt.test.ts index fd2e24d76b..a8cc318697 100644 --- a/packages/react/src/hooks/useTransactionReceipt.test.ts +++ b/packages/react/src/hooks/useTransactionReceipt.test.ts @@ -1,17 +1,17 @@ import { chain, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import type { Hash } from 'viem' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useTransactionReceipt } from './useTransactionReceipt.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useTransactionReceipt({ hash: '0xbf7d27700d053765c9638d3b9d39eb3c56bfc48377583e8be483d61f9f18a871', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) expect(result.current).toMatchInlineSnapshot(` { @@ -66,14 +66,14 @@ test('default', async () => { }) test('parameters: chainId', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useTransactionReceipt({ chainId: chain.mainnet2.id, hash: '0xbf7d27700d053765c9638d3b9d39eb3c56bfc48377583e8be483d61f9f18a871', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -128,12 +128,12 @@ test('parameters: chainId', async () => { }) test('behavior: hash: undefined -> defined', async () => { - let hash: Hash | undefined = undefined - - const { result, rerender } = renderHook(() => - useTransactionReceipt({ - hash, - }), + const { result, rerender } = await renderHook( + (props) => + useTransactionReceipt({ + hash: props?.hash, + }), + { initialProps: { hash: undefined as Hash | undefined } }, ) expect(result.current).toMatchInlineSnapshot(` @@ -172,10 +172,11 @@ test('behavior: hash: undefined -> defined', async () => { } `) - hash = '0xbf7d27700d053765c9638d3b9d39eb3c56bfc48377583e8be483d61f9f18a871' - rerender() + rerender({ + hash: '0xbf7d27700d053765c9638d3b9d39eb3c56bfc48377583e8be483d61f9f18a871', + }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -230,8 +231,8 @@ test('behavior: hash: undefined -> defined', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useTransactionReceipt()) + const { result } = await renderHook(() => useTransactionReceipt()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useTransactionReceipt.ts b/packages/react/src/hooks/useTransactionReceipt.ts index f29ab6204e..69ea094116 100644 --- a/packages/react/src/hooks/useTransactionReceipt.ts +++ b/packages/react/src/hooks/useTransactionReceipt.ts @@ -6,13 +6,13 @@ import type { ResolvedRegister, } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' +import type { GetTransactionReceiptQueryFnData } from '@wagmi/core/query' import { type GetTransactionReceiptData, type GetTransactionReceiptOptions, type GetTransactionReceiptQueryKey, getTransactionReceiptQueryOptions, } from '@wagmi/core/query' -import type { GetTransactionReceiptQueryFnData } from '@wagmi/core/query' import type { ConfigParameter, QueryParameter } from '../types/properties.js' import { type UseQueryReturnType, useQuery } from '../utils/query.js' import { useChainId } from './useChainId.js' diff --git a/packages/react/src/hooks/useVerifyMessage.test.ts b/packages/react/src/hooks/useVerifyMessage.test.ts index 244b6331f7..a674e974b0 100644 --- a/packages/react/src/hooks/useVerifyMessage.test.ts +++ b/packages/react/src/hooks/useVerifyMessage.test.ts @@ -1,14 +1,13 @@ import { accounts, chain, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' - +import { renderHook } from '@wagmi/test/react' import type { Hex } from 'viem' +import { expect, test, vi } from 'vitest' import { useVerifyMessage } from './useVerifyMessage.js' const address = accounts[0] test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useVerifyMessage({ address, message: 'This is a test message for viem!', @@ -17,7 +16,7 @@ test('default', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) expect(result.current).toMatchInlineSnapshot(` { @@ -59,7 +58,7 @@ test('default', async () => { }) test('parameters: chainId', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useVerifyMessage({ chainId: chain.mainnet2.id, address, @@ -69,7 +68,7 @@ test('parameters: chainId', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) expect(result.current).toMatchInlineSnapshot(` { @@ -111,7 +110,7 @@ test('parameters: chainId', async () => { }) test('parameters: blockNumber', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useVerifyMessage({ blockNumber: 12345678n, address, @@ -121,7 +120,7 @@ test('parameters: blockNumber', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -164,7 +163,7 @@ test('parameters: blockNumber', async () => { }) test('parameters: blockTag', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useVerifyMessage({ blockTag: 'pending', address, @@ -174,7 +173,7 @@ test('parameters: blockTag', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -217,14 +216,14 @@ test('parameters: blockTag', async () => { }) test('behavior: signature: undefined -> defined', async () => { - let signature: Hex | undefined = undefined - - const { result, rerender } = renderHook(() => - useVerifyMessage({ - address, - message: 'This is a test message for viem!', - signature, - }), + const { result, rerender } = await renderHook( + (props) => + useVerifyMessage({ + address, + message: 'This is a test message for viem!', + signature: props?.signature, + }), + { initialProps: { signature: undefined as Hex | undefined } }, ) expect(result.current).toMatchInlineSnapshot(` @@ -265,11 +264,12 @@ test('behavior: signature: undefined -> defined', async () => { } `) - signature = - '0xc4c7f2820177020d66d5fd00d084cdd3f575a868c059c29a2d7f23398d04819709a14f83d98b446dda539ca5dcb87d75aa3340eb15e66d67606850622a3420f61b' - rerender() + rerender({ + signature: + '0xc4c7f2820177020d66d5fd00d084cdd3f575a868c059c29a2d7f23398d04819709a14f83d98b446dda539ca5dcb87d75aa3340eb15e66d67606850622a3420f61b', + }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -311,8 +311,8 @@ test('behavior: signature: undefined -> defined', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useVerifyMessage()) + const { result } = await renderHook(() => useVerifyMessage()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useVerifyMessage.ts b/packages/react/src/hooks/useVerifyMessage.ts index ae8bb6df21..0b0641c654 100644 --- a/packages/react/src/hooks/useVerifyMessage.ts +++ b/packages/react/src/hooks/useVerifyMessage.ts @@ -6,13 +6,13 @@ import type { VerifyMessageErrorType, } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' +import type { VerifyMessageQueryFnData } from '@wagmi/core/query' import { type VerifyMessageData, type VerifyMessageOptions, type VerifyMessageQueryKey, verifyMessageQueryOptions, } from '@wagmi/core/query' -import type { VerifyMessageQueryFnData } from '@wagmi/core/query' import type { ConfigParameter, QueryParameter } from '../types/properties.js' import { type UseQueryReturnType, useQuery } from '../utils/query.js' import { useChainId } from './useChainId.js' diff --git a/packages/react/src/hooks/useVerifyTypedData.test-d.ts b/packages/react/src/hooks/useVerifyTypedData.test-d.ts index 91f875e0b6..ed65b09d14 100644 --- a/packages/react/src/hooks/useVerifyTypedData.test-d.ts +++ b/packages/react/src/hooks/useVerifyTypedData.test-d.ts @@ -1,7 +1,6 @@ import type { typedData } from '@wagmi/test' -import { expectTypeOf, test } from 'vitest' - import type { Address } from 'viem' +import { expectTypeOf, test } from 'vitest' import { type UseVerifyTypedDataParameters, useVerifyTypedData, diff --git a/packages/react/src/hooks/useVerifyTypedData.test.ts b/packages/react/src/hooks/useVerifyTypedData.test.ts index d57331743f..ba145705fd 100644 --- a/packages/react/src/hooks/useVerifyTypedData.test.ts +++ b/packages/react/src/hooks/useVerifyTypedData.test.ts @@ -1,7 +1,7 @@ import { typedData, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import type { Hex } from 'viem' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useVerifyTypedData } from './useVerifyTypedData.js' @@ -9,7 +9,7 @@ const smartAccountAddress = '0x3FCf42e10CC70Fe75A62EB3aDD6D305Aa840d145' const notDeployedAddress = '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef' test('valid signature', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useVerifyTypedData({ ...typedData.basic, primaryType: 'Mail', @@ -19,7 +19,7 @@ test('valid signature', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -104,7 +104,7 @@ test('valid signature', async () => { }) test('invalid signature', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useVerifyTypedData({ ...typedData.basic, primaryType: 'Mail', @@ -113,7 +113,7 @@ test('invalid signature', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -198,7 +198,7 @@ test('invalid signature', async () => { }) test('account not deployed', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useVerifyTypedData({ ...typedData.basic, primaryType: 'Mail', @@ -208,7 +208,7 @@ test('account not deployed', async () => { }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -293,15 +293,15 @@ test('account not deployed', async () => { }) test('behavior: signature: undefined -> defined', async () => { - let signature: Hex | undefined = undefined - - const { result, rerender } = renderHook(() => - useVerifyTypedData({ - ...typedData.basic, - primaryType: 'Mail', - address: smartAccountAddress, - signature, - }), + const { result, rerender } = await renderHook( + (props) => + useVerifyTypedData({ + ...typedData.basic, + primaryType: 'Mail', + address: smartAccountAddress, + signature: props?.signature, + }), + { initialProps: { signature: undefined as Hex | undefined } }, ) expect(result.current).toMatchInlineSnapshot(` @@ -385,11 +385,12 @@ test('behavior: signature: undefined -> defined', async () => { } `) - signature = - '0x79d756d805073dc97b7bc885b0d56ddf319a2599530fe1e178c2a7de5be88980068d24f20a79b318ea0a84d33ae06f93db77e4235e5d9eeb8b1d7a63922ada3e1c' - rerender() + rerender({ + signature: + '0x79d756d805073dc97b7bc885b0d56ddf319a2599530fe1e178c2a7de5be88980068d24f20a79b318ea0a84d33ae06f93db77e4235e5d9eeb8b1d7a63922ada3e1c', + }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current).toMatchInlineSnapshot(` { @@ -474,8 +475,8 @@ test('behavior: signature: undefined -> defined', async () => { }) test('behavior: disabled when properties missing', async () => { - const { result } = renderHook(() => useVerifyTypedData()) + const { result } = await renderHook(() => useVerifyTypedData()) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useVerifyTypedData.ts b/packages/react/src/hooks/useVerifyTypedData.ts index b02d1a8510..df18f24292 100644 --- a/packages/react/src/hooks/useVerifyTypedData.ts +++ b/packages/react/src/hooks/useVerifyTypedData.ts @@ -5,13 +5,13 @@ import type { ResolvedRegister, VerifyTypedDataErrorType, } from '@wagmi/core' +import type { VerifyTypedDataQueryFnData } from '@wagmi/core/query' import { type VerifyTypedDataData, type VerifyTypedDataOptions, type VerifyTypedDataQueryKey, verifyTypedDataQueryOptions, } from '@wagmi/core/query' -import type { VerifyTypedDataQueryFnData } from '@wagmi/core/query' import type { TypedData } from 'viem' import type { ConfigParameter, QueryParameter } from '../types/properties.js' import { type UseQueryReturnType, useQuery } from '../utils/query.js' diff --git a/packages/react/src/hooks/useWaitForCallsStatus.test.ts b/packages/react/src/hooks/useWaitForCallsStatus.test.ts index 96f5a2a7e4..0f1ee3012f 100644 --- a/packages/react/src/hooks/useWaitForCallsStatus.test.ts +++ b/packages/react/src/hooks/useWaitForCallsStatus.test.ts @@ -1,8 +1,8 @@ import { connect, disconnect } from '@wagmi/core' import { accounts, config, testClient, wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' +import { renderHook } from '@wagmi/test/react' import { parseEther } from 'viem' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useSendCalls } from './useSendCalls.js' import { useWaitForCallsStatus } from './useWaitForCallsStatus.js' @@ -12,8 +12,8 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const useSendCalls_render = renderHook(() => useSendCalls()) - const useWaitForCallsStatus_render = renderHook(() => + const useSendCalls_render = await renderHook(() => useSendCalls()) + const useWaitForCallsStatus_render = await renderHook(() => useWaitForCallsStatus({ id: useSendCalls_render.result.current.data?.id }), ) @@ -34,9 +34,10 @@ test('default', async () => { }, ], }) - await waitFor(() => - expect(useSendCalls_render.result.current.isSuccess).toBeTruthy(), - ) + + await vi.waitUntil(() => useSendCalls_render.result.current.isSuccess, { + timeout: 5_000, + }) expect(useWaitForCallsStatus_render.result.current.fetchStatus).toBe('idle') useWaitForCallsStatus_render.rerender() @@ -44,17 +45,13 @@ test('default', async () => { 'fetching', ) - await Promise.all([ - waitFor(() => - expect( - useWaitForCallsStatus_render.result.current.isSuccess, - ).toBeTruthy(), - ), - (async () => { - await wait(100) - await testClient.mainnet.mine({ blocks: 1 }) - })(), - ]) + await wait(0) + await testClient.mainnet.mine({ blocks: 1 }) + + await vi.waitUntil( + () => useWaitForCallsStatus_render.result.current.isSuccess, + { timeout: 5_000 }, + ) expect(useWaitForCallsStatus_render.result.current.data?.status).toBe( 'success', diff --git a/packages/react/src/hooks/useWaitForTransactionReceipt.test.ts b/packages/react/src/hooks/useWaitForTransactionReceipt.test.ts index 484d25087f..32b281df29 100644 --- a/packages/react/src/hooks/useWaitForTransactionReceipt.test.ts +++ b/packages/react/src/hooks/useWaitForTransactionReceipt.test.ts @@ -1,16 +1,16 @@ import { wait } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useWaitForTransactionReceipt } from './useWaitForTransactionReceipt.js' test('default', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useWaitForTransactionReceipt({ hash: '0x60668ed8c2dc110d61d945a936fcd45b8f13654e5c78481c8c825d1148c7ef30', }), ) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result).toMatchInlineSnapshot(` { @@ -68,10 +68,10 @@ test('default', async () => { }) test('disabled when hash is undefined', async () => { - const { result } = renderHook(() => + const { result } = await renderHook(() => useWaitForTransactionReceipt({ hash: undefined }), ) await wait(100) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) }) diff --git a/packages/react/src/hooks/useWalletClient.test.tsx b/packages/react/src/hooks/useWalletClient.test.tsx index 40fdd5850a..4596fa2bdd 100644 --- a/packages/react/src/hooks/useWalletClient.test.tsx +++ b/packages/react/src/hooks/useWalletClient.test.tsx @@ -1,8 +1,8 @@ import { connect, disconnect } from '@wagmi/core' -import { config, wait } from '@wagmi/test' -import { render, renderHook, waitFor } from '@wagmi/test/react' +import { config } from '@wagmi/test' +import { render, renderHook } from '@wagmi/test/react' import * as React from 'react' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useAccount } from './useAccount.js' import { useConnect } from './useConnect.js' @@ -16,9 +16,9 @@ import { useWalletClient } from './useWalletClient.js' const connector = config.connectors[0]! test('default', async () => { - const { result } = renderHook(() => useWalletClient()) + const { result } = await renderHook(() => useWalletClient()) - await waitFor(() => expect(result.current.isPending).toBeTruthy()) + await vi.waitFor(() => expect(result.current.isPending).toBeTruthy()) expect(result.current).toMatchInlineSnapshot(` { @@ -60,9 +60,9 @@ test('default', async () => { test('behavior: connected on mount', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useWalletClient()) + const { result } = await renderHook(() => useWalletClient()) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) const { data, queryKey: _, ...rest } = result.current expect(data).toMatchObject( @@ -103,7 +103,7 @@ test('behavior: connected on mount', async () => { }) test('behavior: connect and disconnect', async () => { - const { result } = renderHook(() => ({ + const { result } = await renderHook(() => ({ useConnect: useConnect(), useWalletClient: useWalletClient(), useDisconnect: useDisconnect(), @@ -115,11 +115,13 @@ test('behavior: connect and disconnect', async () => { connector: result.current.useConnect.connectors[0]!, }) - await waitFor(() => expect(result.current.useWalletClient.data).toBeDefined()) + await vi.waitFor(() => + expect(result.current.useWalletClient.data).toBeDefined(), + ) result.current.useDisconnect.disconnect() - await waitFor(() => + await vi.waitFor(() => expect(result.current.useWalletClient.data).not.toBeDefined(), ) }) @@ -127,54 +129,66 @@ test('behavior: connect and disconnect', async () => { test('behavior: switch chains', async () => { await connect(config, { connector }) - const { result } = renderHook(() => ({ + const { act, result } = await renderHook(() => ({ useWalletClient: useWalletClient(), useSwitchChain: useSwitchChain(), })) expect(result.current.useWalletClient.data).not.toBeDefined() + await vi.waitFor(() => + expect(result.current.useWalletClient.data).toBeDefined(), + ) - await waitFor(() => expect(result.current.useWalletClient.data).toBeDefined()) - - result.current.useSwitchChain.switchChain({ chainId: 456 }) - await waitFor(() => { - expect(result.current.useSwitchChain.isSuccess).toBeTruthy() - result.current.useSwitchChain.reset() + await act(() => result.current.useSwitchChain.switchChain({ chainId: 456 })) + await vi.waitUntil(() => result.current.useSwitchChain.isSuccess, { + timeout: 5_000, + }) + await act(() => result.current.useSwitchChain.reset()) + await vi.waitUntil(() => result.current.useWalletClient.isSuccess, { + timeout: 5_000, }) expect(result.current.useWalletClient.data?.chain.id).toEqual(456) - result.current.useSwitchChain.switchChain({ chainId: 1 }) - await waitFor(() => - expect(result.current.useSwitchChain.isSuccess).toBeTruthy(), - ) + await act(() => result.current.useSwitchChain.switchChain({ chainId: 1 })) + await vi.waitUntil(() => result.current.useSwitchChain.isSuccess, { + timeout: 5_000, + }) + await vi.waitUntil(() => result.current.useWalletClient.isSuccess, { + timeout: 5_000, + }) expect(result.current.useWalletClient.data?.chain.id).toEqual(1) await disconnect(config, { connector }) }) test('behavior: re-render does not invalidate query', async () => { - const { getByTestId } = render() + await disconnect(config, { connector }) + + const screen = await render() - getByTestId('connect').click() - await waitFor(() => { - expect(getByTestId('address').innerText).toContain( - '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', - ) - expect(getByTestId('client').innerText).toBeTruthy() + await screen.getByTestId('connect').click() + await vi.waitFor(async () => { + await expect + .element(screen.getByTestId('address')) + .toHaveTextContent('0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266') + await expect.element(screen.getByTestId('client')).toBeVisible() - expect(getByTestId('child-client').innerText).toBeTruthy() - expect(getByTestId('render-count').innerText).toEqual('1') + await expect.element(screen.getByTestId('child-client')).toBeVisible() + await expect + .element(screen.getByTestId('render-count')) + .toHaveTextContent('1') }) - const initialClient = getByTestId('child-client').innerText + const initialClient = screen.getByTestId('child-client') - getByTestId('rerender').click() - await waitFor(() => { - expect(getByTestId('render-count').innerText).toEqual('2') - }) - await wait(200) + await screen.getByTestId('rerender').click() + await vi.waitFor(() => + expect.element(screen.getByTestId('render-count')).toHaveTextContent('2'), + ) - expect(getByTestId('child-client').innerText).toEqual(initialClient) + await expect + .element(screen.getByTestId('child-client').element()) + .toEqual(initialClient.element()) }) function Parent() { @@ -208,9 +222,7 @@ function Parent() { ) } -function Child(props: { - renderCount: number -}) { +function Child(props: { renderCount: number }) { const { renderCount } = props const { data } = useWalletClient() return ( diff --git a/packages/react/src/hooks/useWatchAsset.test.ts b/packages/react/src/hooks/useWatchAsset.test.ts index 989b0323c8..c76477aa28 100644 --- a/packages/react/src/hooks/useWatchAsset.test.ts +++ b/packages/react/src/hooks/useWatchAsset.test.ts @@ -1,7 +1,7 @@ import { connect, disconnect } from '@wagmi/core' import { config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useWatchAsset } from './useWatchAsset.js' @@ -16,10 +16,10 @@ const tokenInfo = { test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useWatchAsset()) + const { result } = await renderHook(() => useWatchAsset()) result.current.watchAsset({ type: 'ERC20', options: tokenInfo }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current.data).toEqual(true) diff --git a/packages/react/src/hooks/useWatchBlockNumber.test.ts b/packages/react/src/hooks/useWatchBlockNumber.test.ts index ecb900b357..5d5776f870 100644 --- a/packages/react/src/hooks/useWatchBlockNumber.test.ts +++ b/packages/react/src/hooks/useWatchBlockNumber.test.ts @@ -1,6 +1,6 @@ import { testClient, wait } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useWatchBlockNumber } from './useWatchBlockNumber.js' @@ -19,10 +19,7 @@ test('default', async () => { await testClient.mainnet.mine({ blocks: 1 }) await wait(100) await testClient.mainnet.mine({ blocks: 1 }) - await wait(100) + await vi.waitUntil(() => blockNumbers.length === 3, { timeout: 5_000 }) expect(blockNumbers.length).toBe(3) - expect( - blockNumbers.map((blockNumber) => blockNumber - blockNumbers[0]!), - ).toEqual([0n, 1n, 2n]) }) diff --git a/packages/react/src/hooks/useWatchBlocks.test.ts b/packages/react/src/hooks/useWatchBlocks.test.ts index 039c718834..50d9543008 100644 --- a/packages/react/src/hooks/useWatchBlocks.test.ts +++ b/packages/react/src/hooks/useWatchBlocks.test.ts @@ -1,13 +1,13 @@ import { testClient, wait } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' import type { Block } from 'viem' -import { expect, test } from 'vitest' +import { expect, test, vi } from 'vitest' import { useWatchBlocks } from './useWatchBlocks.js' test('default', async () => { const blocks: Block[] = [] - renderHook(() => + await renderHook(() => useWatchBlocks({ onBlock(block) { blocks.push(block) @@ -20,12 +20,7 @@ test('default', async () => { await testClient.mainnet.mine({ blocks: 1 }) await wait(100) await testClient.mainnet.mine({ blocks: 1 }) - await wait(100) + await vi.waitUntil(() => blocks.length === 3, { timeout: 5_000 }) expect(blocks.length).toBe(3) - expect(blocks.map((block) => block.number! - blocks[0]!.number!)).toEqual([ - 0n, - 1n, - 2n, - ]) }) diff --git a/packages/react/src/hooks/useWatchContractEvent.test-d.ts b/packages/react/src/hooks/useWatchContractEvent.test-d.ts index 41f8e5e77c..e9c8192b77 100644 --- a/packages/react/src/hooks/useWatchContractEvent.test-d.ts +++ b/packages/react/src/hooks/useWatchContractEvent.test-d.ts @@ -1,4 +1,4 @@ -import { http, createConfig, webSocket } from '@wagmi/core' +import { createConfig, http, webSocket } from '@wagmi/core' import { mainnet, optimism } from '@wagmi/core/chains' import { abi } from '@wagmi/test' import { expectTypeOf, test } from 'vitest' diff --git a/packages/react/src/hooks/useWatchContractEvent.test.ts b/packages/react/src/hooks/useWatchContractEvent.test.ts index e6ad2aa1dc..d3b7197594 100644 --- a/packages/react/src/hooks/useWatchContractEvent.test.ts +++ b/packages/react/src/hooks/useWatchContractEvent.test.ts @@ -9,7 +9,7 @@ import { wait, } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' -import { http, createWalletClient, parseEther } from 'viem' +import { createWalletClient, http, parseEther } from 'viem' import type { WatchEventOnLogsParameter } from 'viem/actions' import { expect, test } from 'vitest' diff --git a/packages/react/src/hooks/useWriteContract.test-d.ts b/packages/react/src/hooks/useWriteContract.test-d.ts index 344c11255b..a259cb9185 100644 --- a/packages/react/src/hooks/useWriteContract.test-d.ts +++ b/packages/react/src/hooks/useWriteContract.test-d.ts @@ -1,4 +1,4 @@ -import { http, type WriteContractErrorType, createConfig } from '@wagmi/core' +import { createConfig, http, type WriteContractErrorType } from '@wagmi/core' import { base } from '@wagmi/core/chains' import { abi } from '@wagmi/test' import type { Abi, Address, Hash } from 'viem' diff --git a/packages/react/src/hooks/useWriteContract.test.ts b/packages/react/src/hooks/useWriteContract.test.ts index 16ef870c2b..7f5518f349 100644 --- a/packages/react/src/hooks/useWriteContract.test.ts +++ b/packages/react/src/hooks/useWriteContract.test.ts @@ -1,7 +1,7 @@ import { connect, disconnect } from '@wagmi/core' import { abi, address, config } from '@wagmi/test' -import { renderHook, waitFor } from '@wagmi/test/react' -import { expect, test } from 'vitest' +import { renderHook } from '@wagmi/test/react' +import { expect, test, vi } from 'vitest' import { useWriteContract } from './useWriteContract.js' @@ -10,14 +10,14 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const { result } = renderHook(() => useWriteContract()) + const { result } = await renderHook(() => useWriteContract()) result.current.writeContract({ abi: abi.wagmiMintExample, address: address.wagmiMintExample, functionName: 'mint', }) - await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) + await vi.waitUntil(() => result.current.isSuccess) expect(result.current.data).toBeDefined() diff --git a/packages/react/src/hydrate.ts b/packages/react/src/hydrate.ts index b185929c22..729bc79acc 100644 --- a/packages/react/src/hydrate.ts +++ b/packages/react/src/hydrate.ts @@ -1,6 +1,6 @@ 'use client' -import { type ResolvedRegister, type State, hydrate } from '@wagmi/core' +import { hydrate, type ResolvedRegister, type State } from '@wagmi/core' import { type ReactElement, useEffect, useRef } from 'react' export type HydrateProps = { diff --git a/packages/react/src/utils/query.ts b/packages/react/src/utils/query.ts index 3aafb16123..e7e334a763 100644 --- a/packages/react/src/utils/query.ts +++ b/packages/react/src/utils/query.ts @@ -1,14 +1,14 @@ import { type DefaultError, type QueryKey, + useInfiniteQuery as tanstack_useInfiniteQuery, + useQuery as tanstack_useQuery, type UseInfiniteQueryOptions, type UseInfiniteQueryResult, type UseMutationOptions, type UseMutationResult, type UseQueryOptions, type UseQueryResult, - useInfiniteQuery as tanstack_useInfiniteQuery, - useQuery as tanstack_useQuery, useMutation, } from '@tanstack/react-query' import type { diff --git a/packages/test/package.json b/packages/test/package.json index d1c6fb9c19..6b3eb35390 100644 --- a/packages/test/package.json +++ b/packages/test/package.json @@ -46,19 +46,22 @@ }, "typesVersions": { "*": { - "react": ["./dist/types/exports/react.d.ts"], - "vue": ["./dist/types/exports/vue.d.ts"] + "react": [ + "./dist/types/exports/react.d.ts" + ], + "vue": [ + "./dist/types/exports/vue.d.ts" + ] } }, "peerDependencies": { "@tanstack/react-query": ">=5.0.0", "@tanstack/vue-query": ">=5.0.0", - "@testing-library/react": ">=14.0.0", "@types/react": ">=18", "@types/react-dom": ">=18", "@wagmi/core": "workspace:*", "@wagmi/vue": "workspace:*", - "prool": "^0.0.23", + "prool": "^0.0.24", "react": ">=18", "react-dom": ">=18", "typescript": ">=5.0.4", @@ -73,9 +76,6 @@ "@tanstack/vue-query": { "optional": true }, - "@testing-library/react": { - "optional": true - }, "@types/react": { "optional": true }, @@ -101,8 +101,6 @@ "devDependencies": { "@tanstack/react-query": "catalog:", "@tanstack/vue-query": "catalog:", - "@testing-library/dom": "catalog:", - "@testing-library/react": "catalog:", "@types/react": "catalog:", "@types/react-dom": "catalog:", "@wagmi/core": "workspace:*", @@ -112,7 +110,16 @@ "vue": "catalog:", "wagmi": "workspace:*" }, - "contributors": ["awkweb.eth ", "jxom.eth "], + "contributors": [ + "awkweb.eth ", + "jxom.eth " + ], "funding": "https://github.com/sponsors/wevm", - "keywords": ["eth", "ethereum", "dapps", "wallet", "web3"] + "keywords": [ + "eth", + "ethereum", + "dapps", + "wallet", + "web3" + ] } diff --git a/packages/test/src/chains.ts b/packages/test/src/chains.ts index af9bdc5d99..e755067fdf 100644 --- a/packages/test/src/chains.ts +++ b/packages/test/src/chains.ts @@ -7,19 +7,21 @@ import { import { getRpcUrls } from './utils.js' -type Fork = { blockNumber: bigint; url: string } - export type Chain = Compute< viem_Chain & { - fork: Fork + fork: { blockNumber: bigint; url: string } port: number } > const mainnetFork = { blockNumber: 19_258_213n, - url: process.env.VITE_MAINNET_FORK_URL ?? 'https://eth.merkle.io', -} as const satisfies Fork + url: + (typeof process !== 'undefined' && process.env.VITE_MAINNET_FORK_URL) || + (typeof import.meta !== 'undefined' && + import.meta.env.VITE_MAINNET_FORK_URL) || + 'https://eth.merkle.io', +} as const satisfies Chain['fork'] export const mainnet = { ...viem_mainnet, @@ -40,7 +42,11 @@ export const optimism = { ...viem_optimism, fork: { blockNumber: 107_317_577n, - url: process.env.VITE_OPTIMISM_FORK_URL ?? 'https://mainnet.optimism.io', + url: + (typeof process !== 'undefined' && process.env.VITE_OPTIMISM_FORK_URL) || + (typeof import.meta !== 'undefined' && + import.meta.env.VITE_OPTIMISM_FORK_URL) || + 'https://mainnet.optimism.io', }, } as const satisfies Chain diff --git a/packages/test/src/clients.ts b/packages/test/src/clients.ts index 5a2d86005a..2f47f316d0 100644 --- a/packages/test/src/clients.ts +++ b/packages/test/src/clients.ts @@ -1,11 +1,11 @@ import { - http, type Account, type Client, + createTestClient, + http, type TestActions, type TestRpcSchema, type Transport, - createTestClient, } from 'viem' import { type Chain, mainnet, mainnet2, optimism } from './chains.js' diff --git a/packages/test/src/constants.ts b/packages/test/src/constants.ts index 96ca5a9efa..44afcbb014 100644 --- a/packages/test/src/constants.ts +++ b/packages/test/src/constants.ts @@ -2,13 +2,6 @@ import { type Address, parseAbi } from 'viem' import type { chain } from './chains.js' -/** - * The id of the current test worker. - * - * This is used by the anvil proxy to route requests to the correct anvil instance. - */ -export const pool = Number(process.env.VITEST_POOL_ID ?? 1) - // Test accounts export const accounts = [ '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', @@ -28,8 +21,10 @@ export const privateKey = '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80' export let walletConnectProjectId: string -if (process.env.VITE_WC_PROJECT_ID) +if (typeof process !== 'undefined' && process.env.VITE_WC_PROJECT_ID) walletConnectProjectId = process.env.VITE_WC_PROJECT_ID +if (typeof import.meta !== 'undefined' && import.meta.env.VITE_WC_PROJECT_ID) + walletConnectProjectId = import.meta.env.VITE_WC_PROJECT_ID else walletConnectProjectId = 'foobarbaz' export const typedData = { diff --git a/packages/test/src/exports/index.test.ts b/packages/test/src/exports/index.test.ts index 2a44ddbf8f..665ab0a9e0 100644 --- a/packages/test/src/exports/index.test.ts +++ b/packages/test/src/exports/index.test.ts @@ -9,6 +9,11 @@ test('exports', () => { "mainnet", "mainnet2", "optimism", + "mainnet2TestClient", + "mainnetTestClient", + "optimismTestClient", + "testClient", + "config", "abi", "accounts", "address", @@ -16,11 +21,6 @@ test('exports', () => { "privateKey", "typedData", "walletConnectProjectId", - "testClient", - "mainnetTestClient", - "mainnet2TestClient", - "optimismTestClient", - "config", "addressRegex", "transactionHashRegex", "wait", diff --git a/packages/test/src/exports/index.ts b/packages/test/src/exports/index.ts index 5844aeac01..3004f5a0f2 100644 --- a/packages/test/src/exports/index.ts +++ b/packages/test/src/exports/index.ts @@ -1,6 +1,12 @@ // biome-ignore lint/performance/noBarrelFile: entrypoint module export { chain, mainnet, mainnet2, optimism } from '../chains.js' - +export { + mainnet2TestClient, + mainnetTestClient, + optimismTestClient, + testClient, +} from '../clients.js' +export { config } from '../config.js' export { abi, accounts, @@ -11,15 +17,6 @@ export { walletConnectProjectId, } from '../constants.js' -export { - testClient, - mainnetTestClient, - mainnet2TestClient, - optimismTestClient, -} from '../clients.js' - -export { config } from '../config.js' - export { addressRegex, transactionHashRegex } from '../regex.js' export { wait } from '../utils.js' diff --git a/packages/test/src/exports/react.ts b/packages/test/src/exports/react.ts index f9dfe5c4b4..35890768ad 100644 --- a/packages/test/src/exports/react.ts +++ b/packages/test/src/exports/react.ts @@ -1,63 +1,53 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import * as React from 'react' import { type RenderHookOptions, type RenderHookResult, - type RenderOptions, type RenderResult, - render as rtl_render, - renderHook as rtl_renderHook, - waitFor as rtl_waitFor, - type waitForOptions, -} from '@testing-library/react' -import { type ReactElement, createElement } from 'react' + render as vbr_render, + renderHook as vbr_renderHook, +} from 'vitest-browser-react' import { WagmiProvider } from 'wagmi' import { config } from '../config.js' -// biome-ignore lint/performance/noBarrelFile: entrypoint module -export { act, cleanup } from '@testing-library/react' - export const queryClient = new QueryClient() -export function createWrapper>( - Wrapper: TComponent, - props: Parameters[0], +export function createWrapper>( + Wrapper: component, + props: Parameters[0], ) { type Props = { children?: React.ReactNode | undefined } return function CreatedWrapper({ children }: Props) { - return createElement( + return React.createElement( Wrapper, props, - createElement(QueryClientProvider, { client: queryClient }, children), + React.createElement( + QueryClientProvider, + { client: queryClient }, + children, + ), ) } } -export function renderHook( - render: (props: Props) => Result, - options?: RenderHookOptions | undefined, -): RenderHookResult { +export function renderHook( + renderCallback: (initialProps?: props) => result, + options?: RenderHookOptions, +): Promise> { queryClient.clear() - return rtl_renderHook(render, { + return vbr_renderHook(renderCallback, { wrapper: createWrapper(WagmiProvider, { config, reconnectOnMount: false }), ...options, }) } export function render( - element: ReactElement, - options?: RenderOptions | undefined, -): RenderResult { + ...args: Parameters +): Promise { queryClient.clear() - return rtl_render(element, { + return vbr_render(args[0], { + ...args[1], wrapper: createWrapper(WagmiProvider, { config, reconnectOnMount: false }), - ...options, }) } - -export function waitFor( - callback: () => Promise | T, - options?: waitForOptions | undefined, -): Promise { - return rtl_waitFor(callback, { timeout: 10_000, ...options }) -} diff --git a/packages/test/src/exports/vue.ts b/packages/test/src/exports/vue.ts index ac49b17a31..8e0f107f8a 100644 --- a/packages/test/src/exports/vue.ts +++ b/packages/test/src/exports/vue.ts @@ -1,6 +1,6 @@ import { VueQueryPlugin } from '@tanstack/vue-query' import { WagmiPlugin } from '@wagmi/vue' -import { type App, type Ref, createApp, watch } from 'vue' +import { type App, createApp, type Ref, watch } from 'vue' import { config } from '../config.js' @@ -22,7 +22,7 @@ export function renderComposable unknown>( }, }, ): RenderComposableReturnType { - let result = undefined + let result: unknown const app = createApp({ setup() { result = composable() diff --git a/packages/test/src/globalSetup.ts b/packages/test/src/globalSetup.ts index f8248e8390..4fc0382957 100644 --- a/packages/test/src/globalSetup.ts +++ b/packages/test/src/globalSetup.ts @@ -18,8 +18,8 @@ export default async function () { }).start(), ) } - const results = await Promise.all(promises) + const results = await Promise.all(promises) return async () => { await Promise.all(results.map((stop) => stop())) } diff --git a/packages/test/src/utils.ts b/packages/test/src/utils.ts index 85afe15c4b..522bf609b6 100644 --- a/packages/test/src/utils.ts +++ b/packages/test/src/utils.ts @@ -1,5 +1,8 @@ const pool = - Number(process.env.VITEST_POOL_ID ?? 1) + Math.floor(Math.random() * 10000) + (typeof process !== 'undefined' && + Number(process.env.VITEST_POOL_ID ?? 1) + + Math.floor(Math.random() * 10_000)) || + 1 + Math.floor(Math.random() * 10_000) export function getRpcUrls({ port }: { port: number }) { return { diff --git a/packages/test/src/vite-env.d.ts b/packages/test/src/vite-env.d.ts new file mode 100644 index 0000000000..4d19057015 --- /dev/null +++ b/packages/test/src/vite-env.d.ts @@ -0,0 +1,11 @@ +/// + +interface ImportMetaEnv { + readonly VITE_MAINNET_FORK_URL?: string | undefined + readonly VITE_OPTIMISM_FORK_URL?: string | undefined + readonly VITE_WC_PROJECT_ID?: string | undefined +} + +interface ImportMeta { + readonly env: ImportMetaEnv +} diff --git a/packages/vue/package.json b/packages/vue/package.json index 4078ff4b1e..aeb93a0bb4 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -65,11 +65,21 @@ }, "typesVersions": { "*": { - "actions": ["./dist/types/exports/actions.d.ts"], - "chains": ["./dist/types/exports/chains.d.ts"], - "connectors": ["./dist/types/exports/connectors.d.ts"], - "nuxt": ["./dist/types/exports/nuxt.d.ts"], - "query": ["./dist/types/exports/query.d.ts"] + "actions": [ + "./dist/types/exports/actions.d.ts" + ], + "chains": [ + "./dist/types/exports/chains.d.ts" + ], + "connectors": [ + "./dist/types/exports/connectors.d.ts" + ], + "nuxt": [ + "./dist/types/exports/nuxt.d.ts" + ], + "query": [ + "./dist/types/exports/query.d.ts" + ] } }, "peerDependencies": { @@ -98,7 +108,10 @@ "nuxt": "^3.11.2", "vue": "catalog:" }, - "contributors": ["awkweb.eth ", "jxom.eth "], + "contributors": [ + "awkweb.eth ", + "jxom.eth " + ], "funding": "https://github.com/sponsors/wevm", "keywords": [ "wagmi", diff --git a/packages/vue/src/composables/useAccount.ts b/packages/vue/src/composables/useAccount.ts index 136595fb20..7519657494 100644 --- a/packages/vue/src/composables/useAccount.ts +++ b/packages/vue/src/composables/useAccount.ts @@ -1,11 +1,11 @@ import { type Config, type GetAccountReturnType, - type ResolvedRegister, getAccount, + type ResolvedRegister, watchAccount, } from '@wagmi/core' -import { type ToRefs, onScopeDispose, reactive, readonly, toRefs } from 'vue' +import { onScopeDispose, reactive, readonly, type ToRefs, toRefs } from 'vue' import type { ConfigParameter } from '../types/properties.js' import { updateState } from '../utils/updateState.js' diff --git a/packages/vue/src/composables/useAccountEffect.test.ts b/packages/vue/src/composables/useAccountEffect.test.ts index 10ed7a3e37..0fbb02b43a 100644 --- a/packages/vue/src/composables/useAccountEffect.test.ts +++ b/packages/vue/src/composables/useAccountEffect.test.ts @@ -1,6 +1,6 @@ import { VueQueryPlugin } from '@tanstack/vue-query' import { mock } from '@wagmi/connectors' -import { http, connect, createConfig, disconnect } from '@wagmi/core' +import { connect, createConfig, disconnect, http } from '@wagmi/core' import { accounts, chain } from '@wagmi/test' import { renderComposable, waitFor } from '@wagmi/test/vue' import { expect, test, vi } from 'vitest' diff --git a/packages/vue/src/composables/useBalance.ts b/packages/vue/src/composables/useBalance.ts index 1fdcdc9450..9a265f9346 100644 --- a/packages/vue/src/composables/useBalance.ts +++ b/packages/vue/src/composables/useBalance.ts @@ -1,12 +1,12 @@ import type { Config, GetBalanceErrorType, ResolvedRegister } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' +import type { GetBalanceQueryFnData } from '@wagmi/core/query' import { type GetBalanceData, type GetBalanceOptions, type GetBalanceQueryKey, getBalanceQueryOptions, } from '@wagmi/core/query' -import type { GetBalanceQueryFnData } from '@wagmi/core/query' import { computed } from 'vue' import type { ConfigParameter, QueryParameter } from '../types/properties.js' diff --git a/packages/vue/src/composables/useBlockNumber.test-d.ts b/packages/vue/src/composables/useBlockNumber.test-d.ts index 255a1e02e8..fb3392735f 100644 --- a/packages/vue/src/composables/useBlockNumber.test-d.ts +++ b/packages/vue/src/composables/useBlockNumber.test-d.ts @@ -1,4 +1,4 @@ -import { http, createConfig, webSocket } from '@wagmi/core' +import { createConfig, http, webSocket } from '@wagmi/core' import { mainnet, optimism } from '@wagmi/core/chains' import { expectTypeOf, test } from 'vitest' diff --git a/packages/vue/src/composables/useBytecode.ts b/packages/vue/src/composables/useBytecode.ts index a697ff1a92..db00e6679d 100644 --- a/packages/vue/src/composables/useBytecode.ts +++ b/packages/vue/src/composables/useBytecode.ts @@ -4,20 +4,18 @@ import type { ResolvedRegister, } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' +import type { GetBytecodeQueryFnData } from '@wagmi/core/query' import { type GetBytecodeData, type GetBytecodeOptions, type GetBytecodeQueryKey, getBytecodeQueryOptions, } from '@wagmi/core/query' -import type { GetBytecodeQueryFnData } from '@wagmi/core/query' - -import type { ConfigParameter, QueryParameter } from '../types/properties.js' -import { type UseQueryReturnType, useQuery } from '../utils/query.js' - import { computed } from 'vue' +import type { ConfigParameter, QueryParameter } from '../types/properties.js' import type { DeepMaybeRef } from '../types/ref.js' import { deepUnref } from '../utils/cloneDeep.js' +import { type UseQueryReturnType, useQuery } from '../utils/query.js' import { useChainId } from './useChainId.js' import { useConfig } from './useConfig.js' diff --git a/packages/vue/src/composables/useChainId.ts b/packages/vue/src/composables/useChainId.ts index f459857ca9..c70ae81d58 100644 --- a/packages/vue/src/composables/useChainId.ts +++ b/packages/vue/src/composables/useChainId.ts @@ -1,11 +1,11 @@ import { type Config, type GetChainIdReturnType, - type ResolvedRegister, getChainId, + type ResolvedRegister, watchChainId, } from '@wagmi/core' -import { type Ref, onScopeDispose, readonly, ref } from 'vue' +import { onScopeDispose, type Ref, readonly, ref } from 'vue' import type { ConfigParameter } from '../types/properties.js' import { useConfig } from './useConfig.js' diff --git a/packages/vue/src/composables/useChains.ts b/packages/vue/src/composables/useChains.ts index 6cbada538b..ed99a6c36b 100644 --- a/packages/vue/src/composables/useChains.ts +++ b/packages/vue/src/composables/useChains.ts @@ -1,12 +1,12 @@ import { type Config, type GetChainsReturnType, - type ResolvedRegister, getChains, + type ResolvedRegister, } from '@wagmi/core' import { watchChains } from '@wagmi/core/internal' -import { type Ref, onScopeDispose, readonly, ref } from 'vue' +import { onScopeDispose, type Ref, readonly, ref } from 'vue' import type { ConfigParameter } from '../types/properties.js' import { useConfig } from './useConfig.js' diff --git a/packages/vue/src/composables/useClient.ts b/packages/vue/src/composables/useClient.ts index e29b38826b..9d34a80b1a 100644 --- a/packages/vue/src/composables/useClient.ts +++ b/packages/vue/src/composables/useClient.ts @@ -2,15 +2,15 @@ import { type Config, type GetClientParameters, type GetClientReturnType, - type ResolvedRegister, getClient, + type ResolvedRegister, watchClient, } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' import { - type Ref, computed, onScopeDispose, + type Ref, readonly, ref, watchEffect, diff --git a/packages/vue/src/composables/useConnections.ts b/packages/vue/src/composables/useConnections.ts index 7bcc499498..5910d6f598 100644 --- a/packages/vue/src/composables/useConnections.ts +++ b/packages/vue/src/composables/useConnections.ts @@ -3,7 +3,7 @@ import { getConnections, watchConnections, } from '@wagmi/core' -import { type Ref, onScopeDispose, readonly, ref } from 'vue' +import { onScopeDispose, type Ref, readonly, ref } from 'vue' import type { ConfigParameter } from '../types/properties.js' import { useConfig } from './useConfig.js' diff --git a/packages/vue/src/composables/useConnectors.ts b/packages/vue/src/composables/useConnectors.ts index 4d12d81806..b3514412b4 100644 --- a/packages/vue/src/composables/useConnectors.ts +++ b/packages/vue/src/composables/useConnectors.ts @@ -1,11 +1,11 @@ import { type Config, type GetConnectorsReturnType, - type ResolvedRegister, getConnectors, + type ResolvedRegister, watchConnectors, } from '@wagmi/core' -import { type Ref, onScopeDispose, ref } from 'vue' +import { onScopeDispose, type Ref, ref } from 'vue' import type { ConfigParameter } from '../types/properties.js' import { useConfig } from './useConfig.js' diff --git a/packages/vue/src/composables/useDisconnect.ts b/packages/vue/src/composables/useDisconnect.ts index 540e588124..486078bb51 100644 --- a/packages/vue/src/composables/useDisconnect.ts +++ b/packages/vue/src/composables/useDisconnect.ts @@ -8,7 +8,7 @@ import { type DisconnectVariables, disconnectMutationOptions, } from '@wagmi/core/query' -import { type Ref, computed } from 'vue' +import { computed, type Ref } from 'vue' import type { ConfigParameter } from '../types/properties.js' import type { diff --git a/packages/vue/src/composables/useReconnect.test-d.ts b/packages/vue/src/composables/useReconnect.test-d.ts index bc4ecd8d8a..5ac30f5042 100644 --- a/packages/vue/src/composables/useReconnect.test-d.ts +++ b/packages/vue/src/composables/useReconnect.test-d.ts @@ -4,9 +4,8 @@ import type { ReconnectErrorType, } from '@wagmi/core' import { config } from '@wagmi/test' -import { expectTypeOf, test } from 'vitest' - import type { Address } from 'viem' +import { expectTypeOf, test } from 'vitest' import { useReconnect } from './useReconnect.js' const connectors = [config.connectors[0]!] diff --git a/packages/vue/src/composables/useSignMessage.test.ts b/packages/vue/src/composables/useSignMessage.test.ts index a00691fb7f..809d33042d 100644 --- a/packages/vue/src/composables/useSignMessage.test.ts +++ b/packages/vue/src/composables/useSignMessage.test.ts @@ -2,9 +2,8 @@ import { connect, disconnect, getAccount } from '@wagmi/core' import { config, privateKey } from '@wagmi/test' import { renderComposable, waitFor } from '@wagmi/test/vue' import { recoverMessageAddress } from 'viem' -import { expect, test } from 'vitest' - import { privateKeyToAccount } from 'viem/accounts' +import { expect, test } from 'vitest' import { useSignMessage } from './useSignMessage.js' const connector = config.connectors[0]! diff --git a/packages/vue/src/composables/useSignTypedData.test.ts b/packages/vue/src/composables/useSignTypedData.test.ts index e3636d21eb..17720971f2 100644 --- a/packages/vue/src/composables/useSignTypedData.test.ts +++ b/packages/vue/src/composables/useSignTypedData.test.ts @@ -2,9 +2,8 @@ import { connect, disconnect, getAccount } from '@wagmi/core' import { config, privateKey, typedData } from '@wagmi/test' import { renderComposable, waitFor } from '@wagmi/test/vue' import { recoverTypedDataAddress } from 'viem' -import { expect, test } from 'vitest' - import { privateKeyToAccount } from 'viem/accounts' +import { expect, test } from 'vitest' import { useSignTypedData } from './useSignTypedData.js' const connector = config.connectors[0]! diff --git a/packages/vue/src/composables/useSimulateContract.ts b/packages/vue/src/composables/useSimulateContract.ts index 7ffce57b8e..10d1d1b190 100644 --- a/packages/vue/src/composables/useSimulateContract.ts +++ b/packages/vue/src/composables/useSimulateContract.ts @@ -11,7 +11,7 @@ import { simulateContractQueryOptions, } from '@wagmi/core/query' import type { Abi, ContractFunctionArgs, ContractFunctionName } from 'viem' -import { type MaybeRef, computed } from 'vue' +import { computed, type MaybeRef } from 'vue' import type { ConfigParameter, QueryParameter } from '../types/properties.js' import type { DeepMaybeRef } from '../types/ref.js' diff --git a/packages/vue/src/composables/useSwitchAccount.test-d.ts b/packages/vue/src/composables/useSwitchAccount.test-d.ts index d55e4b9d5e..7362c3f336 100644 --- a/packages/vue/src/composables/useSwitchAccount.test-d.ts +++ b/packages/vue/src/composables/useSwitchAccount.test-d.ts @@ -1,8 +1,7 @@ import type { Connector, SwitchAccountErrorType } from '@wagmi/core' import { config } from '@wagmi/test' -import { expectTypeOf, test } from 'vitest' - import type { Address } from 'viem' +import { expectTypeOf, test } from 'vitest' import { useSwitchAccount } from './useSwitchAccount.js' const connector = config.connectors[0]! diff --git a/packages/vue/src/composables/useSwitchAccount.ts b/packages/vue/src/composables/useSwitchAccount.ts index 0c8f76a486..2fa9676939 100644 --- a/packages/vue/src/composables/useSwitchAccount.ts +++ b/packages/vue/src/composables/useSwitchAccount.ts @@ -13,7 +13,7 @@ import { type SwitchAccountVariables, switchAccountMutationOptions, } from '@wagmi/core/query' -import { type Ref, computed } from 'vue' +import { computed, type Ref } from 'vue' import type { ConfigParameter } from '../types/properties.js' import type { diff --git a/packages/vue/src/composables/useSwitchChain.test-d.ts b/packages/vue/src/composables/useSwitchChain.test-d.ts index e770460946..94af412ee9 100644 --- a/packages/vue/src/composables/useSwitchChain.test-d.ts +++ b/packages/vue/src/composables/useSwitchChain.test-d.ts @@ -2,9 +2,8 @@ import type { Connector, SwitchChainErrorType } from '@wagmi/core' import type { Chain } from '@wagmi/core/chains' import type { Compute, ExactPartial } from '@wagmi/core/internal' import { chain } from '@wagmi/test' -import { expectTypeOf, test } from 'vitest' - import type { AddEthereumChainParameter } from 'viem' +import { expectTypeOf, test } from 'vitest' import { useSwitchChain } from './useSwitchChain.js' const chainId = chain.mainnet.id diff --git a/packages/vue/src/composables/useTransactionReceipt.ts b/packages/vue/src/composables/useTransactionReceipt.ts index cba5c232ae..fc2423f64d 100644 --- a/packages/vue/src/composables/useTransactionReceipt.ts +++ b/packages/vue/src/composables/useTransactionReceipt.ts @@ -4,13 +4,13 @@ import type { ResolvedRegister, } from '@wagmi/core' import type { Compute } from '@wagmi/core/internal' +import type { GetTransactionReceiptQueryFnData } from '@wagmi/core/query' import { type GetTransactionReceiptData, type GetTransactionReceiptOptions, type GetTransactionReceiptQueryKey, getTransactionReceiptQueryOptions, } from '@wagmi/core/query' -import type { GetTransactionReceiptQueryFnData } from '@wagmi/core/query' import { computed } from 'vue' import type { ConfigParameter, QueryParameter } from '../types/properties.js' diff --git a/packages/vue/src/composables/useWatchContractEvent.test-d.ts b/packages/vue/src/composables/useWatchContractEvent.test-d.ts index 87ca9c72f0..8d735fe8f3 100644 --- a/packages/vue/src/composables/useWatchContractEvent.test-d.ts +++ b/packages/vue/src/composables/useWatchContractEvent.test-d.ts @@ -1,4 +1,4 @@ -import { http, createConfig, webSocket } from '@wagmi/core' +import { createConfig, http, webSocket } from '@wagmi/core' import { mainnet, optimism } from '@wagmi/core/chains' import { abi } from '@wagmi/test' import { expectTypeOf, test } from 'vitest' diff --git a/packages/vue/src/composables/useWatchContractEvent.test.ts b/packages/vue/src/composables/useWatchContractEvent.test.ts index 968c46d0cd..5cca8b5293 100644 --- a/packages/vue/src/composables/useWatchContractEvent.test.ts +++ b/packages/vue/src/composables/useWatchContractEvent.test.ts @@ -9,7 +9,7 @@ import { wait, } from '@wagmi/test' import { renderComposable } from '@wagmi/test/vue' -import { http, createWalletClient, parseEther } from 'viem' +import { createWalletClient, http, parseEther } from 'viem' import type { WatchEventOnLogsParameter } from 'viem/actions' import { expect, test } from 'vitest' diff --git a/packages/vue/src/exports/actions.test.ts b/packages/vue/src/exports/actions.test.ts index eaaedba14f..69183c0724 100644 --- a/packages/vue/src/exports/actions.test.ts +++ b/packages/vue/src/exports/actions.test.ts @@ -9,8 +9,8 @@ test('exports', () => { "connect", "deployContract", "disconnect", - "estimateGas", "estimateFeesPerGas", + "estimateGas", "estimateMaxPriorityFeePerGas", "getAccount", "getBalance", @@ -26,8 +26,8 @@ test('exports', () => { "getChains", "getClient", "getConnections", - "getConnectors", "getConnectorClient", + "getConnectors", "getEnsAddress", "fetchEnsAddress", "getEnsAvatar", @@ -67,10 +67,12 @@ test('exports', () => { "verifyMessage", "verifyTypedData", "waitForCallsStatus", + "waitForTransactionReceipt", + "waitForTransaction", "watchAccount", "watchAsset", - "watchBlocks", "watchBlockNumber", + "watchBlocks", "watchChainId", "watchClient", "watchConnections", @@ -78,8 +80,6 @@ test('exports', () => { "watchContractEvent", "watchPendingTransactions", "watchPublicClient", - "waitForTransactionReceipt", - "waitForTransaction", "writeContract", ] `) diff --git a/packages/vue/src/exports/actions/experimental.test.ts b/packages/vue/src/exports/actions/experimental.test.ts index 7c4b92df8c..c163fc0c63 100644 --- a/packages/vue/src/exports/actions/experimental.test.ts +++ b/packages/vue/src/exports/actions/experimental.test.ts @@ -11,15 +11,15 @@ test('exports', () => { "showCallsStatus", "waitForCallsStatus", "writeContracts", - "getCallsStatusQueryOptions", + "writeContractsMutationOptions", "getCallsStatusQueryKey", - "getCapabilitiesQueryOptions", + "getCallsStatusQueryOptions", "getCapabilitiesQueryKey", + "getCapabilitiesQueryOptions", "sendCallsMutationOptions", "showCallsStatusMutationOptions", "waitForCallsStatusQueryKey", "waitForCallsStatusQueryOptions", - "writeContractsMutationOptions", ] `) }) diff --git a/packages/vue/src/exports/connectors.test.ts b/packages/vue/src/exports/connectors.test.ts index 6d03486b18..c29d22430b 100644 --- a/packages/vue/src/exports/connectors.test.ts +++ b/packages/vue/src/exports/connectors.test.ts @@ -11,8 +11,8 @@ test('exports', () => { "coinbaseWallet", "metaMask", "safe", - "walletConnect", "version", + "walletConnect", ] `) }) diff --git a/packages/vue/src/exports/index.test.ts b/packages/vue/src/exports/index.test.ts index bb8fb0a1bd..7cafb21226 100644 --- a/packages/vue/src/exports/index.test.ts +++ b/packages/vue/src/exports/index.test.ts @@ -8,20 +8,20 @@ test('exports', () => { "configKey", "WagmiPlugin", "BaseError", - "WagmiPluginNotFoundError", "WagmiInjectionContextError", + "WagmiPluginNotFoundError", "useAccount", "useAccountEffect", "useBalance", "useBlockNumber", "useBytecode", "useChainId", - "useClient", - "useConnectorClient", "useChains", + "useClient", "useConfig", "useConnect", "useConnections", + "useConnectorClient", "useConnectors", "useDisconnect", "useEnsAddress", @@ -38,36 +38,36 @@ test('exports', () => { "useSwitchChain", "useTransaction", "useTransactionReceipt", + "useWaitForTransactionReceipt", "useWatchBlockNumber", "useWatchContractEvent", - "useWaitForTransactionReceipt", "useWriteContract", - "createConfig", - "createConnector", - "injected", - "mock", "ChainNotConfiguredError", - "ConnectorAlreadyConnectedError", - "ConnectorNotFoundError", "ConnectorAccountNotFoundError", + "ConnectorAlreadyConnectedError", "ConnectorChainMismatchError", + "ConnectorNotFoundError", "ConnectorUnavailableReconnectingError", - "ProviderNotFoundError", - "SwitchChainNotSupportedError", - "createStorage", - "noopStorage", - "custom", - "fallback", - "http", - "webSocket", - "unstable_connector", "cookieStorage", "cookieToInitialState", + "createConfig", + "createConnector", + "createStorage", + "custom", "deepEqual", "deserialize", + "fallback", + "http", + "injected", + "mock", + "noopStorage", "normalizeChainId", + "ProviderNotFoundError", "parseCookie", + "SwitchChainNotSupportedError", "serialize", + "unstable_connector", + "webSocket", "version", ] `) diff --git a/packages/vue/src/exports/index.ts b/packages/vue/src/exports/index.ts index e7267878cf..80a07caf93 100644 --- a/packages/vue/src/exports/index.ts +++ b/packages/vue/src/exports/index.ts @@ -3,19 +3,19 @@ //////////////////////////////////////////////////////////////////////////////// // biome-ignore lint/performance/noBarrelFile: entrypoint module -export { configKey, type WagmiPluginOptions, WagmiPlugin } from '../plugin.js' +export { configKey, WagmiPlugin, type WagmiPluginOptions } from '../plugin.js' //////////////////////////////////////////////////////////////////////////////// // Errors //////////////////////////////////////////////////////////////////////////////// -export { type BaseErrorType, BaseError } from '../errors/base.js' +export { BaseError, type BaseErrorType } from '../errors/base.js' export { - type WagmiPluginNotFoundErrorType, - WagmiPluginNotFoundError, - type WagmiInjectionContextErrorType, WagmiInjectionContextError, + type WagmiInjectionContextErrorType, + WagmiPluginNotFoundError, + type WagmiPluginNotFoundErrorType, } from '../errors/plugin.js' //////////////////////////////////////////////////////////////////////////////// @@ -56,42 +56,36 @@ export { type UseChainIdReturnType, useChainId, } from '../composables/useChainId.js' - -export { - type UseClientParameters, - type UseClientReturnType, - useClient, -} from '../composables/useClient.js' - -export { - type UseConnectorClientParameters, - type UseConnectorClientReturnType, - useConnectorClient, -} from '../composables/useConnectorClient.js' - export { type UseChainsParameters, type UseChainsReturnType, useChains, } from '../composables/useChains.js' - +export { + type UseClientParameters, + type UseClientReturnType, + useClient, +} from '../composables/useClient.js' export { type UseConfigParameters, type UseConfigReturnType, useConfig, } from '../composables/useConfig.js' - export { type UseConnectParameters, type UseConnectReturnType, useConnect, } from '../composables/useConnect.js' - export { type UseConnectionsParameters, type UseConnectionsReturnType, useConnections, } from '../composables/useConnections.js' +export { + type UseConnectorClientParameters, + type UseConnectorClientReturnType, + useConnectorClient, +} from '../composables/useConnectorClient.js' export { type UseConnectorsParameters, @@ -188,25 +182,22 @@ export { type UseTransactionReceiptReturnType, useTransactionReceipt, } from '../composables/useTransactionReceipt.js' - +export { + type UseWaitForTransactionReceiptParameters, + type UseWaitForTransactionReceiptReturnType, + useWaitForTransactionReceipt, +} from '../composables/useWaitForTransactionReceipt.js' export { type UseWatchBlockNumberParameters, type UseWatchBlockNumberReturnType, useWatchBlockNumber, } from '../composables/useWatchBlockNumber.js' - export { type UseWatchContractEventParameters, type UseWatchContractEventReturnType, useWatchContractEvent, } from '../composables/useWatchContractEvent.js' -export { - type UseWaitForTransactionReceiptParameters, - type UseWaitForTransactionReceiptReturnType, - useWaitForTransactionReceipt, -} from '../composables/useWaitForTransactionReceipt.js' - export { type UseWriteContractParameters, type UseWriteContractReturnType, @@ -218,59 +209,59 @@ export { //////////////////////////////////////////////////////////////////////////////// export { + ChainNotConfiguredError, + // Errors + type ChainNotConfiguredErrorType, + type Config, // Config type Connection, type Connector, - type Config, - type CreateConfigParameters, - type PartializedState, - type State, - createConfig, + ConnectorAccountNotFoundError, + type ConnectorAccountNotFoundErrorType, + ConnectorAlreadyConnectedError, + type ConnectorAlreadyConnectedErrorType, + ConnectorChainMismatchError, + type ConnectorChainMismatchErrorType, // Connector type ConnectorEventMap, - type CreateConnectorFn, - createConnector, - injected, - mock, - // Errors - type ChainNotConfiguredErrorType, - ChainNotConfiguredError, - type ConnectorAlreadyConnectedErrorType, - ConnectorAlreadyConnectedError, - type ConnectorNotFoundErrorType, ConnectorNotFoundError, - type ConnectorAccountNotFoundErrorType, - ConnectorAccountNotFoundError, - type ConnectorChainMismatchErrorType, - ConnectorChainMismatchError, - type ConnectorUnavailableReconnectingErrorType, + type ConnectorNotFoundErrorType, ConnectorUnavailableReconnectingError, - type ProviderNotFoundErrorType, - ProviderNotFoundError, - type SwitchChainNotSupportedErrorType, - SwitchChainNotSupportedError, + type ConnectorUnavailableReconnectingErrorType, + type CreateConfigParameters, + type CreateConnectorFn, // Storage type CreateStorageParameters, - type Storage, + // Utilities + cookieStorage, + cookieToInitialState, + createConfig, + createConnector, createStorage, - noopStorage, // Transports custom, + deepEqual, + deserialize, fallback, http, - webSocket, - unstable_connector, + injected, + mock, + noopStorage, + normalizeChainId, + type PartializedState, + ProviderNotFoundError, + type ProviderNotFoundErrorType, + parseCookie, // Types type Register, type ResolvedRegister, - // Utilities - cookieStorage, - cookieToInitialState, - deepEqual, - deserialize, - normalizeChainId, - parseCookie, + type State, + type Storage, + SwitchChainNotSupportedError, + type SwitchChainNotSupportedErrorType, serialize, + unstable_connector, + webSocket, } from '@wagmi/core' //////////////////////////////////////////////////////////////////////////////// diff --git a/packages/vue/src/exports/query.test.ts b/packages/vue/src/exports/query.test.ts index 758d45c907..7e52461ae6 100644 --- a/packages/vue/src/exports/query.test.ts +++ b/packages/vue/src/exports/query.test.ts @@ -72,14 +72,16 @@ test('exports', () => { "readContractsQueryOptions", "reconnectMutationOptions", "sendCallsMutationOptions", - "showCallsStatusMutationOptions", "sendTransactionMutationOptions", + "showCallsStatusMutationOptions", "signMessageMutationOptions", "signTypedDataMutationOptions", - "switchAccountMutationOptions", "simulateContractQueryKey", "simulateContractQueryOptions", + "switchAccountMutationOptions", "switchChainMutationOptions", + "hashFn", + "structuralSharing", "verifyMessageQueryKey", "verifyMessageQueryOptions", "verifyTypedDataQueryKey", @@ -90,8 +92,6 @@ test('exports', () => { "waitForTransactionReceiptQueryOptions", "watchAssetMutationOptions", "writeContractMutationOptions", - "hashFn", - "structuralSharing", "useMutation", "useQuery", ] diff --git a/packages/vue/src/exports/query.ts b/packages/vue/src/exports/query.ts index cd9169c0e7..c77dbd6bbb 100644 --- a/packages/vue/src/exports/query.ts +++ b/packages/vue/src/exports/query.ts @@ -5,15 +5,11 @@ // biome-ignore lint/performance/noBarrelFile: entrypoint module // biome-ignore lint/performance/noReExportAll: entrypoint module export * from '@wagmi/core/query' - export { type UseMutationParameters, type UseMutationReturnType, - useMutation, -} from '../utils/query.js' - -export { type UseQueryParameters, type UseQueryReturnType, + useMutation, useQuery, } from '../utils/query.js' diff --git a/packages/vue/src/nuxt/module.ts b/packages/vue/src/nuxt/module.ts index 452dcefac4..f774702088 100644 --- a/packages/vue/src/nuxt/module.ts +++ b/packages/vue/src/nuxt/module.ts @@ -1,7 +1,7 @@ import type { NuxtModule } from '@nuxt/schema' import { addImports, createResolver, defineNuxtModule } from 'nuxt/kit' -// biome-ignore lint/complexity/noBannedTypes: +// biome-ignore lint/complexity/noBannedTypes: allowed export type WagmiModuleOptions = {} export const wagmiModule: NuxtModule = diff --git a/packages/vue/src/plugin.ts b/packages/vue/src/plugin.ts index ae0d7f919a..db19f633d9 100644 --- a/packages/vue/src/plugin.ts +++ b/packages/vue/src/plugin.ts @@ -1,4 +1,4 @@ -import { type ResolvedRegister, type State, hydrate } from '@wagmi/core' +import { hydrate, type ResolvedRegister, type State } from '@wagmi/core' import type { Plugin } from 'vue' export const configKey = Symbol() diff --git a/packages/vue/src/types/ref.ts b/packages/vue/src/types/ref.ts index d9cd8120ec..55b704487b 100644 --- a/packages/vue/src/types/ref.ts +++ b/packages/vue/src/types/ref.ts @@ -17,7 +17,7 @@ type UnwrapLeaf = | WeakSet export type DeepMaybeRef = MaybeRef< - // biome-ignore lint/complexity/noBannedTypes: + // biome-ignore lint/complexity/noBannedTypes: allowed value extends Function | Config | Connector ? value : value extends object | any[] @@ -31,7 +31,7 @@ export type DeepUnwrapRef = T extends UnwrapLeaf ? T : T extends Ref ? DeepUnwrapRef - : // biome-ignore lint/complexity/noBannedTypes: + : // biome-ignore lint/complexity/noBannedTypes: allowed T extends {} ? { [Property in keyof T]: DeepUnwrapRef diff --git a/packages/vue/src/utils/cloneDeep.ts b/packages/vue/src/utils/cloneDeep.ts index 0bbf48deb8..9b70e97b32 100644 --- a/packages/vue/src/utils/cloneDeep.ts +++ b/packages/vue/src/utils/cloneDeep.ts @@ -36,7 +36,7 @@ export function deepUnref(value: value): DeepUnwrapRef { }) } -// biome-ignore lint/complexity/noBannedTypes: +// biome-ignore lint/complexity/noBannedTypes: allowed function isPlainObject(value: unknown): value is Object { if (Object.prototype.toString.call(value) !== '[object Object]') return false const prototype = Object.getPrototypeOf(value) diff --git a/packages/vue/src/utils/query.ts b/packages/vue/src/utils/query.ts index 0ea82af9b7..0ac029cc02 100644 --- a/packages/vue/src/utils/query.ts +++ b/packages/vue/src/utils/query.ts @@ -2,10 +2,10 @@ import { type DefaultError, type MutationObserverOptions, type QueryKey, - type UseQueryOptions, type UseMutationReturnType as tanstack_UseMutationReturnType, type UseQueryReturnType as tanstack_UseQueryReturnType, useQuery as tanstack_useQuery, + type UseQueryOptions, useMutation, } from '@tanstack/vue-query' import type { @@ -15,7 +15,7 @@ import type { UnionStrictOmit, } from '@wagmi/core/internal' import { hashFn } from '@wagmi/core/query' -import { type MaybeRef, computed, unref } from 'vue' +import { computed, type MaybeRef, unref } from 'vue' import type { DeepMaybeRef, DeepUnwrapRef } from '../types/ref.js' diff --git a/patches/prool.patch b/patches/prool.patch new file mode 100644 index 0000000000..c3880e6210 --- /dev/null +++ b/patches/prool.patch @@ -0,0 +1,12 @@ +diff --git a/_lib/server.js b/_lib/server.js +index 16fc552b33e575f40bfee99a38e44acc29587271..b249504c631d28279786392bd6c00d189e1e178f 100644 +--- a/_lib/server.js ++++ b/_lib/server.js +@@ -42,6 +42,7 @@ export function createServer(parameters) { + return; + } + const { id, path } = extractPath(url); ++ response.setHeader("Access-Control-Allow-Origin", "*"); + if (typeof id === 'number') { + if (path === '/') { + const { host, port } = pool.get(id) || (await pool.start(id)); diff --git a/playgrounds/next/src/app/page.tsx b/playgrounds/next/src/app/page.tsx index 33c1bf0abb..4babd42509 100644 --- a/playgrounds/next/src/app/page.tsx +++ b/playgrounds/next/src/app/page.tsx @@ -1,7 +1,7 @@ 'use client' import type { FormEvent } from 'react' -import { type Hex, formatEther, parseAbi, parseEther } from 'viem' +import { formatEther, type Hex, parseAbi, parseEther } from 'viem' import { type BaseError, useAccount, @@ -390,7 +390,6 @@ function Repro() { const config = useConfig() const chainId = useChainId() - // biome-ignore lint/suspicious/noConsoleLog: console.log('chainId from useChainId is', chainId) return (
diff --git a/playgrounds/next/src/wagmi.ts b/playgrounds/next/src/wagmi.ts index 0c9db90a5d..56220515e9 100644 --- a/playgrounds/next/src/wagmi.ts +++ b/playgrounds/next/src/wagmi.ts @@ -1,4 +1,4 @@ -import { http, cookieStorage, createConfig, createStorage } from 'wagmi' +import { cookieStorage, createConfig, createStorage, http } from 'wagmi' import { mainnet, optimism, sepolia } from 'wagmi/chains' import { injected, metaMask, walletConnect } from 'wagmi/connectors' diff --git a/playgrounds/nuxt/wagmi.ts b/playgrounds/nuxt/wagmi.ts index 83e8569ea8..cd18ed80da 100644 --- a/playgrounds/nuxt/wagmi.ts +++ b/playgrounds/nuxt/wagmi.ts @@ -1,4 +1,4 @@ -import { http, cookieStorage, createConfig, createStorage } from '@wagmi/vue' +import { cookieStorage, createConfig, createStorage, http } from '@wagmi/vue' import { mainnet, optimism, sepolia } from '@wagmi/vue/chains' import { injected, metaMask, walletConnect } from '@wagmi/vue/connectors' diff --git a/playgrounds/vite-core/package.json b/playgrounds/vite-core/package.json index ac3e24e35d..a4813be8a4 100644 --- a/playgrounds/vite-core/package.json +++ b/playgrounds/vite-core/package.json @@ -17,7 +17,7 @@ "devDependencies": { "@types/react": ">=18.3.1", "@types/react-dom": ">=18.3.0", - "@vitejs/plugin-react": "^4.2.1", + "@vitejs/plugin-react": "catalog:", "buffer": "^6.0.3", "vite": "^5.2.11" } diff --git a/playgrounds/vite-core/src/App.tsx b/playgrounds/vite-core/src/App.tsx index 3c8646be39..dc2cecd739 100644 --- a/playgrounds/vite-core/src/App.tsx +++ b/playgrounds/vite-core/src/App.tsx @@ -1,8 +1,8 @@ import { - type GetBalanceReturnType, - type GetBlockNumberReturnType, connect, disconnect, + type GetBalanceReturnType, + type GetBlockNumberReturnType, getAccount, getBalance, getBlockNumber, @@ -146,6 +146,7 @@ function Balance() { }) setBalance(balance) } catch (error) { + // biome-ignore lint/suspicious/noConsole: logging console.error('Error fetching balance', error) } }, diff --git a/playgrounds/vite-core/src/wagmi.ts b/playgrounds/vite-core/src/wagmi.ts index 78ce580418..5c96f76356 100644 --- a/playgrounds/vite-core/src/wagmi.ts +++ b/playgrounds/vite-core/src/wagmi.ts @@ -1,5 +1,5 @@ import { baseAccount, metaMask, walletConnect } from '@wagmi/connectors' -import { http, createConfig, createStorage } from '@wagmi/core' +import { createConfig, createStorage, http } from '@wagmi/core' import { mainnet, optimism, sepolia } from '@wagmi/core/chains' export const config = createConfig({ diff --git a/playgrounds/vite-react/package.json b/playgrounds/vite-react/package.json index 918ad0cf85..b06f3bdada 100644 --- a/playgrounds/vite-react/package.json +++ b/playgrounds/vite-react/package.json @@ -21,7 +21,7 @@ "@tanstack/react-query-devtools": "5.0.5", "@types/react": ">=18.3.1", "@types/react-dom": ">=18.3.0", - "@vitejs/plugin-react": "^4.2.1", + "@vitejs/plugin-react": "catalog:", "@wagmi/cli": "workspace:*", "buffer": "^6.0.3", "vite": "^5.2.11" diff --git a/playgrounds/vite-react/src/App.tsx b/playgrounds/vite-react/src/App.tsx index ad2e36b06f..3d435d1a54 100644 --- a/playgrounds/vite-react/src/App.tsx +++ b/playgrounds/vite-react/src/App.tsx @@ -1,5 +1,5 @@ import type { FormEvent } from 'react' -import { type Hex, formatEther, parseAbi, parseEther } from 'viem' +import { formatEther, type Hex, parseAbi, parseEther } from 'viem' import { type BaseError, useAccount, diff --git a/playgrounds/vite-react/src/main.tsx b/playgrounds/vite-react/src/main.tsx index ad801a958d..855135315a 100644 --- a/playgrounds/vite-react/src/main.tsx +++ b/playgrounds/vite-react/src/main.tsx @@ -1,11 +1,11 @@ -import { Buffer } from 'buffer' import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister' import { QueryClient } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client' +import { Buffer } from 'buffer' import React from 'react' import ReactDOM from 'react-dom/client' -import { WagmiProvider, deserialize, serialize } from 'wagmi' +import { deserialize, serialize, WagmiProvider } from 'wagmi' import './index.css' diff --git a/playgrounds/vite-react/src/wagmi.ts b/playgrounds/vite-react/src/wagmi.ts index 556e19e830..6b0430fade 100644 --- a/playgrounds/vite-react/src/wagmi.ts +++ b/playgrounds/vite-react/src/wagmi.ts @@ -1,9 +1,9 @@ import { del, get, set } from 'idb-keyval' -import { http, createConfig } from 'wagmi' +import { createConfig, http } from 'wagmi' import { celo, mainnet, optimism, sepolia } from 'wagmi/chains' import { baseAccount, metaMask, walletConnect } from 'wagmi/connectors' -// biome-ignore lint/correctness/noUnusedVariables: +// biome-ignore lint/correctness/noUnusedVariables: allowed const indexedDBStorage = { async getItem(name: string) { return get(name) diff --git a/playgrounds/vite-vue/src/main.ts b/playgrounds/vite-vue/src/main.ts index 820eed3722..ae37ed2a08 100644 --- a/playgrounds/vite-vue/src/main.ts +++ b/playgrounds/vite-vue/src/main.ts @@ -1,6 +1,6 @@ -import { Buffer } from 'buffer' import { VueQueryPlugin } from '@tanstack/vue-query' import { WagmiPlugin } from '@wagmi/vue' +import { Buffer } from 'buffer' import { createApp } from 'vue' // `@coinbase-wallet/sdk` uses `Buffer` diff --git a/playgrounds/vite-vue/src/wagmi.ts b/playgrounds/vite-vue/src/wagmi.ts index 6d4c54c12e..5391b2f6a5 100644 --- a/playgrounds/vite-vue/src/wagmi.ts +++ b/playgrounds/vite-vue/src/wagmi.ts @@ -1,4 +1,4 @@ -import { http, createConfig, createStorage } from '@wagmi/vue' +import { createConfig, createStorage, http } from '@wagmi/vue' import { mainnet, optimism, sepolia } from '@wagmi/vue/chains' import { baseAccount, metaMask, walletConnect } from '@wagmi/vue/connectors' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 97d882ae5a..7aa9a6dc6f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,18 +15,15 @@ catalogs: '@tanstack/vue-query': specifier: 5.49.1 version: 5.49.1 - '@testing-library/dom': - specifier: 10.4.0 - version: 10.4.0 - '@testing-library/react': - specifier: 16.0.1 - version: 16.0.1 '@types/react': specifier: 18.3.1 version: 18.3.1 '@types/react-dom': specifier: 18.3.0 version: 18.3.0 + '@vitejs/plugin-react': + specifier: ^4.3.3 + version: 4.7.0 react: specifier: 18.3.1 version: 18.3.1 @@ -37,6 +34,11 @@ catalogs: specifier: 3.4.27 version: 3.4.27 +patchedDependencies: + prool: + hash: lvy5e23lv2bpph2vcwhe44cj4e + path: patches/prool.patch + importers: .: @@ -45,8 +47,8 @@ importers: specifier: ^0.16.4 version: 0.16.4 '@biomejs/biome': - specifier: ^1.9.4 - version: 1.9.4 + specifier: ^2.0.6 + version: 2.0.6 '@changesets/changelog-github': specifier: 0.4.6 version: 0.4.6(encoding@0.1.13) @@ -56,9 +58,15 @@ importers: '@types/bun': specifier: ^1.1.10 version: 1.1.10 + '@vitejs/plugin-react': + specifier: 'catalog:' + version: 4.7.0(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)) + '@vitest/browser': + specifier: ^3.2.4 + version: 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.8.3))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vitest@3.2.4) '@vitest/coverage-v8': - specifier: ^2.1.1 - version: 2.1.1(vitest@2.1.1(@types/node@20.12.10)(happy-dom@15.7.4)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0)) + specifier: ^3.2.4 + version: 3.2.4(@vitest/browser@3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.8.3))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vitest@3.2.4))(vitest@3.2.4(@types/node@20.12.10)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0)) '@wagmi/test': specifier: workspace:* version: link:packages/test @@ -66,17 +74,26 @@ importers: specifier: ^1.1.29 version: 1.1.29 happy-dom: - specifier: ^15.7.4 - version: 15.7.4 + specifier: ^18.0.1 + version: 18.0.1 knip: specifier: ^5.30.6 version: 5.30.6(@types/node@20.12.10)(typescript@5.8.3) + playwright: + specifier: 1.54.1 + version: 1.54.1 prool: - specifier: ^0.0.23 - version: 0.0.23 + specifier: ^0.0.24 + version: 0.0.24(patch_hash=lvy5e23lv2bpph2vcwhe44cj4e) publint: specifier: ^0.2.11 version: 0.2.11 + react: + specifier: 'catalog:' + version: 18.3.1 + react-dom: + specifier: 'catalog:' + version: 18.3.1(react@18.3.1) sherif: specifier: ^1.0.0 version: 1.0.0 @@ -90,8 +107,11 @@ importers: specifier: 2.31.7 version: 2.31.7(bufferutil@4.0.8)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.22.4) vitest: - specifier: ^2.1.1 - version: 2.1.1(@types/node@20.12.10)(happy-dom@15.7.4)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0) + specifier: ^3.2.4 + version: 3.2.4(@types/node@20.12.10)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0) + vitest-browser-react: + specifier: ^2.0.0-beta.1 + version: 2.0.0-beta.1(@types/react-dom@18.3.0)(@types/react@18.3.1)(@vitest/browser@3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.8.3))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vitest@3.2.4))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vitest@3.2.4(@types/node@20.12.10)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0)) packages/cli: dependencies: @@ -256,12 +276,6 @@ importers: '@tanstack/react-query': specifier: 'catalog:' version: 5.49.2(react@18.3.1) - '@testing-library/dom': - specifier: 'catalog:' - version: 10.4.0 - '@testing-library/react': - specifier: 'catalog:' - version: 16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/react': specifier: 'catalog:' version: 18.3.1 @@ -314,12 +328,6 @@ importers: '@tanstack/vue-query': specifier: 'catalog:' version: 5.49.1(vue@3.4.27(typescript@5.8.3)) - '@testing-library/dom': - specifier: 'catalog:' - version: 10.4.0 - '@testing-library/react': - specifier: 'catalog:' - version: 16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/react': specifier: 'catalog:' version: 18.3.1 @@ -468,8 +476,8 @@ importers: specifier: '>=18.3.0' version: 18.3.0 '@vitejs/plugin-react': - specifier: ^4.2.1 - version: 4.2.1(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0)) + specifier: 'catalog:' + version: 4.7.0(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0)) buffer: specifier: ^6.0.3 version: 6.0.3 @@ -514,8 +522,8 @@ importers: specifier: '>=18.3.0' version: 18.3.0 '@vitejs/plugin-react': - specifier: ^4.2.1 - version: 4.2.1(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0)) + specifier: 'catalog:' + version: 4.7.0(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0)) '@wagmi/cli': specifier: workspace:* version: link:../../packages/cli @@ -691,10 +699,6 @@ packages: resolution: {integrity: sha512-ncDDY7CxZhMs6LIoPl+vHFQceIBhYPY5EfuGF1V7beO0U38xfsCYEyutEFB2kRzf4D9Gqppn3iWX71sNtrKcuw==} engines: {node: '>= 14.0.0'} - '@ampproject/remapping@2.2.1': - resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} - engines: {node: '>=6.0.0'} - '@ampproject/remapping@2.3.0': resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} @@ -724,24 +728,32 @@ packages: resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.24.4': - resolution: {integrity: sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==} + '@babel/code-frame@7.27.1': + resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.28.0': + resolution: {integrity: sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==} engines: {node: '>=6.9.0'} '@babel/core@7.24.5': resolution: {integrity: sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==} engines: {node: '>=6.9.0'} - '@babel/generator@7.24.5': - resolution: {integrity: sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==} + '@babel/core@7.28.0': + resolution: {integrity: sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.28.0': + resolution: {integrity: sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==} engines: {node: '>=6.9.0'} '@babel/helper-annotate-as-pure@7.22.5': resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.23.6': - resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} + '@babel/helper-compilation-targets@7.27.2': + resolution: {integrity: sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==} engines: {node: '>=6.9.0'} '@babel/helper-create-class-features-plugin@7.24.5': @@ -758,8 +770,8 @@ packages: resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} engines: {node: '>=6.9.0'} - '@babel/helper-hoist-variables@7.22.5': - resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} + '@babel/helper-globals@7.28.0': + resolution: {integrity: sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==} engines: {node: '>=6.9.0'} '@babel/helper-member-expression-to-functions@7.24.5': @@ -770,12 +782,12 @@ packages: resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.24.3': - resolution: {integrity: sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==} + '@babel/helper-module-imports@7.27.1': + resolution: {integrity: sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.24.5': - resolution: {integrity: sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==} + '@babel/helper-module-transforms@7.27.3': + resolution: {integrity: sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -784,8 +796,8 @@ packages: resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.24.5': - resolution: {integrity: sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==} + '@babel/helper-plugin-utils@7.27.1': + resolution: {integrity: sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==} engines: {node: '>=6.9.0'} '@babel/helper-replace-supers@7.24.1': @@ -806,41 +818,28 @@ packages: resolution: {integrity: sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.24.1': - resolution: {integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==} + '@babel/helper-string-parser@7.27.1': + resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.25.9': - resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + '@babel/helper-validator-identifier@7.27.1': + resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.5': - resolution: {integrity: sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==} + '@babel/helper-validator-option@7.27.1': + resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.25.9': - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-validator-option@7.23.5': - resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} - engines: {node: '>=6.9.0'} - - '@babel/helpers@7.24.5': - resolution: {integrity: sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==} + '@babel/helpers@7.27.6': + resolution: {integrity: sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==} engines: {node: '>=6.9.0'} '@babel/highlight@7.24.5': resolution: {integrity: sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.24.5': - resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==} - engines: {node: '>=6.0.0'} - hasBin: true - - '@babel/parser@7.26.2': - resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} + '@babel/parser@7.28.0': + resolution: {integrity: sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==} engines: {node: '>=6.0.0'} hasBin: true @@ -885,14 +884,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx-self@7.24.5': - resolution: {integrity: sha512-RtCJoUO2oYrYwFPtR1/jkoBEcFuI1ae9a9IMxeyAVa3a1Ap4AnxmyIKG2b2FaJKqkidw/0cxRbWN+HOs6ZWd1w==} + '@babel/plugin-transform-react-jsx-self@7.27.1': + resolution: {integrity: sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx-source@7.24.1': - resolution: {integrity: sha512-1v202n7aUq4uXAieRTKcwPzNyphlCuqHHDcdSNc+vdhoTEZcFMh+L5yZuCmGaIO7bs1nJUNfHB89TZyoL48xNA==} + '@babel/plugin-transform-react-jsx-source@7.27.1': + resolution: {integrity: sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -917,77 +916,78 @@ packages: resolution: {integrity: sha512-Sl8oN9bGfRlNUA2jzfzoHEZxFBDliBlwi5mPVCAWKSlBNkXXJOHpu7SDOqjF6mRoTa6GNX/1kAWG3Tr+YQ3N7A==} engines: {node: '>=6.9.0'} - '@babel/template@7.24.0': - resolution: {integrity: sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==} + '@babel/template@7.27.2': + resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.24.5': - resolution: {integrity: sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==} + '@babel/traverse@7.28.0': + resolution: {integrity: sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==} engines: {node: '>=6.9.0'} '@babel/types@7.24.5': resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==} engines: {node: '>=6.9.0'} - '@babel/types@7.26.0': - resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} + '@babel/types@7.28.1': + resolution: {integrity: sha512-x0LvFTekgSX+83TI28Y9wYPUfzrnl2aT5+5QLnO6v7mSJYtEEevuDRN0F0uSHRk1G1IWZC43o00Y0xDDrpBGPQ==} engines: {node: '>=6.9.0'} '@base-org/account@1.1.1': resolution: {integrity: sha512-IfVJPrDPhHfqXRDb89472hXkpvJuQQR7FDI9isLPHEqSYt/45whIoBxSPgZ0ssTt379VhQo4+87PWI1DoLSfAQ==} - '@bcoe/v8-coverage@0.2.3': - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + '@bcoe/v8-coverage@1.0.2': + resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} + engines: {node: '>=18'} - '@biomejs/biome@1.9.4': - resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + '@biomejs/biome@2.0.6': + resolution: {integrity: sha512-RRP+9cdh5qwe2t0gORwXaa27oTOiQRQvrFf49x2PA1tnpsyU7FIHX4ZOFMtBC4QNtyWsN7Dqkf5EDbg4X+9iqA==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@1.9.4': - resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + '@biomejs/cli-darwin-arm64@2.0.6': + resolution: {integrity: sha512-AzdiNNjNzsE6LfqWyBvcL29uWoIuZUkndu+wwlXW13EKcBHbbKjNQEZIJKYDc6IL+p7bmWGx3v9ZtcRyIoIz5A==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@1.9.4': - resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + '@biomejs/cli-darwin-x64@2.0.6': + resolution: {integrity: sha512-wJjjP4E7bO4WJmiQaLnsdXMa516dbtC6542qeRkyJg0MqMXP0fvs4gdsHhZ7p9XWTAmGIjZHFKXdsjBvKGIJJQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@1.9.4': - resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + '@biomejs/cli-linux-arm64-musl@2.0.6': + resolution: {integrity: sha512-CVPEMlin3bW49sBqLBg2x016Pws7eUXA27XYDFlEtponD0luYjg2zQaMJ2nOqlkKG9fqzzkamdYxHdMDc2gZFw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@1.9.4': - resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + '@biomejs/cli-linux-arm64@2.0.6': + resolution: {integrity: sha512-ZSVf6TYo5rNMUHIW1tww+rs/krol7U5A1Is/yzWyHVZguuB0lBnIodqyFuwCNqG9aJGyk7xIMS8HG0qGUPz0SA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@1.9.4': - resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + '@biomejs/cli-linux-x64-musl@2.0.6': + resolution: {integrity: sha512-mKHE/e954hR/hSnAcJSjkf4xGqZc/53Kh39HVW1EgO5iFi0JutTN07TSjEMg616julRtfSNJi0KNyxvc30Y4rQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@1.9.4': - resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + '@biomejs/cli-linux-x64@2.0.6': + resolution: {integrity: sha512-geM1MkHTV1Kh2Cs/Xzot9BOF3WBacihw6bkEmxkz4nSga8B9/hWy5BDiOG3gHDGIBa8WxT0nzsJs2f/hPqQIQw==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@1.9.4': - resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + '@biomejs/cli-win32-arm64@2.0.6': + resolution: {integrity: sha512-290V4oSFoKaprKE1zkYVsDfAdn0An5DowZ+GIABgjoq1ndhvNxkJcpxPsiYtT7slbVe3xmlT0ncdfOsN7KruzA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@1.9.4': - resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + '@biomejs/cli-win32-x64@2.0.6': + resolution: {integrity: sha512-bfM1Bce0d69Ao7pjTjUS+AWSZ02+5UHdiAP85Th8e9yV5xzw6JrHXbL5YWlcEKQ84FIZMdDc7ncuti1wd2sdbw==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -1661,44 +1661,28 @@ packages: resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} engines: {node: '>=8'} - '@jridgewell/gen-mapping@0.3.3': - resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} - engines: {node: '>=6.0.0'} - - '@jridgewell/gen-mapping@0.3.5': - resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} - engines: {node: '>=6.0.0'} + '@jridgewell/gen-mapping@0.3.12': + resolution: {integrity: sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==} '@jridgewell/resolve-uri@3.1.0': resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} - '@jridgewell/set-array@1.1.2': - resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} - engines: {node: '>=6.0.0'} - - '@jridgewell/set-array@1.2.1': - resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} - engines: {node: '>=6.0.0'} - '@jridgewell/source-map@0.3.6': resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} - '@jridgewell/sourcemap-codec@1.4.14': - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - '@jridgewell/trace-mapping@0.3.17': - resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==} - '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@jridgewell/trace-mapping@0.3.29': + resolution: {integrity: sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==} + '@kwsites/file-exists@1.1.1': resolution: {integrity: sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==} @@ -2374,6 +2358,7 @@ packages: '@paulmillr/qr@0.2.1': resolution: {integrity: sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ==} + deprecated: 'The package is now available as "qr": npm install qr' '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} @@ -2409,6 +2394,9 @@ packages: '@reown/appkit@1.7.8': resolution: {integrity: sha512-51kTleozhA618T1UvMghkhKfaPcc9JlKwLJ5uV+riHyvSoWPKPRIa5A6M1Wano5puNyW0s3fwywhyqTHSilkaA==} + '@rolldown/pluginutils@1.0.0-beta.27': + resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==} + '@rollup/plugin-alias@5.1.0': resolution: {integrity: sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==} engines: {node: '>=14.0.0'} @@ -2868,20 +2856,11 @@ packages: resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==} engines: {node: '>=18'} - '@testing-library/react@16.0.1': - resolution: {integrity: sha512-dSmwJVtJXmku+iocRhWOUFbrERC76TX2Mnf0ATODz8brzAZrMBbzLwQixlBSanZxR6LddK3eiwpSFZgDET1URg==} - engines: {node: '>=18'} + '@testing-library/user-event@14.6.1': + resolution: {integrity: sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==} + engines: {node: '>=12', npm: '>=6'} peerDependencies: - '@testing-library/dom': ^10.0.0 - '@types/react': ^18.0.0 - '@types/react-dom': ^18.0.0 - react: ^18.0.0 - react-dom: ^18.0.0 - peerDependenciesMeta: - '@types/react': - optional: true - '@types/react-dom': - optional: true + '@testing-library/dom': '>=7.21.4' '@trysound/sax@0.2.0': resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} @@ -2919,6 +2898,9 @@ packages: '@types/bun@1.1.10': resolution: {integrity: sha512-76KYVSwrHwr9zsnk6oLXOGs9KvyBg3U066GLO4rk6JZk1ypEPGCUDZ5yOiESyIHWs9cx9iC8r01utYN32XdmgA==} + '@types/chai@5.2.2': + resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} + '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} @@ -2931,6 +2913,9 @@ packages: '@types/dedent@0.7.2': resolution: {integrity: sha512-kRiitIeUg1mPV9yH4VUJ/1uk2XjyANfeL8/7rH1tsjvHeO9PJLBHJIYsFWmAvmGj5u8rj+1TZx7PZzW2qLw3Lw==} + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -3012,6 +2997,9 @@ packages: '@types/web-bluetooth@0.0.20': resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} + '@types/whatwg-mimetype@3.0.2': + resolution: {integrity: sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA==} + '@types/wrap-ansi@3.0.0': resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} @@ -3132,11 +3120,11 @@ packages: engines: {node: '>=16'} hasBin: true - '@vitejs/plugin-react@4.2.1': - resolution: {integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==} + '@vitejs/plugin-react@4.7.0': + resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - vite: ^4.2.0 || ^5.0.0 + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 '@vitejs/plugin-vue-jsx@3.1.0': resolution: {integrity: sha512-w9M6F3LSEU5kszVb9An2/MmXNxocAnUb3WhRr8bHlimhDrXNt6n6D2nJQR3UXpGlZHh/EsgouOHCsM8V3Ln+WA==} @@ -3159,43 +3147,58 @@ packages: vite: ^5.0.0 vue: ^3.2.25 - '@vitest/coverage-v8@2.1.1': - resolution: {integrity: sha512-md/A7A3c42oTT8JUHSqjP5uKTWJejzUW4jalpvs+rZ27gsURsMU8DEb+8Jf8C6Kj2gwfSHJqobDNBuoqlm0cFw==} + '@vitest/browser@3.2.4': + resolution: {integrity: sha512-tJxiPrWmzH8a+w9nLKlQMzAKX/7VjFs50MWgcAj7p9XQ7AQ9/35fByFYptgPELyLw+0aixTnC4pUWV+APcZ/kw==} peerDependencies: - '@vitest/browser': 2.1.1 - vitest: 2.1.1 + playwright: '*' + safaridriver: '*' + vitest: 3.2.4 + webdriverio: ^7.0.0 || ^8.0.0 || ^9.0.0 + peerDependenciesMeta: + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + + '@vitest/coverage-v8@3.2.4': + resolution: {integrity: sha512-EyF9SXU6kS5Ku/U82E259WSnvg6c8KTjppUncuNdm5QHpe17mwREHnjDzozC8x9MZ0xfBUFSaLkRv4TMA75ALQ==} + peerDependencies: + '@vitest/browser': 3.2.4 + vitest: 3.2.4 peerDependenciesMeta: '@vitest/browser': optional: true - '@vitest/expect@2.1.1': - resolution: {integrity: sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==} + '@vitest/expect@3.2.4': + resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==} - '@vitest/mocker@2.1.1': - resolution: {integrity: sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==} + '@vitest/mocker@3.2.4': + resolution: {integrity: sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==} peerDependencies: - msw: ^2.3.5 - vite: ^5.0.0 + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 peerDependenciesMeta: msw: optional: true vite: optional: true - '@vitest/pretty-format@2.1.1': - resolution: {integrity: sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==} + '@vitest/pretty-format@3.2.4': + resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==} - '@vitest/runner@2.1.1': - resolution: {integrity: sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==} + '@vitest/runner@3.2.4': + resolution: {integrity: sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==} - '@vitest/snapshot@2.1.1': - resolution: {integrity: sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==} + '@vitest/snapshot@3.2.4': + resolution: {integrity: sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==} - '@vitest/spy@2.1.1': - resolution: {integrity: sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==} + '@vitest/spy@3.2.4': + resolution: {integrity: sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==} - '@vitest/utils@2.1.1': - resolution: {integrity: sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==} + '@vitest/utils@3.2.4': + resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} '@volar/language-core@2.2.1': resolution: {integrity: sha512-iHJAZKcYldZgyS8gx6DfIZApViVBeqbf6iPhqoZpG5A6F4zsZiFldKfwaKaBA3/wnOTWE2i8VUbXywI1WywCPg==} @@ -3751,6 +3754,9 @@ packages: resolution: {integrity: sha512-kbL7ERlqjXubdDd+szuwdlQ1xUxEz9mCz1+m07ftNVStgwRb2RWw+U6oKo08PAvOishMxiqz1mlJyLl8yQx2Qg==} engines: {node: '>=16.14.0'} + ast-v8-to-istanbul@0.3.3: + resolution: {integrity: sha512-MuXMrSLVVoA6sYN/6Hke18vMzrT4TZNbZIj/hvh0fnYFpO+/kFXcLIaiPwXXWaQUPg4yJD8fj+lfJ7/1EBconw==} + ast-walker-scope@0.5.0: resolution: {integrity: sha512-NsyHMxBh4dmdEHjBo1/TBZvCKxffmZxRYhmclfu0PP6Aftre47jOHYaYaNqJcV0bxihxFXhDkzLHUwHc0ocd0Q==} engines: {node: '>=16.14.0'} @@ -3855,8 +3861,8 @@ packages: browserify-aes@1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} - browserslist@4.23.0: - resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} + browserslist@4.25.1: + resolution: {integrity: sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -3944,12 +3950,15 @@ packages: caniuse-lite@1.0.30001616: resolution: {integrity: sha512-RHVYKov7IcdNjVHJFNY/78RdG4oGVjbayxv8u5IO74Wv7Hlq4PnJE6mo/OjFijjVFNy5ijnCt6H3IIo4t+wfEw==} + caniuse-lite@1.0.30001727: + resolution: {integrity: sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==} + ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - chai@5.1.1: - resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} - engines: {node: '>=12'} + chai@5.2.1: + resolution: {integrity: sha512-5nFxhUrX0PqtyogoYOA8IPswy5sZFTOsBFl/9bNsmDLgsxYTzSZQJDPppDnZPTQbzSEm0hqGjWPzRemQCYbD6A==} + engines: {node: '>=18'} chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} @@ -4220,6 +4229,10 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + crossws@0.2.4: resolution: {integrity: sha512-DAxroI2uSOgUKLz00NX6A8U/8EE3SZHmIND+10jkVSaypvyt57J5JEOxAQOL6lQxyzi/wZbTIwssU1uy69h5Vg==} peerDependencies: @@ -4342,6 +4355,15 @@ packages: supports-color: optional: true + debug@4.4.1: + resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decamelize@1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} @@ -4518,8 +4540,8 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.4.757: - resolution: {integrity: sha512-jftDaCknYSSt/+KKeXzH3LX5E2CvRLm75P3Hj+J/dv3CL0qUYcOt13d5FN1NiL5IJbbhzHrb3BomeG2tkSlZmw==} + electron-to-chromium@1.5.189: + resolution: {integrity: sha512-y9D1ntS1ruO/pZ/V2FtLE+JXLQe28XoRpZ7QCCo0T8LdQladzdcOVQZH/IWLVJvCw12OGMb6hYOeOAjntCmJRQ==} elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} @@ -4589,6 +4611,9 @@ packages: error-stack-parser-es@0.1.1: resolution: {integrity: sha512-g/9rfnvnagiNf+DRMHEVGuGuIBlCIMDFoTA616HaP2l9PlCjGjVhD98PNbVSJvmK4TttqT5mV5tInMhoFgi+aA==} + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + es-toolkit@1.33.0: resolution: {integrity: sha512-X13Q/ZSc+vsO1q600bvNK4bxgXMkHcf//RxCmYDaRY5DAcT+eoXjY5hoAPGMdRnWQjvyLEcyauG3b6hz76LNqg==} @@ -4707,9 +4732,13 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - execa@9.1.0: - resolution: {integrity: sha512-lSgHc4Elo2m6bUDhc3Hl/VxvUDJdQWI40RZ4KMY9bKRc+hgMOT7II/JjbNDhI8VnMtrCb7U/fhpJIkLORZozWw==} - engines: {node: '>=18'} + execa@9.6.0: + resolution: {integrity: sha512-jpWzZ1ZhwUmeWRhS7Qv3mhpOhLfwI+uAX4e5fOcXqwMR7EcJ0pj2kV1CVzHVMX/LphnKWD3LObjZCoJ71lKpHw==} + engines: {node: ^18.19.0 || >=20.5.0} + + expect-type@1.2.2: + resolution: {integrity: sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==} + engines: {node: '>=12.0.0'} exponential-backoff@3.1.1: resolution: {integrity: sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==} @@ -4759,6 +4788,14 @@ packages: picomatch: optional: true + fdir@6.4.6: + resolution: {integrity: sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + fflate@0.8.2: resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} @@ -4869,6 +4906,11 @@ packages: fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -4890,9 +4932,6 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-func-name@2.0.2: - resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} - get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} @@ -4954,10 +4993,6 @@ packages: resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} engines: {node: '>=18'} - globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -4991,9 +5026,9 @@ packages: h3@1.11.1: resolution: {integrity: sha512-AbaH6IDnZN6nmbnJOH72y3c5Wwh9P97soSVdGSBbcDACRdkC0FEWf25pzx4f/NuOCK6quHmW18yF2Wx+G4Zi1A==} - happy-dom@15.7.4: - resolution: {integrity: sha512-r1vadDYGMtsHAAsqhDuk4IpPvr6N8MGKy5ntBo7tSdim+pWDxus2PNqOcOt8LuDZ4t3KJHE+gCuzupcx/GKnyQ==} - engines: {node: '>=18.0.0'} + happy-dom@18.0.1: + resolution: {integrity: sha512-qn+rKOW7KWpVTtgIUi6RVmTBZJSe2k0Db0vh1f7CWrWclkkc7/Q+FrOfkZIb2eiErLyqu5AXEzE7XthO9JVxRA==} + engines: {node: '>=20.0.0'} hardhat@2.22.3: resolution: {integrity: sha512-k8JV2ECWNchD6ahkg2BR5wKVxY0OiKot7fuxiIpRK0frRqyOljcR2vKwgWSLw6YIeDcNNA4xybj7Og7NSxr2hA==} @@ -5132,8 +5167,8 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} - human-signals@7.0.0: - resolution: {integrity: sha512-74kytxOUSvNbjrT9KisAbaTZ/eJwD/LrbM/kh5j0IhPuJzwuA19dWvniFGwBzN9rVjg+O/e+F310PjObDXS+9Q==} + human-signals@8.0.1: + resolution: {integrity: sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==} engines: {node: '>=18.18.0'} iconv-lite@0.4.24: @@ -5328,8 +5363,8 @@ packages: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} - is-unicode-supported@2.0.0: - resolution: {integrity: sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==} + is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} engines: {node: '>=18'} is-what@4.1.16: @@ -5423,8 +5458,8 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - js-tokens@9.0.0: - resolution: {integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==} + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} @@ -5437,9 +5472,9 @@ packages: jsbn@1.1.0: resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} - jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} hasBin: true json-parse-even-better-errors@3.0.2: @@ -5592,8 +5627,8 @@ packages: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true - loupe@3.1.1: - resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} + loupe@3.1.4: + resolution: {integrity: sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg==} lru-cache@10.2.2: resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==} @@ -5626,15 +5661,18 @@ packages: magic-string@0.30.10: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} - magic-string@0.30.11: - resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} - magic-string@0.30.12: resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + magicast@0.3.4: resolution: {integrity: sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==} + magicast@0.3.5: + resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==} + make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -5886,8 +5924,8 @@ packages: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} - minizlib@3.0.1: - resolution: {integrity: sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==} + minizlib@3.0.2: + resolution: {integrity: sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==} engines: {node: '>= 18'} mipd@0.0.7: @@ -6075,8 +6113,8 @@ packages: engines: {node: ^16.14.0 || >=18.0.0} hasBin: true - node-releases@2.0.14: - resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + node-releases@2.0.19: + resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} nopt@5.0.0: resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} @@ -6145,14 +6183,14 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} - npm-run-path@5.1.0: - resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - npm-run-path@5.3.0: resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + npm-run-path@6.0.0: + resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==} + engines: {node: '>=18'} + npmlog@5.0.1: resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} deprecated: This package is no longer supported. @@ -6407,8 +6445,11 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - pathval@2.0.0: - resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + pathval@2.0.1: + resolution: {integrity: sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==} engines: {node: '>= 14.16'} pbkdf2@3.1.2: @@ -6477,6 +6518,16 @@ packages: pkg-types@1.1.1: resolution: {integrity: sha512-ko14TjmDuQJ14zsotODv7dBlwxKhUKQEhuhmbqo1uCi9BB0Z2alo/wAXg6q1dTR5TyuqYyWhjtfe/Tsh+X28jQ==} + playwright-core@1.54.1: + resolution: {integrity: sha512-Nbjs2zjj0htNhzgiy5wu+3w09YetDx5pkrpI/kZotDlDUaYk0HVA5xrBVPdow4SAUIlhgKcJeJg4GRKW6xHusA==} + engines: {node: '>=18'} + hasBin: true + + playwright@1.54.1: + resolution: {integrity: sha512-peWpSwIBmSLi6aW2auvrUtf2DqY16YYcCMO8rTVx486jKmDTJg7UAhyrraP98GB8BoPURZP8+nxO7TSd4cPr5g==} + engines: {node: '>=18'} + hasBin: true + pngjs@5.0.0: resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} engines: {node: '>=10.13.0'} @@ -6697,6 +6748,10 @@ packages: resolution: {integrity: sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==} engines: {node: '>=18'} + pretty-ms@9.2.0: + resolution: {integrity: sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg==} + engines: {node: '>=18'} + proc-log@3.0.0: resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -6731,8 +6786,8 @@ packages: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} - prool@0.0.23: - resolution: {integrity: sha512-r1d0DIiVsp7aXqGiNGKmgrqJZa8GjMGEjsgjQO22DEClYYvK+HMPZTQ9diBqleGuwfiRk3lnsWRMbFTRmFbk9g==} + prool@0.0.24: + resolution: {integrity: sha512-L0EGUF5vK1XAQtceaiwfGxf0LGeJwurUizzc3i6JESsUyMROzGxTSMSBiajF8AoQaDYWIX2s1m00sC36CATrvQ==} engines: {node: '>=22'} peerDependencies: '@pimlico/alto': '*' @@ -6816,8 +6871,8 @@ packages: react-is@17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} - react-refresh@0.14.0: - resolution: {integrity: sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==} + react-refresh@0.17.0: + resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} engines: {node: '>=0.10.0'} react@18.3.1: @@ -6920,10 +6975,6 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@5.0.10: - resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} - hasBin: true - ripemd160@2.0.2: resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} @@ -7127,6 +7178,10 @@ packages: resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} + sirv@3.0.1: + resolution: {integrity: sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==} + engines: {node: '>=18'} + sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -7188,10 +7243,6 @@ packages: sonic-boom@3.8.0: resolution: {integrity: sha512-ybz6OYOUjoQQCQ/i4LU8kaToD8ACtYP+Cj5qd2AO36bwbdewxWJ3ArmJ2cr6AvxlL2o0PqnCcPGUgkILbfkaCA==} - source-map-js@1.2.0: - resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} - engines: {node: '>=0.10.0'} - source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -7267,6 +7318,9 @@ packages: std-env@3.7.0: resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + std-env@3.9.0: + resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} + stream-shift@1.0.1: resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} @@ -7343,6 +7397,9 @@ packages: strip-literal@2.1.0: resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==} + strip-literal@3.0.0: + resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} + styled-jsx@5.1.1: resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} engines: {node: '>= 12.0.0'} @@ -7464,19 +7521,23 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinyexec@0.3.0: - resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinyglobby@0.2.14: + resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} + engines: {node: '>=12.0.0'} - tinypool@1.0.1: - resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} + tinypool@1.1.1: + resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} engines: {node: ^18.0.0 || >=20.0.0} - tinyrainbow@1.2.0: - resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} + tinyrainbow@2.0.0: + resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} engines: {node: '>=14.0.0'} - tinyspy@3.0.2: - resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} + tinyspy@4.0.3: + resolution: {integrity: sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==} engines: {node: '>=14.0.0'} tmp@0.0.33: @@ -7616,6 +7677,10 @@ packages: resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} engines: {node: '>=18'} + unicorn-magic@0.3.0: + resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==} + engines: {node: '>=18'} + unimport@3.7.1: resolution: {integrity: sha512-V9HpXYfsZye5bPPYUgs0Otn3ODS1mDUciaBlXljI4C2fTwfFpvFZRywmlOu943puN9sncxROMZhsZCjNXEpzEQ==} @@ -7741,8 +7806,8 @@ packages: unwasm@0.3.9: resolution: {integrity: sha512-LDxTx/2DkFURUd+BU1vUsF/moj0JsoTvl+2tcg2AUOiEzVturhGGx17/IMgGvKUYdZwr33EJHtChCJuhu9Ouvg==} - update-browserslist-db@1.0.15: - resolution: {integrity: sha512-K9HWH62x3/EalU1U6sjSZiylm9C8tgq2mSvshZpqc7QE69RaA2qjhkW2HlNA0tFpEbtyFz7HTqbSdN4MSwUodA==} + update-browserslist-db@1.1.3: + resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -7851,9 +7916,9 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-node@2.1.1: - resolution: {integrity: sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==} - engines: {node: ^18.0.0 || >=20.0.0} + vite-node@3.2.4: + resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true vite-plugin-checker@0.6.4: @@ -7973,20 +8038,39 @@ packages: postcss: optional: true - vitest@2.1.1: - resolution: {integrity: sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==} - engines: {node: ^18.0.0 || >=20.0.0} + vitest-browser-react@2.0.0-beta.1: + resolution: {integrity: sha512-PoUVPWaH/JbfF+Ef31CyoqKzfByf065LSzBO6KAkr03wTGry8pZUtwsvsBk6TrAtupvBUx0EuPocceffFcsmiA==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + peerDependencies: + '@types/react': ^18.0.0 || ^19.0.0 + '@types/react-dom': ^18.0.0 || ^19.0.0 + '@vitest/browser': ^2.1.0 || ^3.0.0 || ^4.0.0-0 + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + vitest: ^2.1.0 || ^3.0.0 || ^4.0.0-0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + vitest@3.2.4: + resolution: {integrity: sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' - '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.1.1 - '@vitest/ui': 2.1.1 + '@types/debug': ^4.1.12 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@vitest/browser': 3.2.4 + '@vitest/ui': 3.2.4 happy-dom: '*' jsdom: '*' peerDependenciesMeta: '@edge-runtime/vm': optional: true + '@types/debug': + optional: true '@types/node': optional: true '@vitest/browser': @@ -8096,10 +8180,6 @@ packages: webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - webidl-conversions@7.0.0: - resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} - engines: {node: '>=12'} - webpack-bundle-analyzer@4.10.1: resolution: {integrity: sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==} engines: {node: '>= 10.13.0'} @@ -8324,8 +8404,8 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - yoctocolors@2.0.2: - resolution: {integrity: sha512-Ct97huExsu7cWeEjmrXlofevF8CvzUglJ4iGUet5B8xn1oumtAZBpHU4GzYuoE6PVqcZ5hghtBrSlhwHuR1Jmw==} + yoctocolors@2.1.1: + resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==} engines: {node: '>=18'} zhead@2.2.4: @@ -8501,15 +8581,10 @@ snapshots: dependencies: '@algolia/client-common': 5.12.0 - '@ampproject/remapping@2.2.1': - dependencies: - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.17 - '@ampproject/remapping@2.3.0': dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/gen-mapping': 0.3.12 + '@jridgewell/trace-mapping': 0.3.29 '@andrewbranch/untar.js@1.0.3': {} @@ -8547,56 +8622,83 @@ snapshots: '@babel/highlight': 7.24.5 picocolors: 1.1.1 - '@babel/compat-data@7.24.4': {} + '@babel/code-frame@7.27.1': + dependencies: + '@babel/helper-validator-identifier': 7.27.1 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.28.0': {} '@babel/core@7.24.5': dependencies: - '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.5 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-module-transforms': 7.24.5(@babel/core@7.24.5) - '@babel/helpers': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.27.1 + '@babel/generator': 7.28.0 + '@babel/helper-compilation-targets': 7.27.2 + '@babel/helper-module-transforms': 7.27.3(@babel/core@7.24.5) + '@babel/helpers': 7.27.6 + '@babel/parser': 7.28.0 + '@babel/template': 7.27.2 + '@babel/traverse': 7.28.0 + '@babel/types': 7.28.1 convert-source-map: 2.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.1 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/generator@7.24.5': + '@babel/core@7.28.0': dependencies: - '@babel/types': 7.24.5 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.27.1 + '@babel/generator': 7.28.0 + '@babel/helper-compilation-targets': 7.27.2 + '@babel/helper-module-transforms': 7.27.3(@babel/core@7.28.0) + '@babel/helpers': 7.27.6 + '@babel/parser': 7.28.0 + '@babel/template': 7.27.2 + '@babel/traverse': 7.28.0 + '@babel/types': 7.28.1 + convert-source-map: 2.0.0 + debug: 4.4.1 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.28.0': + dependencies: + '@babel/parser': 7.28.0 + '@babel/types': 7.28.1 + '@jridgewell/gen-mapping': 0.3.12 + '@jridgewell/trace-mapping': 0.3.29 + jsesc: 3.1.0 '@babel/helper-annotate-as-pure@7.22.5': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.28.1 - '@babel/helper-compilation-targets@7.23.6': + '@babel/helper-compilation-targets@7.27.2': dependencies: - '@babel/compat-data': 7.24.4 - '@babel/helper-validator-option': 7.23.5 - browserslist: 4.23.0 + '@babel/compat-data': 7.28.0 + '@babel/helper-validator-option': 7.27.1 + browserslist: 4.25.1 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.24.5(@babel/core@7.24.5)': + '@babel/helper-create-class-features-plugin@7.24.5(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 + '@babel/core': 7.28.0 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 '@babel/helper-member-expression-to-functions': 7.24.5 '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.5) + '@babel/helper-replace-supers': 7.24.1(@babel/core@7.28.0) '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/helper-split-export-declaration': 7.24.5 semver: 6.3.1 @@ -8605,157 +8707,160 @@ snapshots: '@babel/helper-function-name@7.23.0': dependencies: - '@babel/template': 7.24.0 - '@babel/types': 7.26.0 + '@babel/template': 7.27.2 + '@babel/types': 7.28.1 - '@babel/helper-hoist-variables@7.22.5': - dependencies: - '@babel/types': 7.26.0 + '@babel/helper-globals@7.28.0': {} '@babel/helper-member-expression-to-functions@7.24.5': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.28.1 '@babel/helper-module-imports@7.22.15': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.28.1 - '@babel/helper-module-imports@7.24.3': + '@babel/helper-module-imports@7.27.1': dependencies: - '@babel/types': 7.26.0 + '@babel/traverse': 7.28.0 + '@babel/types': 7.28.1 + transitivePeerDependencies: + - supports-color - '@babel/helper-module-transforms@7.24.5(@babel/core@7.24.5)': + '@babel/helper-module-transforms@7.27.3(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.24.3 - '@babel/helper-simple-access': 7.24.5 - '@babel/helper-split-export-declaration': 7.24.5 - '@babel/helper-validator-identifier': 7.24.5 + '@babel/helper-module-imports': 7.27.1 + '@babel/helper-validator-identifier': 7.27.1 + '@babel/traverse': 7.28.0 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.27.3(@babel/core@7.28.0)': + dependencies: + '@babel/core': 7.28.0 + '@babel/helper-module-imports': 7.27.1 + '@babel/helper-validator-identifier': 7.27.1 + '@babel/traverse': 7.28.0 + transitivePeerDependencies: + - supports-color '@babel/helper-optimise-call-expression@7.22.5': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.28.1 - '@babel/helper-plugin-utils@7.24.5': {} + '@babel/helper-plugin-utils@7.27.1': {} - '@babel/helper-replace-supers@7.24.1(@babel/core@7.24.5)': + '@babel/helper-replace-supers@7.24.1(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 + '@babel/core': 7.28.0 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-member-expression-to-functions': 7.24.5 '@babel/helper-optimise-call-expression': 7.22.5 '@babel/helper-simple-access@7.24.5': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.28.1 '@babel/helper-skip-transparent-expression-wrappers@7.22.5': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.28.1 '@babel/helper-split-export-declaration@7.24.5': dependencies: - '@babel/types': 7.26.0 - - '@babel/helper-string-parser@7.24.1': {} - - '@babel/helper-string-parser@7.25.9': {} + '@babel/types': 7.28.1 - '@babel/helper-validator-identifier@7.24.5': {} + '@babel/helper-string-parser@7.27.1': {} - '@babel/helper-validator-identifier@7.25.9': {} + '@babel/helper-validator-identifier@7.27.1': {} - '@babel/helper-validator-option@7.23.5': {} + '@babel/helper-validator-option@7.27.1': {} - '@babel/helpers@7.24.5': + '@babel/helpers@7.27.6': dependencies: - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 - transitivePeerDependencies: - - supports-color + '@babel/template': 7.27.2 + '@babel/types': 7.28.1 '@babel/highlight@7.24.5': dependencies: - '@babel/helper-validator-identifier': 7.25.9 + '@babel/helper-validator-identifier': 7.27.1 chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/parser@7.24.5': - dependencies: - '@babel/types': 7.24.5 - - '@babel/parser@7.26.2': + '@babel/parser@7.28.0': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.28.1 - '@babel/plugin-proposal-decorators@7.24.1(@babel/core@7.24.5)': + '@babel/plugin-proposal-decorators@7.24.1(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 - '@babel/helper-create-class-features-plugin': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-decorators': 7.24.1(@babel/core@7.24.5) + '@babel/core': 7.28.0 + '@babel/helper-create-class-features-plugin': 7.24.5(@babel/core@7.28.0) + '@babel/helper-plugin-utils': 7.27.1 + '@babel/plugin-syntax-decorators': 7.24.1(@babel/core@7.28.0) - '@babel/plugin-syntax-decorators@7.24.1(@babel/core@7.24.5)': + '@babel/plugin-syntax-decorators@7.24.1(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.28.0 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-import-attributes@7.24.1(@babel/core@7.24.5)': + '@babel/plugin-syntax-import-attributes@7.24.1(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.28.0 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.5)': + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.28.0 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.24.5)': + '@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.28.0 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.24.5)': + '@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.28.0 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-modules-commonjs@7.24.1(@babel/core@7.24.5)': + '@babel/plugin-transform-modules-commonjs@7.24.1(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 - '@babel/helper-module-transforms': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.28.0 + '@babel/helper-module-transforms': 7.27.3(@babel/core@7.28.0) + '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-simple-access': 7.24.5 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-react-jsx-self@7.24.5(@babel/core@7.24.5)': + '@babel/plugin-transform-react-jsx-self@7.27.1(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.28.0 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-react-jsx-source@7.24.1(@babel/core@7.24.5)': + '@babel/plugin-transform-react-jsx-source@7.27.1(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.28.0 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-typescript@7.24.5(@babel/core@7.24.5)': + '@babel/plugin-transform-typescript@7.24.5(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.24.5 + '@babel/core': 7.28.0 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.5) - - '@babel/preset-typescript@7.24.1(@babel/core@7.24.5)': - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-validator-option': 7.23.5 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-typescript': 7.24.5(@babel/core@7.24.5) + '@babel/helper-create-class-features-plugin': 7.24.5(@babel/core@7.28.0) + '@babel/helper-plugin-utils': 7.27.1 + '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.28.0) + + '@babel/preset-typescript@7.24.1(@babel/core@7.28.0)': + dependencies: + '@babel/core': 7.28.0 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-validator-option': 7.27.1 + '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.28.0) + '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.28.0) + '@babel/plugin-transform-typescript': 7.24.5(@babel/core@7.28.0) + transitivePeerDependencies: + - supports-color '@babel/runtime@7.26.0': dependencies: @@ -8763,37 +8868,34 @@ snapshots: '@babel/standalone@7.24.5': {} - '@babel/template@7.24.0': + '@babel/template@7.27.2': dependencies: - '@babel/code-frame': 7.24.2 - '@babel/parser': 7.26.2 - '@babel/types': 7.24.5 + '@babel/code-frame': 7.27.1 + '@babel/parser': 7.28.0 + '@babel/types': 7.28.1 - '@babel/traverse@7.24.5': + '@babel/traverse@7.28.0': dependencies: - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.24.5 - '@babel/parser': 7.26.2 - '@babel/types': 7.24.5 - debug: 4.3.7 - globals: 11.12.0 + '@babel/code-frame': 7.27.1 + '@babel/generator': 7.28.0 + '@babel/helper-globals': 7.28.0 + '@babel/parser': 7.28.0 + '@babel/template': 7.27.2 + '@babel/types': 7.28.1 + debug: 4.4.1 transitivePeerDependencies: - supports-color '@babel/types@7.24.5': dependencies: - '@babel/helper-string-parser': 7.24.1 - '@babel/helper-validator-identifier': 7.24.5 + '@babel/helper-string-parser': 7.27.1 + '@babel/helper-validator-identifier': 7.27.1 to-fast-properties: 2.0.0 - '@babel/types@7.26.0': + '@babel/types@7.28.1': dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 + '@babel/helper-string-parser': 7.27.1 + '@babel/helper-validator-identifier': 7.27.1 '@base-org/account@1.1.1(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.8.3)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: @@ -8815,41 +8917,41 @@ snapshots: - utf-8-validate - zod - '@bcoe/v8-coverage@0.2.3': {} + '@bcoe/v8-coverage@1.0.2': {} - '@biomejs/biome@1.9.4': + '@biomejs/biome@2.0.6': optionalDependencies: - '@biomejs/cli-darwin-arm64': 1.9.4 - '@biomejs/cli-darwin-x64': 1.9.4 - '@biomejs/cli-linux-arm64': 1.9.4 - '@biomejs/cli-linux-arm64-musl': 1.9.4 - '@biomejs/cli-linux-x64': 1.9.4 - '@biomejs/cli-linux-x64-musl': 1.9.4 - '@biomejs/cli-win32-arm64': 1.9.4 - '@biomejs/cli-win32-x64': 1.9.4 - - '@biomejs/cli-darwin-arm64@1.9.4': + '@biomejs/cli-darwin-arm64': 2.0.6 + '@biomejs/cli-darwin-x64': 2.0.6 + '@biomejs/cli-linux-arm64': 2.0.6 + '@biomejs/cli-linux-arm64-musl': 2.0.6 + '@biomejs/cli-linux-x64': 2.0.6 + '@biomejs/cli-linux-x64-musl': 2.0.6 + '@biomejs/cli-win32-arm64': 2.0.6 + '@biomejs/cli-win32-x64': 2.0.6 + + '@biomejs/cli-darwin-arm64@2.0.6': optional: true - '@biomejs/cli-darwin-x64@1.9.4': + '@biomejs/cli-darwin-x64@2.0.6': optional: true - '@biomejs/cli-linux-arm64-musl@1.9.4': + '@biomejs/cli-linux-arm64-musl@2.0.6': optional: true - '@biomejs/cli-linux-arm64@1.9.4': + '@biomejs/cli-linux-arm64@2.0.6': optional: true - '@biomejs/cli-linux-x64-musl@1.9.4': + '@biomejs/cli-linux-x64-musl@2.0.6': optional: true - '@biomejs/cli-linux-x64@1.9.4': + '@biomejs/cli-linux-x64@2.0.6': optional: true - '@biomejs/cli-win32-arm64@1.9.4': + '@biomejs/cli-win32-arm64@2.0.6': optional: true - '@biomejs/cli-win32-x64@1.9.4': + '@biomejs/cli-win32-x64@2.0.6': optional: true '@bundled-es-modules/cookie@2.0.0': @@ -8953,7 +9055,7 @@ snapshots: dependencies: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 - picocolors: 1.1.0 + picocolors: 1.1.1 semver: 7.6.2 '@changesets/get-github-info@0.5.2(encoding@0.1.13)': @@ -8984,7 +9086,7 @@ snapshots: '@changesets/logger@0.1.1': dependencies: - picocolors: 1.1.0 + picocolors: 1.1.1 '@changesets/parse@0.4.0': dependencies: @@ -9006,7 +9108,7 @@ snapshots: '@changesets/types': 6.0.0 fs-extra: 7.0.1 p-filter: 2.1.0 - picocolors: 1.1.0 + picocolors: 1.1.1 '@changesets/should-skip-package@0.1.1': dependencies: @@ -9478,7 +9580,7 @@ snapshots: '@antfu/install-pkg': 0.1.1 '@antfu/utils': 0.7.7 '@iconify/types': 2.0.0 - debug: 4.3.7 + debug: 4.4.1 kolorist: 1.8.0 local-pkg: 0.5.0 mlly: 1.7.0 @@ -9527,48 +9629,35 @@ snapshots: '@istanbuljs/schema@0.1.3': {} - '@jridgewell/gen-mapping@0.3.3': + '@jridgewell/gen-mapping@0.3.12': dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.17 - - '@jridgewell/gen-mapping@0.3.5': - dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.29 '@jridgewell/resolve-uri@3.1.0': {} - '@jridgewell/set-array@1.1.2': {} - - '@jridgewell/set-array@1.2.1': {} - '@jridgewell/source-map@0.3.6': dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - - '@jridgewell/sourcemap-codec@1.4.14': {} + '@jridgewell/gen-mapping': 0.3.12 + '@jridgewell/trace-mapping': 0.3.29 '@jridgewell/sourcemap-codec@1.4.15': {} '@jridgewell/sourcemap-codec@1.5.0': {} - '@jridgewell/trace-mapping@0.3.17': + '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping@0.3.25': + '@jridgewell/trace-mapping@0.3.29': dependencies: '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@kwsites/file-exists@1.1.1': dependencies: - debug: 4.3.7 + debug: 4.4.1 transitivePeerDependencies: - supports-color @@ -9741,8 +9830,8 @@ snapshots: dependencies: '@ethereumjs/tx': 4.2.0 '@types/debug': 4.1.7 - debug: 4.3.7 - semver: 7.5.4 + debug: 4.4.1 + semver: 7.6.2 superstruct: 1.0.3 transitivePeerDependencies: - supports-color @@ -9753,7 +9842,7 @@ snapshots: '@noble/hashes': 1.8.0 '@scure/base': 1.2.4 '@types/debug': 4.1.7 - debug: 4.3.7 + debug: 4.4.1 pony-cause: 2.1.11 semver: 7.6.2 superstruct: 1.0.3 @@ -10219,8 +10308,8 @@ snapshots: dependencies: '@nuxt/kit': 3.11.2(rollup@4.24.4) '@rollup/plugin-replace': 5.0.5(rollup@4.24.4) - '@vitejs/plugin-vue': 5.0.4(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.8.3)) - '@vitejs/plugin-vue-jsx': 3.1.0(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.8.3)) + '@vitejs/plugin-vue': 5.0.4(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.8.3)) + '@vitejs/plugin-vue-jsx': 3.1.0(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.8.3)) autoprefixer: 10.4.19(postcss@8.4.47) clear: 0.1.0 consola: 3.2.3 @@ -10234,7 +10323,7 @@ snapshots: get-port-please: 3.1.2 h3: 1.11.1 knitwork: 1.1.0 - magic-string: 0.30.11 + magic-string: 0.30.17 mlly: 1.7.0 ohash: 1.1.3 pathe: 1.1.2 @@ -10247,9 +10336,9 @@ snapshots: ufo: 1.5.3 unenv: 1.9.0 unplugin: 1.10.1 - vite: 5.2.11(@types/node@20.12.10)(terser@5.31.0) + vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) vite-node: 1.6.0(@types/node@20.12.10)(terser@5.31.0) - vite-plugin-checker: 0.6.4(typescript@5.8.3)(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0))(vue-tsc@2.0.16(typescript@5.8.3)) + vite-plugin-checker: 0.6.4(typescript@5.8.3)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue-tsc@2.0.16(typescript@5.8.3)) vue: 3.5.12(typescript@5.8.3) vue-bundle-renderer: 2.1.0 transitivePeerDependencies: @@ -10261,6 +10350,7 @@ snapshots: - optionator - rollup - sass + - sass-embedded - stylelint - stylus - sugarss @@ -10664,6 +10754,8 @@ snapshots: - utf-8-validate - zod + '@rolldown/pluginutils@1.0.0-beta.27': {} + '@rollup/plugin-alias@5.1.0(rollup@4.17.2)': dependencies: slash: 4.0.0 @@ -10677,7 +10769,7 @@ snapshots: estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 - magic-string: 0.30.11 + magic-string: 0.30.17 optionalDependencies: rollup: 4.17.2 @@ -10685,7 +10777,7 @@ snapshots: dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.17.2) estree-walker: 2.0.2 - magic-string: 0.30.11 + magic-string: 0.30.17 optionalDependencies: rollup: 4.17.2 @@ -10709,14 +10801,14 @@ snapshots: '@rollup/plugin-replace@5.0.5(rollup@4.17.2)': dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.17.2) - magic-string: 0.30.11 + magic-string: 0.30.17 optionalDependencies: rollup: 4.17.2 '@rollup/plugin-replace@5.0.5(rollup@4.24.4)': dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.24.4) - magic-string: 0.30.11 + magic-string: 0.30.17 optionalDependencies: rollup: 4.24.4 @@ -11167,15 +11259,9 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 - '@testing-library/react@16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@testing-library/user-event@14.6.1(@testing-library/dom@10.4.0)': dependencies: - '@babel/runtime': 7.26.0 '@testing-library/dom': 10.4.0 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - optionalDependencies: - '@types/react': 18.3.1 - '@types/react-dom': 18.3.0 '@trysound/sax@0.2.0': {} @@ -11190,24 +11276,24 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/parser': 7.28.0 + '@babel/types': 7.28.1 '@types/babel__generator': 7.6.5 '@types/babel__template': 7.4.2 '@types/babel__traverse': 7.20.2 '@types/babel__generator@7.6.5': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.28.1 '@types/babel__template@7.4.2': dependencies: - '@babel/parser': 7.26.2 - '@babel/types': 7.24.5 + '@babel/parser': 7.28.0 + '@babel/types': 7.28.1 '@types/babel__traverse@7.20.2': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.28.1 '@types/bn.js@4.11.6': dependencies: @@ -11221,6 +11307,10 @@ snapshots: dependencies: bun-types: 1.1.29 + '@types/chai@5.2.2': + dependencies: + '@types/deep-eql': 4.0.2 + '@types/cookie@0.6.0': {} '@types/cross-spawn@6.0.6': @@ -11233,6 +11323,8 @@ snapshots: '@types/dedent@0.7.2': {} + '@types/deep-eql@4.0.2': {} + '@types/estree@1.0.5': {} '@types/estree@1.0.6': {} @@ -11312,6 +11404,8 @@ snapshots: '@types/web-bluetooth@0.0.20': {} + '@types/whatwg-mimetype@3.0.2': {} + '@types/wrap-ansi@3.0.0': {} '@types/ws@8.5.10': @@ -11320,7 +11414,7 @@ snapshots: '@typescript/vfs@1.6.0(typescript@5.8.3)': dependencies: - debug: 4.3.7 + debug: 4.4.1 typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -11376,7 +11470,7 @@ snapshots: colorette: 2.0.20 consola: 3.2.3 fast-glob: 3.3.2 - magic-string: 0.30.10 + magic-string: 0.30.17 pathe: 1.1.2 perfect-debounce: 1.0.0 transitivePeerDependencies: @@ -11407,8 +11501,8 @@ snapshots: '@unocss/rule-utils': 0.59.4 css-tree: 2.3.1 fast-glob: 3.3.2 - magic-string: 0.30.10 - postcss: 8.4.38 + magic-string: 0.30.17 + postcss: 8.4.47 '@unocss/preset-attributify@0.59.4': dependencies: @@ -11460,15 +11554,15 @@ snapshots: '@unocss/rule-utils@0.59.4': dependencies: '@unocss/core': 0.59.4 - magic-string: 0.30.11 + magic-string: 0.30.17 '@unocss/scope@0.59.4': {} '@unocss/transformer-attributify-jsx-babel@0.59.4': dependencies: - '@babel/core': 7.24.5 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.5) - '@babel/preset-typescript': 7.24.1(@babel/core@7.24.5) + '@babel/core': 7.28.0 + '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.28.0) + '@babel/preset-typescript': 7.24.1(@babel/core@7.28.0) '@unocss/core': 0.59.4 transitivePeerDependencies: - supports-color @@ -11502,7 +11596,7 @@ snapshots: '@unocss/transformer-directives': 0.59.4 chokidar: 3.6.0 fast-glob: 3.3.2 - magic-string: 0.30.10 + magic-string: 0.30.17 vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) transitivePeerDependencies: - rollup @@ -11525,23 +11619,36 @@ snapshots: - encoding - supports-color - '@vitejs/plugin-react@4.2.1(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0))': + '@vitejs/plugin-react@4.7.0(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0))': dependencies: - '@babel/core': 7.24.5 - '@babel/plugin-transform-react-jsx-self': 7.24.5(@babel/core@7.24.5) - '@babel/plugin-transform-react-jsx-source': 7.24.1(@babel/core@7.24.5) + '@babel/core': 7.28.0 + '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.0) + '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.28.0) + '@rolldown/pluginutils': 1.0.0-beta.27 '@types/babel__core': 7.20.5 - react-refresh: 0.14.0 + react-refresh: 0.17.0 vite: 5.2.11(@types/node@20.12.10)(terser@5.31.0) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue-jsx@3.1.0(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.8.3))': + '@vitejs/plugin-react@4.7.0(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))': dependencies: - '@babel/core': 7.24.5 - '@babel/plugin-transform-typescript': 7.24.5(@babel/core@7.24.5) - '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.5) - vite: 5.2.11(@types/node@20.12.10)(terser@5.31.0) + '@babel/core': 7.28.0 + '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.0) + '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.28.0) + '@rolldown/pluginutils': 1.0.0-beta.27 + '@types/babel__core': 7.20.5 + react-refresh: 0.17.0 + vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) + transitivePeerDependencies: + - supports-color + + '@vitejs/plugin-vue-jsx@3.1.0(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.8.3))': + dependencies: + '@babel/core': 7.28.0 + '@babel/plugin-transform-typescript': 7.24.5(@babel/core@7.28.0) + '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.28.0) + vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) vue: 3.5.12(typescript@5.8.3) transitivePeerDependencies: - supports-color @@ -11551,9 +11658,9 @@ snapshots: vite: 5.2.11(@types/node@20.12.10)(terser@5.31.0) vue: 3.4.27(typescript@5.8.3) - '@vitejs/plugin-vue@5.0.4(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.8.3))': + '@vitejs/plugin-vue@5.0.4(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.8.3))': dependencies: - vite: 5.2.11(@types/node@20.12.10)(terser@5.31.0) + vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) vue: 3.5.12(typescript@5.8.3) '@vitejs/plugin-vue@5.1.4(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.8.3))': @@ -11561,64 +11668,88 @@ snapshots: vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) vue: 3.5.12(typescript@5.8.3) - '@vitest/coverage-v8@2.1.1(vitest@2.1.1(@types/node@20.12.10)(happy-dom@15.7.4)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0))': + '@vitest/browser@3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.8.3))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vitest@3.2.4)': + dependencies: + '@testing-library/dom': 10.4.0 + '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.0) + '@vitest/mocker': 3.2.4(msw@2.4.9(typescript@5.8.3))(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)) + '@vitest/utils': 3.2.4 + magic-string: 0.30.17 + sirv: 3.0.1 + tinyrainbow: 2.0.0 + vitest: 3.2.4(@types/node@20.12.10)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0) + ws: 8.18.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + optionalDependencies: + playwright: 1.54.1 + transitivePeerDependencies: + - bufferutil + - msw + - utf-8-validate + - vite + + '@vitest/coverage-v8@3.2.4(@vitest/browser@3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.8.3))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vitest@3.2.4))(vitest@3.2.4(@types/node@20.12.10)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0))': dependencies: '@ampproject/remapping': 2.3.0 - '@bcoe/v8-coverage': 0.2.3 - debug: 4.3.7 + '@bcoe/v8-coverage': 1.0.2 + ast-v8-to-istanbul: 0.3.3 + debug: 4.4.1 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.6 istanbul-reports: 3.1.7 - magic-string: 0.30.11 - magicast: 0.3.4 - std-env: 3.7.0 + magic-string: 0.30.17 + magicast: 0.3.5 + std-env: 3.9.0 test-exclude: 7.0.1 - tinyrainbow: 1.2.0 - vitest: 2.1.1(@types/node@20.12.10)(happy-dom@15.7.4)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0) + tinyrainbow: 2.0.0 + vitest: 3.2.4(@types/node@20.12.10)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0) + optionalDependencies: + '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.8.3))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vitest@3.2.4) transitivePeerDependencies: - supports-color - '@vitest/expect@2.1.1': + '@vitest/expect@3.2.4': dependencies: - '@vitest/spy': 2.1.1 - '@vitest/utils': 2.1.1 - chai: 5.1.1 - tinyrainbow: 1.2.0 + '@types/chai': 5.2.2 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 + chai: 5.2.1 + tinyrainbow: 2.0.0 - '@vitest/mocker@2.1.1(msw@2.4.9(typescript@5.8.3))(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0))': + '@vitest/mocker@3.2.4(msw@2.4.9(typescript@5.8.3))(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))': dependencies: - '@vitest/spy': 2.1.1 + '@vitest/spy': 3.2.4 estree-walker: 3.0.3 - magic-string: 0.30.11 + magic-string: 0.30.17 optionalDependencies: msw: 2.4.9(typescript@5.8.3) - vite: 5.2.11(@types/node@20.12.10)(terser@5.31.0) + vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) - '@vitest/pretty-format@2.1.1': + '@vitest/pretty-format@3.2.4': dependencies: - tinyrainbow: 1.2.0 + tinyrainbow: 2.0.0 - '@vitest/runner@2.1.1': + '@vitest/runner@3.2.4': dependencies: - '@vitest/utils': 2.1.1 - pathe: 1.1.2 + '@vitest/utils': 3.2.4 + pathe: 2.0.3 + strip-literal: 3.0.0 - '@vitest/snapshot@2.1.1': + '@vitest/snapshot@3.2.4': dependencies: - '@vitest/pretty-format': 2.1.1 - magic-string: 0.30.11 - pathe: 1.1.2 + '@vitest/pretty-format': 3.2.4 + magic-string: 0.30.17 + pathe: 2.0.3 - '@vitest/spy@2.1.1': + '@vitest/spy@3.2.4': dependencies: - tinyspy: 3.0.2 + tinyspy: 4.0.3 - '@vitest/utils@2.1.1': + '@vitest/utils@3.2.4': dependencies: - '@vitest/pretty-format': 2.1.1 - loupe: 3.1.1 - tinyrainbow: 1.2.0 + '@vitest/pretty-format': 3.2.4 + loupe: 3.1.4 + tinyrainbow: 2.0.0 '@volar/language-core@2.2.1': dependencies: @@ -11641,7 +11772,7 @@ snapshots: '@vue-macros/common@1.10.3(rollup@4.24.4)(vue@3.5.12(typescript@5.8.3))': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.28.1 '@rollup/pluginutils': 5.1.0(rollup@4.24.4) '@vue/compiler-sfc': 3.5.12 ast-kit: 0.12.1 @@ -11654,36 +11785,36 @@ snapshots: '@vue/babel-helper-vue-transform-on@1.2.2': {} - '@vue/babel-plugin-jsx@1.2.2(@babel/core@7.24.5)': + '@vue/babel-plugin-jsx@1.2.2(@babel/core@7.28.0)': dependencies: '@babel/helper-module-imports': 7.22.15 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.5) - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.26.0 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.28.0) + '@babel/template': 7.27.2 + '@babel/traverse': 7.28.0 + '@babel/types': 7.28.1 '@vue/babel-helper-vue-transform-on': 1.2.2 - '@vue/babel-plugin-resolve-type': 1.2.2(@babel/core@7.24.5) + '@vue/babel-plugin-resolve-type': 1.2.2(@babel/core@7.28.0) camelcase: 6.3.0 html-tags: 3.3.1 svg-tags: 1.0.0 optionalDependencies: - '@babel/core': 7.24.5 + '@babel/core': 7.28.0 transitivePeerDependencies: - supports-color - '@vue/babel-plugin-resolve-type@1.2.2(@babel/core@7.24.5)': + '@vue/babel-plugin-resolve-type@1.2.2(@babel/core@7.28.0)': dependencies: - '@babel/code-frame': 7.24.2 - '@babel/core': 7.24.5 + '@babel/code-frame': 7.27.1 + '@babel/core': 7.28.0 '@babel/helper-module-imports': 7.22.15 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/parser': 7.26.2 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/parser': 7.28.0 '@vue/compiler-sfc': 3.5.12 '@vue/compiler-core@3.4.27': dependencies: - '@babel/parser': 7.26.2 + '@babel/parser': 7.28.0 '@vue/shared': 3.4.27 entities: 4.5.0 estree-walker: 2.0.2 @@ -11691,7 +11822,7 @@ snapshots: '@vue/compiler-core@3.5.12': dependencies: - '@babel/parser': 7.26.2 + '@babel/parser': 7.28.0 '@vue/shared': 3.5.12 entities: 4.5.0 estree-walker: 2.0.2 @@ -11709,25 +11840,25 @@ snapshots: '@vue/compiler-sfc@3.4.27': dependencies: - '@babel/parser': 7.26.2 + '@babel/parser': 7.28.0 '@vue/compiler-core': 3.4.27 '@vue/compiler-dom': 3.4.27 '@vue/compiler-ssr': 3.4.27 '@vue/shared': 3.4.27 estree-walker: 2.0.2 - magic-string: 0.30.12 + magic-string: 0.30.17 postcss: 8.4.47 source-map-js: 1.2.1 '@vue/compiler-sfc@3.5.12': dependencies: - '@babel/parser': 7.26.2 + '@babel/parser': 7.28.0 '@vue/compiler-core': 3.5.12 '@vue/compiler-dom': 3.5.12 '@vue/compiler-ssr': 3.5.12 '@vue/shared': 3.5.12 estree-walker: 2.0.2 - magic-string: 0.30.11 + magic-string: 0.30.17 postcss: 8.4.47 source-map-js: 1.2.1 @@ -12528,13 +12659,13 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.7 + debug: 4.4.1 transitivePeerDependencies: - supports-color agent-base@7.1.1: dependencies: - debug: 4.3.7 + debug: 4.4.1 transitivePeerDependencies: - supports-color @@ -12649,20 +12780,26 @@ snapshots: ast-kit@0.12.1: dependencies: - '@babel/parser': 7.26.2 + '@babel/parser': 7.28.0 pathe: 1.1.2 ast-kit@0.9.5(rollup@4.24.4): dependencies: - '@babel/parser': 7.26.2 + '@babel/parser': 7.28.0 '@rollup/pluginutils': 5.1.0(rollup@4.24.4) pathe: 1.1.2 transitivePeerDependencies: - rollup + ast-v8-to-istanbul@0.3.3: + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + estree-walker: 3.0.3 + js-tokens: 9.0.1 + ast-walker-scope@0.5.0(rollup@4.24.4): dependencies: - '@babel/parser': 7.26.2 + '@babel/parser': 7.28.0 ast-kit: 0.9.5(rollup@4.24.4) transitivePeerDependencies: - rollup @@ -12679,7 +12816,7 @@ snapshots: autoprefixer@10.4.19(postcss@8.4.47): dependencies: - browserslist: 4.23.0 + browserslist: 4.25.1 caniuse-lite: 1.0.30001616 fraction.js: 4.3.7 normalize-range: 0.1.2 @@ -12767,12 +12904,12 @@ snapshots: inherits: 2.0.4 safe-buffer: 5.2.1 - browserslist@4.23.0: + browserslist@4.25.1: dependencies: - caniuse-lite: 1.0.30001616 - electron-to-chromium: 1.4.757 - node-releases: 2.0.14 - update-browserslist-db: 1.0.15(browserslist@4.23.0) + caniuse-lite: 1.0.30001727 + electron-to-chromium: 1.5.189 + node-releases: 2.0.19 + update-browserslist-db: 1.1.3(browserslist@4.25.1) bs58@4.0.1: dependencies: @@ -12879,22 +13016,24 @@ snapshots: caniuse-api@3.0.0: dependencies: - browserslist: 4.23.0 - caniuse-lite: 1.0.30001616 + browserslist: 4.25.1 + caniuse-lite: 1.0.30001727 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 caniuse-lite@1.0.30001616: {} + caniuse-lite@1.0.30001727: {} + ccount@2.0.1: {} - chai@5.1.1: + chai@5.2.1: dependencies: assertion-error: 2.0.1 check-error: 2.1.1 deep-eql: 5.0.2 - loupe: 3.1.1 - pathval: 2.0.0 + loupe: 3.1.4 + pathval: 2.0.1 chalk@2.4.2: dependencies: @@ -13157,6 +13296,12 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + crossws@0.2.4: {} crypto-random-string@1.0.0: {} @@ -13189,7 +13334,7 @@ snapshots: cssnano-preset-default@6.1.2(postcss@8.4.47): dependencies: - browserslist: 4.23.0 + browserslist: 4.25.1 css-declaration-sorter: 7.2.0(postcss@8.4.47) cssnano-utils: 4.0.2(postcss@8.4.47) postcss: 8.4.47 @@ -13267,6 +13412,10 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.4.1: + dependencies: + ms: 2.1.3 + decamelize@1.2.0: {} decamelize@4.0.0: {} @@ -13406,11 +13555,11 @@ snapshots: '@one-ini/wasm': 0.1.1 commander: 10.0.1 minimatch: 9.0.1 - semver: 7.5.4 + semver: 7.6.2 ee-first@1.1.1: {} - electron-to-chromium@1.4.757: {} + electron-to-chromium@1.5.189: {} elliptic@6.5.4: dependencies: @@ -13498,6 +13647,8 @@ snapshots: error-stack-parser-es@0.1.1: {} + es-module-lexer@1.7.0: {} + es-toolkit@1.33.0: {} esbuild@0.20.2: @@ -13725,25 +13876,27 @@ snapshots: human-signals: 5.0.0 is-stream: 3.0.0 merge-stream: 2.0.0 - npm-run-path: 5.1.0 + npm-run-path: 5.3.0 onetime: 6.0.0 signal-exit: 4.1.0 strip-final-newline: 3.0.0 - execa@9.1.0: + execa@9.6.0: dependencies: '@sindresorhus/merge-streams': 4.0.0 - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 figures: 6.1.0 get-stream: 9.0.1 - human-signals: 7.0.0 + human-signals: 8.0.1 is-plain-obj: 4.1.0 is-stream: 4.0.1 - npm-run-path: 5.3.0 - pretty-ms: 9.0.0 + npm-run-path: 6.0.0 + pretty-ms: 9.2.0 signal-exit: 4.1.0 strip-final-newline: 4.0.0 - yoctocolors: 2.0.2 + yoctocolors: 2.1.1 + + expect-type@1.2.2: {} exponential-backoff@3.1.1: {} @@ -13793,11 +13946,15 @@ snapshots: optionalDependencies: picomatch: 3.0.1 + fdir@6.4.6(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + fflate@0.8.2: {} figures@6.1.0: dependencies: - is-unicode-supported: 2.0.0 + is-unicode-supported: 2.1.0 file-uri-to-path@1.0.0: {} @@ -13917,6 +14074,9 @@ snapshots: fs.realpath@1.0.0: {} + fsevents@2.3.2: + optional: true + fsevents@2.3.3: optional: true @@ -13938,8 +14098,6 @@ snapshots: get-caller-file@2.0.5: {} - get-func-name@2.0.2: {} - get-intrinsic@1.2.1: dependencies: function-bind: 1.1.2 @@ -14025,8 +14183,6 @@ snapshots: dependencies: ini: 4.1.1 - globals@11.12.0: {} - globby@11.1.0: dependencies: array-union: 2.1.0 @@ -14085,10 +14241,10 @@ snapshots: transitivePeerDependencies: - uWebSockets.js - happy-dom@15.7.4: + happy-dom@18.0.1: dependencies: - entities: 4.5.0 - webidl-conversions: 7.0.0 + '@types/node': 20.12.10 + '@types/whatwg-mimetype': 3.0.2 whatwg-mimetype: 3.0.0 hardhat@2.22.3(bufferutil@4.0.8)(typescript@5.8.3)(utf-8-validate@5.0.10): @@ -14236,7 +14392,7 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.4.1 transitivePeerDependencies: - supports-color @@ -14253,14 +14409,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.4.1 transitivePeerDependencies: - supports-color https-proxy-agent@7.0.4: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.4.1 transitivePeerDependencies: - supports-color @@ -14274,7 +14430,7 @@ snapshots: human-signals@5.0.0: {} - human-signals@7.0.0: {} + human-signals@8.0.1: {} iconv-lite@0.4.24: dependencies: @@ -14327,7 +14483,7 @@ snapshots: dependencies: '@ioredis/commands': 1.2.0 cluster-key-slot: 1.1.2 - debug: 4.3.7 + debug: 4.4.1 denque: 2.1.0 lodash.defaults: 4.2.0 lodash.isarguments: 3.1.0 @@ -14410,7 +14566,7 @@ snapshots: is-reference@1.2.1: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 is-ssh@1.4.0: dependencies: @@ -14432,7 +14588,7 @@ snapshots: is-unicode-supported@0.1.0: {} - is-unicode-supported@2.0.0: {} + is-unicode-supported@2.1.0: {} is-what@4.1.16: {} @@ -14483,7 +14639,7 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.25 - debug: 4.3.7 + debug: 4.4.1 istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -14519,7 +14675,7 @@ snapshots: js-tokens@4.0.0: {} - js-tokens@9.0.0: {} + js-tokens@9.0.1: {} js-yaml@3.14.1: dependencies: @@ -14532,7 +14688,7 @@ snapshots: jsbn@1.1.0: {} - jsesc@2.5.2: {} + jsesc@3.1.0: {} json-parse-even-better-errors@3.0.2: {} @@ -14705,9 +14861,7 @@ snapshots: dependencies: js-tokens: 4.0.0 - loupe@3.1.1: - dependencies: - get-func-name: 2.0.2 + loupe@3.1.4: {} lru-cache@10.2.2: {} @@ -14732,25 +14886,31 @@ snapshots: magic-string-ast@0.5.0: dependencies: - magic-string: 0.30.12 + magic-string: 0.30.17 magic-string@0.30.10: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 - magic-string@0.30.11: + magic-string@0.30.12: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - magic-string@0.30.12: + magic-string@0.30.17: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 magicast@0.3.4: dependencies: - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 - source-map-js: 1.2.0 + '@babel/parser': 7.28.0 + '@babel/types': 7.28.1 + source-map-js: 1.2.1 + + magicast@0.3.5: + dependencies: + '@babel/parser': 7.28.0 + '@babel/types': 7.28.1 + source-map-js: 1.2.1 make-dir@3.1.0: dependencies: @@ -15050,7 +15210,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.7 - debug: 4.3.7 + debug: 4.4.1 decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.1 @@ -15154,10 +15314,9 @@ snapshots: minipass: 3.3.6 yallist: 4.0.0 - minizlib@3.0.1: + minizlib@3.0.2: dependencies: minipass: 7.1.2 - rimraf: 5.0.10 mipd@0.0.7(typescript@5.8.3): optionalDependencies: @@ -15339,7 +15498,7 @@ snapshots: klona: 2.0.6 knitwork: 1.1.0 listhen: 1.7.2 - magic-string: 0.30.11 + magic-string: 0.30.17 mime: 4.0.3 mlly: 1.7.0 mri: 1.2.0 @@ -15437,7 +15596,7 @@ snapshots: transitivePeerDependencies: - supports-color - node-releases@2.0.14: {} + node-releases@2.0.19: {} nopt@5.0.0: dependencies: @@ -15516,13 +15675,14 @@ snapshots: dependencies: path-key: 3.1.1 - npm-run-path@5.1.0: + npm-run-path@5.3.0: dependencies: path-key: 4.0.0 - npm-run-path@5.3.0: + npm-run-path@6.0.0: dependencies: path-key: 4.0.0 + unicorn-magic: 0.3.0 npmlog@5.0.1: dependencies: @@ -15639,6 +15799,7 @@ snapshots: - qrcode - rollup - sass + - sass-embedded - sortablejs - stylelint - stylus @@ -15902,7 +16063,9 @@ snapshots: pathe@1.1.2: {} - pathval@2.0.0: {} + pathe@2.0.3: {} + + pathval@2.0.1: {} pbkdf2@3.1.2: dependencies: @@ -15993,6 +16156,14 @@ snapshots: mlly: 1.7.0 pathe: 1.1.2 + playwright-core@1.54.1: {} + + playwright@1.54.1: + dependencies: + playwright-core: 1.54.1 + optionalDependencies: + fsevents: 2.3.2 + pngjs@5.0.0: {} pony-cause@2.1.11: {} @@ -16005,7 +16176,7 @@ snapshots: postcss-colormin@6.1.0(postcss@8.4.47): dependencies: - browserslist: 4.23.0 + browserslist: 4.25.1 caniuse-api: 3.0.0 colord: 2.9.3 postcss: 8.4.47 @@ -16013,7 +16184,7 @@ snapshots: postcss-convert-values@6.1.0(postcss@8.4.47): dependencies: - browserslist: 4.23.0 + browserslist: 4.25.1 postcss: 8.4.47 postcss-value-parser: 4.2.0 @@ -16041,7 +16212,7 @@ snapshots: postcss-merge-rules@6.1.1(postcss@8.4.47): dependencies: - browserslist: 4.23.0 + browserslist: 4.25.1 caniuse-api: 3.0.0 cssnano-utils: 4.0.2(postcss@8.4.47) postcss: 8.4.47 @@ -16061,7 +16232,7 @@ snapshots: postcss-minify-params@6.1.0(postcss@8.4.47): dependencies: - browserslist: 4.23.0 + browserslist: 4.25.1 cssnano-utils: 4.0.2(postcss@8.4.47) postcss: 8.4.47 postcss-value-parser: 4.2.0 @@ -16102,7 +16273,7 @@ snapshots: postcss-normalize-unicode@6.1.0(postcss@8.4.47): dependencies: - browserslist: 4.23.0 + browserslist: 4.25.1 postcss: 8.4.47 postcss-value-parser: 4.2.0 @@ -16124,7 +16295,7 @@ snapshots: postcss-reduce-initial@6.1.0(postcss@8.4.47): dependencies: - browserslist: 4.23.0 + browserslist: 4.25.1 caniuse-api: 3.0.0 postcss: 8.4.47 @@ -16155,13 +16326,13 @@ snapshots: dependencies: nanoid: 3.3.7 picocolors: 1.1.1 - source-map-js: 1.2.0 + source-map-js: 1.2.1 postcss@8.4.38: dependencies: nanoid: 3.3.7 picocolors: 1.1.1 - source-map-js: 1.2.0 + source-map-js: 1.2.1 postcss@8.4.47: dependencies: @@ -16191,6 +16362,10 @@ snapshots: dependencies: parse-ms: 4.0.0 + pretty-ms@9.2.0: + dependencies: + parse-ms: 4.0.0 + proc-log@3.0.0: {} proc-log@4.2.0: {} @@ -16213,11 +16388,11 @@ snapshots: kleur: 3.0.3 sisteransi: 1.0.5 - prool@0.0.23: + prool@0.0.24(patch_hash=lvy5e23lv2bpph2vcwhe44cj4e): dependencies: change-case: 5.4.4 eventemitter3: 5.0.1 - execa: 9.1.0 + execa: 9.6.0 get-port: 7.1.0 http-proxy: 1.18.1 tar: 7.2.0 @@ -16299,7 +16474,7 @@ snapshots: react-is@17.0.2: {} - react-refresh@0.14.0: {} + react-refresh@0.17.0: {} react@18.3.1: dependencies: @@ -16396,10 +16571,6 @@ snapshots: dependencies: glob: 7.2.3 - rimraf@5.0.10: - dependencies: - glob: 10.4.5 - ripemd160@2.0.2: dependencies: hash-base: 3.1.0 @@ -16644,7 +16815,7 @@ snapshots: dependencies: '@kwsites/file-exists': 1.1.1 '@kwsites/promise-deferred': 1.1.1 - debug: 4.3.7 + debug: 4.4.1 transitivePeerDependencies: - supports-color @@ -16660,6 +16831,12 @@ snapshots: mrmime: 2.0.0 totalist: 3.0.1 + sirv@3.0.1: + dependencies: + '@polka/url': 1.0.0-next.25 + mrmime: 2.0.0 + totalist: 3.0.1 + sisteransi@1.0.5: {} skin-tone@2.0.0: @@ -16701,7 +16878,7 @@ snapshots: socks-proxy-agent@8.0.3: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.4.1 socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -16733,8 +16910,6 @@ snapshots: dependencies: atomic-sleep: 1.0.0 - source-map-js@1.2.0: {} - source-map-js@1.2.1: {} source-map-support@0.5.21: @@ -16795,6 +16970,8 @@ snapshots: std-env@3.7.0: {} + std-env@3.9.0: {} + stream-shift@1.0.1: {} streamsearch@1.1.0: {} @@ -16865,7 +17042,11 @@ snapshots: strip-literal@2.1.0: dependencies: - js-tokens: 9.0.0 + js-tokens: 9.0.1 + + strip-literal@3.0.0: + dependencies: + js-tokens: 9.0.1 styled-jsx@5.1.1(react@18.3.1): dependencies: @@ -16874,7 +17055,7 @@ snapshots: stylehacks@6.1.1(postcss@8.4.47): dependencies: - browserslist: 4.23.0 + browserslist: 4.25.1 postcss: 8.4.47 postcss-selector-parser: 6.0.16 @@ -16945,7 +17126,7 @@ snapshots: '@isaacs/fs-minipass': 4.0.1 chownr: 3.0.0 minipass: 7.1.2 - minizlib: 3.0.1 + minizlib: 3.0.2 mkdirp: 3.0.1 yallist: 5.0.0 @@ -16987,13 +17168,18 @@ snapshots: tinybench@2.9.0: {} - tinyexec@0.3.0: {} + tinyexec@0.3.2: {} - tinypool@1.0.1: {} + tinyglobby@0.2.14: + dependencies: + fdir: 6.4.6(picomatch@4.0.2) + picomatch: 4.0.2 + + tinypool@1.1.1: {} - tinyrainbow@1.2.0: {} + tinyrainbow@2.0.0: {} - tinyspy@3.0.2: {} + tinyspy@4.0.3: {} tmp@0.0.33: dependencies: @@ -17029,7 +17215,7 @@ snapshots: tuf-js@2.2.1: dependencies: '@tufjs/models': 2.0.1 - debug: 4.3.7 + debug: 4.4.1 make-fetch-happen: 13.0.1 transitivePeerDependencies: - supports-color @@ -17097,7 +17283,7 @@ snapshots: dependencies: acorn: 8.11.3 estree-walker: 3.0.3 - magic-string: 0.30.11 + magic-string: 0.30.17 unplugin: 1.10.1 undici-types@5.26.5: {} @@ -17125,6 +17311,8 @@ snapshots: unicorn-magic@0.1.0: {} + unicorn-magic@0.3.0: {} + unimport@3.7.1(rollup@4.17.2): dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.17.2) @@ -17133,7 +17321,7 @@ snapshots: estree-walker: 3.0.3 fast-glob: 3.3.2 local-pkg: 0.5.0 - magic-string: 0.30.10 + magic-string: 0.30.12 mlly: 1.7.0 pathe: 1.1.2 pkg-types: 1.1.0 @@ -17151,7 +17339,7 @@ snapshots: estree-walker: 3.0.3 fast-glob: 3.3.2 local-pkg: 0.5.0 - magic-string: 0.30.10 + magic-string: 0.30.12 mlly: 1.7.0 pathe: 1.1.2 pkg-types: 1.1.0 @@ -17299,15 +17487,15 @@ snapshots: unwasm@0.3.9: dependencies: knitwork: 1.1.0 - magic-string: 0.30.11 + magic-string: 0.30.17 mlly: 1.7.0 pathe: 1.1.2 pkg-types: 1.1.0 unplugin: 1.10.1 - update-browserslist-db@1.0.15(browserslist@4.23.0): + update-browserslist-db@1.1.3(browserslist@4.25.1): dependencies: - browserslist: 4.23.0 + browserslist: 4.25.1 escalade: 3.2.0 picocolors: 1.1.1 @@ -17465,39 +17653,42 @@ snapshots: vite-node@1.6.0(@types/node@20.12.10)(terser@5.31.0): dependencies: cac: 6.7.14 - debug: 4.3.7 + debug: 4.4.1 pathe: 1.1.2 picocolors: 1.1.1 - vite: 5.2.11(@types/node@20.12.10)(terser@5.31.0) + vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) transitivePeerDependencies: - '@types/node' - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color - terser - vite-node@2.1.1(@types/node@20.12.10)(terser@5.31.0): + vite-node@3.2.4(@types/node@20.12.10)(terser@5.31.0): dependencies: cac: 6.7.14 - debug: 4.3.7 - pathe: 1.1.2 - vite: 5.2.11(@types/node@20.12.10)(terser@5.31.0) + debug: 4.4.1 + es-module-lexer: 1.7.0 + pathe: 2.0.3 + vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) transitivePeerDependencies: - '@types/node' - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color - terser - vite-plugin-checker@0.6.4(typescript@5.8.3)(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0))(vue-tsc@2.0.16(typescript@5.8.3)): + vite-plugin-checker@0.6.4(typescript@5.8.3)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue-tsc@2.0.16(typescript@5.8.3)): dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.27.1 ansi-escapes: 4.3.2 chalk: 4.1.2 chokidar: 3.6.0 @@ -17508,7 +17699,7 @@ snapshots: semver: 7.6.2 strip-ansi: 6.0.1 tiny-invariant: 1.3.3 - vite: 5.2.11(@types/node@20.12.10)(terser@5.31.0) + vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) vscode-languageclient: 7.0.0 vscode-languageserver: 7.0.0 vscode-languageserver-textdocument: 1.0.11 @@ -17521,7 +17712,7 @@ snapshots: dependencies: '@antfu/utils': 0.7.8 '@rollup/pluginutils': 5.1.0(rollup@4.24.4) - debug: 4.3.7 + debug: 4.4.1 error-stack-parser-es: 0.1.1 fs-extra: 11.2.0 open: 10.1.0 @@ -17537,15 +17728,15 @@ snapshots: vite-plugin-vue-inspector@5.1.0(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)): dependencies: - '@babel/core': 7.24.5 - '@babel/plugin-proposal-decorators': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-syntax-import-attributes': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.5) - '@babel/plugin-transform-typescript': 7.24.5(@babel/core@7.24.5) - '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.5) + '@babel/core': 7.28.0 + '@babel/plugin-proposal-decorators': 7.24.1(@babel/core@7.28.0) + '@babel/plugin-syntax-import-attributes': 7.24.1(@babel/core@7.28.0) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.0) + '@babel/plugin-transform-typescript': 7.24.5(@babel/core@7.28.0) + '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.28.0) '@vue/compiler-dom': 3.5.12 kolorist: 1.8.0 - magic-string: 0.30.11 + magic-string: 0.30.17 vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) transitivePeerDependencies: - supports-color @@ -17620,35 +17811,51 @@ snapshots: - typescript - universal-cookie - vitest@2.1.1(@types/node@20.12.10)(happy-dom@15.7.4)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0): + vitest-browser-react@2.0.0-beta.1(@types/react-dom@18.3.0)(@types/react@18.3.1)(@vitest/browser@3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.8.3))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vitest@3.2.4))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vitest@3.2.4(@types/node@20.12.10)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0)): dependencies: - '@vitest/expect': 2.1.1 - '@vitest/mocker': 2.1.1(msw@2.4.9(typescript@5.8.3))(vite@5.2.11(@types/node@20.12.10)(terser@5.31.0)) - '@vitest/pretty-format': 2.1.1 - '@vitest/runner': 2.1.1 - '@vitest/snapshot': 2.1.1 - '@vitest/spy': 2.1.1 - '@vitest/utils': 2.1.1 - chai: 5.1.1 - debug: 4.3.7 - magic-string: 0.30.11 - pathe: 1.1.2 - std-env: 3.7.0 + '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.8.3))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vitest@3.2.4) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + vitest: 3.2.4(@types/node@20.12.10)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0) + optionalDependencies: + '@types/react': 18.3.1 + '@types/react-dom': 18.3.0 + + vitest@3.2.4(@types/node@20.12.10)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.8.3))(terser@5.31.0): + dependencies: + '@types/chai': 5.2.2 + '@vitest/expect': 3.2.4 + '@vitest/mocker': 3.2.4(msw@2.4.9(typescript@5.8.3))(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)) + '@vitest/pretty-format': 3.2.4 + '@vitest/runner': 3.2.4 + '@vitest/snapshot': 3.2.4 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 + chai: 5.2.1 + debug: 4.4.1 + expect-type: 1.2.2 + magic-string: 0.30.17 + pathe: 2.0.3 + picomatch: 4.0.2 + std-env: 3.9.0 tinybench: 2.9.0 - tinyexec: 0.3.0 - tinypool: 1.0.1 - tinyrainbow: 1.2.0 - vite: 5.2.11(@types/node@20.12.10)(terser@5.31.0) - vite-node: 2.1.1(@types/node@20.12.10)(terser@5.31.0) + tinyexec: 0.3.2 + tinyglobby: 0.2.14 + tinypool: 1.1.1 + tinyrainbow: 2.0.0 + vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) + vite-node: 3.2.4(@types/node@20.12.10)(terser@5.31.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.12.10 - happy-dom: 15.7.4 + '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.8.3))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vitest@3.2.4) + happy-dom: 18.0.1 transitivePeerDependencies: - less - lightningcss - msw - sass + - sass-embedded - stylus - sugarss - supports-color @@ -17763,8 +17970,6 @@ snapshots: webidl-conversions@3.0.1: {} - webidl-conversions@7.0.0: {} - webpack-bundle-analyzer@4.10.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@discoveryjs/json-ext': 0.5.7 @@ -17961,7 +18166,7 @@ snapshots: yocto-queue@0.1.0: {} - yoctocolors@2.0.2: {} + yoctocolors@2.1.1: {} zhead@2.2.4: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index b1f32102e6..e79cca6064 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,11 +7,10 @@ packages: - site catalog: + "@vitejs/plugin-react": "^4.3.3" "@tanstack/query-core": "5.49.1" "@tanstack/react-query": "5.49.2" "@tanstack/vue-query": "5.49.1" - "@testing-library/dom": "10.4.0" - "@testing-library/react": "16.0.1" "@types/react": "18.3.1" "@types/react-dom": "18.3.0" react-dom: "18.3.1" diff --git a/scripts/updateViemVersion.ts b/scripts/updateViemVersion.ts index 5731394bad..f3c5dcfcbe 100644 --- a/scripts/updateViemVersion.ts +++ b/scripts/updateViemVersion.ts @@ -24,7 +24,7 @@ for (const testPath of testPaths) { console.log(testPath) const updatedTestFile = testFile.replace( - /Version: viem@[A-Za-z0-9\-\.]+/g, + /Version: viem@[A-Za-z0-9\-.]+/g, `Version: viem@${viemVersion}`, ) await Bun.write(testPath, updatedTestFile) diff --git a/site/snippets/core/config-chain-properties.ts b/site/snippets/core/config-chain-properties.ts index d9d407cff1..5d322161a7 100644 --- a/site/snippets/core/config-chain-properties.ts +++ b/site/snippets/core/config-chain-properties.ts @@ -1,4 +1,4 @@ -import { http, createConfig } from '@wagmi/core' +import { createConfig, http } from '@wagmi/core' import { base, celo, mainnet } from '@wagmi/core/chains' export const config = createConfig({ diff --git a/site/snippets/core/config.ts b/site/snippets/core/config.ts index 956f6efa06..0bb165ccdf 100644 --- a/site/snippets/core/config.ts +++ b/site/snippets/core/config.ts @@ -1,4 +1,4 @@ -import { http, createConfig } from '@wagmi/core' +import { createConfig, http } from '@wagmi/core' import { mainnet, sepolia } from '@wagmi/core/chains' export const config = createConfig({ diff --git a/site/snippets/react/config-chain-properties.ts b/site/snippets/react/config-chain-properties.ts index 9c71331028..a00545d711 100644 --- a/site/snippets/react/config-chain-properties.ts +++ b/site/snippets/react/config-chain-properties.ts @@ -1,4 +1,4 @@ -import { http, createConfig } from 'wagmi' +import { createConfig, http } from 'wagmi' import { base, celo, mainnet } from 'wagmi/chains' export const config = createConfig({ diff --git a/site/snippets/react/config.ts b/site/snippets/react/config.ts index 9739c926ce..de6c6d021b 100644 --- a/site/snippets/react/config.ts +++ b/site/snippets/react/config.ts @@ -1,4 +1,4 @@ -import { http, createConfig } from 'wagmi' +import { createConfig, http } from 'wagmi' import { mainnet, sepolia } from 'wagmi/chains' export const config = createConfig({ diff --git a/site/snippets/vue/config-chain-properties.ts b/site/snippets/vue/config-chain-properties.ts index 3c3a9bcaff..3ccd8c06e8 100644 --- a/site/snippets/vue/config-chain-properties.ts +++ b/site/snippets/vue/config-chain-properties.ts @@ -1,4 +1,4 @@ -import { http, createConfig } from '@wagmi/vue' +import { createConfig, http } from '@wagmi/vue' import { base, celo, mainnet } from '@wagmi/vue/chains' export const config = createConfig({ diff --git a/site/snippets/vue/config.ts b/site/snippets/vue/config.ts index 558ae12e36..653007e0bb 100644 --- a/site/snippets/vue/config.ts +++ b/site/snippets/vue/config.ts @@ -1,4 +1,4 @@ -import { http, createConfig } from '@wagmi/vue' +import { createConfig, http } from '@wagmi/vue' import { mainnet, sepolia } from '@wagmi/vue/chains' export const config = createConfig({ diff --git a/tsconfig.json b/tsconfig.json index 506583064b..89776c4563 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "extends": "./tsconfig.base.json", - "include": ["scripts/**/*.ts", "vitest.workspace.ts", "vitest.config.ts"], + "include": ["scripts/**/*.ts", "vitest.config.ts"], "exclude": [], "compilerOptions": { - "types": ["@types/bun"] + "types": ["@types/bun", "@vitest/browser/providers/playwright"] } } diff --git a/vitest.config.ts b/vitest.config.ts index c3215d85d4..b4493ef7ec 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,5 +1,18 @@ +import path from 'node:path' +import react from '@vitejs/plugin-react' import { defineConfig } from 'vitest/config' +const alias = { + '@wagmi/connectors': path.resolve( + __dirname, + './packages/connectors/src/exports', + ), + '@wagmi/core': path.resolve(__dirname, './packages/core/src/exports'), + '@wagmi/test': path.resolve(__dirname, './packages/test/src/exports'), + '@wagmi/vue': path.resolve(__dirname, './packages/vue/src/exports'), + wagmi: path.resolve(__dirname, './packages/react/src/exports'), +} + export default defineConfig({ server: { watch: { @@ -22,6 +35,84 @@ export default defineConfig({ ], }, globalSetup: ['./packages/test/src/globalSetup.ts'], + projects: [ + { + test: { + name: '@wagmi/cli', + environment: 'node', + include: ['./packages/cli/src/**/*.test.ts'], + testTimeout: 10_000, + setupFiles: ['./packages/cli/test/setup.ts'], + }, + }, + { + test: { + name: '@wagmi/connectors', + include: ['./packages/connectors/src/**/*.test.ts'], + environment: 'happy-dom', + }, + resolve: { alias }, + }, + { + test: { + name: '@wagmi/core', + include: ['./packages/core/src/**/*.test.ts'], + environment: 'happy-dom', + testTimeout: 10_000, + setupFiles: ['./packages/core/test/setup.ts'], + }, + resolve: { alias }, + }, + { + test: { + name: 'create-wagmi', + include: ['./packages/create-wagmi/src/**/*.test.ts'], + environment: 'node', + testTimeout: 10_000, + }, + }, + { + plugins: [react()], + resolve: { alias }, + test: { + name: 'wagmi', + browser: { + enabled: true, + headless: true, + instances: [{ browser: 'chromium' }], + provider: 'playwright', + screenshotFailures: false, + }, + include: ['./packages/react/src/**/*.test.ts?(x)'], + testTimeout: 10_000, + setupFiles: ['./packages/react/test/setup.ts'], + }, + }, + { + test: { + name: '@wagmi/vue', + include: ['./packages/vue/src/**/*.test.ts?(x)'], + environment: 'happy-dom', + testTimeout: 10_000, + setupFiles: ['./packages/vue/test/setup.ts'], + }, + resolve: { alias }, + }, + { + test: { + name: 'react-register', + include: ['./packages/register-tests/react/src/**/*.test.ts'], + }, + resolve: { alias }, + }, + { + test: { + name: '@wagmi/test', + include: ['./packages/test/src/**/*.test.ts'], + }, + resolve: { alias }, + }, + ], setupFiles: ['./packages/test/src/setup.ts'], }, }) diff --git a/vitest.workspace.ts b/vitest.workspace.ts deleted file mode 100644 index 0c187c0401..0000000000 --- a/vitest.workspace.ts +++ /dev/null @@ -1,85 +0,0 @@ -import path from 'node:path' -import { defineWorkspace } from 'vitest/config' - -const alias = { - '@wagmi/connectors': path.resolve( - __dirname, - './packages/connectors/src/exports', - ), - '@wagmi/core': path.resolve(__dirname, './packages/core/src/exports'), - '@wagmi/test': path.resolve(__dirname, './packages/test/src/exports'), - '@wagmi/vue': path.resolve(__dirname, './packages/vue/src/exports'), - wagmi: path.resolve(__dirname, './packages/react/src/exports'), -} - -export default defineWorkspace([ - { - test: { - name: '@wagmi/cli', - environment: 'node', - include: ['./packages/cli/src/**/*.test.ts'], - testTimeout: 10_000, - setupFiles: ['./packages/cli/test/setup.ts'], - }, - }, - { - test: { - name: '@wagmi/connectors', - include: ['./packages/connectors/src/**/*.test.ts'], - environment: 'happy-dom', - }, - resolve: { alias }, - }, - { - test: { - name: '@wagmi/core', - include: ['./packages/core/src/**/*.test.ts'], - environment: 'happy-dom', - testTimeout: 10_000, - setupFiles: ['./packages/core/test/setup.ts'], - }, - resolve: { alias }, - }, - { - test: { - name: 'create-wagmi', - include: ['./packages/create-wagmi/src/**/*.test.ts'], - environment: 'node', - testTimeout: 10_000, - }, - }, - { - test: { - name: 'wagmi', - include: ['./packages/react/src/**/*.test.ts?(x)'], - environment: 'happy-dom', - testTimeout: 10_000, - setupFiles: ['./packages/react/test/setup.ts'], - }, - resolve: { alias }, - }, - { - test: { - name: '@wagmi/vue', - include: ['./packages/vue/src/**/*.test.ts?(x)'], - environment: 'happy-dom', - testTimeout: 10_000, - setupFiles: ['./packages/vue/test/setup.ts'], - }, - resolve: { alias }, - }, - { - test: { - name: 'react-register', - include: ['./packages/register-tests/react/src/**/*.test.ts'], - }, - resolve: { alias }, - }, - { - test: { - name: '@wagmi/test', - include: ['./packages/test/src/**/*.test.ts'], - }, - resolve: { alias }, - }, -]) From 08c68d39851fea9ed7c7b0a1505f1e5c07df6fe8 Mon Sep 17 00:00:00 2001 From: tmm Date: Wed, 30 Jul 2025 15:44:49 -0400 Subject: [PATCH 045/213] ci: tune gh action permissions (#4749) --- .github/workflows/changesets.yml | 2 ++ .github/workflows/issue-labeled.yml | 2 ++ .github/workflows/lock-issue.yml | 2 ++ .github/workflows/pull-request.yml | 5 +++++ .github/workflows/verify.yml | 6 ++++++ 5 files changed, 17 insertions(+) diff --git a/.github/workflows/changesets.yml b/.github/workflows/changesets.yml index 34e945ddf0..efb7cca350 100644 --- a/.github/workflows/changesets.yml +++ b/.github/workflows/changesets.yml @@ -10,6 +10,8 @@ concurrency: jobs: verify: name: Verify + permissions: + contents: read uses: ./.github/workflows/verify.yml secrets: inherit diff --git a/.github/workflows/issue-labeled.yml b/.github/workflows/issue-labeled.yml index 39b98291d1..78920fc202 100644 --- a/.github/workflows/issue-labeled.yml +++ b/.github/workflows/issue-labeled.yml @@ -1,4 +1,6 @@ name: Issue Labeled +permissions: + issues: write on: issues: diff --git a/.github/workflows/lock-issue.yml b/.github/workflows/lock-issue.yml index 279452d223..3fe9cae114 100644 --- a/.github/workflows/lock-issue.yml +++ b/.github/workflows/lock-issue.yml @@ -1,4 +1,6 @@ name: Lock Issue +permissions: + issues: write on: schedule: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 9ff4c5bb76..7f6e2d187a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -10,11 +10,16 @@ concurrency: jobs: verify: name: Verify + permissions: + contents: read uses: ./.github/workflows/verify.yml secrets: inherit size: name: Size + permissions: + contents: read + pull-requests: write runs-on: ubuntu-latest timeout-minutes: 5 diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index d06333d217..883a0d20c6 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -39,6 +39,8 @@ jobs: build: name: Build + permissions: + contents: read needs: check runs-on: ubuntu-latest timeout-minutes: 5 @@ -61,6 +63,8 @@ jobs: types: name: Types + permissions: + contents: read needs: check runs-on: ubuntu-latest timeout-minutes: 5 @@ -91,6 +95,8 @@ jobs: test: name: Test + permissions: + contents: read runs-on: ubuntu-latest timeout-minutes: 10 strategy: From 5e9c643da8571f3d6cd71d7818d8a0ee0085ef8f Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Wed, 30 Jul 2025 16:24:43 -0400 Subject: [PATCH 046/213] docs: up contributing --- site/dev/contributing.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/site/dev/contributing.md b/site/dev/contributing.md index f5c0d8335a..d8cd5f89ca 100644 --- a/site/dev/contributing.md +++ b/site/dev/contributing.md @@ -103,6 +103,12 @@ curl -L https://foundry.paradigm.xyz | bash foundryup ``` +You'll also need to install [Playwright](https://playwright.dev/) browser binaries: + +```bash +pnpm exec playwright install +``` + Next, make sure you have set up your [env variables](#_4-adding-the-env-variables). Now you are ready to run the tests! You have the following options for running tests: - `pnpm test [package?]` — runs tests in watch mode From 6c53467bd4a73e2b68f613ed6d879f9eb97d86ee Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Wed, 30 Jul 2025 21:48:56 -0400 Subject: [PATCH 047/213] chore: spelling --- packages/core/src/actions/writeContract.ts | 2 +- site/react/api/hooks/useStorageAt.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/actions/writeContract.ts b/packages/core/src/actions/writeContract.ts index 5fb6d87104..3ad323cb78 100644 --- a/packages/core/src/actions/writeContract.ts +++ b/packages/core/src/actions/writeContract.ts @@ -47,7 +47,7 @@ export type WriteContractParameters< > = UnionCompute< { // TODO: Should use `UnionStrictOmit<..., 'chain'>` on `viem_WriteContractParameters` result instead - // temp workaround that doesn't affect runtime behavior for for https://github.com/wevm/wagmi/issues/3981 + // temp workaround that doesn't affect runtime behavior for https://github.com/wevm/wagmi/issues/3981 [key in keyof chains]: viem_WriteContractParameters< abi, functionName, diff --git a/site/react/api/hooks/useStorageAt.md b/site/react/api/hooks/useStorageAt.md index 12c524ac1e..49f332eacb 100644 --- a/site/react/api/hooks/useStorageAt.md +++ b/site/react/api/hooks/useStorageAt.md @@ -13,7 +13,7 @@ const TError = 'GetStorageAtErrorType' # useStorageAt -Hook for for returning the value from a storage slot at a given address. +Hook for returning the value from a storage slot at a given address. ## Import From 79942b2c5f1d051c03e316a14d9a87c704194ebf Mon Sep 17 00:00:00 2001 From: Sasi Date: Thu, 31 Jul 2025 07:24:24 +0530 Subject: [PATCH 048/213] fix: tanstack query link (#4703) * fix: tanstack query link * docs: fix dead link --------- Co-authored-by: Tom Meagher --- site/react/getting-started.md | 2 +- site/vue/getting-started.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/react/getting-started.md b/site/react/getting-started.md index 3e4111cb49..c015cbba1a 100644 --- a/site/react/getting-started.md +++ b/site/react/getting-started.md @@ -163,7 +163,7 @@ function App() { <<< @/snippets/react/config.ts[config.ts] ::: -Check out the [TanStack Query docs](https://tanstack.com/query/latest/docs/framework/react) to learn about the library, APIs, and more. +Check out the [TanStack Query docs](https://tanstack.com/query/latest/docs/framework/react/overview) to learn about the library, APIs, and more. ### Use Wagmi diff --git a/site/vue/getting-started.md b/site/vue/getting-started.md index c36bceab02..75fa241396 100644 --- a/site/vue/getting-started.md +++ b/site/vue/getting-started.md @@ -165,7 +165,7 @@ createApp(App) <<< @/snippets/vue/config.ts[config.ts] ::: -Check out the [TanStack Query docs](https://tanstack.com/query/latest/docs/framework/vue) to learn about the library, APIs, and more. +Check out the [TanStack Query docs](https://tanstack.com/query/latest/docs/framework/vue/overview) to learn about the library, APIs, and more. ### Use Wagmi From 89e45667bcf264c999371a9f9f5910dcfd087fe7 Mon Sep 17 00:00:00 2001 From: mezger75 <110202847+mezger75@users.noreply.github.com> Date: Thu, 31 Jul 2025 04:56:04 +0300 Subject: [PATCH 049/213] Update sendCalls.md (#4677) * Update sendCalls.md Update link to Viem's sendCalls documentation * Apply suggestion from @tmm --------- Co-authored-by: tmm --- site/core/api/actions/sendCalls.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/core/api/actions/sendCalls.md b/site/core/api/actions/sendCalls.md index 8e65890e5e..e209ffb621 100644 --- a/site/core/api/actions/sendCalls.md +++ b/site/core/api/actions/sendCalls.md @@ -220,4 +220,4 @@ import { type SendCallsErrorType } from '@wagmi/core' ## Viem -- [`sendCalls`](https://viem.sh/experimental/eip5792/sendCalls) +- [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls) From c49866724e182920e369193201d1308259c3968e Mon Sep 17 00:00:00 2001 From: Akash Patel <2557058+imaksp@users.noreply.github.com> Date: Thu, 31 Jul 2025 07:29:25 +0530 Subject: [PATCH 050/213] fix: type error for wc/reown project id (#4673) * fix: type error for wc/reown project id see #4659 * add changeset * Apply suggestion from @tmm * Apply suggestion from @tmm --------- Co-authored-by: tmm --- .changeset/shaggy-balloons-hammer.md | 5 +++++ packages/create-wagmi/templates/next/src/wagmi.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/shaggy-balloons-hammer.md diff --git a/.changeset/shaggy-balloons-hammer.md b/.changeset/shaggy-balloons-hammer.md new file mode 100644 index 0000000000..c30d7b0cfe --- /dev/null +++ b/.changeset/shaggy-balloons-hammer.md @@ -0,0 +1,5 @@ +--- +"create-wagmi": patch +--- + +Fixed Next.js template type error diff --git a/packages/create-wagmi/templates/next/src/wagmi.ts b/packages/create-wagmi/templates/next/src/wagmi.ts index 0f97fd88cf..a06ac2f830 100644 --- a/packages/create-wagmi/templates/next/src/wagmi.ts +++ b/packages/create-wagmi/templates/next/src/wagmi.ts @@ -8,7 +8,7 @@ export function getConfig() { connectors: [ injected(), baseAccount(), - walletConnect({ projectId: process.env.NEXT_PUBLIC_WC_PROJECT_ID }), + walletConnect({ projectId: process.env.NEXT_PUBLIC_WC_PROJECT_ID! }), ], storage: createStorage({ storage: cookieStorage, From ec892d10cd7661abf0112fd78c15c5413a10a405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Garc=C3=ADa?= Date: Thu, 31 Jul 2025 04:02:48 +0200 Subject: [PATCH 051/213] Update `writeContracts` and `sendCalls` return types and meaning (#4683) * Update `writeContracts` and `sendCalls` return types and meaning * docs: tweaks --------- Co-authored-by: Tom Meagher --- site/core/api/actions/sendCalls.md | 4 ++-- site/core/api/actions/writeContracts.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/core/api/actions/sendCalls.md b/site/core/api/actions/sendCalls.md index e209ffb621..e1f8530ce9 100644 --- a/site/core/api/actions/sendCalls.md +++ b/site/core/api/actions/sendCalls.md @@ -206,9 +206,9 @@ const id = await sendCalls(config, { import { type SendCallsReturnType } from '@wagmi/core' ``` -`bigint` +`{ id: string; capabilities?: WalletCapabilities | undefined }` -Most recent block number seen. +Identifier of the call batch. ## Error diff --git a/site/core/api/actions/writeContracts.md b/site/core/api/actions/writeContracts.md index a6afe42ff6..b06568fba5 100644 --- a/site/core/api/actions/writeContracts.md +++ b/site/core/api/actions/writeContracts.md @@ -300,9 +300,9 @@ const id = await writeContracts(config, { import { type WriteContractsReturnType } from '@wagmi/core/experimental' ``` -`bigint` +`{ id: string; capabilities?: WalletCapabilities | undefined }` -Most recent block number seen. +Identifier of the call batch. ## Error From 751db3d0979bd0264e5901fb1ba54fcc6f57548d Mon Sep 17 00:00:00 2001 From: Francisco Solla Date: Wed, 30 Jul 2025 23:03:49 -0300 Subject: [PATCH 052/213] docs: Improve useReadContracts page with return type and Tanstack Query import details (#4685) --- site/react/api/hooks/useReadContracts.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/site/react/api/hooks/useReadContracts.md b/site/react/api/hooks/useReadContracts.md index 48436c9362..a5ac591316 100644 --- a/site/react/api/hooks/useReadContracts.md +++ b/site/react/api/hooks/useReadContracts.md @@ -3,6 +3,14 @@ title: useReadContracts description: Hook for calling multiple read methods on a contract. --- + + # useReadContracts Hook for calling multiple read methods on a contract. @@ -389,6 +397,8 @@ import { type UseReadContractsReturnType } from 'wagmi' + + ## Action - [`readContracts`](/core/api/actions/readContracts) From 6514ba29a5acb918773235fed0238d7d679d06d5 Mon Sep 17 00:00:00 2001 From: Ice and dust <138901341+iceanddust@users.noreply.github.com> Date: Wed, 30 Jul 2025 23:10:31 -0300 Subject: [PATCH 053/213] fix: add missing `from` address to the `sendCalls` handler in mock connector (#4704) fix: add `from` address to the `sendCalls` handler in mock connector --- .changeset/modern-ghosts-exercise.md | 5 +++++ packages/core/src/connectors/mock.ts | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/modern-ghosts-exercise.md diff --git a/.changeset/modern-ghosts-exercise.md b/.changeset/modern-ghosts-exercise.md new file mode 100644 index 0000000000..50ac4c1c8e --- /dev/null +++ b/.changeset/modern-ghosts-exercise.md @@ -0,0 +1,5 @@ +--- +"@wagmi/core": patch +--- + +Added missing `from` address to the `wallet_sendCalls` handler in the `mock` connector diff --git a/packages/core/src/connectors/mock.ts b/packages/core/src/connectors/mock.ts index afca227b2f..3f61ac2bbe 100644 --- a/packages/core/src/connectors/mock.ts +++ b/packages/core/src/connectors/mock.ts @@ -208,11 +208,17 @@ export function mock(parameters: MockParameters) { if (method === 'wallet_sendCalls') { const hashes = [] const calls = (params as any)[0].calls + const from = (params as any)[0].from for (const call of calls) { const { result, error } = await rpc.http(url, { body: { method: 'eth_sendTransaction', - params: [call], + params: [ + { + ...call, + ...(typeof from !== 'undefined' ? { from } : {}), + }, + ], }, }) if (error) From c519f9ca41b64913b9ff8bb6babca160752b0214 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Thu, 31 Jul 2025 10:50:30 -0400 Subject: [PATCH 054/213] docs: fix broken links --- site/core/guides/viem.md | 4 ++-- site/react/guides/viem.md | 2 +- site/vue/guides/viem.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/core/guides/viem.md b/site/core/guides/viem.md index 275ed86949..20c9b9b3ea 100644 --- a/site/core/guides/viem.md +++ b/site/core/guides/viem.md @@ -78,7 +78,7 @@ const success = await walletClient.watchAsset(walletClient, /* ... */) // [!code ## Multi-chain Viem Client -The [Viem Client](https://viem.sh/docs/client) provides an interface to interact with an JSON-RPC Provider. By nature, JSON-RPC Providers are single-chain, so the Viem Client is designed to be instantiated with a single `chain`. As a result, setting up Viem to be multi-chain aware can get a bit verbose. +The [Viem Client](https://viem.sh/docs/clients/intro) provides an interface to interact with an JSON-RPC Provider. By nature, JSON-RPC Providers are single-chain, so the Viem Client is designed to be instantiated with a single `chain`. As a result, setting up Viem to be multi-chain aware can get a bit verbose. The good news is that you can create a **"multi-chain Viem Client"** with **Wagmi** by utilizing [`createConfig`](/core/api/createConfig) and [`getClient`](/core/api/actions/getClient). @@ -163,7 +163,7 @@ const hash = await walletClient.mainnet.sendTransaction(/* ... */) ## Private Key & Mnemonic Accounts -It is possible to utilize Viem's [Private Key & Mnemonic Accounts](https://viem.sh/docs/accounts/local.html) with Wagmi by explicitly passing through the account via the `account` argument on Wagmi Actions. +It is possible to utilize Viem's [Private Key & Mnemonic Accounts](https://viem.sh/docs/accounts/local) with Wagmi by explicitly passing through the account via the `account` argument on Wagmi Actions. ```tsx import { http, createConfig, sendTransaction } from '@wagmi/core' diff --git a/site/react/guides/viem.md b/site/react/guides/viem.md index 6539b3fe61..b6a0b312f2 100644 --- a/site/react/guides/viem.md +++ b/site/react/guides/viem.md @@ -114,7 +114,7 @@ function Example() { ## Private Key & Mnemonic Accounts -It is possible to utilize Viem's [Private Key & Mnemonic Accounts](https://viem.sh/docs/accounts/local.html) with Wagmi by explicitly passing through the account via the `account` argument on Wagmi Actions. +It is possible to utilize Viem's [Private Key & Mnemonic Accounts](https://viem.sh/docs/accounts/local) with Wagmi by explicitly passing through the account via the `account` argument on Wagmi Actions. ```tsx import { http, createConfig, useSendTransaction } from 'wagmi' diff --git a/site/vue/guides/viem.md b/site/vue/guides/viem.md index a4b7da32d0..0b31437b77 100644 --- a/site/vue/guides/viem.md +++ b/site/vue/guides/viem.md @@ -64,7 +64,7 @@ const { mutate } = useMutation({ ## Private Key & Mnemonic Accounts -It is possible to utilize Viem's [Private Key & Mnemonic Accounts](https://viem.sh/docs/accounts/local.html) with Wagmi by explicitly passing through the account via the `account` argument on Wagmi Actions. +It is possible to utilize Viem's [Private Key & Mnemonic Accounts](https://viem.sh/docs/accounts/local) with Wagmi by explicitly passing through the account via the `account` argument on Wagmi Actions. ```vue + + \ No newline at end of file diff --git a/site/react/api/connectors/gemini.md b/site/react/api/connectors/gemini.md new file mode 100644 index 0000000000..d3ed6b1d64 --- /dev/null +++ b/site/react/api/connectors/gemini.md @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/site/shared/connectors/gemini.md b/site/shared/connectors/gemini.md new file mode 100644 index 0000000000..806b5a0ee9 --- /dev/null +++ b/site/shared/connectors/gemini.md @@ -0,0 +1,56 @@ +# gemini + +Connector for [Gemini Wallet](https://www.gemini.com/wallet). + +## Import + +```ts-vue +import { gemini } from '{{connectorsPackageName}}' +``` + +## Usage + +```ts-vue{3,7} +import { createConfig, http } from '{{packageName}}' +import { mainnet, sepolia } from '{{packageName}}/chains' +import { gemini } from '{{connectorsPackageName}}' + +export const config = createConfig({ + chains: [mainnet, sepolia], + connectors: [gemini()], + transports: { + [mainnet.id]: http(), + [sepolia.id]: http(), + }, +}) +``` + +## Parameters + +```ts-vue +import { type GeminiParameters } from '{{connectorsPackageName}}' +``` + +### appMetadata + +`AppMetadata | undefined` + +Metadata about your application that will be displayed in the Gemini Wallet interface. + +The `AppMetadata` object can include: + +- `name`: `string` - The name of your application +- `url`: `string` - URL of your application +- `icon`: `string` - URL to your application's icon or logo + +```ts-vue +import { gemini } from '{{connectorsPackageName}}' + +const connector = gemini({ + appMetadata: { // [!code focus] + name: 'My Wagmi App', // [!code focus] + url: 'https://example.com', // [!code focus] + icon: 'https://example.com/favicon.ico', // [!code focus] + }, // [!code focus] +}) +``` \ No newline at end of file diff --git a/site/vue/api/connectors/gemini.md b/site/vue/api/connectors/gemini.md new file mode 100644 index 0000000000..1b9a62a3e2 --- /dev/null +++ b/site/vue/api/connectors/gemini.md @@ -0,0 +1,6 @@ + + + \ No newline at end of file From 878ab9c861fb36a134aace654e2b0bf45f145160 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Sun, 17 Aug 2025 14:45:37 -0400 Subject: [PATCH 068/213] chore: tweaks --- packages/connectors/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 0e813fcf06..ddb415dcce 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -73,4 +73,4 @@ "web3", "abi" ] -} \ No newline at end of file +} From 1edb09f7b69da3d7819d0e070e875e2c6fe8015d Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Mon, 18 Aug 2025 12:55:37 -0400 Subject: [PATCH 069/213] feat(cli): add testnets to routescan --- .changeset/thin-phones-doubt.md | 5 ++ packages/cli/src/plugins/routescan.ts | 98 ++++++++++++++++++++++ scripts/updateBlockExplorerPluginChains.ts | 21 ++--- 3 files changed, 114 insertions(+), 10 deletions(-) create mode 100644 .changeset/thin-phones-doubt.md diff --git a/.changeset/thin-phones-doubt.md b/.changeset/thin-phones-doubt.md new file mode 100644 index 0000000000..55b677810f --- /dev/null +++ b/.changeset/thin-phones-doubt.md @@ -0,0 +1,5 @@ +--- +"@wagmi/cli": minor +--- + +Added testnets to `routescan` plugin diff --git a/packages/cli/src/plugins/routescan.ts b/packages/cli/src/plugins/routescan.ts index 2b22e9f0d5..7714850dc5 100644 --- a/packages/cli/src/plugins/routescan.ts +++ b/packages/cli/src/plugins/routescan.ts @@ -193,12 +193,15 @@ type ChainId = | 1 // Ethereum | 10 // OP Mainnet | 14 // Flare Mainnet + | 16 // Coston | 19 // Songbird Canary + | 114 // Coston2 | 130 // Unichain | 151 // Redbelly | 166 // Omni | 183 // ERN Scan | 185 // Mint + | 233 // ERN Scan | 252 // Fraxtal | 254 // Swan chain | 255 // Kroma @@ -206,34 +209,59 @@ type ChainId = | 291 // Orderly | 303 // WYZth | 324 // zkSync Era + | 335 // DFK | 357 // Pulsar | 369 // Pulse Chain + | 378 // Koroshi | 379 // KOROSHI + | 392 // Nexus | 480 // World Chain + | 919 // Mode + | 987 // Orange | 999 // Hyperliquid EVM | 1088 // Metis | 1135 // Lisk | 1216 // Intersect | 1234 // StepNetwork + | 1301 // Unichain | 1344 // Blitz + | 1687 // Mint Sepolia | 1853 // HighOctane | 1888 // Memoria | 1923 // Swell + | 2037 // Kiwi + | 2038 // Shrapnel | 2044 // Shrapnel + | 2358 // Kroma + | 2522 // Fraxtal | 2786 // Apertum | 2818 // Morph | 3011 // PLAYA3ULL Games + | 3012 // PLAYA3ULL Games + | 3084 // XL Network + | 3278 // Soshi + | 3636 // Botanix | 3637 // Botanix + | 3939 // DOS + | 4202 // Lisk + | 4227 // Hashfire | 4313 // Artery | 4337 // Beam + | 4460 // Orderly + | 4801 // World Chain | 5000 // Mantle + | 5039 // Onigiri | 5040 // Onigiri + | 5115 // Citrea | 5330 // Superseed | 5566 // StraitsX + | 6118 // Uptn | 6119 // UPTN | 6533 // Kalichain | 6900 // Nibiru + | 6911 // Nibiru Testnet-2 | 7171 // Bitrock + | 7210 // Nibiru | 7887 // Kinto | 7979 // DOS | 8008 // Polynomial @@ -246,19 +274,25 @@ type ChainId = | 10507 // Numbers | 10849 // Lamina1 | 10850 // Lamina1 Identity + | 10880 // BloodLoop | 12150 // QChain | 13322 // Fifa Blockchain | 16180 // Plyr + | 17000 // Holesky | 21024 // Tradex | 27827 // Zeroone | 28530 // Blockticity + | 28882 // Boba Sepolia | 33311 // Feature | 34443 // Mode | 42069 // Coqnet | 42161 // Arbitrum One + | 43113 // C-Chain Fuji | 43114 // C-Chain | 43419 // GUNZ + | 49321 // GUNZ | 53935 // DFK + | 55551 // Photon | 56288 // Boba BNB | 57073 // Ink | 61587 // Growth @@ -266,15 +300,79 @@ type ChainId = | 62707 // Teleporter 1 | 68414 // Henesys | 70953 // Teleporter 2 + | 80008 // Polynomial Sepolia + | 80084 // Bartio Testnet + | 80085 // Artio Testnet | 80094 // Berachain | 81457 // Blast | 84358 // Titan + | 84532 // Base Sepolia + | 88882 // Chiliz Spicy | 88888 // Chiliz | 96786 // Delaunch | 167000 // Taiko + | 167008 // Taiko Katla + | 167009 // Taiko Hekla + | 173750 // Echo + | 432201 // Dexalot | 432204 // Dexalot | 504441 // Playdapp | 710420 // Tiltyard + | 779672 // Dispatch | 7777777 // Zora + | 11155111 // Sepolia + | 11155420 // OP Sepolia + | 20241133 // Proxima | 21000000 // Corn + | 168587773 // Blast Sepolia | 333000333 // Meld + | 999999999 // Zora Sepolia + | 164_4 // Omni Omega + | 1946 // Minato + | 2233 // Chainbase + | 153_2 // Redbelly + | 7222 // Nibiru Devnet + | 10888 // GameSwift + | 26659 // Mitosis + | 421614 // Arbitrum Sepolia + | 70805_2 // Cloud + | 7894 // Mintus + | 11227 // Jiritsutes + | 13337 // Beam + | 13576 // Mythgames + | 21816 // Frqtal + | 24010 // Stealthnet + | 47208 // Armada + | 48795 // Space + | 53123 // Metasky + | 53188 // DSRV2 + | 53302 // Superseed + | 54414 // Innovomark + | 55197 // Egmtester + | 56400 // Zeroone + | 59409 // Lifeaiv1 + | 59932 // Insomnia + | 62831 // Plyr + | 69696 // Ceden + | 70800 // Barret + | 76736 // Hiss + | 78170 // MXS Games + | 79554 // Lucid + | 79685 // Modex + | 80069 // Berachain bepolia + | 97433 // Growth + | 124832 // Mitosis + | 132008 // BitcoinL1 + | 210815 // Stavax + | 555666 // Eclipse + | 560048 // Hoodi + | 723107 // Tixchain + | 763373 // Ink + | 11155931 // Rise + | 21000001 // Corn + | 420120000 // Alpha 0 + | 420120001 // Alpha 1 + | 420420421 // Westend + | 9746_4 // Plasma + | 2368 // Kite AI + | 23944 // CX diff --git a/scripts/updateBlockExplorerPluginChains.ts b/scripts/updateBlockExplorerPluginChains.ts index 6cd31d3123..99027cb70c 100644 --- a/scripts/updateBlockExplorerPluginChains.ts +++ b/scripts/updateBlockExplorerPluginChains.ts @@ -44,19 +44,20 @@ let count = 0 { console.log( - 'routescan - https://api.routescan.io/v2/network/mainnet/evm/all/blockchains', + 'routescan - https://api.routescan.io/v2/network/(mainnet|testnet)/evm/all/blockchains', ) - const res = (await fetch( - 'https://api.routescan.io/v2/network/mainnet/evm/all/blockchains', - ).then((res) => res.json())) as { - items: { - name: string - chainId: number - }[] - } + const [res1, res2] = await Promise.all([ + fetch('https://api.routescan.io/v2/network/mainnet/evm/all/blockchains'), + fetch('https://api.routescan.io/v2/network/testnet/evm/all/blockchains'), + ]).then( + async ([res1, res2]) => + [await res1.json(), await res2.json()] as [mainnet: Res, testnet: Res], + ) + type Res = { items: { name: string; chainId: number }[] } + const res = [...res1.items, ...res2.items] let content = 'type ChainId =\n' - const chains = res.items.sort((a, b) => a.chainId - b.chainId) + const chains = res.sort((a, b) => a.chainId - b.chainId) for (const chain of chains) content += ` | ${chain.chainId} // ${chain.name}\n` From 5863c4f59fe040b22076aa25bd5a62efbafcaf30 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 13:02:59 -0400 Subject: [PATCH 070/213] chore: version packages (#4766) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/famous-windows-yawn.md | 5 ----- .changeset/thin-phones-doubt.md | 5 ----- packages/cli/CHANGELOG.md | 6 ++++++ packages/cli/package.json | 2 +- packages/cli/src/version.ts | 2 +- packages/connectors/CHANGELOG.md | 6 ++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/react/CHANGELOG.md | 7 +++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 7 +++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 14 files changed, 34 insertions(+), 18 deletions(-) delete mode 100644 .changeset/famous-windows-yawn.md delete mode 100644 .changeset/thin-phones-doubt.md diff --git a/.changeset/famous-windows-yawn.md b/.changeset/famous-windows-yawn.md deleted file mode 100644 index e1ce4a2bd3..0000000000 --- a/.changeset/famous-windows-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/connectors": patch ---- - -Updated gemini connector diff --git a/.changeset/thin-phones-doubt.md b/.changeset/thin-phones-doubt.md deleted file mode 100644 index 55b677810f..0000000000 --- a/.changeset/thin-phones-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/cli": minor ---- - -Added testnets to `routescan` plugin diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index cb8fd6e1d3..3db119c4cc 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/cli +## 2.5.0 + +### Minor Changes + +- [`1edb09f7b69da3d7819d0e070e875e2c6fe8015d`](https://github.com/wevm/wagmi/commit/1edb09f7b69da3d7819d0e070e875e2c6fe8015d) Thanks [@tmm](https://github.com/tmm)! - Added testnets to `routescan` plugin + ## 2.4.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index c6b0d5414f..582cdd1030 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/cli", "description": "Manage and generate code from Ethereum ABIs", - "version": "2.4.0", + "version": "2.5.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/cli/src/version.ts b/packages/cli/src/version.ts index 851b33853d..e69ed72919 100644 --- a/packages/cli/src/version.ts +++ b/packages/cli/src/version.ts @@ -1 +1 @@ -export const version = '2.4.0' +export const version = '2.5.0' diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 5707c1b1a9..8814ce098e 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/connectors +## 5.9.4 + +### Patch Changes + +- [#4764](https://github.com/wevm/wagmi/pull/4764) [`f4039419b83b52b2984de149db85c11f503ffe39`](https://github.com/wevm/wagmi/commit/f4039419b83b52b2984de149db85c11f503ffe39) Thanks [@mikelxc](https://github.com/mikelxc)! - Updated gemini connector + ## 5.9.3 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index ddb415dcce..8a32ea643a 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "5.9.3", + "version": "5.9.4", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index 8f41710e3f..55dc5ccf40 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '5.9.3' +export const version = '5.9.4' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index dd82df5ee2..5408d5d5c3 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,12 @@ # wagmi +## 2.16.4 + +### Patch Changes + +- Updated dependencies [[`f4039419b83b52b2984de149db85c11f503ffe39`](https://github.com/wevm/wagmi/commit/f4039419b83b52b2984de149db85c11f503ffe39)]: + - @wagmi/connectors@5.9.4 + ## 2.16.3 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 2423379167..b8939ee075 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.16.3", + "version": "2.16.4", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index b49a66c41d..b551a91d6e 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.16.3' +export const version = '2.16.4' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index e10a7ab26d..8f9b6d9ca5 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/vue +## 0.1.28 + +### Patch Changes + +- Updated dependencies [[`f4039419b83b52b2984de149db85c11f503ffe39`](https://github.com/wevm/wagmi/commit/f4039419b83b52b2984de149db85c11f503ffe39)]: + - @wagmi/connectors@5.9.4 + ## 0.1.27 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index 7675e3d075..e73ed140bc 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.1.27", + "version": "0.1.28", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index 23c793369f..cd8e2a6bc1 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.1.27' +export const version = '0.1.28' From b45985655072508b6909eb9e025c81afe5132004 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Mon, 18 Aug 2025 21:35:38 -0400 Subject: [PATCH 071/213] chore: add sponsor --- .github/README.md | 6 ++++++ site/.vitepress/theme/composables/useSponsors.ts | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/.github/README.md b/.github/README.md index 6b5f336419..e702185468 100644 --- a/.github/README.md +++ b/.github/README.md @@ -239,6 +239,12 @@ If you find Wagmi useful or use it for work, please consider [sponsoring Wagmi]( sequence logo + + + + gemini logo + +

[Sponsor Wagmi](https://github.com/sponsors/wevm?metadata_campaign=gh_readme_support_bottom) diff --git a/site/.vitepress/theme/composables/useSponsors.ts b/site/.vitepress/theme/composables/useSponsors.ts index 571a2b7df6..8dd3aca3a9 100644 --- a/site/.vitepress/theme/composables/useSponsors.ts +++ b/site/.vitepress/theme/composables/useSponsors.ts @@ -61,6 +61,11 @@ export function useSponsors() { url: 'https://routescan.io', img: 'routescan-light.svg', }, + { + name: 'Gemini', + url: 'https://gemini.com', + img: 'gemini-light.svg', + }, ], silver: [ { From 23bad767c5055f54d2a5a5179830e078282fa00f Mon Sep 17 00:00:00 2001 From: microHoffman <61500778+microHoffman@users.noreply.github.com> Date: Wed, 20 Aug 2025 01:48:00 +0200 Subject: [PATCH 072/213] feat: add nuxt 4 support for wagmi nuxt module (#4737) * feat: add nuxt 4 support for wagmi nuxt module * chore: changeset --------- Co-authored-by: Tom Meagher --- .changeset/pretty-phones-tie.md | 5 + packages/vue/package.json | 6 +- packages/vue/src/nuxt/module.ts | 2 +- pnpm-lock.yaml | 354 ++++++-------------------------- 4 files changed, 73 insertions(+), 294 deletions(-) create mode 100644 .changeset/pretty-phones-tie.md diff --git a/.changeset/pretty-phones-tie.md b/.changeset/pretty-phones-tie.md new file mode 100644 index 0000000000..6bc9d0c192 --- /dev/null +++ b/.changeset/pretty-phones-tie.md @@ -0,0 +1,5 @@ +--- +"@wagmi/vue": minor +--- + +Added support for Nuxt 4. diff --git a/packages/vue/package.json b/packages/vue/package.json index e73ed140bc..110b6bb0d2 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -84,7 +84,7 @@ }, "peerDependencies": { "@tanstack/vue-query": ">=5.0.0", - "nuxt": ">=3.0.0", + "nuxt": ">=3.0.0 || >=4.0.0", "typescript": ">=5.0.4", "viem": "2.x", "vue": ">=3" @@ -102,10 +102,10 @@ "@wagmi/core": "workspace:*" }, "devDependencies": { - "@nuxt/schema": "^3.11.2", + "@nuxt/schema": "^3.11.2 || ^4.0.0", "@tanstack/vue-query": "catalog:", "@vue/test-utils": "^2.4.6", - "nuxt": "^3.11.2", + "nuxt": "^3.11.2 || ^4.0.0", "vue": "catalog:" }, "contributors": [ diff --git a/packages/vue/src/nuxt/module.ts b/packages/vue/src/nuxt/module.ts index f774702088..1ad06a07a2 100644 --- a/packages/vue/src/nuxt/module.ts +++ b/packages/vue/src/nuxt/module.ts @@ -10,7 +10,7 @@ export const wagmiModule: NuxtModule = name: '@wagmi/vue', configKey: 'wagmi', compatibility: { - nuxt: '^3.0.0', + nuxt: '^3.0.0 || ^4.0.0', }, }, setup(_options, nuxt) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f4230dda03..a8b89f707c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -366,7 +366,7 @@ importers: version: link:../core devDependencies: '@nuxt/schema': - specifier: ^3.11.2 + specifier: ^3.11.2 || ^4.0.0 version: 3.11.2(rollup@4.24.4) '@tanstack/vue-query': specifier: 'catalog:' @@ -375,7 +375,7 @@ importers: specifier: ^2.4.6 version: 2.4.6 nuxt: - specifier: ^3.11.2 + specifier: ^3.11.2 || ^4.0.0 version: 3.11.2(@opentelemetry/api@1.8.0)(@parcel/watcher@2.4.1)(@types/node@20.12.10)(@unocss/reset@0.59.4)(bufferutil@4.0.8)(change-case@5.4.4)(encoding@0.1.13)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.24.4))(vue@3.4.27(typescript@5.9.2)))(idb-keyval@6.2.1)(ioredis@5.3.2)(qrcode@1.5.3)(rollup@4.24.4)(terser@5.31.0)(typescript@5.9.2)(unocss@0.59.4(rollup@4.24.4)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)))(utf-8-validate@5.0.10)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue-tsc@2.0.16(typescript@5.9.2)) vue: specifier: 'catalog:' @@ -712,9 +712,6 @@ packages: '@antfu/install-pkg@0.1.1': resolution: {integrity: sha512-LyB/8+bSfa0DFGC06zpCEfs89/XoWZwws5ygEa5D+Xsm3OfI+aXQ86VgVG7Acyef+rSZ5HE7J8rrxzrQeM3PjQ==} - '@antfu/utils@0.7.7': - resolution: {integrity: sha512-gFPqTG7otEJ8uP6wrhDv6mqwGWYZKNvAcCq6u9hOj0c+IKCEsY4L1oC9trPq2SaWIzAfHvqfBDxF591JkMf+kg==} - '@antfu/utils@0.7.8': resolution: {integrity: sha512-rWQkqXRESdjXtc+7NRfK9lASQjpXJu1ayp7qi1d23zZorY+wBHVLHHoVcMsEnkqEBWTFqbztO7/QdJFzyEcLTg==} @@ -927,10 +924,6 @@ packages: resolution: {integrity: sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==} engines: {node: '>=6.9.0'} - '@babel/types@7.24.5': - resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==} - engines: {node: '>=6.9.0'} - '@babel/types@7.28.1': resolution: {integrity: sha512-x0LvFTekgSX+83TI28Y9wYPUfzrnl2aT5+5QLnO6v7mSJYtEEevuDRN0F0uSHRk1G1IWZC43o00Y0xDDrpBGPQ==} engines: {node: '>=6.9.0'} @@ -1679,9 +1672,6 @@ packages: '@jridgewell/source-map@0.3.6': resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} - '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} @@ -3834,9 +3824,6 @@ packages: bindings@1.5.0: resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - birpc@0.2.17: - resolution: {integrity: sha512-+hkTxhot+dWsLpp3gia5AkVHIsKlZybNT5gIYiDlNzJrmYPcTM9k5/w2uaj3IPpd7LlEYpmCj4Jj1nC41VhDFg==} - birpc@0.2.19: resolution: {integrity: sha512-5WeXXAvTmitV1RqJFppT5QtUiz2p1mRSYU000Jkft5ZUCLJIk4uQriYNO50HknxKwM6jd8utNc66K1qGIwwWBQ==} @@ -4598,10 +4585,6 @@ packages: resolution: {integrity: sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw==} engines: {node: '>=10.0.0'} - enhanced-resolve@5.16.1: - resolution: {integrity: sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==} - engines: {node: '>=10.13.0'} - enhanced-resolve@5.17.1: resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} @@ -4862,9 +4845,6 @@ packages: '@nuxt/kit': optional: true - focus-trap@7.5.4: - resolution: {integrity: sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==} - focus-trap@7.6.0: resolution: {integrity: sha512-1td0l3pMkWJLFipobUcGaf+5DTY4PLDDrcqoSaKP8ediO/CoWCCYk/fT/Y2A4e6TNB+Sh6clRJCjOPPnKoNHnQ==} @@ -5510,9 +5490,6 @@ packages: engines: {node: '>=6'} hasBin: true - jsonc-parser@3.2.0: - resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} - jsonfile@2.4.0: resolution: {integrity: sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==} @@ -5675,9 +5652,6 @@ packages: resolution: {integrity: sha512-mxjxZ5zoR4+ybulZ7Z5qdZUTdAfiKJ1Il80kN/I4jWsHTTqNKZ9KsBa3Jepo+3U09I04qiyC2+7MZD8v4rJOoA==} engines: {node: '>=16.14.0'} - magic-string@0.30.10: - resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} - magic-string@0.30.12: resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} @@ -5966,9 +5940,6 @@ packages: engines: {node: '>=10'} hasBin: true - mlly@1.4.2: - resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} - mlly@1.7.0: resolution: {integrity: sha512-U9SDaXGEREBYQgfejV97coK0UL1r+qnF2SyO9A3qcI8MzKnsIFKHNVEkrDyNncQTKQQumsasmeq84eNMdBfsNQ==} @@ -6523,12 +6494,6 @@ packages: resolution: {integrity: sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==} hasBin: true - pkg-types@1.0.3: - resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} - - pkg-types@1.1.0: - resolution: {integrity: sha512-/RpmvKdxKf8uILTtoOhAgf30wYbP2Qw+L9p3Rvshx1JZVX+XQNZQFjlbmGHEGIm4CkVPlSn+NXmIM8+9oWQaSA==} - pkg-types@1.1.1: resolution: {integrity: sha512-ko14TjmDuQJ14zsotODv7dBlwxKhUKQEhuhmbqo1uCi9BB0Z2alo/wAXg6q1dTR5TyuqYyWhjtfe/Tsh+X28jQ==} @@ -6973,9 +6938,6 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rfdc@1.3.1: - resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} - rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} @@ -7558,10 +7520,6 @@ packages: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} - to-fast-properties@2.0.0: - resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} - engines: {node: '>=4'} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -7646,9 +7604,6 @@ packages: engines: {node: '>=14.17'} hasBin: true - ufo@1.3.2: - resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==} - ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} @@ -8329,18 +8284,6 @@ packages: utf-8-validate: optional: true - ws@8.18.1: - resolution: {integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - ws@8.18.2: resolution: {integrity: sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==} engines: {node: '>=10.0.0'} @@ -8607,8 +8550,6 @@ snapshots: execa: 5.1.1 find-up: 5.0.0 - '@antfu/utils@0.7.7': {} - '@antfu/utils@0.7.8': {} '@arethetypeswrong/cli@0.16.4': @@ -8704,19 +8645,6 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.24.5(@babel/core@7.24.5)': - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-member-expression-to-functions': 7.24.5 - '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.5) - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/helper-split-export-declaration': 7.24.5 - semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.24.5(@babel/core@7.28.0)': dependencies: '@babel/core': 7.28.0 @@ -8778,13 +8706,6 @@ snapshots: '@babel/helper-plugin-utils@7.27.1': {} - '@babel/helper-replace-supers@7.24.1(@babel/core@7.24.5)': - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-member-expression-to-functions': 7.24.5 - '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers@7.24.1(@babel/core@7.28.0)': dependencies: '@babel/core': 7.28.0 @@ -8848,21 +8769,11 @@ snapshots: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.24.5)': - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.28.0)': dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.24.5)': - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.28.0)': dependencies: '@babel/core': 7.28.0 @@ -8887,14 +8798,6 @@ snapshots: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-typescript@7.24.5(@babel/core@7.24.5)': - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-typescript@7.24.5(@babel/core@7.28.0)': dependencies: '@babel/core': 7.28.0 @@ -8938,12 +8841,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/types@7.24.5': - dependencies: - '@babel/helper-string-parser': 7.27.1 - '@babel/helper-validator-identifier': 7.27.1 - to-fast-properties: 2.0.0 - '@babel/types@7.28.1': dependencies: '@babel/helper-string-parser': 7.27.1 @@ -9638,7 +9535,7 @@ snapshots: '@iconify/utils@2.1.23': dependencies: '@antfu/install-pkg': 0.1.1 - '@antfu/utils': 0.7.7 + '@antfu/utils': 0.7.8 '@iconify/types': 2.0.0 debug: 4.4.1 kolorist: 1.8.0 @@ -9701,8 +9598,6 @@ snapshots: '@jridgewell/gen-mapping': 0.3.12 '@jridgewell/trace-mapping': 0.3.29 - '@jridgewell/sourcemap-codec@1.4.15': {} - '@jridgewell/sourcemap-codec@1.5.0': {} '@jridgewell/trace-mapping@0.3.29': @@ -9935,7 +9830,7 @@ snapshots: '@open-draft/logger': 0.3.0 '@open-draft/until': 2.1.0 is-node-process: 1.2.0 - outvariant: 1.4.2 + outvariant: 1.4.3 strict-event-emitter: 0.5.1 '@mswjs/interceptors@0.35.9': @@ -10260,8 +10155,8 @@ snapshots: '@nuxt/kit': 3.11.2(rollup@4.24.4) '@vue/devtools-applet': 7.1.3(@unocss/reset@0.59.4)(change-case@5.4.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.24.4))(vue@3.4.27(typescript@5.9.2)))(idb-keyval@6.2.1)(qrcode@1.5.3)(unocss@0.59.4(rollup@4.24.4)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)))(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.9.2)) '@vue/devtools-core': 7.1.3(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.9.2)) - '@vue/devtools-kit': 7.1.3(vue@3.5.12(typescript@5.9.2)) - birpc: 0.2.17 + '@vue/devtools-kit': 7.6.2 + birpc: 0.2.19 consola: 3.2.3 cronstrue: 2.50.0 destr: 2.0.3 @@ -10293,7 +10188,7 @@ snapshots: vite-plugin-inspect: 0.8.4(@nuxt/kit@3.11.2(rollup@4.24.4))(rollup@4.24.4)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)) vite-plugin-vue-inspector: 5.1.0(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)) which: 3.0.1 - ws: 8.18.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - '@unocss/reset' - '@vue/composition-api' @@ -10326,7 +10221,7 @@ snapshots: globby: 14.0.1 hash-sum: 2.0.0 ignore: 5.3.1 - jiti: 1.21.0 + jiti: 1.21.6 knitwork: 1.1.0 mlly: 1.7.0 pathe: 1.1.2 @@ -10369,7 +10264,7 @@ snapshots: dotenv: 16.4.5 git-url-parse: 14.0.0 is-docker: 3.0.0 - jiti: 1.21.0 + jiti: 1.21.6 mri: 1.2.0 nanoid: 5.0.7 ofetch: 1.3.4 @@ -10387,7 +10282,7 @@ snapshots: dependencies: '@nuxt/kit': 3.11.2(rollup@4.24.4) '@rollup/plugin-replace': 5.0.5(rollup@4.24.4) - '@vitejs/plugin-vue': 5.0.4(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.9.2)) + '@vitejs/plugin-vue': 5.1.4(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.9.2)) '@vitejs/plugin-vue-jsx': 3.1.0(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.9.2)) autoprefixer: 10.4.19(postcss@8.4.47) clear: 0.1.0 @@ -10835,54 +10730,47 @@ snapshots: '@rolldown/pluginutils@1.0.0-beta.27': {} - '@rollup/plugin-alias@5.1.0(rollup@4.17.2)': + '@rollup/plugin-alias@5.1.0(rollup@4.24.4)': dependencies: slash: 4.0.0 optionalDependencies: - rollup: 4.17.2 + rollup: 4.24.4 - '@rollup/plugin-commonjs@25.0.7(rollup@4.17.2)': + '@rollup/plugin-commonjs@25.0.7(rollup@4.24.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@rollup/pluginutils': 5.1.0(rollup@4.24.4) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.30.17 optionalDependencies: - rollup: 4.17.2 + rollup: 4.24.4 - '@rollup/plugin-inject@5.0.5(rollup@4.17.2)': + '@rollup/plugin-inject@5.0.5(rollup@4.24.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@rollup/pluginutils': 5.1.0(rollup@4.24.4) estree-walker: 2.0.2 magic-string: 0.30.17 optionalDependencies: - rollup: 4.17.2 + rollup: 4.24.4 - '@rollup/plugin-json@6.1.0(rollup@4.17.2)': + '@rollup/plugin-json@6.1.0(rollup@4.24.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@rollup/pluginutils': 5.1.0(rollup@4.24.4) optionalDependencies: - rollup: 4.17.2 + rollup: 4.24.4 - '@rollup/plugin-node-resolve@15.2.3(rollup@4.17.2)': + '@rollup/plugin-node-resolve@15.2.3(rollup@4.24.4)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@rollup/pluginutils': 5.1.0(rollup@4.24.4) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.8 optionalDependencies: - rollup: 4.17.2 - - '@rollup/plugin-replace@5.0.5(rollup@4.17.2)': - dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) - magic-string: 0.30.17 - optionalDependencies: - rollup: 4.17.2 + rollup: 4.24.4 '@rollup/plugin-replace@5.0.5(rollup@4.24.4)': dependencies: @@ -10891,30 +10779,22 @@ snapshots: optionalDependencies: rollup: 4.24.4 - '@rollup/plugin-terser@0.4.4(rollup@4.17.2)': + '@rollup/plugin-terser@0.4.4(rollup@4.24.4)': dependencies: serialize-javascript: 6.0.2 smob: 1.5.0 terser: 5.31.0 optionalDependencies: - rollup: 4.17.2 + rollup: 4.24.4 '@rollup/pluginutils@4.2.1': dependencies: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/pluginutils@5.1.0(rollup@4.17.2)': - dependencies: - '@types/estree': 1.0.5 - estree-walker: 2.0.2 - picomatch: 2.3.1 - optionalDependencies: - rollup: 4.17.2 - '@rollup/pluginutils@5.1.0(rollup@4.24.4)': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: @@ -11724,9 +11604,9 @@ snapshots: '@vitejs/plugin-vue-jsx@3.1.0(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.9.2))': dependencies: - '@babel/core': 7.24.5 - '@babel/plugin-transform-typescript': 7.24.5(@babel/core@7.24.5) - '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.5) + '@babel/core': 7.28.0 + '@babel/plugin-transform-typescript': 7.24.5(@babel/core@7.28.0) + '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.28.0) vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) vue: 3.5.12(typescript@5.9.2) transitivePeerDependencies: @@ -11737,11 +11617,6 @@ snapshots: vite: 5.2.11(@types/node@20.12.10)(terser@5.31.0) vue: 3.4.27(typescript@5.9.2) - '@vitejs/plugin-vue@5.0.4(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.9.2))': - dependencies: - vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) - vue: 3.5.12(typescript@5.9.2) - '@vitejs/plugin-vue@5.1.4(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.9.2))': dependencies: vite: 5.4.10(@types/node@20.12.10)(terser@5.31.0) @@ -11864,24 +11739,6 @@ snapshots: '@vue/babel-helper-vue-transform-on@1.2.2': {} - '@vue/babel-plugin-jsx@1.2.2(@babel/core@7.24.5)': - dependencies: - '@babel/helper-module-imports': 7.22.15 - '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.5) - '@babel/template': 7.27.2 - '@babel/traverse': 7.28.0 - '@babel/types': 7.28.1 - '@vue/babel-helper-vue-transform-on': 1.2.2 - '@vue/babel-plugin-resolve-type': 1.2.2(@babel/core@7.24.5) - camelcase: 6.3.0 - html-tags: 3.3.1 - svg-tags: 1.0.0 - optionalDependencies: - '@babel/core': 7.24.5 - transitivePeerDependencies: - - supports-color - '@vue/babel-plugin-jsx@1.2.2(@babel/core@7.28.0)': dependencies: '@babel/helper-module-imports': 7.22.15 @@ -11900,15 +11757,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@vue/babel-plugin-resolve-type@1.2.2(@babel/core@7.24.5)': - dependencies: - '@babel/code-frame': 7.27.1 - '@babel/core': 7.24.5 - '@babel/helper-module-imports': 7.22.15 - '@babel/helper-plugin-utils': 7.27.1 - '@babel/parser': 7.28.0 - '@vue/compiler-sfc': 3.5.12 - '@vue/babel-plugin-resolve-type@1.2.2(@babel/core@7.28.0)': dependencies: '@babel/code-frame': 7.27.1 @@ -11992,8 +11840,8 @@ snapshots: '@vue/devtools-applet@7.1.3(@unocss/reset@0.59.4)(change-case@5.4.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.24.4))(vue@3.4.27(typescript@5.9.2)))(idb-keyval@6.2.1)(qrcode@1.5.3)(unocss@0.59.4(rollup@4.24.4)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)))(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.9.2))': dependencies: '@vue/devtools-core': 7.1.3(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0))(vue@3.5.12(typescript@5.9.2)) - '@vue/devtools-kit': 7.1.3(vue@3.5.12(typescript@5.9.2)) - '@vue/devtools-shared': 7.1.3 + '@vue/devtools-kit': 7.6.2 + '@vue/devtools-shared': 7.6.2 '@vue/devtools-ui': 7.1.3(@unocss/reset@0.59.4)(change-case@5.4.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.24.4))(vue@3.4.27(typescript@5.9.2)))(idb-keyval@6.2.1)(qrcode@1.5.3)(unocss@0.59.4(rollup@4.24.4)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)))(vue@3.5.12(typescript@5.9.2)) lodash-es: 4.17.21 perfect-debounce: 1.0.0 @@ -12052,7 +11900,7 @@ snapshots: '@vue/devtools-shared@7.1.3': dependencies: - rfdc: 1.3.1 + rfdc: 1.4.1 '@vue/devtools-shared@7.6.2': dependencies: @@ -12064,10 +11912,10 @@ snapshots: '@vue/devtools-shared': 7.1.3 '@vueuse/components': 10.9.0(vue@3.5.12(typescript@5.9.2)) '@vueuse/core': 10.9.0(vue@3.5.12(typescript@5.9.2)) - '@vueuse/integrations': 10.9.0(change-case@5.4.4)(focus-trap@7.5.4)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.12(typescript@5.9.2)) + '@vueuse/integrations': 10.9.0(change-case@5.4.4)(focus-trap@7.6.0)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.12(typescript@5.9.2)) colord: 2.9.3 floating-vue: 5.2.2(@nuxt/kit@3.11.2(rollup@4.24.4))(vue@3.4.27(typescript@5.9.2)) - focus-trap: 7.5.4 + focus-trap: 7.6.0 unocss: 0.59.4(rollup@4.24.4)(vite@5.4.10(@types/node@20.12.10)(terser@5.31.0)) vue: 3.5.12(typescript@5.9.2) transitivePeerDependencies: @@ -12190,14 +12038,14 @@ snapshots: - '@vue/composition-api' - vue - '@vueuse/integrations@10.9.0(change-case@5.4.4)(focus-trap@7.5.4)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.12(typescript@5.9.2))': + '@vueuse/integrations@10.9.0(change-case@5.4.4)(focus-trap@7.6.0)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.12(typescript@5.9.2))': dependencies: '@vueuse/core': 10.9.0(vue@3.5.12(typescript@5.9.2)) '@vueuse/shared': 10.9.0(vue@3.5.12(typescript@5.9.2)) vue-demi: 0.14.10(vue@3.5.12(typescript@5.9.2)) optionalDependencies: change-case: 5.4.4 - focus-trap: 7.5.4 + focus-trap: 7.6.0 idb-keyval: 6.2.1 qrcode: 1.5.3 transitivePeerDependencies: @@ -12959,8 +12807,6 @@ snapshots: dependencies: file-uri-to-path: 1.0.0 - birpc@0.2.17: {} - birpc@0.2.19: {} blakejs@1.2.1: {} @@ -13086,7 +12932,7 @@ snapshots: defu: 6.1.4 dotenv: 16.4.5 giget: 1.2.3 - jiti: 1.21.0 + jiti: 1.21.6 mlly: 1.7.0 ohash: 1.1.3 pathe: 1.1.2 @@ -13729,11 +13575,6 @@ snapshots: engine.io-parser@5.2.2: {} - enhanced-resolve@5.16.1: - dependencies: - graceful-fs: 4.2.11 - tapable: 2.2.1 - enhanced-resolve@5.17.1: dependencies: graceful-fs: 4.2.11 @@ -13853,7 +13694,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 etag@1.8.1: {} @@ -14021,7 +13862,7 @@ snapshots: externality@1.0.2: dependencies: - enhanced-resolve: 5.16.1 + enhanced-resolve: 5.17.1 mlly: 1.7.0 pathe: 1.1.2 ufo: 1.5.3 @@ -14111,10 +13952,6 @@ snapshots: optionalDependencies: '@nuxt/kit': 3.11.2(rollup@4.24.4) - focus-trap@7.5.4: - dependencies: - tabbable: 6.2.0 - focus-trap@7.6.0: dependencies: tabbable: 6.2.0 @@ -14807,8 +14644,6 @@ snapshots: json5@2.2.3: {} - jsonc-parser@3.2.0: {} - jsonfile@2.4.0: optionalDependencies: graceful-fs: 4.2.11 @@ -14922,8 +14757,8 @@ snapshots: local-pkg@0.5.0: dependencies: - mlly: 1.4.2 - pkg-types: 1.0.3 + mlly: 1.7.0 + pkg-types: 1.1.1 locate-path@2.0.0: dependencies: @@ -14994,10 +14829,6 @@ snapshots: dependencies: magic-string: 0.30.17 - magic-string@0.30.10: - dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - magic-string@0.30.12: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -15430,18 +15261,11 @@ snapshots: mkdirp@3.0.1: {} - mlly@1.4.2: - dependencies: - acorn: 8.10.0 - pathe: 1.1.2 - pkg-types: 1.0.3 - ufo: 1.3.2 - mlly@1.7.0: dependencies: acorn: 8.11.3 pathe: 1.1.2 - pkg-types: 1.1.0 + pkg-types: 1.1.1 ufo: 1.5.3 mnemonist@0.38.5: @@ -15560,14 +15384,14 @@ snapshots: dependencies: '@cloudflare/kv-asset-handler': 0.3.2 '@netlify/functions': 2.6.3(@opentelemetry/api@1.8.0) - '@rollup/plugin-alias': 5.1.0(rollup@4.17.2) - '@rollup/plugin-commonjs': 25.0.7(rollup@4.17.2) - '@rollup/plugin-inject': 5.0.5(rollup@4.17.2) - '@rollup/plugin-json': 6.1.0(rollup@4.17.2) - '@rollup/plugin-node-resolve': 15.2.3(rollup@4.17.2) - '@rollup/plugin-replace': 5.0.5(rollup@4.17.2) - '@rollup/plugin-terser': 0.4.4(rollup@4.17.2) - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@rollup/plugin-alias': 5.1.0(rollup@4.24.4) + '@rollup/plugin-commonjs': 25.0.7(rollup@4.24.4) + '@rollup/plugin-inject': 5.0.5(rollup@4.24.4) + '@rollup/plugin-json': 6.1.0(rollup@4.24.4) + '@rollup/plugin-node-resolve': 15.2.3(rollup@4.24.4) + '@rollup/plugin-replace': 5.0.5(rollup@4.24.4) + '@rollup/plugin-terser': 0.4.4(rollup@4.24.4) + '@rollup/pluginutils': 5.1.0(rollup@4.24.4) '@types/http-proxy': 1.17.14 '@vercel/nft': 0.26.5(encoding@0.1.13) archiver: 7.0.1 @@ -15594,7 +15418,7 @@ snapshots: httpxy: 0.1.5 ioredis: 5.3.2 is-primitive: 3.0.1 - jiti: 1.21.0 + jiti: 1.21.6 klona: 2.0.6 knitwork: 1.1.0 listhen: 1.7.2 @@ -15611,8 +15435,8 @@ snapshots: pkg-types: 1.1.1 pretty-bytes: 6.1.1 radix3: 1.1.2 - rollup: 4.17.2 - rollup-plugin-visualizer: 5.12.0(rollup@4.17.2) + rollup: 4.24.4 + rollup-plugin-visualizer: 5.12.0(rollup@4.24.4) scule: 1.3.0 semver: 7.6.2 serve-placeholder: 2.0.1 @@ -15622,7 +15446,7 @@ snapshots: uncrypto: 0.1.3 unctx: 2.3.1 unenv: 1.9.0 - unimport: 3.7.1(rollup@4.17.2) + unimport: 3.7.1(rollup@4.24.4) unstorage: 1.10.2(idb-keyval@6.2.1)(ioredis@5.3.2) unwasm: 0.3.9 transitivePeerDependencies: @@ -15811,7 +15635,7 @@ snapshots: '@unhead/dom': 1.9.10 '@unhead/ssr': 1.9.10 '@unhead/vue': 1.9.10(vue@3.5.12(typescript@5.9.2)) - '@vue/shared': 3.4.27 + '@vue/shared': 3.5.12 acorn: 8.11.3 c12: 1.10.0 chokidar: 3.6.0 @@ -15826,10 +15650,10 @@ snapshots: globby: 14.0.1 h3: 1.11.1 hookable: 5.5.3 - jiti: 1.21.0 + jiti: 1.21.6 klona: 2.0.6 knitwork: 1.1.0 - magic-string: 0.30.10 + magic-string: 0.30.12 mlly: 1.7.0 nitropack: 2.9.6(@opentelemetry/api@1.8.0)(encoding@0.1.13)(idb-keyval@6.2.1) nuxi: 3.11.1 @@ -16238,18 +16062,6 @@ snapshots: sonic-boom: 2.8.0 thread-stream: 0.15.2 - pkg-types@1.0.3: - dependencies: - jsonc-parser: 3.2.0 - mlly: 1.4.2 - pathe: 1.1.2 - - pkg-types@1.1.0: - dependencies: - confbox: 0.1.7 - mlly: 1.7.0 - pathe: 1.1.2 - pkg-types@1.1.1: dependencies: confbox: 0.1.7 @@ -16659,8 +16471,6 @@ snapshots: reusify@1.0.4: {} - rfdc@1.3.1: {} - rfdc@1.4.1: {} rimraf@2.7.1: @@ -16680,15 +16490,6 @@ snapshots: dependencies: bn.js: 5.2.1 - rollup-plugin-visualizer@5.12.0(rollup@4.17.2): - dependencies: - open: 8.4.2 - picomatch: 2.3.1 - source-map: 0.7.4 - yargs: 17.7.2 - optionalDependencies: - rollup: 4.17.2 - rollup-plugin-visualizer@5.12.0(rollup@4.24.4): dependencies: open: 8.4.2 @@ -17285,8 +17086,6 @@ snapshots: dependencies: os-tmpdir: 1.0.2 - to-fast-properties@2.0.0: {} - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -17357,8 +17156,6 @@ snapshots: typescript@5.9.2: {} - ufo@1.3.2: {} - ufo@1.5.3: {} uint8arrays@3.1.0: @@ -17373,9 +17170,9 @@ snapshots: unconfig@0.3.13: dependencies: - '@antfu/utils': 0.7.7 + '@antfu/utils': 0.7.8 defu: 6.1.4 - jiti: 1.21.0 + jiti: 1.21.6 uncrypto@0.1.3: {} @@ -17413,24 +17210,6 @@ snapshots: unicorn-magic@0.3.0: {} - unimport@3.7.1(rollup@4.17.2): - dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) - acorn: 8.11.3 - escape-string-regexp: 5.0.0 - estree-walker: 3.0.3 - fast-glob: 3.3.2 - local-pkg: 0.5.0 - magic-string: 0.30.12 - mlly: 1.7.0 - pathe: 1.1.2 - pkg-types: 1.1.0 - scule: 1.3.0 - strip-literal: 1.3.0 - unplugin: 1.10.1 - transitivePeerDependencies: - - rollup - unimport@3.7.1(rollup@4.24.4): dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.24.4) @@ -17442,7 +17221,7 @@ snapshots: magic-string: 0.30.12 mlly: 1.7.0 pathe: 1.1.2 - pkg-types: 1.1.0 + pkg-types: 1.1.1 scule: 1.3.0 strip-literal: 1.3.0 unplugin: 1.10.1 @@ -17576,9 +17355,9 @@ snapshots: dependencies: '@babel/core': 7.24.5 '@babel/standalone': 7.24.5 - '@babel/types': 7.24.5 + '@babel/types': 7.28.1 defu: 6.1.4 - jiti: 1.21.0 + jiti: 1.21.6 mri: 1.2.0 scule: 1.3.0 transitivePeerDependencies: @@ -17590,7 +17369,7 @@ snapshots: magic-string: 0.30.17 mlly: 1.7.0 pathe: 1.1.2 - pkg-types: 1.1.0 + pkg-types: 1.1.1 unplugin: 1.10.1 update-browserslist-db@1.1.3(browserslist@4.25.1): @@ -18186,11 +17965,6 @@ snapshots: bufferutil: 4.0.8 utf-8-validate: 5.0.10 - ws@8.18.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 5.0.10 - ws@8.18.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 From b0765088fa11cf6f663233364eadb2f4da2d895e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 19:56:44 -0400 Subject: [PATCH 073/213] chore: version packages (#4767) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/pretty-phones-tie.md | 5 ----- packages/vue/CHANGELOG.md | 6 ++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 .changeset/pretty-phones-tie.md diff --git a/.changeset/pretty-phones-tie.md b/.changeset/pretty-phones-tie.md deleted file mode 100644 index 6bc9d0c192..0000000000 --- a/.changeset/pretty-phones-tie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/vue": minor ---- - -Added support for Nuxt 4. diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index 8f9b6d9ca5..f82d3d44e9 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/vue +## 0.2.0 + +### Minor Changes + +- [#4737](https://github.com/wevm/wagmi/pull/4737) [`23bad767c5055f54d2a5a5179830e078282fa00f`](https://github.com/wevm/wagmi/commit/23bad767c5055f54d2a5a5179830e078282fa00f) Thanks [@microHoffman](https://github.com/microHoffman)! - Added support for Nuxt 4. + ## 0.1.28 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index 110b6bb0d2..d7523adc0f 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.1.28", + "version": "0.2.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index cd8e2a6bc1..f11a5bde68 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.1.28' +export const version = '0.2.0' From a13aa2b68890f180f6ac3f741cbb9817494cb66c Mon Sep 17 00:00:00 2001 From: tmm Date: Fri, 22 Aug 2025 13:28:39 -0400 Subject: [PATCH 074/213] feat(core) add internal revalidate function (#4770) feat(core): add internal revalidate function --- .changeset/dry-pumas-happen.md | 5 +++ packages/core/src/createConfig.test.ts | 59 +++++++++++++++++++++++++- packages/core/src/createConfig.ts | 21 +++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 .changeset/dry-pumas-happen.md diff --git a/.changeset/dry-pumas-happen.md b/.changeset/dry-pumas-happen.md new file mode 100644 index 0000000000..451e696933 --- /dev/null +++ b/.changeset/dry-pumas-happen.md @@ -0,0 +1,5 @@ +--- +"@wagmi/core": minor +--- + +Added internal `revalidate` function. diff --git a/packages/core/src/createConfig.test.ts b/packages/core/src/createConfig.test.ts index 37d8843525..de3f2160dd 100644 --- a/packages/core/src/createConfig.test.ts +++ b/packages/core/src/createConfig.test.ts @@ -12,8 +12,9 @@ import { disconnect } from './actions/disconnect.js' import { switchChain } from './actions/switchChain.js' import { createConnector } from './connectors/createConnector.js' import { mock } from './connectors/mock.js' -import { createConfig } from './createConfig.js' +import { type Connection, createConfig } from './createConfig.js' import { createStorage } from './createStorage.js' +import { serialize } from './utils/serialize.js' const { mainnet, optimism } = chain @@ -426,6 +427,62 @@ test('behavior: eip 6963 providers', async () => { `) }) +test('behavior: revalidate connections', async () => { + const state = { + 'wagmi.store': serialize({ + state: { chainId: 1 }, + version: 1, + }), + } as Record + Object.defineProperty(window, 'localStorage', { + value: { + getItem: vi.fn((key) => state[key] ?? null), + removeItem: vi.fn((key) => state.delete?.[key]), + setItem: vi.fn((key, value) => { + state[key] = value + }), + }, + writable: true, + }) + + const config = createConfig({ + chains: [mainnet], + connectors: [ + mock({ accounts }), + mock({ accounts, features: { defaultConnected: true, reconnect: true } }), + mock({ accounts }), + ], + storage: createStorage<{ store: object }>({ + storage: window.localStorage, + }), + transports: { + [mainnet.id]: http(), + }, + }) + + const connections = new Map() + const c1 = config.connectors.at(0)! + const c2 = config.connectors.at(1)! + const c3 = config.connectors.at(2)! + connections.set(c1.uid, { accounts: ['0x'], chainId: 1, connector: c1 }) + connections.set(c2.uid, { accounts: ['0x'], chainId: 1, connector: c2 }) + connections.set(c3.uid, { accounts: ['0x'], chainId: 1, connector: c3 }) + connections.set('foo', { + accounts: ['0x'], + chainId: 1, + connector: { + id: 'foo', + name: 'foo', + type: 'foo', + uid: 'foo', + } as Connection['connector'], + }) + config.setState((state) => ({ ...state, connections })) + await config._internal.revalidate() + + expect([...config.state.connections.keys()]).toEqual([c2.uid]) +}) + function getProviderDetail( info: Pick, ): EIP6963ProviderDetail { diff --git a/packages/core/src/createConfig.ts b/packages/core/src/createConfig.ts index 275efe8a47..ee4b1b4547 100644 --- a/packages/core/src/createConfig.ts +++ b/packages/core/src/createConfig.ts @@ -451,6 +451,26 @@ export function createConfig< _internal: { mipd, + async revalidate() { + // Check connections to see if they are still active + const state = store.getState() + const connections = state.connections + let current = state.current + for (const [, connection] of connections) { + const connector = connection.connector + // check if `connect.isAuthorized` exists + // partial connectors in storage do not have it + const isAuthorized = connector.isAuthorized + ? await connector.isAuthorized() + : false + if (isAuthorized) continue + // Remove stale connection + connections.delete(connector.uid) + if (current === connector.uid) current = null + } + // set connections + store.setState((x) => ({ ...x, connections, current })) + }, store, ssr: Boolean(ssr), syncConnectedChain, @@ -569,6 +589,7 @@ type Internal< >, > = { readonly mipd: MipdStore | undefined + revalidate: () => Promise readonly store: Mutate, [['zustand/persist', any]]> readonly ssr: boolean readonly syncConnectedChain: boolean From 218f4a523a30f1aa98e1646f64ba7c37ac7fcd61 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 24 Aug 2025 11:04:51 -0400 Subject: [PATCH 075/213] chore: version packages (#4771) * chore: version packages * fix: version --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tom Meagher --- .changeset/dry-pumas-happen.md | 5 ----- packages/connectors/CHANGELOG.md | 7 +++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/core/src/version.ts | 2 +- packages/react/CHANGELOG.md | 8 ++++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 8 ++++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 13 files changed, 37 insertions(+), 13 deletions(-) delete mode 100644 .changeset/dry-pumas-happen.md diff --git a/.changeset/dry-pumas-happen.md b/.changeset/dry-pumas-happen.md deleted file mode 100644 index 451e696933..0000000000 --- a/.changeset/dry-pumas-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/core": minor ---- - -Added internal `revalidate` function. diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 8814ce098e..0b4edc0f96 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/connectors +## 5.9.5 + +### Patch Changes + +- Updated dependencies [[`a13aa2b68890f180f6ac3f741cbb9817494cb66c`](https://github.com/wevm/wagmi/commit/a13aa2b68890f180f6ac3f741cbb9817494cb66c)]: + - @wagmi/core@2.20.0 + ## 5.9.4 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 8a32ea643a..78fb3cc570 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "5.9.4", + "version": "5.9.5", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index 55dc5ccf40..9a04057336 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '5.9.4' +export const version = '5.9.5' diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 152295a268..23790cb564 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/core +## 2.20.0 + +### Minor Changes + +- [#4770](https://github.com/wevm/wagmi/pull/4770) [`a13aa2b68890f180f6ac3f741cbb9817494cb66c`](https://github.com/wevm/wagmi/commit/a13aa2b68890f180f6ac3f741cbb9817494cb66c) Thanks [@tmm](https://github.com/tmm)! - Added internal `revalidate` function. + ## 2.19.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index ac25f68ea3..dd23e9f2a9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/core", "description": "VanillaJS library for Ethereum", - "version": "2.19.0", + "version": "2.20.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/core/src/version.ts b/packages/core/src/version.ts index 94e57887a5..1cffb7ee2d 100644 --- a/packages/core/src/version.ts +++ b/packages/core/src/version.ts @@ -1 +1 @@ -export const version = '2.19.0' +export const version = '2.20.0' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 5408d5d5c3..fed14b9d87 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,13 @@ # wagmi +## 2.16.5 + +### Patch Changes + +- Updated dependencies [[`a13aa2b68890f180f6ac3f741cbb9817494cb66c`](https://github.com/wevm/wagmi/commit/a13aa2b68890f180f6ac3f741cbb9817494cb66c)]: + - @wagmi/core@2.20.0 + - @wagmi/connectors@5.9.5 + ## 2.16.4 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index b8939ee075..186d5bd1ce 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.16.4", + "version": "2.16.5", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index b551a91d6e..a3f84bd58a 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.16.4' +export const version = '2.16.5' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index f82d3d44e9..e729e897ff 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,13 @@ # @wagmi/vue +## 0.2.1 + +### Patch Changes + +- Updated dependencies [[`a13aa2b68890f180f6ac3f741cbb9817494cb66c`](https://github.com/wevm/wagmi/commit/a13aa2b68890f180f6ac3f741cbb9817494cb66c)]: + - @wagmi/core@2.20.0 + - @wagmi/connectors@5.9.5 + ## 0.2.0 ### Minor Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index d7523adc0f..125c2647f7 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.2.0", + "version": "0.2.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index f11a5bde68..9139b5cfec 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.2.0' +export const version = '0.2.1' From 3fd46ffc896e39f31efc68d89b9bdba3b65b0de2 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Sun, 24 Aug 2025 12:13:47 -0400 Subject: [PATCH 076/213] chore: v3 todo comment --- packages/core/src/connectors/createConnector.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/core/src/connectors/createConnector.ts b/packages/core/src/connectors/createConnector.ts index 54b4d9955c..8e8c8535e4 100644 --- a/packages/core/src/connectors/createConnector.ts +++ b/packages/core/src/connectors/createConnector.ts @@ -45,9 +45,13 @@ export type CreateConnectorFn< setup?(): Promise connect( parameters?: - | { chainId?: number | undefined; isReconnecting?: boolean | undefined } + | { + chainId?: number | undefined + isReconnecting?: boolean | undefined + } | undefined, ): Promise<{ + // TODO(v3): Add `capabilities` (e.g. `readonly { address: Address; capabilities: Record | undefined }`) accounts: readonly Address[] chainId: number }> From d4c367ca46c508598c997cf229a31593a1e2b8b8 Mon Sep 17 00:00:00 2001 From: tmm Date: Mon, 25 Aug 2025 20:57:47 -0400 Subject: [PATCH 077/213] fix: codegen actions/hooks respect `syncConnectedChain` (#4773) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(core): update chainId retrieval logic to consider syncConnectedChain configuration * refactor: drop getAccount/useAccount inside codegen hooks * chore: changeset --------- Co-authored-by: Ahmet BuÄŸra YiÄŸiter --- .changeset/thirty-mugs-smell.md | 7 + .../src/actions/codegen/createReadContract.ts | 6 +- .../actions/codegen/createSimulateContract.ts | 6 +- .../codegen/createWatchContractEvent.ts | 6 +- .../actions/codegen/createWriteContract.ts | 24 +-- .../codegen/createUseReadContract.test.ts | 152 +++++++++++++++++- .../hooks/codegen/createUseReadContract.ts | 6 +- .../codegen/createUseSimulateContract.ts | 6 +- .../codegen/createUseWatchContractEvent.ts | 6 +- .../codegen/createUseWriteContract.test.ts | 29 +++- .../hooks/codegen/createUseWriteContract.ts | 40 ++--- 11 files changed, 204 insertions(+), 84 deletions(-) create mode 100644 .changeset/thirty-mugs-smell.md diff --git a/.changeset/thirty-mugs-smell.md b/.changeset/thirty-mugs-smell.md new file mode 100644 index 0000000000..11574a9e03 --- /dev/null +++ b/.changeset/thirty-mugs-smell.md @@ -0,0 +1,7 @@ +--- +"wagmi": patch +"@wagmi/core": patch +"@wagmi/cli": patch +--- + +Fixed issue with codegen actions/hooks, where `syncConnectedChain: false` did not work as intended. diff --git a/packages/core/src/actions/codegen/createReadContract.ts b/packages/core/src/actions/codegen/createReadContract.ts index f7dbfbed45..32c14da4bb 100644 --- a/packages/core/src/actions/codegen/createReadContract.ts +++ b/packages/core/src/actions/codegen/createReadContract.ts @@ -7,7 +7,6 @@ import type { import type { Config } from '../../createConfig.js' import type { UnionCompute, UnionStrictOmit } from '../../types/utils.js' -import { getAccount } from '../getAccount.js' import { getChainId } from '../getChainId.js' import { type ReadContractParameters, @@ -76,11 +75,8 @@ export function createReadContract< if (c.address !== undefined && typeof c.address === 'object') return (config, parameters) => { const configChainId = getChainId(config) - const account = getAccount(config) const chainId = - (parameters as { chainId?: number })?.chainId ?? - account.chainId ?? - configChainId + (parameters as { chainId?: number })?.chainId ?? configChainId return readContract(config, { ...(parameters as any), ...(c.functionName ? { functionName: c.functionName } : {}), diff --git a/packages/core/src/actions/codegen/createSimulateContract.ts b/packages/core/src/actions/codegen/createSimulateContract.ts index 016384e245..efdbe0cd39 100644 --- a/packages/core/src/actions/codegen/createSimulateContract.ts +++ b/packages/core/src/actions/codegen/createSimulateContract.ts @@ -15,7 +15,6 @@ import type { ConnectorParameter, } from '../../types/properties.js' import type { UnionCompute, UnionStrictOmit } from '../../types/utils.js' -import { getAccount } from '../getAccount.js' import { getChainId } from '../getChainId.js' import { type SimulateContractReturnType, @@ -98,11 +97,8 @@ export function createSimulateContract< if (c.address !== undefined && typeof c.address === 'object') return (config, parameters) => { const configChainId = getChainId(config) - const account = getAccount(config) const chainId = - (parameters as { chainId?: number })?.chainId ?? - account.chainId ?? - configChainId + (parameters as { chainId?: number })?.chainId ?? configChainId return simulateContract(config, { ...(parameters as any), ...(c.functionName ? { functionName: c.functionName } : {}), diff --git a/packages/core/src/actions/codegen/createWatchContractEvent.ts b/packages/core/src/actions/codegen/createWatchContractEvent.ts index 2817efc704..f9c701018c 100644 --- a/packages/core/src/actions/codegen/createWatchContractEvent.ts +++ b/packages/core/src/actions/codegen/createWatchContractEvent.ts @@ -2,7 +2,6 @@ import type { Abi, Address, ContractEventName } from 'viem' import type { Config } from '../../createConfig.js' import type { UnionCompute, UnionStrictOmit } from '../../types/utils.js' -import { getAccount } from '../getAccount.js' import { getChainId } from '../getChainId.js' import { type WatchContractEventParameters, @@ -64,11 +63,8 @@ export function createWatchContractEvent< if (c.address !== undefined && typeof c.address === 'object') return (config, parameters) => { const configChainId = getChainId(config) - const account = getAccount(config) const chainId = - (parameters as { chainId?: number })?.chainId ?? - account.chainId ?? - configChainId + (parameters as { chainId?: number })?.chainId ?? configChainId return watchContractEvent(config, { ...(parameters as any), ...(c.eventName ? { eventName: c.eventName } : {}), diff --git a/packages/core/src/actions/codegen/createWriteContract.ts b/packages/core/src/actions/codegen/createWriteContract.ts index 6c1d891a3f..4d2509eb1b 100644 --- a/packages/core/src/actions/codegen/createWriteContract.ts +++ b/packages/core/src/actions/codegen/createWriteContract.ts @@ -19,7 +19,6 @@ import type { UnionCompute, UnionStrictOmit, } from '../../types/utils.js' -import { getAccount } from '../getAccount.js' import { getChainId } from '../getChainId.js' import { type WriteContractReturnType, @@ -107,25 +106,10 @@ export function createWriteContract< ): CreateWriteContractReturnType { if (c.address !== undefined && typeof c.address === 'object') return (config, parameters) => { - const configChainId = getChainId(config) - const account = getAccount(config) - - let chainId: number | undefined - if (parameters.chainId) chainId = parameters.chainId - else if ( - (parameters as unknown as { account: Address | Account | undefined }) - .account && - (parameters as unknown as { account: Address | Account | undefined }) - .account === account.address - ) - chainId = account.chainId - else if ( - (parameters as unknown as { account: Address | Account | undefined }) - .account === undefined - ) - chainId = account.chainId - else chainId = configChainId - + const chainId = (() => { + if (parameters.chainId) return parameters.chainId + return getChainId(config) + })() return writeContract(config, { ...(parameters as any), ...(c.functionName ? { functionName: c.functionName } : {}), diff --git a/packages/react/src/hooks/codegen/createUseReadContract.test.ts b/packages/react/src/hooks/codegen/createUseReadContract.test.ts index e9f69bf14a..dcf93b8895 100644 --- a/packages/react/src/hooks/codegen/createUseReadContract.test.ts +++ b/packages/react/src/hooks/codegen/createUseReadContract.test.ts @@ -1,7 +1,14 @@ -import { abi, address, chain } from '@wagmi/test' +import { + connect, + createConfig, + disconnect, + http, + mock, + switchChain, +} from '@wagmi/core' +import { abi, accounts, address, chain, config } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' import { expect, test, vi } from 'vitest' - import { createUseReadContract } from './createUseReadContract.js' test('default', async () => { @@ -175,3 +182,144 @@ test('functionName', async () => { } `) }) + +test('behavior: syncConnectedChain on', async () => { + await disconnect(config) + await connect(config, { + connector: config.connectors[0]!, + chainId: chain.mainnet.id, + }) + + const useReadWagmiMintExample = createUseReadContract({ + address: { + [chain.mainnet.id]: address.wagmiMintExample, + [chain.mainnet2.id]: address.wagmiMintExample, + }, + abi: abi.wagmiMintExample, + }) + + const { rerender, result } = await renderHook(() => + useReadWagmiMintExample({ + functionName: 'balanceOf', + args: ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'], + }), + ) + + await vi.waitUntil(() => result.current.isSuccess, { + timeout: 5_000, + }) + + expect(result.current.queryKey).toMatchInlineSnapshot(` + [ + "readContract", + { + "address": "0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2", + "args": [ + "0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC", + ], + "chainId": 1, + "functionName": "balanceOf", + }, + ] + `) + + await switchChain(config, { chainId: chain.mainnet2.id }) + + rerender() + await vi.waitUntil(() => result.current.isSuccess, { + timeout: 5_000, + }) + + expect(result.current.queryKey).toMatchInlineSnapshot(` + [ + "readContract", + { + "address": "0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2", + "args": [ + "0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC", + ], + "chainId": 456, + "functionName": "balanceOf", + }, + ] + `) + + await disconnect(config) +}) + +test('behavior: syncConnectedChain off', async () => { + const config = createConfig({ + chains: [chain.mainnet, chain.mainnet2, chain.optimism], + connectors: [mock({ accounts })], + pollingInterval: 100, + storage: null, + syncConnectedChain: false, + transports: { + [chain.mainnet.id]: http(), + [chain.mainnet2.id]: http(), + [chain.optimism.id]: http(), + }, + }) + + await disconnect(config) + await connect(config, { + connector: config.connectors[0]!, + chainId: chain.mainnet.id, + }) + + const useReadWagmiMintExample = createUseReadContract({ + address: { + [chain.mainnet.id]: address.wagmiMintExample, + [chain.mainnet2.id]: address.wagmiMintExample, + }, + abi: abi.wagmiMintExample, + }) + + const { rerender, result } = await renderHook(() => + useReadWagmiMintExample({ + functionName: 'balanceOf', + args: ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'], + }), + ) + + await vi.waitUntil(() => result.current.isSuccess, { + timeout: 5_000, + }) + + expect(result.current.queryKey).toMatchInlineSnapshot(` + [ + "readContract", + { + "address": "0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2", + "args": [ + "0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC", + ], + "chainId": 456, + "functionName": "balanceOf", + }, + ] + `) + + await switchChain(config, { chainId: chain.optimism.id }) + + rerender() + await vi.waitUntil(() => result.current.isSuccess, { + timeout: 5_000, + }) + + expect(result.current.queryKey).toMatchInlineSnapshot(` + [ + "readContract", + { + "address": "0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2", + "args": [ + "0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC", + ], + "chainId": 456, + "functionName": "balanceOf", + }, + ] + `) + + await disconnect(config) +}) diff --git a/packages/react/src/hooks/codegen/createUseReadContract.ts b/packages/react/src/hooks/codegen/createUseReadContract.ts index 1c5f509e58..40c1e57190 100644 --- a/packages/react/src/hooks/codegen/createUseReadContract.ts +++ b/packages/react/src/hooks/codegen/createUseReadContract.ts @@ -23,7 +23,6 @@ import type { } from 'viem' import type { ConfigParameter, QueryParameter } from '../../types/properties.js' -import { useAccount } from '../useAccount.js' import { useChainId } from '../useChainId.js' import { useConfig } from '../useConfig.js' import { @@ -103,11 +102,8 @@ export function createUseReadContract< return (parameters) => { const config = useConfig(parameters) const configChainId = useChainId({ config }) - const account = useAccount({ config }) const chainId = - (parameters as { chainId?: number })?.chainId ?? - account.chainId ?? - configChainId + (parameters as { chainId?: number })?.chainId ?? configChainId return useReadContract({ ...(parameters as any), ...(props.functionName ? { functionName: props.functionName } : {}), diff --git a/packages/react/src/hooks/codegen/createUseSimulateContract.ts b/packages/react/src/hooks/codegen/createUseSimulateContract.ts index 51758b995a..2a1938e63b 100644 --- a/packages/react/src/hooks/codegen/createUseSimulateContract.ts +++ b/packages/react/src/hooks/codegen/createUseSimulateContract.ts @@ -18,7 +18,6 @@ import type { } from 'viem' import type { ConfigParameter, QueryParameter } from '../../types/properties.js' -import { useAccount } from '../useAccount.js' import { useChainId } from '../useChainId.js' import { useConfig } from '../useConfig.js' import { @@ -96,11 +95,8 @@ export function createUseSimulateContract< return (parameters) => { const config = useConfig(parameters) const configChainId = useChainId({ config }) - const account = useAccount({ config }) const chainId = - (parameters as { chainId?: number })?.chainId ?? - account.chainId ?? - configChainId + (parameters as { chainId?: number })?.chainId ?? configChainId return useSimulateContract({ ...(parameters as any), ...(props.functionName ? { functionName: props.functionName } : {}), diff --git a/packages/react/src/hooks/codegen/createUseWatchContractEvent.ts b/packages/react/src/hooks/codegen/createUseWatchContractEvent.ts index e453b9442b..e1bb6db352 100644 --- a/packages/react/src/hooks/codegen/createUseWatchContractEvent.ts +++ b/packages/react/src/hooks/codegen/createUseWatchContractEvent.ts @@ -14,7 +14,6 @@ import type { ConfigParameter, EnabledParameter, } from '../../types/properties.js' -import { useAccount } from '../useAccount.js' import { useChainId } from '../useChainId.js' import { useConfig } from '../useConfig.js' import { useWatchContractEvent } from '../useWatchContractEvent.js' @@ -77,11 +76,8 @@ export function createUseWatchContractEvent< return (parameters) => { const config = useConfig(parameters) const configChainId = useChainId({ config }) - const account = useAccount({ config }) const chainId = - (parameters as { chainId?: number })?.chainId ?? - account.chainId ?? - configChainId + (parameters as { chainId?: number })?.chainId ?? configChainId return useWatchContractEvent({ ...(parameters as any), ...(props.eventName ? { eventName: props.eventName } : {}), diff --git a/packages/react/src/hooks/codegen/createUseWriteContract.test.ts b/packages/react/src/hooks/codegen/createUseWriteContract.test.ts index e89dc62141..b116e1908e 100644 --- a/packages/react/src/hooks/codegen/createUseWriteContract.test.ts +++ b/packages/react/src/hooks/codegen/createUseWriteContract.test.ts @@ -1,6 +1,7 @@ -import { abi } from '@wagmi/test' +import { connect, disconnect } from '@wagmi/core' +import { abi, address, chain, config } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' -import { test } from 'vitest' +import { expect, test, vi } from 'vitest' import { createUseWriteContract } from './createUseWriteContract.js' @@ -11,3 +12,27 @@ test('default', () => { renderHook(() => useWriteErc20()) }) + +const connector = config.connectors[0]! + +test('multichain', async () => { + const useWriteWagmiMintExample = createUseWriteContract({ + address: { + [chain.mainnet.id]: address.wagmiMintExample, + [chain.mainnet2.id]: address.wagmiMintExample, + }, + abi: abi.wagmiMintExample, + }) + + await connect(config, { connector }) + + const { result } = await renderHook(() => useWriteWagmiMintExample()) + + result.current.writeContract({ functionName: 'mint' }) + await vi.waitUntil(() => result.current.isSuccess) + + console.log(result.current.data) + expect(result.current.data).toBeDefined() + + await disconnect(config, { connector }) +}) diff --git a/packages/react/src/hooks/codegen/createUseWriteContract.ts b/packages/react/src/hooks/codegen/createUseWriteContract.ts index 9e58fd973b..709e320f2f 100644 --- a/packages/react/src/hooks/codegen/createUseWriteContract.ts +++ b/packages/react/src/hooks/codegen/createUseWriteContract.ts @@ -27,7 +27,6 @@ import type { } from 'viem' import type { WriteContractParameters as viem_WriteContractParameters } from 'viem/actions' -import { useAccount } from '../useAccount.js' import { useChainId } from '../useChainId.js' import { useConfig } from '../useConfig.js' import { @@ -158,19 +157,15 @@ export function createUseWriteContract< const config = useConfig(parameters) const result = useWriteContract(parameters) const configChainId = useChainId({ config }) - const account = useAccount({ config }) type Args = Parameters return { ...(result as any), writeContract: useCallback( (...args: Args) => { - let chainId: number | undefined - if (args[0].chainId) chainId = args[0].chainId - else if (args[0].account && args[0].account === account.address) - chainId = account.chainId - else if (args[0].account === undefined) chainId = account.chainId - else chainId = configChainId - + const chainId = (() => { + if (args[0].chainId) return args[0].chainId + return configChainId + })() const variables = { ...(args[0] as any), address: chainId ? props.address?.[chainId] : undefined, @@ -181,23 +176,14 @@ export function createUseWriteContract< } result.writeContract(variables, args[1] as any) }, - [ - account.address, - account.chainId, - props, - configChainId, - result.writeContract, - ], + [props, configChainId, result.writeContract], ), writeContractAsync: useCallback( (...args: Args) => { - let chainId: number | undefined - if (args[0].chainId) chainId = args[0].chainId - else if (args[0].account && args[0].account === account.address) - chainId = account.chainId - else if (args[0].account === undefined) chainId = account.chainId - else chainId = configChainId - + const chainId = (() => { + if (args[0].chainId) return args[0].chainId + return configChainId + })() const variables = { ...(args[0] as any), address: chainId ? props.address?.[chainId] : undefined, @@ -208,13 +194,7 @@ export function createUseWriteContract< } return result.writeContractAsync(variables, args[1] as any) }, - [ - account.address, - account.chainId, - props, - configChainId, - result.writeContractAsync, - ], + [props, configChainId, result.writeContractAsync], ), } } From bcdea68595916d0601e212e5b58669ab837909f2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 21:06:57 -0400 Subject: [PATCH 078/213] chore: version packages (#4774) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/thirty-mugs-smell.md | 7 ------- packages/cli/CHANGELOG.md | 6 ++++++ packages/cli/package.json | 2 +- packages/cli/src/version.ts | 2 +- packages/connectors/CHANGELOG.md | 7 +++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/core/src/version.ts | 2 +- packages/react/CHANGELOG.md | 10 ++++++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 8 ++++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 16 files changed, 47 insertions(+), 17 deletions(-) delete mode 100644 .changeset/thirty-mugs-smell.md diff --git a/.changeset/thirty-mugs-smell.md b/.changeset/thirty-mugs-smell.md deleted file mode 100644 index 11574a9e03..0000000000 --- a/.changeset/thirty-mugs-smell.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wagmi": patch -"@wagmi/core": patch -"@wagmi/cli": patch ---- - -Fixed issue with codegen actions/hooks, where `syncConnectedChain: false` did not work as intended. diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 3db119c4cc..a6ecf0cbea 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/cli +## 2.5.1 + +### Patch Changes + +- [#4773](https://github.com/wevm/wagmi/pull/4773) [`d4c367ca46c508598c997cf229a31593a1e2b8b8`](https://github.com/wevm/wagmi/commit/d4c367ca46c508598c997cf229a31593a1e2b8b8) Thanks [@tmm](https://github.com/tmm)! - Fixed issue with codegen actions/hooks, where `syncConnectedChain: false` did not work as intended. + ## 2.5.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 582cdd1030..8f9580dd7c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/cli", "description": "Manage and generate code from Ethereum ABIs", - "version": "2.5.0", + "version": "2.5.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/cli/src/version.ts b/packages/cli/src/version.ts index e69ed72919..de4f055d3a 100644 --- a/packages/cli/src/version.ts +++ b/packages/cli/src/version.ts @@ -1 +1 @@ -export const version = '2.5.0' +export const version = '2.5.1' diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 0b4edc0f96..9b350f4888 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/connectors +## 5.9.6 + +### Patch Changes + +- Updated dependencies [[`d4c367ca46c508598c997cf229a31593a1e2b8b8`](https://github.com/wevm/wagmi/commit/d4c367ca46c508598c997cf229a31593a1e2b8b8)]: + - @wagmi/core@2.20.1 + ## 5.9.5 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 78fb3cc570..5a3ec72509 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "5.9.5", + "version": "5.9.6", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index 9a04057336..1fe34007b5 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '5.9.5' +export const version = '5.9.6' diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 23790cb564..48f67a81b9 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/core +## 2.20.1 + +### Patch Changes + +- [#4773](https://github.com/wevm/wagmi/pull/4773) [`d4c367ca46c508598c997cf229a31593a1e2b8b8`](https://github.com/wevm/wagmi/commit/d4c367ca46c508598c997cf229a31593a1e2b8b8) Thanks [@tmm](https://github.com/tmm)! - Fixed issue with codegen actions/hooks, where `syncConnectedChain: false` did not work as intended. + ## 2.20.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index dd23e9f2a9..d826d4c029 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/core", "description": "VanillaJS library for Ethereum", - "version": "2.20.0", + "version": "2.20.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/core/src/version.ts b/packages/core/src/version.ts index 1cffb7ee2d..f37d9ff3fb 100644 --- a/packages/core/src/version.ts +++ b/packages/core/src/version.ts @@ -1 +1 @@ -export const version = '2.20.0' +export const version = '2.20.1' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index fed14b9d87..c99e337fa4 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,15 @@ # wagmi +## 2.16.6 + +### Patch Changes + +- [#4773](https://github.com/wevm/wagmi/pull/4773) [`d4c367ca46c508598c997cf229a31593a1e2b8b8`](https://github.com/wevm/wagmi/commit/d4c367ca46c508598c997cf229a31593a1e2b8b8) Thanks [@tmm](https://github.com/tmm)! - Fixed issue with codegen actions/hooks, where `syncConnectedChain: false` did not work as intended. + +- Updated dependencies [[`d4c367ca46c508598c997cf229a31593a1e2b8b8`](https://github.com/wevm/wagmi/commit/d4c367ca46c508598c997cf229a31593a1e2b8b8)]: + - @wagmi/core@2.20.1 + - @wagmi/connectors@5.9.6 + ## 2.16.5 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 186d5bd1ce..19ed1f3040 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.16.5", + "version": "2.16.6", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index a3f84bd58a..34efd03e90 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.16.5' +export const version = '2.16.6' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index e729e897ff..1a3ea9383b 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,13 @@ # @wagmi/vue +## 0.2.2 + +### Patch Changes + +- Updated dependencies [[`d4c367ca46c508598c997cf229a31593a1e2b8b8`](https://github.com/wevm/wagmi/commit/d4c367ca46c508598c997cf229a31593a1e2b8b8)]: + - @wagmi/core@2.20.1 + - @wagmi/connectors@5.9.6 + ## 0.2.1 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index 125c2647f7..fe01026d40 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.2.1", + "version": "0.2.2", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index 9139b5cfec..158e68d2ed 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.2.1' +export const version = '0.2.2' From 986b96427a4bb743d2673dfbc7e8cb5041316db3 Mon Sep 17 00:00:00 2001 From: Lizaveta Miasayedava <68655719+effie-ms@users.noreply.github.com> Date: Tue, 26 Aug 2025 04:43:12 +0100 Subject: [PATCH 079/213] fix: update chainId check in getConnectorClient (#4733) * fix: update chainId check in getConnectorClient * add changeset * test: add --------- Co-authored-by: Tom Meagher --- .changeset/thick-actors-work.md | 5 ++ .../codegen/createSimulateContract.test.ts | 11 ++++ .../core/src/actions/getConnectorClient.ts | 4 +- .../src/hooks/useConnectorClient.test.tsx | 61 +++++++++++++++++++ 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 .changeset/thick-actors-work.md diff --git a/.changeset/thick-actors-work.md b/.changeset/thick-actors-work.md new file mode 100644 index 0000000000..5fc1cb5a87 --- /dev/null +++ b/.changeset/thick-actors-work.md @@ -0,0 +1,5 @@ +--- +"@wagmi/core": patch +--- + +Fixed `getConnectorClient` chain ID race condition. diff --git a/packages/core/src/actions/codegen/createSimulateContract.test.ts b/packages/core/src/actions/codegen/createSimulateContract.test.ts index bd37d13770..94b816d28d 100644 --- a/packages/core/src/actions/codegen/createSimulateContract.test.ts +++ b/packages/core/src/actions/codegen/createSimulateContract.test.ts @@ -3,6 +3,7 @@ import { expect, test } from 'vitest' import { connect } from '../connect.js' import { disconnect } from '../disconnect.js' +import { switchChain } from '../switchChain.js' import { createSimulateContract } from './createSimulateContract.js' const connector = config.connectors[0]! @@ -60,6 +61,15 @@ test('multichain', async () => { abi: abi.wagmiMintExample, }) + await expect( + simulateWagmiMintExample(config, { + functionName: 'mint', + }), + ).resolves.toMatchObject({ + chainId: 1, + }) + + await switchChain(config, { chainId: chain.mainnet2.id }) await expect( simulateWagmiMintExample(config, { functionName: 'mint', @@ -92,6 +102,7 @@ test('multichain', async () => { } `) + await switchChain(config, { chainId: chain.mainnet.id }) await disconnect(config, { connector }) }) diff --git a/packages/core/src/actions/getConnectorClient.ts b/packages/core/src/actions/getConnectorClient.ts index 534ba76bc6..f2d1e1563d 100644 --- a/packages/core/src/actions/getConnectorClient.ts +++ b/packages/core/src/actions/getConnectorClient.ts @@ -105,9 +105,9 @@ export async function getConnectorClient< // Check connector using same chainId as connection const connectorChainId = await connection.connector.getChainId() - if (connectorChainId !== connection.chainId) + if (connectorChainId !== chainId) throw new ConnectorChainMismatchError({ - connectionChainId: connection.chainId, + connectionChainId: chainId, connectorChainId, }) diff --git a/packages/react/src/hooks/useConnectorClient.test.tsx b/packages/react/src/hooks/useConnectorClient.test.tsx index ddff87c4f4..4ac39e0bd8 100644 --- a/packages/react/src/hooks/useConnectorClient.test.tsx +++ b/packages/react/src/hooks/useConnectorClient.test.tsx @@ -206,6 +206,67 @@ test('behavior: re-render does not invalidate query', async () => { .toEqual(initialClient.element()) }) +test('behavior: connector is on a different chain', async () => { + await disconnect(config, { connector }) + await connect(config, { connector }) + config.setState((state) => { + const uid = state.current! + const connection = state.connections.get(uid)! + return { + ...state, + connections: new Map(state.connections).set(uid, { + ...connection, + chainId: 456, + }), + } + }) + + const { result } = await renderHook(() => useConnectorClient()) + + await vi.waitUntil(() => result.current.isError, 10_000) + + const { data: _d, queryKey: _qk, ...rest } = result.current + expect(rest).toMatchInlineSnapshot(` + { + "dataUpdatedAt": 0, + "error": [ConnectorChainMismatchError: The current chain of the connector (id: 1) does not match the connection's chain (id: 456). + + Current Chain ID: 1 + Expected Chain ID: 456 + + Version: @wagmi/core@2.20.1], + "errorUpdateCount": 1, + "errorUpdatedAt": 1675209600000, + "failureCount": 4, + "failureReason": [ConnectorChainMismatchError: The current chain of the connector (id: 1) does not match the connection's chain (id: 456). + + Current Chain ID: 1 + Expected Chain ID: 456 + + Version: @wagmi/core@2.20.1], + "fetchStatus": "idle", + "isError": true, + "isFetched": true, + "isFetchedAfterMount": true, + "isFetching": false, + "isInitialLoading": false, + "isLoading": false, + "isLoadingError": true, + "isPaused": false, + "isPending": false, + "isPlaceholderData": false, + "isRefetchError": false, + "isRefetching": false, + "isStale": true, + "isSuccess": false, + "refetch": [Function], + "status": "error", + } + `) + + await disconnect(config, { connector }) +}) + function Parent() { const [renderCount, setRenderCount] = React.useState(1) From b961b46b999362e497bb89b99994b8a1aae0becb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 23:51:05 -0400 Subject: [PATCH 080/213] chore: version packages (#4775) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/thick-actors-work.md | 5 ----- packages/connectors/CHANGELOG.md | 7 +++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/core/src/version.ts | 2 +- packages/react/CHANGELOG.md | 8 ++++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 8 ++++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 13 files changed, 37 insertions(+), 13 deletions(-) delete mode 100644 .changeset/thick-actors-work.md diff --git a/.changeset/thick-actors-work.md b/.changeset/thick-actors-work.md deleted file mode 100644 index 5fc1cb5a87..0000000000 --- a/.changeset/thick-actors-work.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/core": patch ---- - -Fixed `getConnectorClient` chain ID race condition. diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 9b350f4888..27459c7fbc 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/connectors +## 5.9.7 + +### Patch Changes + +- Updated dependencies [[`986b96427a4bb743d2673dfbc7e8cb5041316db3`](https://github.com/wevm/wagmi/commit/986b96427a4bb743d2673dfbc7e8cb5041316db3)]: + - @wagmi/core@2.20.2 + ## 5.9.6 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 5a3ec72509..dd96cb906d 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "5.9.6", + "version": "5.9.7", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index 1fe34007b5..bd43ba1d45 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '5.9.6' +export const version = '5.9.7' diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 48f67a81b9..1714ac3e34 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/core +## 2.20.2 + +### Patch Changes + +- [#4733](https://github.com/wevm/wagmi/pull/4733) [`986b96427a4bb743d2673dfbc7e8cb5041316db3`](https://github.com/wevm/wagmi/commit/986b96427a4bb743d2673dfbc7e8cb5041316db3) Thanks [@effie-ms](https://github.com/effie-ms)! - Fixed `getConnectorClient` chain ID race condition. + ## 2.20.1 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index d826d4c029..e37490a909 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/core", "description": "VanillaJS library for Ethereum", - "version": "2.20.1", + "version": "2.20.2", "license": "MIT", "repository": { "type": "git", diff --git a/packages/core/src/version.ts b/packages/core/src/version.ts index f37d9ff3fb..883bc1fea4 100644 --- a/packages/core/src/version.ts +++ b/packages/core/src/version.ts @@ -1 +1 @@ -export const version = '2.20.1' +export const version = '2.20.2' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index c99e337fa4..4b9a9af5b4 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,13 @@ # wagmi +## 2.16.7 + +### Patch Changes + +- Updated dependencies [[`986b96427a4bb743d2673dfbc7e8cb5041316db3`](https://github.com/wevm/wagmi/commit/986b96427a4bb743d2673dfbc7e8cb5041316db3)]: + - @wagmi/core@2.20.2 + - @wagmi/connectors@5.9.7 + ## 2.16.6 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 19ed1f3040..0139f82d16 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.16.6", + "version": "2.16.7", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index 34efd03e90..17faaa2ac7 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.16.6' +export const version = '2.16.7' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index 1a3ea9383b..c785de967e 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,13 @@ # @wagmi/vue +## 0.2.3 + +### Patch Changes + +- Updated dependencies [[`986b96427a4bb743d2673dfbc7e8cb5041316db3`](https://github.com/wevm/wagmi/commit/986b96427a4bb743d2673dfbc7e8cb5041316db3)]: + - @wagmi/core@2.20.2 + - @wagmi/connectors@5.9.7 + ## 0.2.2 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index fe01026d40..1e0b235458 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.2.2", + "version": "0.2.3", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index 158e68d2ed..b11746bca3 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.2.2' +export const version = '0.2.3' From 9c5bd050c0361b3c3a276db1ef7e328da1c8422c Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Tue, 26 Aug 2025 00:04:12 -0400 Subject: [PATCH 081/213] chore: snaps --- .../src/hooks/useConnectorClient.test.tsx | 37 ++----------------- packages/react/test/setup.ts | 4 ++ 2 files changed, 8 insertions(+), 33 deletions(-) diff --git a/packages/react/src/hooks/useConnectorClient.test.tsx b/packages/react/src/hooks/useConnectorClient.test.tsx index 4ac39e0bd8..8db01e9a7a 100644 --- a/packages/react/src/hooks/useConnectorClient.test.tsx +++ b/packages/react/src/hooks/useConnectorClient.test.tsx @@ -225,43 +225,14 @@ test('behavior: connector is on a different chain', async () => { await vi.waitUntil(() => result.current.isError, 10_000) - const { data: _d, queryKey: _qk, ...rest } = result.current - expect(rest).toMatchInlineSnapshot(` - { - "dataUpdatedAt": 0, - "error": [ConnectorChainMismatchError: The current chain of the connector (id: 1) does not match the connection's chain (id: 456). + const { error } = result.current + expect(error?.message).toMatchInlineSnapshot(` + "The current chain of the connector (id: 1) does not match the connection's chain (id: 456). Current Chain ID: 1 Expected Chain ID: 456 - Version: @wagmi/core@2.20.1], - "errorUpdateCount": 1, - "errorUpdatedAt": 1675209600000, - "failureCount": 4, - "failureReason": [ConnectorChainMismatchError: The current chain of the connector (id: 1) does not match the connection's chain (id: 456). - - Current Chain ID: 1 - Expected Chain ID: 456 - - Version: @wagmi/core@2.20.1], - "fetchStatus": "idle", - "isError": true, - "isFetched": true, - "isFetchedAfterMount": true, - "isFetching": false, - "isInitialLoading": false, - "isLoading": false, - "isLoadingError": true, - "isPaused": false, - "isPending": false, - "isPlaceholderData": false, - "isRefetchError": false, - "isRefetching": false, - "isStale": true, - "isSuccess": false, - "refetch": [Function], - "status": "error", - } + Version: @wagmi/core@x.y.z" `) await disconnect(config, { connector }) diff --git a/packages/react/test/setup.ts b/packages/react/test/setup.ts index 5c0dcc071d..cb5fb5a7b4 100644 --- a/packages/react/test/setup.ts +++ b/packages/react/test/setup.ts @@ -6,3 +6,7 @@ Date.now = vi.fn(() => new Date(Date.UTC(2023, 1, 1)).valueOf()) vi.mock('../src/version.ts', () => { return { version: 'x.y.z' } }) + +vi.mock('../../core/src/version.ts', () => { + return { version: 'x.y.z' } +}) From a03da817a388646c9b4885792101a67eef3616e7 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Wed, 27 Aug 2025 07:52:39 +0900 Subject: [PATCH 082/213] switch chain on connect in walletconnect connector (#4691) * switch chain on connect * chore: tweaks --------- Co-authored-by: Tom Meagher --- .changeset/kind-tomatoes-march.md | 5 +++++ packages/connectors/src/walletConnect.ts | 21 ++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 .changeset/kind-tomatoes-march.md diff --git a/.changeset/kind-tomatoes-march.md b/.changeset/kind-tomatoes-march.md new file mode 100644 index 0000000000..5101a0b4fc --- /dev/null +++ b/.changeset/kind-tomatoes-march.md @@ -0,0 +1,5 @@ +--- +"@wagmi/connectors": patch +--- + +Fixed `walletConnect#connect` by moving chain switch directly inside instead of relying on `getProvider`. diff --git a/packages/connectors/src/walletConnect.ts b/packages/connectors/src/walletConnect.ts index c3649b0453..16f04ab964 100644 --- a/packages/connectors/src/walletConnect.ts +++ b/packages/connectors/src/walletConnect.ts @@ -167,7 +167,23 @@ export function walletConnect(parameters: WalletConnectParameters) { // If session exists and chains are authorized, enable provider for required chain const accounts = (await provider.enable()).map((x) => getAddress(x)) - const currentChainId = await this.getChainId() + + // Switch to chain if provided + let currentChainId = await this.getChainId() + if (chainId && currentChainId !== chainId) { + const chain = await this.switchChain!({ chainId }).catch( + (error: RpcError) => { + if ( + error.code === UserRejectedRequestError.code && + (error.cause as RpcError | undefined)?.message !== + 'Missing or invalid. request() method: wallet_addEthereumChain' + ) + throw error + return { id: currentChainId } + }, + ) + currentChainId = chain?.id ?? currentChainId + } if (displayUri) { provider.removeListener('display_uri', displayUri) @@ -241,7 +257,7 @@ export function walletConnect(parameters: WalletConnectParameters) { const provider = await this.getProvider() return provider.accounts.map((x) => getAddress(x)) }, - async getProvider({ chainId } = {}) { + async getProvider() { async function initProvider() { const optionalChains = config.chains.map((x) => x.id) as [number] if (!optionalChains.length) return @@ -271,7 +287,6 @@ export function walletConnect(parameters: WalletConnectParameters) { provider_ = await providerPromise provider_?.events.setMaxListeners(Number.POSITIVE_INFINITY) } - if (chainId) await this.switchChain?.({ chainId }) return provider_! }, async getChainId() { From 307a9e29b740d12878668eee2f0e31dc1301a33a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 19:44:19 -0400 Subject: [PATCH 083/213] chore: version packages (#4776) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/kind-tomatoes-march.md | 5 ----- packages/connectors/CHANGELOG.md | 6 ++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/react/CHANGELOG.md | 7 +++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 7 +++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 10 files changed, 26 insertions(+), 11 deletions(-) delete mode 100644 .changeset/kind-tomatoes-march.md diff --git a/.changeset/kind-tomatoes-march.md b/.changeset/kind-tomatoes-march.md deleted file mode 100644 index 5101a0b4fc..0000000000 --- a/.changeset/kind-tomatoes-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/connectors": patch ---- - -Fixed `walletConnect#connect` by moving chain switch directly inside instead of relying on `getProvider`. diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 27459c7fbc..7a303bbf54 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/connectors +## 5.9.8 + +### Patch Changes + +- [#4691](https://github.com/wevm/wagmi/pull/4691) [`a03da817a388646c9b4885792101a67eef3616e7`](https://github.com/wevm/wagmi/commit/a03da817a388646c9b4885792101a67eef3616e7) Thanks [@frolic](https://github.com/frolic)! - Fixed `walletConnect#connect` by moving chain switch directly inside instead of relying on `getProvider`. + ## 5.9.7 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index dd96cb906d..1f629f86d1 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "5.9.7", + "version": "5.9.8", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index bd43ba1d45..8fb615cb58 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '5.9.7' +export const version = '5.9.8' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 4b9a9af5b4..c8b754fd65 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,12 @@ # wagmi +## 2.16.8 + +### Patch Changes + +- Updated dependencies [[`a03da817a388646c9b4885792101a67eef3616e7`](https://github.com/wevm/wagmi/commit/a03da817a388646c9b4885792101a67eef3616e7)]: + - @wagmi/connectors@5.9.8 + ## 2.16.7 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 0139f82d16..b3dddbfae5 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.16.7", + "version": "2.16.8", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index 17faaa2ac7..233c98ca9f 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.16.7' +export const version = '2.16.8' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index c785de967e..338dafe6cd 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/vue +## 0.2.4 + +### Patch Changes + +- Updated dependencies [[`a03da817a388646c9b4885792101a67eef3616e7`](https://github.com/wevm/wagmi/commit/a03da817a388646c9b4885792101a67eef3616e7)]: + - @wagmi/connectors@5.9.8 + ## 0.2.3 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index 1e0b235458..eabf98b519 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.2.3", + "version": "0.2.4", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index b11746bca3..5c6d057266 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.2.3' +export const version = '0.2.4' From ce06e137e7bfaf000464b1cecd6c86e19a66ebcf Mon Sep 17 00:00:00 2001 From: Ivan Akulov Date: Fri, 29 Aug 2025 22:10:07 +0200 Subject: [PATCH 084/213] fix(deepEqual): support objects with null prototypes (#4752) * fix(deepEqual): support objects with null prototypes * chore: add a changeset * chore: tweaks --------- Co-authored-by: Tom Meagher --- .changeset/rich-teams-care.md | 5 +++++ packages/core/src/actions/getConnectors.test.ts | 1 + packages/core/src/actions/getConnectors.ts | 4 ++-- packages/core/src/utils/deepEqual.ts | 10 ++++++++-- 4 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .changeset/rich-teams-care.md diff --git a/.changeset/rich-teams-care.md b/.changeset/rich-teams-care.md new file mode 100644 index 0000000000..dff7dc778c --- /dev/null +++ b/.changeset/rich-teams-care.md @@ -0,0 +1,5 @@ +--- +"@wagmi/core": patch +--- + +Fixed `deepEqual` crashing for objects with no prototype diff --git a/packages/core/src/actions/getConnectors.test.ts b/packages/core/src/actions/getConnectors.test.ts index d15f5fbb08..9a568668f6 100644 --- a/packages/core/src/actions/getConnectors.test.ts +++ b/packages/core/src/actions/getConnectors.test.ts @@ -5,4 +5,5 @@ import { getConnectors } from './getConnectors.js' test('default', () => { expect(getConnectors(config)).toEqual(config.connectors) + expect(getConnectors(config)).toEqual(config.connectors) }) diff --git a/packages/core/src/actions/getConnectors.ts b/packages/core/src/actions/getConnectors.ts index 439362d3f4..2c972a026d 100644 --- a/packages/core/src/actions/getConnectors.ts +++ b/packages/core/src/actions/getConnectors.ts @@ -1,5 +1,4 @@ import type { Config, Connector } from '../createConfig.js' -import { deepEqual } from '../utils/deepEqual.js' export type GetConnectorsReturnType = config['connectors'] @@ -11,7 +10,8 @@ export function getConnectors( config: config, ): GetConnectorsReturnType { const connectors = config.connectors - if (deepEqual(previousConnectors, connectors)) return previousConnectors + if (previousConnectors.map((c) => c.uid) === connectors.map((c) => c.uid)) + return previousConnectors previousConnectors = connectors return connectors } diff --git a/packages/core/src/utils/deepEqual.ts b/packages/core/src/utils/deepEqual.ts index 760801c6bc..253fe1bdf1 100644 --- a/packages/core/src/utils/deepEqual.ts +++ b/packages/core/src/utils/deepEqual.ts @@ -16,9 +16,15 @@ export function deepEqual(a: any, b: any) { return true } - if (a.valueOf !== Object.prototype.valueOf) + if ( + typeof a.valueOf === 'function' && + a.valueOf !== Object.prototype.valueOf + ) return a.valueOf() === b.valueOf() - if (a.toString !== Object.prototype.toString) + if ( + typeof a.toString === 'function' && + a.toString !== Object.prototype.toString + ) return a.toString() === b.toString() const keys = Object.keys(a) From d26063717aaf138e7a6f3d8ed7e606d9c59418b0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 16:59:53 -0400 Subject: [PATCH 085/213] chore: version packages (#4777) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/rich-teams-care.md | 5 ----- packages/connectors/CHANGELOG.md | 7 +++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/core/src/version.ts | 2 +- packages/react/CHANGELOG.md | 8 ++++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 8 ++++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 13 files changed, 37 insertions(+), 13 deletions(-) delete mode 100644 .changeset/rich-teams-care.md diff --git a/.changeset/rich-teams-care.md b/.changeset/rich-teams-care.md deleted file mode 100644 index dff7dc778c..0000000000 --- a/.changeset/rich-teams-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/core": patch ---- - -Fixed `deepEqual` crashing for objects with no prototype diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 7a303bbf54..f98bb142bd 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/connectors +## 5.9.9 + +### Patch Changes + +- Updated dependencies [[`ce06e137e7bfaf000464b1cecd6c86e19a66ebcf`](https://github.com/wevm/wagmi/commit/ce06e137e7bfaf000464b1cecd6c86e19a66ebcf)]: + - @wagmi/core@2.20.3 + ## 5.9.8 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 1f629f86d1..d779022ce6 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "5.9.8", + "version": "5.9.9", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index 8fb615cb58..63ac60549b 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '5.9.8' +export const version = '5.9.9' diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 1714ac3e34..a3828b6b16 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/core +## 2.20.3 + +### Patch Changes + +- [#4752](https://github.com/wevm/wagmi/pull/4752) [`ce06e137e7bfaf000464b1cecd6c86e19a66ebcf`](https://github.com/wevm/wagmi/commit/ce06e137e7bfaf000464b1cecd6c86e19a66ebcf) Thanks [@iamakulov](https://github.com/iamakulov)! - Fixed `deepEqual` crashing for objects with no prototype + ## 2.20.2 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index e37490a909..a443e04490 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/core", "description": "VanillaJS library for Ethereum", - "version": "2.20.2", + "version": "2.20.3", "license": "MIT", "repository": { "type": "git", diff --git a/packages/core/src/version.ts b/packages/core/src/version.ts index 883bc1fea4..65e020412a 100644 --- a/packages/core/src/version.ts +++ b/packages/core/src/version.ts @@ -1 +1 @@ -export const version = '2.20.2' +export const version = '2.20.3' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index c8b754fd65..682ec8331e 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,13 @@ # wagmi +## 2.16.9 + +### Patch Changes + +- Updated dependencies [[`ce06e137e7bfaf000464b1cecd6c86e19a66ebcf`](https://github.com/wevm/wagmi/commit/ce06e137e7bfaf000464b1cecd6c86e19a66ebcf)]: + - @wagmi/core@2.20.3 + - @wagmi/connectors@5.9.9 + ## 2.16.8 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index b3dddbfae5..75b99cc61c 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.16.8", + "version": "2.16.9", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index 233c98ca9f..0fec3d63ac 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.16.8' +export const version = '2.16.9' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index 338dafe6cd..5ad51c31ab 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,13 @@ # @wagmi/vue +## 0.2.5 + +### Patch Changes + +- Updated dependencies [[`ce06e137e7bfaf000464b1cecd6c86e19a66ebcf`](https://github.com/wevm/wagmi/commit/ce06e137e7bfaf000464b1cecd6c86e19a66ebcf)]: + - @wagmi/core@2.20.3 + - @wagmi/connectors@5.9.9 + ## 0.2.4 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index eabf98b519..753fa05ddc 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.2.4", + "version": "0.2.5", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index 5c6d057266..b986ee9c99 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.2.4' +export const version = '0.2.5' From 4cdb67b743ecf886322354d8c33df41f472f1185 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 14:56:00 -0400 Subject: [PATCH 086/213] chore(deps): bump actions/checkout from 4 to 5 (#4778) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/changesets.yml | 2 +- .github/workflows/pull-request.yml | 2 +- .github/workflows/snapshot.yml | 2 +- .github/workflows/verify.yml | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/changesets.yml b/.github/workflows/changesets.yml index 2f40322bd3..72943656aa 100644 --- a/.github/workflows/changesets.yml +++ b/.github/workflows/changesets.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Clone repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits fetch-depth: 0 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index fbfa480c62..8900a6fb0f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Clone repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install dependencies uses: wevm/actions/.github/actions/pnpm@main diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 39683bb684..590c9e3fdd 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Clone repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install dependencies uses: wevm/actions/.github/actions/pnpm@main diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index b992891abf..b815b58083 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Clone repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: token: ${{ secrets.GH_PTOKEN }} @@ -47,7 +47,7 @@ jobs: steps: - name: Clone repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install dependencies uses: wevm/actions/.github/actions/pnpm@main @@ -75,7 +75,7 @@ jobs: steps: - name: Clone repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install dependencies uses: wevm/actions/.github/actions/pnpm@main @@ -107,7 +107,7 @@ jobs: steps: - name: Clone repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install dependencies uses: wevm/actions/.github/actions/pnpm@main From 6f690525e3e580815d620d9a9106222168f1180a Mon Sep 17 00:00:00 2001 From: Ilyas Date: Wed, 17 Sep 2025 00:26:51 +0200 Subject: [PATCH 087/213] chore(docs): remove .html extension from viem links (#4785) * chore(docs): remove .html extension from viem links * chore(docs): remove accidental script file --- site/core/api/actions/call.md | 8 ++++---- site/core/api/actions/deployContract.md | 2 +- site/core/api/actions/estimateFeesPerGas.md | 4 ++-- site/core/api/actions/estimateGas.md | 8 ++++---- .../api/actions/estimateMaxPriorityFeePerGas.md | 2 +- site/core/api/actions/getBalance.md | 4 ++-- site/core/api/actions/getBlock.md | 4 ++-- site/core/api/actions/getBlockNumber.md | 4 ++-- .../core/api/actions/getBlockTransactionCount.md | 2 +- site/core/api/actions/getClient.md | 4 ++-- site/core/api/actions/getConnectorClient.md | 4 ++-- site/core/api/actions/getEnsAddress.md | 2 +- site/core/api/actions/getEnsAvatar.md | 2 +- site/core/api/actions/getEnsName.md | 2 +- site/core/api/actions/getEnsResolver.md | 2 +- site/core/api/actions/getEnsText.md | 2 +- site/core/api/actions/getFeeHistory.md | 4 ++-- site/core/api/actions/getGasPrice.md | 2 +- site/core/api/actions/getProof.md | 2 +- site/core/api/actions/getPublicClient.md | 6 +++--- site/core/api/actions/getTransaction.md | 4 ++-- .../api/actions/getTransactionConfirmations.md | 2 +- site/core/api/actions/getTransactionCount.md | 2 +- site/core/api/actions/getTransactionReceipt.md | 6 +++--- site/core/api/actions/getWalletClient.md | 6 +++--- site/core/api/actions/multicall.md | 2 +- .../api/actions/prepareTransactionRequest.md | 10 +++++----- site/core/api/actions/readContract.md | 2 +- site/core/api/actions/readContracts.md | 4 ++-- site/core/api/actions/sendTransaction.md | 10 +++++----- site/core/api/actions/signMessage.md | 4 ++-- site/core/api/actions/signTypedData.md | 4 ++-- site/core/api/actions/simulateContract.md | 8 ++++---- site/core/api/actions/switchChain.md | 2 +- site/core/api/actions/verifyMessage.md | 2 +- site/core/api/actions/verifyTypedData.md | 2 +- .../api/actions/waitForTransactionReceipt.md | 4 ++-- site/core/api/actions/watchAsset.md | 2 +- site/core/api/actions/watchBlockNumber.md | 2 +- site/core/api/actions/watchBlocks.md | 2 +- site/core/api/actions/watchContractEvent.md | 2 +- .../core/api/actions/watchPendingTransactions.md | 2 +- site/core/api/actions/writeContract.md | 10 +++++----- site/core/guides/migrate-from-v1-to-v2.md | 10 +++++----- site/core/guides/viem.md | 2 +- site/react/api/hooks/useCall.md | 6 +++--- site/react/api/hooks/useClient.md | 4 ++-- site/react/api/hooks/useConnectorClient.md | 2 +- site/react/api/hooks/useEstimateGas.md | 6 +++--- .../api/hooks/usePrepareTransactionRequest.md | 6 +++--- site/react/api/hooks/usePublicClient.md | 6 +++--- site/react/api/hooks/useSimulateContract.md | 6 +++--- site/react/api/hooks/useTransactionReceipt.md | 2 +- site/react/api/hooks/useWalletClient.md | 4 ++-- site/react/guides/migrate-from-v1-to-v2.md | 6 +++--- site/react/guides/viem.md | 2 +- site/shared/createConfig.md | 16 ++++++++-------- site/shared/installation.md | 2 +- site/shared/transports/custom.md | 2 +- site/shared/transports/fallback.md | 2 +- site/shared/transports/http.md | 2 +- site/shared/transports/webSocket.md | 2 +- site/vue/api/composables/useClient.md | 4 ++-- site/vue/api/composables/useConnectorClient.md | 2 +- site/vue/api/composables/useEstimateGas.md | 6 +++--- site/vue/api/composables/useSimulateContract.md | 6 +++--- .../vue/api/composables/useTransactionReceipt.md | 2 +- site/vue/guides/viem.md | 2 +- 68 files changed, 137 insertions(+), 137 deletions(-) diff --git a/site/core/api/actions/call.md b/site/core/api/actions/call.md index 52f202a570..1b151fbff3 100644 --- a/site/core/api/actions/call.md +++ b/site/core/api/actions/call.md @@ -147,7 +147,7 @@ await call(config, { `bigint | undefined` -The price (in wei) to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price (in wei) to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```ts [index.ts] @@ -169,7 +169,7 @@ await call(config, { `bigint | undefined` -Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -191,7 +191,7 @@ await call(config, { `bigint | undefined` -Max priority fee per gas (in wei). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas (in wei). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -337,4 +337,4 @@ import { type CallErrorType } from '@wagmi/core' ## Viem -- [`call`](https://viem.sh/docs/actions/public/call.html) +- [`call`](https://viem.sh/docs/actions/public/call) diff --git a/site/core/api/actions/deployContract.md b/site/core/api/actions/deployContract.md index 3cdbfd130f..cfd18510db 100644 --- a/site/core/api/actions/deployContract.md +++ b/site/core/api/actions/deployContract.md @@ -247,7 +247,7 @@ export const wagmiAbi = [ import { type DeployContractReturnType } from '@wagmi/core' ``` -[`Hash`](https://viem.sh/docs/glossary/types.html#hash) +[`Hash`](https://viem.sh/docs/glossary/types#hash) Transaction hash. diff --git a/site/core/api/actions/estimateFeesPerGas.md b/site/core/api/actions/estimateFeesPerGas.md index ce804efeb9..b11cc85e3e 100644 --- a/site/core/api/actions/estimateFeesPerGas.md +++ b/site/core/api/actions/estimateFeesPerGas.md @@ -95,7 +95,7 @@ const result = estimateFeesPerGas(config, { import { type EstimateFeesPerGasReturnType } from '@wagmi/core' ``` -[`FeeValues`](https://viem.sh/docs/glossary/types.html#feevalues) +[`FeeValues`](https://viem.sh/docs/glossary/types#feevalues) An estimate (in wei) for the fees per gas. @@ -136,4 +136,4 @@ import { type EstimateFeesPerGasErrorType } from '@wagmi/core' ## Viem -- [`estimateFeesPerGas`](https://viem.sh/docs/actions/public/estimateFeesPerGas.html) +- [`estimateFeesPerGas`](https://viem.sh/docs/actions/public/estimateFeesPerGas) diff --git a/site/core/api/actions/estimateGas.md b/site/core/api/actions/estimateGas.md index cbeb1ba40d..2a1f243fee 100644 --- a/site/core/api/actions/estimateGas.md +++ b/site/core/api/actions/estimateGas.md @@ -173,7 +173,7 @@ const result = await estimateGas(config, { `bigint | undefined` -The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```ts [index.ts] @@ -194,7 +194,7 @@ const result = await estimateGas(config, { `bigint | undefined` -Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -215,7 +215,7 @@ const result = await estimateGas(config, { `bigint | undefined` -Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -337,4 +337,4 @@ import { type EstimateGasErrorType } from '@wagmi/core' ## Viem -- [`estimateGas`](https://viem.sh/docs/actions/public/estimateGas.html) +- [`estimateGas`](https://viem.sh/docs/actions/public/estimateGas) diff --git a/site/core/api/actions/estimateMaxPriorityFeePerGas.md b/site/core/api/actions/estimateMaxPriorityFeePerGas.md index 906e98b931..468504bcb5 100644 --- a/site/core/api/actions/estimateMaxPriorityFeePerGas.md +++ b/site/core/api/actions/estimateMaxPriorityFeePerGas.md @@ -71,4 +71,4 @@ import { type EstimateFeesPerGasErrorType } from '@wagmi/core' ## Viem -- [`estimateMaxPriorityFeePerGas`](https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas.html) +- [`estimateMaxPriorityFeePerGas`](https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas) diff --git a/site/core/api/actions/getBalance.md b/site/core/api/actions/getBalance.md index 192d5a69ce..53ceafe454 100644 --- a/site/core/api/actions/getBalance.md +++ b/site/core/api/actions/getBalance.md @@ -193,5 +193,5 @@ import { type GetBalanceErrorType } from '@wagmi/core' ## Viem -- [`getBalance`](https://viem.sh/docs/actions/public/getBalance.html) for native currency balances -- [`multicall`](https://viem.sh/docs/actions/public/multicall.html) for token balances +- [`getBalance`](https://viem.sh/docs/actions/public/getBalance) for native currency balances +- [`multicall`](https://viem.sh/docs/actions/public/multicall) for token balances diff --git a/site/core/api/actions/getBlock.md b/site/core/api/actions/getBlock.md index 980b026247..a6ec92ade9 100644 --- a/site/core/api/actions/getBlock.md +++ b/site/core/api/actions/getBlock.md @@ -129,7 +129,7 @@ const blockNumber = await getBlock(config, { import { type GetBlockReturnType } from '@wagmi/core' ``` -[`Block`](https://viem.sh/docs/glossary/types.html#block) +[`Block`](https://viem.sh/docs/glossary/types#block) Information about the block. @@ -143,4 +143,4 @@ import { type GetBlockErrorType } from '@wagmi/core' ## Viem -- [`getBlock`](https://viem.sh/docs/actions/public/getBlock.html) +- [`getBlock`](https://viem.sh/docs/actions/public/getBlock) diff --git a/site/core/api/actions/getBlockNumber.md b/site/core/api/actions/getBlockNumber.md index ce13cbb14e..2ac9e3622c 100644 --- a/site/core/api/actions/getBlockNumber.md +++ b/site/core/api/actions/getBlockNumber.md @@ -89,5 +89,5 @@ import { type GetBlockNumberErrorType } from '@wagmi/core' ## Viem -- [`getBlockNumber`](https://viem.sh/docs/actions/public/getBlockNumber.html) -- [`watchBlockNumber`](https://viem.sh/docs/actions/public/watchBlockNumber.html) +- [`getBlockNumber`](https://viem.sh/docs/actions/public/getBlockNumber) +- [`watchBlockNumber`](https://viem.sh/docs/actions/public/watchBlockNumber) diff --git a/site/core/api/actions/getBlockTransactionCount.md b/site/core/api/actions/getBlockTransactionCount.md index c351272209..d3fa5fee5f 100644 --- a/site/core/api/actions/getBlockTransactionCount.md +++ b/site/core/api/actions/getBlockTransactionCount.md @@ -89,4 +89,4 @@ import { type GetBlockTransactionCountErrorType } from '@wagmi/core' ## Viem -- [`getBlockTransactionCount`](https://viem.sh/docs/actions/public/getBlockTransactionCount.html) +- [`getBlockTransactionCount`](https://viem.sh/docs/actions/public/getBlockTransactionCount) diff --git a/site/core/api/actions/getClient.md b/site/core/api/actions/getClient.md index 9f29f73236..72d7739f42 100644 --- a/site/core/api/actions/getClient.md +++ b/site/core/api/actions/getClient.md @@ -1,6 +1,6 @@ # getClient -Action for getting Viem [`Client`](https://viem.sh/docs/clients/custom.html) instance. +Action for getting Viem [`Client`](https://viem.sh/docs/clients/custom) instance. ## Import @@ -53,4 +53,4 @@ import { type GetClientReturnType } from '@wagmi/core' `Client` -Viem [`Client`](https://viem.sh/docs/clients/custom.html) instance. +Viem [`Client`](https://viem.sh/docs/clients/custom) instance. diff --git a/site/core/api/actions/getConnectorClient.md b/site/core/api/actions/getConnectorClient.md index 46d2795c7a..028094406e 100644 --- a/site/core/api/actions/getConnectorClient.md +++ b/site/core/api/actions/getConnectorClient.md @@ -6,7 +6,7 @@ const typeName = 'GetConnectorClient' # getConnectorClient -Action for getting a Viem [`Client`](https://viem.sh/docs/clients/custom.html) object for the current or provided connector. +Action for getting a Viem [`Client`](https://viem.sh/docs/clients/custom) object for the current or provided connector. ## Import @@ -97,7 +97,7 @@ import { type GetChainIdReturnType } from '@wagmi/core' `Client` -Viem [`Client`](https://viem.sh/docs/clients/custom.html) object for the current or provided connector. +Viem [`Client`](https://viem.sh/docs/clients/custom) object for the current or provided connector. ## Error diff --git a/site/core/api/actions/getEnsAddress.md b/site/core/api/actions/getEnsAddress.md index dc44dbb732..cc3bf07e3f 100644 --- a/site/core/api/actions/getEnsAddress.md +++ b/site/core/api/actions/getEnsAddress.md @@ -184,4 +184,4 @@ import { type GetEnsAddressErrorType } from '@wagmi/core' ## Viem -- [`getEnsAddress`](https://viem.sh/docs/ens/actions/getEnsAddress.html) +- [`getEnsAddress`](https://viem.sh/docs/ens/actions/getEnsAddress) diff --git a/site/core/api/actions/getEnsAvatar.md b/site/core/api/actions/getEnsAvatar.md index b7da4aa0f0..287452ce66 100644 --- a/site/core/api/actions/getEnsAvatar.md +++ b/site/core/api/actions/getEnsAvatar.md @@ -207,4 +207,4 @@ import { type getEnsAvatarError } from '@wagmi/core' ## Viem -- [`getEnsAvatar`](https://viem.sh/docs/ens/actions/getEnsAvatar.html) +- [`getEnsAvatar`](https://viem.sh/docs/ens/actions/getEnsAvatar) diff --git a/site/core/api/actions/getEnsName.md b/site/core/api/actions/getEnsName.md index f663923f94..ee234f9553 100644 --- a/site/core/api/actions/getEnsName.md +++ b/site/core/api/actions/getEnsName.md @@ -154,4 +154,4 @@ import { type GetEnsNameErrorType } from '@wagmi/core' ## Viem -- [`getEnsName`](https://viem.sh/docs/ens/actions/getEnsName.html) +- [`getEnsName`](https://viem.sh/docs/ens/actions/getEnsName) diff --git a/site/core/api/actions/getEnsResolver.md b/site/core/api/actions/getEnsResolver.md index c73301e071..4a95b4b779 100644 --- a/site/core/api/actions/getEnsResolver.md +++ b/site/core/api/actions/getEnsResolver.md @@ -164,4 +164,4 @@ import { type getEnsResolverError } from '@wagmi/core' ## Viem -- [`getEnsResolver`](https://viem.sh/docs/ens/actions/getEnsResolver.html) +- [`getEnsResolver`](https://viem.sh/docs/ens/actions/getEnsResolver) diff --git a/site/core/api/actions/getEnsText.md b/site/core/api/actions/getEnsText.md index a5ffb8ed5a..ec4d119382 100644 --- a/site/core/api/actions/getEnsText.md +++ b/site/core/api/actions/getEnsText.md @@ -192,4 +192,4 @@ import { type getEnsTextError } from '@wagmi/core' ## Viem -- [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText.html) +- [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) diff --git a/site/core/api/actions/getFeeHistory.md b/site/core/api/actions/getFeeHistory.md index 3787d8f66b..22001da3d6 100644 --- a/site/core/api/actions/getFeeHistory.md +++ b/site/core/api/actions/getFeeHistory.md @@ -140,7 +140,7 @@ const feeHistory = await getFeeHistory(config, { import { type GetFeeHistoryReturnType } from '@wagmi/core' ``` -[`FeeHistory`](https://viem.sh/docs/glossary/types.html#feehistory) +[`FeeHistory`](https://viem.sh/docs/glossary/types#feehistory) The fee history. @@ -154,4 +154,4 @@ import { type GetFeeHistoryErrorType } from '@wagmi/core' ## Viem -- [`getFeeHistory`](https://viem.sh/docs/actions/public/getFeeHistory.html) +- [`getFeeHistory`](https://viem.sh/docs/actions/public/getFeeHistory) diff --git a/site/core/api/actions/getGasPrice.md b/site/core/api/actions/getGasPrice.md index 106829fcfd..632203d159 100644 --- a/site/core/api/actions/getGasPrice.md +++ b/site/core/api/actions/getGasPrice.md @@ -71,4 +71,4 @@ import { type GetGasPriceErrorType } from '@wagmi/core' ## Viem -- [`getGasPrice`](https://viem.sh/docs/actions/public/getGasPrice.html) +- [`getGasPrice`](https://viem.sh/docs/actions/public/getGasPrice) diff --git a/site/core/api/actions/getProof.md b/site/core/api/actions/getProof.md index 60cd493260..2a6b3ba39c 100644 --- a/site/core/api/actions/getProof.md +++ b/site/core/api/actions/getProof.md @@ -166,4 +166,4 @@ import { type GetProofErrorType } from '@wagmi/core' ## Viem -- [`getProof`](https://viem.sh/docs/actions/public/getProof.html) +- [`getProof`](https://viem.sh/docs/actions/public/getProof) diff --git a/site/core/api/actions/getPublicClient.md b/site/core/api/actions/getPublicClient.md index 437104aa78..2c30add85a 100644 --- a/site/core/api/actions/getPublicClient.md +++ b/site/core/api/actions/getPublicClient.md @@ -1,6 +1,6 @@ # getPublicClient -Action for getting Viem [`PublicClient`](https://viem.sh/docs/clients/public.html) instance. +Action for getting Viem [`PublicClient`](https://viem.sh/docs/clients/public) instance. ## Import @@ -21,7 +21,7 @@ const client = getPublicClient(config) ::: ::: warning -If you want to optimize bundle size, you should use [`getClient`](/core/api/actions/getClient) along with Viem's [tree-shakable actions](https://viem.sh/docs/clients/custom.html#tree-shaking) instead. Since Public Client has all public actions attached directly to it. +If you want to optimize bundle size, you should use [`getClient`](/core/api/actions/getClient) along with Viem's [tree-shakable actions](https://viem.sh/docs/clients/custom#tree-shaking) instead. Since Public Client has all public actions attached directly to it. ::: ## Parameters @@ -57,4 +57,4 @@ import { type GetPublicClientReturnType } from '@wagmi/core' `PublicClient | undefined` -Viem [`PublicClient`](https://viem.sh/docs/clients/public.html) instance. +Viem [`PublicClient`](https://viem.sh/docs/clients/public) instance. diff --git a/site/core/api/actions/getTransaction.md b/site/core/api/actions/getTransaction.md index 8ebe770990..43b11f8eb2 100644 --- a/site/core/api/actions/getTransaction.md +++ b/site/core/api/actions/getTransaction.md @@ -158,7 +158,7 @@ const transaction = getTransaction(config, { import { type GetTransactionReturnType } from '@wagmi/core' ``` -[`Transaction`](https://viem.sh/docs/glossary/types.html#transaction) +[`Transaction`](https://viem.sh/docs/glossary/types#transaction) ## Error @@ -170,4 +170,4 @@ import { type GetTransactionErrorType } from '@wagmi/core' ## Viem -- [`getTransaction`](https://viem.sh/docs/actions/public/getTransaction.html) +- [`getTransaction`](https://viem.sh/docs/actions/public/getTransaction) diff --git a/site/core/api/actions/getTransactionConfirmations.md b/site/core/api/actions/getTransactionConfirmations.md index eb42df19ac..8263e32380 100644 --- a/site/core/api/actions/getTransactionConfirmations.md +++ b/site/core/api/actions/getTransactionConfirmations.md @@ -114,4 +114,4 @@ import { type GetTransactionConfirmationsErrorType } from '@wagmi/core' ## Viem -- [`getTransactionConfirmations`](https://viem.sh/docs/actions/public/getTransactionConfirmations.html) +- [`getTransactionConfirmations`](https://viem.sh/docs/actions/public/getTransactionConfirmations) diff --git a/site/core/api/actions/getTransactionCount.md b/site/core/api/actions/getTransactionCount.md index d08987c84d..6313abd07e 100644 --- a/site/core/api/actions/getTransactionCount.md +++ b/site/core/api/actions/getTransactionCount.md @@ -136,4 +136,4 @@ import { type GetTransactionCountErrorType } from '@wagmi/core' ## Viem -- [`getTransactionCount`](https://viem.sh/docs/actions/public/getTransactionCount.html) +- [`getTransactionCount`](https://viem.sh/docs/actions/public/getTransactionCount) diff --git a/site/core/api/actions/getTransactionReceipt.md b/site/core/api/actions/getTransactionReceipt.md index d0687ac63e..e349555c3e 100644 --- a/site/core/api/actions/getTransactionReceipt.md +++ b/site/core/api/actions/getTransactionReceipt.md @@ -6,7 +6,7 @@ const typeName = 'getTransactionReceipt' # getTransactionReceipt -Action for return the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. +Action for return the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. ## Import @@ -78,7 +78,7 @@ await getTransactionReceipt(config, { import { type GetTransactionReceiptReturnType } from '@wagmi/core' ``` -[`TransactionReceipt`](https://viem.sh/docs/glossary/types.html#transactionreceipt) +[`TransactionReceipt`](https://viem.sh/docs/glossary/types#transactionreceipt) The transaction receipt. @@ -92,4 +92,4 @@ import { type GetTransactionReceiptErrorType } from '@wagmi/core' ## Viem -- [`getTransactionReceipt`](https://viem.sh/docs/actions/public/getTransactionReceipt.html) +- [`getTransactionReceipt`](https://viem.sh/docs/actions/public/getTransactionReceipt) diff --git a/site/core/api/actions/getWalletClient.md b/site/core/api/actions/getWalletClient.md index a321b3637c..9eecc8a0e2 100644 --- a/site/core/api/actions/getWalletClient.md +++ b/site/core/api/actions/getWalletClient.md @@ -6,7 +6,7 @@ const typeName = 'GetWalletClient' # getWalletClient -Action for getting a Viem [`WalletClient`](https://viem.sh/docs/clients/wallet.html) object for the current or provided connector. +Action for getting a Viem [`WalletClient`](https://viem.sh/docs/clients/wallet) object for the current or provided connector. ## Import @@ -27,7 +27,7 @@ const client = getWalletClient(config) ::: ::: warning -If you want to optimize bundle size, you should use [`getConnectorClient`](/core/api/actions/getConnectorClient) along with Viem's [tree-shakable actions](https://viem.sh/docs/clients/custom.html#tree-shaking) instead. Since Wallet Client has all wallet actions attached directly to it. +If you want to optimize bundle size, you should use [`getConnectorClient`](/core/api/actions/getConnectorClient) along with Viem's [tree-shakable actions](https://viem.sh/docs/clients/custom#tree-shaking) instead. Since Wallet Client has all wallet actions attached directly to it. ::: ## Parameters @@ -101,7 +101,7 @@ import { type GetChainIdReturnType } from '@wagmi/core' `WalletClient` -Viem [`WalletClient`](https://viem.sh/docs/clients/wallet.html) object for the current or provided connector. +Viem [`WalletClient`](https://viem.sh/docs/clients/wallet) object for the current or provided connector. ## Error diff --git a/site/core/api/actions/multicall.md b/site/core/api/actions/multicall.md index ec46368d17..2f03f13bde 100644 --- a/site/core/api/actions/multicall.md +++ b/site/core/api/actions/multicall.md @@ -352,4 +352,4 @@ import { type MulticallErrorType } from '@wagmi/core' ## Viem -- [`multicall`](https://viem.sh/docs/actions/public/multicall.html) +- [`multicall`](https://viem.sh/docs/actions/public/multicall) diff --git a/site/core/api/actions/prepareTransactionRequest.md b/site/core/api/actions/prepareTransactionRequest.md index 1a1f1fc207..c2fb8c5cf9 100644 --- a/site/core/api/actions/prepareTransactionRequest.md +++ b/site/core/api/actions/prepareTransactionRequest.md @@ -154,7 +154,7 @@ await prepareTransactionRequest(config, { `bigint | undefined` -The price (in wei) to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price (in wei) to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```ts [index.ts] @@ -176,7 +176,7 @@ await prepareTransactionRequest(config, { `bigint | undefined` -Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -198,7 +198,7 @@ await prepareTransactionRequest(config, { `bigint | undefined` -Max priority fee per gas (in wei). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas (in wei). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -290,7 +290,7 @@ await prepareTransactionRequest(config, { import { type PrepareTransactionRequestReturnType } from '@wagmi/core' ``` -[`TransactionRequest`](https://viem.sh/docs/glossary/types.html#transactionrequest) +[`TransactionRequest`](https://viem.sh/docs/glossary/types#transactionrequest) The transaction request. @@ -304,4 +304,4 @@ import { type PrepareTransactionRequestErrorType } from '@wagmi/core' ## Viem -- [`prepareTransactionRequest`](https://viem.sh/docs/actions/wallet/prepareTransactionRequest.html) +- [`prepareTransactionRequest`](https://viem.sh/docs/actions/wallet/prepareTransactionRequest) diff --git a/site/core/api/actions/readContract.md b/site/core/api/actions/readContract.md index 80dfbb0b2e..c475869dc8 100644 --- a/site/core/api/actions/readContract.md +++ b/site/core/api/actions/readContract.md @@ -255,4 +255,4 @@ import { type ReadContractErrorType } from '@wagmi/core' ## Viem -- [`readContract`](https://viem.sh/docs/contract/readContract.html) +- [`readContract`](https://viem.sh/docs/contract/readContract) diff --git a/site/core/api/actions/readContracts.md b/site/core/api/actions/readContracts.md index 68faa929a1..d41f8e9863 100644 --- a/site/core/api/actions/readContracts.md +++ b/site/core/api/actions/readContracts.md @@ -359,5 +359,5 @@ import { type ReadContractsErrorType } from '@wagmi/core' ## Viem -- [`multicall`](https://viem.sh/docs/contract/multicall.html) when supported by current chain. -- [`readContract`](https://viem.sh/docs/contract/readContract.html) when multicall is not supported. +- [`multicall`](https://viem.sh/docs/contract/multicall) when supported by current chain. +- [`readContract`](https://viem.sh/docs/contract/readContract) when multicall is not supported. diff --git a/site/core/api/actions/sendTransaction.md b/site/core/api/actions/sendTransaction.md index e02e1908dc..5bb67ef701 100644 --- a/site/core/api/actions/sendTransaction.md +++ b/site/core/api/actions/sendTransaction.md @@ -174,7 +174,7 @@ const result = await sendTransaction(config, { `bigint | undefined` -The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```ts [index.ts] @@ -195,7 +195,7 @@ const result = await sendTransaction(config, { `bigint | undefined` -Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -216,7 +216,7 @@ const result = await sendTransaction(config, { `bigint | undefined` -Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -324,7 +324,7 @@ const result = await sendTransaction(config, { import { type SendTransactionReturnType } from '@wagmi/core' ``` -[`Hash`](https://viem.sh/docs/glossary/types.html#hash) +[`Hash`](https://viem.sh/docs/glossary/types#hash) Transaction hash. @@ -338,4 +338,4 @@ import { type SendTransactionErrorType } from '@wagmi/core' ## Viem -- [`sendTransaction`](https://viem.sh/docs/actions/wallet/sendTransaction.html) +- [`sendTransaction`](https://viem.sh/docs/actions/wallet/sendTransaction) diff --git a/site/core/api/actions/signMessage.md b/site/core/api/actions/signMessage.md index 23569146ac..7542c3826c 100644 --- a/site/core/api/actions/signMessage.md +++ b/site/core/api/actions/signMessage.md @@ -108,7 +108,7 @@ const result = await signMessage(config, { import { type SignMessageReturnType } from '@wagmi/core' ``` -[`Hex`](https://viem.sh/docs/glossary/types.html#hex) +[`Hex`](https://viem.sh/docs/glossary/types#hex) The signed message. @@ -122,4 +122,4 @@ import { type SignMessageErrorType } from '@wagmi/core' ## Viem -- [`signMessage`](https://viem.sh/docs/actions/wallet/signMessage.html) +- [`signMessage`](https://viem.sh/docs/actions/wallet/signMessage) diff --git a/site/core/api/actions/signTypedData.md b/site/core/api/actions/signTypedData.md index 757c87160f..17a454ae94 100644 --- a/site/core/api/actions/signTypedData.md +++ b/site/core/api/actions/signTypedData.md @@ -275,7 +275,7 @@ const result = await signTypedData(config, { import { type SignTypedDataReturnType } from '@wagmi/core' ``` -[`Hex`](https://viem.sh/docs/glossary/types.html#hex) +[`Hex`](https://viem.sh/docs/glossary/types#hex) The signed data. @@ -406,4 +406,4 @@ import { type SignTypedDataErrorType } from '@wagmi/core' ## Viem -- [`signTypedData`](https://viem.sh/docs/actions/wallet/signTypedData.html) +- [`signTypedData`](https://viem.sh/docs/actions/wallet/signTypedData) diff --git a/site/core/api/actions/simulateContract.md b/site/core/api/actions/simulateContract.md index b7884ef713..ecc349a729 100644 --- a/site/core/api/actions/simulateContract.md +++ b/site/core/api/actions/simulateContract.md @@ -391,7 +391,7 @@ const result = await simulateContract(config, { `bigint | undefined` -The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```ts [index.ts] @@ -420,7 +420,7 @@ const result = await simulateContract(config, { `bigint | undefined` -Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -449,7 +449,7 @@ const result = await simulateContract(config, { `bigint | undefined` -Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -595,4 +595,4 @@ import { type SimulateContractErrorType } from '@wagmi/core' ## Viem -- [`simulateContract`](https://viem.sh/docs/contract/simulateContract.html) +- [`simulateContract`](https://viem.sh/docs/contract/simulateContract) diff --git a/site/core/api/actions/switchChain.md b/site/core/api/actions/switchChain.md index c741e801c8..82c1a153b6 100644 --- a/site/core/api/actions/switchChain.md +++ b/site/core/api/actions/switchChain.md @@ -119,4 +119,4 @@ import { type SwitchChainErrorType } from '@wagmi/core' ## Viem -- [`switchChain`](https://viem.sh/docs/actions/wallet/switchChain.html) when connected. +- [`switchChain`](https://viem.sh/docs/actions/wallet/switchChain) when connected. diff --git a/site/core/api/actions/verifyMessage.md b/site/core/api/actions/verifyMessage.md index 93d46992b9..d58b7e7c18 100644 --- a/site/core/api/actions/verifyMessage.md +++ b/site/core/api/actions/verifyMessage.md @@ -197,4 +197,4 @@ import { type VerifyMessageErrorType } from '@wagmi/core' ## Viem -- [`verifyMessage`](https://viem.sh/docs/actions/public/verifyMessage.html) +- [`verifyMessage`](https://viem.sh/docs/actions/public/verifyMessage) diff --git a/site/core/api/actions/verifyTypedData.md b/site/core/api/actions/verifyTypedData.md index e9afa17ad4..8ed8efc83b 100644 --- a/site/core/api/actions/verifyTypedData.md +++ b/site/core/api/actions/verifyTypedData.md @@ -592,4 +592,4 @@ import { type VerifyTypedDataErrorType } from '@wagmi/core' ## Viem -- [`verifyTypedData`](https://viem.sh/docs/actions/public/verifyTypedData.html) +- [`verifyTypedData`](https://viem.sh/docs/actions/public/verifyTypedData) diff --git a/site/core/api/actions/waitForTransactionReceipt.md b/site/core/api/actions/waitForTransactionReceipt.md index 853189055d..313724e161 100644 --- a/site/core/api/actions/waitForTransactionReceipt.md +++ b/site/core/api/actions/waitForTransactionReceipt.md @@ -138,7 +138,7 @@ const transactionReceipt = await waitForTransactionReceipt(config, { import { type WaitForTransactionReceiptReturnType } from '@wagmi/core' ``` -[`TransactionReceipt`](https://viem.sh/docs/glossary/types.html#transactionreceipt) +[`TransactionReceipt`](https://viem.sh/docs/glossary/types#transactionreceipt) The transaction receipt. @@ -152,4 +152,4 @@ import { type WaitForTransactionReceiptErrorType } from '@wagmi/core' ## Viem -- [`waitForTransactionReceipt`](https://viem.sh/docs/actions/public/waitForTransactionReceipt.html) +- [`waitForTransactionReceipt`](https://viem.sh/docs/actions/public/waitForTransactionReceipt) diff --git a/site/core/api/actions/watchAsset.md b/site/core/api/actions/watchAsset.md index 394dadd7ae..96c9a3a419 100644 --- a/site/core/api/actions/watchAsset.md +++ b/site/core/api/actions/watchAsset.md @@ -130,5 +130,5 @@ import { type WatchAssetErrorType } from '@wagmi/core' ## Viem -- [`watchAsset`](https://viem.sh/docs/actions/wallet/watchAsset.html) +- [`watchAsset`](https://viem.sh/docs/actions/wallet/watchAsset) diff --git a/site/core/api/actions/watchBlockNumber.md b/site/core/api/actions/watchBlockNumber.md index 098fd6613e..c7e5d3dbb9 100644 --- a/site/core/api/actions/watchBlockNumber.md +++ b/site/core/api/actions/watchBlockNumber.md @@ -223,4 +223,4 @@ Function for cleaning up watcher. ## Viem -- [`watchBlockNumber`](https://viem.sh/docs/actions/public/watchBlockNumber.html) +- [`watchBlockNumber`](https://viem.sh/docs/actions/public/watchBlockNumber) diff --git a/site/core/api/actions/watchBlocks.md b/site/core/api/actions/watchBlocks.md index 892ef0005f..52eb107888 100644 --- a/site/core/api/actions/watchBlocks.md +++ b/site/core/api/actions/watchBlocks.md @@ -246,4 +246,4 @@ Function for cleaning up watcher. ## Viem -- [`watchBlocks`](https://viem.sh/docs/actions/public/watchBlocks.html) +- [`watchBlocks`](https://viem.sh/docs/actions/public/watchBlocks) diff --git a/site/core/api/actions/watchContractEvent.md b/site/core/api/actions/watchContractEvent.md index 91498f1784..f819cd280d 100644 --- a/site/core/api/actions/watchContractEvent.md +++ b/site/core/api/actions/watchContractEvent.md @@ -373,4 +373,4 @@ import { type WatchContractEventError } from '@wagmi/core' ## Viem -- [`watchContractEvent`](https://viem.sh/docs/contract/watchContractEvent.html) +- [`watchContractEvent`](https://viem.sh/docs/contract/watchContractEvent) diff --git a/site/core/api/actions/watchPendingTransactions.md b/site/core/api/actions/watchPendingTransactions.md index fe0e5c3885..6e332c9f6b 100644 --- a/site/core/api/actions/watchPendingTransactions.md +++ b/site/core/api/actions/watchPendingTransactions.md @@ -204,4 +204,4 @@ import { type WatchPendingTransactionsError } from '@wagmi/core' ## Viem -- [`watchPendingTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions.html) +- [`watchPendingTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions) diff --git a/site/core/api/actions/writeContract.md b/site/core/api/actions/writeContract.md index 34000d9d32..c9a12d11e3 100644 --- a/site/core/api/actions/writeContract.md +++ b/site/core/api/actions/writeContract.md @@ -362,7 +362,7 @@ const result = await writeContract(config, { `bigint | undefined` -The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```ts [index.ts] @@ -391,7 +391,7 @@ const result = await writeContract(config, { `bigint | undefined` -Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -420,7 +420,7 @@ const result = await writeContract(config, { `bigint | undefined` -Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -539,7 +539,7 @@ const result = await writeContract(config, { import { type WriteContractReturnType } from '@wagmi/core' ``` -[`Hash`](https://viem.sh/docs/glossary/types.html#hash) +[`Hash`](https://viem.sh/docs/glossary/types#hash) The transaction hash. @@ -557,4 +557,4 @@ import { type WriteContractErrorType } from '@wagmi/core' ## Viem -- [`writeContract`](https://viem.sh/docs/contract/writeContract.html) +- [`writeContract`](https://viem.sh/docs/contract/writeContract) diff --git a/site/core/guides/migrate-from-v1-to-v2.md b/site/core/guides/migrate-from-v1-to-v2.md index 6807ebafcd..b2f4f12725 100644 --- a/site/core/guides/migrate-from-v1-to-v2.md +++ b/site/core/guides/migrate-from-v1-to-v2.md @@ -78,7 +78,7 @@ The previous global `config` singleton made it so you couldn't use multiple `Con ### Removed `getContract` -Removed `getContract` export. Use Viem's [`getContract`](https://viem.sh/docs/contract/getContract.html) instead. +Removed `getContract` export. Use Viem's [`getContract`](https://viem.sh/docs/contract/getContract) instead. ```ts import { getContract } from '@wagmi/core' // [!code --] @@ -142,9 +142,9 @@ The `getNetwork` and `watchNetwork` actions were removed since the connected cha ### Removed `getWebSocketPublicClient` and `watchWebSocketPublicClient` -Viem [Transports](https://viem.sh/docs/clients/intro.html#transports) now determine the type of client that is returned. You can use [`getPublicClient`](/core/api/actions/getPublicClient) and [`watchPublicClient`](/core/api/actions/watchPublicClient) to retrieve Viem [`PublicClient`](https://viem.sh/docs/clients/public.html) instances. +Viem [Transports](https://viem.sh/docs/clients/intro#transports) now determine the type of client that is returned. You can use [`getPublicClient`](/core/api/actions/getPublicClient) and [`watchPublicClient`](/core/api/actions/watchPublicClient) to retrieve Viem [`PublicClient`](https://viem.sh/docs/clients/public) instances. -Alternatively, you can use [`getClient`](/core/api/actions/getClient) and [`watchClient`](/core/api/actions/watchClient) to retrieve plain Viem [`Client`](https://viem.sh/docs/clients/custom.html) instances. This is a better option for users that care about optimizing bundle size to be as small as possible. +Alternatively, you can use [`getClient`](/core/api/actions/getClient) and [`watchClient`](/core/api/actions/watchClient) to retrieve plain Viem [`Client`](https://viem.sh/docs/clients/custom) instances. This is a better option for users that care about optimizing bundle size to be as small as possible. ### Removed `watchReadContract`, `watchReadContracts`, and `watchReadMulticall` @@ -367,7 +367,7 @@ A number of errors were renamed to better reflect their functionality or replace ### Removed internal ENS normalization -Before v2, Wagmi handled ENS name normalization internally for `getEnsAddress`, `getEnsAvatar`, and `getEnsResolver`, using Viem's [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function. This added extra bundle size as full normalization is quite heavy. For v2, you must normalize ENS names yourself before passing them to these actions. You can use Viem's `normalize` function or any other function that performs [UTS-46 normalization](https://unicode.org/reports/tr46). +Before v2, Wagmi handled ENS name normalization internally for `getEnsAddress`, `getEnsAvatar`, and `getEnsResolver`, using Viem's [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function. This added extra bundle size as full normalization is quite heavy. For v2, you must normalize ENS names yourself before passing them to these actions. You can use Viem's `normalize` function or any other function that performs [UTS-46 normalization](https://unicode.org/reports/tr46). ::: code-group @@ -421,7 +421,7 @@ import { erc20Abi } from 'viem' // [!code ++] ### Removed `'@wagmi/core/providers/*` entrypoints -It never made sense that we would have provider URLs hardcoded in the Wagmi codebase. Use [Viem transports](https://viem.sh/docs/clients/intro.html#transports) along with RPC provider URLs instead. +It never made sense that we would have provider URLs hardcoded in the Wagmi codebase. Use [Viem transports](https://viem.sh/docs/clients/intro#transports) along with RPC provider URLs instead. ```ts import { alchemyProvider } from '@wagmi/core/providers/alchemy' // [!code --] diff --git a/site/core/guides/viem.md b/site/core/guides/viem.md index 20c9b9b3ea..4a9b4b0f90 100644 --- a/site/core/guides/viem.md +++ b/site/core/guides/viem.md @@ -6,7 +6,7 @@ ## Leveraging Viem Actions -All of the core [Wagmi Actions](/core/api/actions) are friendly wrappers around [Viem Actions](https://viem.sh/docs/actions/public/introduction.html) that inject a multi-chain and connector aware [Wagmi Config](/core/api/createConfig). +All of the core [Wagmi Actions](/core/api/actions) are friendly wrappers around [Viem Actions](https://viem.sh/docs/actions/public/introduction) that inject a multi-chain and connector aware [Wagmi Config](/core/api/createConfig). There may be cases where you might want to dig deeper and utilize Viem Actions directly (maybe an Action doesn't exist in Wagmi yet). In these cases, you can import Viem Actions directly via `viem/actions` and plug in a Viem Client returned by the [`getClient` Action](/core/api/actions/getClient). diff --git a/site/react/api/hooks/useCall.md b/site/react/api/hooks/useCall.md index 9bc2250cf2..aa3ca99b4d 100644 --- a/site/react/api/hooks/useCall.md +++ b/site/react/api/hooks/useCall.md @@ -160,7 +160,7 @@ function App() { `bigint | undefined` -The price (in wei) to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price (in wei) to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```tsx [index.tsx] @@ -182,7 +182,7 @@ function App() { `bigint | undefined` -Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```tsx [index.tsx] @@ -204,7 +204,7 @@ function App() { `bigint | undefined` -Max priority fee per gas (in wei). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas (in wei). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```tsx [index.tsx] diff --git a/site/react/api/hooks/useClient.md b/site/react/api/hooks/useClient.md index fc87a15e47..a6bbe5c0e2 100644 --- a/site/react/api/hooks/useClient.md +++ b/site/react/api/hooks/useClient.md @@ -5,7 +5,7 @@ description: Hook for getting Viem `Client` instance. # useClient -Hook for getting Viem [`Client`](https://viem.sh/docs/clients/custom.html) instance. +Hook for getting Viem [`Client`](https://viem.sh/docs/clients/custom) instance. ## Import @@ -81,7 +81,7 @@ import { type UseClientReturnType } from 'wagmi' `Client | undefined` -Viem [`Client`](https://viem.sh/docs/clients/custom.html) instance. +Viem [`Client`](https://viem.sh/docs/clients/custom) instance. ## Action diff --git a/site/react/api/hooks/useConnectorClient.md b/site/react/api/hooks/useConnectorClient.md index 60aa74b77d..7e8e127e41 100644 --- a/site/react/api/hooks/useConnectorClient.md +++ b/site/react/api/hooks/useConnectorClient.md @@ -14,7 +14,7 @@ const hideQueryOptions = ['gcTime', 'staleTime'] # useConnectorClient -Hook for getting a Viem [`Client`](https://viem.sh/docs/clients/custom.html) object for the current or provided connector. +Hook for getting a Viem [`Client`](https://viem.sh/docs/clients/custom) object for the current or provided connector. ## Import diff --git a/site/react/api/hooks/useEstimateGas.md b/site/react/api/hooks/useEstimateGas.md index db0707ca1a..b2137f28c5 100644 --- a/site/react/api/hooks/useEstimateGas.md +++ b/site/react/api/hooks/useEstimateGas.md @@ -189,7 +189,7 @@ function App() { `bigint | undefined` -The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```ts [index.ts] @@ -212,7 +212,7 @@ function App() { `bigint | undefined` -Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] @@ -235,7 +235,7 @@ function App() { `bigint | undefined` -Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```ts [index.ts] diff --git a/site/react/api/hooks/usePrepareTransactionRequest.md b/site/react/api/hooks/usePrepareTransactionRequest.md index 431fdda482..a19ca6c582 100644 --- a/site/react/api/hooks/usePrepareTransactionRequest.md +++ b/site/react/api/hooks/usePrepareTransactionRequest.md @@ -166,7 +166,7 @@ function App() { `bigint | undefined` -The price (in wei) to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price (in wei) to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```tsx [index.tsx] @@ -189,7 +189,7 @@ function App() { `bigint | undefined` -Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```tsx [index.tsx] @@ -212,7 +212,7 @@ function App() { `bigint | undefined` -Max priority fee per gas (in wei). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas (in wei). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```tsx [index.tsx] diff --git a/site/react/api/hooks/usePublicClient.md b/site/react/api/hooks/usePublicClient.md index 9f0411055b..553b402498 100644 --- a/site/react/api/hooks/usePublicClient.md +++ b/site/react/api/hooks/usePublicClient.md @@ -5,7 +5,7 @@ description: Hook for getting Viem `PublicClient` instance. # usePublicClient -Hook for getting Viem [`PublicClient`](https://viem.sh/docs/clients/public.html) instance. +Hook for getting Viem [`PublicClient`](https://viem.sh/docs/clients/public) instance. ## Import @@ -27,7 +27,7 @@ function App() { ::: ::: warning -If you want to optimize bundle size, you should use [`useClient`](/react/api/hooks/useClient) along with Viem's [tree-shakable actions](https://viem.sh/docs/clients/custom.html#tree-shaking) instead. Since Public Client has all public actions attached directly to it. +If you want to optimize bundle size, you should use [`useClient`](/react/api/hooks/useClient) along with Viem's [tree-shakable actions](https://viem.sh/docs/clients/custom#tree-shaking) instead. Since Public Client has all public actions attached directly to it. ::: ## Parameters @@ -85,7 +85,7 @@ import { type UsePublicClientReturnType } from 'wagmi' `PublicClient | undefined` -Viem [`PublicClient`](https://viem.sh/docs/clients/public.html) instance. +Viem [`PublicClient`](https://viem.sh/docs/clients/public) instance. ## Action diff --git a/site/react/api/hooks/useSimulateContract.md b/site/react/api/hooks/useSimulateContract.md index 03872f53e5..500f030a4d 100644 --- a/site/react/api/hooks/useSimulateContract.md +++ b/site/react/api/hooks/useSimulateContract.md @@ -450,7 +450,7 @@ function App() { `bigint | undefined` -The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```tsx [index.ts] @@ -481,7 +481,7 @@ function App() { `bigint | undefined` -Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```tsx [index.ts] @@ -512,7 +512,7 @@ function App() { `bigint | undefined` -Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```tsx [index.ts] diff --git a/site/react/api/hooks/useTransactionReceipt.md b/site/react/api/hooks/useTransactionReceipt.md index 2f909ee891..cccb32b56e 100644 --- a/site/react/api/hooks/useTransactionReceipt.md +++ b/site/react/api/hooks/useTransactionReceipt.md @@ -13,7 +13,7 @@ const TError = 'GetTransactionReceiptErrorType' # useTransactionReceipt -Hook for return the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. +Hook for return the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. ## Import diff --git a/site/react/api/hooks/useWalletClient.md b/site/react/api/hooks/useWalletClient.md index e6ee792c25..9b1d1c5294 100644 --- a/site/react/api/hooks/useWalletClient.md +++ b/site/react/api/hooks/useWalletClient.md @@ -14,7 +14,7 @@ const hideQueryOptions = ['gcTime', 'staleTime'] # useWalletClient -Hook for getting a Viem [`WalletClient`](https://viem.sh/docs/clients/wallet.html) object for the current or provided connector. +Hook for getting a Viem [`WalletClient`](https://viem.sh/docs/clients/wallet) object for the current or provided connector. ## Import @@ -36,7 +36,7 @@ function App() { ::: ::: warning -If you want to optimize bundle size, you should use [`useConnectorClient`](/react/api/hooks/useConnectorClient) along with Viem's [tree-shakable actions](https://viem.sh/docs/clients/custom.html#tree-shaking) instead. Since Wallet Client has all wallet actions attached directly to it. +If you want to optimize bundle size, you should use [`useConnectorClient`](/react/api/hooks/useConnectorClient) along with Viem's [tree-shakable actions](https://viem.sh/docs/clients/custom#tree-shaking) instead. Since Wallet Client has all wallet actions attached directly to it. ::: ## Parameters diff --git a/site/react/guides/migrate-from-v1-to-v2.md b/site/react/guides/migrate-from-v1-to-v2.md index 1374fd6eef..04a2e45baf 100644 --- a/site/react/guides/migrate-from-v1-to-v2.md +++ b/site/react/guides/migrate-from-v1-to-v2.md @@ -306,7 +306,7 @@ useAccountEffect({ // [!code ++] ### Removed `useWebSocketPublicClient` -The Wagmi [`Config`](/react/api/createConfig) does not separate transport types anymore. Simply use Viem's [`webSocket`](https://viem.sh/docs/clients/transports/websocket.html) transport instead when setting up your Wagmi `Config`. You can get Viem `Client` instance with this transport attached by using [`useClient`](/react/api/hooks/useClient) or [`usePublicClient`](/react/api/hooks/usePublicClient). +The Wagmi [`Config`](/react/api/createConfig) does not separate transport types anymore. Simply use Viem's [`webSocket`](https://viem.sh/docs/clients/transports/websocket) transport instead when setting up your Wagmi `Config`. You can get Viem `Client` instance with this transport attached by using [`useClient`](/react/api/hooks/useClient) or [`usePublicClient`](/react/api/hooks/usePublicClient). ### Removed `useInfiniteReadContracts` `paginatedIndexesConfig` @@ -422,7 +422,7 @@ A number of errors were renamed to better reflect their functionality or replace ### Removed internal ENS name normalization -Before v2, Wagmi handled ENS name normalization internally for `useEnsAddress`, `useEnsAvatar`, and `useEnsResolver`, using Viem's [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function. This added extra bundle size as full normalization is quite heavy. For v2, you must normalize ENS names yourself before passing them to these hooks. You can use Viem's `normalize` function or any other function that performs [UTS-46 normalization](https://unicode.org/reports/tr46). +Before v2, Wagmi handled ENS name normalization internally for `useEnsAddress`, `useEnsAvatar`, and `useEnsResolver`, using Viem's [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function. This added extra bundle size as full normalization is quite heavy. For v2, you must normalize ENS names yourself before passing them to these hooks. You can use Viem's `normalize` function or any other function that performs [UTS-46 normalization](https://unicode.org/reports/tr46). ```ts import { useEnsAddress } from 'wagmi' @@ -471,7 +471,7 @@ import { erc20Abi } from 'viem' // [!code ++] ### Removed `'wagmi/providers/*` entrypoints -It never made sense that we would have provider URLs hardcoded in the Wagmi codebase. Use [Viem transports](https://viem.sh/docs/clients/intro.html#transports) along with RPC provider URLs instead. +It never made sense that we would have provider URLs hardcoded in the Wagmi codebase. Use [Viem transports](https://viem.sh/docs/clients/intro#transports) along with RPC provider URLs instead. ```ts import { alchemyProvider } from 'wagmi/providers/alchemy' // [!code --] diff --git a/site/react/guides/viem.md b/site/react/guides/viem.md index b6a0b312f2..06e802f472 100644 --- a/site/react/guides/viem.md +++ b/site/react/guides/viem.md @@ -6,7 +6,7 @@ ## Leveraging Viem Actions -All of the core [Wagmi Hooks](/react/api/actions) are friendly wrappers around [Viem Actions](https://viem.sh/docs/actions/public/introduction.html) that inject a multi-chain and connector aware [Wagmi Config](/react/api/createConfig). +All of the core [Wagmi Hooks](/react/api/actions) are friendly wrappers around [Viem Actions](https://viem.sh/docs/actions/public/introduction) that inject a multi-chain and connector aware [Wagmi Config](/react/api/createConfig). There may be cases where you might want to dig deeper and utilize Viem Actions directly (maybe a Hook doesn't exist in Wagmi yet). In these cases, you can create your own custom Wagmi Hook by importing Viem Actions directly via `viem/actions` and plugging in a Viem Client returned by the [`useClient` Hook](/react/api/hooks/useClient). diff --git a/site/shared/createConfig.md b/site/shared/createConfig.md index bde2601794..4c3d2427aa 100644 --- a/site/shared/createConfig.md +++ b/site/shared/createConfig.md @@ -33,7 +33,7 @@ const config = createConfig({ ::: tip Integrating a Viem Client -Instead of using [`transports`](#transports), it's possible to provide a function that returns a Viem [`Client`](https://viem.sh/docs/clients/custom.html) via the [`client`](#client) property for more fine-grained control over Wagmi's internal `Client` creation. +Instead of using [`transports`](#transports), it's possible to provide a function that returns a Viem [`Client`](https://viem.sh/docs/clients/custom) via the [`client`](#client) property for more fine-grained control over Wagmi's internal `Client` creation. ```ts-vue {3,7-9} import { createConfig, http } from '{{packageName}}' @@ -185,7 +185,7 @@ const config = createConfig({ `{ multicall?: boolean | { batchSize?: number | undefined; wait?: number | undefined } | undefined } | { [_ in chains[number]["id"]]?: { multicall?: boolean | { batchSize?: number | undefined; wait?: number | undefined } | undefined } | undefined } | undefined` -- Batch settings. See [Viem docs](https://viem.sh/docs/clients/custom.html#batch-optional) for more info. +- Batch settings. See [Viem docs](https://viem.sh/docs/clients/custom#batch-optional) for more info. - Defaults to `{ multicall: true }`. ```ts-vue @@ -206,7 +206,7 @@ const config = createConfig({ `number | { [_ in chains[number]['id']]?: number | undefined } | undefined` -- Frequency in milliseconds for polling enabled features. See [Viem docs](https://viem.sh/docs/clients/public.html#cachetime-optional) for more info. +- Frequency in milliseconds for polling enabled features. See [Viem docs](https://viem.sh/docs/clients/public#cachetime-optional) for more info. - Defaults to [`pollingInterval`](#pollinginterval) or `4_000`. ```ts-vue @@ -227,7 +227,7 @@ const config = createConfig({ `number | { [_ in chains[number]['id']]?: number | undefined } | undefined` -- Frequency in milliseconds for polling enabled features. See [Viem docs](https://viem.sh/docs/clients/custom.html#pollinginterval-optional) for more info. +- Frequency in milliseconds for polling enabled features. See [Viem docs](https://viem.sh/docs/clients/custom#pollinginterval-optional) for more info. - Defaults to `4_000`. ```ts-vue @@ -248,7 +248,7 @@ const config = createConfig({ `Record` -Mapping of [chain IDs](#chains) to `Transport`s. This mapping is used internally when creating chain-aware Viem [`Client`](https://viem.sh/docs/clients/custom.html) objects. See the Transport docs for more info. +Mapping of [chain IDs](#chains) to `Transport`s. This mapping is used internally when creating chain-aware Viem [`Client`](https://viem.sh/docs/clients/custom) objects. See the Transport docs for more info. ```ts-vue import { createConfig, fallback, http } from '{{packageName}}' // [!code focus] @@ -272,7 +272,7 @@ const config = createConfig({ `(parameters: { chain: chains[number] }) => Client` -Function for creating new Viem [`Client`](https://viem.sh/docs/clients/custom.html) to be used internally. Exposes more control over the internal `Client` creation logic versus using the [`transports`](#transports) property. +Function for creating new Viem [`Client`](https://viem.sh/docs/clients/custom) to be used internally. Exposes more control over the internal `Client` creation logic versus using the [`transports`](#transports) property. ```ts-vue import { createClient, http } from 'viem' // [!code focus] @@ -288,7 +288,7 @@ const config = createConfig({ ``` ::: warning -When using this option, you likely want to pass `parameters.chain` straight through to [`createClient`](https://viem.sh/docs/clients/custom.html#createclient) to ensure the Viem `Client` is in sync with any active connections. +When using this option, you likely want to pass `parameters.chain` straight through to [`createClient`](https://viem.sh/docs/clients/custom#createclient) to ensure the Viem `Client` is in sync with any active connections. ::: ## Return Type @@ -333,7 +333,7 @@ The `Config` object's internal state. See [`State`](#state-1) for more info. `(parameters?: { chainId?: chainId | chains[number]['id'] | undefined }): Client>` -Creates new Viem [`Client`](https://viem.sh/docs/clients/custom.html) object. +Creates new Viem [`Client`](https://viem.sh/docs/clients/custom) object. ::: code-group ```ts-vue [index.ts] diff --git a/site/shared/installation.md b/site/shared/installation.md index c96c14def0..03664390ce 100644 --- a/site/shared/installation.md +++ b/site/shared/installation.md @@ -14,7 +14,7 @@ Wagmi is optimized for modern browsers. It is compatible with the latest version ::: tip -Depending on your environment, you might need to add polyfills. See [Viem Platform Compatibility](https://viem.sh/docs/compatibility.html) for more info. +Depending on your environment, you might need to add polyfills. See [Viem Platform Compatibility](https://viem.sh/docs/compatibility) for more info. ::: ## Using Unreleased Commits diff --git a/site/shared/transports/custom.md b/site/shared/transports/custom.md index dee391608a..d0b4e10099 100644 --- a/site/shared/transports/custom.md +++ b/site/shared/transports/custom.md @@ -4,7 +4,7 @@ const packageName = 'wagmi' # custom -The `custom` Transport connects to a JSON-RPC API via custom. Wraps Viem's [`custom` Transport](https://viem.sh/docs/clients/transports/custom.html). +The `custom` Transport connects to a JSON-RPC API via custom. Wraps Viem's [`custom` Transport](https://viem.sh/docs/clients/transports/custom). ## Import diff --git a/site/shared/transports/fallback.md b/site/shared/transports/fallback.md index befe9395e3..b304006289 100644 --- a/site/shared/transports/fallback.md +++ b/site/shared/transports/fallback.md @@ -4,7 +4,7 @@ const packageName = 'wagmi' # fallback -The `fallback` Transport consumes **multiple** Transports. If a Transport request fails, it will fall back to the next one in the list. Wraps Viem's [`fallback` Transport](https://viem.sh/docs/clients/transports/fallback.html). +The `fallback` Transport consumes **multiple** Transports. If a Transport request fails, it will fall back to the next one in the list. Wraps Viem's [`fallback` Transport](https://viem.sh/docs/clients/transports/fallback). ## Import diff --git a/site/shared/transports/http.md b/site/shared/transports/http.md index 1a1d864063..226bb0cef7 100644 --- a/site/shared/transports/http.md +++ b/site/shared/transports/http.md @@ -4,7 +4,7 @@ const packageName = 'wagmi' # http -The `http` Transport connects to a JSON-RPC API via HTTP. Wraps Viem's [`http` Transport](https://viem.sh/docs/clients/transports/http.html). +The `http` Transport connects to a JSON-RPC API via HTTP. Wraps Viem's [`http` Transport](https://viem.sh/docs/clients/transports/http). ## Import diff --git a/site/shared/transports/webSocket.md b/site/shared/transports/webSocket.md index 7b5771a9e9..fcc744a0cb 100644 --- a/site/shared/transports/webSocket.md +++ b/site/shared/transports/webSocket.md @@ -4,7 +4,7 @@ const packageName = 'wagmi' # webSocket -The `webSocket` Transport connects to a JSON-RPC API via a WebSocket. Wraps Viem's [`webSocket` Transport](https://viem.sh/docs/clients/transports/webSocket.html). +The `webSocket` Transport connects to a JSON-RPC API via a WebSocket. Wraps Viem's [`webSocket` Transport](https://viem.sh/docs/clients/transports/webSocket). ## Import diff --git a/site/vue/api/composables/useClient.md b/site/vue/api/composables/useClient.md index 18b3ca91fc..322fcced71 100644 --- a/site/vue/api/composables/useClient.md +++ b/site/vue/api/composables/useClient.md @@ -5,7 +5,7 @@ description: Composable for getting Viem `Client` instance. # useClient -Composable for getting Viem [`Client`](https://viem.sh/docs/clients/custom.html) instance. +Composable for getting Viem [`Client`](https://viem.sh/docs/clients/custom) instance. ## Import @@ -81,7 +81,7 @@ import { type UseClientReturnType } from '@wagmi/vue' `Client | undefined` -Viem [`Client`](https://viem.sh/docs/clients/custom.html) instance. +Viem [`Client`](https://viem.sh/docs/clients/custom) instance. ## Action diff --git a/site/vue/api/composables/useConnectorClient.md b/site/vue/api/composables/useConnectorClient.md index 61f56ca616..bf27b9ccaf 100644 --- a/site/vue/api/composables/useConnectorClient.md +++ b/site/vue/api/composables/useConnectorClient.md @@ -14,7 +14,7 @@ const hideQueryOptions = ['gcTime', 'staleTime'] # useConnectorClient -Composable for getting a Viem [`Client`](https://viem.sh/docs/clients/custom.html) object for the current or provided connector. +Composable for getting a Viem [`Client`](https://viem.sh/docs/clients/custom) object for the current or provided connector. ## Import diff --git a/site/vue/api/composables/useEstimateGas.md b/site/vue/api/composables/useEstimateGas.md index 4c05fa7674..45a0e26866 100644 --- a/site/vue/api/composables/useEstimateGas.md +++ b/site/vue/api/composables/useEstimateGas.md @@ -189,7 +189,7 @@ const result = useEstimateGas({ `bigint | undefined` -The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```vue [index.vue] @@ -212,7 +212,7 @@ const result = useEstimateGas({ `bigint | undefined` -Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```vue [index.vue] @@ -235,7 +235,7 @@ const result = useEstimateGas({ `bigint | undefined` -Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```vue [index.vue] diff --git a/site/vue/api/composables/useSimulateContract.md b/site/vue/api/composables/useSimulateContract.md index 7e10c486d6..d1e38a1f7d 100644 --- a/site/vue/api/composables/useSimulateContract.md +++ b/site/vue/api/composables/useSimulateContract.md @@ -450,7 +450,7 @@ const result = useSimulateContract({ `bigint | undefined` -The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms.html#legacy-transaction). +The price in wei to pay per gas. Only applies to [Legacy Transactions](https://viem.sh/docs/glossary/terms#legacy-transaction). ::: code-group ```vue [index.ts] @@ -481,7 +481,7 @@ const result = useSimulateContract({ `bigint | undefined` -Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Total fee per gas in wei, inclusive of [`maxPriorityFeePerGas`](#maxPriorityFeePerGas). Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```vue [index.ts] @@ -512,7 +512,7 @@ const result = useSimulateContract({ `bigint | undefined` -Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms.html#eip-1559-transaction). +Max priority fee per gas in wei. Only applies to [EIP-1559 Transactions](https://viem.sh/docs/glossary/terms#eip-1559-transaction). ::: code-group ```vue [index.ts] diff --git a/site/vue/api/composables/useTransactionReceipt.md b/site/vue/api/composables/useTransactionReceipt.md index e610c23840..08083cfa45 100644 --- a/site/vue/api/composables/useTransactionReceipt.md +++ b/site/vue/api/composables/useTransactionReceipt.md @@ -13,7 +13,7 @@ const TError = 'GetTransactionReceiptErrorType' # useTransactionReceipt -Composable for return the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. +Composable for return the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. ## Import diff --git a/site/vue/guides/viem.md b/site/vue/guides/viem.md index 0b31437b77..c7fac921d6 100644 --- a/site/vue/guides/viem.md +++ b/site/vue/guides/viem.md @@ -6,7 +6,7 @@ ## Leveraging Viem Actions -All of the core [Wagmi Composables](/vue/api/composables) are friendly wrappers around [Viem Actions](https://viem.sh/docs/actions/public/introduction.html) that inject a multi-chain and connector aware [Wagmi Config](/vue/api/createConfig). +All of the core [Wagmi Composables](/vue/api/composables) are friendly wrappers around [Viem Actions](https://viem.sh/docs/actions/public/introduction) that inject a multi-chain and connector aware [Wagmi Config](/vue/api/createConfig). There may be cases where you might want to dig deeper and utilize Viem Actions directly (maybe a Composable doesn't exist in Wagmi yet). In these cases, you can create your own custom Wagmi Composable by importing Viem Actions directly via `viem/actions` and plugging in a Viem Client returned by the [`useClient` Composable](/vue/api/composables/useClient). From 8736133a13eb82099e20468b735525a266fdfd6c Mon Sep 17 00:00:00 2001 From: tmm Date: Wed, 17 Sep 2025 14:14:57 -0400 Subject: [PATCH 088/213] feat: expose connect capabilities (#4784) * feat: expose connect capabilities * chore: changeset * docs: up * test: multiple connector types --- .changeset/rude-eggs-live.md | 8 + packages/connectors/src/baseAccount.ts | 22 +- packages/connectors/src/coinbaseWallet.ts | 26 ++- packages/connectors/src/gemini.ts | 19 +- packages/connectors/src/metaMask.ts | 10 +- packages/connectors/src/safe.ts | 10 +- packages/connectors/src/walletConnect.ts | 17 +- packages/core/src/actions/connect.test-d.ts | 36 ++- packages/core/src/actions/connect.test.ts | 23 +- packages/core/src/actions/connect.ts | 64 +++++- .../src/connectors/createConnector.test.ts | 3 +- .../core/src/connectors/createConnector.ts | 8 +- packages/core/src/connectors/injected.ts | 9 +- packages/core/src/connectors/mock.test.ts | 34 ++- packages/core/src/connectors/mock.ts | 24 +- packages/core/src/query/connect.ts | 29 ++- packages/react/src/exports/index.ts | 2 +- packages/react/src/hooks/useConnect.test-d.ts | 199 +++++++++++++---- packages/react/src/hooks/useConnect.ts | 10 +- packages/register-tests/react/src/config.ts | 34 ++- .../react/src/useConnect.test-d.ts | 144 +++++++++++- .../vue/src/useConnect.test-d.ts | 79 ++++++- .../vue/src/composables/useConnect.test-d.ts | 205 ++++++++++++++---- packages/vue/src/composables/useConnect.ts | 10 +- playgrounds/vite-react/src/App.tsx | 12 +- site/core/api/actions/connect.md | 39 ++++ site/react/api/hooks/useConnect.md | 2 +- site/vue/api/composables/useConnect.md | 2 +- 28 files changed, 891 insertions(+), 189 deletions(-) create mode 100644 .changeset/rude-eggs-live.md diff --git a/.changeset/rude-eggs-live.md b/.changeset/rude-eggs-live.md new file mode 100644 index 0000000000..da27d4fe29 --- /dev/null +++ b/.changeset/rude-eggs-live.md @@ -0,0 +1,8 @@ +--- +"@wagmi/connectors": minor +"wagmi": minor +"@wagmi/core": minor +"@wagmi/vue": patch +--- + +Added `withCapabilities` option to `connect` for exposing response capabilities. diff --git a/packages/connectors/src/baseAccount.ts b/packages/connectors/src/baseAccount.ts index 35c620c4fa..04cc5ec408 100644 --- a/packages/connectors/src/baseAccount.ts +++ b/packages/connectors/src/baseAccount.ts @@ -7,7 +7,6 @@ import { import type { Mutable, Omit } from '@wagmi/core/internal' import { type AddEthereumChainParameter, - type Address, getAddress, type Hex, numberToHex, @@ -25,15 +24,6 @@ export type BaseAccountParameters = Mutable< export function baseAccount(parameters: BaseAccountParameters = {}) { type Provider = ProviderInterface - type Properties = { - connect(parameters?: { - chainId?: number | undefined - isReconnecting?: boolean | undefined - }): Promise<{ - accounts: readonly Address[] - chainId: number - }> - } let walletProvider: Provider | undefined @@ -41,12 +31,12 @@ export function baseAccount(parameters: BaseAccountParameters = {}) { let chainChanged: Connector['onChainChanged'] | undefined let disconnect: Connector['onDisconnect'] | undefined - return createConnector((config) => ({ + return createConnector((config) => ({ id: 'baseAccount', name: 'Base Account', rdns: 'app.base.account', type: 'baseAccount', - async connect({ chainId } = {}) { + async connect({ chainId, withCapabilities } = {}) { try { const provider = await this.getProvider() const accounts = ( @@ -79,7 +69,13 @@ export function baseAccount(parameters: BaseAccountParameters = {}) { currentChainId = chain?.id ?? currentChainId } - return { accounts, chainId: currentChainId } + return { + // TODO(v3): Make `withCapabilities: true` default behavior + accounts: (withCapabilities + ? accounts.map((address) => ({ address, capabilities: {} })) + : accounts) as never, + chainId: currentChainId, + } } catch (error) { if ( /(user closed modal|accounts received is empty|user denied account|request rejected)/i.test( diff --git a/packages/connectors/src/coinbaseWallet.ts b/packages/connectors/src/coinbaseWallet.ts index cf8fea7967..0eafaa3a24 100644 --- a/packages/connectors/src/coinbaseWallet.ts +++ b/packages/connectors/src/coinbaseWallet.ts @@ -82,12 +82,16 @@ function version4(parameters: Version4Parameters) { close?(): void } type Properties = { - connect(parameters?: { + // TODO(v3): Make `withCapabilities: true` default behavior + connect(parameters?: { chainId?: number | undefined instantOnboarding?: boolean | undefined isReconnecting?: boolean | undefined + withCapabilities?: withCapabilities | boolean | undefined }): Promise<{ - accounts: readonly Address[] + accounts: withCapabilities extends true + ? readonly { address: Address }[] + : readonly Address[] chainId: number }> } @@ -103,7 +107,7 @@ function version4(parameters: Version4Parameters) { name: 'Coinbase Wallet', rdns: 'com.coinbase.wallet', type: coinbaseWallet.type, - async connect({ chainId, ...rest } = {}) { + async connect({ chainId, withCapabilities, ...rest } = {}) { try { const provider = await this.getProvider() const accounts = ( @@ -139,7 +143,12 @@ function version4(parameters: Version4Parameters) { currentChainId = chain?.id ?? currentChainId } - return { accounts, chainId: currentChainId } + return { + accounts: (withCapabilities + ? accounts.map((address) => ({ address, capabilities: {} })) + : accounts) as never, + chainId: currentChainId, + } } catch (error) { if ( /(user closed modal|accounts received is empty|user denied account|request rejected)/i.test( @@ -340,7 +349,7 @@ function version3(parameters: Version3Parameters) { name: 'Coinbase Wallet', rdns: 'com.coinbase.wallet', type: coinbaseWallet.type, - async connect({ chainId } = {}) { + async connect({ chainId, withCapabilities } = {}) { try { const provider = await this.getProvider() const accounts = ( @@ -372,7 +381,12 @@ function version3(parameters: Version3Parameters) { currentChainId = chain?.id ?? currentChainId } - return { accounts, chainId: currentChainId } + return { + accounts: (withCapabilities + ? accounts.map((address) => ({ address, capabilities: {} })) + : accounts) as never, + chainId: currentChainId, + } } catch (error) { if ( /(user closed modal|accounts received is empty|user denied account)/i.test( diff --git a/packages/connectors/src/gemini.ts b/packages/connectors/src/gemini.ts index fee6be703a..7146eed995 100644 --- a/packages/connectors/src/gemini.ts +++ b/packages/connectors/src/gemini.ts @@ -5,7 +5,6 @@ import { type Connector, createConnector, } from '@wagmi/core' -import type { Address } from 'viem' import { getAddress, numberToHex, @@ -20,27 +19,18 @@ export type GeminiParameters = { gemini.type = 'gemini' as const export function gemini(parameters: GeminiParameters = {}) { type Provider = ProviderInterface - type Properties = { - connect(parameters?: { - chainId?: number | undefined - isReconnecting?: boolean | undefined - }): Promise<{ - accounts: readonly Address[] - chainId: number - }> - } let walletProvider: Provider | undefined let onAccountsChanged: Connector['onAccountsChanged'] | undefined let onChainChanged: Connector['onChainChanged'] | undefined let onDisconnect: Connector['onDisconnect'] | undefined - return createConnector((config) => ({ + return createConnector((config) => ({ id: 'gemini', name: 'Gemini Wallet', type: gemini.type, icon: 'https://keys.gemini.com/images/gemini-wallet-logo.svg', - async connect({ chainId } = {}) { + async connect({ chainId, withCapabilities } = {}) { try { const provider = await this.getProvider() const accounts = (await provider.request({ @@ -70,7 +60,10 @@ export function gemini(parameters: GeminiParameters = {}) { } return { - accounts: accounts.map((x) => getAddress(x)), + // TODO(v3): Make `withCapabilities: true` default behavior + accounts: (withCapabilities + ? accounts.map((address) => ({ address, capabilities: {} })) + : accounts) as never, chainId: currentChainId, } } catch (error) { diff --git a/packages/connectors/src/metaMask.ts b/packages/connectors/src/metaMask.ts index bc4447c621..dab96dd648 100644 --- a/packages/connectors/src/metaMask.ts +++ b/packages/connectors/src/metaMask.ts @@ -113,7 +113,7 @@ export function metaMask(parameters: MetaMaskParameters = {}) { } } }, - async connect({ chainId, isReconnecting } = {}) { + async connect({ chainId, isReconnecting, withCapabilities } = {}) { const provider = await this.getProvider() if (!displayUri) { displayUri = this.onDisplayUri @@ -191,7 +191,13 @@ export function metaMask(parameters: MetaMaskParameters = {}) { provider.on('disconnect', disconnect as Listener) } - return { accounts, chainId: currentChainId } + return { + // TODO(v3): Make `withCapabilities: true` default behavior + accounts: (withCapabilities + ? accounts.map((address) => ({ address, capabilities: {} })) + : accounts) as never, + chainId: currentChainId, + } } catch (err) { const error = err as RpcError if (error.code === UserRejectedRequestError.code) diff --git a/packages/connectors/src/safe.ts b/packages/connectors/src/safe.ts index 9a96b5d6ba..69c0fa0859 100644 --- a/packages/connectors/src/safe.ts +++ b/packages/connectors/src/safe.ts @@ -45,7 +45,7 @@ export function safe(parameters: SafeParameters = {}) { id: 'safe', name: 'Safe', type: safe.type, - async connect() { + async connect({ withCapabilities } = {}) { const provider = await this.getProvider() if (!provider) throw new ProviderNotFoundError() @@ -60,7 +60,13 @@ export function safe(parameters: SafeParameters = {}) { // Remove disconnected shim if it exists if (shimDisconnect) await config.storage?.removeItem('safe.disconnected') - return { accounts, chainId } + return { + // TODO(v3): Make `withCapabilities: true` default behavior + accounts: (withCapabilities + ? accounts.map((address) => ({ address, capabilities: {} })) + : accounts) as never, + chainId, + } }, async disconnect() { const provider = await this.getProvider() diff --git a/packages/connectors/src/walletConnect.ts b/packages/connectors/src/walletConnect.ts index 16f04ab964..4a29c92712 100644 --- a/packages/connectors/src/walletConnect.ts +++ b/packages/connectors/src/walletConnect.ts @@ -78,12 +78,16 @@ export function walletConnect(parameters: WalletConnectParameters) { type Provider = Awaited> type Properties = { - connect(parameters?: { + // TODO(v3): Make `withCapabilities: true` default behavior + connect(parameters?: { chainId?: number | undefined isReconnecting?: boolean | undefined pairingTopic?: string | undefined + withCapabilities?: withCapabilities | boolean | undefined }): Promise<{ - accounts: readonly Address[] + accounts: withCapabilities extends true + ? readonly { address: Address }[] + : readonly Address[] chainId: number }> getNamespaceChainsIds(): number[] @@ -126,7 +130,7 @@ export function walletConnect(parameters: WalletConnectParameters) { provider.on('session_delete', sessionDelete) } }, - async connect({ chainId, ...rest } = {}) { + async connect({ chainId, withCapabilities, ...rest } = {}) { try { const provider = await this.getProvider() if (!provider) throw new ProviderNotFoundError() @@ -210,7 +214,12 @@ export function walletConnect(parameters: WalletConnectParameters) { provider.on('session_delete', sessionDelete) } - return { accounts, chainId: currentChainId } + return { + accounts: (withCapabilities + ? accounts.map((address) => ({ address, capabilities: {} })) + : accounts) as never, + chainId: currentChainId, + } } catch (error) { if ( /(user rejected|connection request reset)/i.test( diff --git a/packages/core/src/actions/connect.test-d.ts b/packages/core/src/actions/connect.test-d.ts index ad790b1209..8e50fdff73 100644 --- a/packages/core/src/actions/connect.test-d.ts +++ b/packages/core/src/actions/connect.test-d.ts @@ -1,5 +1,5 @@ import { accounts } from '@wagmi/test' -import { http } from 'viem' +import { type Address, type Hex, http } from 'viem' import { mainnet } from 'viem/chains' import { expectTypeOf, test } from 'vitest' @@ -46,3 +46,37 @@ test('parameters: connector (Connector)', () => { > expectTypeOf().toEqualTypeOf() }) + +test('parameters: withCapabilities', async () => { + const connectorFn = mock({ accounts }) + + const res0 = await connect(config, { connector: connectorFn }) + expectTypeOf(res0.accounts).toEqualTypeOf() + + const res1 = await connect(config, { + connector: connectorFn, + withCapabilities: false, + }) + expectTypeOf(res1.accounts).toEqualTypeOf() + + const res2 = await connect(config, { + connector: connectorFn, + withCapabilities: true, + }) + expectTypeOf(res2.accounts).toEqualTypeOf< + readonly [ + { + address: Address + capabilities: { + foo: { bar: Hex } + } + }, + ...{ + address: Address + capabilities: { + foo: { bar: Hex } + } + }[], + ] + >() +}) diff --git a/packages/core/src/actions/connect.test.ts b/packages/core/src/actions/connect.test.ts index ac6a0f906b..d3c2ff47e0 100644 --- a/packages/core/src/actions/connect.test.ts +++ b/packages/core/src/actions/connect.test.ts @@ -15,7 +15,7 @@ beforeEach(async () => { test('default', async () => { await expect(connect(config, { connector })).resolves.toMatchObject( expect.objectContaining({ - accounts: expect.any(Array), + accounts: expect.arrayContaining([expect.any(String)]), chainId: expect.any(Number), }), ) @@ -25,7 +25,7 @@ test('parameters: chainId', async () => { const chainId = chain.mainnet2.id await expect(connect(config, { connector, chainId })).resolves.toMatchObject( expect.objectContaining({ - accounts: expect.any(Array), + accounts: expect.arrayContaining([expect.any(String)]), chainId, }), ) @@ -37,13 +37,30 @@ test('parameters: connector', async () => { connect(config, { connector: connector_ }), ).resolves.toMatchObject( expect.objectContaining({ - accounts: expect.any(Array), + accounts: expect.arrayContaining([expect.any(String)]), chainId: expect.any(Number), }), ) await disconnect(config, { connector: connector_ }) }) +test('parameters: withCapabilities', async () => { + await expect( + connect(config, { connector, withCapabilities: true }), + ).resolves.toMatchObject( + expect.objectContaining({ + accounts: expect.arrayContaining([ + expect.objectContaining({ + address: expect.any(String), + capabilities: expect.objectContaining({ + foo: expect.objectContaining({ bar: expect.any(String) }), + }), + }), + ]), + }), + ) +}) + test('behavior: user rejected request', async () => { const connector_ = config._internal.connectors.setup( mock({ diff --git a/packages/core/src/actions/connect.ts b/packages/core/src/actions/connect.ts index f69809e504..ae9bf93a5c 100644 --- a/packages/core/src/actions/connect.ts +++ b/packages/core/src/actions/connect.ts @@ -19,6 +19,7 @@ export type ConnectParameters< connector extends Connector | CreateConnectorFn = | Connector | CreateConnectorFn, + withCapabilities extends boolean = false, /// parameters extends unknown | undefined = | (connector extends CreateConnectorFn @@ -36,12 +37,46 @@ export type ConnectParameters< > = Compute< ChainIdParameter & { connector: connector | CreateConnectorFn + withCapabilities?: withCapabilities | boolean | undefined } > & parameters -export type ConnectReturnType = { - accounts: readonly [Address, ...Address[]] +export type ConnectReturnType< + config extends Config = Config, + connector extends Connector | CreateConnectorFn = + | Connector + | CreateConnectorFn, + withCapabilities extends boolean = false, + /// + capabilities extends unknown | undefined = + | (connector extends CreateConnectorFn + ? Awaited< + ReturnType['connect']> + >['accounts'] extends + | readonly Address[] + | readonly { + capabilities: infer capabilities + }[] + ? capabilities + : Record + : never) + | (connector extends Connector + ? Awaited>['accounts'] extends + | readonly Address[] + | readonly { + capabilities: infer capabilities + }[] + ? capabilities + : Record + : never), +> = { + accounts: withCapabilities extends true + ? readonly [ + { address: Address; capabilities: capabilities }, + ...{ address: Address; capabilities: capabilities }[], + ] + : readonly [Address, ...Address[]] chainId: | config['chains'][number]['id'] | (number extends config['chains'][number]['id'] ? number : number & {}) @@ -60,10 +95,11 @@ export type ConnectErrorType = export async function connect< config extends Config, connector extends Connector | CreateConnectorFn, + withCapabilities extends boolean = false, >( config: config, - parameters: ConnectParameters, -): Promise> { + parameters: ConnectParameters, +): Promise> { // "Register" connector if not already created let connector: Connector if (typeof parameters.connector === 'function') { @@ -80,7 +116,6 @@ export async function connect< const { connector: _, ...rest } = parameters const data = await connector.connect(rest) - const accounts = data.accounts as readonly [Address, ...Address[]] connector.emitter.off('connect', config._internal.events.connect) connector.emitter.on('change', config._internal.events.change) @@ -90,7 +125,11 @@ export async function connect< config.setState((x) => ({ ...x, connections: new Map(x.connections).set(connector.uid, { - accounts, + accounts: (rest.withCapabilities + ? data.accounts.map((account) => + typeof account === 'object' ? account.address : account, + ) + : data.accounts) as readonly [Address, ...Address[]], chainId: data.chainId, connector: connector, }), @@ -98,7 +137,18 @@ export async function connect< status: 'connected', })) - return { accounts, chainId: data.chainId } + return { + // TODO(v3): Remove `withCapabilities: true` default behavior so remove compat marshalling + // Workaround so downstream connectors work with `withCapabilities` without any changes required + accounts: (rest.withCapabilities + ? data.accounts.map((address) => + typeof address === 'object' + ? address + : { address, capabilities: {} }, + ) + : data.accounts) as never, + chainId: data.chainId, + } } catch (error) { config.setState((x) => ({ ...x, diff --git a/packages/core/src/connectors/createConnector.test.ts b/packages/core/src/connectors/createConnector.test.ts index d1ff9f20af..8ce1468738 100644 --- a/packages/core/src/connectors/createConnector.test.ts +++ b/packages/core/src/connectors/createConnector.test.ts @@ -1,4 +1,3 @@ -import type { Address } from 'viem' import { test } from 'vitest' import { createConnector } from './createConnector.js' @@ -10,7 +9,7 @@ test('default', () => { type: 'test', async setup() {}, async connect() { - return { accounts: [] as Address[], chainId: 123 } + return { accounts: [] as never, chainId: 123 } }, async disconnect() {}, async getAccounts() { diff --git a/packages/core/src/connectors/createConnector.ts b/packages/core/src/connectors/createConnector.ts index 8e8c8535e4..7d77b4d4a9 100644 --- a/packages/core/src/connectors/createConnector.ts +++ b/packages/core/src/connectors/createConnector.ts @@ -43,16 +43,20 @@ export type CreateConnectorFn< readonly type: string setup?(): Promise - connect( + // TODO(v3): Make `withCapabilities: true` default behavior + connect( parameters?: | { chainId?: number | undefined isReconnecting?: boolean | undefined + withCapabilities?: withCapabilities | boolean | undefined } | undefined, ): Promise<{ // TODO(v3): Add `capabilities` (e.g. `readonly { address: Address; capabilities: Record | undefined }`) - accounts: readonly Address[] + accounts: withCapabilities extends true + ? readonly { address: Address; capabilities: Record }[] + : readonly Address[] chainId: number }> disconnect(): Promise diff --git a/packages/core/src/connectors/injected.ts b/packages/core/src/connectors/injected.ts index 3fb5bc6feb..05f04d6ca2 100644 --- a/packages/core/src/connectors/injected.ts +++ b/packages/core/src/connectors/injected.ts @@ -110,7 +110,7 @@ export function injected(parameters: InjectedParameters = {}) { } } }, - async connect({ chainId, isReconnecting } = {}) { + async connect({ chainId, isReconnecting, withCapabilities } = {}) { const provider = await this.getProvider() if (!provider) throw new ProviderNotFoundError() @@ -189,7 +189,12 @@ export function injected(parameters: InjectedParameters = {}) { if (!parameters.target) await config.storage?.setItem('injected.connected', true) - return { accounts, chainId: currentChainId } + return { + accounts: (withCapabilities + ? accounts.map((address) => ({ address, capabilities: {} })) + : accounts) as never, + chainId: currentChainId, + } } catch (err) { const error = err as RpcError if (error.code === UserRejectedRequestError.code) diff --git a/packages/core/src/connectors/mock.test.ts b/packages/core/src/connectors/mock.test.ts index dc0da8995d..6f02c06e3b 100644 --- a/packages/core/src/connectors/mock.test.ts +++ b/packages/core/src/connectors/mock.test.ts @@ -1,6 +1,6 @@ import { accounts, config } from '@wagmi/test' +import type { Address, Hex } from 'viem' import { expect, expectTypeOf, test } from 'vitest' - import type { Connector } from '../createConfig.js' import type { CreateConnectorFn } from './createConnector.js' import { mock } from './mock.js' @@ -21,6 +21,38 @@ test('setup', () => { Parameters<(typeof connector)['connect']>[0] > expectTypeOf().toMatchTypeOf() + + type ConnectFnReturnType = Awaited> + expectTypeOf().toMatchTypeOf< + | readonly `0x${string}`[] + | readonly { + address: Address + capabilities: { + foo: { + bar: Hex + } + } + }[] + >() +}) + +test('behavior: connect#withCapabilities', async () => { + const connectorFn = mock({ accounts }) + const connector = config._internal.connectors.setup(connectorFn) + const res = await connector.connect({ withCapabilities: true }) + expectTypeOf(res.accounts).toEqualTypeOf< + readonly { + address: Address + capabilities: Record + }[] + >() + expect(res).toMatchObject( + expect.objectContaining({ + accounts: expect.arrayContaining([ + expect.objectContaining({ address: expect.any(String) }), + ]), + }), + ) }) test('behavior: features.connectError', async () => { diff --git a/packages/core/src/connectors/mock.ts b/packages/core/src/connectors/mock.ts index 3f61ac2bbe..f68d156736 100644 --- a/packages/core/src/connectors/mock.ts +++ b/packages/core/src/connectors/mock.ts @@ -50,12 +50,23 @@ export function mock(parameters: MockParameters) { Transport<'custom', unknown, EIP1193RequestFn> > type Properties = { - connect(parameters?: { + // TODO(v3): Make `withCapabilities: true` default behavior + connect(parameters?: { chainId?: number | undefined isReconnecting?: boolean | undefined foo?: string | undefined + withCapabilities?: withCapabilities | boolean | undefined }): Promise<{ - accounts: readonly Address[] + accounts: withCapabilities extends true + ? readonly { + address: Address + capabilities: { + foo: { + bar: Hex + } + } + }[] + : readonly Address[] chainId: number }> } @@ -69,7 +80,7 @@ export function mock(parameters: MockParameters) { async setup() { connectedChainId = config.chains[0].id }, - async connect({ chainId } = {}) { + async connect({ chainId, withCapabilities } = {}) { if (features.connectError) { if (typeof features.connectError === 'boolean') throw new UserRejectedRequestError(new Error('Failed to connect.')) @@ -90,7 +101,12 @@ export function mock(parameters: MockParameters) { connected = true return { - accounts: accounts.map((x) => getAddress(x)), + accounts: (withCapabilities + ? accounts.map((x) => ({ + address: getAddress(x), + capabilities: { foo: { bar: x } }, + })) + : accounts.map((x) => getAddress(x))) as never, chainId: currentChainId, } }, diff --git a/packages/core/src/query/connect.ts b/packages/core/src/query/connect.ts index fae985ab0e..895950bbce 100644 --- a/packages/core/src/query/connect.ts +++ b/packages/core/src/query/connect.ts @@ -17,32 +17,38 @@ export function connectMutationOptions(config: config) { }, mutationKey: ['connect'], } as const satisfies MutationOptions< - ConnectData, + ConnectData, ConnectErrorType, - ConnectVariables + ConnectVariables > } -export type ConnectData = ConnectReturnType +export type ConnectData< + config extends Config, + connector extends Connector | CreateConnectorFn, + withCapabilities extends boolean, +> = ConnectReturnType export type ConnectVariables< config extends Config, connector extends Connector | CreateConnectorFn, -> = ConnectParameters + withCapabilities extends boolean, +> = ConnectParameters export type ConnectMutate = < connector extends | config['connectors'][number] | Connector | CreateConnectorFn, + withCapabilities extends boolean = false, >( - variables: ConnectVariables, + variables: ConnectVariables, options?: | Compute< MutateOptions< - ConnectData, + ConnectData, ConnectErrorType, - Compute>, + Compute>, context > > @@ -54,16 +60,17 @@ export type ConnectMutateAsync = < | config['connectors'][number] | Connector | CreateConnectorFn, + withCapabilities extends boolean = false, >( - variables: ConnectVariables, + variables: ConnectVariables, options?: | Compute< MutateOptions< - ConnectData, + ConnectData, ConnectErrorType, - Compute>, + Compute>, context > > | undefined, -) => Promise> +) => Promise> diff --git a/packages/react/src/exports/index.ts b/packages/react/src/exports/index.ts index cfe2ac15b5..fc94deb296 100644 --- a/packages/react/src/exports/index.ts +++ b/packages/react/src/exports/index.ts @@ -234,7 +234,7 @@ export { type UseReadContractParameters, type UseReadContractReturnType, useReadContract, - /** @deprecated Use `useWriteContract` instead */ + /** @deprecated Use `useReadContract` instead */ useReadContract as useContractRead, } from '../hooks/useReadContract.js' diff --git a/packages/react/src/hooks/useConnect.test-d.ts b/packages/react/src/hooks/useConnect.test-d.ts index e678d2edd8..ac2acca56e 100644 --- a/packages/react/src/hooks/useConnect.test-d.ts +++ b/packages/react/src/hooks/useConnect.test-d.ts @@ -4,7 +4,7 @@ import type { CreateConnectorFn, } from '@wagmi/core' import { config } from '@wagmi/test' -import type { Address } from 'viem' +import type { Address, Hex } from 'viem' import { expectTypeOf, test } from 'vitest' import { useConnect } from './useConnect.js' @@ -13,55 +13,85 @@ const connector = config.connectors[0]! const contextValue = { foo: 'bar' } as const test('context', () => { - const { connect, context, data, error, variables } = useConnect({ - mutation: { - onMutate(variables) { - expectTypeOf(variables).toEqualTypeOf<{ - chainId?: number | undefined - connector: Connector | CreateConnectorFn - }>() - return contextValue - }, - onError(error, variables, context) { - expectTypeOf(variables).toEqualTypeOf<{ - chainId?: number | undefined - connector: Connector | CreateConnectorFn - }>() - expectTypeOf(error).toEqualTypeOf() - expectTypeOf(context).toEqualTypeOf() - }, - onSuccess(data, variables, context) { - expectTypeOf(variables).toEqualTypeOf<{ - chainId?: number | undefined - connector: Connector | CreateConnectorFn - }>() - expectTypeOf(data).toEqualTypeOf<{ - accounts: readonly [Address, ...Address[]] - chainId: number - }>() - expectTypeOf(context).toEqualTypeOf() - }, - onSettled(data, error, variables, context) { - expectTypeOf(data).toEqualTypeOf< - | { - accounts: readonly [Address, ...Address[]] - chainId: number - } - | undefined - >() - expectTypeOf(error).toEqualTypeOf() - expectTypeOf(variables).toEqualTypeOf<{ - chainId?: number | undefined - connector: Connector | CreateConnectorFn - }>() - expectTypeOf(context).toEqualTypeOf() + const { connect, connectAsync, context, data, error, variables } = useConnect( + { + mutation: { + onMutate(variables) { + expectTypeOf(variables).toEqualTypeOf<{ + chainId?: number | undefined + connector: Connector | CreateConnectorFn + withCapabilities?: boolean | undefined + }>() + return contextValue + }, + onError(error, variables, context) { + expectTypeOf(variables).toEqualTypeOf<{ + chainId?: number | undefined + connector: Connector | CreateConnectorFn + withCapabilities?: boolean | undefined + }>() + expectTypeOf(error).toEqualTypeOf() + expectTypeOf(context).toEqualTypeOf() + }, + onSuccess(data, variables, context) { + expectTypeOf(variables).toEqualTypeOf<{ + chainId?: number | undefined + connector: Connector | CreateConnectorFn + withCapabilities?: boolean | undefined + }>() + expectTypeOf(data).toEqualTypeOf<{ + accounts: + | readonly [Address, ...Address[]] + | readonly [ + { address: Address; capabilities: Record }, + ...{ + address: Address + capabilities: Record + }[], + ] + chainId: number + }>() + expectTypeOf(context).toEqualTypeOf() + }, + onSettled(data, error, variables, context) { + expectTypeOf(data).toEqualTypeOf< + | { + accounts: + | readonly [Address, ...Address[]] + | readonly [ + { + address: Address + capabilities: Record + }, + ...{ + address: Address + capabilities: Record + }[], + ] + chainId: number + } + | undefined + >() + expectTypeOf(error).toEqualTypeOf() + expectTypeOf(variables).toEqualTypeOf<{ + chainId?: number | undefined + connector: Connector | CreateConnectorFn + withCapabilities?: boolean | undefined + }>() + expectTypeOf(context).toEqualTypeOf() + }, }, }, - }) + ) expectTypeOf(data).toEqualTypeOf< | { - accounts: readonly [Address, ...Address[]] + accounts: + | readonly [Address, ...Address[]] + | readonly [ + { address: Address; capabilities: Record }, + ...{ address: Address; capabilities: Record }[], + ] chainId: number } | undefined @@ -87,6 +117,7 @@ test('context', () => { chainId?: number | undefined connector: typeof connector | CreateConnectorFn foo?: string | undefined + withCapabilities?: boolean | undefined }>() expectTypeOf(error).toEqualTypeOf() expectTypeOf(context).toEqualTypeOf() @@ -96,6 +127,7 @@ test('context', () => { chainId?: number | undefined connector: typeof connector | CreateConnectorFn foo?: string | undefined + withCapabilities?: boolean | undefined }>() expectTypeOf(data).toEqualTypeOf<{ accounts: readonly [Address, ...Address[]] @@ -116,9 +148,86 @@ test('context', () => { chainId?: number | undefined connector: typeof connector | CreateConnectorFn foo?: string | undefined + withCapabilities?: boolean | undefined }>() expectTypeOf(context).toEqualTypeOf() }, }, ) + + connect( + { + connector, + foo: 'bar', + withCapabilities: true, + }, + { + onSuccess(data, _variables, _context) { + expectTypeOf(data).toEqualTypeOf<{ + accounts: readonly [ + { + address: Address + capabilities: { + foo: { bar: Hex } + } + }, + ...{ + address: Address + capabilities: { + foo: { bar: Hex } + } + }[], + ] + chainId: number + }>() + }, + onSettled(data, _error, _variables, _context) { + expectTypeOf(data).toEqualTypeOf< + | { + accounts: readonly [ + { + address: Address + capabilities: { + foo: { bar: Hex } + } + }, + ...{ + address: Address + capabilities: { + foo: { bar: Hex } + } + }[], + ] + chainId: number + } + | undefined + >() + }, + }, + ) + + ;(async () => { + const res = await connectAsync({ + connector, + foo: 'bar', + withCapabilities: true, + }) + expectTypeOf(res).toEqualTypeOf<{ + accounts: readonly [ + { + address: Address + capabilities: { + foo: { bar: Hex } + } + }, + ...{ + address: Address + capabilities: { + foo: { bar: Hex } + } + }[], + ] + chainId: number + }>() + })() }) diff --git a/packages/react/src/hooks/useConnect.ts b/packages/react/src/hooks/useConnect.ts index acfe69234d..48bbace054 100644 --- a/packages/react/src/hooks/useConnect.ts +++ b/packages/react/src/hooks/useConnect.ts @@ -27,9 +27,9 @@ export type UseConnectParameters< ConfigParameter & { mutation?: | UseMutationParameters< - ConnectData, + ConnectData, ConnectErrorType, - ConnectVariables, + ConnectVariables, context > | undefined @@ -41,9 +41,9 @@ export type UseConnectReturnType< context = unknown, > = Compute< UseMutationReturnType< - ConnectData, + ConnectData, ConnectErrorType, - ConnectVariables, + ConnectVariables, context > & { connect: ConnectMutate @@ -65,7 +65,7 @@ export function useConnect< const mutationOptions = connectMutationOptions(config) const { mutate, mutateAsync, ...result } = useMutation({ - ...mutation, + ...(mutation as typeof mutationOptions), ...mutationOptions, }) diff --git a/packages/register-tests/react/src/config.ts b/packages/register-tests/react/src/config.ts index 5772212c1b..590315cf5f 100644 --- a/packages/register-tests/react/src/config.ts +++ b/packages/register-tests/react/src/config.ts @@ -1,10 +1,10 @@ -import { http } from 'viem' -import { createConfig, mock } from 'wagmi' +import { type Address, http } from 'viem' +import { createConfig, createConnector, mock } from 'wagmi' import { celo, mainnet, optimism, zkSync } from 'wagmi/chains' export const config = createConfig({ chains: [celo, mainnet, optimism, zkSync], - connectors: [mock({ accounts: ['0x'] })], + connectors: [mock({ accounts: ['0x'] }), foo()], transports: { [celo.id]: http(), [mainnet.id]: http(), @@ -24,3 +24,31 @@ declare module 'wagmi' { config: typeof config } } + +export function foo() { + type Properties = { + // TODO(v3): Make `withCapabilities: true` default behavior + connect(parameters?: { + chainId?: number | undefined + isReconnecting?: boolean | undefined + capabilities?: { + signInWithEthereum?: { nonce: string } | undefined + } + withCapabilities?: withCapabilities | boolean | undefined + }): Promise<{ + accounts: withCapabilities extends true + ? readonly { + capabilities: { + signInWithEthereum: { + message: string + signature: string + } + } + }[] + : readonly Address[] + chainId: number + }> + } + + return createConnector((_config) => ({}) as never) +} diff --git a/packages/register-tests/react/src/useConnect.test-d.ts b/packages/register-tests/react/src/useConnect.test-d.ts index 2386dca7e9..1e15106d72 100644 --- a/packages/register-tests/react/src/useConnect.test-d.ts +++ b/packages/register-tests/react/src/useConnect.test-d.ts @@ -1,13 +1,151 @@ +import type { Address, Hex } from 'viem' import { expectTypeOf, test } from 'vitest' -import { useConnect } from 'wagmi' +import { useConnect, useConnectors } from 'wagmi' test('infers connect parameters', () => { - const { connect, connectors, variables } = useConnect() + const { connect, connectAsync, variables } = useConnect() + const connectors = useConnectors() const connector = connectors[0]! - expectTypeOf(variables?.foo).toEqualTypeOf() connect({ connector, foo: 'bar', }) + connect({ + connector, + capabilities: { + signInWithEthereum: { + nonce: 'foobarbaz', + }, + }, + }) + + if (variables && 'foo' in variables) + expectTypeOf(variables?.foo).toEqualTypeOf() + if (variables && 'capabilities' in variables) + expectTypeOf(variables?.capabilities?.signInWithEthereum).toEqualTypeOf< + { nonce: string } | undefined + >() + + connect( + { + connector, + foo: 'bar', + withCapabilities: true, + }, + { + onSuccess(data, _variables, _context) { + expectTypeOf(data.accounts).toEqualTypeOf< + readonly [ + { + address: Address + capabilities: + | { + foo: { bar: Hex } + } + | { + signInWithEthereum: { + message: string + signature: string + } + } + }, + ...{ + address: Address + capabilities: + | { + foo: { bar: Hex } + } + | { + signInWithEthereum: { + message: string + signature: string + } + } + }[], + ] + >() + }, + onSettled(data, _error, _variables, _context) { + expectTypeOf(data?.accounts).toEqualTypeOf< + | readonly [ + { + address: Address + capabilities: + | { + foo: { bar: Hex } + } + | { + signInWithEthereum: { + message: string + signature: string + } + } + }, + ...{ + address: Address + capabilities: + | { + foo: { bar: Hex } + } + | { + signInWithEthereum: { + message: string + signature: string + } + } + }[], + ] + | undefined + >() + }, + }, + ) + + ;(async () => { + await connectAsync({ + connector, + foo: 'bar', + withCapabilities: true, + }) + const res = await connectAsync({ + connector, + capabilities: { + signInWithEthereum: { + nonce: 'foobarbaz', + }, + }, + withCapabilities: true, + }) + expectTypeOf(res.accounts).toEqualTypeOf< + readonly [ + { + address: Address + capabilities: + | { + foo: { bar: Hex } + } + | { + signInWithEthereum: { + message: string + signature: string + } + } + }, + ...{ + address: Address + capabilities: + | { + foo: { bar: Hex } + } + | { + signInWithEthereum: { + message: string + signature: string + } + } + }[], + ] + >() + })() }) diff --git a/packages/register-tests/vue/src/useConnect.test-d.ts b/packages/register-tests/vue/src/useConnect.test-d.ts index 128834ff6d..eb30ff6dc5 100644 --- a/packages/register-tests/vue/src/useConnect.test-d.ts +++ b/packages/register-tests/vue/src/useConnect.test-d.ts @@ -1,13 +1,86 @@ -import { useConnect } from '@wagmi/vue' +import { useConnect, useConnectors } from '@wagmi/vue' +import type { Address, Hex } from 'viem' import { expectTypeOf, test } from 'vitest' test('infers connect parameters', () => { - const { connect, connectors, variables } = useConnect() - const connector = connectors[0]! + const { connect, connectAsync, variables } = useConnect() + const connectors = useConnectors() + const connector = connectors.value[0]! expectTypeOf(variables.value?.foo).toEqualTypeOf() connect({ connector, foo: 'bar', }) + + connect( + { + connector, + foo: 'bar', + withCapabilities: true, + }, + { + onSuccess(data, _variables, _context) { + expectTypeOf(data.accounts).toEqualTypeOf< + readonly [ + { + address: Address + capabilities: { + foo: { bar: Hex } + } + }, + ...{ + address: Address + capabilities: { + foo: { bar: Hex } + } + }[], + ] + >() + }, + onSettled(data, _error, _variables, _context) { + expectTypeOf(data?.accounts).toEqualTypeOf< + | readonly [ + { + address: Address + capabilities: { + foo: { bar: Hex } + } + }, + ...{ + address: Address + capabilities: { + foo: { bar: Hex } + } + }[], + ] + | undefined + >() + }, + }, + ) + + ;(async () => { + const res = await connectAsync({ + connector, + foo: 'bar', + withCapabilities: true, + }) + expectTypeOf(res.accounts).toEqualTypeOf< + readonly [ + { + address: Address + capabilities: { + foo: { bar: Hex } + } + }, + ...{ + address: Address + capabilities: { + foo: { bar: Hex } + } + }[], + ] + >() + })() }) diff --git a/packages/vue/src/composables/useConnect.test-d.ts b/packages/vue/src/composables/useConnect.test-d.ts index 44c7b6fdac..78013005f1 100644 --- a/packages/vue/src/composables/useConnect.test-d.ts +++ b/packages/vue/src/composables/useConnect.test-d.ts @@ -4,7 +4,7 @@ import type { CreateConnectorFn, } from '@wagmi/core' import { config } from '@wagmi/test' -import type { Address } from 'viem' +import type { Address, Hex } from 'viem' import { expectTypeOf, test } from 'vitest' import { useConnect } from './useConnect.js' @@ -13,55 +13,91 @@ const connector = config.connectors[0]! const contextValue = { foo: 'bar' } as const test('context', () => { - const { connect, context, data, error, variables } = useConnect({ - mutation: { - onMutate(variables) { - expectTypeOf(variables).toEqualTypeOf<{ - chainId?: number | undefined - connector: Connector | CreateConnectorFn - }>() - return contextValue - }, - onError(error, variables, context) { - expectTypeOf(variables).toEqualTypeOf<{ - chainId?: number | undefined - connector: Connector | CreateConnectorFn - }>() - expectTypeOf(error).toEqualTypeOf() - expectTypeOf(context).toEqualTypeOf() - }, - onSuccess(data, variables, context) { - expectTypeOf(variables).toEqualTypeOf<{ - chainId?: number | undefined - connector: Connector | CreateConnectorFn - }>() - expectTypeOf(data).toEqualTypeOf<{ - accounts: readonly [Address, ...Address[]] - chainId: number - }>() - expectTypeOf(context).toEqualTypeOf() - }, - onSettled(data, error, variables, context) { - expectTypeOf(data).toEqualTypeOf< - | { - accounts: readonly [Address, ...Address[]] - chainId: number - } - | undefined - >() - expectTypeOf(error).toEqualTypeOf() - expectTypeOf(variables).toEqualTypeOf<{ - chainId?: number | undefined - connector: Connector | CreateConnectorFn - }>() - expectTypeOf(context).toEqualTypeOf() + const { connect, connectAsync, context, data, error, variables } = useConnect( + { + mutation: { + onMutate(variables) { + expectTypeOf(variables).toEqualTypeOf<{ + chainId?: number | undefined + connector: Connector | CreateConnectorFn + withCapabilities?: boolean | undefined + }>() + return contextValue + }, + onError(error, variables, context) { + expectTypeOf(variables).toEqualTypeOf<{ + chainId?: number | undefined + connector: Connector | CreateConnectorFn + withCapabilities?: boolean | undefined + }>() + expectTypeOf(error).toEqualTypeOf() + expectTypeOf(context).toEqualTypeOf() + }, + onSuccess(data, variables, context) { + expectTypeOf(variables).toEqualTypeOf<{ + chainId?: number | undefined + connector: Connector | CreateConnectorFn + withCapabilities?: boolean | undefined + }>() + expectTypeOf(data).toEqualTypeOf<{ + accounts: + | readonly [Address, ...Address[]] + | readonly [ + { address: Address; capabilities: Record }, + ...{ + address: Address + capabilities: Record + }[], + ] + + chainId: number + }>() + expectTypeOf(context).toEqualTypeOf() + }, + onSettled(data, error, variables, context) { + expectTypeOf(data).toEqualTypeOf< + | { + accounts: + | readonly [Address, ...Address[]] + | readonly [ + { + address: Address + capabilities: Record + }, + ...{ + address: Address + capabilities: Record + }[], + ] + + chainId: number + } + | undefined + >() + expectTypeOf(error).toEqualTypeOf() + expectTypeOf(variables).toEqualTypeOf<{ + chainId?: number | undefined + connector: Connector | CreateConnectorFn + withCapabilities?: boolean | undefined + }>() + expectTypeOf(context).toEqualTypeOf() + }, }, }, - }) + ) expectTypeOf(data.value).toEqualTypeOf< | { - accounts: readonly [Address, ...Address[]] + accounts: + | readonly [Address, ...Address[]] + | readonly [ + { address: Address; capabilities: Record }, + ...{ + address: Address + capabilities: Record + }[], + ] + chainId: number } | undefined @@ -84,6 +120,7 @@ test('context', () => { chainId?: number | undefined connector: typeof connector | CreateConnectorFn foo?: string | undefined + withCapabilities?: boolean | undefined }>() expectTypeOf(error).toEqualTypeOf() expectTypeOf(context).toEqualTypeOf() @@ -93,6 +130,7 @@ test('context', () => { chainId?: number | undefined connector: typeof connector | CreateConnectorFn foo?: string | undefined + withCapabilities?: boolean | undefined }>() expectTypeOf(data).toEqualTypeOf<{ accounts: readonly [Address, ...Address[]] @@ -113,9 +151,86 @@ test('context', () => { chainId?: number | undefined connector: typeof connector | CreateConnectorFn foo?: string | undefined + withCapabilities?: boolean | undefined }>() expectTypeOf(context).toEqualTypeOf() }, }, ) + + connect( + { + connector, + foo: 'bar', + withCapabilities: true, + }, + { + onSuccess(data, _variables, _context) { + expectTypeOf(data).toEqualTypeOf<{ + accounts: readonly [ + { + address: Address + capabilities: { + foo: { bar: Hex } + } + }, + ...{ + address: Address + capabilities: { + foo: { bar: Hex } + } + }[], + ] + chainId: number + }>() + }, + onSettled(data, _error, _variables, _context) { + expectTypeOf(data).toEqualTypeOf< + | { + accounts: readonly [ + { + address: Address + capabilities: { + foo: { bar: Hex } + } + }, + ...{ + address: Address + capabilities: { + foo: { bar: Hex } + } + }[], + ] + chainId: number + } + | undefined + >() + }, + }, + ) + + ;(async () => { + const res = await connectAsync({ + connector, + foo: 'bar', + withCapabilities: true, + }) + expectTypeOf(res).toEqualTypeOf<{ + accounts: readonly [ + { + address: Address + capabilities: { + foo: { bar: Hex } + } + }, + ...{ + address: Address + capabilities: { + foo: { bar: Hex } + } + }[], + ] + chainId: number + }>() + })() }) diff --git a/packages/vue/src/composables/useConnect.ts b/packages/vue/src/composables/useConnect.ts index 7659dc3411..49c6911ffd 100644 --- a/packages/vue/src/composables/useConnect.ts +++ b/packages/vue/src/composables/useConnect.ts @@ -30,9 +30,9 @@ export type UseConnectParameters< ConfigParameter & { mutation?: | UseMutationParameters< - ConnectData, + ConnectData, ConnectErrorType, - ConnectVariables, + ConnectVariables, context > | undefined @@ -44,9 +44,9 @@ export type UseConnectReturnType< context = unknown, > = Compute< UseMutationReturnType< - ConnectData, + ConnectData, ConnectErrorType, - ConnectVariables, + ConnectVariables, context > & { connect: ConnectMutate @@ -68,7 +68,7 @@ export function useConnect< const mutationOptions = connectMutationOptions(config) const { mutate, mutateAsync, ...result } = useMutation({ - ...mutation, + ...(mutation as typeof mutationOptions), ...mutationOptions, }) diff --git a/playgrounds/vite-react/src/App.tsx b/playgrounds/vite-react/src/App.tsx index 3d435d1a54..e70d1fc356 100644 --- a/playgrounds/vite-react/src/App.tsx +++ b/playgrounds/vite-react/src/App.tsx @@ -84,7 +84,7 @@ function Account() { function Connect() { const chainId = useChainId() - const { connectors, connect, status, error } = useConnect() + const { connectors, connectAsync, status, error } = useConnect() return (
@@ -92,12 +92,16 @@ function Connect() { {connectors.map((connector) => ( + ) +} +``` +<<< @/snippets/react/config.ts[config.ts] +::: + +## Parameters + +```ts +import { type UseSendCallsSyncParameters } from 'wagmi' +``` + +### config + +`Config | undefined` + +[`Config`](/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](/react/api/WagmiProvider). + +::: code-group +```tsx [index.tsx] +import { useSendCallsSync } from 'wagmi' +import { config } from './config' // [!code focus] + +function App() { + const result = useSendCallsSync({ + config, // [!code focus] + }) +} +``` +<<< @/snippets/react/config.ts[config.ts] +::: + + + +## Return Type + +```ts +import { type UseSendCallsSyncReturnType } from 'wagmi' +``` + + + + + +## Action + +- [`sendCallsSync`](/core/api/actions/sendCallsSync) diff --git a/site/react/api/hooks/useSendTransactionSync.md b/site/react/api/hooks/useSendTransactionSync.md new file mode 100644 index 0000000000..d6bfdc5ae3 --- /dev/null +++ b/site/react/api/hooks/useSendTransactionSync.md @@ -0,0 +1,94 @@ +--- +title: useSendTransactionSync +description: Hook for creating, signing, and sending transactions to the network synchronously. +--- + + + +# useSendTransactionSync + +Hook for creating, signing, and sending transactions to the network synchronously. +Waits for the transaction to be included in a block before returning. + +## Import + +```ts +import { useSendTransactionSync } from 'wagmi' +``` + +## Usage + +::: code-group +```tsx [index.tsx] +import { useSendTransactionSync } from 'wagmi' +import { parseEther } from 'viem' + +function App() { + const { sendTransactionSync } = useSendTransactionSync() + + return ( + + ) +} +``` +<<< @/snippets/react/config.ts[config.ts] +::: + +## Parameters + +```ts +import { type UseSendTransactionSyncParameters } from 'wagmi' +``` + +### config + +`Config | undefined` + +[`Config`](/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](/react/api/WagmiProvider). + +::: code-group +```tsx [index.tsx] +import { useSendTransactionSync } from 'wagmi' +import { config } from './config' // [!code focus] + +function App() { + const result = useSendTransactionSync({ + config, // [!code focus] + }) +} +``` +<<< @/snippets/react/config.ts[config.ts] +::: + + + +## Return Type + +```ts +import { type UseSendTransactionSyncReturnType } from 'wagmi' +``` + + + + + +## Action + +- [`sendTransactionSync`](/core/api/actions/sendTransactionSync) From 6159db8c9c45b724c0de0fc44a90651d66449546 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 07:59:28 +1100 Subject: [PATCH 128/213] chore: version packages (#4826) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/common-olives-go.md | 5 ----- .changeset/slimy-planets-spend.md | 5 ----- packages/connectors/CHANGELOG.md | 7 +++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/core/src/version.ts | 2 +- packages/react/CHANGELOG.md | 12 ++++++++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 8 ++++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 14 files changed, 41 insertions(+), 18 deletions(-) delete mode 100644 .changeset/common-olives-go.md delete mode 100644 .changeset/slimy-planets-spend.md diff --git a/.changeset/common-olives-go.md b/.changeset/common-olives-go.md deleted file mode 100644 index a29c018839..0000000000 --- a/.changeset/common-olives-go.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wagmi": minor ---- - -Added `useSendTransactionSync` and `useSendCallsSync` Hooks. diff --git a/.changeset/slimy-planets-spend.md b/.changeset/slimy-planets-spend.md deleted file mode 100644 index 61a78f10c1..0000000000 --- a/.changeset/slimy-planets-spend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/core": minor ---- - -Added `sendTransactionSync` and `sendCallsSync` Actions. \ No newline at end of file diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 896292f4f1..950835fd86 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/connectors +## 6.0.0 + +### Patch Changes + +- Updated dependencies [[`ebb2352`](https://github.com/wevm/wagmi/commit/ebb2352375e05e52d0bcf6ae1a60ac4e798bf29f)]: + - @wagmi/core@2.22.0 + ## 5.11.2 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 10f41d5d31..0db1924543 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "5.11.2", + "version": "6.0.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index d34862a2c4..dcb5468294 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '5.11.2' +export const version = '6.0.0' diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 3f101c728b..a0b8590bd6 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/core +## 2.22.0 + +### Minor Changes + +- Added `sendTransactionSync` and `sendCallsSync` Actions. ([#4823](https://github.com/wevm/wagmi/pull/4823)) + ## 2.21.2 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index f429e592aa..959034abeb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/core", "description": "VanillaJS library for Ethereum", - "version": "2.21.2", + "version": "2.22.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/core/src/version.ts b/packages/core/src/version.ts index 5023559f7d..a1dcca175a 100644 --- a/packages/core/src/version.ts +++ b/packages/core/src/version.ts @@ -1 +1 @@ -export const version = '2.21.2' +export const version = '2.22.0' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index f1e24f30f3..e93c13f54c 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,17 @@ # wagmi +## 2.18.0 + +### Minor Changes + +- Added `useSendTransactionSync` and `useSendCallsSync` Hooks. ([#4823](https://github.com/wevm/wagmi/pull/4823)) + +### Patch Changes + +- Updated dependencies [[`ebb2352`](https://github.com/wevm/wagmi/commit/ebb2352375e05e52d0bcf6ae1a60ac4e798bf29f)]: + - @wagmi/core@2.22.0 + - @wagmi/connectors@6.0.0 + ## 2.17.5 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 323d108278..76db6a3276 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.17.5", + "version": "2.18.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index ffda9869dc..8bbbbfc3d7 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.17.5' +export const version = '2.18.0' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index 9ca869a83e..f600ed4c3e 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,13 @@ # @wagmi/vue +## 0.2.12 + +### Patch Changes + +- Updated dependencies [[`ebb2352`](https://github.com/wevm/wagmi/commit/ebb2352375e05e52d0bcf6ae1a60ac4e798bf29f)]: + - @wagmi/core@2.22.0 + - @wagmi/connectors@6.0.0 + ## 0.2.11 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index d4154203e8..1451651725 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.2.11", + "version": "0.2.12", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index 1970b9a295..0c1e48803d 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.2.11' +export const version = '0.2.12' From 785d16b5f76b219f1775839ec449678539a01d52 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Mon, 13 Oct 2025 16:39:04 -0400 Subject: [PATCH 129/213] docs: fix contributing page --- site/dev/contributing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/dev/contributing.md b/site/dev/contributing.md index a4aefc8b4f..cce1fa31da 100644 --- a/site/dev/contributing.md +++ b/site/dev/contributing.md @@ -1,7 +1,7 @@ @@ -177,7 +177,7 @@ pnpm deps -w # updates deps (best done with clean working tree) Update GitHub Actions via [Actions Up!](https://github.com/azat-io/actions-up) by running: ```bash -pnpm deps:cli +pnpm deps:ci ``` [Socket](https://socket.dev) checks pull requests for vulnerabilities when new dependencies and versions are added, but you should also be vigilant! When updating dependencies, you should check release notes and source code as well as lock versions when possible. From a67ea1f55c8e82d6b7b70f65c069d74b3324fd6b Mon Sep 17 00:00:00 2001 From: tmm Date: Mon, 13 Oct 2025 16:45:55 -0400 Subject: [PATCH 130/213] feat(cli): update block explorer plugin chains (#4830) * Add new testnet Celo Sepolia and remove deprecated testnets Alfajores and Baklava * chore: changeset --------- Co-authored-by: GigaHierz --- .changeset/busy-stars-pick.md | 5 + packages/cli/src/plugins/etherscan.ts | 13 +-- packages/cli/src/plugins/routescan.ts | 158 +++++++++++--------------- packages/cli/src/plugins/sourcify.ts | 2 + 4 files changed, 80 insertions(+), 98 deletions(-) create mode 100644 .changeset/busy-stars-pick.md diff --git a/.changeset/busy-stars-pick.md b/.changeset/busy-stars-pick.md new file mode 100644 index 0000000000..d3d65345cc --- /dev/null +++ b/.changeset/busy-stars-pick.md @@ -0,0 +1,5 @@ +--- +"@wagmi/cli": minor +--- + +Updated block explorer plugins supported chains. diff --git a/packages/cli/src/plugins/etherscan.ts b/packages/cli/src/plugins/etherscan.ts index b07bec4450..4a00b5aeb0 100644 --- a/packages/cli/src/plugins/etherscan.ts +++ b/packages/cli/src/plugins/etherscan.ts @@ -203,8 +203,6 @@ type ChainId = | 97 // BNB Smart Chain Testnet | 137 // Polygon Mainnet | 80002 // Polygon Amoy Testnet - | 1101 // Polygon zkEVM Mainnet - | 2442 // Polygon zkEVM Cardona Testnet | 8453 // Base Mainnet | 84532 // Base Sepolia Testnet | 42161 // Arbitrum One Mainnet @@ -221,7 +219,7 @@ type ChainId = | 199 // BitTorrent Chain Mainnet | 1029 // BitTorrent Chain Testnet | 42220 // Celo Mainnet - | 44787 // Celo Alfajores Testnet + | 11142220 // Celo Sepolia Testnet | 25 // Cronos Mainnet | 252 // Fraxtal Mainnet | 2522 // Fraxtal Testnet @@ -237,13 +235,9 @@ type ChainId = | 534352 // Scroll Mainnet | 534351 // Scroll Sepolia Testnet | 167000 // Taiko Mainnet - | 167009 // Taiko Hekla L2 Testnet - | 1111 // WEMIX3.0 Mainnet - | 1112 // WEMIX3.0 Testnet + | 167012 // Taiko Hoodi | 324 // zkSync Mainnet | 300 // zkSync Sepolia Testnet - | 660279 // Xai Mainnet - | 37714555429 // Xai Sepolia Testnet | 50 // XDC Mainnet | 51 // XDC Apothem Testnet | 33139 // ApeChain Mainnet @@ -253,7 +247,7 @@ type ChainId = | 50104 // Sophon Mainnet | 531050104 // Sophon Sepolia Testnet | 146 // Sonic Mainnet - | 57054 // Sonic Blaze Testnet + | 14601 // Sonic Testnet | 130 // Unichain Mainnet | 1301 // Unichain Sepolia Testnet | 2741 // Abstract Mainnet @@ -265,5 +259,6 @@ type ChainId = | 10143 // Monad Testnet | 999 // HyperEVM Mainnet | 747474 // Katana Mainnet + | 737373 // Katana Bokuto | 1329 // Sei Mainnet | 1328 // Sei Testnet diff --git a/packages/cli/src/plugins/routescan.ts b/packages/cli/src/plugins/routescan.ts index 7714850dc5..ab41dc4776 100644 --- a/packages/cli/src/plugins/routescan.ts +++ b/packages/cli/src/plugins/routescan.ts @@ -195,94 +195,118 @@ type ChainId = | 14 // Flare Mainnet | 16 // Coston | 19 // Songbird Canary + | 56 // BNB Smart Chain | 114 // Coston2 | 130 // Unichain | 151 // Redbelly | 166 // Omni - | 183 // ERN Scan | 185 // Mint - | 233 // ERN Scan | 252 // Fraxtal | 254 // Swan chain - | 255 // Kroma | 288 // Boba Ethereum | 291 // Orderly - | 303 // WYZth | 324 // zkSync Era | 335 // DFK | 357 // Pulsar | 369 // Pulse Chain + | 919 // Mode + | 1301 // Unichain + | 1687 // Mint Sepolia + | 1946 // Minato + | 2037 // Kiwi + | 2233 // Chainbase + | 2522 // Fraxtal + | 3012 // PLAYA3ULL Games + | 3636 // Botanix + | 3939 // DOS + | 4202 // Lisk + | 4460 // Orderly + | 10888 // GameSwift + | 17000 // Holesky + | 28882 // Boba Sepolia + | 48795 // Space + | 49321 // GUNZ + | 70800 // Barret + | 80008 // Polynomial Sepolia + | 80085 // Artio Testnet + | 84532 // Base Sepolia + | 88882 // Chiliz Spicy + | 167008 // Taiko Katla + | 167009 // Taiko Hekla + | 173750 // Echo + | 421614 // Arbitrum Sepolia + | 555666 // Eclipse + | 763373 // Ink + | 779672 // Dispatch + | 11155111 // Sepolia + | 11155420 // OP Sepolia + | 20241133 // Proxima + | 21000001 // Corn + | 168587773 // Blast Sepolia + | 999999999 // Zora Sepolia + | 164_4 // Omni Omega + | 153_2 // Redbelly + | 70805_2 // Cloud | 378 // Koroshi | 379 // KOROSHI - | 392 // Nexus - | 480 // World Chain - | 919 // Mode | 987 // Orange | 999 // Hyperliquid EVM | 1088 // Metis | 1135 // Lisk | 1216 // Intersect | 1234 // StepNetwork - | 1301 // Unichain | 1344 // Blitz - | 1687 // Mint Sepolia | 1853 // HighOctane | 1888 // Memoria | 1923 // Swell - | 2037 // Kiwi | 2038 // Shrapnel | 2044 // Shrapnel - | 2358 // Kroma - | 2522 // Fraxtal + | 2365 // Kite AI + | 2368 // Kite AI | 2786 // Apertum | 2818 // Morph | 3011 // PLAYA3ULL Games - | 3012 // PLAYA3ULL Games | 3084 // XL Network | 3278 // Soshi - | 3636 // Botanix | 3637 // Botanix - | 3939 // DOS - | 4202 // Lisk | 4227 // Hashfire | 4313 // Artery | 4337 // Beam - | 4460 // Orderly - | 4801 // World Chain | 5000 // Mantle | 5039 // Onigiri | 5040 // Onigiri | 5115 // Citrea | 5330 // Superseed | 5566 // StraitsX - | 6118 // Uptn | 6119 // UPTN | 6533 // Kalichain | 6900 // Nibiru | 6911 // Nibiru Testnet-2 | 7171 // Bitrock - | 7210 // Nibiru - | 7887 // Kinto + | 7894 // Mintus | 7979 // DOS | 8008 // Polynomial | 8021 // Numine | 8227 // Space | 8453 // Base | 8787 // Animalia - | 8888 // XANA-CHAIN + | 9745 // Plasma | 10036 // Innovo | 10507 // Numbers | 10849 // Lamina1 | 10850 // Lamina1 Identity - | 10880 // BloodLoop + | 11227 // Jiritsutes | 12150 // QChain | 13322 // Fifa Blockchain + | 13337 // Beam + | 13576 // Mythgames + | 14174 // Pecorino | 16180 // Plyr - | 17000 // Holesky | 21024 // Tradex + | 21816 // Frqtal + | 24010 // Stealthnet | 27827 // Zeroone | 28530 // Blockticity - | 28882 // Boba Sepolia | 33311 // Feature | 34443 // Mode | 42069 // Coqnet @@ -290,89 +314,45 @@ type ChainId = | 43113 // C-Chain Fuji | 43114 // C-Chain | 43419 // GUNZ - | 49321 // GUNZ - | 53935 // DFK - | 55551 // Photon - | 56288 // Boba BNB - | 57073 // Ink - | 61587 // Growth - | 62521 // Lucid - | 62707 // Teleporter 1 - | 68414 // Henesys - | 70953 // Teleporter 2 - | 80008 // Polynomial Sepolia - | 80084 // Bartio Testnet - | 80085 // Artio Testnet - | 80094 // Berachain - | 81457 // Blast - | 84358 // Titan - | 84532 // Base Sepolia - | 88882 // Chiliz Spicy - | 88888 // Chiliz - | 96786 // Delaunch - | 167000 // Taiko - | 167008 // Taiko Katla - | 167009 // Taiko Hekla - | 173750 // Echo - | 432201 // Dexalot - | 432204 // Dexalot - | 504441 // Playdapp - | 710420 // Tiltyard - | 779672 // Dispatch - | 7777777 // Zora - | 11155111 // Sepolia - | 11155420 // OP Sepolia - | 20241133 // Proxima - | 21000000 // Corn - | 168587773 // Blast Sepolia - | 333000333 // Meld - | 999999999 // Zora Sepolia - | 164_4 // Omni Omega - | 1946 // Minato - | 2233 // Chainbase - | 153_2 // Redbelly - | 7222 // Nibiru Devnet - | 10888 // GameSwift - | 26659 // Mitosis - | 421614 // Arbitrum Sepolia - | 70805_2 // Cloud - | 7894 // Mintus - | 11227 // Jiritsutes - | 13337 // Beam - | 13576 // Mythgames - | 21816 // Frqtal - | 24010 // Stealthnet | 47208 // Armada - | 48795 // Space - | 53123 // Metasky | 53188 // DSRV2 | 53302 // Superseed + | 53935 // DFK | 54414 // Innovomark | 55197 // Egmtester + | 56288 // Boba BNB | 56400 // Zeroone + | 57073 // Ink | 59409 // Lifeaiv1 | 59932 // Insomnia + | 61587 // Growth + | 62521 // Lucid | 62831 // Plyr + | 68414 // Henesys | 69696 // Ceden - | 70800 // Barret | 76736 // Hiss - | 78170 // MXS Games | 79554 // Lucid | 79685 // Modex | 80069 // Berachain bepolia + | 80094 // Berachain + | 81457 // Blast + | 84358 // Titan + | 88888 // Chiliz + | 96786 // Delaunch | 97433 // Growth - | 124832 // Mitosis + | 124816 // Mitosis | 132008 // BitcoinL1 + | 167000 // Taiko | 210815 // Stavax - | 555666 // Eclipse + | 432201 // Dexalot + | 432204 // Dexalot | 560048 // Hoodi + | 710420 // Tiltyard | 723107 // Tixchain - | 763373 // Ink - | 11155931 // Rise - | 21000001 // Corn + | 5278000 // JSC Kaigan + | 7777777 // Zora + | 21000000 // Corn | 420120000 // Alpha 0 | 420120001 // Alpha 1 | 420420421 // Westend - | 9746_4 // Plasma - | 2368 // Kite AI - | 23944 // CX + | 9746_5 // Plasma diff --git a/packages/cli/src/plugins/sourcify.ts b/packages/cli/src/plugins/sourcify.ts index 165f9f801d..42c0221477 100644 --- a/packages/cli/src/plugins/sourcify.ts +++ b/packages/cli/src/plugins/sourcify.ts @@ -87,6 +87,7 @@ type ChainId = | 5 // Ethereum Testnet Goerli | 3 // Ethereum Testnet Ropsten | 4 // Ethereum Testnet Rinkeby + | 96969696 // Privix Chain Testnet | 180 // AME Chain Mainnet | 78430 // Amplify Subnet | 1339 // Elysium Mainnet @@ -249,6 +250,7 @@ type ChainId = | 80001 // Mumbai | 1101 // Polygon zkEVM | 2442 // Polygon zkEVM Cardona Testnet + | 16969696 // Privix Chain Mainnet | 369 // PulseChain | 35441 // Q Mainnet | 35443 // Q Testnet From 55d2a4719823d4f6e4d643693ee2622e4ccbb23a Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Mon, 13 Oct 2025 16:50:45 -0400 Subject: [PATCH 131/213] chore: bump happy-dom --- package.json | 2 +- pnpm-lock.yaml | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 08eb32295c..0c5f0d86ec 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@vitest/browser": "^3.2.4", "@vitest/coverage-v8": "^3.2.4", "@wagmi/test": "workspace:*", - "happy-dom": "^18.0.1", + "happy-dom": "^20.0.0", "knip": "^5.30.6", "playwright": "1.54.1", "prool": "^0.0.24", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 069c5fde8a..038e3db7ba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -81,8 +81,8 @@ importers: specifier: workspace:* version: link:packages/test happy-dom: - specifier: ^18.0.1 - version: 18.0.1 + specifier: ^20.0.0 + version: 20.0.0 knip: specifier: ^5.30.6 version: 5.30.6(@types/node@24.6.2)(typescript@5.9.2) @@ -118,7 +118,7 @@ importers: version: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@4.1.11) vitest: specifier: ^3.2.4 - version: 3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0) + version: 3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@20.0.0)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0) vitest-browser-react: specifier: ^2.0.0-beta.1 version: 2.0.0-beta.1(@types/react-dom@18.3.0)(@types/react@18.3.1)(@vitest/browser@3.2.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vitest@3.2.4) @@ -5493,8 +5493,8 @@ packages: h3@1.15.4: resolution: {integrity: sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ==} - happy-dom@18.0.1: - resolution: {integrity: sha512-qn+rKOW7KWpVTtgIUi6RVmTBZJSe2k0Db0vh1f7CWrWclkkc7/Q+FrOfkZIb2eiErLyqu5AXEzE7XthO9JVxRA==} + happy-dom@20.0.0: + resolution: {integrity: sha512-GkWnwIFxVGCf2raNrxImLo397RdGhLapj5cT3R2PT7FwL62Ze1DROhzmYW7+J3p9105DYMVenEejEbnq5wA37w==} engines: {node: '>=20.0.0'} hardhat@2.22.3: @@ -12342,7 +12342,7 @@ snapshots: magic-string: 0.30.17 sirv: 3.0.1 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0) + vitest: 3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@20.0.0)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0) ws: 8.18.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: playwright: 1.54.1 @@ -12367,7 +12367,7 @@ snapshots: std-env: 3.9.0 test-exclude: 7.0.1 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0) + vitest: 3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@20.0.0)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0) optionalDependencies: '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4) transitivePeerDependencies: @@ -14844,7 +14844,7 @@ snapshots: ufo: 1.6.1 uncrypto: 0.1.3 - happy-dom@18.0.1: + happy-dom@20.0.0: dependencies: '@types/node': 20.12.10 '@types/whatwg-mimetype': 3.0.2 @@ -18509,12 +18509,12 @@ snapshots: '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - vitest: 3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0) + vitest: 3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@20.0.0)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0) optionalDependencies: '@types/react': 18.3.1 '@types/react-dom': 18.3.0 - vitest@3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@18.0.1)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0): + vitest@3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@20.0.0)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 @@ -18542,7 +18542,7 @@ snapshots: optionalDependencies: '@types/node': 24.6.2 '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4) - happy-dom: 18.0.1 + happy-dom: 20.0.0 transitivePeerDependencies: - less - lightningcss From 74100b0dea2dfe7b057fdbe1660596554c70642e Mon Sep 17 00:00:00 2001 From: tmm Date: Mon, 13 Oct 2025 17:03:58 -0400 Subject: [PATCH 132/213] fix(core): adds `account` to internal `call` in `waitForTransactionReceipt` for reverted transaction (#4832) * fix nonce and account when eth_call * add changeset * chore: changeset --------- Co-authored-by: Clouds Flowing --- .changeset/wise-foxes-smash.md | 5 +++++ packages/core/src/actions/waitForTransactionReceipt.test.ts | 1 + packages/core/src/actions/waitForTransactionReceipt.ts | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/wise-foxes-smash.md diff --git a/.changeset/wise-foxes-smash.md b/.changeset/wise-foxes-smash.md new file mode 100644 index 0000000000..39cdfbbc2f --- /dev/null +++ b/.changeset/wise-foxes-smash.md @@ -0,0 +1,5 @@ +--- +"@wagmi/core": patch +--- + +Fixed passing `account` in `waitForTransactionReceipt` for reverted transaction. diff --git a/packages/core/src/actions/waitForTransactionReceipt.test.ts b/packages/core/src/actions/waitForTransactionReceipt.test.ts index 8febc9e701..8cc506599f 100644 --- a/packages/core/src/actions/waitForTransactionReceipt.test.ts +++ b/packages/core/src/actions/waitForTransactionReceipt.test.ts @@ -44,6 +44,7 @@ test('behavior: transaction reverted', async () => { [CallExecutionError: Execution reverted with reason: PartyBid::claim: contribution already claimed. Raw Call Arguments: + from: 0xa0cf798816d4b9b9866b5330eea46a18382f251e to: 0xf1332f21487e74612ed3a0fb36da729b73f1ae19 value: 0 ETH data: 0x1e83409a000000000000000000000000a0cf798816d4b9b9866b5330eea46a18382f251e diff --git a/packages/core/src/actions/waitForTransactionReceipt.ts b/packages/core/src/actions/waitForTransactionReceipt.ts index 5ac8fcdb20..4efa69d27d 100644 --- a/packages/core/src/actions/waitForTransactionReceipt.ts +++ b/packages/core/src/actions/waitForTransactionReceipt.ts @@ -63,10 +63,13 @@ export async function waitForTransactionReceipt< getTransaction, 'getTransaction', ) - const txn = await action_getTransaction({ hash: receipt.transactionHash }) + const { from: account, ...txn } = await action_getTransaction({ + hash: receipt.transactionHash, + }) const action_call = getAction(client, call, 'call') const code = await action_call({ ...(txn as any), + account, data: txn.input, gasPrice: txn.type !== 'eip1559' ? txn.gasPrice : undefined, maxFeePerGas: txn.type === 'eip1559' ? txn.maxFeePerGas : undefined, From 4c472073fe82b1a4780cb782f4bf6b18414a5523 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 10:30:03 -0400 Subject: [PATCH 133/213] chore: version packages (#4831) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/busy-stars-pick.md | 5 ----- .changeset/wise-foxes-smash.md | 5 ----- packages/cli/CHANGELOG.md | 6 ++++++ packages/cli/package.json | 2 +- packages/cli/src/version.ts | 2 +- packages/connectors/CHANGELOG.md | 7 +++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/core/src/version.ts | 2 +- packages/react/CHANGELOG.md | 8 ++++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 8 ++++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 17 files changed, 45 insertions(+), 20 deletions(-) delete mode 100644 .changeset/busy-stars-pick.md delete mode 100644 .changeset/wise-foxes-smash.md diff --git a/.changeset/busy-stars-pick.md b/.changeset/busy-stars-pick.md deleted file mode 100644 index d3d65345cc..0000000000 --- a/.changeset/busy-stars-pick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/cli": minor ---- - -Updated block explorer plugins supported chains. diff --git a/.changeset/wise-foxes-smash.md b/.changeset/wise-foxes-smash.md deleted file mode 100644 index 39cdfbbc2f..0000000000 --- a/.changeset/wise-foxes-smash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/core": patch ---- - -Fixed passing `account` in `waitForTransactionReceipt` for reverted transaction. diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 5e722bf066..bef526f770 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/cli +## 2.7.0 + +### Minor Changes + +- Updated block explorer plugins supported chains. ([#4830](https://github.com/wevm/wagmi/pull/4830)) + ## 2.6.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 697c8d9546..1d74e30686 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/cli", "description": "Manage and generate code from Ethereum ABIs", - "version": "2.6.0", + "version": "2.7.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/cli/src/version.ts b/packages/cli/src/version.ts index d99e0ff4a9..e32207cee5 100644 --- a/packages/cli/src/version.ts +++ b/packages/cli/src/version.ts @@ -1 +1 @@ -export const version = '2.6.0' +export const version = '2.7.0' diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 950835fd86..1de9b73c72 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/connectors +## 6.0.1 + +### Patch Changes + +- Updated dependencies [[`74100b0`](https://github.com/wevm/wagmi/commit/74100b0dea2dfe7b057fdbe1660596554c70642e)]: + - @wagmi/core@2.22.1 + ## 6.0.0 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 0db1924543..38350827fb 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "6.0.0", + "version": "6.0.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index dcb5468294..105e1c1236 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '6.0.0' +export const version = '6.0.1' diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index a0b8590bd6..c095d10ea7 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/core +## 2.22.1 + +### Patch Changes + +- Fixed passing `account` in `waitForTransactionReceipt` for reverted transaction. ([#4832](https://github.com/wevm/wagmi/pull/4832)) + ## 2.22.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index 959034abeb..493e08e15d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/core", "description": "VanillaJS library for Ethereum", - "version": "2.22.0", + "version": "2.22.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/core/src/version.ts b/packages/core/src/version.ts index a1dcca175a..54c03b1e57 100644 --- a/packages/core/src/version.ts +++ b/packages/core/src/version.ts @@ -1 +1 @@ -export const version = '2.22.0' +export const version = '2.22.1' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index e93c13f54c..f526478df9 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,13 @@ # wagmi +## 2.18.1 + +### Patch Changes + +- Updated dependencies [[`74100b0`](https://github.com/wevm/wagmi/commit/74100b0dea2dfe7b057fdbe1660596554c70642e)]: + - @wagmi/core@2.22.1 + - @wagmi/connectors@6.0.1 + ## 2.18.0 ### Minor Changes diff --git a/packages/react/package.json b/packages/react/package.json index 76db6a3276..8c8078cab7 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.18.0", + "version": "2.18.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index 8bbbbfc3d7..2fdda5d63c 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.18.0' +export const version = '2.18.1' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index f600ed4c3e..148bbdff74 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,13 @@ # @wagmi/vue +## 0.2.13 + +### Patch Changes + +- Updated dependencies [[`74100b0`](https://github.com/wevm/wagmi/commit/74100b0dea2dfe7b057fdbe1660596554c70642e)]: + - @wagmi/core@2.22.1 + - @wagmi/connectors@6.0.1 + ## 0.2.12 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index 1451651725..5ecd8966e4 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.2.12", + "version": "0.2.13", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index 0c1e48803d..9ce772dd35 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.2.12' +export const version = '0.2.13' From ae31a8d3d0b436841d6546ab2565dee624204aca Mon Sep 17 00:00:00 2001 From: tmm Date: Tue, 21 Oct 2025 14:40:55 -0400 Subject: [PATCH 134/213] feat(connectors): get porto instance (#4837) feat(connectors): add getPortoInstance method --- .changeset/spicy-lions-bake.md | 5 +++++ packages/connectors/src/porto.ts | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/spicy-lions-bake.md diff --git a/.changeset/spicy-lions-bake.md b/.changeset/spicy-lions-bake.md new file mode 100644 index 0000000000..05eb8883cb --- /dev/null +++ b/.changeset/spicy-lions-bake.md @@ -0,0 +1,5 @@ +--- +"@wagmi/connectors": minor +--- + +Added `getPortoInstance` method to `porto`. diff --git a/packages/connectors/src/porto.ts b/packages/connectors/src/porto.ts index a7e5fb4dae..ad83df0ada 100644 --- a/packages/connectors/src/porto.ts +++ b/packages/connectors/src/porto.ts @@ -40,6 +40,7 @@ export function porto(parameters: PortoParameters = {}) { : readonly Address[] chainId: number }> + getPortoInstance(): Promise onConnect(connectInfo: ProviderConnectInfo): void } @@ -185,7 +186,7 @@ export function porto(parameters: PortoParameters = {}) { }) return Number(hexChainId) }, - async getProvider() { + async getPortoInstance() { porto_promise ??= (async () => { const { Porto } = await import('porto') return Porto.create({ @@ -195,7 +196,10 @@ export function porto(parameters: PortoParameters = {}) { transports: transports as never, }) })() - return (await porto_promise).provider + return await porto_promise + }, + async getProvider() { + return (await this.getPortoInstance()).provider }, icon: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIyIiBoZWlnaHQ9IjQyMiIgdmlld0JveD0iMCAwIDQyMiA0MjIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSI0MjIiIGhlaWdodD0iNDIyIiBmaWxsPSJibGFjayIvPgo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMV8xNSkiPgo8cGF0aCBkPSJNODEgMjg2LjM2NkM4MSAyODAuODkzIDg1LjQ1MDUgMjc2LjQ1NSA5MC45NDA0IDI3Ni40NTVIMzI5LjUxMUMzMzUuMDAxIDI3Ni40NTUgMzM5LjQ1MiAyODAuODkzIDMzOS40NTIgMjg2LjM2NlYzMDYuMTg4QzMzOS40NTIgMzExLjY2MiAzMzUuMDAxIDMxNi4wOTkgMzI5LjUxMSAzMTYuMDk5SDkwLjk0MDRDODUuNDUwNSAzMTYuMDk5IDgxIDMxMS42NjIgODEgMzA2LjE4OFYyODYuMzY2WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTAuOTQwNCAyMzQuODI4Qzg1LjQ1MDUgMjM0LjgyOCA4MSAyMzkuMjY2IDgxIDI0NC43MzlWMjcxLjUzMUM4My44NDMyIDI2OS42MzMgODcuMjYyMiAyNjguNTI2IDkwLjk0MDQgMjY4LjUyNkgzMjkuNTExQzMzMy4xODggMjY4LjUyNiAzMzYuNjA4IDI2OS42MzMgMzM5LjQ1MiAyNzEuNTMxVjI0NC43MzlDMzM5LjQ1MiAyMzkuMjY2IDMzNS4wMDEgMjM0LjgyOCAzMjkuNTExIDIzNC44MjhIOTAuOTQwNFpNMzM5LjQ1MiAyODYuMzY2QzMzOS40NTIgMjgwLjg5MyAzMzUuMDAxIDI3Ni40NTUgMzI5LjUxMSAyNzYuNDU1SDkwLjk0MDRDODUuNDUwNSAyNzYuNDU1IDgxIDI4MC44OTMgODEgMjg2LjM2NlYzMDYuMTlDODEgMzExLjY2NCA4NS40NTA1IDMxNi4xMDEgOTAuOTQwNCAzMTYuMTAxSDMyOS41MTFDMzM1LjAwMSAzMTYuMTAxIDMzOS40NTIgMzExLjY2NCAzMzkuNDUyIDMwNi4xOVYyODYuMzY2WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTAuOTQwNCAxOTMuMjAxQzg1LjQ1MDUgMTkzLjIwMSA4MSAxOTcuNjM4IDgxIDIwMy4xMTJWMjI5LjkwM0M4My44NDMyIDIyOC4wMDYgODcuMjYyMiAyMjYuODk5IDkwLjk0MDQgMjI2Ljg5OUgzMjkuNTExQzMzMy4xODggMjI2Ljg5OSAzMzYuNjA4IDIyOC4wMDYgMzM5LjQ1MiAyMjkuOTAzVjIwMy4xMTJDMzM5LjQ1MiAxOTcuNjM4IDMzNS4wMDEgMTkzLjIwMSAzMjkuNTExIDE5My4yMDFIOTAuOTQwNFpNMzM5LjQ1MiAyNDQuNzM5QzMzOS40NTIgMjM5LjI2NSAzMzUuMDAxIDIzNC44MjggMzI5LjUxMSAyMzQuODI4SDkwLjk0MDRDODUuNDUwNSAyMzQuODI4IDgxIDIzOS4yNjUgODEgMjQ0LjczOVYyNzEuNTNDODEuMjE3NSAyNzEuMzg1IDgxLjQzODMgMjcxLjI0NSA4MS42NjI0IDI3MS4xMDlDODMuODMyNSAyNjkuNzk0IDg2LjMwNTQgMjY4LjkyNyA4OC45NTIzIDI2OC42MzVDODkuNjA1MSAyNjguNTYzIDkwLjI2ODQgMjY4LjUyNiA5MC45NDA0IDI2OC41MjZIMzI5LjUxMUMzMzAuMTgzIDI2OC41MjYgMzMwLjg0NiAyNjguNTYzIDMzMS40OTggMjY4LjYzNUMzMzQuNDE5IDI2OC45NTcgMzM3LjEyOCAyNjkuOTggMzM5LjQ1MiAyNzEuNTNWMjQ0LjczOVpNMzM5LjQ1MiAyODYuMzY2QzMzOS40NTIgMjgxLjAyMSAzMzUuMjA2IDI3Ni42NjMgMzI5Ljg5MyAyNzYuNDYyQzMyOS43NjcgMjc2LjQ1NyAzMjkuNjQgMjc2LjQ1NSAzMjkuNTExIDI3Ni40NTVIOTAuOTQwNEM4NS40NTA1IDI3Ni40NTUgODEgMjgwLjg5MyA4MSAyODYuMzY2VjMwNi4xODhDODEgMzExLjY2MiA4NS40NTA1IDMxNi4xMDEgOTAuOTQwNCAzMTYuMTAxSDMyOS41MTFDMzM1LjAwMSAzMTYuMTAxIDMzOS40NTIgMzExLjY2MiAzMzkuNDUyIDMwNi4xODhWMjg2LjM2NloiIGZpbGw9IndoaXRlIiBmaWxsLW9wYWNpdHk9IjAuNSIvPgo8cGF0aCBvcGFjaXR5PSIwLjMiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTguMDE0NiAxMDRDODguNjE3NyAxMDQgODEgMTExLjU5NSA4MSAxMjAuOTY1VjE4OC4yNzZDODMuODQzMiAxODYuMzc5IDg3LjI2MjIgMTg1LjI3MiA5MC45NDA0IDE4NS4yNzJIMzI5LjUxMUMzMzMuMTg4IDE4NS4yNzIgMzM2LjYwOCAxODYuMzc5IDMzOS40NTIgMTg4LjI3NlYxMjAuOTY1QzMzOS40NTIgMTExLjU5NSAzMzEuODMzIDEwNCAzMjIuNDM3IDEwNEg5OC4wMTQ2Wk0zMzkuNDUyIDIwMy4xMTJDMzM5LjQ1MiAxOTcuNjM4IDMzNS4wMDEgMTkzLjIwMSAzMjkuNTExIDE5My4yMDFIOTAuOTQwNEM4NS40NTA1IDE5My4yMDEgODEgMTk3LjYzOCA4MSAyMDMuMTEyVjIyOS45MDNDODEuMjE3NSAyMjkuNzU4IDgxLjQzODMgMjI5LjYxOCA4MS42NjI0IDIyOS40ODJDODMuODMyNSAyMjguMTY3IDg2LjMwNTQgMjI3LjMgODguOTUyMyAyMjcuMDA4Qzg5LjYwNTEgMjI2LjkzNiA5MC4yNjg0IDIyNi44OTkgOTAuOTQwNCAyMjYuODk5SDMyOS41MTFDMzMwLjE4MyAyMjYuODk5IDMzMC44NDYgMjI2LjkzNiAzMzEuNDk4IDIyNy4wMDhDMzM0LjQxOSAyMjcuMzMgMzM3LjEyOCAyMjguMzUyIDMzOS40NTIgMjI5LjkwM1YyMDMuMTEyWk0zMzkuNDUyIDI0NC43MzlDMzM5LjQ1MiAyMzkuMzkzIDMzNS4yMDYgMjM1LjAzNiAzMjkuODkzIDIzNC44MzVDMzI5Ljc2NyAyMzQuODMgMzI5LjY0IDIzNC44MjggMzI5LjUxMSAyMzQuODI4SDkwLjk0MDRDODUuNDUwNSAyMzQuODI4IDgxIDIzOS4yNjUgODEgMjQ0LjczOVYyNzEuNTNMODEuMDcwNyAyNzEuNDgzQzgxLjI2NTMgMjcxLjM1NSA4MS40NjI1IDI3MS4yMyA4MS42NjI0IDI3MS4xMDlDODEuOTA4MyAyNzAuOTYgODIuMTU4MSAyNzAuODE3IDgyLjQxMTcgMjcwLjY3OUM4NC4zOTUzIDI2OS42MDUgODYuNjA1NCAyNjguODk0IDg4Ljk1MjMgMjY4LjYzNUM4OS4wMDUyIDI2OC42MjkgODkuMDU4IDI2OC42MjQgODkuMTExIDI2OC42MThDODkuNzEyNSAyNjguNTU3IDkwLjMyMjggMjY4LjUyNiA5MC45NDA0IDI2OC41MjZIMzI5LjUxMUMzMjkuNzM4IDI2OC41MjYgMzI5Ljk2NSAyNjguNTMgMzMwLjE5MiAyNjguNTM5QzMzMC42MzEgMjY4LjU1NSAzMzEuMDY3IDI2OC41ODcgMzMxLjQ5OCAyNjguNjM1QzMzNC40MTkgMjY4Ljk1NyAzMzcuMTI4IDI2OS45OCAzMzkuNDUyIDI3MS41M1YyNDQuNzM5Wk0zMzkuNDUyIDI4Ni4zNjZDMzM5LjQ1MiAyODEuMDIxIDMzNS4yMDYgMjc2LjY2MyAzMjkuODkzIDI3Ni40NjJMMzI5Ljg2NSAyNzYuNDYxQzMyOS43NDggMjc2LjQ1NyAzMjkuNjI5IDI3Ni40NTUgMzI5LjUxMSAyNzYuNDU1SDkwLjk0MDRDODUuNDUwNSAyNzYuNDU1IDgxIDI4MC44OTMgODEgMjg2LjM2NlYzMDYuMTg4QzgxIDMxMS42NjIgODUuNDUwNSAzMTYuMTAxIDkwLjk0MDQgMzE2LjEwMUgzMjkuNTExQzMzNS4wMDEgMzE2LjEwMSAzMzkuNDUyIDMxMS42NjIgMzM5LjQ1MiAzMDYuMTg4VjI4Ni4zNjZaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjY5Ljg2OCAxMzEuNzUyQzI2OS44NjggMTI2LjI3OCAyNzQuMzE4IDEyMS44NCAyNzkuODA4IDEyMS44NEgzMTEuNjE4QzMxNy4xMDggMTIxLjg0IDMyMS41NTggMTI2LjI3OCAzMjEuNTU4IDEzMS43NTJWMTYxLjQ4NUMzMjEuNTU4IDE2Ni45NTkgMzE3LjEwOCAxNzEuMzk2IDMxMS42MTggMTcxLjM5NkgyNzkuODA4QzI3NC4zMTggMTcxLjM5NiAyNjkuODY4IDE2Ni45NTkgMjY5Ljg2OCAxNjEuNDg1VjEzMS43NTJaIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzFfMTUiPgo8cmVjdCB3aWR0aD0iMjU5IiBoZWlnaHQ9IjIxMyIgZmlsbD0id2hpdGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDgxIDEwNCkiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K', id: 'xyz.ithaca.porto', From 64ac0f9e090408ce420bff2fd8de7eb7248a6d48 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Tue, 21 Oct 2025 14:48:24 -0400 Subject: [PATCH 135/213] chore: audit --- package.json | 1 + .../templates/vite-react/package.json | 2 +- .../templates/vite-vanilla/package.json | 2 +- .../templates/vite-vue/package.json | 2 +- playgrounds/vite-core/package.json | 2 +- playgrounds/vite-react/package.json | 2 +- playgrounds/vite-vue/package.json | 2 +- pnpm-lock.yaml | 269 +++--------------- pnpm-workspace.yaml | 2 + 9 files changed, 53 insertions(+), 231 deletions(-) diff --git a/package.json b/package.json index 0c5f0d86ec..b66ea05c6a 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "elliptic@<=6.6.0": ">=6.6.1", "esbuild@<=0.24.2": "0.25.0", "nanoid@<3.3.8": "3.3.8", + "playwright@<1.55.1": "1.55.1", "semver@<5.7.2": ">=5.7.2", "serialize-javascript@>=6.0.0 <6.0.2": "6.0.2", "tmp@<=0.2.3": "0.2.4", diff --git a/packages/create-wagmi/templates/vite-react/package.json b/packages/create-wagmi/templates/vite-react/package.json index 435af13d22..01fa355f41 100644 --- a/packages/create-wagmi/templates/vite-react/package.json +++ b/packages/create-wagmi/templates/vite-react/package.json @@ -22,6 +22,6 @@ "@wagmi/cli": "latest", "buffer": "^6.0.3", "typescript": "^5.9.2", - "vite": "^5.4.20" + "vite": "^5.4.21" } } diff --git a/packages/create-wagmi/templates/vite-vanilla/package.json b/packages/create-wagmi/templates/vite-vanilla/package.json index 3ff5490b4e..1838b04510 100644 --- a/packages/create-wagmi/templates/vite-vanilla/package.json +++ b/packages/create-wagmi/templates/vite-vanilla/package.json @@ -19,6 +19,6 @@ "@wagmi/cli": "latest", "buffer": "^6.0.3", "typescript": "^5.9.2", - "vite": "^5.4.20" + "vite": "^5.4.21" } } diff --git a/packages/create-wagmi/templates/vite-vue/package.json b/packages/create-wagmi/templates/vite-vue/package.json index 0c9936d83b..34a1fb785f 100644 --- a/packages/create-wagmi/templates/vite-vue/package.json +++ b/packages/create-wagmi/templates/vite-vue/package.json @@ -17,7 +17,7 @@ "devDependencies": { "@vitejs/plugin-vue": "^5.0.4", "buffer": "^6.0.3", - "vite": "^5.4.20", + "vite": "^5.4.21", "vue-tsc": "^2.0.6" } } diff --git a/playgrounds/vite-core/package.json b/playgrounds/vite-core/package.json index 78d61c3cb4..5715c40a82 100644 --- a/playgrounds/vite-core/package.json +++ b/playgrounds/vite-core/package.json @@ -19,6 +19,6 @@ "@types/react-dom": ">=18.3.0", "@vitejs/plugin-react": "catalog:", "buffer": "^6.0.3", - "vite": "^5.4.20" + "vite": "^5.4.21" } } diff --git a/playgrounds/vite-react/package.json b/playgrounds/vite-react/package.json index 377d94b4b8..92b03d63b6 100644 --- a/playgrounds/vite-react/package.json +++ b/playgrounds/vite-react/package.json @@ -24,6 +24,6 @@ "@vitejs/plugin-react": "catalog:", "@wagmi/cli": "workspace:*", "buffer": "^6.0.3", - "vite": "^5.4.20" + "vite": "^5.4.21" } } diff --git a/playgrounds/vite-vue/package.json b/playgrounds/vite-vue/package.json index f177c6d5ff..e29aad3256 100644 --- a/playgrounds/vite-vue/package.json +++ b/playgrounds/vite-vue/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@vitejs/plugin-vue": "^5.0.4", "buffer": "^6.0.3", - "vite": "^5.4.20", + "vite": "^5.4.21", "vue-tsc": "^2.0.6" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 038e3db7ba..c65d41671c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,6 +39,7 @@ overrides: elliptic@<=6.6.0: '>=6.6.1' esbuild@<=0.24.2: 0.25.0 nanoid@<3.3.8: 3.3.8 + playwright@<1.55.1: 1.55.1 semver@<5.7.2: '>=5.7.2' serialize-javascript@>=6.0.0 <6.0.2: 6.0.2 tmp@<=0.2.3: 0.2.4 @@ -73,7 +74,7 @@ importers: version: 4.7.0(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1)) '@vitest/browser': specifier: ^3.2.4 - version: 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4) + version: 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.55.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4) '@vitest/coverage-v8': specifier: ^3.2.4 version: 3.2.4(@vitest/browser@3.2.4)(vitest@3.2.4) @@ -90,8 +91,8 @@ importers: specifier: runtime:^24.5.1 version: runtime:24.9.0 playwright: - specifier: 1.54.1 - version: 1.54.1 + specifier: 1.55.1 + version: 1.55.1 prool: specifier: ^0.0.24 version: 0.0.24(patch_hash=6ea470deaa7c0b09169321c017f09f7cc1c25c3c8051259b8efa8c34c8aaf823) @@ -493,13 +494,13 @@ importers: version: 18.3.0 '@vitejs/plugin-react': specifier: 'catalog:' - version: 4.7.0(vite@5.4.20(@types/node@24.6.2)(terser@5.31.0)) + version: 4.7.0(vite@5.4.21(@types/node@24.6.2)(terser@5.31.0)) buffer: specifier: ^6.0.3 version: 6.0.3 vite: - specifier: ^5.4.20 - version: 5.4.20(@types/node@24.6.2)(terser@5.31.0) + specifier: ^5.4.21 + version: 5.4.21(@types/node@24.6.2)(terser@5.31.0) playgrounds/vite-react: dependencies: @@ -539,7 +540,7 @@ importers: version: 18.3.0 '@vitejs/plugin-react': specifier: 'catalog:' - version: 4.7.0(vite@5.4.20(@types/node@24.6.2)(terser@5.31.0)) + version: 4.7.0(vite@5.4.21(@types/node@24.6.2)(terser@5.31.0)) '@wagmi/cli': specifier: workspace:* version: link:../../packages/cli @@ -547,8 +548,8 @@ importers: specifier: ^6.0.3 version: 6.0.3 vite: - specifier: ^5.4.20 - version: 5.4.20(@types/node@24.6.2)(terser@5.31.0) + specifier: ^5.4.21 + version: 5.4.21(@types/node@24.6.2)(terser@5.31.0) playgrounds/vite-vue: dependencies: @@ -567,13 +568,13 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.4.20(@types/node@24.6.2)(terser@5.31.0))(vue@3.4.27(typescript@5.9.2)) + version: 5.0.4(vite@5.4.21(@types/node@24.6.2)(terser@5.31.0))(vue@3.4.27(typescript@5.9.2)) buffer: specifier: ^6.0.3 version: 6.0.3 vite: - specifier: ^5.4.20 - version: 5.4.20(@types/node@24.6.2)(terser@5.31.0) + specifier: ^5.4.21 + version: 5.4.21(@types/node@24.6.2)(terser@5.31.0) vue-tsc: specifier: ^2.0.6 version: 2.0.16(typescript@5.9.2) @@ -2913,108 +2914,54 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.24.4': - resolution: {integrity: sha512-jfUJrFct/hTA0XDM5p/htWKoNNTbDLY0KRwEt6pyOA6k2fmk0WVwl65PdUdJZgzGEHWx+49LilkcSaumQRyNQw==} - cpu: [arm] - os: [android] - '@rollup/rollup-android-arm-eabi@4.52.2': resolution: {integrity: sha512-o3pcKzJgSGt4d74lSZ+OCnHwkKBeAbFDmbEm5gg70eA8VkyCuC/zV9TwBnmw6VjDlRdF4Pshfb+WE9E6XY1PoQ==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.24.4': - resolution: {integrity: sha512-j4nrEO6nHU1nZUuCfRKoCcvh7PIywQPUCBa2UsootTHvTHIoIu2BzueInGJhhvQO/2FTRdNYpf63xsgEqH9IhA==} - cpu: [arm64] - os: [android] - '@rollup/rollup-android-arm64@4.52.2': resolution: {integrity: sha512-cqFSWO5tX2vhC9hJTK8WAiPIm4Q8q/cU8j2HQA0L3E1uXvBYbOZMhE2oFL8n2pKB5sOCHY6bBuHaRwG7TkfJyw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.24.4': - resolution: {integrity: sha512-GmU/QgGtBTeraKyldC7cDVVvAJEOr3dFLKneez/n7BvX57UdhOqDsVwzU7UOnYA7AAOt+Xb26lk79PldDHgMIQ==} - cpu: [arm64] - os: [darwin] - '@rollup/rollup-darwin-arm64@4.52.2': resolution: {integrity: sha512-vngduywkkv8Fkh3wIZf5nFPXzWsNsVu1kvtLETWxTFf/5opZmflgVSeLgdHR56RQh71xhPhWoOkEBvbehwTlVA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.24.4': - resolution: {integrity: sha512-N6oDBiZCBKlwYcsEPXGDE4g9RoxZLK6vT98M8111cW7VsVJFpNEqvJeIPfsCzbf0XEakPslh72X0gnlMi4Ddgg==} - cpu: [x64] - os: [darwin] - '@rollup/rollup-darwin-x64@4.52.2': resolution: {integrity: sha512-h11KikYrUCYTrDj6h939hhMNlqU2fo/X4NB0OZcys3fya49o1hmFaczAiJWVAFgrM1NCP6RrO7lQKeVYSKBPSQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.24.4': - resolution: {integrity: sha512-py5oNShCCjCyjWXCZNrRGRpjWsF0ic8f4ieBNra5buQz0O/U6mMXCpC1LvrHuhJsNPgRt36tSYMidGzZiJF6mw==} - cpu: [arm64] - os: [freebsd] - '@rollup/rollup-freebsd-arm64@4.52.2': resolution: {integrity: sha512-/eg4CI61ZUkLXxMHyVlmlGrSQZ34xqWlZNW43IAU4RmdzWEx0mQJ2mN/Cx4IHLVZFL6UBGAh+/GXhgvGb+nVxw==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.24.4': - resolution: {integrity: sha512-L7VVVW9FCnTTp4i7KrmHeDsDvjB4++KOBENYtNYAiYl96jeBThFfhP6HVxL74v4SiZEVDH/1ILscR5U9S4ms4g==} - cpu: [x64] - os: [freebsd] - '@rollup/rollup-freebsd-x64@4.52.2': resolution: {integrity: sha512-QOWgFH5X9+p+S1NAfOqc0z8qEpJIoUHf7OWjNUGOeW18Mx22lAUOiA9b6r2/vpzLdfxi/f+VWsYjUOMCcYh0Ng==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.24.4': - resolution: {integrity: sha512-10ICosOwYChROdQoQo589N5idQIisxjaFE/PAnX2i0Zr84mY0k9zul1ArH0rnJ/fpgiqfu13TFZR5A5YJLOYZA==} - cpu: [arm] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-arm-gnueabihf@4.52.2': resolution: {integrity: sha512-kDWSPafToDd8LcBYd1t5jw7bD5Ojcu12S3uT372e5HKPzQt532vW+rGFFOaiR0opxePyUkHrwz8iWYEyH1IIQA==} cpu: [arm] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm-musleabihf@4.24.4': - resolution: {integrity: sha512-ySAfWs69LYC7QhRDZNKqNhz2UKN8LDfbKSMAEtoEI0jitwfAG2iZwVqGACJT+kfYvvz3/JgsLlcBP+WWoKCLcw==} - cpu: [arm] - os: [linux] - libc: [musl] - '@rollup/rollup-linux-arm-musleabihf@4.52.2': resolution: {integrity: sha512-gKm7Mk9wCv6/rkzwCiUC4KnevYhlf8ztBrDRT9g/u//1fZLapSRc+eDZj2Eu2wpJ+0RzUKgtNijnVIB4ZxyL+w==} cpu: [arm] os: [linux] libc: [musl] - '@rollup/rollup-linux-arm64-gnu@4.24.4': - resolution: {integrity: sha512-uHYJ0HNOI6pGEeZ/5mgm5arNVTI0nLlmrbdph+pGXpC9tFHFDQmDMOEqkmUObRfosJqpU8RliYoGz06qSdtcjg==} - cpu: [arm64] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-arm64-gnu@4.52.2': resolution: {integrity: sha512-66lA8vnj5mB/rtDNwPgrrKUOtCLVQypkyDa2gMfOefXK6rcZAxKLO9Fy3GkW8VkPnENv9hBkNOFfGLf6rNKGUg==} cpu: [arm64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.24.4': - resolution: {integrity: sha512-38yiWLemQf7aLHDgTg85fh3hW9stJ0Muk7+s6tIkSUOMmi4Xbv5pH/5Bofnsb6spIwD5FJiR+jg71f0CH5OzoA==} - cpu: [arm64] - os: [linux] - libc: [musl] - '@rollup/rollup-linux-arm64-musl@4.52.2': resolution: {integrity: sha512-s+OPucLNdJHvuZHuIz2WwncJ+SfWHFEmlC5nKMUgAelUeBUnlB4wt7rXWiyG4Zn07uY2Dd+SGyVa9oyLkVGOjA==} cpu: [arm64] @@ -3027,24 +2974,12 @@ packages: os: [linux] libc: [glibc] - '@rollup/rollup-linux-powerpc64le-gnu@4.24.4': - resolution: {integrity: sha512-q73XUPnkwt9ZNF2xRS4fvneSuaHw2BXuV5rI4cw0fWYVIWIBeDZX7c7FWhFQPNTnE24172K30I+dViWRVD9TwA==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-ppc64-gnu@4.52.2': resolution: {integrity: sha512-6yqEfgJ1anIeuP2P/zhtfBlDpXUb80t8DpbYwXQ3bQd95JMvUaqiX+fKqYqUwZXqdJDd8xdilNtsHM2N0cFm6A==} cpu: [ppc64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-riscv64-gnu@4.24.4': - resolution: {integrity: sha512-Aie/TbmQi6UXokJqDZdmTJuZBCU3QBDA8oTKRGtd4ABi/nHgXICulfg1KI6n9/koDsiDbvHAiQO3YAUNa/7BCw==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-riscv64-gnu@4.52.2': resolution: {integrity: sha512-sshYUiYVSEI2B6dp4jMncwxbrUqRdNApF2c3bhtLAU0qA8Lrri0p0NauOsTWh3yCCCDyBOjESHMExonp7Nzc0w==} cpu: [riscv64] @@ -3057,36 +2992,18 @@ packages: os: [linux] libc: [musl] - '@rollup/rollup-linux-s390x-gnu@4.24.4': - resolution: {integrity: sha512-P8MPErVO/y8ohWSP9JY7lLQ8+YMHfTI4bAdtCi3pC2hTeqFJco2jYspzOzTUB8hwUWIIu1xwOrJE11nP+0JFAQ==} - cpu: [s390x] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-s390x-gnu@4.52.2': resolution: {integrity: sha512-tzhYJJidDUVGMgVyE+PmxENPHlvvqm1KILjjZhB8/xHYqAGeizh3GBGf9u6WdJpZrz1aCpIIHG0LgJgH9rVjHQ==} cpu: [s390x] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.24.4': - resolution: {integrity: sha512-K03TljaaoPK5FOyNMZAAEmhlyO49LaE4qCsr0lYHUKyb6QacTNF9pnfPpXnFlFD3TXuFbFbz7tJ51FujUXkXYA==} - cpu: [x64] - os: [linux] - libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.52.2': resolution: {integrity: sha512-opH8GSUuVcCSSyHHcl5hELrmnk4waZoVpgn/4FDao9iyE4WpQhyWJ5ryl5M3ocp4qkRuHfyXnGqg8M9oKCEKRA==} cpu: [x64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.24.4': - resolution: {integrity: sha512-VJYl4xSl/wqG2D5xTYncVWW+26ICV4wubwN9Gs5NrqhJtayikwCXzPL8GDsLnaLU3WwhQ8W02IinYSFJfyo34Q==} - cpu: [x64] - os: [linux] - libc: [musl] - '@rollup/rollup-linux-x64-musl@4.52.2': resolution: {integrity: sha512-LSeBHnGli1pPKVJ79ZVJgeZWWZXkEe/5o8kcn23M8eMKCUANejchJbF/JqzM4RRjOJfNRhKJk8FuqL1GKjF5oQ==} cpu: [x64] @@ -3098,21 +3015,11 @@ packages: cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.24.4': - resolution: {integrity: sha512-ku2GvtPwQfCqoPFIJCqZ8o7bJcj+Y54cZSr43hHca6jLwAiCbZdBUOrqE6y29QFajNAzzpIOwsckaTFmN6/8TA==} - cpu: [arm64] - os: [win32] - '@rollup/rollup-win32-arm64-msvc@4.52.2': resolution: {integrity: sha512-Z9MUCrSgIaUeeHAiNkm3cQyst2UhzjPraR3gYYfOjAuZI7tcFRTOD+4cHLPoS/3qinchth+V56vtqz1Tv+6KPA==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.24.4': - resolution: {integrity: sha512-V3nCe+eTt/W6UYNr/wGvO1fLpHUrnlirlypZfKCT1fG6hWfqhPgQV/K/mRBXBpxc0eKLIF18pIOFVPh0mqHjlg==} - cpu: [ia32] - os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.52.2': resolution: {integrity: sha512-+GnYBmpjldD3XQd+HMejo+0gJGwYIOfFeoBQv32xF/RUIvccUz20/V6Otdv+57NE70D5pa8W/jVGDoGq0oON4A==} cpu: [ia32] @@ -3123,11 +3030,6 @@ packages: cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.24.4': - resolution: {integrity: sha512-LTw1Dfd0mBIEqUVCxbvTE/LLo+9ZxVC9k99v1v4ahg9Aak6FpqOfNu5kRkeTAn0wphoC4JU7No1/rL+bBCEwhg==} - cpu: [x64] - os: [win32] - '@rollup/rollup-win32-x64-msvc@4.52.2': resolution: {integrity: sha512-ARz+Bs8kY6FtitYM96PqPEVvPXqEZmPZsSkXvyX19YzDqkCaIlhCieLLMI5hxO9SRZ2XtCtm8wxhy0iJ2jxNfw==} cpu: [x64] @@ -3599,7 +3501,7 @@ packages: '@vitest/browser@3.2.4': resolution: {integrity: sha512-tJxiPrWmzH8a+w9nLKlQMzAKX/7VjFs50MWgcAj7p9XQ7AQ9/35fByFYptgPELyLw+0aixTnC4pUWV+APcZ/kw==} peerDependencies: - playwright: '*' + playwright: 1.55.1 safaridriver: '*' vitest: 3.2.4 webdriverio: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -7021,13 +6923,13 @@ packages: pkg-types@2.3.0: resolution: {integrity: sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==} - playwright-core@1.54.1: - resolution: {integrity: sha512-Nbjs2zjj0htNhzgiy5wu+3w09YetDx5pkrpI/kZotDlDUaYk0HVA5xrBVPdow4SAUIlhgKcJeJg4GRKW6xHusA==} + playwright-core@1.55.1: + resolution: {integrity: sha512-Z6Mh9mkwX+zxSlHqdr5AOcJnfp+xUWLCt9uKV18fhzA8eyxUd8NUWzAjxUh55RZKSYwDGX0cfaySdhZJGMoJ+w==} engines: {node: '>=18'} hasBin: true - playwright@1.54.1: - resolution: {integrity: sha512-peWpSwIBmSLi6aW2auvrUtf2DqY16YYcCMO8rTVx486jKmDTJg7UAhyrraP98GB8BoPURZP8+nxO7TSd4cPr5g==} + playwright@1.55.1: + resolution: {integrity: sha512-cJW4Xd/G3v5ovXtJJ52MAOclqeac9S/aGGgRzLabuF8TnIb6xHvMzKIa6JmrRzUkeXJgfL1MhukP0NK6l39h3A==} engines: {node: '>=18'} hasBin: true @@ -7511,11 +7413,6 @@ packages: rollup: optional: true - rollup@4.24.4: - resolution: {integrity: sha512-vGorVWIsWfX3xbcyAS+I047kFKapHYivmkaT63Smj77XwvLSJos6M1xGqZnBPFQFBRZDOcG1QnYEIxAvTr/HjA==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} - hasBin: true - rollup@4.52.2: resolution: {integrity: sha512-I25/2QgoROE1vYV+NQ1En9T9UFB9Cmfm2CJ83zZOlaDpvz29wGQSZXWKw7MiNXau7wYgB/T9fVIdIuEQ+KbiiA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -8544,8 +8441,8 @@ packages: vite: ^6.0.0 || ^7.0.0 vue: ^3.5.0 - vite@5.4.20: - resolution: {integrity: sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==} + vite@5.4.21: + resolution: {integrity: sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -11543,123 +11440,69 @@ snapshots: optionalDependencies: rollup: 4.52.2 - '@rollup/rollup-android-arm-eabi@4.24.4': - optional: true - '@rollup/rollup-android-arm-eabi@4.52.2': optional: true - '@rollup/rollup-android-arm64@4.24.4': - optional: true - '@rollup/rollup-android-arm64@4.52.2': optional: true - '@rollup/rollup-darwin-arm64@4.24.4': - optional: true - '@rollup/rollup-darwin-arm64@4.52.2': optional: true - '@rollup/rollup-darwin-x64@4.24.4': - optional: true - '@rollup/rollup-darwin-x64@4.52.2': optional: true - '@rollup/rollup-freebsd-arm64@4.24.4': - optional: true - '@rollup/rollup-freebsd-arm64@4.52.2': optional: true - '@rollup/rollup-freebsd-x64@4.24.4': - optional: true - '@rollup/rollup-freebsd-x64@4.52.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.24.4': - optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.52.2': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.24.4': - optional: true - '@rollup/rollup-linux-arm-musleabihf@4.52.2': optional: true - '@rollup/rollup-linux-arm64-gnu@4.24.4': - optional: true - '@rollup/rollup-linux-arm64-gnu@4.52.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.24.4': - optional: true - '@rollup/rollup-linux-arm64-musl@4.52.2': optional: true '@rollup/rollup-linux-loong64-gnu@4.52.2': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.24.4': - optional: true - '@rollup/rollup-linux-ppc64-gnu@4.52.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.24.4': - optional: true - '@rollup/rollup-linux-riscv64-gnu@4.52.2': optional: true '@rollup/rollup-linux-riscv64-musl@4.52.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.24.4': - optional: true - '@rollup/rollup-linux-s390x-gnu@4.52.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.24.4': - optional: true - '@rollup/rollup-linux-x64-gnu@4.52.2': optional: true - '@rollup/rollup-linux-x64-musl@4.24.4': - optional: true - '@rollup/rollup-linux-x64-musl@4.52.2': optional: true '@rollup/rollup-openharmony-arm64@4.52.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.24.4': - optional: true - '@rollup/rollup-win32-arm64-msvc@4.52.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.24.4': - optional: true - '@rollup/rollup-win32-ia32-msvc@4.52.2': optional: true '@rollup/rollup-win32-x64-gnu@4.52.2': optional: true - '@rollup/rollup-win32-x64-msvc@4.24.4': - optional: true - '@rollup/rollup-win32-x64-msvc@4.52.2': optional: true @@ -12281,7 +12124,7 @@ snapshots: - rollup - supports-color - '@vitejs/plugin-react@4.7.0(vite@5.4.20(@types/node@24.6.2)(terser@5.31.0))': + '@vitejs/plugin-react@4.7.0(vite@5.4.21(@types/node@24.6.2)(terser@5.31.0))': dependencies: '@babel/core': 7.28.4 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.4) @@ -12289,7 +12132,7 @@ snapshots: '@rolldown/pluginutils': 1.0.0-beta.27 '@types/babel__core': 7.20.5 react-refresh: 0.17.0 - vite: 5.4.20(@types/node@24.6.2)(terser@5.31.0) + vite: 5.4.21(@types/node@24.6.2)(terser@5.31.0) transitivePeerDependencies: - supports-color @@ -12317,14 +12160,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@5.0.4(vite@5.4.20(@types/node@24.6.2)(terser@5.31.0))(vue@3.4.27(typescript@5.9.2))': + '@vitejs/plugin-vue@5.0.4(vite@5.4.21(@types/node@24.6.2)(terser@5.31.0))(vue@3.4.27(typescript@5.9.2))': dependencies: - vite: 5.4.20(@types/node@24.6.2)(terser@5.31.0) + vite: 5.4.21(@types/node@24.6.2)(terser@5.31.0) vue: 3.4.27(typescript@5.9.2) - '@vitejs/plugin-vue@5.1.4(vite@5.4.20(@types/node@24.6.2)(terser@5.31.0))(vue@3.5.22(typescript@5.9.2))': + '@vitejs/plugin-vue@5.1.4(vite@5.4.21(@types/node@24.6.2)(terser@5.31.0))(vue@3.5.22(typescript@5.9.2))': dependencies: - vite: 5.4.20(@types/node@24.6.2)(terser@5.31.0) + vite: 5.4.21(@types/node@24.6.2)(terser@5.31.0) vue: 3.5.22(typescript@5.9.2) '@vitejs/plugin-vue@6.0.1(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vue@3.5.22(typescript@5.9.2))': @@ -12333,7 +12176,7 @@ snapshots: vite: 7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1) vue: 3.5.22(typescript@5.9.2) - '@vitest/browser@3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4)': + '@vitest/browser@3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.55.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4)': dependencies: '@testing-library/dom': 10.4.0 '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.0) @@ -12345,7 +12188,7 @@ snapshots: vitest: 3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@20.0.0)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0) ws: 8.18.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: - playwright: 1.54.1 + playwright: 1.55.1 transitivePeerDependencies: - bufferutil - msw @@ -12369,7 +12212,7 @@ snapshots: tinyrainbow: 2.0.0 vitest: 3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@20.0.0)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0) optionalDependencies: - '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4) + '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.55.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4) transitivePeerDependencies: - supports-color @@ -12381,14 +12224,14 @@ snapshots: chai: 5.2.1 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.4(msw@2.4.9(typescript@5.9.2))(vite@5.4.20(@types/node@24.6.2)(terser@5.31.0))': + '@vitest/mocker@3.2.4(msw@2.4.9(typescript@5.9.2))(vite@5.4.21(@types/node@24.6.2)(terser@5.31.0))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: msw: 2.4.9(typescript@5.9.2) - vite: 5.4.20(@types/node@24.6.2)(terser@5.31.0) + vite: 5.4.21(@types/node@24.6.2)(terser@5.31.0) '@vitest/mocker@3.2.4(msw@2.4.9(typescript@5.9.2))(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))': dependencies: @@ -16766,11 +16609,11 @@ snapshots: exsolve: 1.0.7 pathe: 2.0.3 - playwright-core@1.54.1: {} + playwright-core@1.55.1: {} - playwright@1.54.1: + playwright@1.55.1: dependencies: - playwright-core: 1.54.1 + playwright-core: 1.55.1 optionalDependencies: fsevents: 2.3.2 @@ -17243,30 +17086,6 @@ snapshots: optionalDependencies: rollup: 4.52.2 - rollup@4.24.4: - dependencies: - '@types/estree': 1.0.6 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.24.4 - '@rollup/rollup-android-arm64': 4.24.4 - '@rollup/rollup-darwin-arm64': 4.24.4 - '@rollup/rollup-darwin-x64': 4.24.4 - '@rollup/rollup-freebsd-arm64': 4.24.4 - '@rollup/rollup-freebsd-x64': 4.24.4 - '@rollup/rollup-linux-arm-gnueabihf': 4.24.4 - '@rollup/rollup-linux-arm-musleabihf': 4.24.4 - '@rollup/rollup-linux-arm64-gnu': 4.24.4 - '@rollup/rollup-linux-arm64-musl': 4.24.4 - '@rollup/rollup-linux-powerpc64le-gnu': 4.24.4 - '@rollup/rollup-linux-riscv64-gnu': 4.24.4 - '@rollup/rollup-linux-s390x-gnu': 4.24.4 - '@rollup/rollup-linux-x64-gnu': 4.24.4 - '@rollup/rollup-linux-x64-musl': 4.24.4 - '@rollup/rollup-win32-arm64-msvc': 4.24.4 - '@rollup/rollup-win32-ia32-msvc': 4.24.4 - '@rollup/rollup-win32-x64-msvc': 4.24.4 - fsevents: 2.3.3 - rollup@4.52.2: dependencies: '@types/estree': 1.0.8 @@ -18356,7 +18175,7 @@ snapshots: debug: 4.4.1 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 5.4.20(@types/node@24.6.2)(terser@5.31.0) + vite: 5.4.21(@types/node@24.6.2)(terser@5.31.0) transitivePeerDependencies: - '@types/node' - less @@ -18411,11 +18230,11 @@ snapshots: vite: 7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1) vue: 3.5.22(typescript@5.9.2) - vite@5.4.20(@types/node@24.6.2)(terser@5.31.0): + vite@5.4.21(@types/node@24.6.2)(terser@5.31.0): dependencies: esbuild: 0.25.0 - postcss: 8.4.47 - rollup: 4.24.4 + postcss: 8.5.6 + rollup: 4.52.2 optionalDependencies: '@types/node': 24.6.2 fsevents: 2.3.3 @@ -18463,7 +18282,7 @@ snapshots: '@shikijs/transformers': 1.22.2 '@shikijs/types': 1.22.2 '@types/markdown-it': 14.1.2 - '@vitejs/plugin-vue': 5.1.4(vite@5.4.20(@types/node@24.6.2)(terser@5.31.0))(vue@3.5.22(typescript@5.9.2)) + '@vitejs/plugin-vue': 5.1.4(vite@5.4.21(@types/node@24.6.2)(terser@5.31.0))(vue@3.5.22(typescript@5.9.2)) '@vue/devtools-api': 7.6.2 '@vue/shared': 3.5.12 '@vueuse/core': 11.2.0(vue@3.5.22(typescript@5.9.2)) @@ -18472,7 +18291,7 @@ snapshots: mark.js: 8.11.1 minisearch: 7.1.0 shiki: 1.22.2 - vite: 5.4.20(@types/node@24.6.2)(terser@5.31.0) + vite: 5.4.21(@types/node@24.6.2)(terser@5.31.0) vue: 3.5.22(typescript@5.9.2) optionalDependencies: postcss: 8.5.6 @@ -18506,7 +18325,7 @@ snapshots: vitest-browser-react@2.0.0-beta.1(@types/react-dom@18.3.0)(@types/react@18.3.1)(@vitest/browser@3.2.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vitest@3.2.4): dependencies: - '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4) + '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.55.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) vitest: 3.2.4(@types/node@24.6.2)(@vitest/browser@3.2.4)(happy-dom@20.0.0)(msw@2.4.9(typescript@5.9.2))(terser@5.31.0) @@ -18518,7 +18337,7 @@ snapshots: dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(msw@2.4.9(typescript@5.9.2))(vite@5.4.20(@types/node@24.6.2)(terser@5.31.0)) + '@vitest/mocker': 3.2.4(msw@2.4.9(typescript@5.9.2))(vite@5.4.21(@types/node@24.6.2)(terser@5.31.0)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -18536,12 +18355,12 @@ snapshots: tinyglobby: 0.2.14 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 5.4.20(@types/node@24.6.2)(terser@5.31.0) + vite: 5.4.21(@types/node@24.6.2)(terser@5.31.0) vite-node: 3.2.4(@types/node@24.6.2)(terser@5.31.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 24.6.2 - '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.54.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4) + '@vitest/browser': 3.2.4(bufferutil@4.0.8)(msw@2.4.9(typescript@5.9.2))(playwright@1.55.1)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(vitest@3.2.4) happy-dom: 20.0.0 transitivePeerDependencies: - less diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 1f760778f7..5bb068feae 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,6 +3,8 @@ auditConfig: - GHSA-g3ch-rx76-35fx - GHSA-vjh7-7g9h-fjfh - GHSA-ffrw-9mx8-89p8 + - GHSA-qpm2-6cq5-7pq5 + - GHSA-93m4-6634-74q7 catalog: "@vitejs/plugin-react": "^4.3.3" "@tanstack/query-core": "5.49.1" From 87e7806fc55ea71004d4674a88110ef125036c75 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Tue, 21 Oct 2025 14:54:24 -0400 Subject: [PATCH 136/213] ci: bump playwright --- .github/workflows/verify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 7e38250a73..8615ea86fe 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -131,7 +131,7 @@ jobs: version: nightly - name: Install Playwright - run: pnpx playwright@1.54.1 install --with-deps + run: pnpx playwright@1.55.1 install --with-deps - name: Run tests uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 From e7a620c27e406720388fd5b12ba3376e03d2deee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 21 Oct 2025 15:05:35 -0400 Subject: [PATCH 137/213] chore: version packages (#4838) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/spicy-lions-bake.md | 5 ----- packages/connectors/CHANGELOG.md | 6 ++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/react/CHANGELOG.md | 7 +++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 7 +++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 10 files changed, 26 insertions(+), 11 deletions(-) delete mode 100644 .changeset/spicy-lions-bake.md diff --git a/.changeset/spicy-lions-bake.md b/.changeset/spicy-lions-bake.md deleted file mode 100644 index 05eb8883cb..0000000000 --- a/.changeset/spicy-lions-bake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/connectors": minor ---- - -Added `getPortoInstance` method to `porto`. diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 1de9b73c72..eb696c4fd9 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/connectors +## 6.1.0 + +### Minor Changes + +- Added `getPortoInstance` method to `porto`. ([#4837](https://github.com/wevm/wagmi/pull/4837)) + ## 6.0.1 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 38350827fb..f3b2fab531 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "6.0.1", + "version": "6.1.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index 105e1c1236..e59bca9bc0 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '6.0.1' +export const version = '6.1.0' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index f526478df9..cb9b7ddb0e 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,12 @@ # wagmi +## 2.18.2 + +### Patch Changes + +- Updated dependencies [[`ae31a8d`](https://github.com/wevm/wagmi/commit/ae31a8d3d0b436841d6546ab2565dee624204aca)]: + - @wagmi/connectors@6.1.0 + ## 2.18.1 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 8c8078cab7..3fbafa1736 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.18.1", + "version": "2.18.2", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index 2fdda5d63c..3370b69d43 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.18.1' +export const version = '2.18.2' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index 148bbdff74..030966d264 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/vue +## 0.2.14 + +### Patch Changes + +- Updated dependencies [[`ae31a8d`](https://github.com/wevm/wagmi/commit/ae31a8d3d0b436841d6546ab2565dee624204aca)]: + - @wagmi/connectors@6.1.0 + ## 0.2.13 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index 5ecd8966e4..200bf3b045 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.2.13", + "version": "0.2.14", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index 9ce772dd35..71619264f9 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.2.13' +export const version = '0.2.14' From ed2d473172e8d063f29400b8edcec33e5d21a659 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Thu, 23 Oct 2025 15:20:40 -0400 Subject: [PATCH 138/213] chore(cli): bump chains --- .changeset/clear-books-unite.md | 5 +++++ packages/cli/src/plugins/routescan.ts | 8 ++------ packages/cli/src/plugins/sourcify.ts | 9 +++++++-- 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 .changeset/clear-books-unite.md diff --git a/.changeset/clear-books-unite.md b/.changeset/clear-books-unite.md new file mode 100644 index 0000000000..6c565f98d3 --- /dev/null +++ b/.changeset/clear-books-unite.md @@ -0,0 +1,5 @@ +--- +"@wagmi/cli": patch +--- + +Bumped chains for block explorer plugins. diff --git a/packages/cli/src/plugins/routescan.ts b/packages/cli/src/plugins/routescan.ts index ab41dc4776..0d2419c61d 100644 --- a/packages/cli/src/plugins/routescan.ts +++ b/packages/cli/src/plugins/routescan.ts @@ -199,7 +199,7 @@ type ChainId = | 114 // Coston2 | 130 // Unichain | 151 // Redbelly - | 166 // Omni + | 166 // Nomina | 185 // Mint | 252 // Fraxtal | 254 // Swan chain @@ -244,7 +244,7 @@ type ChainId = | 21000001 // Corn | 168587773 // Blast Sepolia | 999999999 // Zora Sepolia - | 164_4 // Omni Omega + | 164_4 // Nomina | 153_2 // Redbelly | 70805_2 // Cloud | 378 // Koroshi @@ -261,8 +261,6 @@ type ChainId = | 1923 // Swell | 2038 // Shrapnel | 2044 // Shrapnel - | 2365 // Kite AI - | 2368 // Kite AI | 2786 // Apertum | 2818 // Morph | 3011 // PLAYA3ULL Games @@ -282,7 +280,6 @@ type ChainId = | 6533 // Kalichain | 6900 // Nibiru | 6911 // Nibiru Testnet-2 - | 7171 // Bitrock | 7894 // Mintus | 7979 // DOS | 8008 // Polynomial @@ -309,7 +306,6 @@ type ChainId = | 28530 // Blockticity | 33311 // Feature | 34443 // Mode - | 42069 // Coqnet | 42161 // Arbitrum One | 43113 // C-Chain Fuji | 43114 // C-Chain diff --git a/packages/cli/src/plugins/sourcify.ts b/packages/cli/src/plugins/sourcify.ts index 42c0221477..5c0637308a 100644 --- a/packages/cli/src/plugins/sourcify.ts +++ b/packages/cli/src/plugins/sourcify.ts @@ -118,6 +118,7 @@ type ChainId = | 200810 // Bitlayer Testnet | 7171 // Bitrock Mainnet | 7771 // Bitrock Testnet + | 81457 // Blast | 288 // Boba Network | 28 // Boba Network Rinkeby Testnet | 78431 // Bulletin Subnet @@ -127,6 +128,7 @@ type ChainId = | 44787 // Celo Alfajores Testnet | 62320 // Celo Baklava Testnet | 42220 // Celo Mainnet + | 11142220 // Celo Sepolia Testnet | 5115 // Citrea Testnet | 78432 // Conduit Subnet | 1030 // Conflux eSpace @@ -200,6 +202,7 @@ type ChainId = | 1890 // Lightlink Phoenix Mainnet | 59144 // Linea | 59141 // Linea Sepolia + | 1135 // Lisk | 957 // Lyra Chain | 22776 // MAP Protocol | 212 // MAPO Makalu @@ -277,6 +280,7 @@ type ChainId = | 1149 // Symplexia Smart Chain | 57 // Syscoin Mainnet | 5700 // Syscoin Tanenbaum Testnet + | 167000 // Taiko Alethia | 167006 // Taiko Eldfell L3 | 167005 // Taiko Grimsvotn L2 | 5845 // Tangle @@ -292,6 +296,7 @@ type ChainId = | 723107 // TixChain Testnet | 6119 // UPTN | 8 // Ubiq + | 130 // Unichain | 100009 // VeChain | 100010 // VeChain Testnet | 106 // Velas EVM Mainnet @@ -307,10 +312,10 @@ type ChainId = | 383414847825 // Zeniq | 7000 // ZetaChain Mainnet | 7001 // ZetaChain Testnet + | 32769 // Zilliqa 2 | 32770 // Zilliqa 2 EVM proto-mainnet | 33103 // Zilliqa 2 EVM proto-testnet - | 32769 // Zilliqa EVM - | 33101 // Zilliqa EVM Testnet + | 33101 // Zilliqa 2 Testnet | 48898 // Zircuit Garfield Testnet | 48900 // Zircuit Mainnet | 48899 // Zircuit Testnet From f5ecf767ca0b2994d4d68b78671ad1a1cd54f85d Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Thu, 23 Oct 2025 15:25:29 -0400 Subject: [PATCH 139/213] chore: audit --- package.json | 1 + pnpm-lock.yaml | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b66ea05c6a..8b792dcef4 100644 --- a/package.json +++ b/package.json @@ -89,6 +89,7 @@ "cookie@<0.7.0": "0.7.0", "elliptic@<=6.6.0": ">=6.6.1", "esbuild@<=0.24.2": "0.25.0", + "hono@>=1.1.0 <4.10.2": ">=4.10.2", "nanoid@<3.3.8": "3.3.8", "playwright@<1.55.1": "1.55.1", "semver@<5.7.2": ">=5.7.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c65d41671c..7f735f8158 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,7 @@ overrides: cookie@<0.7.0: 0.7.0 elliptic@<=6.6.0: '>=6.6.1' esbuild@<=0.24.2: 0.25.0 + hono@>=1.1.0 <4.10.2: '>=4.10.2' nanoid@<3.3.8: 3.3.8 playwright@<1.55.1: 1.55.1 semver@<5.7.2: '>=5.7.2' @@ -5483,8 +5484,8 @@ packages: hmac-drbg@1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} - hono@4.9.8: - resolution: {integrity: sha512-JW8Bb4RFWD9iOKxg5PbUarBYGM99IcxFl2FPBo2gSJO11jjUDqlP1Bmfyqt8Z/dGhIQ63PMA9LdcLefXyIasyg==} + hono@4.10.2: + resolution: {integrity: sha512-p6fyzl+mQo6uhESLxbF5WlBOAJMDh36PljwlKtP5V1v09NxlqGru3ShK+4wKhSuhuYf8qxMmrivHOa/M7q0sMg==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -14826,7 +14827,7 @@ snapshots: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - hono@4.9.8: {} + hono@4.10.2: {} hookable@5.5.3: {} @@ -16624,7 +16625,7 @@ snapshots: porto@0.2.19(@types/react@18.3.1)(@wagmi/core@packages+core)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(wagmi@packages+react): dependencies: '@wagmi/core': link:packages/core - hono: 4.9.8 + hono: 4.10.2 idb-keyval: 6.2.1 mipd: 0.0.7(typescript@5.9.2) ox: 0.9.6(typescript@5.9.2)(zod@4.1.11) From ff865b9f3ba715dad126447f132f10bbe482df9f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 23 Oct 2025 15:38:13 -0400 Subject: [PATCH 140/213] chore: version packages (#4841) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/clear-books-unite.md | 5 ----- packages/cli/CHANGELOG.md | 6 ++++++ packages/cli/package.json | 2 +- packages/cli/src/version.ts | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 .changeset/clear-books-unite.md diff --git a/.changeset/clear-books-unite.md b/.changeset/clear-books-unite.md deleted file mode 100644 index 6c565f98d3..0000000000 --- a/.changeset/clear-books-unite.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/cli": patch ---- - -Bumped chains for block explorer plugins. diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index bef526f770..9a49443e29 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/cli +## 2.7.1 + +### Patch Changes + +- Bumped chains for block explorer plugins. ([`ed2d473`](https://github.com/wevm/wagmi/commit/ed2d473172e8d063f29400b8edcec33e5d21a659)) + ## 2.7.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 1d74e30686..fa12eea4f9 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/cli", "description": "Manage and generate code from Ethereum ABIs", - "version": "2.7.0", + "version": "2.7.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/cli/src/version.ts b/packages/cli/src/version.ts index e32207cee5..dc6e1de765 100644 --- a/packages/cli/src/version.ts +++ b/packages/cli/src/version.ts @@ -1 +1 @@ -export const version = '2.7.0' +export const version = '2.7.1' From 3e634b7bcf0bd0e67e59fcb74ad89dfb56e4eae9 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Mon, 27 Oct 2025 10:45:37 -0400 Subject: [PATCH 141/213] feat(react,vue): export internal types --- .changeset/witty-lions-rest.md | 6 ++++++ packages/react/package.json | 8 ++++++++ packages/react/src/exports/internal.ts | 8 ++++++++ packages/vue/package.json | 8 ++++++++ packages/vue/src/exports/internal.ts | 8 ++++++++ 5 files changed, 38 insertions(+) create mode 100644 .changeset/witty-lions-rest.md create mode 100644 packages/react/src/exports/internal.ts create mode 100644 packages/vue/src/exports/internal.ts diff --git a/.changeset/witty-lions-rest.md b/.changeset/witty-lions-rest.md new file mode 100644 index 0000000000..e712601f44 --- /dev/null +++ b/.changeset/witty-lions-rest.md @@ -0,0 +1,6 @@ +--- +"wagmi": minor +"@wagmi/vue": minor +--- + +Exported internal types diff --git a/packages/react/package.json b/packages/react/package.json index 3fbafa1736..99b9be12bc 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -26,6 +26,7 @@ "/codegen", "/connectors", "/experimental", + "/internal", "/query" ], "sideEffects": false, @@ -62,6 +63,10 @@ "types": "./dist/types/exports/experimental.d.ts", "default": "./dist/esm/exports/experimental.js" }, + "./internal": { + "types": "./dist/types/exports/internal.d.ts", + "default": "./dist/esm/exports/internal.js" + }, "./query": { "types": "./dist/types/exports/query.d.ts", "default": "./dist/esm/exports/query.js" @@ -85,6 +90,9 @@ "experimental": [ "./dist/types/exports/experimental.d.ts" ], + "internal": [ + "./dist/types/exports/internal.d.ts" + ], "query": [ "./dist/types/exports/query.d.ts" ] diff --git a/packages/react/src/exports/internal.ts b/packages/react/src/exports/internal.ts new file mode 100644 index 0000000000..2ee5c2e0b3 --- /dev/null +++ b/packages/react/src/exports/internal.ts @@ -0,0 +1,8 @@ +//////////////////////////////////////////////////////////////////////////////// +// Types +//////////////////////////////////////////////////////////////////////////////// + +export type { + ConfigParameter, + QueryParameter, +} from '../types/properties.js' diff --git a/packages/vue/package.json b/packages/vue/package.json index 200bf3b045..246683e0a8 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -24,6 +24,7 @@ "/actions", "/chains", "/connectors", + "/internal", "/nuxt", "/query" ], @@ -53,6 +54,10 @@ "types": "./dist/types/exports/connectors.d.ts", "default": "./dist/esm/exports/connectors.js" }, + "./internal": { + "types": "./dist/types/exports/internal.d.ts", + "default": "./dist/esm/exports/internal.js" + }, "./nuxt": { "types": "./dist/types/exports/nuxt.d.ts", "default": "./dist/esm/exports/nuxt.js" @@ -74,6 +79,9 @@ "connectors": [ "./dist/types/exports/connectors.d.ts" ], + "internal": [ + "./dist/types/exports/internal.d.ts" + ], "nuxt": [ "./dist/types/exports/nuxt.d.ts" ], diff --git a/packages/vue/src/exports/internal.ts b/packages/vue/src/exports/internal.ts new file mode 100644 index 0000000000..2ee5c2e0b3 --- /dev/null +++ b/packages/vue/src/exports/internal.ts @@ -0,0 +1,8 @@ +//////////////////////////////////////////////////////////////////////////////// +// Types +//////////////////////////////////////////////////////////////////////////////// + +export type { + ConfigParameter, + QueryParameter, +} from '../types/properties.js' From 990dd2339e96b302931056e0fb898bd2dd42a04d Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Mon, 27 Oct 2025 15:34:50 -0400 Subject: [PATCH 142/213] chore: bump porto version --- .changeset/strong-paws-taste.md | 5 +++++ packages/connectors/package.json | 2 +- pnpm-lock.yaml | 30 +++++++++++++++++++++--------- 3 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 .changeset/strong-paws-taste.md diff --git a/.changeset/strong-paws-taste.md b/.changeset/strong-paws-taste.md new file mode 100644 index 0000000000..e301389d7d --- /dev/null +++ b/.changeset/strong-paws-taste.md @@ -0,0 +1,5 @@ +--- +"@wagmi/connectors": patch +--- + +Bumped Porto version diff --git a/packages/connectors/package.json b/packages/connectors/package.json index f3b2fab531..d4e484d922 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -53,7 +53,7 @@ "@safe-global/safe-apps-sdk": "9.1.0", "@walletconnect/ethereum-provider": "2.21.1", "cbw-sdk": "npm:@coinbase/wallet-sdk@3.9.3", - "porto": "0.2.19" + "porto": "0.2.34" }, "devDependencies": { "@wagmi/core": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7f735f8158..2cc937348d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,8 +228,8 @@ importers: specifier: npm:@coinbase/wallet-sdk@3.9.3 version: '@coinbase/wallet-sdk@3.9.3' porto: - specifier: 0.2.19 - version: 0.2.19(@types/react@18.3.1)(@wagmi/core@packages+core)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(wagmi@packages+react) + specifier: 0.2.34 + version: 0.2.34(@types/react@18.3.1)(@wagmi/core@packages+core)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(wagmi@packages+react) devDependencies: '@wagmi/core': specifier: workspace:* @@ -5484,8 +5484,8 @@ packages: hmac-drbg@1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} - hono@4.10.2: - resolution: {integrity: sha512-p6fyzl+mQo6uhESLxbF5WlBOAJMDh36PljwlKtP5V1v09NxlqGru3ShK+4wKhSuhuYf8qxMmrivHOa/M7q0sMg==} + hono@4.10.3: + resolution: {integrity: sha512-2LOYWUbnhdxdL8MNbNg9XZig6k+cZXm5IjHn2Aviv7honhBMOHb+jxrKIeJRZJRmn+htUCKhaicxwXuUDlchRA==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6942,21 +6942,33 @@ packages: resolution: {integrity: sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg==} engines: {node: '>=12.0.0'} - porto@0.2.19: - resolution: {integrity: sha512-q1vEJgdtlEOf6byWgD31GHiMwpfLuxFSfx9f7Sw4RGdvpQs2ANBGfnzzardADZegr87ZXsebSp+3vaaznEUzPQ==} + porto@0.2.34: + resolution: {integrity: sha512-o+hK9r6a4j3EAFOkgNXtcwYc4vAMsmbVhRJHrBXXV/tGVLb2V2sVGLcCFFH3CLevRAyyUUKoT0KIaoQaro4saA==} hasBin: true peerDependencies: '@tanstack/react-query': '>=5.59.0' '@wagmi/core': '>=2.16.3' + expo-auth-session: '>=7.0.8' + expo-crypto: '>=15.0.7' + expo-web-browser: '>=15.0.8' react: '>=18' + react-native: '>=0.81.4' typescript: '>=5.4.0' viem: '>=2.37.0' wagmi: '>=2.0.0' peerDependenciesMeta: '@tanstack/react-query': optional: true + expo-auth-session: + optional: true + expo-crypto: + optional: true + expo-web-browser: + optional: true react: optional: true + react-native: + optional: true typescript: optional: true wagmi: @@ -14827,7 +14839,7 @@ snapshots: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - hono@4.10.2: {} + hono@4.10.3: {} hookable@5.5.3: {} @@ -16622,10 +16634,10 @@ snapshots: pony-cause@2.1.11: {} - porto@0.2.19(@types/react@18.3.1)(@wagmi/core@packages+core)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(wagmi@packages+react): + porto@0.2.34(@types/react@18.3.1)(@wagmi/core@packages+core)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(wagmi@packages+react): dependencies: '@wagmi/core': link:packages/core - hono: 4.10.2 + hono: 4.10.3 idb-keyval: 6.2.1 mipd: 0.0.7(typescript@5.9.2) ox: 0.9.6(typescript@5.9.2)(zod@4.1.11) From 2b486522aaeba0622d7f2e9fee4b21d5887573ab Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Mon, 27 Oct 2025 15:59:00 -0400 Subject: [PATCH 143/213] chore: knip --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8b792dcef4..608cd428c2 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ }, "packages/react": { "entry": [ - "src/exports/{actions,chains,codegen,connectors,experimental,index,query}.ts!", + "src/exports/{actions,chains,codegen,connectors,experimental,index,internal,query}.ts!", "src/exports/actions/experimental.ts!" ], "ignore": [ @@ -156,7 +156,7 @@ }, "packages/vue": { "entry": [ - "src/exports/{actions,chains,connectors,index,nuxt,query}.ts!", + "src/exports/{actions,chains,connectors,index,internal,nuxt,query}.ts!", "src/exports/actions/experimental.ts!" ], "ignore": [ From dfe775a676a4f1cb619faf2bae44e8192278afef Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 16:21:07 -0400 Subject: [PATCH 144/213] chore: version packages (#4842) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/strong-paws-taste.md | 5 ----- .changeset/witty-lions-rest.md | 6 ------ packages/connectors/CHANGELOG.md | 6 ++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/react/CHANGELOG.md | 11 +++++++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 11 +++++++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 11 files changed, 34 insertions(+), 17 deletions(-) delete mode 100644 .changeset/strong-paws-taste.md delete mode 100644 .changeset/witty-lions-rest.md diff --git a/.changeset/strong-paws-taste.md b/.changeset/strong-paws-taste.md deleted file mode 100644 index e301389d7d..0000000000 --- a/.changeset/strong-paws-taste.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/connectors": patch ---- - -Bumped Porto version diff --git a/.changeset/witty-lions-rest.md b/.changeset/witty-lions-rest.md deleted file mode 100644 index e712601f44..0000000000 --- a/.changeset/witty-lions-rest.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"wagmi": minor -"@wagmi/vue": minor ---- - -Exported internal types diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index eb696c4fd9..7eca0c37b8 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/connectors +## 6.1.1 + +### Patch Changes + +- Bumped Porto version ([`990dd23`](https://github.com/wevm/wagmi/commit/990dd2339e96b302931056e0fb898bd2dd42a04d)) + ## 6.1.0 ### Minor Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index d4e484d922..ba4755cb52 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "6.1.0", + "version": "6.1.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index e59bca9bc0..2cb30e9bbf 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '6.1.0' +export const version = '6.1.1' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index cb9b7ddb0e..557ccec164 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,16 @@ # wagmi +## 2.19.0 + +### Minor Changes + +- Exported internal types ([`3e634b7`](https://github.com/wevm/wagmi/commit/3e634b7bcf0bd0e67e59fcb74ad89dfb56e4eae9)) + +### Patch Changes + +- Updated dependencies [[`990dd23`](https://github.com/wevm/wagmi/commit/990dd2339e96b302931056e0fb898bd2dd42a04d)]: + - @wagmi/connectors@6.1.1 + ## 2.18.2 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 99b9be12bc..da8a161d5f 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.18.2", + "version": "2.19.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index 3370b69d43..94e57887a5 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.18.2' +export const version = '2.19.0' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index 030966d264..6b7c94981a 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,16 @@ # @wagmi/vue +## 0.3.0 + +### Minor Changes + +- Exported internal types ([`3e634b7`](https://github.com/wevm/wagmi/commit/3e634b7bcf0bd0e67e59fcb74ad89dfb56e4eae9)) + +### Patch Changes + +- Updated dependencies [[`990dd23`](https://github.com/wevm/wagmi/commit/990dd2339e96b302931056e0fb898bd2dd42a04d)]: + - @wagmi/connectors@6.1.1 + ## 0.2.14 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index 246683e0a8..8dd2a08f86 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.2.14", + "version": "0.3.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index 71619264f9..aa9835f547 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.2.14' +export const version = '0.3.0' From faf3eeddb97c300f971083f8ee9b02a29ad23cbb Mon Sep 17 00:00:00 2001 From: tmm Date: Tue, 28 Oct 2025 17:59:31 -0400 Subject: [PATCH 145/213] chore: up connector deps (#4843) * Bump to latest base account * Remove fastestsmallesttextencoderdecoder * chore: up * chore: changeset --------- Co-authored-by: KodiKraig --- .changeset/famous-poets-send.md | 5 + packages/connectors/package.json | 6 +- pnpm-lock.yaml | 1319 +++++++++++++++++++++++++++--- 3 files changed, 1206 insertions(+), 124 deletions(-) create mode 100644 .changeset/famous-poets-send.md diff --git a/.changeset/famous-poets-send.md b/.changeset/famous-poets-send.md new file mode 100644 index 0000000000..6b0b35fb15 --- /dev/null +++ b/.changeset/famous-poets-send.md @@ -0,0 +1,5 @@ +--- +"@wagmi/connectors": patch +--- + +Bumped connector deps diff --git a/packages/connectors/package.json b/packages/connectors/package.json index ba4755cb52..841c3a16e6 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -45,15 +45,15 @@ } }, "dependencies": { - "@base-org/account": "1.1.1", + "@base-org/account": "2.4.0", "@coinbase/wallet-sdk": "4.3.6", - "@gemini-wallet/core": "0.2.0", + "@gemini-wallet/core": "0.3.1", "@metamask/sdk": "0.33.1", "@safe-global/safe-apps-provider": "0.18.6", "@safe-global/safe-apps-sdk": "9.1.0", "@walletconnect/ethereum-provider": "2.21.1", "cbw-sdk": "npm:@coinbase/wallet-sdk@3.9.3", - "porto": "0.2.34" + "porto": "0.2.35" }, "devDependencies": { "@wagmi/core": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2cc937348d..0d26c859c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -204,32 +204,32 @@ importers: packages/connectors: dependencies: '@base-org/account': - specifier: 1.1.1 - version: 1.1.1(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.22.4) + specifier: 2.4.0 + version: 2.4.0(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(zod@3.25.76) '@coinbase/wallet-sdk': specifier: 4.3.6 - version: 4.3.6(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.22.4) + version: 4.3.6(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.25.76) '@gemini-wallet/core': - specifier: 0.2.0 - version: 0.2.0(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)) + specifier: 0.3.1 + version: 0.3.1(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)) '@metamask/sdk': specifier: 0.33.1 version: 0.33.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) '@safe-global/safe-apps-provider': specifier: 0.18.6 - version: 0.18.6(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + version: 0.18.6(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@safe-global/safe-apps-sdk': specifier: 9.1.0 - version: 9.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + version: 9.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@walletconnect/ethereum-provider': specifier: 2.21.1 - version: 2.21.1(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + version: 2.21.1(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) cbw-sdk: specifier: npm:@coinbase/wallet-sdk@3.9.3 version: '@coinbase/wallet-sdk@3.9.3' porto: - specifier: 0.2.34 - version: 0.2.34(@types/react@18.3.1)(@wagmi/core@packages+core)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(wagmi@packages+react) + specifier: 0.2.35 + version: 0.2.35(@types/react@18.3.1)(@wagmi/core@packages+core)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76))(wagmi@packages+react) devDependencies: '@wagmi/core': specifier: workspace:* @@ -415,7 +415,7 @@ importers: version: 18.3.1(react@18.3.1) viem: specifier: 2.* - version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) wagmi: specifier: workspace:* version: link:../../packages/react @@ -461,7 +461,7 @@ importers: version: 3.19.2(@biomejs/biome@2.2.4)(@parcel/watcher@2.4.1)(@types/node@24.6.2)(@vue/compiler-sfc@3.5.22)(bufferutil@4.0.8)(db0@0.3.2)(encoding@0.1.13)(idb-keyval@6.2.1)(ioredis@5.8.0)(magicast@0.3.5)(rollup@4.52.2)(terser@5.31.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(yaml@2.8.1) viem: specifier: 2.* - version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) vue: specifier: '>=3.4.21' version: 3.4.27(typescript@5.9.2) @@ -485,7 +485,7 @@ importers: version: 18.3.1(react@18.3.1) viem: specifier: 2.* - version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) devDependencies: '@types/react': specifier: '>=18.3.1' @@ -525,7 +525,7 @@ importers: version: 18.3.1(react@18.3.1) viem: specifier: 2.* - version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) wagmi: specifier: workspace:* version: link:../../packages/react @@ -562,7 +562,7 @@ importers: version: link:../../packages/vue viem: specifier: 2.* - version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) vue: specifier: '>=3.4.21' version: 3.4.27(typescript@5.9.2) @@ -608,7 +608,7 @@ importers: version: link:../packages/vue abitype: specifier: '*' - version: 1.0.2(typescript@5.9.2)(zod@3.22.4) + version: 1.0.2(typescript@5.9.2)(zod@3.25.76) nuxt: specifier: ^3.19.2 version: 3.19.2(@biomejs/biome@2.2.4)(@parcel/watcher@2.4.1)(@types/node@24.6.2)(@vue/compiler-sfc@3.5.22)(bufferutil@4.0.8)(db0@0.3.2)(encoding@0.1.13)(idb-keyval@6.2.1)(ioredis@5.8.0)(magicast@0.3.5)(rollup@4.52.2)(terser@5.31.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1))(yaml@2.8.1) @@ -620,10 +620,10 @@ importers: version: 0.59.4(rollup@4.52.2)(vite@7.1.7(@types/node@24.6.2)(jiti@2.6.0)(terser@5.31.0)(yaml@2.8.1)) viem: specifier: 2.* - version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + version: 2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) vitepress: specifier: 1.5.0 - version: 1.5.0(@algolia/client-search@5.12.0)(@types/node@24.6.2)(@types/react@18.3.1)(change-case@5.4.4)(fuse.js@7.1.0)(idb-keyval@6.2.1)(postcss@8.5.6)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(terser@5.31.0)(typescript@5.9.2) + version: 1.5.0(@algolia/client-search@5.12.0)(@types/node@24.6.2)(@types/react@18.3.1)(axios@1.12.2)(change-case@5.4.4)(fuse.js@7.1.0)(idb-keyval@6.2.1)(postcss@8.5.6)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(terser@5.31.0)(typescript@5.9.2) vitepress-plugin-llms: specifier: ^1.7.5 version: 1.7.5 @@ -988,8 +988,8 @@ packages: resolution: {integrity: sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==} engines: {node: '>=6.9.0'} - '@base-org/account@1.1.1': - resolution: {integrity: sha512-IfVJPrDPhHfqXRDb89472hXkpvJuQQR7FDI9isLPHEqSYt/45whIoBxSPgZ0ssTt379VhQo4+87PWI1DoLSfAQ==} + '@base-org/account@2.4.0': + resolution: {integrity: sha512-A4Umpi8B9/pqR78D1Yoze4xHyQaujioVRqqO3d6xuDFw9VRtjg6tK3bPlwE0aW+nVH/ntllCpPa2PbI8Rnjcug==} '@bcoe/v8-coverage@1.0.2': resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} @@ -1140,6 +1140,9 @@ packages: resolution: {integrity: sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==} engines: {node: '>=18.0.0'} + '@coinbase/cdp-sdk@1.38.4': + resolution: {integrity: sha512-xVvfluaGt0NxNmjElP3C1yI6KnsGwihabdXj+qNtjjsSmd/Ha2V3gAiCyNrrYOqIORn4mpC2jgu2fUFEDaMpaw==} + '@coinbase/wallet-sdk@3.9.3': resolution: {integrity: sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw==} @@ -1731,8 +1734,8 @@ packages: '@floating-ui/utils@0.2.2': resolution: {integrity: sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==} - '@gemini-wallet/core@0.2.0': - resolution: {integrity: sha512-vv9aozWnKrrPWQ3vIFcWk7yta4hQW1Ie0fsNNPeXnjAxkbXr2hqMagEptLuMxpEP2W3mnRu05VDNKzcvAuuZDw==} + '@gemini-wallet/core@0.3.1': + resolution: {integrity: sha512-XP+/NRAaRV7Adlt6aFxrF/3a0i3qpxFTSVm/dzG+mceXTSgIGOUUT65w69ttLQ/GWEcAEQL/hKoV6PFAJA/DmQ==} peerDependencies: viem: '>=2.0.0' @@ -3166,6 +3169,267 @@ packages: '@socket.io/component-emitter@3.1.2': resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} + '@solana-program/system@0.8.1': + resolution: {integrity: sha512-71U9Mzdpw8HQtfgfJSL5xKZbLMRnza2Llsfk7gGnmg2waqK+o8MMH4YNma8xXS1UmOBptXIiNvoZ3p7cmOVktg==} + peerDependencies: + '@solana/kit': ^3.0 + + '@solana-program/token@0.6.0': + resolution: {integrity: sha512-omkZh4Tt9rre4wzWHNOhOEHyenXQku3xyc/UrKvShexA/Qlhza67q7uRwmwEDUs4QqoDBidSZPooOmepnA/jig==} + peerDependencies: + '@solana/kit': ^3.0 + + '@solana/accounts@3.0.3': + resolution: {integrity: sha512-KqlePrlZaHXfu8YQTCxN204ZuVm9o68CCcUr6l27MG2cuRUtEM1Ta0iR8JFkRUAEfZJC4Cu0ZDjK/v49loXjZQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/addresses@3.0.3': + resolution: {integrity: sha512-AuMwKhJI89ANqiuJ/fawcwxNKkSeHH9CApZd2xelQQLS7X8uxAOovpcmEgiObQuiVP944s9ScGUT62Bdul9qYg==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/assertions@3.0.3': + resolution: {integrity: sha512-2qspxdbWp2y62dfCIlqeWQr4g+hE8FYSSwcaP6itwMwGRb8393yDGCJfI/znuzJh6m/XVWhMHIgFgsBwnevCmg==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/buffer-layout@4.0.1': + resolution: {integrity: sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==} + engines: {node: '>=5.10'} + + '@solana/codecs-core@2.3.0': + resolution: {integrity: sha512-oG+VZzN6YhBHIoSKgS5ESM9VIGzhWjEHEGNPSibiDTxFhsFWxNaz8LbMDPjBUE69r9wmdGLkrQ+wVPbnJcZPvw==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/codecs-core@3.0.3': + resolution: {integrity: sha512-emKykJ3h1DmnDOY29Uv9eJXP8E/FHzvlUBJ6te+5EbKdFjj7vdlKYPfDxOI6iGdXTY+YC/ELtbNBh6QwF2uEDQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/codecs-data-structures@3.0.3': + resolution: {integrity: sha512-R15cLp8riJvToXziW8lP6AMSwsztGhEnwgyGmll32Mo0Yjq+hduW2/fJrA/TJs6tA/OgTzMQjlxgk009EqZHCw==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/codecs-numbers@2.3.0': + resolution: {integrity: sha512-jFvvwKJKffvG7Iz9dmN51OGB7JBcy2CJ6Xf3NqD/VP90xak66m/Lg48T01u5IQ/hc15mChVHiBm+HHuOFDUrQg==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/codecs-numbers@3.0.3': + resolution: {integrity: sha512-pfXkH9J0glrM8qj6389GAn30+cJOxzXLR2FsPOHCUMXrqLhGjMMZAWhsQkpOQ37SGc/7EiQsT/gmyGC7gxHqJQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/codecs-strings@3.0.3': + resolution: {integrity: sha512-VHBXnnTVtcQ1j+7Vrz+qSYo38no+jiHRdGnhFspRXEHNJbllzwKqgBE7YN3qoIXH+MKxgJUcwO5KHmdzf8Wn2A==} + engines: {node: '>=20.18.0'} + peerDependencies: + fastestsmallesttextencoderdecoder: ^1.0.22 + typescript: '>=5.3.3' + + '@solana/codecs@3.0.3': + resolution: {integrity: sha512-GOHwTlIQsCoJx9Ryr6cEf0FHKAQ7pY4aO4xgncAftrv0lveTQ1rPP2inQ1QT0gJllsIa8nwbfXAADs9nNJxQDA==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/errors@2.3.0': + resolution: {integrity: sha512-66RI9MAbwYV0UtP7kGcTBVLxJgUxoZGm8Fbc0ah+lGiAw17Gugco6+9GrJCV83VyF2mDWyYnYM9qdI3yjgpnaQ==} + engines: {node: '>=20.18.0'} + hasBin: true + peerDependencies: + typescript: '>=5.3.3' + + '@solana/errors@3.0.3': + resolution: {integrity: sha512-1l84xJlHNva6io62PcYfUamwWlc0eM95nHgCrKX0g0cLoC6D6QHYPCEbEVkR+C5UtP9JDgyQM8MFiv+Ei5tO9Q==} + engines: {node: '>=20.18.0'} + hasBin: true + peerDependencies: + typescript: '>=5.3.3' + + '@solana/fast-stable-stringify@3.0.3': + resolution: {integrity: sha512-ED0pxB6lSEYvg+vOd5hcuQrgzEDnOrURFgp1ZOY+lQhJkQU6xo+P829NcJZQVP1rdU2/YQPAKJKEseyfe9VMIw==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/functional@3.0.3': + resolution: {integrity: sha512-2qX1kKANn8995vOOh5S9AmF4ItGZcfbny0w28Eqy8AFh+GMnSDN4gqpmV2LvxBI9HibXZptGH3RVOMk82h1Mpw==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/instruction-plans@3.0.3': + resolution: {integrity: sha512-eqoaPtWtmLTTpdvbt4BZF5H6FIlJtXi9H7qLOM1dLYonkOX2Ncezx5NDCZ9tMb2qxVMF4IocYsQnNSnMfjQF1w==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/instructions@3.0.3': + resolution: {integrity: sha512-4csIi8YUDb5j/J+gDzmYtOvq7ZWLbCxj4t0xKn+fPrBk/FD2pK29KVT3Fu7j4Lh1/ojunQUP9X4NHwUexY3PnA==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/keys@3.0.3': + resolution: {integrity: sha512-tp8oK9tMadtSIc4vF4aXXWkPd4oU5XPW8nf28NgrGDWGt25fUHIydKjkf2hPtMt9i1WfRyQZ33B5P3dnsNqcPQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/kit@3.0.3': + resolution: {integrity: sha512-CEEhCDmkvztd1zbgADsEQhmj9GyWOOGeW1hZD+gtwbBSF5YN1uofS/pex5MIh/VIqKRj+A2UnYWI1V+9+q/lyQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/nominal-types@3.0.3': + resolution: {integrity: sha512-aZavCiexeUAoMHRQg4s1AHkH3wscbOb70diyfjhwZVgFz1uUsFez7csPp9tNFkNolnadVb2gky7yBk3IImQJ6A==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/options@3.0.3': + resolution: {integrity: sha512-jarsmnQ63RN0JPC5j9sgUat07NrL9PC71XU7pUItd6LOHtu4+wJMio3l5mT0DHVfkfbFLL6iI6+QmXSVhTNF3g==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/programs@3.0.3': + resolution: {integrity: sha512-JZlVE3/AeSNDuH3aEzCZoDu8GTXkMpGXxf93zXLzbxfxhiQ/kHrReN4XE/JWZ/uGWbaFZGR5B3UtdN2QsoZL7w==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/promises@3.0.3': + resolution: {integrity: sha512-K+UflGBVxj30XQMHTylHHZJdKH5QG3oj5k2s42GrZ/Wbu72oapVJySMBgpK45+p90t8/LEqV6rRPyTXlet9J+Q==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/rpc-api@3.0.3': + resolution: {integrity: sha512-Yym9/Ama62OY69rAZgbOCAy1QlqaWAyb0VlqFuwSaZV1pkFCCFSwWEJEsiN1n8pb2ZP+RtwNvmYixvWizx9yvA==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/rpc-parsed-types@3.0.3': + resolution: {integrity: sha512-/koM05IM2fU91kYDQxXil3VBNlOfcP+gXE0js1sdGz8KonGuLsF61CiKB5xt6u1KEXhRyDdXYLjf63JarL4Ozg==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/rpc-spec-types@3.0.3': + resolution: {integrity: sha512-A6Jt8SRRetnN3CeGAvGJxigA9zYRslGgWcSjueAZGvPX+MesFxEUjSWZCfl+FogVFvwkqfkgQZQbPAGZQFJQ6Q==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/rpc-spec@3.0.3': + resolution: {integrity: sha512-MZn5/8BebB6MQ4Gstw6zyfWsFAZYAyLzMK+AUf/rSfT8tPmWiJ/mcxnxqOXvFup/l6D67U8pyGpIoFqwCeZqqA==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/rpc-subscriptions-api@3.0.3': + resolution: {integrity: sha512-MGgVK3PUS15qsjuhimpzGZrKD/CTTvS0mAlQ0Jw84zsr1RJVdQJK/F0igu07BVd172eTZL8d90NoAQ3dahW5pA==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/rpc-subscriptions-channel-websocket@3.0.3': + resolution: {integrity: sha512-zUzUlb8Cwnw+SHlsLrSqyBRtOJKGc+FvSNJo/vWAkLShoV0wUDMPv7VvhTngJx3B/3ANfrOZ4i08i9QfYPAvpQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + ws: ^8.18.0 + + '@solana/rpc-subscriptions-spec@3.0.3': + resolution: {integrity: sha512-9KpQ32OBJWS85mn6q3gkM0AjQe1LKYlMU7gpJRrla/lvXxNLhI95tz5K6StctpUreVmRWTVkNamHE69uUQyY8A==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/rpc-subscriptions@3.0.3': + resolution: {integrity: sha512-LRvz6NaqvtsYFd32KwZ+rwYQ9XCs+DWjV8BvBLsJpt9/NWSuHf/7Sy/vvP6qtKxut692H/TMvHnC4iulg0WmiQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/rpc-transformers@3.0.3': + resolution: {integrity: sha512-lzdaZM/dG3s19Tsk4mkJA5JBoS1eX9DnD7z62gkDwrwJDkDBzkAJT9aLcsYFfTmwTfIp6uU2UPgGYc97i1wezw==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/rpc-transport-http@3.0.3': + resolution: {integrity: sha512-bIXFwr2LR5A97Z46dI661MJPbHnPfcShBjFzOS/8Rnr8P4ho3j/9EUtjDrsqoxGJT3SLWj5OlyXAlaDAvVTOUQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/rpc-types@3.0.3': + resolution: {integrity: sha512-petWQ5xSny9UfmC3Qp2owyhNU0w9SyBww4+v7tSVyXMcCC9v6j/XsqTeimH1S0qQUllnv0/FY83ohFaxofmZ6Q==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/rpc@3.0.3': + resolution: {integrity: sha512-3oukAaLK78GegkKcm6iNmRnO4mFeNz+BMvA8T56oizoBNKiRVEq/6DFzVX/LkmZ+wvD601pAB3uCdrTPcC0YKQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/signers@3.0.3': + resolution: {integrity: sha512-UwCd/uPYTZiwd283JKVyOWLLN5sIgMBqGDyUmNU3vo9hcmXKv5ZGm/9TvwMY2z35sXWuIOcj7etxJ8OoWc/ObQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/subscribable@3.0.3': + resolution: {integrity: sha512-FJ27LKGHLQ5GGttPvTOLQDLrrOZEgvaJhB7yYaHAhPk25+p+erBaQpjePhfkMyUbL1FQbxn1SUJmS6jUuaPjlQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/sysvars@3.0.3': + resolution: {integrity: sha512-GnHew+QeKCs2f9ow+20swEJMH4mDfJA/QhtPgOPTYQx/z69J4IieYJ7fZenSHnA//lJ45fVdNdmy1trypvPLBQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/transaction-confirmation@3.0.3': + resolution: {integrity: sha512-dXx0OLtR95LMuARgi2dDQlL1QYmk56DOou5q9wKymmeV3JTvfDExeWXnOgjRBBq/dEfj4ugN1aZuTaS18UirFw==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/transaction-messages@3.0.3': + resolution: {integrity: sha512-s+6NWRnBhnnjFWV4x2tzBzoWa6e5LiIxIvJlWwVQBFkc8fMGY04w7jkFh0PM08t/QFKeXBEWkyBDa/TFYdkWug==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/transactions@3.0.3': + resolution: {integrity: sha512-iMX+n9j4ON7H1nKlWEbMqMOpKYC6yVGxKKmWHT1KdLRG7v+03I4DnDeFoI+Zmw56FA+7Bbne8jwwX60Q1vk/MQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: '>=5.3.3' + + '@solana/web3.js@1.98.4': + resolution: {integrity: sha512-vv9lfnvjUsRiq//+j5pBdXig0IQdtzA0BRZ3bXEP4KaIyF1CcaydWqgyzQgfZMNIsWNWmG+AUHwPy4AHOD6gpw==} + '@speed-highlight/core@1.2.7': resolution: {integrity: sha512-0dxmVj4gxg3Jg879kvFS/msl4s9F3T9UXC1InxgOf7t5NvcPD97u/WTA5vL/IxWHMn7qSxBozqrnnE2wvl1m8g==} @@ -3260,6 +3524,9 @@ packages: '@types/chai@5.2.2': resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} + '@types/connect@3.4.38': + resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} @@ -3354,6 +3621,9 @@ packages: '@types/use-sync-external-store@0.0.6': resolution: {integrity: sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==} + '@types/uuid@8.3.4': + resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==} + '@types/web-bluetooth@0.0.20': resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} @@ -3363,6 +3633,12 @@ packages: '@types/wrap-ansi@3.0.0': resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} + '@types/ws@7.4.7': + resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} + + '@types/ws@8.18.1': + resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} + '@typescript/vfs@1.6.0': resolution: {integrity: sha512-hvJUjNVeBMp77qPINuUvYXj4FyWeeMMKZkxEATEU3hqBAQ7qdTBCUFT7Sp0Zu0faeEtFf+ldXxMEDr/bk73ISg==} peerDependencies: @@ -3905,6 +4181,17 @@ packages: zod: optional: true + abitype@1.0.6: + resolution: {integrity: sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==} + peerDependencies: + typescript: '>=5.0.4' + zod: ^3 >=3.22.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + abitype@1.0.8: resolution: {integrity: sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==} peerDependencies: @@ -3978,6 +4265,10 @@ packages: resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} engines: {node: '>= 14'} + agentkeepalive@4.6.0: + resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==} + engines: {node: '>= 8.0.0'} + aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -4099,6 +4390,9 @@ packages: async@3.2.5: resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + atomic-sleep@1.0.0: resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} engines: {node: '>=8.0.0'} @@ -4118,6 +4412,14 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + axios-retry@4.5.0: + resolution: {integrity: sha512-aR99oXhpEDGo0UuAlYcn2iGRds30k366Zfa05XWScR9QaQD4JYiP3/1Qt1u7YlefUOK+cn0CcwoL1oefavQUlQ==} + peerDependencies: + axios: 0.x || 1.x + + axios@1.12.2: + resolution: {integrity: sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==} + b4a@1.6.6: resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} @@ -4167,6 +4469,9 @@ packages: boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + borsh@0.7.0: + resolution: {integrity: sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==} + bowser@2.11.0: resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} @@ -4298,6 +4603,10 @@ packages: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + chalk@5.6.2: + resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + change-case@5.4.4: resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} @@ -4317,6 +4626,9 @@ packages: chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + charenc@0.0.2: + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} + check-error@2.1.1: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} @@ -4431,6 +4743,10 @@ packages: colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -4445,6 +4761,14 @@ packages: resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} engines: {node: '>=16'} + commander@14.0.0: + resolution: {integrity: sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA==} + engines: {node: '>=20'} + + commander@14.0.1: + resolution: {integrity: sha512-2JkV3gUZUVrbNA+1sjBOYLsMZ5cEEl8GTFP2a4AVz5hvasAMCQ1D2l2le/cX+pV4N6ZU17zjUahLpIXRrnWL8A==} + engines: {node: '>=20'} + commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -4562,6 +4886,9 @@ packages: crossws@0.3.5: resolution: {integrity: sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==} + crypt@0.0.2: + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} + crypto-random-string@1.0.0: resolution: {integrity: sha512-GsVpkFPlycH7/fRR7Dhcmnoii54gV1nz7y4CWyeFS14N+JVBBhY+r8amRHE4BwSYal7BPTDp8isvAlCxyFt3Hg==} engines: {node: '>=4'} @@ -4742,6 +5069,14 @@ packages: defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + delay@5.0.0: + resolution: {integrity: sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==} + engines: {node: '>=10'} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + denque@2.1.0: resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==} engines: {node: '>=0.10'} @@ -4958,9 +5293,19 @@ packages: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + es-toolkit@1.33.0: resolution: {integrity: sha512-X13Q/ZSc+vsO1q600bvNK4bxgXMkHcf//RxCmYDaRY5DAcT+eoXjY5hoAPGMdRnWQjvyLEcyauG3b6hz76LNqg==} + es6-promise@4.2.8: + resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} + + es6-promisify@5.0.0: + resolution: {integrity: sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==} + esbuild@0.25.0: resolution: {integrity: sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==} engines: {node: '>=18'} @@ -5101,6 +5446,10 @@ packages: externality@1.0.2: resolution: {integrity: sha512-LyExtJWKxtgVzmgtEHyQtLFpw1KFhQphF9nTG8TpAIVkiI/xQ3FJh75tRFLYl4hkn7BNIIdLJInuDAavX35pMw==} + eyes@0.1.8: + resolution: {integrity: sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==} + engines: {node: '> 0.1.90'} + fast-copy@3.0.1: resolution: {integrity: sha512-Knr7NOtK3HWRYGtHoJrjkaWepqT8thIVGAwt0p0aUs1zqkAzXZV4vo9fFNwyb5fcqK1GKYFYxldQdIDVKhUAfA==} @@ -5128,6 +5477,9 @@ packages: fast-safe-stringify@2.1.1: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + fast-stable-stringify@1.0.0: + resolution: {integrity: sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==} + fastq@1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} @@ -5228,6 +5580,10 @@ packages: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} + form-data@4.0.4: + resolution: {integrity: sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==} + engines: {node: '>= 6'} + format@0.2.2: resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} engines: {node: '>=0.4.x'} @@ -5536,6 +5892,9 @@ packages: resolution: {integrity: sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==} engines: {node: '>=18.18.0'} + humanize-ms@1.2.1: + resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -5616,6 +5975,9 @@ packages: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} + is-buffer@1.1.6: + resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} + is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -5695,6 +6057,10 @@ packages: is-reference@1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + is-retry-allowed@2.2.0: + resolution: {integrity: sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==} + engines: {node: '>=10'} + is-ssh@1.4.0: resolution: {integrity: sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==} @@ -5755,6 +6121,11 @@ packages: resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==} engines: {node: '>=16'} + isomorphic-ws@4.0.1: + resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} + peerDependencies: + ws: 8.17.1 + isows@1.0.4: resolution: {integrity: sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ==} peerDependencies: @@ -5789,6 +6160,11 @@ packages: jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + jayson@4.2.0: + resolution: {integrity: sha512-VfJ9t1YLwacIubLhONk0KFeosUBwstRWQ0IRT1KDjEjnVnSOVHC3uwugyV7L0c7R9lpVyrUGT2XWiBA1UTtpyg==} + engines: {node: '>=8'} + hasBin: true + jiti@1.21.0: resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} hasBin: true @@ -5801,6 +6177,9 @@ packages: resolution: {integrity: sha512-VXe6RjJkBPj0ohtqaO8vSWP3ZhAKo66fKrFNCll4BTcwljPLz03pCbaNKfzGP5MbrCYcbJ7v0nOYYwUzTEIdXQ==} hasBin: true + jose@6.1.0: + resolution: {integrity: sha512-TTQJyoEoKcC1lscpVDCSsVgYzUDg/0Bt3WE//WiTPK6uOCQC2KZS4MpugbMWt/zyjkopgZoXhZuCi00gLudfUA==} + joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} @@ -5843,6 +6222,9 @@ packages: json-rpc-random-id@1.0.1: resolution: {integrity: sha512-RJ9YYNCkhVDBuP4zN5BBtYAzEl03yq/jIIsyif0JY9qyJuQQZNeDK7anAPKKlyEtLSj2s8h6hNh2F8zO5q7ScA==} + json-stringify-safe@5.0.1: + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -6054,6 +6436,9 @@ packages: md5.js@1.3.5: resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + md5@2.3.0: + resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} + mdast-util-find-and-replace@3.0.1: resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==} @@ -6196,10 +6581,18 @@ packages: resolution: {integrity: sha512-H/E3J6t+DQs/F2YgfDhxUVZz/dF8JXPPKTLHL/yHCcLZLtCXJDUaqvhJXQwqOVBvbyNn4T0WjLpIHd7PAw7fBA==} hasBin: true + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + mime-db@1.54.0: resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} engines: {node: '>= 0.6'} + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + mime-types@3.0.1: resolution: {integrity: sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==} engines: {node: '>= 0.6'} @@ -6942,8 +7335,8 @@ packages: resolution: {integrity: sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg==} engines: {node: '>=12.0.0'} - porto@0.2.34: - resolution: {integrity: sha512-o+hK9r6a4j3EAFOkgNXtcwYc4vAMsmbVhRJHrBXXV/tGVLb2V2sVGLcCFFH3CLevRAyyUUKoT0KIaoQaro4saA==} + porto@0.2.35: + resolution: {integrity: sha512-gu9FfjjvvYBgQXUHWTp6n3wkTxVtEcqFotM7i3GEZeoQbvLGbssAicCz6hFZ8+xggrJWwi/RLmbwNra50SMmUQ==} hasBin: true peerDependencies: '@tanstack/react-query': '>=5.59.0' @@ -7229,6 +7622,9 @@ packages: proxy-compare@2.6.0: resolution: {integrity: sha512-8xuCeM3l8yqdmbPoYeLbrAXCBWu19XEYc5/F28f5qOaoAIMyfmBUkl5axiK+x9olUvRlcekvnm98AP9RDngOIw==} + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} @@ -7431,6 +7827,9 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rpc-websockets@9.2.0: + resolution: {integrity: sha512-DS/XHdPxplQTtNRKiBCRWGBJfjOk56W7fyFUpiYi9fSTWTzoEMbUkn3J4gB0IMniIEVeAGR1/rzFQogzD5MxvQ==} + run-applescript@7.0.0: resolution: {integrity: sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==} engines: {node: '>=18'} @@ -7717,6 +8116,12 @@ packages: std-env@3.9.0: resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} + stream-chain@2.2.5: + resolution: {integrity: sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==} + + stream-json@1.9.1: + resolution: {integrity: sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw==} + stream-shift@1.0.1: resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} @@ -7831,6 +8236,10 @@ packages: resolution: {integrity: sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==} engines: {node: '>=14.0.0'} + superstruct@2.0.2: + resolution: {integrity: sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==} + engines: {node: '>=14.0.0'} + supports-color@10.2.2: resolution: {integrity: sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==} engines: {node: '>=18'} @@ -7903,6 +8312,9 @@ packages: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} engines: {node: '>=18'} + text-encoding-utf-8@1.0.2: + resolution: {integrity: sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==} + thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -8075,6 +8487,9 @@ packages: undici-types@7.13.0: resolution: {integrity: sha512-Ov2Rr9Sx+fRgagJ5AX0qvItZG/JKKoBRAVITs1zk7IqZGTJUwgUr7qoYBpWwakpWilTZFM98rG/AFRocu10iIQ==} + undici-types@7.16.0: + resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} + undici@5.29.0: resolution: {integrity: sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==} engines: {node: '>=14.0'} @@ -8872,6 +9287,9 @@ packages: zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} + zod@3.25.76: + resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} + zod@4.1.11: resolution: {integrity: sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==} @@ -9406,24 +9824,29 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 - '@base-org/account@1.1.1(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.22.4)': + '@base-org/account@2.4.0(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))(zod@3.25.76)': dependencies: + '@coinbase/cdp-sdk': 1.38.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)) '@noble/hashes': 1.4.0 clsx: 1.2.1 eventemitter3: 5.0.1 idb-keyval: 6.2.1 - ox: 0.6.9(typescript@5.9.2)(zod@3.22.4) + ox: 0.6.9(typescript@5.9.2)(zod@3.25.76) preact: 10.24.2 - viem: 2.31.7(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) zustand: 5.0.3(@types/react@18.3.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) transitivePeerDependencies: - '@types/react' - bufferutil + - debug + - encoding + - fastestsmallesttextencoderdecoder - immer - react - typescript - use-sync-external-store - utf-8-validate + - ws - zod '@bcoe/v8-coverage@1.0.2': {} @@ -9615,6 +10038,29 @@ snapshots: dependencies: mime: 3.0.0 + '@coinbase/cdp-sdk@1.38.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + dependencies: + '@solana-program/system': 0.8.1(@solana/kit@3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + '@solana-program/token': 0.6.0(@solana/kit@3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + '@solana/kit': 3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@solana/web3.js': 1.98.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10) + abitype: 1.0.6(typescript@5.9.2)(zod@3.25.76) + axios: 1.12.2 + axios-retry: 4.5.0(axios@1.12.2) + jose: 6.1.0 + md5: 2.3.0 + uncrypto: 0.1.3 + viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + zod: 3.25.76 + transitivePeerDependencies: + - bufferutil + - debug + - encoding + - fastestsmallesttextencoderdecoder + - typescript + - utf-8-validate + - ws + '@coinbase/wallet-sdk@3.9.3': dependencies: bn.js: 5.2.1 @@ -9629,15 +10075,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@coinbase/wallet-sdk@4.3.6(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.22.4)': + '@coinbase/wallet-sdk@4.3.6(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: '@noble/hashes': 1.4.0 clsx: 1.2.1 eventemitter3: 5.0.1 idb-keyval: 6.2.1 - ox: 0.6.9(typescript@5.9.2)(zod@3.22.4) + ox: 0.6.9(typescript@5.9.2)(zod@3.25.76) preact: 10.24.2 - viem: 2.31.7(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.31.7(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) zustand: 5.0.3(@types/react@18.3.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) transitivePeerDependencies: - '@types/react' @@ -10083,11 +10529,11 @@ snapshots: '@floating-ui/utils@0.2.2': {} - '@gemini-wallet/core@0.2.0(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))': + '@gemini-wallet/core@0.3.1(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76))': dependencies: '@metamask/rpc-errors': 7.0.2 eventemitter3: 5.0.1 - viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) transitivePeerDependencies: - supports-color @@ -11168,13 +11614,24 @@ snapshots: - utf-8-validate - zod - '@reown/appkit-controllers@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@reown/appkit-common@1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: - '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + big.js: 6.2.2 + dayjs: 1.11.13 + viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod + + '@reown/appkit-controllers@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': + dependencies: + '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@reown/appkit-wallet': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10) - '@walletconnect/universal-provider': 2.21.0(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/universal-provider': 2.21.0(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) valtio: 1.13.2(@types/react@18.3.1)(react@18.3.1) - viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -11198,12 +11655,12 @@ snapshots: - utf-8-validate - zod - '@reown/appkit-pay@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@reown/appkit-pay@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: - '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-controllers': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-ui': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-utils': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-controllers': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-ui': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-utils': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) lit: 3.3.0 valtio: 1.13.2(@types/react@18.3.1)(react@18.3.1) transitivePeerDependencies: @@ -11233,12 +11690,12 @@ snapshots: dependencies: buffer: 6.0.3 - '@reown/appkit-scaffold-ui@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@reown/appkit-scaffold-ui@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: - '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-controllers': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-ui': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-utils': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-controllers': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-ui': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-utils': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@reown/appkit-wallet': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10) lit: 3.3.0 transitivePeerDependencies: @@ -11264,10 +11721,10 @@ snapshots: - utf-8-validate - zod - '@reown/appkit-ui@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@reown/appkit-ui@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: - '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-controllers': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-controllers': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@reown/appkit-wallet': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10) lit: 3.3.0 qrcode: 1.5.3 @@ -11294,16 +11751,16 @@ snapshots: - utf-8-validate - zod - '@reown/appkit-utils@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@reown/appkit-utils@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: - '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-controllers': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-controllers': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@reown/appkit-polyfills': 1.7.8 '@reown/appkit-wallet': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10) '@walletconnect/logger': 2.1.2 - '@walletconnect/universal-provider': 2.21.0(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/universal-provider': 2.21.0(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) valtio: 1.13.2(@types/react@18.3.1)(react@18.3.1) - viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -11338,21 +11795,21 @@ snapshots: - typescript - utf-8-validate - '@reown/appkit@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@reown/appkit@1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: - '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-controllers': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-pay': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@reown/appkit-common': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-controllers': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-pay': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@reown/appkit-polyfills': 1.7.8 - '@reown/appkit-scaffold-ui': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-ui': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@reown/appkit-utils': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@reown/appkit-scaffold-ui': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-ui': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@reown/appkit-utils': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@reown/appkit-wallet': 1.7.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10) '@walletconnect/types': 2.21.0(ioredis@5.8.0) - '@walletconnect/universal-provider': 2.21.0(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/universal-provider': 2.21.0(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) bs58: 6.0.0 valtio: 1.13.2(@types/react@18.3.1)(react@18.3.1) - viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -11519,9 +11976,9 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.52.2': optional: true - '@safe-global/safe-apps-provider@0.18.6(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@safe-global/safe-apps-provider@0.18.6(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: - '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) events: 3.3.0 transitivePeerDependencies: - bufferutil @@ -11530,10 +11987,10 @@ snapshots: - utf-8-validate - zod - '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: '@safe-global/safe-gateway-typescript-sdk': 3.8.0(encoding@0.1.13) - viem: 2.17.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.17.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) transitivePeerDependencies: - bufferutil - encoding @@ -11737,6 +12194,421 @@ snapshots: '@socket.io/component-emitter@3.1.2': {} + '@solana-program/system@0.8.1(@solana/kit@3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + dependencies: + '@solana/kit': 3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + + '@solana-program/token@0.6.0(@solana/kit@3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + dependencies: + '@solana/kit': 3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + + '@solana/accounts@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/addresses': 3.0.3(typescript@5.9.2) + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/codecs-strings': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/rpc-spec': 3.0.3(typescript@5.9.2) + '@solana/rpc-types': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/addresses@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/assertions': 3.0.3(typescript@5.9.2) + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/codecs-strings': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/nominal-types': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/assertions@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/errors': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + + '@solana/buffer-layout@4.0.1': + dependencies: + buffer: 6.0.3 + + '@solana/codecs-core@2.3.0(typescript@5.9.2)': + dependencies: + '@solana/errors': 2.3.0(typescript@5.9.2) + typescript: 5.9.2 + + '@solana/codecs-core@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/errors': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + + '@solana/codecs-data-structures@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/codecs-numbers': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + + '@solana/codecs-numbers@2.3.0(typescript@5.9.2)': + dependencies: + '@solana/codecs-core': 2.3.0(typescript@5.9.2) + '@solana/errors': 2.3.0(typescript@5.9.2) + typescript: 5.9.2 + + '@solana/codecs-numbers@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + + '@solana/codecs-strings@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/codecs-numbers': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + + '@solana/codecs@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/codecs-data-structures': 3.0.3(typescript@5.9.2) + '@solana/codecs-numbers': 3.0.3(typescript@5.9.2) + '@solana/codecs-strings': 3.0.3(typescript@5.9.2) + '@solana/options': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/errors@2.3.0(typescript@5.9.2)': + dependencies: + chalk: 5.6.2 + commander: 14.0.1 + typescript: 5.9.2 + + '@solana/errors@3.0.3(typescript@5.9.2)': + dependencies: + chalk: 5.6.2 + commander: 14.0.0 + typescript: 5.9.2 + + '@solana/fast-stable-stringify@3.0.3(typescript@5.9.2)': + dependencies: + typescript: 5.9.2 + + '@solana/functional@3.0.3(typescript@5.9.2)': + dependencies: + typescript: 5.9.2 + + '@solana/instruction-plans@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/instructions': 3.0.3(typescript@5.9.2) + '@solana/promises': 3.0.3(typescript@5.9.2) + '@solana/transaction-messages': 3.0.3(typescript@5.9.2) + '@solana/transactions': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/instructions@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + + '@solana/keys@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/assertions': 3.0.3(typescript@5.9.2) + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/codecs-strings': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/nominal-types': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/kit@3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + dependencies: + '@solana/accounts': 3.0.3(typescript@5.9.2) + '@solana/addresses': 3.0.3(typescript@5.9.2) + '@solana/codecs': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/functional': 3.0.3(typescript@5.9.2) + '@solana/instruction-plans': 3.0.3(typescript@5.9.2) + '@solana/instructions': 3.0.3(typescript@5.9.2) + '@solana/keys': 3.0.3(typescript@5.9.2) + '@solana/programs': 3.0.3(typescript@5.9.2) + '@solana/rpc': 3.0.3(typescript@5.9.2) + '@solana/rpc-parsed-types': 3.0.3(typescript@5.9.2) + '@solana/rpc-spec-types': 3.0.3(typescript@5.9.2) + '@solana/rpc-subscriptions': 3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@solana/rpc-types': 3.0.3(typescript@5.9.2) + '@solana/signers': 3.0.3(typescript@5.9.2) + '@solana/sysvars': 3.0.3(typescript@5.9.2) + '@solana/transaction-confirmation': 3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@solana/transaction-messages': 3.0.3(typescript@5.9.2) + '@solana/transactions': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + - ws + + '@solana/nominal-types@3.0.3(typescript@5.9.2)': + dependencies: + typescript: 5.9.2 + + '@solana/options@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/codecs-data-structures': 3.0.3(typescript@5.9.2) + '@solana/codecs-numbers': 3.0.3(typescript@5.9.2) + '@solana/codecs-strings': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/programs@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/addresses': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/promises@3.0.3(typescript@5.9.2)': + dependencies: + typescript: 5.9.2 + + '@solana/rpc-api@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/addresses': 3.0.3(typescript@5.9.2) + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/codecs-strings': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/keys': 3.0.3(typescript@5.9.2) + '@solana/rpc-parsed-types': 3.0.3(typescript@5.9.2) + '@solana/rpc-spec': 3.0.3(typescript@5.9.2) + '@solana/rpc-transformers': 3.0.3(typescript@5.9.2) + '@solana/rpc-types': 3.0.3(typescript@5.9.2) + '@solana/transaction-messages': 3.0.3(typescript@5.9.2) + '@solana/transactions': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/rpc-parsed-types@3.0.3(typescript@5.9.2)': + dependencies: + typescript: 5.9.2 + + '@solana/rpc-spec-types@3.0.3(typescript@5.9.2)': + dependencies: + typescript: 5.9.2 + + '@solana/rpc-spec@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/rpc-spec-types': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + + '@solana/rpc-subscriptions-api@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/addresses': 3.0.3(typescript@5.9.2) + '@solana/keys': 3.0.3(typescript@5.9.2) + '@solana/rpc-subscriptions-spec': 3.0.3(typescript@5.9.2) + '@solana/rpc-transformers': 3.0.3(typescript@5.9.2) + '@solana/rpc-types': 3.0.3(typescript@5.9.2) + '@solana/transaction-messages': 3.0.3(typescript@5.9.2) + '@solana/transactions': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/rpc-subscriptions-channel-websocket@3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + dependencies: + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/functional': 3.0.3(typescript@5.9.2) + '@solana/rpc-subscriptions-spec': 3.0.3(typescript@5.9.2) + '@solana/subscribable': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + ws: 8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + + '@solana/rpc-subscriptions-spec@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/promises': 3.0.3(typescript@5.9.2) + '@solana/rpc-spec-types': 3.0.3(typescript@5.9.2) + '@solana/subscribable': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + + '@solana/rpc-subscriptions@3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + dependencies: + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/fast-stable-stringify': 3.0.3(typescript@5.9.2) + '@solana/functional': 3.0.3(typescript@5.9.2) + '@solana/promises': 3.0.3(typescript@5.9.2) + '@solana/rpc-spec-types': 3.0.3(typescript@5.9.2) + '@solana/rpc-subscriptions-api': 3.0.3(typescript@5.9.2) + '@solana/rpc-subscriptions-channel-websocket': 3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@solana/rpc-subscriptions-spec': 3.0.3(typescript@5.9.2) + '@solana/rpc-transformers': 3.0.3(typescript@5.9.2) + '@solana/rpc-types': 3.0.3(typescript@5.9.2) + '@solana/subscribable': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + - ws + + '@solana/rpc-transformers@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/functional': 3.0.3(typescript@5.9.2) + '@solana/nominal-types': 3.0.3(typescript@5.9.2) + '@solana/rpc-spec-types': 3.0.3(typescript@5.9.2) + '@solana/rpc-types': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/rpc-transport-http@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/rpc-spec': 3.0.3(typescript@5.9.2) + '@solana/rpc-spec-types': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + undici-types: 7.16.0 + + '@solana/rpc-types@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/addresses': 3.0.3(typescript@5.9.2) + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/codecs-numbers': 3.0.3(typescript@5.9.2) + '@solana/codecs-strings': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/nominal-types': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/rpc@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/fast-stable-stringify': 3.0.3(typescript@5.9.2) + '@solana/functional': 3.0.3(typescript@5.9.2) + '@solana/rpc-api': 3.0.3(typescript@5.9.2) + '@solana/rpc-spec': 3.0.3(typescript@5.9.2) + '@solana/rpc-spec-types': 3.0.3(typescript@5.9.2) + '@solana/rpc-transformers': 3.0.3(typescript@5.9.2) + '@solana/rpc-transport-http': 3.0.3(typescript@5.9.2) + '@solana/rpc-types': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/signers@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/addresses': 3.0.3(typescript@5.9.2) + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/instructions': 3.0.3(typescript@5.9.2) + '@solana/keys': 3.0.3(typescript@5.9.2) + '@solana/nominal-types': 3.0.3(typescript@5.9.2) + '@solana/transaction-messages': 3.0.3(typescript@5.9.2) + '@solana/transactions': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/subscribable@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/errors': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + + '@solana/sysvars@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/accounts': 3.0.3(typescript@5.9.2) + '@solana/codecs': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/rpc-types': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/transaction-confirmation@3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + dependencies: + '@solana/addresses': 3.0.3(typescript@5.9.2) + '@solana/codecs-strings': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/keys': 3.0.3(typescript@5.9.2) + '@solana/promises': 3.0.3(typescript@5.9.2) + '@solana/rpc': 3.0.3(typescript@5.9.2) + '@solana/rpc-subscriptions': 3.0.3(typescript@5.9.2)(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@solana/rpc-types': 3.0.3(typescript@5.9.2) + '@solana/transaction-messages': 3.0.3(typescript@5.9.2) + '@solana/transactions': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + - ws + + '@solana/transaction-messages@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/addresses': 3.0.3(typescript@5.9.2) + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/codecs-data-structures': 3.0.3(typescript@5.9.2) + '@solana/codecs-numbers': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/functional': 3.0.3(typescript@5.9.2) + '@solana/instructions': 3.0.3(typescript@5.9.2) + '@solana/nominal-types': 3.0.3(typescript@5.9.2) + '@solana/rpc-types': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/transactions@3.0.3(typescript@5.9.2)': + dependencies: + '@solana/addresses': 3.0.3(typescript@5.9.2) + '@solana/codecs-core': 3.0.3(typescript@5.9.2) + '@solana/codecs-data-structures': 3.0.3(typescript@5.9.2) + '@solana/codecs-numbers': 3.0.3(typescript@5.9.2) + '@solana/codecs-strings': 3.0.3(typescript@5.9.2) + '@solana/errors': 3.0.3(typescript@5.9.2) + '@solana/functional': 3.0.3(typescript@5.9.2) + '@solana/instructions': 3.0.3(typescript@5.9.2) + '@solana/keys': 3.0.3(typescript@5.9.2) + '@solana/nominal-types': 3.0.3(typescript@5.9.2) + '@solana/rpc-types': 3.0.3(typescript@5.9.2) + '@solana/transaction-messages': 3.0.3(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/web3.js@1.98.4(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.9.2)(utf-8-validate@5.0.10)': + dependencies: + '@babel/runtime': 7.28.4 + '@noble/curves': 1.9.2 + '@noble/hashes': 1.8.0 + '@solana/buffer-layout': 4.0.1 + '@solana/codecs-numbers': 2.3.0(typescript@5.9.2) + agentkeepalive: 4.6.0 + bn.js: 5.2.1 + borsh: 0.7.0 + bs58: 4.0.1 + buffer: 6.0.3 + fast-stable-stringify: 1.0.0 + jayson: 4.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + node-fetch: 2.7.0(encoding@0.1.13) + rpc-websockets: 9.2.0 + superstruct: 2.0.2 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + '@speed-highlight/core@1.2.7': {} '@svitejs/changesets-changelog-github-compact@1.2.0(encoding@0.1.13)': @@ -11851,6 +12723,10 @@ snapshots: dependencies: '@types/deep-eql': 4.0.2 + '@types/connect@3.4.38': + dependencies: + '@types/node': 24.6.2 + '@types/cookie@0.6.0': {} '@types/cross-spawn@6.0.6': @@ -11944,12 +12820,22 @@ snapshots: '@types/use-sync-external-store@0.0.6': {} + '@types/uuid@8.3.4': {} + '@types/web-bluetooth@0.0.20': {} '@types/whatwg-mimetype@3.0.2': {} '@types/wrap-ansi@3.0.0': {} + '@types/ws@7.4.7': + dependencies: + '@types/node': 24.6.2 + + '@types/ws@8.18.1': + dependencies: + '@types/node': 24.6.2 + '@typescript/vfs@1.6.0(typescript@5.9.2)': dependencies: debug: 4.4.1 @@ -12560,12 +13446,13 @@ snapshots: - '@vue/composition-api' - vue - '@vueuse/integrations@11.2.0(change-case@5.4.4)(focus-trap@7.6.0)(fuse.js@7.1.0)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.22(typescript@5.9.2))': + '@vueuse/integrations@11.2.0(axios@1.12.2)(change-case@5.4.4)(focus-trap@7.6.0)(fuse.js@7.1.0)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.22(typescript@5.9.2))': dependencies: '@vueuse/core': 11.2.0(vue@3.5.22(typescript@5.9.2)) '@vueuse/shared': 11.2.0(vue@3.5.22(typescript@5.9.2)) vue-demi: 0.14.10(vue@3.5.22(typescript@5.9.2)) optionalDependencies: + axios: 1.12.2 change-case: 5.4.4 focus-trap: 7.6.0 fuse.js: 7.1.0 @@ -12584,7 +13471,7 @@ snapshots: - '@vue/composition-api' - vue - '@walletconnect/core@2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@walletconnect/core@2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-provider': 1.0.14 @@ -12598,7 +13485,7 @@ snapshots: '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 '@walletconnect/types': 2.21.0(ioredis@5.8.0) - '@walletconnect/utils': 2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/utils': 2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@walletconnect/window-getters': 1.0.1 es-toolkit: 1.33.0 events: 3.3.0 @@ -12623,7 +13510,7 @@ snapshots: - utf-8-validate - zod - '@walletconnect/core@2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@walletconnect/core@2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-provider': 1.0.14 @@ -12637,7 +13524,7 @@ snapshots: '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 '@walletconnect/types': 2.21.1(ioredis@5.8.0) - '@walletconnect/utils': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/utils': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@walletconnect/window-getters': 1.0.1 es-toolkit: 1.33.0 events: 3.3.0 @@ -12666,18 +13553,18 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/ethereum-provider@2.21.1(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@walletconnect/ethereum-provider@2.21.1(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: - '@reown/appkit': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@reown/appkit': 1.7.8(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(react@18.3.1)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@walletconnect/jsonrpc-http-connection': 1.0.8(encoding@0.1.13) '@walletconnect/jsonrpc-provider': 1.0.14 '@walletconnect/jsonrpc-types': 1.0.4 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/keyvaluestorage': 1.1.1(ioredis@5.8.0) - '@walletconnect/sign-client': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/sign-client': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@walletconnect/types': 2.21.1(ioredis@5.8.0) - '@walletconnect/universal-provider': 2.21.1(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) - '@walletconnect/utils': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/universal-provider': 2.21.1(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) + '@walletconnect/utils': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -12790,16 +13677,16 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/sign-client@2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@walletconnect/sign-client@2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: - '@walletconnect/core': 2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/core': 2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.1.2 '@walletconnect/time': 1.0.2 '@walletconnect/types': 2.21.0(ioredis@5.8.0) - '@walletconnect/utils': 2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/utils': 2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -12821,16 +13708,16 @@ snapshots: - utf-8-validate - zod - '@walletconnect/sign-client@2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@walletconnect/sign-client@2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: - '@walletconnect/core': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/core': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.1.2 '@walletconnect/time': 1.0.2 '@walletconnect/types': 2.21.1(ioredis@5.8.0) - '@walletconnect/utils': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/utils': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -12904,7 +13791,7 @@ snapshots: - ioredis - uWebSockets.js - '@walletconnect/universal-provider@2.21.0(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@walletconnect/universal-provider@2.21.0(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/jsonrpc-http-connection': 1.0.8(encoding@0.1.13) @@ -12913,9 +13800,9 @@ snapshots: '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/keyvaluestorage': 1.1.1(ioredis@5.8.0) '@walletconnect/logger': 2.1.2 - '@walletconnect/sign-client': 2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/sign-client': 2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@walletconnect/types': 2.21.0(ioredis@5.8.0) - '@walletconnect/utils': 2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/utils': 2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) es-toolkit: 1.33.0 events: 3.3.0 transitivePeerDependencies: @@ -12939,7 +13826,7 @@ snapshots: - utf-8-validate - zod - '@walletconnect/universal-provider@2.21.1(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@walletconnect/universal-provider@2.21.1(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/jsonrpc-http-connection': 1.0.8(encoding@0.1.13) @@ -12948,9 +13835,9 @@ snapshots: '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/keyvaluestorage': 1.1.1(ioredis@5.8.0) '@walletconnect/logger': 2.1.2 - '@walletconnect/sign-client': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/sign-client': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) '@walletconnect/types': 2.21.1(ioredis@5.8.0) - '@walletconnect/utils': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/utils': 2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) es-toolkit: 1.33.0 events: 3.3.0 transitivePeerDependencies: @@ -12974,7 +13861,7 @@ snapshots: - utf-8-validate - zod - '@walletconnect/utils@2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@walletconnect/utils@2.21.0(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: '@noble/ciphers': 1.2.1 '@noble/curves': 1.8.1 @@ -12992,7 +13879,7 @@ snapshots: detect-browser: 5.3.0 query-string: 7.1.3 uint8arrays: 3.1.0 - viem: 2.23.2(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.23.2(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -13013,7 +13900,7 @@ snapshots: - utf-8-validate - zod - '@walletconnect/utils@2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@walletconnect/utils@2.21.1(bufferutil@4.0.8)(ioredis@5.8.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)': dependencies: '@noble/ciphers': 1.2.1 '@noble/curves': 1.8.1 @@ -13031,7 +13918,7 @@ snapshots: detect-browser: 5.3.0 query-string: 7.1.3 uint8arrays: 3.1.0 - viem: 2.23.2(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.23.2(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -13065,41 +13952,51 @@ snapshots: abbrev@3.0.1: {} - abitype@1.0.0(typescript@5.9.2)(zod@3.22.4): + abitype@1.0.0(typescript@5.9.2)(zod@3.25.76): optionalDependencies: typescript: 5.9.2 - zod: 3.22.4 + zod: 3.25.76 abitype@1.0.0(typescript@5.9.2)(zod@4.1.11): optionalDependencies: typescript: 5.9.2 zod: 4.1.11 - abitype@1.0.2(typescript@5.9.2)(zod@3.22.4): + abitype@1.0.2(typescript@5.9.2)(zod@3.25.76): optionalDependencies: typescript: 5.9.2 - zod: 3.22.4 + zod: 3.25.76 abitype@1.0.4(typescript@5.9.2)(zod@4.1.11): optionalDependencies: typescript: 5.9.2 zod: 4.1.11 - abitype@1.0.5(typescript@5.9.2)(zod@3.22.4): + abitype@1.0.5(typescript@5.9.2)(zod@3.25.76): optionalDependencies: typescript: 5.9.2 - zod: 3.22.4 + zod: 3.25.76 - abitype@1.0.8(typescript@5.9.2)(zod@3.22.4): + abitype@1.0.6(typescript@5.9.2)(zod@3.25.76): optionalDependencies: typescript: 5.9.2 - zod: 3.22.4 + zod: 3.25.76 + + abitype@1.0.8(typescript@5.9.2)(zod@3.25.76): + optionalDependencies: + typescript: 5.9.2 + zod: 3.25.76 abitype@1.1.0(typescript@5.9.2)(zod@3.22.4): optionalDependencies: typescript: 5.9.2 zod: 3.22.4 + abitype@1.1.0(typescript@5.9.2)(zod@3.25.76): + optionalDependencies: + typescript: 5.9.2 + zod: 3.25.76 + abitype@1.1.0(typescript@5.9.2)(zod@4.1.11): optionalDependencies: typescript: 5.9.2 @@ -13110,6 +14007,11 @@ snapshots: typescript: 5.9.2 zod: 3.22.4 + abitype@1.1.1(typescript@5.9.2)(zod@3.25.76): + optionalDependencies: + typescript: 5.9.2 + zod: 3.25.76 + abitype@1.1.1(typescript@5.9.2)(zod@4.1.11): optionalDependencies: typescript: 5.9.2 @@ -13141,6 +14043,10 @@ snapshots: agent-base@7.1.4: {} + agentkeepalive@4.6.0: + dependencies: + humanize-ms: 1.2.1 + aggregate-error@3.1.0: dependencies: clean-stack: 2.2.0 @@ -13271,6 +14177,8 @@ snapshots: async@3.2.5: {} + asynckit@0.4.0: {} + atomic-sleep@1.0.0: {} autoprefixer@10.4.21(postcss@8.5.6): @@ -13289,6 +14197,19 @@ snapshots: dependencies: possible-typed-array-names: 1.1.0 + axios-retry@4.5.0(axios@1.12.2): + dependencies: + axios: 1.12.2 + is-retry-allowed: 2.2.0 + + axios@1.12.2: + dependencies: + follow-redirects: 1.15.11(debug@4.3.4) + form-data: 4.0.4 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + b4a@1.6.6: {} bail@2.0.2: {} @@ -13326,6 +14247,12 @@ snapshots: boolbase@1.0.0: {} + borsh@0.7.0: + dependencies: + bn.js: 5.2.1 + bs58: 4.0.1 + text-encoding-utf-8: 1.0.2 + bowser@2.11.0: {} boxen@5.1.2: @@ -13489,6 +14416,8 @@ snapshots: chalk@5.3.0: {} + chalk@5.6.2: {} + change-case@5.4.4: {} char-regex@1.0.2: {} @@ -13501,6 +14430,8 @@ snapshots: chardet@0.7.0: {} + charenc@0.0.2: {} + check-error@2.1.1: {} chokidar@3.5.3: @@ -13624,6 +14555,10 @@ snapshots: colorette@2.0.20: {} + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + comma-separated-tokens@2.0.3: {} command-exists@1.2.9: {} @@ -13632,6 +14567,10 @@ snapshots: commander@11.1.0: {} + commander@14.0.0: {} + + commander@14.0.1: {} + commander@2.20.3: {} commander@3.0.2: {} @@ -13739,6 +14678,8 @@ snapshots: dependencies: uncrypto: 0.1.3 + crypt@0.0.2: {} + crypto-random-string@1.0.0: {} css-declaration-sorter@7.2.0(postcss@8.5.6): @@ -13892,6 +14833,10 @@ snapshots: defu@6.1.4: {} + delay@5.0.0: {} + + delayed-stream@1.0.0: {} + denque@2.1.0: {} depd@2.0.0: {} @@ -14088,8 +15033,21 @@ snapshots: dependencies: es-errors: 1.3.0 + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + es-toolkit@1.33.0: {} + es6-promise@4.2.8: {} + + es6-promisify@5.0.0: + dependencies: + es6-promise: 4.2.8 + esbuild@0.25.0: optionalDependencies: '@esbuild/aix-ppc64': 0.25.0 @@ -14356,6 +15314,8 @@ snapshots: pathe: 1.1.2 ufo: 1.6.1 + eyes@0.1.8: {} + fast-copy@3.0.1: {} fast-deep-equal@3.1.3: {} @@ -14384,6 +15344,8 @@ snapshots: fast-safe-stringify@2.1.1: {} + fast-stable-stringify@1.0.0: {} + fastq@1.15.0: dependencies: reusify: 1.0.4 @@ -14470,6 +15432,14 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 + form-data@4.0.4: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.2 + mime-types: 2.1.35 + format@0.2.2: {} fp-ts@1.19.3: {} @@ -14889,6 +15859,10 @@ snapshots: human-signals@8.0.1: {} + humanize-ms@1.2.1: + dependencies: + ms: 2.1.3 + iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 @@ -14969,6 +15943,8 @@ snapshots: dependencies: binary-extensions: 2.2.0 + is-buffer@1.1.6: {} + is-callable@1.2.7: {} is-core-module@2.13.1: @@ -15022,6 +15998,8 @@ snapshots: dependencies: '@types/estree': 1.0.6 + is-retry-allowed@2.2.0: {} + is-ssh@1.4.0: dependencies: protocols: 2.0.1 @@ -15066,6 +16044,10 @@ snapshots: isexe@3.1.1: {} + isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + dependencies: + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) + isows@1.0.4(ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -15109,12 +16091,32 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 + jayson@4.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): + dependencies: + '@types/connect': 3.4.38 + '@types/node': 12.20.55 + '@types/ws': 7.4.7 + commander: 2.20.3 + delay: 5.0.0 + es6-promisify: 5.0.0 + eyes: 0.1.8 + isomorphic-ws: 4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + json-stringify-safe: 5.0.1 + stream-json: 1.9.1 + uuid: 8.3.2 + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + jiti@1.21.0: {} jiti@1.21.6: {} jiti@2.6.0: {} + jose@6.1.0: {} + joycon@3.1.1: {} js-beautify@1.15.1: @@ -15151,6 +16153,8 @@ snapshots: json-rpc-random-id@1.0.1: {} + json-stringify-safe@5.0.1: {} + json5@2.2.3: {} jsonfile@2.4.0: @@ -15417,6 +16421,12 @@ snapshots: inherits: 2.0.4 safe-buffer: 5.2.1 + md5@2.3.0: + dependencies: + charenc: 0.0.2 + crypt: 0.0.2 + is-buffer: 1.1.6 + mdast-util-find-and-replace@3.0.1: dependencies: '@types/mdast': 4.0.3 @@ -15718,8 +16728,14 @@ snapshots: dependencies: yargs: 17.7.2 + mime-db@1.52.0: {} + mime-db@1.54.0: {} + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + mime-types@3.0.1: dependencies: mime-db: 1.54.0 @@ -16296,35 +17312,35 @@ snapshots: outvariant@1.4.3: {} - ox@0.6.7(typescript@5.9.2)(zod@3.22.4): + ox@0.6.7(typescript@5.9.2)(zod@3.25.76): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.9.2 '@noble/hashes': 1.8.0 '@scure/bip32': 1.7.0 '@scure/bip39': 1.6.0 - abitype: 1.1.1(typescript@5.9.2)(zod@3.22.4) + abitype: 1.1.1(typescript@5.9.2)(zod@3.25.76) eventemitter3: 5.0.1 optionalDependencies: typescript: 5.9.2 transitivePeerDependencies: - zod - ox@0.6.9(typescript@5.9.2)(zod@3.22.4): + ox@0.6.9(typescript@5.9.2)(zod@3.25.76): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.9.2 '@noble/hashes': 1.8.0 '@scure/bip32': 1.7.0 '@scure/bip39': 1.6.0 - abitype: 1.1.1(typescript@5.9.2)(zod@3.22.4) + abitype: 1.1.1(typescript@5.9.2)(zod@3.25.76) eventemitter3: 5.0.1 optionalDependencies: typescript: 5.9.2 transitivePeerDependencies: - zod - ox@0.8.1(typescript@5.9.2)(zod@3.22.4): + ox@0.8.1(typescript@5.9.2)(zod@3.25.76): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/ciphers': 1.3.0 @@ -16332,7 +17348,7 @@ snapshots: '@noble/hashes': 1.8.0 '@scure/bip32': 1.7.0 '@scure/bip39': 1.6.0 - abitype: 1.1.1(typescript@5.9.2)(zod@3.22.4) + abitype: 1.1.1(typescript@5.9.2)(zod@3.25.76) eventemitter3: 5.0.1 optionalDependencies: typescript: 5.9.2 @@ -16354,6 +17370,21 @@ snapshots: transitivePeerDependencies: - zod + ox@0.9.6(typescript@5.9.2)(zod@3.25.76): + dependencies: + '@adraffy/ens-normalize': 1.11.0 + '@noble/ciphers': 1.3.0 + '@noble/curves': 1.9.1 + '@noble/hashes': 1.8.0 + '@scure/bip32': 1.7.0 + '@scure/bip39': 1.6.0 + abitype: 1.1.1(typescript@5.9.2)(zod@3.25.76) + eventemitter3: 5.0.1 + optionalDependencies: + typescript: 5.9.2 + transitivePeerDependencies: + - zod + ox@0.9.6(typescript@5.9.2)(zod@4.1.11): dependencies: '@adraffy/ens-normalize': 1.11.0 @@ -16634,14 +17665,14 @@ snapshots: pony-cause@2.1.11: {} - porto@0.2.34(@types/react@18.3.1)(@wagmi/core@packages+core)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(wagmi@packages+react): + porto@0.2.35(@types/react@18.3.1)(@wagmi/core@packages+core)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76))(wagmi@packages+react): dependencies: '@wagmi/core': link:packages/core hono: 4.10.3 idb-keyval: 6.2.1 mipd: 0.0.7(typescript@5.9.2) ox: 0.9.6(typescript@5.9.2)(zod@4.1.11) - viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76) zod: 4.1.11 zustand: 5.0.3(@types/react@18.3.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) optionalDependencies: @@ -16885,6 +17916,8 @@ snapshots: proxy-compare@2.6.0: {} + proxy-from-env@1.1.0: {} + psl@1.9.0: {} publint@0.2.11: @@ -17127,6 +18160,19 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.52.2 fsevents: 2.3.3 + rpc-websockets@9.2.0: + dependencies: + '@swc/helpers': 0.5.15 + '@types/uuid': 8.3.4 + '@types/ws': 8.18.1 + buffer: 6.0.3 + eventemitter3: 5.0.1 + uuid: 8.3.2 + ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + optionalDependencies: + bufferutil: 4.0.8 + utf-8-validate: 5.0.10 + run-applescript@7.0.0: {} run-parallel@1.2.0: @@ -17442,6 +18488,12 @@ snapshots: std-env@3.9.0: {} + stream-chain@2.2.5: {} + + stream-json@1.9.1: + dependencies: + stream-chain: 2.2.5 + stream-shift@1.0.1: {} streamx@2.16.1: @@ -17539,6 +18591,8 @@ snapshots: superstruct@1.0.3: {} + superstruct@2.0.2: {} + supports-color@10.2.2: {} supports-color@5.5.0: @@ -17621,6 +18675,8 @@ snapshots: glob: 10.4.5 minimatch: 9.0.4 + text-encoding-utf-8@1.0.2: {} + thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -17772,6 +18828,8 @@ snapshots: undici-types@7.13.0: {} + undici-types@7.16.0: {} + undici@5.29.0: dependencies: '@fastify/busboy': 2.1.1 @@ -18053,14 +19111,14 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - viem@2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4): + viem@2.10.8(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.2.0 '@noble/hashes': 1.3.2 '@scure/bip32': 1.3.2 '@scure/bip39': 1.2.1 - abitype: 1.0.0(typescript@5.9.2)(zod@3.22.4) + abitype: 1.0.0(typescript@5.9.2)(zod@3.25.76) isows: 1.0.4(ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: @@ -18087,14 +19145,14 @@ snapshots: - utf-8-validate - zod - viem@2.17.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4): + viem@2.17.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 '@scure/bip32': 1.4.0 '@scure/bip39': 1.3.0 - abitype: 1.0.5(typescript@5.9.2)(zod@3.22.4) + abitype: 1.0.5(typescript@5.9.2)(zod@3.25.76) isows: 1.0.4(ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: @@ -18104,15 +19162,15 @@ snapshots: - utf-8-validate - zod - viem@2.23.2(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4): + viem@2.23.2(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76): dependencies: '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 '@scure/bip32': 1.6.2 '@scure/bip39': 1.5.4 - abitype: 1.0.8(typescript@5.9.2)(zod@3.22.4) + abitype: 1.0.8(typescript@5.9.2)(zod@3.25.76) isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - ox: 0.6.7(typescript@5.9.2)(zod@3.22.4) + ox: 0.6.7(typescript@5.9.2)(zod@3.25.76) ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.9.2 @@ -18121,15 +19179,15 @@ snapshots: - utf-8-validate - zod - viem@2.31.7(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4): + viem@2.31.7(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76): dependencies: '@noble/curves': 1.9.2 '@noble/hashes': 1.8.0 '@scure/bip32': 1.7.0 '@scure/bip39': 1.6.0 - abitype: 1.0.8(typescript@5.9.2)(zod@3.22.4) + abitype: 1.0.8(typescript@5.9.2)(zod@3.25.76) isows: 1.0.7(ws@8.18.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - ox: 0.8.1(typescript@5.9.2)(zod@3.22.4) + ox: 0.8.1(typescript@5.9.2)(zod@3.25.76) ws: 8.18.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.9.2 @@ -18155,6 +19213,23 @@ snapshots: - utf-8-validate - zod + viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76): + dependencies: + '@noble/curves': 1.9.1 + '@noble/hashes': 1.8.0 + '@scure/bip32': 1.7.0 + '@scure/bip39': 1.6.0 + abitype: 1.1.0(typescript@5.9.2)(zod@3.25.76) + isows: 1.0.7(ws@8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + ox: 0.9.6(typescript@5.9.2)(zod@3.25.76) + ws: 8.18.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + optionalDependencies: + typescript: 5.9.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@4.1.11): dependencies: '@noble/curves': 1.9.1 @@ -18286,7 +19361,7 @@ snapshots: transitivePeerDependencies: - supports-color - vitepress@1.5.0(@algolia/client-search@5.12.0)(@types/node@24.6.2)(@types/react@18.3.1)(change-case@5.4.4)(fuse.js@7.1.0)(idb-keyval@6.2.1)(postcss@8.5.6)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(terser@5.31.0)(typescript@5.9.2): + vitepress@1.5.0(@algolia/client-search@5.12.0)(@types/node@24.6.2)(@types/react@18.3.1)(axios@1.12.2)(change-case@5.4.4)(fuse.js@7.1.0)(idb-keyval@6.2.1)(postcss@8.5.6)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(terser@5.31.0)(typescript@5.9.2): dependencies: '@docsearch/css': 3.6.3 '@docsearch/js': 3.6.3(@algolia/client-search@5.12.0)(@types/react@18.3.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -18299,7 +19374,7 @@ snapshots: '@vue/devtools-api': 7.6.2 '@vue/shared': 3.5.12 '@vueuse/core': 11.2.0(vue@3.5.22(typescript@5.9.2)) - '@vueuse/integrations': 11.2.0(change-case@5.4.4)(focus-trap@7.6.0)(fuse.js@7.1.0)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.22(typescript@5.9.2)) + '@vueuse/integrations': 11.2.0(axios@1.12.2)(change-case@5.4.4)(focus-trap@7.6.0)(fuse.js@7.1.0)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.22(typescript@5.9.2)) focus-trap: 7.6.0 mark.js: 8.11.1 minisearch: 7.1.0 @@ -18672,6 +19747,8 @@ snapshots: zod@3.22.4: {} + zod@3.25.76: {} + zod@4.1.11: {} zustand@5.0.0(@types/react@18.3.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)): From 8c35b7adccb4f92c4e0e36a76b970e9126053772 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 18:17:08 -0400 Subject: [PATCH 146/213] chore: version packages (#4844) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/famous-poets-send.md | 5 ----- packages/connectors/CHANGELOG.md | 6 ++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/react/CHANGELOG.md | 7 +++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 7 +++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 10 files changed, 26 insertions(+), 11 deletions(-) delete mode 100644 .changeset/famous-poets-send.md diff --git a/.changeset/famous-poets-send.md b/.changeset/famous-poets-send.md deleted file mode 100644 index 6b0b35fb15..0000000000 --- a/.changeset/famous-poets-send.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/connectors": patch ---- - -Bumped connector deps diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 7eca0c37b8..521e9b28d1 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/connectors +## 6.1.2 + +### Patch Changes + +- Bumped connector deps ([#4843](https://github.com/wevm/wagmi/pull/4843)) + ## 6.1.1 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 841c3a16e6..e3eb416565 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "6.1.1", + "version": "6.1.2", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index 2cb30e9bbf..f95e41fb8b 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '6.1.1' +export const version = '6.1.2' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 557ccec164..d5be7a73aa 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,12 @@ # wagmi +## 2.19.1 + +### Patch Changes + +- Updated dependencies [[`faf3eed`](https://github.com/wevm/wagmi/commit/faf3eeddb97c300f971083f8ee9b02a29ad23cbb)]: + - @wagmi/connectors@6.1.2 + ## 2.19.0 ### Minor Changes diff --git a/packages/react/package.json b/packages/react/package.json index da8a161d5f..8e0d9d6f12 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.19.0", + "version": "2.19.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index 94e57887a5..46e42bcf40 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.19.0' +export const version = '2.19.1' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index 6b7c94981a..446c2adc14 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/vue +## 0.3.1 + +### Patch Changes + +- Updated dependencies [[`faf3eed`](https://github.com/wevm/wagmi/commit/faf3eeddb97c300f971083f8ee9b02a29ad23cbb)]: + - @wagmi/connectors@6.1.2 + ## 0.3.0 ### Minor Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index 8dd2a08f86..19b91e4fec 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.3.0", + "version": "0.3.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index aa9835f547..9a71e4431d 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.3.0' +export const version = '0.3.1' From 65cf1544d65bfb1fb830c405a371e8cd3c3fb73e Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Fri, 31 Oct 2025 11:23:50 -0400 Subject: [PATCH 147/213] feat(connectors): walletConnect warning --- .changeset/poor-llamas-fry.md | 5 ++ package.json | 1 + packages/connectors/src/walletConnect.ts | 47 ++++++++++ pnpm-lock.yaml | 105 +++++++++-------------- pnpm-workspace.yaml | 1 + site/shared/connectors/walletConnect.md | 42 +++++++++ 6 files changed, 138 insertions(+), 63 deletions(-) create mode 100644 .changeset/poor-llamas-fry.md diff --git a/.changeset/poor-llamas-fry.md b/.changeset/poor-llamas-fry.md new file mode 100644 index 0000000000..507a294ed8 --- /dev/null +++ b/.changeset/poor-llamas-fry.md @@ -0,0 +1,5 @@ +--- +"@wagmi/connectors": patch +--- + +Added warning to `walletConnect` about vulnerability and relicensing. diff --git a/package.json b/package.json index 608cd428c2..daa945363f 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "prool": "patches/prool.patch" }, "overrides": { + "@walletconnect/logger>pino": "10.0.0", "cookie@<0.7.0": "0.7.0", "elliptic@<=6.6.0": ">=6.6.1", "esbuild@<=0.24.2": "0.25.0", diff --git a/packages/connectors/src/walletConnect.ts b/packages/connectors/src/walletConnect.ts index 6392a199a5..d726ec4d9c 100644 --- a/packages/connectors/src/walletConnect.ts +++ b/packages/connectors/src/walletConnect.ts @@ -73,6 +73,53 @@ export type WalletConnectParameters = Compute< > walletConnect.type = 'walletConnect' as const +/** + * @deprecated **NOTE: This connector uses a vulnerable dependency downstream** (`@walletconnect/ethereum-provider@2.21.1` > `@reown/appkit@1.8.9` > `@reown/appkit-utils@1.8.9` > `@walletconnect/logger@2.1.2` > `pino@7.11.0`). You should override `pino` to a secure version via your package manager: + * + * ### npm + * ```json + * { + * "overrides": { + * "@walletconnect/logger": { + * "pino": "10.0.0" + * } + * } + * } + * ``` + * + * ### pnpm + * ```json + * { + * "pnpm": { + * "overrides": { + * "@walletconnect/logger>pino": "10.0.0" + * } + * } + * } + * ``` + * + * ### yarn + * ```json + * { + * "resolutions": { + * "@walletconnect/logger/pino": "10.0.0" + * } + * } + * ``` + * + * ### bun + * ```json + * { + * "overrides": { + * "@walletconnect/logger": { + * "pino": "10.0.0" + * } + * } + * } + * ``` + * + * Normally the Wagmi team would upgrade `@walletconnect/ethereum-provider` to a fixed version for you, but `@walletconnect/ethereum-provider` was relicensed recently from Apache to a [non-permissive license](https://github.com/reown-com/appkit/blob/main/LICENSE.md). We are trying to get the WalletConnect team to release a version that closes the vulnerability under the old Apache license. + */ export function walletConnect(parameters: WalletConnectParameters) { const isNewChainsStale = parameters.isNewChainsStale ?? true diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0d26c859c7..9b2032019d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,6 +44,7 @@ overrides: semver@<5.7.2: '>=5.7.2' serialize-javascript@>=6.0.0 <6.0.2: 6.0.2 tmp@<=0.2.3: 0.2.4 + '@walletconnect/logger>pino': 10.0.0 ws@>=8.0.0 <8.17.1: 8.17.1 patchedDependencies: @@ -5192,9 +5193,6 @@ packages: duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} - duplexify@4.1.2: - resolution: {integrity: sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==} - eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -5470,10 +5468,6 @@ packages: fast-npm-meta@0.4.7: resolution: {integrity: sha512-aZU3i3eRcSb2NCq8i6N6IlyiTyF6vqAqzBGl2NBF6ngNx/GIqfYbkLDIKZ4z4P0o/RmtsFnVqHwdrSm13o4tnQ==} - fast-redact@3.1.2: - resolution: {integrity: sha512-+0em+Iya9fKGfEQGcd62Yv6onjBmmhV1uh86XVfOU8VwAe6kaFdQCWI9s0/Nnugx5Vd9tdbZ7e6gE2tR9dzXdw==} - engines: {node: '>=6'} - fast-safe-stringify@2.1.1: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} @@ -7018,9 +7012,6 @@ packages: resolution: {integrity: sha512-n7THCP7RkyReRSLkJb8kUWoNsxUIBxTkIp3JKno+sEz6o/9AJ3w3P9fzQkITEkMwyTKJjZciF3v/pVoouxZZMg==} engines: {node: '>=18'} - on-exit-leak-free@0.2.0: - resolution: {integrity: sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==} - on-exit-leak-free@2.1.2: resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} engines: {node: '>=14.0.0'} @@ -7291,21 +7282,21 @@ packages: resolution: {integrity: sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==} engines: {node: '>=10'} - pino-abstract-transport@0.5.0: - resolution: {integrity: sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==} - pino-abstract-transport@1.1.0: resolution: {integrity: sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==} + pino-abstract-transport@2.0.0: + resolution: {integrity: sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==} + pino-pretty@10.3.1: resolution: {integrity: sha512-az8JbIYeN/1iLj2t0jR9DV48/LQ3RC6hZPpapKPkb84Q+yTidMCpgWxIT3N0flnBDilyBQ1luWNpOeJptjdp/g==} hasBin: true - pino-std-serializers@4.0.0: - resolution: {integrity: sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==} + pino-std-serializers@7.0.0: + resolution: {integrity: sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==} - pino@7.11.0: - resolution: {integrity: sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==} + pino@10.0.0: + resolution: {integrity: sha512-eI9pKwWEix40kfvSzqEP6ldqOoBIN7dwD/o91TY5z8vQI12sAffpR/pOqAD1IVVwIVHDpHjkq0joBPdJD0rafA==} hasBin: true pkg-types@1.1.1: @@ -7590,8 +7581,8 @@ packages: process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - process-warning@1.0.0: - resolution: {integrity: sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==} + process-warning@5.0.0: + resolution: {integrity: sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA==} process@0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} @@ -7727,8 +7718,8 @@ packages: resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} engines: {node: '>= 14.16.0'} - real-require@0.1.0: - resolution: {integrity: sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==} + real-require@0.2.0: + resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} engines: {node: '>= 12.13.0'} redis-errors@1.2.0: @@ -8033,6 +8024,9 @@ packages: resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} engines: {node: '>=14.16'} + slow-redact@0.3.2: + resolution: {integrity: sha512-MseHyi2+E/hBRqdOi5COy6wZ7j7DxXRz9NkseavNYSvvWC06D8a5cidVZX3tcG5eCW3NIyVU4zT63hw0Q486jw==} + smob@1.5.0: resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==} @@ -8053,12 +8047,12 @@ packages: engines: {node: '>=8.0.0'} hasBin: true - sonic-boom@2.8.0: - resolution: {integrity: sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==} - sonic-boom@3.8.0: resolution: {integrity: sha512-ybz6OYOUjoQQCQ/i4LU8kaToD8ACtYP+Cj5qd2AO36bwbdewxWJ3ArmJ2cr6AvxlL2o0PqnCcPGUgkILbfkaCA==} + sonic-boom@4.2.0: + resolution: {integrity: sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==} + source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -8122,9 +8116,6 @@ packages: stream-json@1.9.1: resolution: {integrity: sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw==} - stream-shift@1.0.1: - resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} - streamx@2.16.1: resolution: {integrity: sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==} @@ -8322,8 +8313,8 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - thread-stream@0.15.2: - resolution: {integrity: sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==} + thread-stream@3.1.0: + resolution: {integrity: sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==} tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} @@ -13659,7 +13650,7 @@ snapshots: '@walletconnect/logger@2.1.2': dependencies: '@walletconnect/safe-json': 1.0.2 - pino: 7.11.0 + pino: 10.0.0 '@walletconnect/relay-api@1.0.11': dependencies: @@ -14924,13 +14915,6 @@ snapshots: duplexer@0.1.2: {} - duplexify@4.1.2: - dependencies: - end-of-stream: 1.4.4 - inherits: 2.0.4 - readable-stream: 3.6.2 - stream-shift: 1.0.1 - eastasianwidth@0.2.0: {} easy-table@1.2.0: @@ -15340,8 +15324,6 @@ snapshots: fast-npm-meta@0.4.7: {} - fast-redact@3.1.2: {} - fast-safe-stringify@2.1.1: {} fast-stable-stringify@1.0.0: {} @@ -17263,8 +17245,6 @@ snapshots: on-change@5.0.1: {} - on-exit-leak-free@0.2.0: {} - on-exit-leak-free@2.1.2: {} on-finished@2.4.1: @@ -17592,14 +17572,13 @@ snapshots: pify@5.0.0: {} - pino-abstract-transport@0.5.0: + pino-abstract-transport@1.1.0: dependencies: - duplexify: 4.1.2 + readable-stream: 4.5.2 split2: 4.2.0 - pino-abstract-transport@1.1.0: + pino-abstract-transport@2.0.0: dependencies: - readable-stream: 4.5.2 split2: 4.2.0 pino-pretty@10.3.1: @@ -17619,21 +17598,21 @@ snapshots: sonic-boom: 3.8.0 strip-json-comments: 3.1.1 - pino-std-serializers@4.0.0: {} + pino-std-serializers@7.0.0: {} - pino@7.11.0: + pino@10.0.0: dependencies: atomic-sleep: 1.0.0 - fast-redact: 3.1.2 - on-exit-leak-free: 0.2.0 - pino-abstract-transport: 0.5.0 - pino-std-serializers: 4.0.0 - process-warning: 1.0.0 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 2.0.0 + pino-std-serializers: 7.0.0 + process-warning: 5.0.0 quick-format-unescaped: 4.0.4 - real-require: 0.1.0 + real-require: 0.2.0 safe-stable-stringify: 2.4.3 - sonic-boom: 2.8.0 - thread-stream: 0.15.2 + slow-redact: 0.3.2 + sonic-boom: 4.2.0 + thread-stream: 3.1.0 pkg-types@1.1.1: dependencies: @@ -17888,7 +17867,7 @@ snapshots: process-nextick-args@2.0.1: {} - process-warning@1.0.0: {} + process-warning@5.0.0: {} process@0.11.10: {} @@ -18034,7 +18013,7 @@ snapshots: readdirp@4.0.2: {} - real-require@0.1.0: {} + real-require@0.2.0: {} redis-errors@1.2.0: {} @@ -18404,6 +18383,8 @@ snapshots: slash@5.1.0: {} + slow-redact@0.3.2: {} + smob@1.5.0: {} smol-toml@1.4.2: {} @@ -18440,11 +18421,11 @@ snapshots: transitivePeerDependencies: - debug - sonic-boom@2.8.0: + sonic-boom@3.8.0: dependencies: atomic-sleep: 1.0.0 - sonic-boom@3.8.0: + sonic-boom@4.2.0: dependencies: atomic-sleep: 1.0.0 @@ -18494,8 +18475,6 @@ snapshots: dependencies: stream-chain: 2.2.5 - stream-shift@1.0.1: {} - streamx@2.16.1: dependencies: fast-fifo: 1.3.2 @@ -18685,9 +18664,9 @@ snapshots: dependencies: any-promise: 1.3.0 - thread-stream@0.15.2: + thread-stream@3.1.0: dependencies: - real-require: 0.1.0 + real-require: 0.2.0 tiny-invariant@1.3.3: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5bb068feae..2c7231d53b 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -5,6 +5,7 @@ auditConfig: - GHSA-ffrw-9mx8-89p8 - GHSA-qpm2-6cq5-7pq5 - GHSA-93m4-6634-74q7 + - GHSA-29xp-372q-xqph catalog: "@vitejs/plugin-react": "^4.3.3" "@tanstack/query-core": "5.49.1" diff --git a/site/shared/connectors/walletConnect.md b/site/shared/connectors/walletConnect.md index 48e7fcb950..a3db08d613 100644 --- a/site/shared/connectors/walletConnect.md +++ b/site/shared/connectors/walletConnect.md @@ -13,6 +13,48 @@ Connector for [WalletConnect](https://walletconnect.com). import { walletConnect } from '{{connectorsPackageName}}' ``` +::: warning +**This connector uses a vulnerable dependency downstream** (`@walletconnect/ethereum-provider@2.21.1` > `@reown/appkit@1.8.9` > `@reown/appkit-utils@1.8.9` > `@walletconnect/logger@2.1.2` > `pino@7.11.0`). You should override `pino` to a secure version via your package manager: + +::: code-group +```json [npm] +{ + "overrides": { + "@walletconnect/logger": { + "pino": "10.0.0" + } + } +} +``` +```json [pnpm] +{ + "pnpm": { + "overrides": { + "@walletconnect/logger>pino": "10.0.0" + } + } +} +``` +```json [yarn] +{ + "resolutions": { + "@walletconnect/logger/pino": "10.0.0" + } +} +``` +```json [bun] +{ + "overrides": { + "@walletconnect/logger": { + "pino": "10.0.0" + } + } +} +``` + +Normally the Wagmi team would upgrade `@walletconnect/ethereum-provider` to a fixed version for you, but `@walletconnect/ethereum-provider` was relicensed recently from Apache to a [non-permissive license](https://github.com/reown-com/appkit/blob/main/LICENSE.md). We are trying to get the WalletConnect team to release a version that closes the vulnerability under the old Apache license. +::: + ## Usage ```ts-vue{3,8-10} From 1f4bab94c3d78aca3f24a21497ee6cf3ce430107 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Fri, 31 Oct 2025 15:28:23 -0400 Subject: [PATCH 148/213] chore: tmp skip --- packages/core/src/actions/getEnsAvatar.test.ts | 2 +- packages/vue/src/composables/useEnsAvatar.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/actions/getEnsAvatar.test.ts b/packages/core/src/actions/getEnsAvatar.test.ts index ed1e830481..790c6a8a46 100644 --- a/packages/core/src/actions/getEnsAvatar.test.ts +++ b/packages/core/src/actions/getEnsAvatar.test.ts @@ -3,7 +3,7 @@ import { expect, test } from 'vitest' import { getEnsAvatar } from './getEnsAvatar.js' -test('default', async () => { +test.skip('default', async () => { await expect( getEnsAvatar(config, { name: 'wevm.eth', diff --git a/packages/vue/src/composables/useEnsAvatar.test.ts b/packages/vue/src/composables/useEnsAvatar.test.ts index ab024c89b5..c05ac6ae79 100644 --- a/packages/vue/src/composables/useEnsAvatar.test.ts +++ b/packages/vue/src/composables/useEnsAvatar.test.ts @@ -4,7 +4,7 @@ import { expect, test } from 'vitest' import { deepUnref } from '../utils/cloneDeep.js' import { useEnsAvatar } from './useEnsAvatar.js' -test('default', async () => { +test.skip('default', async () => { const [result] = renderComposable(() => useEnsAvatar({ name: 'wevm.eth', From b229a19958203b476d8aee4080b06511a4efce52 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:42:54 -0400 Subject: [PATCH 149/213] chore: version packages (#4847) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/poor-llamas-fry.md | 5 ----- packages/connectors/CHANGELOG.md | 6 ++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/react/CHANGELOG.md | 7 +++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 7 +++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 10 files changed, 26 insertions(+), 11 deletions(-) delete mode 100644 .changeset/poor-llamas-fry.md diff --git a/.changeset/poor-llamas-fry.md b/.changeset/poor-llamas-fry.md deleted file mode 100644 index 507a294ed8..0000000000 --- a/.changeset/poor-llamas-fry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/connectors": patch ---- - -Added warning to `walletConnect` about vulnerability and relicensing. diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 521e9b28d1..8d367976f4 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/connectors +## 6.1.3 + +### Patch Changes + +- Added warning to `walletConnect` about vulnerability and relicensing. ([`65cf154`](https://github.com/wevm/wagmi/commit/65cf1544d65bfb1fb830c405a371e8cd3c3fb73e)) + ## 6.1.2 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index e3eb416565..bcf665b1e6 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "6.1.2", + "version": "6.1.3", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index f95e41fb8b..2150f32c86 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '6.1.2' +export const version = '6.1.3' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index d5be7a73aa..7d820ee05f 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,12 @@ # wagmi +## 2.19.2 + +### Patch Changes + +- Updated dependencies [[`65cf154`](https://github.com/wevm/wagmi/commit/65cf1544d65bfb1fb830c405a371e8cd3c3fb73e)]: + - @wagmi/connectors@6.1.3 + ## 2.19.1 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 8e0d9d6f12..4feaf42d8d 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.19.1", + "version": "2.19.2", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index 46e42bcf40..37a900b108 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.19.1' +export const version = '2.19.2' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index 446c2adc14..f7f74b4989 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/vue +## 0.3.2 + +### Patch Changes + +- Updated dependencies [[`65cf154`](https://github.com/wevm/wagmi/commit/65cf1544d65bfb1fb830c405a371e8cd3c3fb73e)]: + - @wagmi/connectors@6.1.3 + ## 0.3.1 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index 19b91e4fec..360ece5aa0 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.3.1", + "version": "0.3.2", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index 9a71e4431d..c2b325a19e 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.3.1' +export const version = '0.3.2' From bf6d806f777facb9881223bfb5be267042914ec7 Mon Sep 17 00:00:00 2001 From: wnhlee <2wheeh@gmail.com> Date: Tue, 4 Nov 2025 13:22:08 +0900 Subject: [PATCH 150/213] docs: Correct useBlockNumber example in migration docs (#4853) Correct useBlockNumber example in migration docs --- site/react/guides/migrate-from-v1-to-v2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/react/guides/migrate-from-v1-to-v2.md b/site/react/guides/migrate-from-v1-to-v2.md index 04a2e45baf..350118bf11 100644 --- a/site/react/guides/migrate-from-v1-to-v2.md +++ b/site/react/guides/migrate-from-v1-to-v2.md @@ -168,7 +168,7 @@ const { data: balance, queryKey } = useBalance({ }) useEffect(() => { - if (blockNumber % 5 === 0) // [!code focus] + if (blockNumber && blockNumber % 5n === 0n) // [!code focus] queryClient.invalidateQueries({ queryKey }) // [!code focus] }, [blockNumber, queryClient]) ``` From 2ddb506b67fcb2abb464765d2af88df2eb58de60 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Mon, 10 Nov 2025 13:43:33 -0500 Subject: [PATCH 151/213] chore(connectors): bump gemini version --- .changeset/purple-dogs-cut.md | 5 +++++ packages/connectors/package.json | 2 +- pnpm-lock.yaml | 10 +++++----- pnpm-workspace.yaml | 1 + 4 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 .changeset/purple-dogs-cut.md diff --git a/.changeset/purple-dogs-cut.md b/.changeset/purple-dogs-cut.md new file mode 100644 index 0000000000..9c03289220 --- /dev/null +++ b/.changeset/purple-dogs-cut.md @@ -0,0 +1,5 @@ +--- +"@wagmi/connectors": patch +--- + +Bumped Gemini package version diff --git a/packages/connectors/package.json b/packages/connectors/package.json index bcf665b1e6..99d977acd1 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -47,7 +47,7 @@ "dependencies": { "@base-org/account": "2.4.0", "@coinbase/wallet-sdk": "4.3.6", - "@gemini-wallet/core": "0.3.1", + "@gemini-wallet/core": "0.3.2", "@metamask/sdk": "0.33.1", "@safe-global/safe-apps-provider": "0.18.6", "@safe-global/safe-apps-sdk": "9.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b2032019d..800e9d9e5c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -211,8 +211,8 @@ importers: specifier: 4.3.6 version: 4.3.6(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.25.76) '@gemini-wallet/core': - specifier: 0.3.1 - version: 0.3.1(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)) + specifier: 0.3.2 + version: 0.3.2(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76)) '@metamask/sdk': specifier: 0.33.1 version: 0.33.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) @@ -1735,8 +1735,8 @@ packages: '@floating-ui/utils@0.2.2': resolution: {integrity: sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==} - '@gemini-wallet/core@0.3.1': - resolution: {integrity: sha512-XP+/NRAaRV7Adlt6aFxrF/3a0i3qpxFTSVm/dzG+mceXTSgIGOUUT65w69ttLQ/GWEcAEQL/hKoV6PFAJA/DmQ==} + '@gemini-wallet/core@0.3.2': + resolution: {integrity: sha512-Z4aHi3ECFf5oWYWM3F1rW83GJfB9OvhBYPTmb5q+VyK3uvzvS48lwo+jwh2eOoCRWEuT/crpb9Vwp2QaS5JqgQ==} peerDependencies: viem: '>=2.0.0' @@ -10520,7 +10520,7 @@ snapshots: '@floating-ui/utils@0.2.2': {} - '@gemini-wallet/core@0.3.1(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76))': + '@gemini-wallet/core@0.3.2(viem@2.38.0(bufferutil@4.0.8)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.25.76))': dependencies: '@metamask/rpc-errors': 7.0.2 eventemitter3: 5.0.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 2c7231d53b..36e2c03f13 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -18,6 +18,7 @@ catalog: vue: "3.4.27" minimumReleaseAge: 1440 minimumReleaseAgeExclude: + - "@gemini-wallet/core" - "@wagmi/cli" - "@wagmi/connectors" - "@wagmi/core" From 588fd3849e9c768b34708647a55efb47552b1111 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 14:33:58 -0500 Subject: [PATCH 152/213] chore: version packages (#4865) --- .changeset/purple-dogs-cut.md | 5 ----- packages/connectors/CHANGELOG.md | 6 ++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/react/CHANGELOG.md | 7 +++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 7 +++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 10 files changed, 26 insertions(+), 11 deletions(-) delete mode 100644 .changeset/purple-dogs-cut.md diff --git a/.changeset/purple-dogs-cut.md b/.changeset/purple-dogs-cut.md deleted file mode 100644 index 9c03289220..0000000000 --- a/.changeset/purple-dogs-cut.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/connectors": patch ---- - -Bumped Gemini package version diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 8d367976f4..7973f2341f 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/connectors +## 6.1.4 + +### Patch Changes + +- Bumped Gemini package version ([`2ddb506`](https://github.com/wevm/wagmi/commit/2ddb506b67fcb2abb464765d2af88df2eb58de60)) + ## 6.1.3 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 99d977acd1..fa6f12b104 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "6.1.3", + "version": "6.1.4", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index 2150f32c86..80e0dd2ebb 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '6.1.3' +export const version = '6.1.4' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 7d820ee05f..3cd1fcfa8c 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,12 @@ # wagmi +## 2.19.3 + +### Patch Changes + +- Updated dependencies [[`2ddb506`](https://github.com/wevm/wagmi/commit/2ddb506b67fcb2abb464765d2af88df2eb58de60)]: + - @wagmi/connectors@6.1.4 + ## 2.19.2 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 4feaf42d8d..7133e74f71 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.19.2", + "version": "2.19.3", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index 37a900b108..db116aa9a0 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.19.2' +export const version = '2.19.3' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index f7f74b4989..d220ea2fda 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/vue +## 0.3.3 + +### Patch Changes + +- Updated dependencies [[`2ddb506`](https://github.com/wevm/wagmi/commit/2ddb506b67fcb2abb464765d2af88df2eb58de60)]: + - @wagmi/connectors@6.1.4 + ## 0.3.2 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index 360ece5aa0..8c77f97fac 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.3.2", + "version": "0.3.3", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index c2b325a19e..5c54b771bc 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.3.2' +export const version = '0.3.3' From e2a70673412a0936f7d0171ae5145a87d6006343 Mon Sep 17 00:00:00 2001 From: Ragnar Date: Tue, 11 Nov 2025 23:09:45 +0100 Subject: [PATCH 153/213] feat(docs): add useSimulateContract + useWriteContract example (#4854) * feat(docs): add useSimulateContract + useWriteContract example * chore: up --------- Co-authored-by: Tom Meagher --- site/react/api/hooks/useSimulateContract.md | 36 ++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/site/react/api/hooks/useSimulateContract.md b/site/react/api/hooks/useSimulateContract.md index 500f030a4d..09fde0abb3 100644 --- a/site/react/api/hooks/useSimulateContract.md +++ b/site/react/api/hooks/useSimulateContract.md @@ -45,7 +45,41 @@ function App() { <<< @/snippets/react/config.ts[config.ts] ::: - + +::: details Composing with `useWriteContract` + +`useSimulateContract` can be combined with [`useWriteContract`](/react/api/hooks/useWriteContract) to reduce the amount of validation required by wallets. + +::: code-group +```tsx [index.tsx] +import { useSimulateContract, useWriteContract } from 'wagmi' +import { abi } from './abi' + +function App() { + const { data } = useSimulateContract({ + abi, + address: '0x6b175474e89094c44da98b954eedeac495271d0f', + functionName: 'transferFrom', + args: [ + '0xd2135CfB216b74109775236E36d4b433F1DF507B', + '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + 123n, + ], + }) + const { writeContract } = useWriteContract() + return ( + + ) +} +``` +<<< @/snippets/abi-write.ts[abi.ts] +<<< @/snippets/react/config.ts[config.ts] +::: ## Parameters From 5a60f3d77f7b877866a50c56ba071c6ad4f81a6b Mon Sep 17 00:00:00 2001 From: wnhlee <2wheeh@gmail.com> Date: Wed, 12 Nov 2025 07:10:32 +0900 Subject: [PATCH 154/213] docs: fix typo, correct viem references for eip-5792 actions (#4859) * docs: fix typo showCalls -> sendCalls * docs: correct viem reference urls --- site/core/api/actions/getCallsStatus.md | 2 +- site/core/api/actions/getCapabilities.md | 2 +- site/core/api/actions/showCallsStatus.md | 4 ++-- site/core/api/actions/waitForCallsStatus.md | 2 +- site/react/api/hooks/useCallsStatus.md | 2 +- site/react/api/hooks/useCapabilities.md | 2 +- site/react/api/hooks/useWaitForCallsStatus.md | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/site/core/api/actions/getCallsStatus.md b/site/core/api/actions/getCallsStatus.md index dc03862b19..f6a4cc95cd 100644 --- a/site/core/api/actions/getCallsStatus.md +++ b/site/core/api/actions/getCallsStatus.md @@ -94,4 +94,4 @@ import { type GetCallsStatusErrorType } from '@wagmi/core' ## Viem -- [`getCallsStatus`](https://viem.sh/experimental/eip5792/getCallsStatus) +- [`getCallsStatus`](https://viem.sh/docs/actions/wallet/getCallsStatus) diff --git a/site/core/api/actions/getCapabilities.md b/site/core/api/actions/getCapabilities.md index 36bad2bdda..17914cd23b 100644 --- a/site/core/api/actions/getCapabilities.md +++ b/site/core/api/actions/getCapabilities.md @@ -93,4 +93,4 @@ import { type GetCapabilitiesErrorType } from '@wagmi/core' ## Viem -- [`getCapabilities`](https://viem.sh/experimental/eip5792/getCapabilities) +- [`getCapabilities`](https://viem.sh/docs/actions/wallet/getCapabilities) diff --git a/site/core/api/actions/showCallsStatus.md b/site/core/api/actions/showCallsStatus.md index c47d1fb88d..fdba382c63 100644 --- a/site/core/api/actions/showCallsStatus.md +++ b/site/core/api/actions/showCallsStatus.md @@ -6,7 +6,7 @@ const typeName = 'ShowCallsStatus' # showCallsStatus -Action to request for the wallet to show information about a call batch that was sent via `showCalls`. +Action to request for the wallet to show information about a call batch that was sent via `sendCalls`. [Read more.](https://github.com/ethereum/EIPs/blob/1663ea2e7a683285f977eda51c32cec86553f585/EIPS/eip-5792.md#wallet_showcallsstatus) @@ -96,4 +96,4 @@ import { type ShowCallsStatusErrorType } from '@wagmi/core' ## Viem -- [`showCallsStatus`](https://viem.sh/experimental/eip5792/showCallsStatus) +- [`showCallsStatus`](https://viem.sh/docs/actions/wallet/showCallsStatus) diff --git a/site/core/api/actions/waitForCallsStatus.md b/site/core/api/actions/waitForCallsStatus.md index 8261801046..74a4affee4 100644 --- a/site/core/api/actions/waitForCallsStatus.md +++ b/site/core/api/actions/waitForCallsStatus.md @@ -140,4 +140,4 @@ import { type WaitForCallsStatusErrorType } from '@wagmi/core' ## Viem -- [`waitForCallsStatus`](https://viem.sh/experimental/eip5792/waitForCallsStatus) +- [`waitForCallsStatus`](https://viem.sh/docs/actions/wallet/waitForCallsStatus) diff --git a/site/react/api/hooks/useCallsStatus.md b/site/react/api/hooks/useCallsStatus.md index 48135c53eb..9961c68fde 100644 --- a/site/react/api/hooks/useCallsStatus.md +++ b/site/react/api/hooks/useCallsStatus.md @@ -140,4 +140,4 @@ import { type UseCallsStatusReturnType } from 'wagmi' ## Action -- [`getCallsStatus`](https://viem.sh/experimental/eip5792/getCallsStatus) \ No newline at end of file +- [`getCallsStatus`](https://viem.sh/docs/actions/wallet/getCallsStatus) \ No newline at end of file diff --git a/site/react/api/hooks/useCapabilities.md b/site/react/api/hooks/useCapabilities.md index d9d6fc74a7..38a03d7891 100644 --- a/site/react/api/hooks/useCapabilities.md +++ b/site/react/api/hooks/useCapabilities.md @@ -135,4 +135,4 @@ import { type UseCapabilitiesReturnType } from 'wagmi' ## Action -- [`getCapabilities`](https://viem.sh/experimental/eip5792/getCapabilities) \ No newline at end of file +- [`getCapabilities`](https://viem.sh/docs/actions/wallet/getCapabilities) \ No newline at end of file diff --git a/site/react/api/hooks/useWaitForCallsStatus.md b/site/react/api/hooks/useWaitForCallsStatus.md index 39e520de52..9ea5d6db33 100644 --- a/site/react/api/hooks/useWaitForCallsStatus.md +++ b/site/react/api/hooks/useWaitForCallsStatus.md @@ -178,4 +178,4 @@ import { type UseWaitForCallsStatusReturnType } from 'wagmi' ## Action -- [`waitForCallsStatus`](https://viem.sh/experimental/eip5792/waitForCallsStatus) \ No newline at end of file +- [`waitForCallsStatus`](https://viem.sh/docs/actions/wallet/waitForCallsStatus) \ No newline at end of file From 86db94423c289b3a4c8d32ee88b6fc17b12c202e Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs Date: Wed, 12 Nov 2025 00:16:26 +0200 Subject: [PATCH 155/213] Adds boolean flag to react plugin to control per-function hook generation (#4866) * feat(react): add functionHooks option to control per-function hook generation * chore: release version 2.8.0 with functionHooks option for react plugin * chore: tweaks --------- Co-authored-by: Tom Meagher --- .changeset/tangy-sites-mate.md | 5 + packages/cli/src/plugins/react.test.ts | 43 +++++ packages/cli/src/plugins/react.ts | 209 ++++++++++++++----------- site/cli/api/plugins/react.md | 11 ++ 4 files changed, 173 insertions(+), 95 deletions(-) create mode 100644 .changeset/tangy-sites-mate.md diff --git a/.changeset/tangy-sites-mate.md b/.changeset/tangy-sites-mate.md new file mode 100644 index 0000000000..fec50d1073 --- /dev/null +++ b/.changeset/tangy-sites-mate.md @@ -0,0 +1,5 @@ +--- +"@wagmi/cli": minor +--- + +Added option to React plugin to disable generating hooks for each function/event in ABI. diff --git a/packages/cli/src/plugins/react.test.ts b/packages/cli/src/plugins/react.test.ts index 939a5299ae..e693e5fa20 100644 --- a/packages/cli/src/plugins/react.test.ts +++ b/packages/cli/src/plugins/react.test.ts @@ -335,3 +335,46 @@ test('legacy hook names', async () => { export const useErc20TransferEvent = /*#__PURE__*/ createUseWatchContractEvent({ abi: erc20Abi, address: erc20Address, eventName: 'Transfer' })" `) }) + +test('abi item hooks disabled', async () => { + const result = await react({ abiItemHooks: false }).run?.({ + contracts: [ + { + name: 'erc20', + abi: erc20Abi, + content: '', + meta: { + abiName: 'erc20Abi', + }, + }, + ], + isTypeScript: true, + outputs: [], + }) + + expect(result?.imports).toMatchInlineSnapshot(` + "import { createUseReadContract, createUseWriteContract, createUseSimulateContract, createUseWatchContractEvent } from 'wagmi/codegen' + " + `) + expect(result?.content).toMatchInlineSnapshot(` + "/** + * Wraps __{@link useReadContract}__ with \`abi\` set to __{@link erc20Abi}__ + */ + export const useReadErc20 = /*#__PURE__*/ createUseReadContract({ abi: erc20Abi }) + + /** + * Wraps __{@link useWriteContract}__ with \`abi\` set to __{@link erc20Abi}__ + */ + export const useWriteErc20 = /*#__PURE__*/ createUseWriteContract({ abi: erc20Abi }) + + /** + * Wraps __{@link useSimulateContract}__ with \`abi\` set to __{@link erc20Abi}__ + */ + export const useSimulateErc20 = /*#__PURE__*/ createUseSimulateContract({ abi: erc20Abi }) + + /** + * Wraps __{@link useWatchContractEvent}__ with \`abi\` set to __{@link erc20Abi}__ + */ + export const useWatchErc20Event = /*#__PURE__*/ createUseWatchContractEvent({ abi: erc20Abi })" + `) +}) diff --git a/packages/cli/src/plugins/react.ts b/packages/cli/src/plugins/react.ts index b76ea006a5..54f4126690 100644 --- a/packages/cli/src/plugins/react.ts +++ b/packages/cli/src/plugins/react.ts @@ -5,6 +5,7 @@ import type { Compute, RequiredBy } from '../types.js' import { getAddressDocString } from '../utils/getAddressDocString.js' export type ReactConfig = { + abiItemHooks?: boolean | undefined getHookName?: | 'legacy' // TODO: Deprecate `'legacy'` option | ((options: { @@ -25,6 +26,8 @@ export function react(config: ReactConfig = {}): ReactResult { const pure = '/*#__PURE__*/' const hookNames = new Set() + const isAbiItemHooksEnabled = config.abiItemHooks ?? true + for (const contract of contracts) { let hasReadFunction = false let hasWriteFunction = false @@ -65,34 +68,36 @@ export function react(config: ReactConfig = {}): ReactResult { export const ${hookName} = ${pure} ${functionName}({ ${innerContent} })`, ) - const names = new Set() - for (const item of readItems) { - if (item.type !== 'function') continue - if ( - item.stateMutability !== 'pure' && - item.stateMutability !== 'view' - ) - continue + if (isAbiItemHooksEnabled) { + const names = new Set() + for (const item of readItems) { + if (item.type !== 'function') continue + if ( + item.stateMutability !== 'pure' && + item.stateMutability !== 'view' + ) + continue - // Skip overrides since they are captured by same hook - if (names.has(item.name)) continue - names.add(item.name) + // Skip overrides since they are captured by same hook + if (names.has(item.name)) continue + names.add(item.name) - const hookName = getHookName( - config, - hookNames, - 'read', - contract.name, - item.name, - ) - const docString = genDocString('useReadContract', contract, { - name: 'functionName', - value: item.name, - }) - content.push( - `${docString} + const hookName = getHookName( + config, + hookNames, + 'read', + contract.name, + item.name, + ) + const docString = genDocString('useReadContract', contract, { + name: 'functionName', + value: item.name, + }) + content.push( + `${docString} export const ${hookName} = ${pure} ${functionName}({ ${innerContent}, functionName: '${item.name}' })`, - ) + ) + } } } @@ -112,34 +117,36 @@ export const ${hookName} = ${pure} ${functionName}({ ${innerContent}, functionNa export const ${hookName} = ${pure} ${functionName}({ ${innerContent} })`, ) - const names = new Set() - for (const item of writeItems) { - if (item.type !== 'function') continue - if ( - item.stateMutability !== 'nonpayable' && - item.stateMutability !== 'payable' - ) - continue + if (isAbiItemHooksEnabled) { + const names = new Set() + for (const item of writeItems) { + if (item.type !== 'function') continue + if ( + item.stateMutability !== 'nonpayable' && + item.stateMutability !== 'payable' + ) + continue - // Skip overrides since they are captured by same hook - if (names.has(item.name)) continue - names.add(item.name) + // Skip overrides since they are captured by same hook + if (names.has(item.name)) continue + names.add(item.name) - const hookName = getHookName( - config, - hookNames, - 'write', - contract.name, - item.name, - ) - const docString = genDocString('useWriteContract', contract, { - name: 'functionName', - value: item.name, - }) - content.push( - `${docString} + const hookName = getHookName( + config, + hookNames, + 'write', + contract.name, + item.name, + ) + const docString = genDocString('useWriteContract', contract, { + name: 'functionName', + value: item.name, + }) + content.push( + `${docString} export const ${hookName} = ${pure} ${functionName}({ ${innerContent}, functionName: '${item.name}' })`, - ) + ) + } } } @@ -158,34 +165,40 @@ export const ${hookName} = ${pure} ${functionName}({ ${innerContent}, functionNa export const ${hookName} = ${pure} ${functionName}({ ${innerContent} })`, ) - const names = new Set() - for (const item of writeItems) { - if (item.type !== 'function') continue - if ( - item.stateMutability !== 'nonpayable' && - item.stateMutability !== 'payable' - ) - continue + if (isAbiItemHooksEnabled) { + const names = new Set() + for (const item of writeItems) { + if (item.type !== 'function') continue + if ( + item.stateMutability !== 'nonpayable' && + item.stateMutability !== 'payable' + ) + continue - // Skip overrides since they are captured by same hook - if (names.has(item.name)) continue - names.add(item.name) + // Skip overrides since they are captured by same hook + if (names.has(item.name)) continue + names.add(item.name) - const hookName = getHookName( - config, - hookNames, - 'simulate', - contract.name, - item.name, - ) - const docString = genDocString('useSimulateContract', contract, { - name: 'functionName', - value: item.name, - }) - content.push( - `${docString} + const hookName = getHookName( + config, + hookNames, + 'simulate', + contract.name, + item.name, + ) + const docString = genDocString( + 'useSimulateContract', + contract, + { + name: 'functionName', + value: item.name, + }, + ) + content.push( + `${docString} export const ${hookName} = ${pure} ${functionName}({ ${innerContent}, functionName: '${item.name}' })`, - ) + ) + } } } } @@ -205,29 +218,35 @@ export const ${hookName} = ${pure} ${functionName}({ ${innerContent}, functionNa export const ${hookName} = ${pure} ${functionName}({ ${innerContent} })`, ) - const names = new Set() - for (const item of eventItems) { - if (item.type !== 'event') continue + if (isAbiItemHooksEnabled) { + const names = new Set() + for (const item of eventItems) { + if (item.type !== 'event') continue - // Skip overrides since they are captured by same hook - if (names.has(item.name)) continue - names.add(item.name) + // Skip overrides since they are captured by same hook + if (names.has(item.name)) continue + names.add(item.name) - const hookName = getHookName( - config, - hookNames, - 'watch', - contract.name, - item.name, - ) - const docString = genDocString('useWatchContractEvent', contract, { - name: 'eventName', - value: item.name, - }) - content.push( - `${docString} + const hookName = getHookName( + config, + hookNames, + 'watch', + contract.name, + item.name, + ) + const docString = genDocString( + 'useWatchContractEvent', + contract, + { + name: 'eventName', + value: item.name, + }, + ) + content.push( + `${docString} export const ${hookName} = ${pure} ${functionName}({ ${innerContent}, eventName: '${item.name}' })`, - ) + ) + } } } } diff --git a/site/cli/api/plugins/react.md b/site/cli/api/plugins/react.md index e78f782c6d..c8a0de4b27 100644 --- a/site/cli/api/plugins/react.md +++ b/site/cli/api/plugins/react.md @@ -27,6 +27,17 @@ export default defineConfig({ import { type ReactConfig } from '@wagmi/cli/plugins' ``` +### abiItemHooks + +- Boolean flag to generate abi item hooks (e.g. hooks for each abi function and events). +- Defaults to `true`. + +```ts +plugins: [ + react({ abiItemHooks: false }), // [!code focus] +], +``` + ### getHookName `` 'legacy' | ((options: { contractName: string; type: 'read' | 'simulate' | 'watch' | 'write' }) => `use${string}`) `` From 8f049aa0b91d86b3e9ea587c7ba3273322aa33fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 17:29:36 -0500 Subject: [PATCH 156/213] chore: version packages (#4868) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/tangy-sites-mate.md | 5 ----- packages/cli/CHANGELOG.md | 6 ++++++ packages/cli/package.json | 2 +- packages/cli/src/version.ts | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 .changeset/tangy-sites-mate.md diff --git a/.changeset/tangy-sites-mate.md b/.changeset/tangy-sites-mate.md deleted file mode 100644 index fec50d1073..0000000000 --- a/.changeset/tangy-sites-mate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/cli": minor ---- - -Added option to React plugin to disable generating hooks for each function/event in ABI. diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 9a49443e29..dc0bb61ddd 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/cli +## 2.8.0 + +### Minor Changes + +- Added option to React plugin to disable generating hooks for each function/event in ABI. ([#4866](https://github.com/wevm/wagmi/pull/4866)) + ## 2.7.1 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index fa12eea4f9..93a91b021d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/cli", "description": "Manage and generate code from Ethereum ABIs", - "version": "2.7.1", + "version": "2.8.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/cli/src/version.ts b/packages/cli/src/version.ts index dc6e1de765..1b52c57d4e 100644 --- a/packages/cli/src/version.ts +++ b/packages/cli/src/version.ts @@ -1 +1 @@ -export const version = '2.7.1' +export const version = '2.8.0' From 794fcebc8c5348993bef863d99581aaa18328330 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Thu, 13 Nov 2025 12:00:15 -0500 Subject: [PATCH 157/213] docs: broken links --- site/core/api/actions/getBalance.md | 2 +- site/core/api/actions/multicall.md | 2 +- site/shared/transports/webSocket.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/site/core/api/actions/getBalance.md b/site/core/api/actions/getBalance.md index 53ceafe454..4025cca797 100644 --- a/site/core/api/actions/getBalance.md +++ b/site/core/api/actions/getBalance.md @@ -194,4 +194,4 @@ import { type GetBalanceErrorType } from '@wagmi/core' ## Viem - [`getBalance`](https://viem.sh/docs/actions/public/getBalance) for native currency balances -- [`multicall`](https://viem.sh/docs/actions/public/multicall) for token balances +- [`multicall`](https://viem.sh/docs/contract/multicall) for token balances diff --git a/site/core/api/actions/multicall.md b/site/core/api/actions/multicall.md index 2f03f13bde..6d8a6baa08 100644 --- a/site/core/api/actions/multicall.md +++ b/site/core/api/actions/multicall.md @@ -352,4 +352,4 @@ import { type MulticallErrorType } from '@wagmi/core' ## Viem -- [`multicall`](https://viem.sh/docs/actions/public/multicall) +- [`multicall`](https://viem.sh/docs/contract/multicall) diff --git a/site/shared/transports/webSocket.md b/site/shared/transports/webSocket.md index fcc744a0cb..fd4bf49274 100644 --- a/site/shared/transports/webSocket.md +++ b/site/shared/transports/webSocket.md @@ -4,7 +4,7 @@ const packageName = 'wagmi' # webSocket -The `webSocket` Transport connects to a JSON-RPC API via a WebSocket. Wraps Viem's [`webSocket` Transport](https://viem.sh/docs/clients/transports/webSocket). +The `webSocket` Transport connects to a JSON-RPC API via a WebSocket. Wraps Viem's [`webSocket` Transport](https://viem.sh/docs/clients/transports/websocket). ## Import From 76a43dd37617decdd3173d0fc4c56af23e315a8d Mon Sep 17 00:00:00 2001 From: tmm Date: Thu, 13 Nov 2025 12:30:02 -0500 Subject: [PATCH 158/213] refactor: update `chainId` computation for `useReadContracts` to reduce unnecessary query invalidations (#4872) * fix: compute proper chainId value on useReadConstracts to avoid unnecessary queryKey mutations Derives a unified chainId from contracts when all share the same value, otherwise falls back to the default (chainId from useChainId). This fixes 'queryKey' mutation when connecting or changing network despite all contracts sharing the same chainId, avoid unnecessary mutations and equating to the default behaviour on useReadContract. * refactor: clean up logic --------- Co-authored-by: agsola --- .changeset/sixty-mugs-serve.md | 5 + .../react/src/hooks/useReadContracts.test.ts | 116 +++++++++++++++++- packages/react/src/hooks/useReadContracts.ts | 13 +- 3 files changed, 129 insertions(+), 5 deletions(-) create mode 100755 .changeset/sixty-mugs-serve.md diff --git a/.changeset/sixty-mugs-serve.md b/.changeset/sixty-mugs-serve.md new file mode 100755 index 0000000000..8f1484aa37 --- /dev/null +++ b/.changeset/sixty-mugs-serve.md @@ -0,0 +1,5 @@ +--- +"wagmi": patch +--- + +Optimized internal `chainId` computation for `useReadContracts` to reduce unnecessary query invalidations. diff --git a/packages/react/src/hooks/useReadContracts.test.ts b/packages/react/src/hooks/useReadContracts.test.ts index 0ac423da65..dfc000f8ad 100644 --- a/packages/react/src/hooks/useReadContracts.test.ts +++ b/packages/react/src/hooks/useReadContracts.test.ts @@ -1,7 +1,7 @@ -import { abi, address, chain } from '@wagmi/test' +import { switchChain } from '@wagmi/core' +import { abi, address, chain, config } from '@wagmi/test' import { renderHook } from '@wagmi/test/react' import { expect, test, vi } from 'vitest' - import { useReadContracts } from './useReadContracts.js' test('default', async () => { @@ -85,7 +85,7 @@ test('default', async () => { `) }) -test.skip('multichain', async () => { +test('multichain', async () => { const { mainnet, mainnet2, optimism } = chain const { result } = await renderHook(() => useReadContracts({ @@ -141,7 +141,7 @@ test.skip('multichain', async () => { }), ) - await vi.waitUntil(() => result.current.isSuccess, { timeout: 5_000 }) + await vi.waitUntil(() => result.current.isSuccess, { timeout: 10_000 }) expect(result.current).toMatchInlineSnapshot(` { @@ -260,3 +260,111 @@ test.skip('multichain', async () => { } `) }) + +test('behavior: all same chainId', async () => { + const { mainnet, mainnet2 } = chain + await switchChain(config, { chainId: mainnet2.id }) + const { result } = await renderHook(() => + useReadContracts({ + contracts: [ + { + abi: abi.wagmigotchi, + address: address.wagmigotchi, + chainId: mainnet.id, + functionName: 'love', + args: ['0x27a69ffba1e939ddcfecc8c7e0f967b872bac65c'], + }, + { + abi: abi.wagmigotchi, + address: address.wagmigotchi, + chainId: mainnet.id, + functionName: 'love', + args: ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'], + }, + { + abi: abi.wagmigotchi, + address: address.wagmigotchi, + chainId: mainnet.id, + functionName: 'love', + args: ['0xd2135CfB216b74109775236E36d4b433F1DF507B'], + }, + ], + }), + ) + + await vi.waitUntil(() => result.current.isSuccess, { timeout: 10_000 }) + + expect(result.current).toMatchInlineSnapshot(` + { + "data": [ + { + "result": 2n, + "status": "success", + }, + { + "result": 1n, + "status": "success", + }, + { + "result": 0n, + "status": "success", + }, + ], + "dataUpdatedAt": 1675209600000, + "error": null, + "errorUpdateCount": 0, + "errorUpdatedAt": 0, + "failureCount": 0, + "failureReason": null, + "fetchStatus": "idle", + "isError": false, + "isFetched": true, + "isFetchedAfterMount": true, + "isFetching": false, + "isInitialLoading": false, + "isLoading": false, + "isLoadingError": false, + "isPaused": false, + "isPending": false, + "isPlaceholderData": false, + "isRefetchError": false, + "isRefetching": false, + "isStale": true, + "isSuccess": true, + "queryKey": [ + "readContracts", + { + "chainId": 1, + "contracts": [ + { + "address": "0xecb504d39723b0be0e3a9aa33d646642d1051ee1", + "args": [ + "0x27a69ffba1e939ddcfecc8c7e0f967b872bac65c", + ], + "chainId": 1, + "functionName": "love", + }, + { + "address": "0xecb504d39723b0be0e3a9aa33d646642d1051ee1", + "args": [ + "0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC", + ], + "chainId": 1, + "functionName": "love", + }, + { + "address": "0xecb504d39723b0be0e3a9aa33d646642d1051ee1", + "args": [ + "0xd2135CfB216b74109775236E36d4b433F1DF507B", + ], + "chainId": 1, + "functionName": "love", + }, + ], + }, + ], + "refetch": [Function], + "status": "success", + } + `) +}) diff --git a/packages/react/src/hooks/useReadContracts.ts b/packages/react/src/hooks/useReadContracts.ts index 7be786c4a8..8db644aaab 100644 --- a/packages/react/src/hooks/useReadContracts.ts +++ b/packages/react/src/hooks/useReadContracts.ts @@ -62,10 +62,21 @@ export function useReadContracts< const config = useConfig(parameters) const chainId = useChainId({ config }) + const contractsChainId = useMemo(() => { + if (contracts.length === 0) return undefined + const firstChainId = (contracts[0] as { chainId?: number }).chainId + if ( + (contracts as { chainId?: number }[]).every( + (contract) => contract.chainId === firstChainId, + ) + ) + return firstChainId + return undefined + }, [contracts]) const options = readContractsQueryOptions( config, - { ...parameters, chainId }, + { ...parameters, chainId: contractsChainId ?? chainId }, ) const enabled = useMemo(() => { From 4d48aa5f0fd826e46230d0dd80812620e0a2d6e7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 13 Nov 2025 12:39:58 -0500 Subject: [PATCH 159/213] chore: version packages (#4873) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/sixty-mugs-serve.md | 5 ----- packages/react/CHANGELOG.md | 6 ++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) delete mode 100755 .changeset/sixty-mugs-serve.md diff --git a/.changeset/sixty-mugs-serve.md b/.changeset/sixty-mugs-serve.md deleted file mode 100755 index 8f1484aa37..0000000000 --- a/.changeset/sixty-mugs-serve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wagmi": patch ---- - -Optimized internal `chainId` computation for `useReadContracts` to reduce unnecessary query invalidations. diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 3cd1fcfa8c..547530bd95 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,11 @@ # wagmi +## 2.19.4 + +### Patch Changes + +- Optimized internal `chainId` computation for `useReadContracts` to reduce unnecessary query invalidations. ([#4872](https://github.com/wevm/wagmi/pull/4872)) + ## 2.19.3 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 7133e74f71..4e6eb93d36 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.19.3", + "version": "2.19.4", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index db116aa9a0..77a1f4b481 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.19.3' +export const version = '2.19.4' From fe526cc07cb70ea066907558018bc9140f9acda8 Mon Sep 17 00:00:00 2001 From: Manuel Rivera Date: Thu, 13 Nov 2025 19:24:47 -0600 Subject: [PATCH 160/213] chore: typo (#4874) --- site/react/guides/viem.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/react/guides/viem.md b/site/react/guides/viem.md index 06e802f472..24391eced4 100644 --- a/site/react/guides/viem.md +++ b/site/react/guides/viem.md @@ -145,6 +145,6 @@ function Example() { ::: info -Wagmi currently does not support hoisting Private Key & Mnemonic Accounts to the top-level Wagmi Config – meaning you have to explicitly pass through the account to every Action. If you feel like this is a feature that should be added, please [open an discussion](https://github.com/wevm/wagmi/discussions/new?category=ideas). +Wagmi currently does not support hoisting Private Key & Mnemonic Accounts to the top-level Wagmi Config – meaning you have to explicitly pass through the account to every Action. If you feel like this is a feature that should be added, please [open a discussion](https://github.com/wevm/wagmi/discussions/new?category=ideas). ::: From 5388de593847b23368c42646c27ee5438260062d Mon Sep 17 00:00:00 2001 From: Stephan Cilliers Date: Wed, 19 Nov 2025 13:42:14 -0500 Subject: [PATCH 161/213] feat: support withCapabilities in base account connector (#4877) * feat: wallet_connect capabilities support in baseAccount connector * chore: tweaks --------- Co-authored-by: Tom Meagher --- .changeset/smooth-rockets-flow.md | 5 ++ packages/connectors/src/baseAccount.ts | 86 ++++++++++++++++++++++---- playgrounds/vite-react/src/App.tsx | 7 ++- 3 files changed, 84 insertions(+), 14 deletions(-) create mode 100644 .changeset/smooth-rockets-flow.md diff --git a/.changeset/smooth-rockets-flow.md b/.changeset/smooth-rockets-flow.md new file mode 100644 index 0000000000..ad1370897b --- /dev/null +++ b/.changeset/smooth-rockets-flow.md @@ -0,0 +1,5 @@ +--- +"@wagmi/connectors": minor +--- + +Added support for `'wallet_connect'` capabilities to `baseAccount` connector diff --git a/packages/connectors/src/baseAccount.ts b/packages/connectors/src/baseAccount.ts index 04cc5ec408..23b4cbe467 100644 --- a/packages/connectors/src/baseAccount.ts +++ b/packages/connectors/src/baseAccount.ts @@ -7,6 +7,7 @@ import { import type { Mutable, Omit } from '@wagmi/core/internal' import { type AddEthereumChainParameter, + type Address, getAddress, type Hex, numberToHex, @@ -24,6 +25,43 @@ export type BaseAccountParameters = Mutable< export function baseAccount(parameters: BaseAccountParameters = {}) { type Provider = ProviderInterface + type Properties = { + connect(parameters?: { + chainId?: number | undefined + capabilities?: + | { + signInWithEthereum?: { + chainId?: string | undefined + domain?: string | undefined + expirationTime?: string | undefined + issuedAt?: string | undefined + nonce: string + notBefore?: string | undefined + requestId?: string | undefined + resources?: string[] | undefined + scheme?: string | undefined + statement?: string | undefined + uri?: string | undefined + version?: string | undefined + } + [capability: string]: any + } + | undefined + withCapabilities?: withCapabilities | boolean | undefined + }): Promise<{ + accounts: withCapabilities extends true + ? readonly { + address: Address + capabilities: WalletConnectResponseCapabilities + }[] + : readonly Address[] + chainId: number + }> + } + type WalletConnectResponseCapabilities = { + signInWithEthereum?: { message: string; signature: Hex } | undefined + [capability: string]: any + } let walletProvider: Provider | undefined @@ -31,20 +69,47 @@ export function baseAccount(parameters: BaseAccountParameters = {}) { let chainChanged: Connector['onChainChanged'] | undefined let disconnect: Connector['onDisconnect'] | undefined - return createConnector((config) => ({ + return createConnector((config) => ({ id: 'baseAccount', name: 'Base Account', rdns: 'app.base.account', type: 'baseAccount', - async connect({ chainId, withCapabilities } = {}) { + async connect({ chainId, withCapabilities, ...rest } = {}) { try { const provider = await this.getProvider() - const accounts = ( - (await provider.request({ - method: 'eth_requestAccounts', - params: [], - })) as string[] - ).map((x) => getAddress(x)) + + const targetChainId = chainId ?? config.chains[0]?.id + if (!targetChainId) throw new ChainNotConfiguredError() + + const response = (await provider.request({ + method: 'wallet_connect', + params: [ + { + capabilities: + 'capabilities' in rest && rest.capabilities + ? rest.capabilities + : {}, + chainIds: [ + numberToHex(targetChainId), + ...config.chains + .filter((x) => x.id !== targetChainId) + .map((x) => numberToHex(x.id)), + ], + }, + ], + })) as { + accounts: { + address: Address + capabilities?: WalletConnectResponseCapabilities | undefined + }[] + chainIds: Hex[] + } + + const accounts = response.accounts.map((account) => ({ + address: getAddress(account.address), + capabilities: account.capabilities ?? {}, + })) + let currentChainId = Number(response.chainIds[0]) if (!accountsChanged) { accountsChanged = this.onAccountsChanged.bind(this) @@ -60,7 +125,6 @@ export function baseAccount(parameters: BaseAccountParameters = {}) { } // Switch to chain if provided - let currentChainId = await this.getChainId() if (chainId && currentChainId !== chainId) { const chain = await this.switchChain!({ chainId }).catch((error) => { if (error.code === UserRejectedRequestError.code) throw error @@ -72,8 +136,8 @@ export function baseAccount(parameters: BaseAccountParameters = {}) { return { // TODO(v3): Make `withCapabilities: true` default behavior accounts: (withCapabilities - ? accounts.map((address) => ({ address, capabilities: {} })) - : accounts) as never, + ? accounts + : accounts.map((account) => account.address)) as never, chainId: currentChainId, } } catch (error) { diff --git a/playgrounds/vite-react/src/App.tsx b/playgrounds/vite-react/src/App.tsx index e70d1fc356..9cd3ff1d37 100644 --- a/playgrounds/vite-react/src/App.tsx +++ b/playgrounds/vite-react/src/App.tsx @@ -1,5 +1,5 @@ import type { FormEvent } from 'react' -import { formatEther, type Hex, parseAbi, parseEther } from 'viem' +import { formatEther, type Hex, parseAbi, parseEther, stringify } from 'viem' import { type BaseError, useAccount, @@ -84,7 +84,7 @@ function Account() { function Connect() { const chainId = useChainId() - const { connectors, connectAsync, status, error } = useConnect() + const { connectors, connectAsync, status, error, data } = useConnect() return (
@@ -109,6 +109,7 @@ function Connect() { ))}
{status}
{error?.message}
+
{stringify(data, null, 2)}
) } @@ -192,7 +193,7 @@ function Connections() { {connections.map((connection) => (
connector {connection.connector.name}
-
accounts: {JSON.stringify(connection.accounts)}
+
accounts: {stringify(connection.accounts)}
chainId: {connection.chainId}
))} From f585eeddfd710eed857a1d55a024b0b444cd8352 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Wed, 19 Nov 2025 13:44:19 -0500 Subject: [PATCH 162/213] chore: audit --- pnpm-workspace.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 36e2c03f13..4c16a35329 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,11 +1,13 @@ auditConfig: ignoreGhsas: - - GHSA-g3ch-rx76-35fx - - GHSA-vjh7-7g9h-fjfh + - GHSA-29xp-372q-xqph + - GHSA-5j98-mcp5-4vw2 + - GHSA-93m4-6634-74q7 - GHSA-ffrw-9mx8-89p8 + - GHSA-g3ch-rx76-35fx + - GHSA-mh29-5h37-fv8m - GHSA-qpm2-6cq5-7pq5 - - GHSA-93m4-6634-74q7 - - GHSA-29xp-372q-xqph + - GHSA-vjh7-7g9h-fjfh catalog: "@vitejs/plugin-react": "^4.3.3" "@tanstack/query-core": "5.49.1" From 32db494ccc9c260aac7c57335302a9093faaa751 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 13:49:45 -0500 Subject: [PATCH 163/213] chore: version packages (#4880) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/smooth-rockets-flow.md | 5 ----- packages/connectors/CHANGELOG.md | 6 ++++++ packages/connectors/package.json | 2 +- packages/connectors/src/version.ts | 2 +- packages/react/CHANGELOG.md | 7 +++++++ packages/react/package.json | 2 +- packages/react/src/version.ts | 2 +- packages/vue/CHANGELOG.md | 7 +++++++ packages/vue/package.json | 2 +- packages/vue/src/version.ts | 2 +- 10 files changed, 26 insertions(+), 11 deletions(-) delete mode 100644 .changeset/smooth-rockets-flow.md diff --git a/.changeset/smooth-rockets-flow.md b/.changeset/smooth-rockets-flow.md deleted file mode 100644 index ad1370897b..0000000000 --- a/.changeset/smooth-rockets-flow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wagmi/connectors": minor ---- - -Added support for `'wallet_connect'` capabilities to `baseAccount` connector diff --git a/packages/connectors/CHANGELOG.md b/packages/connectors/CHANGELOG.md index 7973f2341f..6f910fb752 100644 --- a/packages/connectors/CHANGELOG.md +++ b/packages/connectors/CHANGELOG.md @@ -1,5 +1,11 @@ # @wagmi/connectors +## 6.2.0 + +### Minor Changes + +- Added support for `'wallet_connect'` capabilities to `baseAccount` connector ([#4877](https://github.com/wevm/wagmi/pull/4877)) + ## 6.1.4 ### Patch Changes diff --git a/packages/connectors/package.json b/packages/connectors/package.json index fa6f12b104..5cfbb03b9a 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/connectors", "description": "Collection of connectors for Wagmi", - "version": "6.1.4", + "version": "6.2.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/connectors/src/version.ts b/packages/connectors/src/version.ts index 80e0dd2ebb..0fde124f03 100644 --- a/packages/connectors/src/version.ts +++ b/packages/connectors/src/version.ts @@ -1 +1 @@ -export const version = '6.1.4' +export const version = '6.2.0' diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 547530bd95..ef19631eae 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,12 @@ # wagmi +## 2.19.5 + +### Patch Changes + +- Updated dependencies [[`5388de5`](https://github.com/wevm/wagmi/commit/5388de593847b23368c42646c27ee5438260062d)]: + - @wagmi/connectors@6.2.0 + ## 2.19.4 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 4e6eb93d36..888dcabdb9 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "wagmi", "description": "React Hooks for Ethereum", - "version": "2.19.4", + "version": "2.19.5", "license": "MIT", "repository": { "type": "git", diff --git a/packages/react/src/version.ts b/packages/react/src/version.ts index 77a1f4b481..25d9a6f49b 100644 --- a/packages/react/src/version.ts +++ b/packages/react/src/version.ts @@ -1 +1 @@ -export const version = '2.19.4' +export const version = '2.19.5' diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index d220ea2fda..6cc2f214c7 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -1,5 +1,12 @@ # @wagmi/vue +## 0.3.4 + +### Patch Changes + +- Updated dependencies [[`5388de5`](https://github.com/wevm/wagmi/commit/5388de593847b23368c42646c27ee5438260062d)]: + - @wagmi/connectors@6.2.0 + ## 0.3.3 ### Patch Changes diff --git a/packages/vue/package.json b/packages/vue/package.json index 8c77f97fac..5ad472f909 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@wagmi/vue", "description": "Vue Composables for Ethereum", - "version": "0.3.3", + "version": "0.3.4", "license": "MIT", "repository": { "type": "git", diff --git a/packages/vue/src/version.ts b/packages/vue/src/version.ts index 5c54b771bc..f44e6fc951 100644 --- a/packages/vue/src/version.ts +++ b/packages/vue/src/version.ts @@ -1 +1 @@ -export const version = '0.3.3' +export const version = '0.3.4' From 73e7326ac21303d7790765c78a7076b319b2ad26 Mon Sep 17 00:00:00 2001 From: tmm Date: Wed, 19 Nov 2025 14:13:08 -0500 Subject: [PATCH 164/213] v3 - refactor(connectors)!: move to peer dependencies (#4857) * refactor(connectors)!: move to peer dependencies * docs(wip): migration guides * docs: fix build * chore: up * chore: tweaks * docs: migration guide * chore: changesets * chore: up create templates * chore(v3): remove v2 deprecations (#4858) * chore: remove v2 deprecations * chore: up * docs: fix dead links * docs: up migration guide * refactor: rename account -> connection * docs: up sidebar * refactor: v3 deprecations * docs: up * docs: fix dead links * chore: pnpm trustPolicyExclude * chore: catalogify * ci: up * chore: bump vitest * chore: test against react@19 * test: up timeout * test: react plugin fallback * chore: fix audit * chore: bump test timeout * chore: audit * chore: up ts version * chore: tweaks * test: up * ci: add pkg.pr.new * docs: up * docs: up * chore: tweaks * docs: up * chore: bump unocss * docs: up --- .changeset/content-vipers-sleep.md | 63 + .changeset/exuberant-meerkats-rejoice.md | 62 + .changeset/foolish-cats-cackle.md | 62 + .github/workflows/changesets.yml | 2 +- .github/workflows/pull-request.yml | 25 + .github/workflows/verify.yml | 4 +- .gitignore | 2 + .npmrc | 4 - package.json | 55 +- packages/cli/package.json | 4 +- .../__fixtures__/hardhat/hardhat.config.js | 6 +- .../plugins/__fixtures__/hardhat/package.json | 3 +- packages/cli/src/plugins/react.ts | 27 +- packages/connectors/package.json | 55 +- .../connectors/src/coinbaseWallet.test.ts | 2 +- packages/connectors/src/coinbaseWallet.ts | 330 +- packages/connectors/src/gemini.ts | 2 +- packages/connectors/src/metaMask.ts | 17 +- packages/connectors/src/porto.ts | 5 +- packages/connectors/src/walletConnect.ts | 47 - packages/core/package.json | 12 +- .../actions/codegen/createWriteContract.ts | 5 +- .../src/actions/estimateFeesPerGas.test-d.ts | 15 - .../src/actions/estimateFeesPerGas.test.ts | 1 - .../core/src/actions/estimateFeesPerGas.ts | 37 +- packages/core/src/actions/getBalance.test.ts | 76 +- packages/core/src/actions/getBalance.ts | 111 +- packages/core/src/actions/getChains.test-d.ts | 2 - packages/core/src/actions/getChains.ts | 6 +- ...ount.test-d.ts => getConnection.test-d.ts} | 4 +- ...tAccount.test.ts => getConnection.test.ts} | 10 +- .../{getAccount.ts => getConnection.ts} | 10 +- packages/core/src/actions/getToken.test.ts | 84 - packages/core/src/actions/getToken.ts | 141 - .../src/actions/prepareTransactionRequest.ts | 4 +- .../core/src/actions/readContracts.test.ts | 108 +- packages/core/src/actions/signMessage.test.ts | 4 +- .../core/src/actions/signTypedData.test.ts | 4 +- packages/core/src/actions/switchChain.test.ts | 8 +- ...count.test.ts => switchConnection.test.ts} | 14 +- .../{switchAccount.ts => switchConnection.ts} | 14 +- packages/core/src/actions/watchAccount.ts | 33 - ...ccount.test.ts => watchConnection.test.ts} | 10 +- packages/core/src/actions/watchConnection.ts | 33 + .../src/actions/watchContractEvent.test.ts | 14 +- packages/core/src/actions/writeContract.ts | 5 +- .../core/src/connectors/createConnector.ts | 2 - packages/core/src/connectors/injected.ts | 4 - .../actions/writeContracts.test.ts | 99 - .../experimental/actions/writeContracts.ts | 79 - .../src/experimental/query/writeContracts.ts | 70 - packages/core/src/exports/actions.test.ts | 20 +- packages/core/src/exports/actions.ts | 92 +- packages/core/src/exports/experimental.ts | 153 - packages/core/src/exports/index.test.ts | 21 +- packages/core/src/exports/index.ts | 96 +- packages/core/src/exports/query.test.ts | 5 +- packages/core/src/exports/query.ts | 46 +- packages/core/src/query/getBalance.test.ts | 26 - packages/core/src/query/getToken.test.ts | 32 - packages/core/src/query/getToken.ts | 49 - packages/core/src/query/switchAccount.test.ts | 15 - packages/core/src/query/switchAccount.ts | 52 - .../switchConnection.test.ts} | 6 +- packages/core/src/query/switchConnection.ts | 52 + packages/core/src/types/unit.ts | 1 - packages/core/src/utils/getUnit.test.ts | 9 - packages/core/src/utils/getUnit.ts | 9 - .../core/src/utils/normalizeChainId.test.ts | 24 - packages/core/src/utils/normalizeChainId.ts | 13 - .../create-wagmi/templates/next/_env.local | 3 +- .../templates/next/src/app/page.tsx | 15 +- .../create-wagmi/templates/next/src/wagmi.ts | 6 - .../create-wagmi/templates/nuxt/_env.local | 1 - packages/create-wagmi/templates/nuxt/app.vue | 2 +- .../templates/nuxt/components/Connect.vue | 5 +- .../{Account.vue => Connection.vue} | 8 +- packages/create-wagmi/templates/nuxt/wagmi.ts | 8 - .../templates/vite-react/_env.local | 1 - .../templates/vite-react/package.json | 19 +- .../templates/vite-react/src/App.tsx | 17 +- .../templates/vite-react/src/wagmi.ts | 6 - .../templates/vite-vanilla/_env.local | 1 - .../templates/vite-vanilla/package.json | 11 +- .../templates/vite-vanilla/src/main.ts | 25 +- .../templates/vite-vanilla/src/wagmi.ts | 6 - .../templates/vite-vue/_env.local | 1 - .../templates/vite-vue/package.json | 13 +- .../templates/vite-vue/src/App.vue | 4 +- .../vite-vue/src/components/Connect.vue | 5 +- .../vite-vue/src/components/Connection.vue | 8 +- .../templates/vite-vue/src/wagmi.ts | 7 - packages/react/package.json | 16 +- packages/react/src/context.test.tsx | 11 +- .../hooks/useWriteContracts.test.ts | 45 - .../experimental/hooks/useWriteContracts.ts | 85 - packages/react/src/exports/actions.test.ts | 14 +- .../src/exports/actions/experimental.test.ts | 25 - .../react/src/exports/actions/experimental.ts | 7 - packages/react/src/exports/experimental.ts | 53 - packages/react/src/exports/index.test.ts | 12 +- packages/react/src/exports/index.ts | 73 +- packages/react/src/exports/query.test.ts | 3 +- .../hooks/codegen/createUseWriteContract.ts | 5 +- packages/react/src/hooks/useAccount.ts | 31 - packages/react/src/hooks/useBalance.test.ts | 106 - packages/react/src/hooks/useCall.test.ts | 6 +- packages/react/src/hooks/useCapabilities.ts | 4 +- packages/react/src/hooks/useChains.test.ts | 75 +- packages/react/src/hooks/useConfig.test.ts | 23 +- packages/react/src/hooks/useConnect.test.ts | 19 +- packages/react/src/hooks/useConnect.ts | 1 + ...ount.test-d.ts => useConnection.test-d.ts} | 4 +- ...eAccount.test.ts => useConnection.test.ts} | 6 +- packages/react/src/hooks/useConnection.ts | 33 + ...ct.test.ts => useConnectionEffect.test.ts} | 14 +- ...ccountEffect.ts => useConnectionEffect.ts} | 14 +- .../src/hooks/useConnectorClient.test.tsx | 12 +- .../react/src/hooks/useConnectorClient.ts | 4 +- .../react/src/hooks/useDisconnect.test.ts | 14 +- packages/react/src/hooks/useDisconnect.ts | 1 + .../src/hooks/useEstimateFeesPerGas.test-d.ts | 15 - .../src/hooks/useEstimateFeesPerGas.test.ts | 1 - .../react/src/hooks/useReadContracts.test.ts | 53 +- packages/react/src/hooks/useReadContracts.ts | 4 +- packages/react/src/hooks/useReconnect.test.ts | 6 - .../src/hooks/useShowCallsStatus.test.ts | 37 + .../react/src/hooks/useSignMessage.test.ts | 4 +- .../react/src/hooks/useSignTypedData.test.ts | 4 +- .../react/src/hooks/useSwitchChain.test-d.ts | 96 +- .../react/src/hooks/useSwitchChain.test.ts | 83 +- packages/react/src/hooks/useSwitchChain.ts | 1 + ...est-d.ts => useSwitchConnection.test-d.ts} | 69 +- ...nt.test.ts => useSwitchConnection.test.ts} | 22 +- ...witchAccount.ts => useSwitchConnection.ts} | 49 +- packages/react/src/hooks/useToken.test-d.ts | 14 - packages/react/src/hooks/useToken.test.ts | 59 - packages/react/src/hooks/useToken.ts | 60 - .../react/src/hooks/useWalletClient.test.tsx | 12 +- packages/react/src/hooks/useWalletClient.ts | 4 +- .../src/hooks/useWatchContractEvent.test.ts | 14 +- .../react/src/useChains.test-d.ts | 4 +- ...ount.test-d.ts => useConnection.test-d.ts} | 6 +- .../react/src/useSwitchChain.test-d.ts | 11 +- .../vue/src/useChains.test-d.ts | 4 +- ...ount.test-d.ts => useConnection.test-d.ts} | 6 +- .../vue/src/useSwitchChain.test-d.ts | 10 +- packages/test/package.json | 2 +- packages/vue/package.json | 6 +- .../vue/src/composables/useAccount.test.ts | 20 - packages/vue/src/composables/useAccount.ts | 37 - .../vue/src/composables/useBalance.test.ts | 44 - .../vue/src/composables/useConnect.test.ts | 19 +- packages/vue/src/composables/useConnect.ts | 1 + ...ount.test-d.ts => useConnection.test-d.ts} | 4 +- .../vue/src/composables/useConnection.test.ts | 20 + packages/vue/src/composables/useConnection.ts | 39 + ...ct.test.ts => useConnectionEffect.test.ts} | 18 +- ...ccountEffect.ts => useConnectionEffect.ts} | 14 +- .../composables/useConnectorClient.test.ts | 4 +- .../vue/src/composables/useConnectorClient.ts | 4 +- .../vue/src/composables/useDisconnect.test.ts | 14 +- packages/vue/src/composables/useDisconnect.ts | 1 + .../src/composables/useSignMessage.test.ts | 4 +- .../src/composables/useSignTypedData.test.ts | 4 +- .../src/composables/useSwitchAccount.test.ts | 42 - .../src/composables/useSwitchChain.test-d.ts | 96 +- .../src/composables/useSwitchChain.test.ts | 10 +- .../vue/src/composables/useSwitchChain.ts | 1 + ...est-d.ts => useSwitchConnection.test-d.ts} | 69 +- .../composables/useSwitchConnection.test.ts | 44 + ...witchAccount.ts => useSwitchConnection.ts} | 49 +- .../composables/useWatchContractEvent.test.ts | 14 +- packages/vue/src/exports/actions.test.ts | 20 +- .../src/exports/actions/experimental.test.ts | 25 - .../vue/src/exports/actions/experimental.ts | 7 - packages/vue/src/exports/index.test.ts | 10 +- packages/vue/src/exports/index.ts | 60 +- packages/vue/src/exports/query.test.ts | 9 +- packages/vue/src/nuxt/module.ts | 9 +- playgrounds/next/src/app/page.tsx | 57 +- playgrounds/nuxt/app.vue | 2 +- playgrounds/nuxt/components/Connect.vue | 5 +- .../nuxt/components/Connection.vue | 8 +- playgrounds/vite-core/package.json | 2 +- playgrounds/vite-core/src/App.tsx | 46 +- playgrounds/vite-react/package.json | 2 +- playgrounds/vite-react/src/App.tsx | 57 +- playgrounds/vite-vue/package.json | 6 +- playgrounds/vite-vue/src/App.vue | 8 +- .../vite-vue/src/components/Balance.vue | 7 +- .../vite-vue/src/components/Connect.vue | 5 +- .../src/components/Connection.vue} | 8 +- .../vite-vue/src/components/SwitchAccount.vue | 20 - .../vite-vue/src/components/SwitchChain.vue | 5 +- .../src/components/SwitchConnection.vue | 21 + pnpm-lock.yaml | 6077 ++++++----------- pnpm-workspace.yaml | 88 +- site/.vitepress/config.ts | 57 +- site/.vitepress/constants.ts | 2 +- site/.vitepress/sidebar.ts | 70 +- .../theme/components/HomeBanner.vue | 2 +- .../theme/composables/useSponsors.ts | 10 +- site/.vitepress/theme/index.ts | 9 +- site/.vitepress/theme/style.css | 23 +- site/cli/installation.md | 22 +- site/components/PackageMetadata.vue | 63 + site/core/api/actions.md | 2 +- site/core/api/actions/deployContract.md | 4 +- site/core/api/actions/disconnect.md | 4 +- site/core/api/actions/estimateFeesPerGas.md | 25 - site/core/api/actions/getAccount.md | 29 - site/core/api/actions/getBalance.md | 49 +- site/core/api/actions/getConnection.md | 29 + site/core/api/actions/getToken.md | 141 - site/core/api/actions/signMessage.md | 4 +- site/core/api/actions/signTypedData.md | 4 +- site/core/api/actions/simulateContract.md | 4 +- site/core/api/actions/switchChain.md | 6 +- .../{switchAccount.md => switchConnection.md} | 22 +- site/core/api/actions/verifyMessage.md | 2 +- site/core/api/actions/watchAccount.md | 61 - site/core/api/actions/watchAsset.md | 4 +- site/core/api/actions/watchConnection.md | 61 + site/core/api/actions/writeContract.md | 4 +- site/core/api/connectors.md | 8 +- site/core/api/connectors/baseAccount.md | 4 + site/core/api/connectors/coinbaseWallet.md | 6 +- site/core/api/connectors/gemini.md | 4 + site/core/api/connectors/metaMask.md | 4 + site/core/api/connectors/porto.md | 4 + site/core/api/connectors/safe.md | 7 + site/core/api/connectors/walletConnect.md | 4 + site/core/api/utilities/normalizeChainId.md | 9 - site/core/getting-started.md | 4 +- site/core/guides/framework-adapters.md | 2 +- site/core/guides/migrate-from-v1-to-v2.md | 6 +- site/core/guides/migrate-from-v2-to-v3.md | 71 + site/package.json | 9 +- site/react/api/connectors.md | 4 + site/react/api/connectors/baseAccount.md | 4 + site/react/api/connectors/coinbaseWallet.md | 6 +- site/react/api/connectors/gemini.md | 4 + site/react/api/connectors/metaMask.md | 4 + site/react/api/connectors/porto.md | 4 + site/react/api/connectors/safe.md | 7 + site/react/api/connectors/walletConnect.md | 4 + site/react/api/hooks.md | 2 +- site/react/api/hooks/useBalance.md | 47 +- site/react/api/hooks/useConnect.md | 2 +- .../hooks/{useAccount.md => useConnection.md} | 26 +- ...ccountEffect.md => useConnectionEffect.md} | 36 +- site/react/api/hooks/useDisconnect.md | 7 +- site/react/api/hooks/useEstimateFeesPerGas.md | 22 +- site/react/api/hooks/useReconnect.md | 2 +- site/react/api/hooks/useSwitchAccount.md | 116 - site/react/api/hooks/useSwitchChain.md | 7 +- site/react/api/hooks/useSwitchConnection.md | 117 + site/react/api/hooks/useToken.md | 162 - site/react/api/utilities/normalizeChainId.md | 9 - site/react/getting-started.md | 4 +- site/react/guides/connect-wallet.md | 47 +- site/react/guides/faq.md | 4 +- site/react/guides/migrate-from-v1-to-v2.md | 6 +- site/react/guides/migrate-from-v2-to-v3.md | 101 + site/react/guides/send-transaction.md | 2 +- site/react/guides/write-to-contract.md | 2 +- site/shared/connectors/baseAccount.md | 23 + site/shared/connectors/coinbaseWallet.md | 72 +- site/shared/connectors/gemini.md | 30 +- site/shared/connectors/metaMask.md | 26 +- site/shared/connectors/porto.md | 23 + site/shared/connectors/safe.md | 24 + site/shared/connectors/walletConnect.md | 51 +- site/shared/faq.md | 24 +- ...n-type.md => getConnection-return-type.md} | 16 +- site/shared/installation.md | 25 +- site/shared/migrate-from-v2-to-v3.md | 199 + site/shared/utilities/normalizeChainId.md | 56 - site/tsconfig.json | 2 +- site/uno.config.ts | 22 + site/vercel.json | 46 + site/vue/api/Nuxt.md | 6 +- site/vue/api/composables.md | 2 +- site/vue/api/composables/useBalance.md | 47 +- site/vue/api/composables/useConnect.md | 25 - .../{useAccount.md => useConnection.md} | 28 +- ...ccountEffect.md => useConnectionEffect.md} | 36 +- site/vue/api/composables/useDisconnect.md | 26 - site/vue/api/composables/useReconnect.md | 20 - site/vue/api/composables/useSwitchAccount.md | 120 - site/vue/api/composables/useSwitchChain.md | 34 +- .../api/composables/useSwitchConnection.md | 92 + site/vue/api/connectors.md | 4 + site/vue/api/connectors/baseAccount.md | 4 + site/vue/api/connectors/coinbaseWallet.md | 6 +- site/vue/api/connectors/gemini.md | 4 + site/vue/api/connectors/metaMask.md | 4 + site/vue/api/connectors/porto.md | 4 + site/vue/api/connectors/safe.md | 7 + site/vue/api/connectors/walletConnect.md | 4 + site/vue/getting-started.md | 4 +- site/vue/guides/connect-wallet.md | 103 +- site/vue/guides/send-transaction.md | 12 +- site/vue/guides/tanstack-query.md | 4 +- site/vue/guides/write-to-contract.md | 14 +- tsconfig.json | 5 +- vitest.config.ts | 8 +- 308 files changed, 5368 insertions(+), 8704 deletions(-) create mode 100644 .changeset/content-vipers-sleep.md create mode 100644 .changeset/exuberant-meerkats-rejoice.md create mode 100644 .changeset/foolish-cats-cackle.md delete mode 100644 .npmrc rename packages/core/src/actions/{getAccount.test-d.ts => getConnection.test-d.ts} (95%) rename packages/core/src/actions/{getAccount.test.ts => getConnection.test.ts} (79%) rename packages/core/src/actions/{getAccount.ts => getConnection.ts} (93%) delete mode 100644 packages/core/src/actions/getToken.test.ts delete mode 100644 packages/core/src/actions/getToken.ts rename packages/core/src/actions/{switchAccount.test.ts => switchConnection.test.ts} (62%) rename packages/core/src/actions/{switchAccount.ts => switchConnection.ts} (71%) delete mode 100644 packages/core/src/actions/watchAccount.ts rename packages/core/src/actions/{watchAccount.test.ts => watchConnection.test.ts} (70%) create mode 100644 packages/core/src/actions/watchConnection.ts delete mode 100644 packages/core/src/experimental/actions/writeContracts.test.ts delete mode 100644 packages/core/src/experimental/actions/writeContracts.ts delete mode 100644 packages/core/src/experimental/query/writeContracts.ts delete mode 100644 packages/core/src/exports/experimental.ts delete mode 100644 packages/core/src/query/getToken.test.ts delete mode 100644 packages/core/src/query/getToken.ts delete mode 100644 packages/core/src/query/switchAccount.test.ts delete mode 100644 packages/core/src/query/switchAccount.ts rename packages/core/src/{experimental/query/writeContracts.test.ts => query/switchConnection.test.ts} (51%) create mode 100644 packages/core/src/query/switchConnection.ts delete mode 100644 packages/core/src/types/unit.ts delete mode 100644 packages/core/src/utils/getUnit.test.ts delete mode 100644 packages/core/src/utils/getUnit.ts delete mode 100644 packages/core/src/utils/normalizeChainId.test.ts delete mode 100644 packages/core/src/utils/normalizeChainId.ts rename packages/create-wagmi/templates/nuxt/components/{Account.vue => Connection.vue} (65%) delete mode 100644 packages/create-wagmi/templates/vite-react/_env.local delete mode 100644 packages/create-wagmi/templates/vite-vanilla/_env.local delete mode 100644 packages/create-wagmi/templates/vite-vue/_env.local rename playgrounds/vite-vue/src/components/Account.vue => packages/create-wagmi/templates/vite-vue/src/components/Connection.vue (65%) delete mode 100644 packages/react/src/experimental/hooks/useWriteContracts.test.ts delete mode 100644 packages/react/src/experimental/hooks/useWriteContracts.ts delete mode 100644 packages/react/src/exports/actions/experimental.test.ts delete mode 100644 packages/react/src/exports/actions/experimental.ts delete mode 100644 packages/react/src/exports/experimental.ts delete mode 100644 packages/react/src/hooks/useAccount.ts rename packages/react/src/hooks/{useAccount.test-d.ts => useConnection.test-d.ts} (95%) rename packages/react/src/hooks/{useAccount.test.ts => useConnection.test.ts} (78%) create mode 100644 packages/react/src/hooks/useConnection.ts rename packages/react/src/hooks/{useAccountEffect.test.ts => useConnectionEffect.test.ts} (82%) rename packages/react/src/hooks/{useAccountEffect.ts => useConnectionEffect.ts} (79%) create mode 100644 packages/react/src/hooks/useShowCallsStatus.test.ts rename packages/react/src/hooks/{useSwitchAccount.test-d.ts => useSwitchConnection.test-d.ts} (54%) rename packages/react/src/hooks/{useSwitchAccount.test.ts => useSwitchConnection.test.ts} (55%) rename packages/react/src/hooks/{useSwitchAccount.ts => useSwitchConnection.ts} (50%) delete mode 100644 packages/react/src/hooks/useToken.test-d.ts delete mode 100644 packages/react/src/hooks/useToken.test.ts delete mode 100644 packages/react/src/hooks/useToken.ts rename packages/register-tests/react/src/{useAccount.test-d.ts => useConnection.test-d.ts} (75%) rename packages/register-tests/vue/src/{useAccount.test-d.ts => useConnection.test-d.ts} (76%) delete mode 100644 packages/vue/src/composables/useAccount.test.ts delete mode 100644 packages/vue/src/composables/useAccount.ts rename packages/vue/src/composables/{useAccount.test-d.ts => useConnection.test-d.ts} (94%) create mode 100644 packages/vue/src/composables/useConnection.test.ts create mode 100644 packages/vue/src/composables/useConnection.ts rename packages/vue/src/composables/{useAccountEffect.test.ts => useConnectionEffect.test.ts} (74%) rename packages/vue/src/composables/{useAccountEffect.ts => useConnectionEffect.ts} (80%) delete mode 100644 packages/vue/src/composables/useSwitchAccount.test.ts rename packages/vue/src/composables/{useSwitchAccount.test-d.ts => useSwitchConnection.test-d.ts} (55%) create mode 100644 packages/vue/src/composables/useSwitchConnection.test.ts rename packages/vue/src/composables/{useSwitchAccount.ts => useSwitchConnection.ts} (51%) delete mode 100644 packages/vue/src/exports/actions/experimental.test.ts delete mode 100644 packages/vue/src/exports/actions/experimental.ts rename packages/create-wagmi/templates/vite-vue/src/components/Account.vue => playgrounds/nuxt/components/Connection.vue (65%) rename playgrounds/{nuxt/components/Account.vue => vite-vue/src/components/Connection.vue} (65%) delete mode 100644 playgrounds/vite-vue/src/components/SwitchAccount.vue create mode 100644 playgrounds/vite-vue/src/components/SwitchConnection.vue create mode 100644 site/components/PackageMetadata.vue delete mode 100644 site/core/api/actions/getAccount.md create mode 100644 site/core/api/actions/getConnection.md delete mode 100644 site/core/api/actions/getToken.md rename site/core/api/actions/{switchAccount.md => switchConnection.md} (62%) delete mode 100644 site/core/api/actions/watchAccount.md create mode 100644 site/core/api/actions/watchConnection.md delete mode 100644 site/core/api/utilities/normalizeChainId.md create mode 100644 site/core/guides/migrate-from-v2-to-v3.md rename site/react/api/hooks/{useAccount.md => useConnection.md} (52%) rename site/react/api/hooks/{useAccountEffect.md => useConnectionEffect.md} (67%) delete mode 100644 site/react/api/hooks/useSwitchAccount.md create mode 100644 site/react/api/hooks/useSwitchConnection.md delete mode 100644 site/react/api/hooks/useToken.md delete mode 100644 site/react/api/utilities/normalizeChainId.md create mode 100644 site/react/guides/migrate-from-v2-to-v3.md rename site/shared/{getAccount-return-type.md => getConnection-return-type.md} (80%) create mode 100644 site/shared/migrate-from-v2-to-v3.md delete mode 100644 site/shared/utilities/normalizeChainId.md create mode 100644 site/uno.config.ts rename site/vue/api/composables/{useAccount.md => useConnection.md} (60%) rename site/vue/api/composables/{useAccountEffect.md => useConnectionEffect.md} (65%) delete mode 100644 site/vue/api/composables/useSwitchAccount.md create mode 100644 site/vue/api/composables/useSwitchConnection.md diff --git a/.changeset/content-vipers-sleep.md b/.changeset/content-vipers-sleep.md new file mode 100644 index 0000000000..80fb4f3b39 --- /dev/null +++ b/.changeset/content-vipers-sleep.md @@ -0,0 +1,63 @@ +--- +"@wagmi/connectors": major +"@wagmi/core": major +--- + +All connector dependencies are now optional peer dependencies. This means that if you want to use a specific connector, you need to install its required dependencies. + +#### baseAccount + +[`baseAccount`](https://wagmi.sh/core/api/connectors/baseAccount) requires `@base-org/account` + +``` +pnpm add @base-org/account@~2.4.0 +``` + +#### coinbaseWallet + +[`coinbaseWallet`](https://wagmi.sh/core/api/connectors/coinbaseWallet) requires `@coinbase/wallet-sdk` + +``` +pnpm add @coinbase/wallet-sdk@~4.3.6 +``` + +#### gemini + +[`gemini`](https://wagmi.sh/core/api/connectors/gemini) requires `@gemini-wallet/core` + +``` +pnpm add @gemini-wallet/core@~0.3.1 +``` + +#### metaMask + +[`metaMask`](https://wagmi.sh/core/api/connectors/metaMask) requires `@metamask/sdk` + +``` +pnpm add @metamask/sdk@~0.33.1 +``` + +#### porto + +[`porto`](https://wagmi.sh/core/api/connectors/porto) requires `porto` + +``` +pnpm add porto@~0.2.35 +``` + +#### safe + +[`safe`](https://wagmi.sh/core/api/connectors/safe) requires `@safe-global/safe-apps-provider` and `@safe-global/safe-apps-sdk` + +``` +pnpm add @safe-global/safe-apps-provider@~0.18.6 @safe-global/safe-apps-sdk@~9.1.0 +``` + +#### walletConnect + +[`walletConnect`](https://wagmi.sh/core/api/connectors/walletConnect) requires `walletconnect/ethereum-provider` + +``` +pnpm add @walletconnect/ethereum-provider@~2.21.1 +``` + diff --git a/.changeset/exuberant-meerkats-rejoice.md b/.changeset/exuberant-meerkats-rejoice.md new file mode 100644 index 0000000000..be4f87d436 --- /dev/null +++ b/.changeset/exuberant-meerkats-rejoice.md @@ -0,0 +1,62 @@ +--- +"@wagmi/vue": minor +--- + +All connector dependencies are now optional peer dependencies. This means that if you want to use a specific connector, you need to install its required dependencies. + +#### baseAccount + +[`baseAccount`](https://wagmi.sh/vue/api/connectors/baseAccount) requires `@base-org/account` + +``` +pnpm add @base-org/account@~2.4.0 +``` + +#### coinbaseWallet + +[`coinbaseWallet`](https://wagmi.sh/vue/api/connectors/coinbaseWallet) requires `@coinbase/wallet-sdk` + +``` +pnpm add @coinbase/wallet-sdk@~4.3.6 +``` + +#### gemini + +[`gemini`](https://wagmi.sh/vue/api/connectors/gemini) requires `@gemini-wallet/core` + +``` +pnpm add @gemini-wallet/core@~0.3.1 +``` + +#### metaMask + +[`metaMask`](https://wagmi.sh/vue/api/connectors/metaMask) requires `@metamask/sdk` + +``` +pnpm add @metamask/sdk@~0.33.1 +``` + +#### porto + +[`porto`](https://wagmi.sh/vue/api/connectors/porto) requires `porto` + +``` +pnpm add porto@~0.2.35 +``` + +#### safe + +[`safe`](https://wagmi.sh/vue/api/connectors/safe) requires `@safe-global/safe-apps-provider` and `@safe-global/safe-apps-sdk` + +``` +pnpm add @safe-global/safe-apps-provider@~0.18.6 @safe-global/safe-apps-sdk@~9.1.0 +``` + +#### walletConnect + +[`walletConnect`](https://wagmi.sh/vue/api/connectors/walletConnect) requires `walletconnect/ethereum-provider` + +``` +pnpm add @walletconnect/ethereum-provider@~2.21.1 +``` + diff --git a/.changeset/foolish-cats-cackle.md b/.changeset/foolish-cats-cackle.md new file mode 100644 index 0000000000..a4f3f9b2ad --- /dev/null +++ b/.changeset/foolish-cats-cackle.md @@ -0,0 +1,62 @@ +--- +"wagmi": major +--- + +All connector dependencies are now optional peer dependencies. This means that if you want to use a specific connector, you need to install its required dependencies. + +#### baseAccount + +[`baseAccount`](https://wagmi.sh/react/api/connectors/baseAccount) requires `@base-org/account` + +``` +pnpm add @base-org/account@~2.4.0 +``` + +#### coinbaseWallet + +[`coinbaseWallet`](https://wagmi.sh/react/api/connectors/coinbaseWallet) requires `@coinbase/wallet-sdk` + +``` +pnpm add @coinbase/wallet-sdk@~4.3.6 +``` + +#### gemini + +[`gemini`](https://wagmi.sh/react/api/connectors/gemini) requires `@gemini-wallet/core` + +``` +pnpm add @gemini-wallet/core@~0.3.1 +``` + +#### metaMask + +[`metaMask`](https://wagmi.sh/react/api/connectors/metaMask) requires `@metamask/sdk` + +``` +pnpm add @metamask/sdk@~0.33.1 +``` + +#### porto + +[`porto`](https://wagmi.sh/react/api/connectors/porto) requires `porto` + +``` +pnpm add porto@~0.2.35 +``` + +#### safe + +[`safe`](https://wagmi.sh/react/api/connectors/safe) requires `@safe-global/safe-apps-provider` and `@safe-global/safe-apps-sdk` + +``` +pnpm add @safe-global/safe-apps-provider@~0.18.6 @safe-global/safe-apps-sdk@~9.1.0 +``` + +#### walletConnect + +[`walletConnect`](https://wagmi.sh/react/api/connectors/walletConnect) requires `walletconnect/ethereum-provider` + +``` +pnpm add @walletconnect/ethereum-provider@~2.21.1 +``` + diff --git a/.github/workflows/changesets.yml b/.github/workflows/changesets.yml index 3b72cc040e..be705406d0 100644 --- a/.github/workflows/changesets.yml +++ b/.github/workflows/changesets.yml @@ -52,7 +52,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Publish prerelease + - name: Publish canary release if: steps.changesets.outputs.published != 'true' continue-on-error: true env: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 73e8239240..80ae5c57ed 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -17,6 +17,31 @@ jobs: uses: ./.github/workflows/verify.yml secrets: inherit + publish: + name: Publish preview release + needs: verify + # prevents this action from running on forks + if: github.repository == 'wevm/wagmi' + permissions: + contents: read + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - name: Clone repository + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 + + - name: Install dependencies + uses: wevm/actions/.github/actions/pnpm@f7ad7f00e16e73322562922c241f21f0c7ffbbec + with: + node-version: 24.5 + + - name: Publish to pkg.pr.new + run: | + pnpm clean + pnpm changeset:prepublish + pnpx pkg-pr-new publish --pnpm --compact './packages/*' + size: name: Size permissions: diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 8615ea86fe..110a6da271 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -79,7 +79,7 @@ jobs: timeout-minutes: 5 strategy: matrix: - typescript-version: ['5.7.3', '5.8.3', '5.9.2', 'latest'] + typescript-version: ['5.7.3', '5.8.3', '5.9.3', 'latest'] viem-version: ['2.38.0', 'latest'] steps: @@ -131,7 +131,7 @@ jobs: version: nightly - name: Install Playwright - run: pnpx playwright@1.55.1 install --with-deps + run: pnpm exec playwright install chromium --with-deps - name: Run tests uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 diff --git a/.gitignore b/.gitignore index 1834fe72ab..329642ab5f 100644 --- a/.gitignore +++ b/.gitignore @@ -31,9 +31,11 @@ packages/react/chains packages/react/codegen packages/react/connectors packages/react/experimental +packages/react/internal packages/react/query packages/vue/actions packages/vue/chains packages/vue/connectors +packages/vue/internal packages/vue/nuxt packages/vue/query diff --git a/.npmrc b/.npmrc deleted file mode 100644 index dcf42f4997..0000000000 --- a/.npmrc +++ /dev/null @@ -1,4 +0,0 @@ -auto-install-peers=false -enable-pre-post-scripts=true -link-workspace-packages=deep -strict-peer-dependencies=false diff --git a/package.json b/package.json index daa945363f..43eb330d07 100644 --- a/package.json +++ b/package.json @@ -48,12 +48,13 @@ "@svitejs/changesets-changelog-github-compact": "^1.2.0", "@types/node": "^24.5.1", "@vitejs/plugin-react": "catalog:", - "@vitest/browser": "^3.2.4", - "@vitest/coverage-v8": "^3.2.4", + "@vitest/browser": "^4.0.8", + "@vitest/browser-playwright": "^4.0.8", + "@vitest/coverage-v8": "^4.0.8", "@wagmi/test": "workspace:*", "happy-dom": "^20.0.0", - "knip": "^5.30.6", - "playwright": "1.54.1", + "knip": "^5.69.0", + "playwright": "1.56.1", "prool": "^0.0.24", "publint": "^0.2.11", "react": "catalog:", @@ -62,10 +63,11 @@ "simple-git-hooks": "^2.11.1", "typescript": "5.9.2", "viem": "2.38.0", - "vitest": "^3.2.4", - "vitest-browser-react": "^2.0.0-beta.1" + "vite-plugin-react-fallback-throttle": "^0.1.1", + "vitest": "^4.0.8", + "vitest-browser-react": "^2.0.2" }, - "packageManager": "pnpm@10.16.1", + "packageManager": "pnpm@10.22.0", "devEngines": { "runtime": { "name": "node", @@ -73,32 +75,6 @@ "onFail": "download" } }, - "pnpm": { - "peerDependencyRules": { - "ignoreMissing": [ - "@algolia/client-search", - "react", - "react-native", - "search-insights" - ] - }, - "patchedDependencies": { - "prool": "patches/prool.patch" - }, - "overrides": { - "@walletconnect/logger>pino": "10.0.0", - "cookie@<0.7.0": "0.7.0", - "elliptic@<=6.6.0": ">=6.6.1", - "esbuild@<=0.24.2": "0.25.0", - "hono@>=1.1.0 <4.10.2": ">=4.10.2", - "nanoid@<3.3.8": "3.3.8", - "playwright@<1.55.1": "1.55.1", - "semver@<5.7.2": ">=5.7.2", - "serialize-javascript@>=6.0.0 <6.0.2": "6.0.2", - "tmp@<=0.2.3": "0.2.4", - "ws@>=8.0.0 <8.17.1": "8.17.1" - } - }, "simple-git-hooks": { "pre-commit": "pnpm check" }, @@ -126,7 +102,18 @@ ] }, "packages/connectors": { - "entry": "src/exports/index.ts!" + "entry": "src/exports/index.ts!", + "ignoreDependencies": [ + "@base-org/account", + "@coinbase/wallet-sdk", + "@gemini-wallet/core", + "@metamask/sdk", + "@safe-global/safe-apps-provider", + "@safe-global/safe-apps-sdk", + "@wagmi/core", + "@walletconnect/ethereum-provider", + "porto" + ] }, "packages/core": { "entry": "src/exports/{actions,chains,codegen,experimental,index,internal,query}.ts!", diff --git a/packages/cli/package.json b/packages/cli/package.json index 93a91b021d..60e8735765 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -59,7 +59,7 @@ } }, "peerDependencies": { - "typescript": ">=5.0.4" + "typescript": ">=5.7.3" }, "peerDependenciesMeta": { "typescript": { @@ -67,7 +67,7 @@ } }, "dependencies": { - "abitype": "^1.0.4", + "abitype": "^1.1.1", "bundle-require": "^5.1.0", "cac": "^6.7.14", "change-case": "^5.4.4", diff --git a/packages/cli/src/plugins/__fixtures__/hardhat/hardhat.config.js b/packages/cli/src/plugins/__fixtures__/hardhat/hardhat.config.js index c8126eedfa..2ff4f7cbae 100644 --- a/packages/cli/src/plugins/__fixtures__/hardhat/hardhat.config.js +++ b/packages/cli/src/plugins/__fixtures__/hardhat/hardhat.config.js @@ -1,3 +1,5 @@ -module.exports = { +import { defineConfig } from 'hardhat/config' + +export default defineConfig({ solidity: '0.8.17', -} +}) diff --git a/packages/cli/src/plugins/__fixtures__/hardhat/package.json b/packages/cli/src/plugins/__fixtures__/hardhat/package.json index 85c9ffb7bd..e3385bb9cc 100644 --- a/packages/cli/src/plugins/__fixtures__/hardhat/package.json +++ b/packages/cli/src/plugins/__fixtures__/hardhat/package.json @@ -1,7 +1,8 @@ { "name": "hardhat-fixture", "private": true, + "type": "module", "devDependencies": { - "hardhat": "^2.22.3" + "hardhat": "^3.0.0" } } diff --git a/packages/cli/src/plugins/react.ts b/packages/cli/src/plugins/react.ts index 54f4126690..dfe41fffb3 100644 --- a/packages/cli/src/plugins/react.ts +++ b/packages/cli/src/plugins/react.ts @@ -4,16 +4,23 @@ import type { Contract, Plugin } from '../config.js' import type { Compute, RequiredBy } from '../types.js' import { getAddressDocString } from '../utils/getAddressDocString.js' -export type ReactConfig = { - abiItemHooks?: boolean | undefined - getHookName?: - | 'legacy' // TODO: Deprecate `'legacy'` option - | ((options: { - contractName: string - itemName?: string | undefined - type: 'read' | 'simulate' | 'watch' | 'write' - }) => `use${string}`) -} +export type ReactConfig = Compute< + { + abiItemHooks?: boolean | undefined + } & ( + | { + /** @deprecated */ + getHookName: 'legacy' + } + | { + getHookName?: (options: { + contractName: string + itemName?: string | undefined + type: 'read' | 'simulate' | 'watch' | 'write' + }) => `use${string}` + } + ) +> type ReactResult = Compute> diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 5cfbb03b9a..26abd4f14e 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -35,29 +35,58 @@ "./package.json": "./package.json" }, "peerDependencies": { + "@base-org/account": "~2.4.0", + "@coinbase/wallet-sdk": "~4.3.6", + "@gemini-wallet/core": "~0.3.1", + "@metamask/sdk": "~0.33.1", + "@safe-global/safe-apps-provider": "~0.18.6", + "@safe-global/safe-apps-sdk": "~9.1.0", "@wagmi/core": "workspace:*", - "typescript": ">=5.0.4", + "@walletconnect/ethereum-provider": "~2.21.1", + "porto": "~0.2.35", + "typescript": ">=5.7.3", "viem": "2.x" }, "peerDependenciesMeta": { + "@base-org/account": { + "optional": true + }, + "@coinbase/wallet-sdk": { + "optional": true + }, + "@gemini-wallet/core": { + "optional": true + }, + "@metamask/sdk": { + "optional": true + }, + "@safe-global/safe-apps-provider": { + "optional": true + }, + "@safe-global/safe-apps-sdk": { + "optional": true + }, + "@walletconnect/ethereum-provider": { + "optional": true + }, + "porto": { + "optional": true + }, "typescript": { "optional": true } }, - "dependencies": { - "@base-org/account": "2.4.0", - "@coinbase/wallet-sdk": "4.3.6", - "@gemini-wallet/core": "0.3.2", - "@metamask/sdk": "0.33.1", - "@safe-global/safe-apps-provider": "0.18.6", - "@safe-global/safe-apps-sdk": "9.1.0", - "@walletconnect/ethereum-provider": "2.21.1", - "cbw-sdk": "npm:@coinbase/wallet-sdk@3.9.3", - "porto": "0.2.35" - }, "devDependencies": { + "@base-org/account": "catalog:", + "@coinbase/wallet-sdk": "catalog:", + "@gemini-wallet/core": "catalog:", + "@metamask/sdk": "catalog:", + "@safe-global/safe-apps-provider": "catalog:", + "@safe-global/safe-apps-sdk": "catalog:", "@wagmi/core": "workspace:*", - "msw": "^2.4.9" + "@walletconnect/ethereum-provider": "catalog:", + "msw": "^2.4.9", + "porto": "catalog:" }, "contributors": [ "awkweb.eth ", diff --git a/packages/connectors/src/coinbaseWallet.test.ts b/packages/connectors/src/coinbaseWallet.test.ts index 99b141e49b..a551a16568 100644 --- a/packages/connectors/src/coinbaseWallet.test.ts +++ b/packages/connectors/src/coinbaseWallet.test.ts @@ -4,7 +4,7 @@ import { expect, expectTypeOf, test } from 'vitest' import { coinbaseWallet } from './coinbaseWallet.js' test('setup', () => { - const connectorFn = coinbaseWallet({ appName: 'wagmi', version: '4' }) + const connectorFn = coinbaseWallet({ appName: 'wagmi' }) const connector = config._internal.connectors.setup(connectorFn) expect(connector.name).toEqual('Coinbase Wallet') diff --git a/packages/connectors/src/coinbaseWallet.ts b/packages/connectors/src/coinbaseWallet.ts index 0eafaa3a24..65f9c5f9cd 100644 --- a/packages/connectors/src/coinbaseWallet.ts +++ b/packages/connectors/src/coinbaseWallet.ts @@ -1,6 +1,5 @@ import type { createCoinbaseWalletSDK, - Preference, ProviderInterface, } from '@coinbase/wallet-sdk' import { @@ -8,11 +7,7 @@ import { type Connector, createConnector, } from '@wagmi/core' -import type { Compute, Mutable, Omit } from '@wagmi/core/internal' -import type { - CoinbaseWalletProvider as CBW_Provider, - CoinbaseWalletSDK as CBW_SDK, -} from 'cbw-sdk' +import type { Mutable, Omit } from '@wagmi/core/internal' import { type AddEthereumChainParameter, type Address, @@ -24,59 +19,20 @@ import { UserRejectedRequestError, } from 'viem' -type Version = '3' | '4' - -export type CoinbaseWalletParameters = - version extends '4' - ? Compute< - { - headlessMode?: false | undefined - /** Coinbase Wallet SDK version */ - version?: version | '3' | undefined - } & Version4Parameters - > - : Compute< - { - /** - * @deprecated `headlessMode` will be removed in the next major version. Upgrade to `version: '4'`. - */ - headlessMode?: true | undefined - /** - * Coinbase Wallet SDK version - * @deprecated Version 3 will be removed in the next major version. Upgrade to `version: '4'`. - * @default '4' - */ - version?: version | '4' | undefined - } & Version3Parameters - > - -coinbaseWallet.type = 'coinbaseWallet' as const -export function coinbaseWallet( - parameters: CoinbaseWalletParameters = {} as any, -): version extends '4' - ? ReturnType - : ReturnType { - if (parameters.version === '3' || parameters.headlessMode) - return version3(parameters as Version3Parameters) as any - return version4(parameters as Version4Parameters) as any -} - -type Version4Parameters = Mutable< +export type CoinbaseWalletParameters< + /** @deprecated remove */ + _ = unknown, +> = Mutable< Omit< Parameters[0], - | 'appChainIds' // set via wagmi config - | 'preference' - > & { - // TODO(v3): Remove `Preference['options']` - /** - * Preference for the type of wallet to display. - * @default 'all' - */ - preference?: Preference['options'] | Compute | undefined - } + 'appChainIds' // set via wagmi config + > > -function version4(parameters: Version4Parameters) { +coinbaseWallet.type = 'coinbaseWallet' as const +export function coinbaseWallet( + parameters: CoinbaseWalletParameters = {} as any, +) { type Provider = ProviderInterface & { // for backwards compatibility close?(): void @@ -195,20 +151,14 @@ function version4(parameters: Version4Parameters) { }, async getProvider() { if (!walletProvider) { - const preference = (() => { - if (typeof parameters.preference === 'string') - return { options: parameters.preference } - return { - ...parameters.preference, - options: parameters.preference?.options ?? 'all', - } - })() - const { createCoinbaseWalletSDK } = await import('@coinbase/wallet-sdk') const sdk = createCoinbaseWalletSDK({ ...parameters, appChainIds: config.chains.map((x) => x.id), - preference, + preference: { + options: 'all', + ...(parameters.preference ?? {}), + }, }) walletProvider = sdk.getProvider() @@ -308,253 +258,3 @@ function version4(parameters: Version4Parameters) { }, })) } - -type Version3Parameters = Mutable< - Omit< - ConstructorParameters[0], - 'reloadOnDisconnect' // remove property since TSDoc says default is `true` - > -> & { - /** - * Fallback Ethereum JSON RPC URL - * @default "" - */ - jsonRpcUrl?: string | undefined - /** - * Fallback Ethereum Chain ID - * @default 1 - */ - chainId?: number | undefined - /** - * Whether or not to reload dapp automatically after disconnect. - * @default false - */ - reloadOnDisconnect?: boolean | undefined -} - -function version3(parameters: Version3Parameters) { - const reloadOnDisconnect = false - - type Provider = CBW_Provider - - let sdk: CBW_SDK | undefined - let walletProvider: Provider | undefined - - let accountsChanged: Connector['onAccountsChanged'] | undefined - let chainChanged: Connector['onChainChanged'] | undefined - let disconnect: Connector['onDisconnect'] | undefined - - return createConnector((config) => ({ - id: 'coinbaseWalletSDK', - name: 'Coinbase Wallet', - rdns: 'com.coinbase.wallet', - type: coinbaseWallet.type, - async connect({ chainId, withCapabilities } = {}) { - try { - const provider = await this.getProvider() - const accounts = ( - (await provider.request({ - method: 'eth_requestAccounts', - })) as string[] - ).map((x) => getAddress(x)) - - if (!accountsChanged) { - accountsChanged = this.onAccountsChanged.bind(this) - provider.on('accountsChanged', accountsChanged) - } - if (!chainChanged) { - chainChanged = this.onChainChanged.bind(this) - provider.on('chainChanged', chainChanged) - } - if (!disconnect) { - disconnect = this.onDisconnect.bind(this) - provider.on('disconnect', disconnect) - } - - // Switch to chain if provided - let currentChainId = await this.getChainId() - if (chainId && currentChainId !== chainId) { - const chain = await this.switchChain!({ chainId }).catch((error) => { - if (error.code === UserRejectedRequestError.code) throw error - return { id: currentChainId } - }) - currentChainId = chain?.id ?? currentChainId - } - - return { - accounts: (withCapabilities - ? accounts.map((address) => ({ address, capabilities: {} })) - : accounts) as never, - chainId: currentChainId, - } - } catch (error) { - if ( - /(user closed modal|accounts received is empty|user denied account)/i.test( - (error as Error).message, - ) - ) - throw new UserRejectedRequestError(error as Error) - throw error - } - }, - async disconnect() { - const provider = await this.getProvider() - - if (accountsChanged) { - provider.removeListener('accountsChanged', accountsChanged) - accountsChanged = undefined - } - if (chainChanged) { - provider.removeListener('chainChanged', chainChanged) - chainChanged = undefined - } - if (disconnect) { - provider.removeListener('disconnect', disconnect) - disconnect = undefined - } - - provider.disconnect() - provider.close() - }, - async getAccounts() { - const provider = await this.getProvider() - return ( - await provider.request({ - method: 'eth_accounts', - }) - ).map((x) => getAddress(x)) - }, - async getChainId() { - const provider = await this.getProvider() - const chainId = await provider.request({ - method: 'eth_chainId', - }) - return Number(chainId) - }, - async getProvider() { - if (!walletProvider) { - // Unwrapping import for Vite compatibility. - // See: https://github.com/vitejs/vite/issues/9703 - const CoinbaseWalletSDK = await (async () => { - const { default: SDK } = await import('cbw-sdk') - if (typeof SDK !== 'function' && typeof SDK.default === 'function') - return SDK.default - return SDK as unknown as typeof SDK.default - })() - - sdk = new CoinbaseWalletSDK({ ...parameters, reloadOnDisconnect }) - - // Force types to retrieve private `walletExtension` method from the Coinbase Wallet SDK. - const walletExtensionChainId = ( - sdk as unknown as { - get walletExtension(): { getChainId(): number } | undefined - } - ).walletExtension?.getChainId() - - const chain = - config.chains.find((chain) => - parameters.chainId - ? chain.id === parameters.chainId - : chain.id === walletExtensionChainId, - ) || config.chains[0] - const chainId = parameters.chainId || chain?.id - const jsonRpcUrl = - parameters.jsonRpcUrl || chain?.rpcUrls.default.http[0] - - walletProvider = sdk.makeWeb3Provider(jsonRpcUrl, chainId) - } - - return walletProvider - }, - async isAuthorized() { - try { - const accounts = await this.getAccounts() - return !!accounts.length - } catch { - return false - } - }, - async switchChain({ addEthereumChainParameter, chainId }) { - const chain = config.chains.find((chain) => chain.id === chainId) - if (!chain) throw new SwitchChainError(new ChainNotConfiguredError()) - - const provider = await this.getProvider() - - try { - await provider.request({ - method: 'wallet_switchEthereumChain', - params: [{ chainId: numberToHex(chain.id) }], - }) - return chain - } catch (error) { - // Indicates chain is not added to provider - if ((error as ProviderRpcError).code === 4902) { - try { - let blockExplorerUrls: string[] | undefined - if (addEthereumChainParameter?.blockExplorerUrls) - blockExplorerUrls = addEthereumChainParameter.blockExplorerUrls - else - blockExplorerUrls = chain.blockExplorers?.default.url - ? [chain.blockExplorers?.default.url] - : [] - - let rpcUrls: readonly string[] - if (addEthereumChainParameter?.rpcUrls?.length) - rpcUrls = addEthereumChainParameter.rpcUrls - else rpcUrls = [chain.rpcUrls.default?.http[0] ?? ''] - - const addEthereumChain = { - blockExplorerUrls, - chainId: numberToHex(chainId), - chainName: addEthereumChainParameter?.chainName ?? chain.name, - iconUrls: addEthereumChainParameter?.iconUrls, - nativeCurrency: - addEthereumChainParameter?.nativeCurrency ?? - chain.nativeCurrency, - rpcUrls, - } satisfies AddEthereumChainParameter - - await provider.request({ - method: 'wallet_addEthereumChain', - params: [addEthereumChain], - }) - - return chain - } catch (error) { - throw new UserRejectedRequestError(error as Error) - } - } - - throw new SwitchChainError(error as Error) - } - }, - onAccountsChanged(accounts) { - if (accounts.length === 0) this.onDisconnect() - else - config.emitter.emit('change', { - accounts: accounts.map((x) => getAddress(x)), - }) - }, - onChainChanged(chain) { - const chainId = Number(chain) - config.emitter.emit('change', { chainId }) - }, - async onDisconnect(_error) { - config.emitter.emit('disconnect') - - const provider = await this.getProvider() - if (accountsChanged) { - provider.removeListener('accountsChanged', accountsChanged) - accountsChanged = undefined - } - if (chainChanged) { - provider.removeListener('chainChanged', chainChanged) - chainChanged = undefined - } - if (disconnect) { - provider.removeListener('disconnect', disconnect) - disconnect = undefined - } - }, - })) -} diff --git a/packages/connectors/src/gemini.ts b/packages/connectors/src/gemini.ts index 7146eed995..5865352085 100644 --- a/packages/connectors/src/gemini.ts +++ b/packages/connectors/src/gemini.ts @@ -1,5 +1,4 @@ import type { AppMetadata, ProviderInterface } from '@gemini-wallet/core' -import { GeminiWalletProvider } from '@gemini-wallet/core' import { ChainNotConfiguredError, type Connector, @@ -110,6 +109,7 @@ export function gemini(parameters: GeminiParameters = {}) { }, async getProvider() { if (!walletProvider) { + const { GeminiWalletProvider } = await import('@gemini-wallet/core') walletProvider = new GeminiWalletProvider({ appMetadata: parameters.appMetadata ?? {}, chain: { diff --git a/packages/connectors/src/metaMask.ts b/packages/connectors/src/metaMask.ts index dab96dd648..29909a9c92 100644 --- a/packages/connectors/src/metaMask.ts +++ b/packages/connectors/src/metaMask.ts @@ -61,16 +61,7 @@ type WagmiMetaMaskSDKOptions = Compute< | 'useDeeplink' | 'readonlyRPCMap' > - > & { - /** @deprecated */ - forceDeleteProvider?: MetaMaskSDKOptions['forceDeleteProvider'] - /** @deprecated */ - forceInjectProvider?: MetaMaskSDKOptions['forceInjectProvider'] - /** @deprecated */ - injectProvider?: MetaMaskSDKOptions['injectProvider'] - /** @deprecated */ - useDeeplink?: MetaMaskSDKOptions['useDeeplink'] - } + > > metaMask.type = 'metaMask' as const @@ -259,12 +250,12 @@ export function metaMask(parameters: MetaMaskParameters = {}) { })?.[0] sdk = new MetaMaskSDK({ + // Workaround cast since MetaMask SDK does not support `'exactOptionalPropertyTypes'` + ...(parameters as RemoveUndefined), _source: 'wagmi', forceDeleteProvider: false, forceInjectProvider: false, injectProvider: false, - // Workaround cast since MetaMask SDK does not support `'exactOptionalPropertyTypes'` - ...(parameters as RemoveUndefined), readonlyRPCMap, dappMetadata: { ...parameters.dappMetadata, @@ -278,7 +269,7 @@ export function metaMask(parameters: MetaMaskParameters = {}) { ? window.location.origin : 'https://wagmi.sh', }, - useDeeplink: parameters.useDeeplink ?? true, + useDeeplink: true, }) const result = await sdk.init() // On initial load, sometimes `sdk.getProvider` does not return provider. diff --git a/packages/connectors/src/porto.ts b/packages/connectors/src/porto.ts index ad83df0ada..8c90d0b50f 100644 --- a/packages/connectors/src/porto.ts +++ b/packages/connectors/src/porto.ts @@ -4,8 +4,7 @@ import { createConnector, } from '@wagmi/core' import type { ExactPartial } from '@wagmi/core/internal' -import { type Porto, RpcSchema } from 'porto' -import { z } from 'porto/internal' +import type { Porto, RpcSchema } from 'porto' import { type Address, getAddress, @@ -89,6 +88,8 @@ export function porto(parameters: PortoParameters = {}) { try { if (!accounts?.length && !isReconnecting) { + const { RpcSchema } = await import('porto') + const { z } = await import('porto/internal') const res = await provider.request({ method: 'wallet_connect', params: [ diff --git a/packages/connectors/src/walletConnect.ts b/packages/connectors/src/walletConnect.ts index d726ec4d9c..6392a199a5 100644 --- a/packages/connectors/src/walletConnect.ts +++ b/packages/connectors/src/walletConnect.ts @@ -73,53 +73,6 @@ export type WalletConnectParameters = Compute< > walletConnect.type = 'walletConnect' as const -/** - * @deprecated **NOTE: This connector uses a vulnerable dependency downstream** (`@walletconnect/ethereum-provider@2.21.1` > `@reown/appkit@1.8.9` > `@reown/appkit-utils@1.8.9` > `@walletconnect/logger@2.1.2` > `pino@7.11.0`). You should override `pino` to a secure version via your package manager: - * - * ### npm - * ```json - * { - * "overrides": { - * "@walletconnect/logger": { - * "pino": "10.0.0" - * } - * } - * } - * ``` - * - * ### pnpm - * ```json - * { - * "pnpm": { - * "overrides": { - * "@walletconnect/logger>pino": "10.0.0" - * } - * } - * } - * ``` - * - * ### yarn - * ```json - * { - * "resolutions": { - * "@walletconnect/logger/pino": "10.0.0" - * } - * } - * ``` - * - * ### bun - * ```json - * { - * "overrides": { - * "@walletconnect/logger": { - * "pino": "10.0.0" - * } - * } - * } - * ``` - * - * Normally the Wagmi team would upgrade `@walletconnect/ethereum-provider` to a fixed version for you, but `@walletconnect/ethereum-provider` was relicensed recently from Apache to a [non-permissive license](https://github.com/reown-com/appkit/blob/main/LICENSE.md). We are trying to get the WalletConnect team to release a version that closes the vulnerability under the old Apache license. - */ export function walletConnect(parameters: WalletConnectParameters) { const isNewChainsStale = parameters.isNewChainsStale ?? true diff --git a/packages/core/package.json b/packages/core/package.json index 493e08e15d..baa3500a5d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -12,7 +12,7 @@ "build": "pnpm run clean && pnpm run build:esm+types", "build:esm+types": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types", "check:types": "tsc --noEmit", - "clean": "rm -rf dist tsconfig.tsbuildinfo actions chains codegen experimental internal query", + "clean": "rm -rf dist tsconfig.tsbuildinfo actions chains codegen internal query", "test:build": "publint --strict && attw --pack --ignore-rules cjs-resolves-to-esm" }, "files": [ @@ -23,7 +23,6 @@ "!src/**/*.test-d.ts", "/actions", "/chains", - "/experimental", "/internal", "/query" ], @@ -49,10 +48,6 @@ "types": "./dist/types/exports/codegen.d.ts", "default": "./dist/esm/exports/codegen.js" }, - "./experimental": { - "types": "./dist/types/exports/experimental.d.ts", - "default": "./dist/esm/exports/experimental.js" - }, "./internal": { "types": "./dist/types/exports/internal.d.ts", "default": "./dist/esm/exports/internal.js" @@ -74,9 +69,6 @@ "codegen": [ "./dist/types/exports/codegen.d.ts" ], - "experimental": [ - "./dist/types/exports/experimental.d.ts" - ], "internal": [ "./dist/types/exports/internal.d.ts" ], @@ -87,7 +79,7 @@ }, "peerDependencies": { "@tanstack/query-core": ">=5.0.0", - "typescript": ">=5.0.4", + "typescript": ">=5.7.3", "viem": "2.x" }, "peerDependenciesMeta": { diff --git a/packages/core/src/actions/codegen/createWriteContract.ts b/packages/core/src/actions/codegen/createWriteContract.ts index 4d2509eb1b..e02b51db94 100644 --- a/packages/core/src/actions/codegen/createWriteContract.ts +++ b/packages/core/src/actions/codegen/createWriteContract.ts @@ -85,10 +85,7 @@ export type CreateWriteContractReturnType< | undefined } : Compute>) & - ConnectorParameter & { - /** @deprecated */ - __mode?: 'prepared' - } + ConnectorParameter >, ) => Promise diff --git a/packages/core/src/actions/estimateFeesPerGas.test-d.ts b/packages/core/src/actions/estimateFeesPerGas.test-d.ts index dada2ea311..a5210bcd48 100644 --- a/packages/core/src/actions/estimateFeesPerGas.test-d.ts +++ b/packages/core/src/actions/estimateFeesPerGas.test-d.ts @@ -8,11 +8,6 @@ test('types', async () => { gasPrice?: undefined maxFeePerGas: bigint maxPriorityFeePerGas: bigint - formatted: { - gasPrice?: undefined - maxFeePerGas: string - maxPriorityFeePerGas: string - } }>() const legacy = await estimateFeesPerGas(config, { type: 'legacy' }) @@ -20,11 +15,6 @@ test('types', async () => { gasPrice: bigint maxFeePerGas?: undefined maxPriorityFeePerGas?: undefined - formatted: { - gasPrice: string - maxFeePerGas?: undefined - maxPriorityFeePerGas?: undefined - } }>() const eip1559 = await estimateFeesPerGas(config, { type: 'eip1559' }) @@ -32,10 +22,5 @@ test('types', async () => { gasPrice?: undefined maxFeePerGas: bigint maxPriorityFeePerGas: bigint - formatted: { - gasPrice?: undefined - maxFeePerGas: string - maxPriorityFeePerGas: string - } }>() }) diff --git a/packages/core/src/actions/estimateFeesPerGas.test.ts b/packages/core/src/actions/estimateFeesPerGas.test.ts index 4c5d668b83..318cbec16c 100644 --- a/packages/core/src/actions/estimateFeesPerGas.test.ts +++ b/packages/core/src/actions/estimateFeesPerGas.test.ts @@ -7,7 +7,6 @@ test('default', async () => { const result = await estimateFeesPerGas(config) expect(Object.keys(result)).toMatchInlineSnapshot(` [ - "formatted", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", diff --git a/packages/core/src/actions/estimateFeesPerGas.ts b/packages/core/src/actions/estimateFeesPerGas.ts index 915c65eba9..cfe7119114 100644 --- a/packages/core/src/actions/estimateFeesPerGas.ts +++ b/packages/core/src/actions/estimateFeesPerGas.ts @@ -1,10 +1,4 @@ -import { - type Chain, - type FeeValuesEIP1559, - type FeeValuesLegacy, - type FeeValuesType, - formatUnits, -} from 'viem' +import type { Chain, FeeValuesType } from 'viem' import { type EstimateFeesPerGasErrorType as viem_EstimateFeesPerGasErrorType, type EstimateFeesPerGasParameters as viem_EstimateFeesPerGasParameters, @@ -14,10 +8,8 @@ import { import type { Config } from '../createConfig.js' import type { ChainIdParameter } from '../types/properties.js' -import type { Unit } from '../types/unit.js' import type { Compute, UnionCompute, UnionLooseOmit } from '../types/utils.js' import { getAction } from '../utils/getAction.js' -import { getUnit } from '../utils/getUnit.js' export type EstimateFeesPerGasParameters< type extends FeeValuesType = FeeValuesType, @@ -27,23 +19,12 @@ export type EstimateFeesPerGasParameters< viem_EstimateFeesPerGasParameters, 'chain' > & - ChainIdParameter & { - /** @deprecated */ - formatUnits?: Unit | undefined - } + ChainIdParameter > export type EstimateFeesPerGasReturnType< type extends FeeValuesType = FeeValuesType, -> = Compute< - viem_EstimateFeesPerGasReturnType & { - /** @deprecated */ - formatted: UnionCompute< - | (type extends 'legacy' ? FeeValuesLegacy : never) - | (type extends 'eip1559' ? FeeValuesEIP1559 : never) - > - } -> +> = Compute> export type EstimateFeesPerGasErrorType = viem_EstimateFeesPerGasErrorType @@ -54,7 +35,7 @@ export async function estimateFeesPerGas< config: config, parameters: EstimateFeesPerGasParameters = {}, ): Promise> { - const { chainId, formatUnits: units = 'gwei', ...rest } = parameters + const { chainId, ...rest } = parameters const client = config.getClient({ chainId }) const action = getAction( @@ -68,17 +49,7 @@ export async function estimateFeesPerGas< chain: client.chain, }) - const unit = getUnit(units) - const formatted = { - gasPrice: gasPrice ? formatUnits(gasPrice, unit) : undefined, - maxFeePerGas: maxFeePerGas ? formatUnits(maxFeePerGas, unit) : undefined, - maxPriorityFeePerGas: maxPriorityFeePerGas - ? formatUnits(maxPriorityFeePerGas, unit) - : undefined, - } - return { - formatted, gasPrice, maxFeePerGas, maxPriorityFeePerGas, diff --git a/packages/core/src/actions/getBalance.test.ts b/packages/core/src/actions/getBalance.test.ts index 954c09c2e6..df6c0632c1 100644 --- a/packages/core/src/actions/getBalance.test.ts +++ b/packages/core/src/actions/getBalance.test.ts @@ -21,82 +21,34 @@ beforeEach(async () => { test('default', async () => { await expect(getBalance(config, { address })).resolves.toMatchInlineSnapshot(` - { - "decimals": 18, - "formatted": "10000", - "symbol": "ETH", - "value": 10000000000000000000000n, - } - `) + { + "decimals": 18, + "symbol": "ETH", + "value": 10000000000000000000000n, + } + `) await testClient.mainnet.setBalance({ address, value: parseEther('6969.12222215666'), }) await expect(getBalance(config, { address })).resolves.toMatchInlineSnapshot(` - { - "decimals": 18, - "formatted": "6969.12222215666", - "symbol": "ETH", - "value": 6969122222156660000000n, - } - `) + { + "decimals": 18, + "symbol": "ETH", + "value": 6969122222156660000000n, + } + `) }) test('parameters: chainId', async () => { await expect( getBalance(config, { address, chainId: chain.mainnet2.id }), - ).resolves.toMatchInlineSnapshot(` - { - "decimals": 18, - "formatted": "420", - "symbol": "WAG", - "value": 420000000000000000000n, - } - `) -}) - -test('parameters: token', async () => { - await expect( - getBalance(config, { - address: '0x4557B18E779944BFE9d78A672452331C186a9f48', - token: '0x6B175474E89094C44Da98b954EedeAC495271d0F', - }), - ).resolves.toMatchInlineSnapshot(` - { - "decimals": 18, - "formatted": "0.559062564299199392", - "symbol": "DAI", - "value": 559062564299199392n, - } - `) -}) - -test('parameters: token (bytes32 symbol)', async () => { - await expect( - getBalance(config, { - address: '0x4557B18E779944BFE9d78A672452331C186a9f48', - token: '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2', - }), ).resolves.toMatchInlineSnapshot(` { "decimals": 18, - "formatted": "0", - "symbol": "MKR", - "value": 0n, + "symbol": "WAG", + "value": 420000000000000000000n, } `) }) - -test('parameters: unit', async () => { - await expect( - getBalance(config, { address, unit: 'wei' }), - ).resolves.toMatchInlineSnapshot(` - { - "decimals": 18, - "formatted": "10000000000000000000000", - "symbol": "ETH", - "value": 10000000000000000000000n, - } - `) -}) diff --git a/packages/core/src/actions/getBalance.ts b/packages/core/src/actions/getBalance.ts index 44ad018ccc..ff1e79c6c0 100644 --- a/packages/core/src/actions/getBalance.ts +++ b/packages/core/src/actions/getBalance.ts @@ -1,4 +1,3 @@ -import { type Address, formatUnits, type Hex, hexToString, trim } from 'viem' import { type GetBalanceErrorType as viem_GetBalanceErrorType, type GetBalanceParameters as viem_GetBalanceParameters, @@ -7,26 +6,15 @@ import { import type { Config } from '../createConfig.js' import type { ChainIdParameter } from '../types/properties.js' -import type { Unit } from '../types/unit.js' import type { Compute } from '../types/utils.js' import { getAction } from '../utils/getAction.js' -import { getUnit } from '../utils/getUnit.js' -import { type ReadContractsErrorType, readContracts } from './readContracts.js' export type GetBalanceParameters = Compute< - ChainIdParameter & - viem_GetBalanceParameters & { - /** @deprecated */ - token?: Address | undefined - /** @deprecated */ - unit?: Unit | undefined - } + ChainIdParameter & viem_GetBalanceParameters > export type GetBalanceReturnType = { decimals: number - /** @deprecated */ - formatted: string symbol: string value: bigint } @@ -38,45 +26,7 @@ export async function getBalance( config: config, parameters: GetBalanceParameters, ): Promise { - const { - address, - blockNumber, - blockTag, - chainId, - token: tokenAddress, - unit = 'ether', - } = parameters - - if (tokenAddress) { - try { - return await getTokenBalance(config, { - balanceAddress: address, - chainId, - symbolType: 'string', - tokenAddress, - }) - } catch (error) { - // In the chance that there is an error upon decoding the contract result, - // it could be likely that the contract data is represented as bytes32 instead - // of a string. - if ( - (error as ReadContractsErrorType).name === - 'ContractFunctionExecutionError' - ) { - const balance = await getTokenBalance(config, { - balanceAddress: address, - chainId, - symbolType: 'bytes32', - tokenAddress, - }) - const symbol = hexToString( - trim(balance.symbol as Hex, { dir: 'right' }), - ) - return { ...balance, symbol } - } - throw error - } - } + const { address, blockNumber, blockTag, chainId } = parameters const client = config.getClient({ chainId }) const action = getAction(client, viem_getBalance, 'getBalance') @@ -86,64 +36,7 @@ export async function getBalance( const chain = config.chains.find((x) => x.id === chainId) ?? client.chain! return { decimals: chain.nativeCurrency.decimals, - formatted: formatUnits(value, getUnit(unit)), symbol: chain.nativeCurrency.symbol, value, } } - -type GetTokenBalanceParameters = { - balanceAddress: Address - chainId?: number | undefined - symbolType: 'bytes32' | 'string' - tokenAddress: Address - unit?: Unit | undefined -} - -async function getTokenBalance( - config: Config, - parameters: GetTokenBalanceParameters, -) { - const { balanceAddress, chainId, symbolType, tokenAddress, unit } = parameters - const contract = { - abi: [ - { - type: 'function', - name: 'balanceOf', - stateMutability: 'view', - inputs: [{ type: 'address' }], - outputs: [{ type: 'uint256' }], - }, - { - type: 'function', - name: 'decimals', - stateMutability: 'view', - inputs: [], - outputs: [{ type: 'uint8' }], - }, - { - type: 'function', - name: 'symbol', - stateMutability: 'view', - inputs: [], - outputs: [{ type: symbolType }], - }, - ], - address: tokenAddress, - } as const - const [value, decimals, symbol] = await readContracts(config, { - allowFailure: false, - contracts: [ - { - ...contract, - functionName: 'balanceOf', - args: [balanceAddress], - chainId, - }, - { ...contract, functionName: 'decimals', chainId }, - { ...contract, functionName: 'symbol', chainId }, - ] as const, - }) - const formatted = formatUnits(value ?? '0', getUnit(unit ?? decimals)) - return { decimals, formatted, symbol, value } -} diff --git a/packages/core/src/actions/getChains.test-d.ts b/packages/core/src/actions/getChains.test-d.ts index cd5f04c9c5..56e33f9955 100644 --- a/packages/core/src/actions/getChains.test-d.ts +++ b/packages/core/src/actions/getChains.test-d.ts @@ -1,5 +1,4 @@ import { type chain, config } from '@wagmi/test' -import type { Chain } from 'viem' import { expectTypeOf, test } from 'vitest' import { getChains } from './getChains.js' @@ -8,5 +7,4 @@ test('default', async () => { const chains = getChains(config) expectTypeOf(chains[0]).toEqualTypeOf() expectTypeOf(chains[2]).toEqualTypeOf() - expectTypeOf(chains[3]).toEqualTypeOf() }) diff --git a/packages/core/src/actions/getChains.ts b/packages/core/src/actions/getChains.ts index a91e6e89b4..bd9ba468a5 100644 --- a/packages/core/src/actions/getChains.ts +++ b/packages/core/src/actions/getChains.ts @@ -2,10 +2,8 @@ import type { Chain } from 'viem' import type { Config } from '../createConfig.js' import { deepEqual } from '../utils/deepEqual.js' -export type GetChainsReturnType = readonly [ - ...config['chains'], - ...Chain[], -] +export type GetChainsReturnType = + config['chains'] let previousChains: readonly Chain[] = [] diff --git a/packages/core/src/actions/getAccount.test-d.ts b/packages/core/src/actions/getConnection.test-d.ts similarity index 95% rename from packages/core/src/actions/getAccount.test-d.ts rename to packages/core/src/actions/getConnection.test-d.ts index 728468039b..9c7540a6ac 100644 --- a/packages/core/src/actions/getAccount.test-d.ts +++ b/packages/core/src/actions/getConnection.test-d.ts @@ -3,10 +3,10 @@ import type { Address } from 'viem' import { expectTypeOf, test } from 'vitest' import type { Connector } from '../createConfig.js' -import { getAccount } from './getAccount.js' +import { getConnection } from './getConnection.js' test('states', () => { - const result = getAccount(config) + const result = getConnection(config) switch (result.status) { case 'reconnecting': { diff --git a/packages/core/src/actions/getAccount.test.ts b/packages/core/src/actions/getConnection.test.ts similarity index 79% rename from packages/core/src/actions/getAccount.test.ts rename to packages/core/src/actions/getConnection.test.ts index a538357875..d49f831054 100644 --- a/packages/core/src/actions/getAccount.test.ts +++ b/packages/core/src/actions/getConnection.test.ts @@ -3,10 +3,10 @@ import { expect, test } from 'vitest' import { connect } from './connect.js' import { disconnect } from './disconnect.js' -import { getAccount } from './getAccount.js' +import { getConnection } from './getConnection.js' test('default', () => { - expect(getAccount(config)).toMatchInlineSnapshot(` + expect(getConnection(config)).toMatchInlineSnapshot(` { "address": undefined, "addresses": undefined, @@ -23,15 +23,15 @@ test('default', () => { }) test('behavior: connected', async () => { - let result = getAccount(config) + let result = getConnection(config) expect(result.status).toEqual('disconnected') await connect(config, { connector: config.connectors[0]! }) - result = getAccount(config) + result = getConnection(config) expect(result.address).toBeDefined() expect(result.status).toEqual('connected') await disconnect(config) - result = getAccount(config) + result = getConnection(config) expect(result.status).toEqual('disconnected') }) diff --git a/packages/core/src/actions/getAccount.ts b/packages/core/src/actions/getConnection.ts similarity index 93% rename from packages/core/src/actions/getAccount.ts rename to packages/core/src/actions/getConnection.ts index af5daea028..f7dc4d0600 100644 --- a/packages/core/src/actions/getAccount.ts +++ b/packages/core/src/actions/getConnection.ts @@ -2,7 +2,7 @@ import type { Address, Chain } from 'viem' import type { Config, Connector } from '../createConfig.js' -export type GetAccountReturnType< +export type GetConnectionReturnType< config extends Config = Config, /// chain = Config extends config ? Chain : config['chains'][number], @@ -56,17 +56,17 @@ export type GetAccountReturnType< status: 'disconnected' } -/** https://wagmi.sh/core/api/actions/getAccount */ -export function getAccount( +/** https://wagmi.sh/core/api/actions/getConnection */ +export function getConnection( config: config, -): GetAccountReturnType { +): GetConnectionReturnType { const uid = config.state.current! const connection = config.state.connections.get(uid) const addresses = connection?.accounts const address = addresses?.[0] const chain = config.chains.find( (chain) => chain.id === connection?.chainId, - ) as GetAccountReturnType['chain'] + ) as GetConnectionReturnType['chain'] const status = config.state.status switch (status) { diff --git a/packages/core/src/actions/getToken.test.ts b/packages/core/src/actions/getToken.test.ts deleted file mode 100644 index 89db41e39a..0000000000 --- a/packages/core/src/actions/getToken.test.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { config } from '@wagmi/test' -import { expect, test } from 'vitest' - -import { getToken } from './getToken.js' - -test('default', async () => { - await expect( - getToken(config, { - address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', - }), - ).resolves.toMatchInlineSnapshot(` - { - "address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", - "decimals": 18, - "name": "Uniswap", - "symbol": "UNI", - "totalSupply": { - "formatted": "1000000000", - "value": 1000000000000000000000000000n, - }, - } - `) -}) - -test('parameters: formatUnits', async () => { - await expect( - getToken(config, { - address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', - formatUnits: 'gwei', - }), - ).resolves.toMatchInlineSnapshot(` - { - "address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", - "decimals": 18, - "name": "Uniswap", - "symbol": "UNI", - "totalSupply": { - "formatted": "1000000000000000000", - "value": 1000000000000000000000000000n, - }, - } - `) -}) - -test('behavior: bytes32 token', async () => { - await expect( - getToken(config, { - address: '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2', - }), - ).resolves.toMatchInlineSnapshot(` - { - "address": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "decimals": 18, - "name": "Maker", - "symbol": "MKR", - "totalSupply": { - "formatted": "162835.296901475737319804", - "value": 162835296901475737319804n, - }, - } - `) -}) - -test('behavior: bogus token', async () => { - await expect( - getToken(config, { - address: '0xa0cf798816d4b9b9866b5330eea46a18382f251e', - }), - ).rejects.toThrowErrorMatchingInlineSnapshot(` - [ContractFunctionExecutionError: The contract function "decimals" returned no data ("0x"). - - This could be due to any of the following: - - The contract does not have the function "decimals", - - The parameters passed to the contract function may be invalid, or - - The address is not a contract. - - Contract Call: - address: 0xa0cf798816d4b9b9866b5330eea46a18382f251e - function: decimals() - - Docs: https://viem.sh/docs/contract/multicall - Version: viem@2.38.0] - `) -}) diff --git a/packages/core/src/actions/getToken.ts b/packages/core/src/actions/getToken.ts deleted file mode 100644 index 480a742820..0000000000 --- a/packages/core/src/actions/getToken.ts +++ /dev/null @@ -1,141 +0,0 @@ -import type { Address, Hex } from 'viem' -import { - ContractFunctionExecutionError, - formatUnits, - hexToString, - trim, -} from 'viem' - -import type { Config } from '../createConfig.js' -import type { ChainIdParameter } from '../types/properties.js' -import type { Unit } from '../types/unit.js' -import type { Compute } from '../types/utils.js' -import { getUnit } from '../utils/getUnit.js' -import { type ReadContractsErrorType, readContracts } from './readContracts.js' - -export type GetTokenParameters = Compute< - ChainIdParameter & { - address: Address - formatUnits?: Unit | undefined - } -> - -export type GetTokenReturnType = { - address: Address - decimals: number - name: string | undefined - symbol: string | undefined - totalSupply: { - formatted: string - value: bigint - } -} - -export type GetTokenErrorType = ReadContractsErrorType - -/** @deprecated */ -export async function getToken( - config: config, - parameters: GetTokenParameters, -): Promise { - const { address, chainId, formatUnits: unit = 18 } = parameters - - function getAbi(type: type) { - return [ - { - type: 'function', - name: 'decimals', - stateMutability: 'view', - inputs: [], - outputs: [{ type: 'uint8' }], - }, - { - type: 'function', - name: 'name', - stateMutability: 'view', - inputs: [], - outputs: [{ type }], - }, - { - type: 'function', - name: 'symbol', - stateMutability: 'view', - inputs: [], - outputs: [{ type }], - }, - { - type: 'function', - name: 'totalSupply', - stateMutability: 'view', - inputs: [], - outputs: [{ type: 'uint256' }], - }, - ] as const - } - - try { - const abi = getAbi('string') - const contractConfig = { address, abi, chainId } as const - const [decimals, name, symbol, totalSupply] = await readContracts(config, { - allowFailure: true, - contracts: [ - { ...contractConfig, functionName: 'decimals' }, - { ...contractConfig, functionName: 'name' }, - { ...contractConfig, functionName: 'symbol' }, - { ...contractConfig, functionName: 'totalSupply' }, - ] as const, - }) - - // throw if `name` or `symbol` failed - if (name.error instanceof ContractFunctionExecutionError) throw name.error - if (symbol.error instanceof ContractFunctionExecutionError) - throw symbol.error - - // `decimals` and `totalSupply` are required - if (decimals.error) throw decimals.error - if (totalSupply.error) throw totalSupply.error - - return { - address, - decimals: decimals.result, - name: name.result, - symbol: symbol.result, - totalSupply: { - formatted: formatUnits(totalSupply.result!, getUnit(unit)), - value: totalSupply.result, - }, - } - } catch (error) { - // In the chance that there is an error upon decoding the contract result, - // it could be likely that the contract data is represented as bytes32 instead - // of a string. - if (error instanceof ContractFunctionExecutionError) { - const abi = getAbi('bytes32') - const contractConfig = { address, abi, chainId } as const - const [decimals, name, symbol, totalSupply] = await readContracts( - config, - { - allowFailure: false, - contracts: [ - { ...contractConfig, functionName: 'decimals' }, - { ...contractConfig, functionName: 'name' }, - { ...contractConfig, functionName: 'symbol' }, - { ...contractConfig, functionName: 'totalSupply' }, - ] as const, - }, - ) - return { - address, - decimals, - name: hexToString(trim(name as Hex, { dir: 'right' })), - symbol: hexToString(trim(symbol as Hex, { dir: 'right' })), - totalSupply: { - formatted: formatUnits(totalSupply, getUnit(unit)), - value: totalSupply, - }, - } - } - - throw error - } -} diff --git a/packages/core/src/actions/prepareTransactionRequest.ts b/packages/core/src/actions/prepareTransactionRequest.ts index 36ed81f774..3e9d126e97 100644 --- a/packages/core/src/actions/prepareTransactionRequest.ts +++ b/packages/core/src/actions/prepareTransactionRequest.ts @@ -19,7 +19,7 @@ import type { UnionStrictOmit, } from '../types/utils.js' import { getAction } from '../utils/getAction.js' -import { getAccount } from './getAccount.js' +import { getConnection } from './getConnection.js' export type PrepareTransactionRequestParameters< config extends Config = Config, @@ -108,7 +108,7 @@ export async function prepareTransactionRequest< ): Promise> { const { account: account_, chainId, ...rest } = parameters - const account = account_ ?? getAccount(config).address + const account = account_ ?? getConnection(config).address const client = config.getClient({ chainId }) const action = getAction( diff --git a/packages/core/src/actions/readContracts.test.ts b/packages/core/src/actions/readContracts.test.ts index 81908018a3..3b72e1aece 100644 --- a/packages/core/src/actions/readContracts.test.ts +++ b/packages/core/src/actions/readContracts.test.ts @@ -84,7 +84,7 @@ test('default', async () => { `) }) -test.skip('falls back to readContract if multicall is not available', async () => { +test('falls back to readContract if multicall is not available', async () => { const spy = vi.spyOn(readContract, 'readContract') const config = createConfig({ chains: [mainnet, { ...mainnet2, contracts: { multicall3: undefined } }], @@ -158,7 +158,7 @@ test.skip('falls back to readContract if multicall is not available', async () = `) }) -test.skip('multichain', async () => { +test('multichain', async () => { const config = createConfig({ chains: [mainnet, mainnet2, optimism], transports: { @@ -207,28 +207,28 @@ test.skip('multichain', async () => { args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', 0n], }, ] as const - const optimismContracts = [ - { - abi: abi.erc20, - address: address.optimism.usdc, - chainId: optimism.id, - functionName: 'symbol', - }, - { - abi: abi.erc20, - address: address.optimism.usdc, - chainId: optimism.id, - functionName: 'balanceOf', - args: ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'], - }, - ] as const + // const optimismContracts = [ + // { + // abi: abi.erc20, + // address: address.optimism.usdc, + // chainId: optimism.id, + // functionName: 'symbol', + // }, + // { + // abi: abi.erc20, + // address: address.optimism.usdc, + // chainId: optimism.id, + // functionName: 'balanceOf', + // args: ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'], + // }, + // ] as const const results = await readContracts(config, { contracts: [ mainnetContracts[0]!, - optimismContracts[0]!, + // optimismContracts[0]!, mainnetContracts[1]!, mainnet2Contracts[0]!, - optimismContracts[1]!, + // optimismContracts[1]!, mainnet2Contracts[1]!, mainnetContracts[2]!, ], @@ -236,10 +236,10 @@ test.skip('multichain', async () => { expectTypeOf(results).toEqualTypeOf< [ MulticallResponse, - MulticallResponse, + // MulticallResponse, MulticallResponse, MulticallResponse, - MulticallResponse, + // MulticallResponse, MulticallResponse, MulticallResponse, ] @@ -263,10 +263,6 @@ test.skip('multichain', async () => { "result": 2n, "status": "success", }, - { - "result": "USDC", - "status": "success", - }, { "result": 1n, "status": "success", @@ -275,10 +271,6 @@ test.skip('multichain', async () => { "result": false, "status": "success", }, - { - "result": 10959340n, - "status": "success", - }, { "result": 370395n, "status": "success", @@ -289,11 +281,11 @@ test.skip('multichain', async () => { }, ] `) -}) +}, 60_000) -test('multi-chain: falls back to readContract if multicall is not available', async () => { +test('multichain: falls back to readContract if multicall is not available', async () => { const config = createConfig({ - chains: [mainnet, { ...optimism, contracts: { multicall3: undefined } }], + chains: [{ ...mainnet, contracts: { multicall3: undefined } }, optimism], transports: { [mainnet.id]: http(), [optimism.id]: http(), @@ -317,39 +309,39 @@ test('multi-chain: falls back to readContract if multicall is not available', as args: ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'], }, ] as const - const optimismContracts = [ - { - abi: abi.erc20, - address: address.optimism.usdc, - chainId: optimism.id, - functionName: 'symbol', - }, - { - abi: abi.erc20, - address: address.optimism.usdc, - chainId: optimism.id, - functionName: 'balanceOf', - args: ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'], - }, - ] as const + // const optimismContracts = [ + // { + // abi: abi.erc20, + // address: address.optimism.usdc, + // chainId: optimism.id, + // functionName: 'symbol', + // }, + // { + // abi: abi.erc20, + // address: address.optimism.usdc, + // chainId: optimism.id, + // functionName: 'balanceOf', + // args: ['0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'], + // }, + // ] as const const results = await readContracts(config, { - contracts: [...mainnetContracts, ...optimismContracts], + contracts: [...mainnetContracts /** ...optimismContracts */], }) expectTypeOf(results).toEqualTypeOf< [ MulticallResponse, MulticallResponse, - MulticallResponse, - MulticallResponse, + // MulticallResponse, + // MulticallResponse, ] >() for (const contract of mainnetContracts) { expect(spy).toBeCalledWith(config, { ...contract, chainId: mainnet.id }) } - for (const contract of optimismContracts) { - expect(spy).toBeCalledWith(config, { ...contract, chainId: optimism.id }) - } + // for (const contract of optimismContracts) { + // expect(spy).toBeCalledWith(config, { ...contract, chainId: optimism.id }) + // } expect(results).toMatchInlineSnapshot(` [ { @@ -360,17 +352,9 @@ test('multi-chain: falls back to readContract if multicall is not available', as "result": 1n, "status": "success", }, - { - "result": "USDC", - "status": "success", - }, - { - "result": 10959340n, - "status": "success", - }, ] `) -}) +}, 15_000) test('throws if allowFailure=false & a contract method fails', async () => { await expect( diff --git a/packages/core/src/actions/signMessage.test.ts b/packages/core/src/actions/signMessage.test.ts index ebc45ef1d0..e5c9e7e027 100644 --- a/packages/core/src/actions/signMessage.test.ts +++ b/packages/core/src/actions/signMessage.test.ts @@ -6,7 +6,7 @@ import { expect, test } from 'vitest' import { mock } from '../connectors/mock.js' import { connect } from './connect.js' import { disconnect } from './disconnect.js' -import { getAccount } from './getAccount.js' +import { getConnection } from './getConnection.js' import { signMessage } from './signMessage.js' const connector = config.connectors[0]! @@ -19,7 +19,7 @@ test('default', async () => { message: 'foo bar baz', signature, }), - ).resolves.toEqual(getAccount(config).address) + ).resolves.toEqual(getConnection(config).address) await disconnect(config, { connector }) }) diff --git a/packages/core/src/actions/signTypedData.test.ts b/packages/core/src/actions/signTypedData.test.ts index 65d99ef697..3a7297c17d 100644 --- a/packages/core/src/actions/signTypedData.test.ts +++ b/packages/core/src/actions/signTypedData.test.ts @@ -5,7 +5,7 @@ import { expect, test } from 'vitest' import { mock } from '../connectors/mock.js' import { connect } from './connect.js' import { disconnect } from './disconnect.js' -import { getAccount } from './getAccount.js' +import { getConnection } from './getConnection.js' import { signTypedData } from './signTypedData.js' const connector = config.connectors[0]! @@ -24,7 +24,7 @@ test('default', async () => { message: typedData.basic.message, signature, }), - ).resolves.toBe(getAccount(config).address) + ).resolves.toBe(getConnection(config).address) await disconnect(config, { connector }) }) diff --git a/packages/core/src/actions/switchChain.test.ts b/packages/core/src/actions/switchChain.test.ts index 512045d8d7..cc6b3a2e94 100644 --- a/packages/core/src/actions/switchChain.test.ts +++ b/packages/core/src/actions/switchChain.test.ts @@ -4,7 +4,7 @@ import { expect, test } from 'vitest' import { mock } from '../connectors/mock.js' import { connect } from './connect.js' import { disconnect } from './disconnect.js' -import { getAccount } from './getAccount.js' +import { getConnection } from './getConnection.js' import { switchChain } from './switchChain.js' const connector = config.connectors[0]! @@ -12,17 +12,17 @@ const connector = config.connectors[0]! test('default', async () => { await connect(config, { connector }) - const chainId1 = getAccount(config).chainId + const chainId1 = getConnection(config).chainId await switchChain(config, { chainId: chain.mainnet2.id }) - const chainId2 = getAccount(config).chainId + const chainId2 = getConnection(config).chainId expect(chainId2).toBeDefined() expect(chainId1).not.toBe(chainId2) await switchChain(config, { chainId: chain.mainnet.id }) - const chainId3 = getAccount(config).chainId + const chainId3 = getConnection(config).chainId expect(chainId3).toBeDefined() expect(chainId1).toBe(chainId3) diff --git a/packages/core/src/actions/switchAccount.test.ts b/packages/core/src/actions/switchConnection.test.ts similarity index 62% rename from packages/core/src/actions/switchAccount.test.ts rename to packages/core/src/actions/switchConnection.test.ts index 97d0e84b37..733b582e39 100644 --- a/packages/core/src/actions/switchAccount.test.ts +++ b/packages/core/src/actions/switchConnection.test.ts @@ -3,8 +3,8 @@ import { expect, test } from 'vitest' import { connect } from './connect.js' import { disconnect } from './disconnect.js' -import { getAccount } from './getAccount.js' -import { switchAccount } from './switchAccount.js' +import { getConnection } from './getConnection.js' +import { switchConnection } from './switchConnection.js' const connector1 = config.connectors[0]! const connector2 = config.connectors[1]! @@ -13,17 +13,17 @@ test('default', async () => { await connect(config, { connector: connector2 }) await connect(config, { connector: connector1 }) - const address1 = getAccount(config).address + const address1 = getConnection(config).address - await switchAccount(config, { connector: connector2 }) + await switchConnection(config, { connector: connector2 }) - const address2 = getAccount(config).address + const address2 = getConnection(config).address expect(address2).toBeDefined() expect(address1).not.toBe(address2) - await switchAccount(config, { connector: connector1 }) + await switchConnection(config, { connector: connector1 }) - const address3 = getAccount(config).address + const address3 = getConnection(config).address expect(address3).toBeDefined() expect(address1).toBe(address3) diff --git a/packages/core/src/actions/switchAccount.ts b/packages/core/src/actions/switchConnection.ts similarity index 71% rename from packages/core/src/actions/switchAccount.ts rename to packages/core/src/actions/switchConnection.ts index ec577a57c7..6cec5c809f 100644 --- a/packages/core/src/actions/switchAccount.ts +++ b/packages/core/src/actions/switchConnection.ts @@ -7,27 +7,27 @@ import { type ConnectorNotConnectedErrorType, } from '../errors/config.js' -export type SwitchAccountParameters = { +export type SwitchConnectionParameters = { connector: Connector } -export type SwitchAccountReturnType = { +export type SwitchConnectionReturnType = { accounts: readonly [Address, ...Address[]] chainId: | config['chains'][number]['id'] | (number extends config['chains'][number]['id'] ? number : number & {}) } -export type SwitchAccountErrorType = +export type SwitchConnectionErrorType = | ConnectorNotConnectedErrorType | BaseError | ErrorType -/** https://wagmi.sh/core/api/actions/switchAccount */ -export async function switchAccount( +/** https://wagmi.sh/core/api/actions/switchConnection */ +export async function switchConnection( config: config, - parameters: SwitchAccountParameters, -): Promise> { + parameters: SwitchConnectionParameters, +): Promise> { const { connector } = parameters const connection = config.state.connections.get(connector.uid) diff --git a/packages/core/src/actions/watchAccount.ts b/packages/core/src/actions/watchAccount.ts deleted file mode 100644 index dfa8ae4908..0000000000 --- a/packages/core/src/actions/watchAccount.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { Config } from '../createConfig.js' -import { deepEqual } from '../utils/deepEqual.js' -import { type GetAccountReturnType, getAccount } from './getAccount.js' - -export type WatchAccountParameters = { - onChange( - account: GetAccountReturnType, - prevAccount: GetAccountReturnType, - ): void -} - -export type WatchAccountReturnType = () => void - -/** https://wagmi.sh/core/api/actions/watchAccount */ -export function watchAccount( - config: config, - parameters: WatchAccountParameters, -): WatchAccountReturnType { - const { onChange } = parameters - - return config.subscribe(() => getAccount(config), onChange, { - equalityFn(a, b) { - const { connector: aConnector, ...aRest } = a - const { connector: bConnector, ...bRest } = b - return ( - deepEqual(aRest, bRest) && - // check connector separately - aConnector?.id === bConnector?.id && - aConnector?.uid === bConnector?.uid - ) - }, - }) -} diff --git a/packages/core/src/actions/watchAccount.test.ts b/packages/core/src/actions/watchConnection.test.ts similarity index 70% rename from packages/core/src/actions/watchAccount.test.ts rename to packages/core/src/actions/watchConnection.test.ts index 3687f0811c..26de7a6f9f 100644 --- a/packages/core/src/actions/watchAccount.test.ts +++ b/packages/core/src/actions/watchConnection.test.ts @@ -4,20 +4,20 @@ import { expect, test } from 'vitest' import { connect } from './connect.js' import { disconnect } from './disconnect.js' -import { watchAccount } from './watchAccount.js' +import { watchConnection } from './watchConnection.js' test('default', async () => { - const accounts: { address: Address | undefined; status: string }[] = [] - const unwatch = watchAccount(config, { + const connections: { address: Address | undefined; status: string }[] = [] + const unwatch = watchConnection(config, { onChange(data) { - accounts.push({ address: data.address, status: data.status }) + connections.push({ address: data.address, status: data.status }) }, }) await connect(config, { connector: config.connectors[0]! }) await disconnect(config) - expect(accounts).toMatchInlineSnapshot(` + expect(connections).toMatchInlineSnapshot(` [ { "address": undefined, diff --git a/packages/core/src/actions/watchConnection.ts b/packages/core/src/actions/watchConnection.ts new file mode 100644 index 0000000000..a1b6b22e19 --- /dev/null +++ b/packages/core/src/actions/watchConnection.ts @@ -0,0 +1,33 @@ +import type { Config } from '../createConfig.js' +import { deepEqual } from '../utils/deepEqual.js' +import { type GetConnectionReturnType, getConnection } from './getConnection.js' + +export type WatchConnectionParameters = { + onChange( + connection: GetConnectionReturnType, + prevConnection: GetConnectionReturnType, + ): void +} + +export type WatchConnectionReturnType = () => void + +/** https://wagmi.sh/core/api/actions/watchConnection */ +export function watchConnection( + config: config, + parameters: WatchConnectionParameters, +): WatchConnectionReturnType { + const { onChange } = parameters + + return config.subscribe(() => getConnection(config), onChange, { + equalityFn(a, b) { + const { connector: aConnector, ...aRest } = a + const { connector: bConnector, ...bRest } = b + return ( + deepEqual(aRest, bRest) && + // check connector separately + aConnector?.id === bConnector?.id && + aConnector?.uid === bConnector?.uid + ) + }, + }) +} diff --git a/packages/core/src/actions/watchContractEvent.test.ts b/packages/core/src/actions/watchContractEvent.test.ts index 438792d9fa..afd2936158 100644 --- a/packages/core/src/actions/watchContractEvent.test.ts +++ b/packages/core/src/actions/watchContractEvent.test.ts @@ -7,13 +7,13 @@ import { transactionHashRegex, wait, } from '@wagmi/test' -import { createWalletClient, http, parseEther } from 'viem' +import { createWalletClient, erc20Abi, http, parseEther } from 'viem' import type { WatchEventOnLogsParameter } from 'viem/actions' import { beforeEach, expect, test } from 'vitest' import { connect } from './connect.js' import { disconnect } from './disconnect.js' -import { getBalance } from './getBalance.js' +import { readContract } from './readContract.js' import { watchContractEvent } from './watchContractEvent.js' import { writeContract } from './writeContract.js' @@ -53,11 +53,13 @@ test('default', async () => { address: address.usdcHolder, }) - const balance = await getBalance(config, { - address: connectedAddress, - token: address.usdc, + const balance = await readContract(config, { + address: address.usdc, + abi: erc20Abi, + functionName: 'balanceOf', + args: [connectedAddress], }) - expect(balance.value).toBeGreaterThan(0n) + expect(balance).toBeGreaterThan(0n) // start watching transfer events let logs: WatchEventOnLogsParameter = [] diff --git a/packages/core/src/actions/writeContract.ts b/packages/core/src/actions/writeContract.ts index a3227f9c8c..63377e5331 100644 --- a/packages/core/src/actions/writeContract.ts +++ b/packages/core/src/actions/writeContract.ts @@ -59,10 +59,7 @@ export type WriteContractParameters< > }[number] & Compute> & - ConnectorParameter & { - /** @deprecated */ - __mode?: 'prepared' - } + ConnectorParameter > export type WriteContractReturnType = viem_WriteContractReturnType diff --git a/packages/core/src/connectors/createConnector.ts b/packages/core/src/connectors/createConnector.ts index 7d77b4d4a9..bf2d05e21b 100644 --- a/packages/core/src/connectors/createConnector.ts +++ b/packages/core/src/connectors/createConnector.ts @@ -38,8 +38,6 @@ export type CreateConnectorFn< readonly id: string readonly name: string readonly rdns?: string | readonly string[] | undefined - /** @deprecated */ - readonly supportsSimulation?: boolean | undefined readonly type: string setup?(): Promise diff --git a/packages/core/src/connectors/injected.ts b/packages/core/src/connectors/injected.ts index 05f04d6ca2..99444164b7 100644 --- a/packages/core/src/connectors/injected.ts +++ b/packages/core/src/connectors/injected.ts @@ -88,10 +88,6 @@ export function injected(parameters: InjectedParameters = {}) { get name() { return getTarget().name }, - /** @deprecated */ - get supportsSimulation() { - return true - }, type: injected.type, async setup() { const provider = await this.getProvider() diff --git a/packages/core/src/experimental/actions/writeContracts.test.ts b/packages/core/src/experimental/actions/writeContracts.test.ts deleted file mode 100644 index b74cd780ef..0000000000 --- a/packages/core/src/experimental/actions/writeContracts.test.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { abi, address, config } from '@wagmi/test' -import { expect, test } from 'vitest' - -import { connect } from '../../actions/connect.js' -import { disconnect } from '../../actions/disconnect.js' -import { writeContracts } from './writeContracts.js' - -const connector = config.connectors[0]! - -test('default', async () => { - await connect(config, { connector }) - await expect( - writeContracts(config, { - contracts: [ - { - abi: abi.wagmiMintExample, - address: address.wagmiMintExample, - functionName: 'mint', - }, - { - abi: abi.wagmiMintExample, - address: address.wagmiMintExample, - functionName: 'mint', - }, - { - abi: abi.wagmiMintExample, - address: address.wagmiMintExample, - functionName: 'mint', - }, - ], - }), - ).resolves.toMatchInlineSnapshot( - ` - { - "id": "0x8913636bd97cf4bcc0a6343c730905a27ead0f7480ff82190072e916439eb212", - } - `, - ) - await disconnect(config, { connector }) -}) - -test('behavior: not connected', async () => { - await expect( - writeContracts(config, { - contracts: [ - { - abi: abi.wagmiMintExample, - address: address.wagmiMintExample, - functionName: 'mint', - }, - { - abi: abi.wagmiMintExample, - address: address.wagmiMintExample, - functionName: 'mint', - }, - { - abi: abi.wagmiMintExample, - address: address.wagmiMintExample, - functionName: 'mint', - }, - ], - }), - ).rejects.toThrowErrorMatchingInlineSnapshot(` - [ConnectorNotConnectedError: Connector not connected. - - Version: @wagmi/core@x.y.z] - `) -}) - -test('behavior: account does not exist on connector', async () => { - await connect(config, { connector }) - await expect( - writeContracts(config, { - account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', - contracts: [ - { - abi: abi.wagmiMintExample, - address: address.wagmiMintExample, - functionName: 'mint', - }, - { - abi: abi.wagmiMintExample, - address: address.wagmiMintExample, - functionName: 'mint', - }, - { - abi: abi.wagmiMintExample, - address: address.wagmiMintExample, - functionName: 'mint', - }, - ], - }), - ).rejects.toThrowErrorMatchingInlineSnapshot(` - [ConnectorAccountNotFoundError: Account "0xA0Cf798816D4b9b9866b5330EEa46a18382f251e" not found for connector "Mock Connector". - - Version: @wagmi/core@x.y.z] - `) - await disconnect(config, { connector }) -}) diff --git a/packages/core/src/experimental/actions/writeContracts.ts b/packages/core/src/experimental/actions/writeContracts.ts deleted file mode 100644 index 5c396d60d8..0000000000 --- a/packages/core/src/experimental/actions/writeContracts.ts +++ /dev/null @@ -1,79 +0,0 @@ -import type { Account, Chain, ContractFunctionParameters } from 'viem' -import { - type WriteContractsErrorType as viem_WriteContractsErrorType, - type WriteContractsParameters as viem_WriteContractsParameters, - type WriteContractsReturnType as viem_WriteContractsReturnType, - writeContracts as viem_writeContracts, -} from 'viem/experimental' - -import { - type GetConnectorClientErrorType, - getConnectorClient, -} from '../../actions/getConnectorClient.js' -import type { Config } from '../../createConfig.js' -import type { BaseErrorType, ErrorType } from '../../errors/base.js' -import type { SelectChains } from '../../types/chain.js' -import type { - ChainIdParameter, - ConnectorParameter, -} from '../../types/properties.js' -import type { Compute } from '../../types/utils.js' - -export type WriteContractsParameters< - contracts extends readonly unknown[] = readonly ContractFunctionParameters[], - config extends Config = Config, - chainId extends - config['chains'][number]['id'] = config['chains'][number]['id'], - /// - chains extends readonly Chain[] = SelectChains, -> = { - [key in keyof chains]: Compute< - Omit< - viem_WriteContractsParameters< - contracts, - chains[key], - Account, - chains[key] - >, - 'chain' - > & - ChainIdParameter & - ConnectorParameter - > -}[number] - -export type WriteContractsReturnType = viem_WriteContractsReturnType - -export type WriteContractsErrorType = - // getConnectorClient() - | GetConnectorClientErrorType - // base - | BaseErrorType - | ErrorType - // viem - | viem_WriteContractsErrorType - -/** https://wagmi.sh/core/api/actions/writeContracts */ -export async function writeContracts< - const contracts extends readonly unknown[], - config extends Config, - chainId extends config['chains'][number]['id'], ->( - config: config, - parameters: WriteContractsParameters, -): Promise { - const { account, chainId, connector, ...rest } = parameters - - const client = await getConnectorClient(config, { - account, - assertChainId: false, - chainId, - connector, - }) - - return viem_writeContracts(client, { - ...(rest as any), - ...(account ? { account } : {}), - chain: chainId ? { id: chainId } : undefined, - }) -} diff --git a/packages/core/src/experimental/query/writeContracts.ts b/packages/core/src/experimental/query/writeContracts.ts deleted file mode 100644 index 192a842ca0..0000000000 --- a/packages/core/src/experimental/query/writeContracts.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { MutateOptions, MutationOptions } from '@tanstack/query-core' - -import type { Config } from '../../createConfig.js' -import type { Compute } from '../../types/utils.js' -import { - type WriteContractsErrorType, - type WriteContractsParameters, - type WriteContractsReturnType, - writeContracts, -} from '../actions/writeContracts.js' - -export function writeContractsMutationOptions< - const contracts extends readonly unknown[], - config extends Config, ->(config: config) { - return { - mutationFn(variables) { - return writeContracts(config, variables as any) as any - }, - mutationKey: ['writeContracts'], - } as const satisfies MutationOptions< - WriteContractsData, - WriteContractsErrorType, - WriteContractsVariables - > -} - -export type WriteContractsData = Compute - -export type WriteContractsVariables< - contracts extends readonly unknown[], - config extends Config, - chainId extends config['chains'][number]['id'], -> = WriteContractsParameters - -export type WriteContractsMutate< - contracts extends readonly unknown[], - config extends Config, - context = unknown, -> = ( - variables: WriteContractsVariables, - options?: - | Compute< - MutateOptions< - WriteContractsData, - WriteContractsErrorType, - Compute>, - context - > - > - | undefined, -) => void - -export type WriteContractsMutateAsync< - contracts extends readonly unknown[], - config extends Config, - context = unknown, -> = ( - variables: WriteContractsVariables, - options?: - | Compute< - MutateOptions< - WriteContractsData, - WriteContractsErrorType, - Compute>, - context - > - > - | undefined, -) => Promise diff --git a/packages/core/src/exports/actions.test.ts b/packages/core/src/exports/actions.test.ts index 69183c0724..95610ec70e 100644 --- a/packages/core/src/exports/actions.test.ts +++ b/packages/core/src/exports/actions.test.ts @@ -12,12 +12,9 @@ test('exports', () => { "estimateFeesPerGas", "estimateGas", "estimateMaxPriorityFeePerGas", - "getAccount", "getBalance", - "fetchBalance", "getBlock", "getBlockNumber", - "fetchBlockNumber", "getBlockTransactionCount", "getBytecode", "getCallsStatus", @@ -25,27 +22,22 @@ test('exports', () => { "getChainId", "getChains", "getClient", + "getAccount", + "getConnection", "getConnections", "getConnectorClient", "getConnectors", "getEnsAddress", - "fetchEnsAddress", "getEnsAvatar", - "fetchEnsAvatar", "getEnsName", - "fetchEnsName", "getEnsResolver", - "fetchEnsResolver", "getEnsText", "getFeeHistory", "getGasPrice", "getProof", "getPublicClient", "getStorageAt", - "getToken", - "fetchToken", "getTransaction", - "fetchTransaction", "getTransactionConfirmations", "getTransactionCount", "getTransactionReceipt", @@ -61,20 +53,20 @@ test('exports', () => { "signMessage", "signTypedData", "simulateContract", - "switchAccount", "switchChain", - "switchNetwork", + "switchAccount", + "switchConnection", "verifyMessage", "verifyTypedData", "waitForCallsStatus", "waitForTransactionReceipt", - "waitForTransaction", - "watchAccount", "watchAsset", "watchBlockNumber", "watchBlocks", "watchChainId", "watchClient", + "watchAccount", + "watchConnection", "watchConnections", "watchConnectors", "watchContractEvent", diff --git a/packages/core/src/exports/actions.ts b/packages/core/src/exports/actions.ts index 539e4afea2..4fab816aa9 100644 --- a/packages/core/src/exports/actions.ts +++ b/packages/core/src/exports/actions.ts @@ -30,12 +30,14 @@ export { type DisconnectReturnType, disconnect, } from '../actions/disconnect.js' + export { type EstimateFeesPerGasErrorType, type EstimateFeesPerGasParameters, type EstimateFeesPerGasReturnType, estimateFeesPerGas, } from '../actions/estimateFeesPerGas.js' + export { type EstimateGasErrorType, type EstimateGasParameters, @@ -50,18 +52,11 @@ export { estimateMaxPriorityFeePerGas, } from '../actions/estimateMaxPriorityFeePerGas.js' -export { - type GetAccountReturnType, - getAccount, -} from '../actions/getAccount.js' - export { type GetBalanceErrorType, type GetBalanceParameters, type GetBalanceReturnType, getBalance, - /** @deprecated use `getBalance` instead */ - getBalance as fetchBalance, } from '../actions/getBalance.js' export { @@ -76,8 +71,6 @@ export { type GetBlockNumberParameters, type GetBlockNumberReturnType, getBlockNumber, - /** @deprecated use `getBlockNumber` instead */ - getBlockNumber as fetchBlockNumber, } from '../actions/getBlockNumber.js' export { @@ -124,6 +117,15 @@ export { getClient, } from '../actions/getClient.js' +export { + /** @deprecated use `GetConnectionReturnType` instead */ + type GetConnectionReturnType as GetAccountReturnType, + type GetConnectionReturnType, + /** @deprecated use `getConnection` instead */ + getConnection as getAccount, + getConnection, +} from '../actions/getConnection.js' + export { type GetConnectionsReturnType, getConnections, @@ -144,8 +146,6 @@ export { type GetEnsAddressParameters, type GetEnsAddressReturnType, getEnsAddress, - /** @deprecated use `getEnsAddress` instead */ - getEnsAddress as fetchEnsAddress, } from '../actions/getEnsAddress.js' export { @@ -153,8 +153,6 @@ export { type GetEnsAvatarParameters, type GetEnsAvatarReturnType, getEnsAvatar, - /** @deprecated use `getEnsAvatar` instead */ - getEnsAvatar as fetchEnsAvatar, } from '../actions/getEnsAvatar.js' export { @@ -162,8 +160,6 @@ export { type GetEnsNameParameters, type GetEnsNameReturnType, getEnsName, - /** @deprecated */ - getEnsName as fetchEnsName, } from '../actions/getEnsName.js' export { @@ -171,8 +167,6 @@ export { type GetEnsResolverParameters, type GetEnsResolverReturnType, getEnsResolver, - /** @deprecated use `getEnsResolver` instead */ - getEnsResolver as fetchEnsResolver, } from '../actions/getEnsResolver.js' export { @@ -216,22 +210,11 @@ export { getStorageAt, } from '../actions/getStorageAt.js' -export { - type GetTokenErrorType, - type GetTokenParameters, - type GetTokenReturnType, - getToken, - /** @deprecated use `getToken` instead */ - getToken as fetchToken, -} from '../actions/getToken.js' - export { type GetTransactionErrorType, type GetTransactionParameters, type GetTransactionReturnType, getTransaction, - /** @deprecated use `getTransaction` instead */ - getTransaction as fetchTransaction, } from '../actions/getTransaction.js' export { @@ -338,22 +321,28 @@ export { simulateContract, } from '../actions/simulateContract.js' -export { - type SwitchAccountErrorType, - type SwitchAccountParameters, - type SwitchAccountReturnType, - switchAccount, -} from '../actions/switchAccount.js' - export { type SwitchChainErrorType, type SwitchChainParameters, type SwitchChainReturnType, switchChain, - /** @deprecated use `switchChain` instead */ - switchChain as switchNetwork, } from '../actions/switchChain.js' +export { + /** @deprecated use `SwitchConnectionErrorType` instead */ + type SwitchConnectionErrorType as SwitchAccountErrorType, + type SwitchConnectionErrorType, + /** @deprecated use `SwitchConnectionParameters` instead */ + type SwitchConnectionParameters as SwitchAccountParameters, + type SwitchConnectionParameters, + /** @deprecated use `SwitchConnectionReturnType` instead */ + type SwitchConnectionReturnType as SwitchAccountReturnType, + type SwitchConnectionReturnType, + /** @deprecated use `switchConnection` instead */ + switchConnection as switchAccount, + switchConnection, +} from '../actions/switchConnection.js' + export { type VerifyMessageParameters, type VerifyMessageReturnType, @@ -372,19 +361,14 @@ export { type WaitForCallsStatusReturnType, waitForCallsStatus, } from '../actions/waitForCallsStatus.js' + export { type WaitForTransactionReceiptErrorType, type WaitForTransactionReceiptParameters, type WaitForTransactionReceiptReturnType, waitForTransactionReceipt, - /** @deprecated use `waitForTransactionReceipt` instead */ - waitForTransactionReceipt as waitForTransaction, } from '../actions/waitForTransactionReceipt.js' -export { - type WatchAccountParameters, - type WatchAccountReturnType, - watchAccount, -} from '../actions/watchAccount.js' + export { type WatchAssetParameters, type WatchAssetReturnType, @@ -396,41 +380,61 @@ export { type WatchBlockNumberReturnType, watchBlockNumber, } from '../actions/watchBlockNumber.js' + export { type WatchBlocksParameters, type WatchBlocksReturnType, watchBlocks, } from '../actions/watchBlocks.js' + export { type WatchChainIdParameters, type WatchChainIdReturnType, watchChainId, } from '../actions/watchChainId.js' + export { type WatchClientParameters, type WatchClientReturnType, watchClient, } from '../actions/watchClient.js' + +export { + /** @deprecated use `WatchConnectionParameters` instead */ + type WatchConnectionParameters as WatchAccountParameters, + type WatchConnectionParameters, + /** @deprecated use `WatchConnectionReturnType` instead */ + type WatchConnectionReturnType as WatchAccountReturnType, + type WatchConnectionReturnType, + /** @deprecated use `watchConnection` instead */ + watchConnection as watchAccount, + watchConnection, +} from '../actions/watchConnection.js' + export { type WatchConnectionsParameters, type WatchConnectionsReturnType, watchConnections, } from '../actions/watchConnections.js' + export { type WatchConnectorsParameters, type WatchConnectorsReturnType, watchConnectors, } from '../actions/watchConnectors.js' + export { type WatchContractEventParameters, type WatchContractEventReturnType, watchContractEvent, } from '../actions/watchContractEvent.js' + export { type WatchPendingTransactionsParameters, type WatchPendingTransactionsReturnType, watchPendingTransactions, } from '../actions/watchPendingTransactions.js' + export { type WatchPublicClientParameters, type WatchPublicClientReturnType, diff --git a/packages/core/src/exports/experimental.ts b/packages/core/src/exports/experimental.ts deleted file mode 100644 index 65fbb4a4d1..0000000000 --- a/packages/core/src/exports/experimental.ts +++ /dev/null @@ -1,153 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// Actions -//////////////////////////////////////////////////////////////////////////////// - -// biome-ignore lint/performance/noBarrelFile: entrypoint module -export { - /** @deprecated This is no longer experimental – use `import type { GetCallsStatusErrorType } from '@wagmi/core'` instead. */ - type GetCallsStatusErrorType, - /** @deprecated This is no longer experimental – use `import type { GetCallsStatusParameters } from '@wagmi/core'` instead. */ - type GetCallsStatusParameters, - /** @deprecated This is no longer experimental – use `import type { GetCallsStatusReturnType } from '@wagmi/core'` instead. */ - type GetCallsStatusReturnType, - /** @deprecated This is no longer experimental – use `import { getCallsStatus } from '@wagmi/core'` instead. */ - getCallsStatus, -} from '../actions/getCallsStatus.js' - -export { - /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesErrorType } from '@wagmi/core'` instead. */ - type GetCapabilitiesErrorType, - /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesParameters } from '@wagmi/core'` instead. */ - type GetCapabilitiesParameters, - /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesReturnType } from '@wagmi/core'` instead. */ - type GetCapabilitiesReturnType, - /** @deprecated This is no longer experimental – use `import { getCapabilities } from '@wagmi/core'` instead. */ - getCapabilities, -} from '../actions/getCapabilities.js' - -export { - /** @deprecated This is no longer experimental – use `import type { SendCallsErrorType } from '@wagmi/core'` instead. */ - type SendCallsErrorType, - /** @deprecated This is no longer experimental – use `import type { SendCallsParameters } from '@wagmi/core'` instead. */ - type SendCallsParameters, - /** @deprecated This is no longer experimental – use `import type { SendCallsReturnType } from '@wagmi/core'` instead. */ - type SendCallsReturnType, - /** @deprecated This is no longer experimental – use `import { sendCalls } from '@wagmi/core'` instead. */ - sendCalls, -} from '../actions/sendCalls.js' - -export { - /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusErrorType } from '@wagmi/core'` instead. */ - type ShowCallsStatusErrorType, - /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusParameters } from '@wagmi/core'` instead. */ - type ShowCallsStatusParameters, - /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusReturnType } from '@wagmi/core'` instead. */ - type ShowCallsStatusReturnType, - /** @deprecated This is no longer experimental – use `import { showCallsStatus } from '@wagmi/core'` instead. */ - showCallsStatus, -} from '../actions/showCallsStatus.js' - -export { - /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusErrorType } from '@wagmi/core'` instead. */ - type WaitForCallsStatusErrorType, - /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusParameters } from '@wagmi/core'` instead. */ - type WaitForCallsStatusParameters, - /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusReturnType } from '@wagmi/core'` instead. */ - type WaitForCallsStatusReturnType, - /** @deprecated This is no longer experimental – use `import { waitForCallsStatus } from '@wagmi/core'` instead. */ - waitForCallsStatus, -} from '../actions/waitForCallsStatus.js' - -export { - /** @deprecated Use `SendCallsErrorType` instead. */ - type WriteContractsErrorType, - /** @deprecated Use `SendCallsParameters` instead. */ - type WriteContractsParameters, - /** @deprecated Use `SendCallsReturnType` instead. */ - type WriteContractsReturnType, - /** @deprecated Use `sendCalls` instead. */ - writeContracts, -} from '../experimental/actions/writeContracts.js' - -//////////////////////////////////////////////////////////////////////////////// -// Tanstack Query -//////////////////////////////////////////////////////////////////////////////// - -export { - /** @deprecated Use `SendCallsData` instead. */ - type WriteContractsData, - /** @deprecated Use `SendCallsMutate` instead. */ - type WriteContractsMutate, - /** @deprecated Use `SendCallsMutateAsync` instead. */ - type WriteContractsMutateAsync, - /** @deprecated Use `SendCallsVariables` instead. */ - type WriteContractsVariables, - /** @deprecated Use `sendCallsMutationOptions` instead. */ - writeContractsMutationOptions, -} from '../experimental/query/writeContracts.js' -export { - /** @deprecated This is no longer experimental – use `import type { GetCallsStatusData } from '@wagmi/core/query'` instead. */ - type GetCallsStatusData, - /** @deprecated This is no longer experimental – use `import type { GetCallsStatusOptions } from '@wagmi/core/query'` instead. */ - type GetCallsStatusOptions, - /** @deprecated This is no longer experimental – use `import type { GetCallsStatusQueryFnData } from '@wagmi/core/query'` instead. */ - type GetCallsStatusQueryFnData, - /** @deprecated This is no longer experimental – use `import type { GetCallsStatusQueryKey } from '@wagmi/core/query'` instead. */ - type GetCallsStatusQueryKey, - /** @deprecated This is no longer experimental – use `import { getCallsStatusQueryKey } from '@wagmi/core/query'` instead. */ - getCallsStatusQueryKey, - /** @deprecated This is no longer experimental – use `import { getCallsStatusQueryOptions } from '@wagmi/core/query'` instead. */ - getCallsStatusQueryOptions, -} from '../query/getCallsStatus.js' -export { - /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesData } from '@wagmi/core/query'` instead. */ - type GetCapabilitiesData, - /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesOptions } from '@wagmi/core/query'` instead. */ - type GetCapabilitiesOptions, - /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesQueryFnData } from '@wagmi/core/query'` instead. */ - type GetCapabilitiesQueryFnData, - /** @deprecated This is no longer experimental – use `import type { GetCapabilitiesQueryKey } from '@wagmi/core/query'` instead. */ - type GetCapabilitiesQueryKey, - /** @deprecated This is no longer experimental – use `import { getCapabilitiesQueryKey } from '@wagmi/core/query'` instead. */ - getCapabilitiesQueryKey, - /** @deprecated This is no longer experimental – use `import { getCapabilitiesQueryOptions } from '@wagmi/core/query'` instead. */ - getCapabilitiesQueryOptions, -} from '../query/getCapabilities.js' -export { - /** @deprecated This is no longer experimental – use `import type { SendCallsData } from '@wagmi/core/query'` instead. */ - type SendCallsData, - /** @deprecated This is no longer experimental – use `import type { SendCallsMutate } from '@wagmi/core/query'` instead. */ - type SendCallsMutate, - /** @deprecated This is no longer experimental – use `import type { SendCallsMutateAsync } from '@wagmi/core/query'` instead. */ - type SendCallsMutateAsync, - /** @deprecated This is no longer experimental – use `import type { SendCallsVariables } from '@wagmi/core/query'` instead. */ - type SendCallsVariables, - /** @deprecated This is no longer experimental – use `import { sendCallsMutationOptions } from '@wagmi/core/query'` instead. */ - sendCallsMutationOptions, -} from '../query/sendCalls.js' -export { - /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusData } from '@wagmi/core/query'` instead. */ - type ShowCallsStatusData, - /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusMutate } from '@wagmi/core/query'` instead. */ - type ShowCallsStatusMutate, - /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusMutateAsync } from '@wagmi/core/query'` instead. */ - type ShowCallsStatusMutateAsync, - /** @deprecated This is no longer experimental – use `import type { ShowCallsStatusVariables } from '@wagmi/core/query'` instead. */ - type ShowCallsStatusVariables, - /** @deprecated This is no longer experimental – use `import { showCallsStatusMutationOptions } from '@wagmi/core/query'` instead. */ - showCallsStatusMutationOptions, -} from '../query/showCallsStatus.js' -export { - /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusData } from '@wagmi/core/query'` instead. */ - type WaitForCallsStatusData, - /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusOptions } from '@wagmi/core/query'` instead. */ - type WaitForCallsStatusOptions, - /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusQueryFnData } from '@wagmi/core/query'` instead. */ - type WaitForCallsStatusQueryFnData, - /** @deprecated This is no longer experimental – use `import type { WaitForCallsStatusQueryKey } from '@wagmi/core/query'` instead. */ - type WaitForCallsStatusQueryKey, - /** @deprecated This is no longer experimental – use `import { waitForCallsStatusQueryKey } from '@wagmi/core/query'` instead. */ - waitForCallsStatusQueryKey, - /** @deprecated This is no longer experimental – use `import { waitForCallsStatusQueryOptions } from '@wagmi/core/query'` instead. */ - waitForCallsStatusQueryOptions, -} from '../query/waitForCallsStatus.js' diff --git a/packages/core/src/exports/index.test.ts b/packages/core/src/exports/index.test.ts index 41ea8581fe..7848e3264a 100644 --- a/packages/core/src/exports/index.test.ts +++ b/packages/core/src/exports/index.test.ts @@ -12,12 +12,9 @@ test('exports', () => { "estimateFeesPerGas", "estimateGas", "estimateMaxPriorityFeePerGas", - "getAccount", "getBalance", - "fetchBalance", "getBlock", "getBlockNumber", - "fetchBlockNumber", "getBlockTransactionCount", "getBytecode", "getCallsStatus", @@ -25,27 +22,22 @@ test('exports', () => { "getChainId", "getChains", "getClient", + "getAccount", + "getConnection", "getConnections", "getConnectorClient", "getConnectors", "getEnsAddress", - "fetchEnsAddress", "getEnsAvatar", - "fetchEnsAvatar", "getEnsName", - "fetchEnsName", "getEnsResolver", - "fetchEnsResolver", "getEnsText", "getFeeHistory", "getGasPrice", "getProof", "getPublicClient", "getStorageAt", - "getToken", - "fetchToken", "getTransaction", - "fetchTransaction", "getTransactionConfirmations", "getTransactionCount", "getTransactionReceipt", @@ -63,20 +55,20 @@ test('exports', () => { "signMessage", "signTypedData", "simulateContract", - "switchAccount", "switchChain", - "switchNetwork", + "switchAccount", + "switchConnection", "verifyMessage", "verifyTypedData", "waitForCallsStatus", "waitForTransactionReceipt", - "waitForTransaction", - "watchAccount", "watchAsset", "watchBlockNumber", "watchBlocks", "watchChainId", "watchClient", + "watchAccount", + "watchConnection", "watchConnections", "watchConnectors", "watchContractEvent", @@ -111,7 +103,6 @@ test('exports', () => { "deepEqual", "deserialize", "extractRpcUrls", - "normalizeChainId", "serialize", "version", ] diff --git a/packages/core/src/exports/index.ts b/packages/core/src/exports/index.ts index 72f865d702..37fc673056 100644 --- a/packages/core/src/exports/index.ts +++ b/packages/core/src/exports/index.ts @@ -30,12 +30,14 @@ export { type DisconnectReturnType, disconnect, } from '../actions/disconnect.js' + export { type EstimateFeesPerGasErrorType, type EstimateFeesPerGasParameters, type EstimateFeesPerGasReturnType, estimateFeesPerGas, } from '../actions/estimateFeesPerGas.js' + export { type EstimateGasErrorType, type EstimateGasParameters, @@ -50,18 +52,11 @@ export { estimateMaxPriorityFeePerGas, } from '../actions/estimateMaxPriorityFeePerGas.js' -export { - type GetAccountReturnType, - getAccount, -} from '../actions/getAccount.js' - export { type GetBalanceErrorType, type GetBalanceParameters, type GetBalanceReturnType, getBalance, - /** @deprecated use `getBalance` instead */ - getBalance as fetchBalance, } from '../actions/getBalance.js' export { @@ -76,8 +71,6 @@ export { type GetBlockNumberParameters, type GetBlockNumberReturnType, getBlockNumber, - /** @deprecated use `getBlockNumber` instead */ - getBlockNumber as fetchBlockNumber, } from '../actions/getBlockNumber.js' export { @@ -124,16 +117,27 @@ export { getClient, } from '../actions/getClient.js' +export { + /** @deprecated use `GetConnectionReturnType` instead */ + type GetConnectionReturnType as GetAccountReturnType, + type GetConnectionReturnType, + /** @deprecated use `getConnection` instead */ + getConnection as getAccount, + getConnection, +} from '../actions/getConnection.js' + export { type GetConnectionsReturnType, getConnections, } from '../actions/getConnections.js' + export { type GetConnectorClientErrorType, type GetConnectorClientParameters, type GetConnectorClientReturnType, getConnectorClient, } from '../actions/getConnectorClient.js' + export { type GetConnectorsReturnType, getConnectors, @@ -144,8 +148,6 @@ export { type GetEnsAddressParameters, type GetEnsAddressReturnType, getEnsAddress, - /** @deprecated use `getEnsAddress` instead */ - getEnsAddress as fetchEnsAddress, } from '../actions/getEnsAddress.js' export { @@ -153,8 +155,6 @@ export { type GetEnsAvatarParameters, type GetEnsAvatarReturnType, getEnsAvatar, - /** @deprecated use `getEnsAvatar` instead */ - getEnsAvatar as fetchEnsAvatar, } from '../actions/getEnsAvatar.js' export { @@ -162,8 +162,6 @@ export { type GetEnsNameParameters, type GetEnsNameReturnType, getEnsName, - /** @deprecated */ - getEnsName as fetchEnsName, } from '../actions/getEnsName.js' export { @@ -171,8 +169,6 @@ export { type GetEnsResolverParameters, type GetEnsResolverReturnType, getEnsResolver, - /** @deprecated use `getEnsResolver` instead */ - getEnsResolver as fetchEnsResolver, } from '../actions/getEnsResolver.js' export { @@ -216,22 +212,11 @@ export { getStorageAt, } from '../actions/getStorageAt.js' -export { - type GetTokenErrorType, - type GetTokenParameters, - type GetTokenReturnType, - getToken, - /** @deprecated use `getToken` instead */ - getToken as fetchToken, -} from '../actions/getToken.js' - export { type GetTransactionErrorType, type GetTransactionParameters, type GetTransactionReturnType, getTransaction, - /** @deprecated use `getTransaction` instead */ - getTransaction as fetchTransaction, } from '../actions/getTransaction.js' export { @@ -352,22 +337,28 @@ export { simulateContract, } from '../actions/simulateContract.js' -export { - type SwitchAccountErrorType, - type SwitchAccountParameters, - type SwitchAccountReturnType, - switchAccount, -} from '../actions/switchAccount.js' - export { type SwitchChainErrorType, type SwitchChainParameters, type SwitchChainReturnType, switchChain, - /** @deprecated use `switchChain` instead */ - switchChain as switchNetwork, } from '../actions/switchChain.js' +export { + /** @deprecated use `SwitchConnectionErrorType` instead */ + type SwitchConnectionErrorType as SwitchAccountErrorType, + type SwitchConnectionErrorType, + /** @deprecated use `SwitchConnectionParameters` instead */ + type SwitchConnectionParameters as SwitchAccountParameters, + type SwitchConnectionParameters, + /** @deprecated use `SwitchConnectionReturnType` instead */ + type SwitchConnectionReturnType as SwitchAccountReturnType, + type SwitchConnectionReturnType, + /** @deprecated use `switchConnection` instead */ + switchConnection as switchAccount, + switchConnection, +} from '../actions/switchConnection.js' + export { type VerifyMessageErrorType, type VerifyMessageParameters, @@ -388,19 +379,14 @@ export { type WaitForCallsStatusReturnType, waitForCallsStatus, } from '../actions/waitForCallsStatus.js' + export { type WaitForTransactionReceiptErrorType, type WaitForTransactionReceiptParameters, type WaitForTransactionReceiptReturnType, waitForTransactionReceipt, - /** @deprecated use `waitForTransactionReceipt` instead */ - waitForTransactionReceipt as waitForTransaction, } from '../actions/waitForTransactionReceipt.js' -export { - type WatchAccountParameters, - type WatchAccountReturnType, - watchAccount, -} from '../actions/watchAccount.js' + export { type WatchAssetErrorType, type WatchAssetParameters, @@ -413,41 +399,61 @@ export { type WatchBlockNumberReturnType, watchBlockNumber, } from '../actions/watchBlockNumber.js' + export { type WatchBlocksParameters, type WatchBlocksReturnType, watchBlocks, } from '../actions/watchBlocks.js' + export { type WatchChainIdParameters, type WatchChainIdReturnType, watchChainId, } from '../actions/watchChainId.js' + export { type WatchClientParameters, type WatchClientReturnType, watchClient, } from '../actions/watchClient.js' + +export { + /** @deprecated use `WatchConnectionParameters` instead */ + type WatchConnectionParameters as WatchAccountParameters, + type WatchConnectionParameters, + /** @deprecated use `WatchConnectionReturnType` instead */ + type WatchConnectionReturnType as WatchAccountReturnType, + type WatchConnectionReturnType, + /** @deprecated use `watchConnection` instead */ + watchConnection as watchAccount, + watchConnection, +} from '../actions/watchConnection.js' + export { type WatchConnectionsParameters, type WatchConnectionsReturnType, watchConnections, } from '../actions/watchConnections.js' + export { type WatchConnectorsParameters, type WatchConnectorsReturnType, watchConnectors, } from '../actions/watchConnectors.js' + export { type WatchContractEventParameters, type WatchContractEventReturnType, watchContractEvent, } from '../actions/watchContractEvent.js' + export { type WatchPendingTransactionsParameters, type WatchPendingTransactionsReturnType, watchPendingTransactions, } from '../actions/watchPendingTransactions.js' + export { type WatchPublicClientParameters, type WatchPublicClientReturnType, @@ -582,8 +588,6 @@ export { deserialize } from '../utils/deserialize.js' export { extractRpcUrls } from '../utils/extractRpcUrls.js' -export { normalizeChainId } from '../utils/normalizeChainId.js' - export { serialize } from '../utils/serialize.js' //////////////////////////////////////////////////////////////////////////////// diff --git a/packages/core/src/exports/query.test.ts b/packages/core/src/exports/query.test.ts index bc5e8a3224..72822de5de 100644 --- a/packages/core/src/exports/query.test.ts +++ b/packages/core/src/exports/query.test.ts @@ -50,8 +50,6 @@ test('exports', () => { "getProofQueryOptions", "getStorageAtQueryKey", "getStorageAtQueryOptions", - "getTokenQueryKey", - "getTokenQueryOptions", "getTransactionQueryKey", "getTransactionQueryOptions", "getTransactionConfirmationsQueryKey", @@ -80,8 +78,9 @@ test('exports', () => { "signTypedDataMutationOptions", "simulateContractQueryKey", "simulateContractQueryOptions", - "switchAccountMutationOptions", "switchChainMutationOptions", + "switchAccountMutationOptions", + "switchConnectionMutationOptions", "hashFn", "structuralSharing", "verifyMessageQueryKey", diff --git a/packages/core/src/exports/query.ts b/packages/core/src/exports/query.ts index 46d0bad59f..b7fefcf6bc 100644 --- a/packages/core/src/exports/query.ts +++ b/packages/core/src/exports/query.ts @@ -216,15 +216,6 @@ export { getStorageAtQueryOptions, } from '../query/getStorageAt.js' -export { - type GetTokenData, - type GetTokenOptions, - type GetTokenQueryFnData, - type GetTokenQueryKey, - getTokenQueryKey, - getTokenQueryOptions, -} from '../query/getToken.js' - export { type GetTransactionData, type GetTransactionOptions, @@ -321,6 +312,7 @@ export { type SendCallsVariables, sendCallsMutationOptions, } from '../query/sendCalls.js' + export { type SendCallsSyncData, type SendCallsSyncMutate, @@ -328,6 +320,7 @@ export { type SendCallsSyncVariables, sendCallsSyncMutationOptions, } from '../query/sendCallsSync.js' + export { type SendTransactionData, type SendTransactionMutate, @@ -335,6 +328,7 @@ export { type SendTransactionVariables, sendTransactionMutationOptions, } from '../query/sendTransaction.js' + export { type SendTransactionSyncData, type SendTransactionSyncMutate, @@ -342,6 +336,7 @@ export { type SendTransactionSyncVariables, sendTransactionSyncMutationOptions, } from '../query/sendTransactionSync.js' + export { type ShowCallsStatusData, type ShowCallsStatusMutate, @@ -365,6 +360,7 @@ export { type SignTypedDataVariables, signTypedDataMutationOptions, } from '../query/signTypedData.js' + export { type SimulateContractData, type SimulateContractOptions, @@ -373,13 +369,6 @@ export { simulateContractQueryKey, simulateContractQueryOptions, } from '../query/simulateContract.js' -export { - type SwitchAccountData, - type SwitchAccountMutate, - type SwitchAccountMutateAsync, - type SwitchAccountVariables, - switchAccountMutationOptions, -} from '../query/switchAccount.js' export { type SwitchChainData, @@ -388,7 +377,27 @@ export { type SwitchChainVariables, switchChainMutationOptions, } from '../query/switchChain.js' + +export { + /** @deprecated use `SwitchConnectionData` instead */ + type SwitchConnectionData as SwitchAccountData, + type SwitchConnectionData, + /** @deprecated use `SwitchConnectionMutate` instead */ + type SwitchConnectionMutate as SwitchAccountMutate, + type SwitchConnectionMutate, + /** @deprecated use `SwitchConnectionMutateAsync` instead */ + type SwitchConnectionMutateAsync as SwitchAccountMutateAsync, + type SwitchConnectionMutateAsync, + /** @deprecated use `SwitchConnectionVariables` instead */ + type SwitchConnectionVariables as SwitchAccountVariables, + type SwitchConnectionVariables, + /** @deprecated use `switchConnectionMutationOptions` instead */ + switchConnectionMutationOptions as switchAccountMutationOptions, + switchConnectionMutationOptions, +} from '../query/switchConnection.js' + export { hashFn, structuralSharing } from '../query/utils.js' + export { type VerifyMessageData, type VerifyMessageOptions, @@ -397,6 +406,7 @@ export { verifyMessageQueryKey, verifyMessageQueryOptions, } from '../query/verifyMessage.js' + export { type VerifyTypedDataData, type VerifyTypedDataOptions, @@ -405,6 +415,7 @@ export { verifyTypedDataQueryKey, verifyTypedDataQueryOptions, } from '../query/verifyTypedData.js' + export { type WaitForCallsStatusData, type WaitForCallsStatusOptions, @@ -413,6 +424,7 @@ export { waitForCallsStatusQueryKey, waitForCallsStatusQueryOptions, } from '../query/waitForCallsStatus.js' + export { type WaitForTransactionReceiptData, type WaitForTransactionReceiptOptions, @@ -421,6 +433,7 @@ export { waitForTransactionReceiptQueryKey, waitForTransactionReceiptQueryOptions, } from '../query/waitForTransactionReceipt.js' + export { type WatchAssetData, type WatchAssetMutate, @@ -428,6 +441,7 @@ export { type WatchAssetVariables, watchAssetMutationOptions, } from '../query/watchAsset.js' + export { type WriteContractData, type WriteContractMutate, diff --git a/packages/core/src/query/getBalance.test.ts b/packages/core/src/query/getBalance.test.ts index 686f52e082..f8ea5c889b 100644 --- a/packages/core/src/query/getBalance.test.ts +++ b/packages/core/src/query/getBalance.test.ts @@ -35,29 +35,3 @@ test('parameters: chainId', () => { } `) }) - -test.todo('parameters: token') - -test('parameters: unit', () => { - expect( - getBalanceQueryOptions(config, { - address, - chainId: chain.mainnet.id, - token: '0x0000000000000000000000000000000000000000', - unit: 'gwei', - }), - ).toMatchInlineSnapshot(` - { - "queryFn": [Function], - "queryKey": [ - "balance", - { - "address": "0x95132632579b073D12a6673e18Ab05777a6B86f8", - "chainId": 1, - "token": "0x0000000000000000000000000000000000000000", - "unit": "gwei", - }, - ], - } - `) -}) diff --git a/packages/core/src/query/getToken.test.ts b/packages/core/src/query/getToken.test.ts deleted file mode 100644 index 87ec1731c9..0000000000 --- a/packages/core/src/query/getToken.test.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { chain, config } from '@wagmi/test' -import { expect, test } from 'vitest' - -import { getTokenQueryOptions } from './getToken.js' - -test('default', () => { - expect(getTokenQueryOptions(config)).toMatchInlineSnapshot(` - { - "queryFn": [Function], - "queryKey": [ - "token", - {}, - ], - } - `) -}) - -test('parameters: chainId', () => { - expect( - getTokenQueryOptions(config, { chainId: chain.mainnet.id }), - ).toMatchInlineSnapshot(` - { - "queryFn": [Function], - "queryKey": [ - "token", - { - "chainId": 1, - }, - ], - } - `) -}) diff --git a/packages/core/src/query/getToken.ts b/packages/core/src/query/getToken.ts deleted file mode 100644 index 8e4a2b866a..0000000000 --- a/packages/core/src/query/getToken.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { QueryOptions } from '@tanstack/query-core' - -import { - type GetTokenErrorType, - type GetTokenParameters, - type GetTokenReturnType, - getToken, -} from '../actions/getToken.js' -import type { Config } from '../createConfig.js' -import type { ScopeKeyParameter } from '../types/properties.js' -import type { Compute, ExactPartial } from '../types/utils.js' -import { filterQueryOptions } from './utils.js' - -export type GetTokenOptions = Compute< - ExactPartial> & ScopeKeyParameter -> - -export function getTokenQueryOptions( - config: config, - options: GetTokenOptions = {}, -) { - return { - async queryFn({ queryKey }) { - const { address, scopeKey: _, ...parameters } = queryKey[1] - if (!address) throw new Error('address is required') - return getToken(config, { ...parameters, address }) - }, - queryKey: getTokenQueryKey(options), - } as const satisfies QueryOptions< - GetTokenQueryFnData, - GetTokenErrorType, - GetTokenData, - GetTokenQueryKey - > -} - -export type GetTokenQueryFnData = GetTokenReturnType - -export type GetTokenData = GetTokenQueryFnData - -export function getTokenQueryKey( - options: GetTokenOptions = {}, -) { - return ['token', filterQueryOptions(options)] as const -} - -export type GetTokenQueryKey = ReturnType< - typeof getTokenQueryKey -> diff --git a/packages/core/src/query/switchAccount.test.ts b/packages/core/src/query/switchAccount.test.ts deleted file mode 100644 index 25a7066c61..0000000000 --- a/packages/core/src/query/switchAccount.test.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { config } from '@wagmi/test' -import { expect, test } from 'vitest' - -import { switchAccountMutationOptions } from './switchAccount.js' - -test('default', () => { - expect(switchAccountMutationOptions(config)).toMatchInlineSnapshot(` - { - "mutationFn": [Function], - "mutationKey": [ - "switchAccount", - ], - } - `) -}) diff --git a/packages/core/src/query/switchAccount.ts b/packages/core/src/query/switchAccount.ts deleted file mode 100644 index 29a10b2ce8..0000000000 --- a/packages/core/src/query/switchAccount.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { MutationOptions } from '@tanstack/query-core' - -import { - type SwitchAccountErrorType, - type SwitchAccountParameters, - type SwitchAccountReturnType, - switchAccount, -} from '../actions/switchAccount.js' -import type { Config } from '../createConfig.js' -import type { Compute } from '../types/utils.js' -import type { Mutate, MutateAsync } from './types.js' - -export function switchAccountMutationOptions( - config: config, -) { - return { - mutationFn(variables) { - return switchAccount(config, variables) - }, - mutationKey: ['switchAccount'], - } as const satisfies MutationOptions< - SwitchAccountData, - SwitchAccountErrorType, - SwitchAccountVariables - > -} - -export type SwitchAccountData = Compute< - SwitchAccountReturnType -> - -export type SwitchAccountVariables = Compute - -export type SwitchAccountMutate< - config extends Config, - context = unknown, -> = Mutate< - SwitchAccountData, - SwitchAccountErrorType, - SwitchAccountVariables, - context -> - -export type SwitchAccountMutateAsync< - config extends Config, - context = unknown, -> = MutateAsync< - SwitchAccountData, - SwitchAccountErrorType, - SwitchAccountVariables, - context -> diff --git a/packages/core/src/experimental/query/writeContracts.test.ts b/packages/core/src/query/switchConnection.test.ts similarity index 51% rename from packages/core/src/experimental/query/writeContracts.test.ts rename to packages/core/src/query/switchConnection.test.ts index 5f4a1f28dd..a477237ced 100644 --- a/packages/core/src/experimental/query/writeContracts.test.ts +++ b/packages/core/src/query/switchConnection.test.ts @@ -1,14 +1,14 @@ import { config } from '@wagmi/test' import { expect, test } from 'vitest' -import { writeContractsMutationOptions } from './writeContracts.js' +import { switchConnectionMutationOptions } from './switchConnection.js' test('default', () => { - expect(writeContractsMutationOptions(config)).toMatchInlineSnapshot(` + expect(switchConnectionMutationOptions(config)).toMatchInlineSnapshot(` { "mutationFn": [Function], "mutationKey": [ - "writeContracts", + "switchConnection", ], } `) diff --git a/packages/core/src/query/switchConnection.ts b/packages/core/src/query/switchConnection.ts new file mode 100644 index 0000000000..61557c52e5 --- /dev/null +++ b/packages/core/src/query/switchConnection.ts @@ -0,0 +1,52 @@ +import type { MutationOptions } from '@tanstack/query-core' + +import { + type SwitchConnectionErrorType, + type SwitchConnectionParameters, + type SwitchConnectionReturnType, + switchConnection, +} from '../actions/switchConnection.js' +import type { Config } from '../createConfig.js' +import type { Compute } from '../types/utils.js' +import type { Mutate, MutateAsync } from './types.js' + +export function switchConnectionMutationOptions( + config: config, +) { + return { + mutationFn(variables) { + return switchConnection(config, variables) + }, + mutationKey: ['switchConnection'], + } as const satisfies MutationOptions< + SwitchConnectionData, + SwitchConnectionErrorType, + SwitchConnectionVariables + > +} + +export type SwitchConnectionData = Compute< + SwitchConnectionReturnType +> + +export type SwitchConnectionVariables = Compute + +export type SwitchConnectionMutate< + config extends Config, + context = unknown, +> = Mutate< + SwitchConnectionData, + SwitchConnectionErrorType, + SwitchConnectionVariables, + context +> + +export type SwitchConnectionMutateAsync< + config extends Config, + context = unknown, +> = MutateAsync< + SwitchConnectionData, + SwitchConnectionErrorType, + SwitchConnectionVariables, + context +> diff --git a/packages/core/src/types/unit.ts b/packages/core/src/types/unit.ts deleted file mode 100644 index a64f794a87..0000000000 --- a/packages/core/src/types/unit.ts +++ /dev/null @@ -1 +0,0 @@ -export type Unit = 'ether' | 'gwei' | 'wei' | number diff --git a/packages/core/src/utils/getUnit.test.ts b/packages/core/src/utils/getUnit.test.ts deleted file mode 100644 index 1054303def..0000000000 --- a/packages/core/src/utils/getUnit.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { expect, test } from 'vitest' - -import { getUnit } from './getUnit.js' - -test('default', () => { - expect(getUnit(1)).toMatchInlineSnapshot('1') - expect(getUnit('wei')).toMatchInlineSnapshot('0') - expect(getUnit('ether')).toMatchInlineSnapshot('18') -}) diff --git a/packages/core/src/utils/getUnit.ts b/packages/core/src/utils/getUnit.ts deleted file mode 100644 index 084f45b622..0000000000 --- a/packages/core/src/utils/getUnit.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { weiUnits } from 'viem' - -import type { Unit } from '../types/unit.js' - -export function getUnit(unit: Unit) { - if (typeof unit === 'number') return unit - if (unit === 'wei') return 0 - return Math.abs(weiUnits[unit]) -} diff --git a/packages/core/src/utils/normalizeChainId.test.ts b/packages/core/src/utils/normalizeChainId.test.ts deleted file mode 100644 index de9d1882e3..0000000000 --- a/packages/core/src/utils/normalizeChainId.test.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { expect, test } from 'vitest' - -import { normalizeChainId } from './normalizeChainId.js' - -test.each([ - { chainId: 1, expected: 1 }, - { chainId: '1', expected: 1 }, - { chainId: '0x1', expected: 1 }, - { chainId: '0x4', expected: 4 }, - { chainId: 42, expected: 42 }, - { chainId: '42', expected: 42 }, - { chainId: '0x2a', expected: 42 }, - { chainId: ' 0x2a', expected: 42 }, - { chainId: BigInt(1), expected: 1 }, - { chainId: BigInt(10), expected: 10 }, -])('normalizeChainId($chainId)', ({ chainId, expected }) => { - expect(normalizeChainId(chainId)).toEqual(expected) -}) - -test('unknown type', () => { - expect(() => normalizeChainId({})).toThrow( - 'Cannot normalize chainId "[object Object]" of type "object"', - ) -}) diff --git a/packages/core/src/utils/normalizeChainId.ts b/packages/core/src/utils/normalizeChainId.ts deleted file mode 100644 index a1017c0953..0000000000 --- a/packages/core/src/utils/normalizeChainId.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** @deprecated use `Number` instead */ -export function normalizeChainId(chainId: bigint | number | string | unknown) { - if (typeof chainId === 'string') - return Number.parseInt( - chainId, - chainId.trim().substring(0, 2) === '0x' ? 16 : 10, - ) - if (typeof chainId === 'bigint') return Number(chainId) - if (typeof chainId === 'number') return chainId - throw new Error( - `Cannot normalize chainId "${chainId}" of type "${typeof chainId}"`, - ) -} diff --git a/packages/create-wagmi/templates/next/_env.local b/packages/create-wagmi/templates/next/_env.local index 9a11dba16a..05c008e2cd 100644 --- a/packages/create-wagmi/templates/next/_env.local +++ b/packages/create-wagmi/templates/next/_env.local @@ -1,2 +1 @@ -NEXT_PUBLIC_WC_PROJECT_ID= -NEXT_TELEMETRY_DISABLED=1 \ No newline at end of file +NEXT_TELEMETRY_DISABLED=1 diff --git a/packages/create-wagmi/templates/next/src/app/page.tsx b/packages/create-wagmi/templates/next/src/app/page.tsx index f5dcbdf812..79d52d3adc 100644 --- a/packages/create-wagmi/templates/next/src/app/page.tsx +++ b/packages/create-wagmi/templates/next/src/app/page.tsx @@ -1,26 +1,27 @@ 'use client' -import { useAccount, useConnect, useDisconnect } from 'wagmi' +import { useConnect, useConnection, useConnectors, useDisconnect } from 'wagmi' function App() { - const account = useAccount() + const connection = useConnection() const { connectors, connect, status, error } = useConnect() + const connectors = useConnectors() const { disconnect } = useDisconnect() return ( <>
-

Account

+

Connection

- status: {account.status} + status: {connection.status}
- addresses: {JSON.stringify(account.addresses)} + addresses: {JSON.stringify(connection.addresses)}
- chainId: {account.chainId} + chainId: {connection.chainId}
- {account.status === 'connected' && ( + {connection.status === 'connected' && ( diff --git a/packages/create-wagmi/templates/next/src/wagmi.ts b/packages/create-wagmi/templates/next/src/wagmi.ts index a06ac2f830..d8689e161b 100644 --- a/packages/create-wagmi/templates/next/src/wagmi.ts +++ b/packages/create-wagmi/templates/next/src/wagmi.ts @@ -1,15 +1,9 @@ import { cookieStorage, createConfig, createStorage, http } from 'wagmi' import { mainnet, sepolia } from 'wagmi/chains' -import { baseAccount, injected, walletConnect } from 'wagmi/connectors' export function getConfig() { return createConfig({ chains: [mainnet, sepolia], - connectors: [ - injected(), - baseAccount(), - walletConnect({ projectId: process.env.NEXT_PUBLIC_WC_PROJECT_ID! }), - ], storage: createStorage({ storage: cookieStorage, }), diff --git a/packages/create-wagmi/templates/nuxt/_env.local b/packages/create-wagmi/templates/nuxt/_env.local index 437e9e3e7b..3e22d2a1db 100644 --- a/packages/create-wagmi/templates/nuxt/_env.local +++ b/packages/create-wagmi/templates/nuxt/_env.local @@ -1,3 +1,2 @@ -NUXT_PUBLIC_WC_PROJECT_ID= NUXT_TELEMETRY_DISABLED=1 diff --git a/packages/create-wagmi/templates/nuxt/app.vue b/packages/create-wagmi/templates/nuxt/app.vue index 98b46bf528..4996e293d9 100644 --- a/packages/create-wagmi/templates/nuxt/app.vue +++ b/packages/create-wagmi/templates/nuxt/app.vue @@ -1,6 +1,6 @@ diff --git a/site/core/api/actions.md b/site/core/api/actions.md index 664cd9a86a..a57b06d3ef 100644 --- a/site/core/api/actions.md +++ b/site/core/api/actions.md @@ -13,7 +13,7 @@ Actions for accounts, wallets, contracts, transactions, signing, ENS, and more. ## Import ```ts -import { getAccount } from '@wagmi/core' +import { getConnection } from '@wagmi/core' ``` ## Available Actions diff --git a/site/core/api/actions/deployContract.md b/site/core/api/actions/deployContract.md index cfd18510db..9998233054 100644 --- a/site/core/api/actions/deployContract.md +++ b/site/core/api/actions/deployContract.md @@ -215,11 +215,11 @@ export const wagmiAbi = [ ::: code-group ```ts [index.ts] -import { getAccount, deployContract } from '@wagmi/core' +import { getConnection, deployContract } from '@wagmi/core' import { wagmiAbi } from './abi' import { config } from './config' -const { connector } = getAccount(config) +const { connector } = getConnection(config) const result = await deployContract(config, { abi: wagmiAbi, args: [69420], diff --git a/site/core/api/actions/disconnect.md b/site/core/api/actions/disconnect.md index 6c77fb5c74..c98e969cae 100644 --- a/site/core/api/actions/disconnect.md +++ b/site/core/api/actions/disconnect.md @@ -40,10 +40,10 @@ import { type DisconnectParameters } from '@wagmi/core' ::: code-group ```ts [index.ts] -import { disconnect, getAccount } from '@wagmi/core' +import { disconnect, getConnection } from '@wagmi/core' import { config } from './config' -const { connector } = getAccount(config) +const { connector } = getConnection(config) const result = await disconnect(config, { connector, // [!code focus] }) diff --git a/site/core/api/actions/estimateFeesPerGas.md b/site/core/api/actions/estimateFeesPerGas.md index b11cc85e3e..dfbd119635 100644 --- a/site/core/api/actions/estimateFeesPerGas.md +++ b/site/core/api/actions/estimateFeesPerGas.md @@ -51,25 +51,6 @@ const result = await estimateFeesPerGas(config, { <<< @/snippets/core/config.ts[config.ts] ::: -### formatUnits - -`'ether' | 'gwei' | 'wei' | number | undefined` - -- Units to use when formatting result. -- Defaults to `'ether'`. - -::: code-group -```ts [index.ts] -import { estimateFeesPerGas } from '@wagmi/core' -import { config } from './config' - -const feesPerGas = estimateFeesPerGas(config, { - formatUnits: 'ether', // [!code focus] -}) -``` -<<< @/snippets/core/config.ts[config.ts] -::: - ### type `'legacy' | 'eip1559'` @@ -99,12 +80,6 @@ import { type EstimateFeesPerGasReturnType } from '@wagmi/core' An estimate (in wei) for the fees per gas. -### formatted - -`{ gasPrice: string | undefined; maxFeePerGas: string | undefined; maxPriorityFeePerGas: string | undefined; }` - -Object of formatted values using [`formatUnits`](#formatunits). - ### gasPrice `bigint | undefined` diff --git a/site/core/api/actions/getAccount.md b/site/core/api/actions/getAccount.md deleted file mode 100644 index a8dde7602e..0000000000 --- a/site/core/api/actions/getAccount.md +++ /dev/null @@ -1,29 +0,0 @@ -# getAccount - -Action for getting current account. - -## Import - -```ts -import { getAccount } from '@wagmi/core' -``` - -## Usage - -::: code-group -```ts [index.ts] -import { getAccount } from '@wagmi/core' -import { config } from './config' - -const account = getAccount(config) -``` -<<< @/snippets/core/config.ts[config.ts] -::: - -## Return Type - -```ts -import { type GetAccountReturnType } from '@wagmi/core' -``` - - diff --git a/site/core/api/actions/getBalance.md b/site/core/api/actions/getBalance.md index 4025cca797..6b8ce03194 100644 --- a/site/core/api/actions/getBalance.md +++ b/site/core/api/actions/getBalance.md @@ -6,7 +6,7 @@ const typeName = 'GetBalance' # getBalance -Action for fetching native currency or token balance. +Action for fetching native currency balance. ## Import @@ -114,45 +114,6 @@ const balance = await getBalance(config, { <<< @/snippets/core/config.ts[config.ts] ::: -### token - -`Address | undefined` - -ERC-20 token address to get balance for. - -::: code-group -```ts [index.ts] -import { getBalance } from '@wagmi/core' -import { config } from './config' - -const balance = getBalance(config, { - address: '0x4557B18E779944BFE9d78A672452331C186a9f48', - token: '0x6B175474E89094C44Da98b954EedeAC495271d0F', // [!code focus] -}) -``` -<<< @/snippets/core/config.ts[config.ts] -::: - -### unit - -`'ether' | 'gwei' | 'wei' | number | undefined` - -- Units to use when formatting result. -- Defaults to `'ether'`. - -::: code-group -```ts [index.ts] -import { getBalance } from '@wagmi/core' -import { config } from './config' - -const balance = getBalance(config, { - address: '0x4557B18E779944BFE9d78A672452331C186a9f48', - unit: 'ether', // [!code focus] -}) -``` -<<< @/snippets/core/config.ts[config.ts] -::: - ## Return Type ```ts @@ -165,17 +126,11 @@ import { type GetBalanceReturnType } from '@wagmi/core' Number of decimals for balance [`value`](#value). -### formatted - -`string` - -Formatted value of balance using [`unit`](#unit). - ### symbol `string` -Symbol of native currency or token. +Symbol of native currency. ### value diff --git a/site/core/api/actions/getConnection.md b/site/core/api/actions/getConnection.md new file mode 100644 index 0000000000..8f162d755d --- /dev/null +++ b/site/core/api/actions/getConnection.md @@ -0,0 +1,29 @@ +# getConnection + +Action for getting current connection. + +## Import + +```ts +import { getConnection } from '@wagmi/core' +``` + +## Usage + +::: code-group +```ts [index.ts] +import { getConnection } from '@wagmi/core' +import { config } from './config' + +const connection = getConnection(config) +``` +<<< @/snippets/core/config.ts[config.ts] +::: + +## Return Type + +```ts +import { type GetConnectionReturnType } from '@wagmi/core' +``` + + diff --git a/site/core/api/actions/getToken.md b/site/core/api/actions/getToken.md deleted file mode 100644 index b37805cff0..0000000000 --- a/site/core/api/actions/getToken.md +++ /dev/null @@ -1,141 +0,0 @@ - - -# getToken - -Action for fetching token info. - -## Import - -```ts -import { getToken } from '@wagmi/core' -``` - -## Usage - -::: code-group -```ts [index.ts] -import { getToken } from '@wagmi/core' -import { config } from './config' - -const token = getToken(config, { - address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', -}) -``` -<<< @/snippets/core/config.ts[config.ts] -::: - -## Parameters - -```ts -import { type GetTokenParameters } from '@wagmi/core' -``` - -### address - -`Address` - -Address to get token for. - -::: code-group -```ts [index.ts] -import { getToken } from '@wagmi/core' -import { config } from './config' - -const token = getToken(config, { - address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', // [!code focus] -}) -``` -<<< @/snippets/core/config.ts[config.ts] -::: - -### chainId - -`config['chains'][number]['id'] | undefined` - -ID of chain to use when fetching data. - -::: code-group -```ts [index.ts] -import { getToken } from '@wagmi/core' -import { mainnet } from '@wagmi/core/chains' -import { config } from './config' - -const token = await getToken(config, { - address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', - chainId: mainnet.id, // [!code focus] -}) -``` -<<< @/snippets/core/config.ts[config.ts] -::: - -### formatUnits - -`'ether' | 'gwei' | 'wei' | number | undefined` - -- Units to use when formatting result. -- Defaults to `'ether'`. - -::: code-group -```ts [index.ts] -import { getToken } from '@wagmi/core' -import { config } from './config' - -const token = getToken(config, { - address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', - formatUnits: 'ether', // [!code focus] -}) -``` -<<< @/snippets/core/config.ts[config.ts] -::: - -## Return Type - -```ts -import { type GetTokenReturnType } from '@wagmi/core' -``` - -### address - -`Address` - -Address of token. - -### decimals - -`number` - -Number of decimals for token. - -### name - -`string | undefined` - -Name of token. - -### symbol - -`string | undefined` - -Symbol of token. - -### totalSupply - -`{ formatted: string; value: bigint; }` - -Total supply of token. `formatted` is formatted using [`formatUnits`](#formatunits). - -## Error - -```ts -import { type GetTokenErrorType } from '@wagmi/core' -``` - - - -## Viem - -- [`multicall`](https://viem.sh/docs/contract/multicall) diff --git a/site/core/api/actions/signMessage.md b/site/core/api/actions/signMessage.md index 7542c3826c..788d0347e6 100644 --- a/site/core/api/actions/signMessage.md +++ b/site/core/api/actions/signMessage.md @@ -59,10 +59,10 @@ const result = await signMessage(config, { ::: code-group ```ts [index.ts] -import { getAccount, signMessage } from '@wagmi/core' +import { getConnection, signMessage } from '@wagmi/core' import { config } from './config' -const { connector } = getAccount(config) +const { connector } = getConnection(config) const result = await signMessage(config, { connector, // [!code focus] message: 'hello world', diff --git a/site/core/api/actions/signTypedData.md b/site/core/api/actions/signTypedData.md index 17a454ae94..a4f597dbe4 100644 --- a/site/core/api/actions/signTypedData.md +++ b/site/core/api/actions/signTypedData.md @@ -97,11 +97,11 @@ const result = await signTypedData(config, { ::: code-group ```ts [index.ts] -import { getAccount, signTypedData } from '@wagmi/core' +import { getConnection, signTypedData } from '@wagmi/core' import { config } from './config' import { types } from './typedData' -const { connector } = getAccount(config) +const { connector } = getConnection(config) const result = await signTypedData(config, { connector, // [!code focus] types, diff --git a/site/core/api/actions/simulateContract.md b/site/core/api/actions/simulateContract.md index ecc349a729..02eb1b9c17 100644 --- a/site/core/api/actions/simulateContract.md +++ b/site/core/api/actions/simulateContract.md @@ -282,11 +282,11 @@ const result = await simulateContract(config, { ::: code-group ```ts [index.ts] -import { getAccount, simulateContract } from '@wagmi/core' +import { getConnection, simulateContract } from '@wagmi/core' import { abi } from './abi' import { config } from './config' -const { connector } = getAccount(config) +const { connector } = getConnection(config) const result = await simulateContract(config, { abi, address: '0x6b175474e89094c44da98b954eedeac495271d0f', diff --git a/site/core/api/actions/switchChain.md b/site/core/api/actions/switchChain.md index 82c1a153b6..eb58e1dc30 100644 --- a/site/core/api/actions/switchChain.md +++ b/site/core/api/actions/switchChain.md @@ -86,14 +86,14 @@ const result = await switchChain(config, { ::: code-group ```ts [index.ts] -import { getConnections, switchAccount } from '@wagmi/core' +import { getConnection, switchChain } from '@wagmi/core' import { mainnet } from '@wagmi/core/chains' import { config } from './config' -const connections = getConnections(config) +const connection = getConnection(config) const result = await switchChain(config, { chainId: mainnet.id, - connector: connections[0]?.connector, // [!code focus] + connector: connection?.connector, // [!code focus] }) ``` <<< @/snippets/core/config.ts[config.ts] diff --git a/site/core/api/actions/switchAccount.md b/site/core/api/actions/switchConnection.md similarity index 62% rename from site/core/api/actions/switchAccount.md rename to site/core/api/actions/switchConnection.md index 8d0f629c13..f3c1733814 100644 --- a/site/core/api/actions/switchAccount.md +++ b/site/core/api/actions/switchConnection.md @@ -1,28 +1,28 @@ -# switchAccount +# switchConnection Action for switching the current account. ## Import ```ts -import { switchAccount } from '@wagmi/core' +import { switchConnection } from '@wagmi/core' ``` ## Usage ::: code-group ```ts [index.ts] -import { getConnections, switchAccount } from '@wagmi/core' +import { getConnections, switchConnection } from '@wagmi/core' import { config } from './config' const connections = getConnections(config) -const result = await switchAccount(config, { +const result = await switchConnection(config, { connector: connections[0]?.connector, }) ``` @@ -32,7 +32,7 @@ const result = await switchAccount(config, { ## Parameters ```ts -import { type SwitchAccountParameters } from '@wagmi/core' +import { type SwitchConnectionParameters } from '@wagmi/core' ``` ### connector @@ -43,11 +43,11 @@ import { type SwitchAccountParameters } from '@wagmi/core' ::: code-group ```ts [index.ts] -import { getConnections, switchAccount } from '@wagmi/core' +import { getConnections, switchConnection } from '@wagmi/core' import { config } from './config' const connections = getConnections(config) -const result = await switchAccount(config, { +const result = await switchConnection(config, { connector: connections[0]?.connector, // [!code focus] }) ``` @@ -57,7 +57,7 @@ const result = await switchAccount(config, { ## Return Type ```ts -import { type SwitchAccountReturnType } from '@wagmi/core' +import { type SwitchConnectionReturnType } from '@wagmi/core' ``` ### accounts @@ -75,7 +75,7 @@ Connected chain ID from connector. ## Error ```ts -import { type SwitchAccountErrorType } from '@wagmi/core' +import { type SwitchConnectionErrorType } from '@wagmi/core' ``` diff --git a/site/core/api/actions/verifyMessage.md b/site/core/api/actions/verifyMessage.md index d58b7e7c18..f6b3fd8179 100644 --- a/site/core/api/actions/verifyMessage.md +++ b/site/core/api/actions/verifyMessage.md @@ -66,7 +66,7 @@ By default, wagmi verifies the UTF-8 representation of the message. ::: code-group ```ts [index.ts] -import { getAccount, verifyMessage } from '@wagmi/core' +import { verifyMessage } from '@wagmi/core' import { config } from './config' await verifyMessage(config, { diff --git a/site/core/api/actions/watchAccount.md b/site/core/api/actions/watchAccount.md deleted file mode 100644 index a71ca4d161..0000000000 --- a/site/core/api/actions/watchAccount.md +++ /dev/null @@ -1,61 +0,0 @@ -# watchAccount - -Subscribe to account changes. - -## Import - -```ts -import { watchAccount } from '@wagmi/core' -``` - -## Usage - -::: code-group -```ts [index.ts] -import { watchAccount } from '@wagmi/core' -import { config } from './config' - -const unwatch = watchAccount(config, { - onChange(data) { - console.log('Account changed!', data) - }, -}) -unwatch() -``` -<<< @/snippets/core/config.ts[config.ts] -::: - -## Parameters - -```ts -import { type WatchAccountParameters } from '@wagmi/core' -``` - -### onChange - -`onChange(account: GetAccountReturnType, prevAccount: GetAccountReturnType): void` - -Callback function called when account changes. - -::: code-group -```ts [index.ts] -import { watchAccount } from '@wagmi/core' -import { config } from './config' - -const unwatch = watchAccount(config, { - onChange(account) { // [!code focus:3] - console.log('Account changed!', account) - }, -}) -unwatch() -``` -<<< @/snippets/core/config.ts[config.ts] -::: - -## Return Type - -```ts -import { type WatchAccountReturnType } from '@wagmi/core' -``` - -Function for cleaning up watcher. \ No newline at end of file diff --git a/site/core/api/actions/watchAsset.md b/site/core/api/actions/watchAsset.md index 96c9a3a419..483f5354a3 100644 --- a/site/core/api/actions/watchAsset.md +++ b/site/core/api/actions/watchAsset.md @@ -47,10 +47,10 @@ import { type WatchAssetParameters } from '@wagmi/core' ::: code-group ```ts [index.ts] -import { getAccount, watchAsset } from '@wagmi/core' +import { getConnection, watchAsset } from '@wagmi/core' import { config } from './config' -const { connector } = getAccount(config) +const { connector } = getConnection(config) const result = await watchAsset(config, { connector, // [!code focus] options: { diff --git a/site/core/api/actions/watchConnection.md b/site/core/api/actions/watchConnection.md new file mode 100644 index 0000000000..abb4db097e --- /dev/null +++ b/site/core/api/actions/watchConnection.md @@ -0,0 +1,61 @@ +# watchConnection + +Subscribe to connection changes. + +## Import + +```ts +import { watchConnection } from '@wagmi/core' +``` + +## Usage + +::: code-group +```ts [index.ts] +import { watchConnection } from '@wagmi/core' +import { config } from './config' + +const unwatch = watchConnection(config, { + onChange(data) { + console.log('Connection changed!', data) + }, +}) +unwatch() +``` +<<< @/snippets/core/config.ts[config.ts] +::: + +## Parameters + +```ts +import { type WatchConnectionParameters } from '@wagmi/core' +``` + +### onChange + +`onChange(connection: GetConnectionReturnType, prevConnection: GetConnectionReturnType): void` + +Callback function called when connection changes. + +::: code-group +```ts [index.ts] +import { watchConnection } from '@wagmi/core' +import { config } from './config' + +const unwatch = watchConnection(config, { + onChange(connection) { // [!code focus:3] + console.log('Connection changed!', connection) + }, +}) +unwatch() +``` +<<< @/snippets/core/config.ts[config.ts] +::: + +## Return Type + +```ts +import { type WatchConnectionReturnType } from '@wagmi/core' +``` + +Function for cleaning up watcher. diff --git a/site/core/api/actions/writeContract.md b/site/core/api/actions/writeContract.md index c9a12d11e3..950466eb6a 100644 --- a/site/core/api/actions/writeContract.md +++ b/site/core/api/actions/writeContract.md @@ -252,11 +252,11 @@ const result = await writeContract(config, { ::: code-group ```ts [index.ts] -import { getAccount, writeContract } from '@wagmi/core' +import { getConnection, writeContract } from '@wagmi/core' import { abi } from './abi' import { config } from './config' -const { connector } = getAccount(config) +const { connector } = getConnection(config) const result = await writeContract(config, { abi, address: '0x6b175474e89094c44da98b954eedeac495271d0f', diff --git a/site/core/api/connectors.md b/site/core/api/connectors.md index d68718b25b..8dc5912565 100644 --- a/site/core/api/connectors.md +++ b/site/core/api/connectors.md @@ -13,13 +13,17 @@ Connectors for popular wallet providers and protocols. ## Import +Available via the `'@wagmi/connectors'` package. + ```ts -import { injected } from 'wagmi/connectors' +import { injected } from '@wagmi/connectors' ``` ## Built-In Connectors -Available via the `'wagmi/connectors'` entrypoint. +::: tip +Some connectors require third-party packages. See the "Install" section on each connector's page for more info on license, version, and more. +:::
  • diff --git a/site/core/api/connectors/baseAccount.md b/site/core/api/connectors/baseAccount.md index 1b34d3c8fe..ddc1ffcb3d 100644 --- a/site/core/api/connectors/baseAccount.md +++ b/site/core/api/connectors/baseAccount.md @@ -3,8 +3,12 @@ title: baseAccount --- diff --git a/site/core/api/connectors/coinbaseWallet.md b/site/core/api/connectors/coinbaseWallet.md index d8968eac7d..7eeab9959d 100644 --- a/site/core/api/connectors/coinbaseWallet.md +++ b/site/core/api/connectors/coinbaseWallet.md @@ -1,6 +1,10 @@ - \ No newline at end of file + diff --git a/site/core/api/connectors/gemini.md b/site/core/api/connectors/gemini.md index 4ca80f234b..a6ed4caddb 100644 --- a/site/core/api/connectors/gemini.md +++ b/site/core/api/connectors/gemini.md @@ -3,9 +3,13 @@ title: gemini --- diff --git a/site/core/api/connectors/metaMask.md b/site/core/api/connectors/metaMask.md index ddbe23c9ed..9e3f8c2c25 100644 --- a/site/core/api/connectors/metaMask.md +++ b/site/core/api/connectors/metaMask.md @@ -3,9 +3,13 @@ title: metaMask --- diff --git a/site/core/api/connectors/porto.md b/site/core/api/connectors/porto.md index 8bd12d10e5..1dfce92c8b 100644 --- a/site/core/api/connectors/porto.md +++ b/site/core/api/connectors/porto.md @@ -3,8 +3,12 @@ title: porto --- diff --git a/site/core/api/connectors/safe.md b/site/core/api/connectors/safe.md index b5cbe195a0..651d2431c0 100644 --- a/site/core/api/connectors/safe.md +++ b/site/core/api/connectors/safe.md @@ -3,8 +3,15 @@ title: safe --- diff --git a/site/core/api/connectors/walletConnect.md b/site/core/api/connectors/walletConnect.md index 97b4c98d3f..c1d80874fc 100644 --- a/site/core/api/connectors/walletConnect.md +++ b/site/core/api/connectors/walletConnect.md @@ -3,8 +3,12 @@ title: walletConnect --- diff --git a/site/core/api/utilities/normalizeChainId.md b/site/core/api/utilities/normalizeChainId.md deleted file mode 100644 index 149d6d76d4..0000000000 --- a/site/core/api/utilities/normalizeChainId.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: normalizeChainId ---- - - - - diff --git a/site/core/getting-started.md b/site/core/getting-started.md index f5759957a5..8b4988b54b 100644 --- a/site/core/getting-started.md +++ b/site/core/getting-started.md @@ -52,10 +52,10 @@ Now that everything is set up, you can pass the `config` to use actions. ::: code-group ```tsx [index.ts] -import { getAccount, getEnsName } from '@wagmi/core' +import { getConnection, getEnsName } from '@wagmi/core' import { config } from './config' -const { address } = getAccount(config) +const { address } = getConnection(config) const ensName = await getEnsName(config, { address }) ``` <<< @/snippets/core/config.ts[config.ts] diff --git a/site/core/guides/framework-adapters.md b/site/core/guides/framework-adapters.md index 1e45ba63ec..7468e34b6a 100644 --- a/site/core/guides/framework-adapters.md +++ b/site/core/guides/framework-adapters.md @@ -16,7 +16,7 @@ Once you create a Wagmi Config, you'll need to make sure your framework has acce All frameworks approach reactivity in a different way. To hook into your favorite frameworks, reactivity system, it's often helpful to see what other popular libraries for your framework are doing. -The most important thing to hook up Wagmi Core with your framework is to make sure changes to the Wagmi Config are tracked. This enables behavior, like switching chains or connecting accounts, to propagate throughout your app and update state. Check out [`useAccount`](https://github.com/wevm/wagmi/blob/main/packages/react/src/hooks/useAccount.ts), [`useChainId`](https://github.com/wevm/wagmi/blob/main/packages/react/src/hooks/useChainId.ts), [`useClient`](https://github.com/wevm/wagmi/blob/main/packages/react/src/hooks/useClient.ts), and [`useConnectorClient`](https://github.com/wevm/wagmi/blob/main/packages/react/src/hooks/useConnectorClient.ts) — versions of these for your framework are important to get right as they power a lot of internals. +The most important thing to hook up Wagmi Core with your framework is to make sure changes to the Wagmi Config are tracked. This enables behavior, like switching chains or connecting accounts, to propagate throughout your app and update state. Check out [`useConnection`](https://github.com/wevm/wagmi/blob/main/packages/react/src/hooks/useConnection.ts), [`useChainId`](https://github.com/wevm/wagmi/blob/main/packages/react/src/hooks/useChainId.ts), [`useClient`](https://github.com/wevm/wagmi/blob/main/packages/react/src/hooks/useClient.ts), and [`useConnectorClient`](https://github.com/wevm/wagmi/blob/main/packages/react/src/hooks/useConnectorClient.ts) — versions of these for your framework are important to get right as they power a lot of internals. ## TanStack Query diff --git a/site/core/guides/migrate-from-v1-to-v2.md b/site/core/guides/migrate-from-v1-to-v2.md index b2f4f12725..79d8a0d359 100644 --- a/site/core/guides/migrate-from-v1-to-v2.md +++ b/site/core/guides/migrate-from-v1-to-v2.md @@ -104,7 +104,7 @@ The `getNetwork` and `watchNetwork` actions were removed since the connected cha <<< @/snippets/core/config.ts[config.ts] ::: -- Use [`getAccount`](/core/api/actions/getAccount) and `config.chains` instead to get `chain`. +- Use [`getAccount`](/core/api/actions/getConnection) and `config.chains` instead to get `chain`. ::: code-group ```ts [index.ts] @@ -551,7 +551,7 @@ const result = await readContracts(config, { // [!code ++] The `formatUnits` parameter and related return values (e.g. `result.formatted`) are deprecated for the following actions: - [`estimateFeesPerGas`](/core/api/actions/estimateFeesPerGas) -- [`getToken`](/core/api/actions/getToken) +- `getToken` Instead you can call `formatUnits` from Viem directly or use another number formatting library, like [dnum](https://github.com/bpierre/dnum) instead. @@ -579,7 +579,7 @@ The following actions were renamed to better reflect their functionality and und - `fetchEnsAvatar` is now [`getEnsAvatar`](/core/api/actions/getEnsAvatar) - `fetchEnsName` is now [`getEnsName`](/core/api/actions/getEnsName) - `fetchEnsResolver` is now [`getEnsResolver`](/core/api/actions/getEnsResolver) -- `fetchToken` is now [`getToken`](/core/api/actions/getToken) +- `fetchToken` is now `getToken` - `fetchTransaction` is now [`getTransaction`](/core/api/actions/getTransaction) - `switchNetwork` is now [`switchChain`](/core/api/actions/switchChain) - `waitForTransaction` is now [`waitForTransactionReceipt`](/core/api/actions/waitForTransactionReceipt) diff --git a/site/core/guides/migrate-from-v2-to-v3.md b/site/core/guides/migrate-from-v2-to-v3.md new file mode 100644 index 0000000000..3ec09c989a --- /dev/null +++ b/site/core/guides/migrate-from-v2-to-v3.md @@ -0,0 +1,71 @@ +--- +title: Migrate from v2 to v3 +description: Guide for migrating from Wagmi v2 to v3. +--- + + + +# Migrate from v2 to v3 + +## Overview + +Wagmi v3 gives you total control over connector dependencies. Since Wagmi's initial release, Wagmi included required connector dependencies as part of its package to eliminate the need to manage multiple third-party dependencies. + +This worked worked well in the early years as a "batteries-included" approach, but didn't allow for more fine-grained control over your dependency tree. By giving you control over connector dependencies, you can decide to only install what you need, manage version bumps at your own pace, and have total control over what third-party code and licenses you bring into your project + +To get started, install the latest version of Wagmi. + +::: code-group +```bash [pnpm] +pnpm add @wagmi/core@3 +``` + +```bash [npm] +npm install @wagmi/core@3 +``` + +```bash [yarn] +yarn add @wagmi/core@3 +``` + +```bash [bun] +bun add @wagmi/core@3 +``` +::: + +::: info Not ready to migrate yet? +The Wagmi v2 docs are still available at [2.x.wagmi.sh/core](https://2.x.wagmi.sh/core). +::: + + + +## Deprecations + +### Renamed Account Actions + +At the core of Wagmi are connections between apps and Ethereum providers (e.g. EIP-1193), `getAccount`, `switchAccount`, and `watchAccount` are renamed to `getConnection`, `switchConnection`, and `watchConnection` to more accurately represent to how Wagmi works. + +```ts +import { + getAccount, // [!code --] + getConnection, // [!code ++] + switchAccount, // [!code --] + switchConnection, // [!code ++] + watchAccount, // [!code --] + watchConnection, // [!code ++] +} from '@wagmi/core' +``` + +`switchAccountMutationOptions` is also updated to `switchConnectionMutationOptions`. + +```ts +import { + switchAccountMutationOptions, // [!code --] + switchConnectionMutationOptions, // [!code ++] +} from '@wagmi/core/query' + +``` diff --git a/site/package.json b/site/package.json index 6e02b29377..acce18ed6b 100644 --- a/site/package.json +++ b/site/package.json @@ -8,7 +8,7 @@ "preview": "vitepress preview" }, "devDependencies": { - "@shikijs/vitepress-twoslash": "1.22.2", + "@shikijs/vitepress-twoslash": "3.15.0", "@tanstack/query-core": "catalog:", "@tanstack/react-query": "catalog:", "@tanstack/vue-query": "catalog:", @@ -19,10 +19,11 @@ "abitype": "*", "nuxt": "^3.19.2", "react": "catalog:", - "unocss": "^0.59.4", + "unocss": "^66.5.6", "viem": "2.*", - "vitepress": "1.5.0", - "vitepress-plugin-llms": "^1.7.5", + "vitepress": "1.6.3", + "vitepress-plugin-group-icons": "^1.6.5", + "vitepress-plugin-llms": "^1.8.1", "vue": "catalog:", "wagmi": "workspace:*" } diff --git a/site/react/api/connectors.md b/site/react/api/connectors.md index 49096a1641..95a0e4124d 100644 --- a/site/react/api/connectors.md +++ b/site/react/api/connectors.md @@ -21,6 +21,10 @@ import { injected } from 'wagmi/connectors' ## Available Connectors +::: tip +Some connectors require third-party packages. See the "Install" section on each connector's page for more info on license, version, and more. +::: +
    • {{ connector.text }} diff --git a/site/react/api/connectors/baseAccount.md b/site/react/api/connectors/baseAccount.md index 56a81ba1a8..110da644ac 100644 --- a/site/react/api/connectors/baseAccount.md +++ b/site/react/api/connectors/baseAccount.md @@ -3,8 +3,12 @@ title: baseAccount --- diff --git a/site/react/api/connectors/coinbaseWallet.md b/site/react/api/connectors/coinbaseWallet.md index b8597b11ae..2a25b8c583 100644 --- a/site/react/api/connectors/coinbaseWallet.md +++ b/site/react/api/connectors/coinbaseWallet.md @@ -1,6 +1,10 @@ - \ No newline at end of file + diff --git a/site/react/api/connectors/gemini.md b/site/react/api/connectors/gemini.md index 1d5fd4403e..c30891d8e7 100644 --- a/site/react/api/connectors/gemini.md +++ b/site/react/api/connectors/gemini.md @@ -3,9 +3,13 @@ title: gemini --- diff --git a/site/react/api/connectors/metaMask.md b/site/react/api/connectors/metaMask.md index a7a8c24cc7..3adde04360 100644 --- a/site/react/api/connectors/metaMask.md +++ b/site/react/api/connectors/metaMask.md @@ -3,9 +3,13 @@ title: metaMask --- diff --git a/site/react/api/connectors/porto.md b/site/react/api/connectors/porto.md index 8b606955c9..e1f27a5166 100644 --- a/site/react/api/connectors/porto.md +++ b/site/react/api/connectors/porto.md @@ -3,8 +3,12 @@ title: porto --- diff --git a/site/react/api/connectors/safe.md b/site/react/api/connectors/safe.md index 4f46adedaa..ce779051eb 100644 --- a/site/react/api/connectors/safe.md +++ b/site/react/api/connectors/safe.md @@ -3,8 +3,15 @@ title: safe --- diff --git a/site/react/api/connectors/walletConnect.md b/site/react/api/connectors/walletConnect.md index dbbb2563b5..9936ed2aaf 100644 --- a/site/react/api/connectors/walletConnect.md +++ b/site/react/api/connectors/walletConnect.md @@ -3,8 +3,12 @@ title: walletConnect --- diff --git a/site/react/api/hooks.md b/site/react/api/hooks.md index 9d8a65c718..768b5f9cab 100644 --- a/site/react/api/hooks.md +++ b/site/react/api/hooks.md @@ -13,7 +13,7 @@ React Hooks for accounts, wallets, contracts, transactions, signing, ENS, and mo ## Import ```ts -import { useAccount } from 'wagmi' +import { useConnection } from 'wagmi' ``` ## Available Hooks diff --git a/site/react/api/hooks/useBalance.md b/site/react/api/hooks/useBalance.md index deddbb720d..7a99382ecf 100644 --- a/site/react/api/hooks/useBalance.md +++ b/site/react/api/hooks/useBalance.md @@ -1,19 +1,19 @@ --- title: useBalance -description: Hook for fetching native currency or token balance. +description: Hook for fetching native currency balance. --- # useBalance -Hook for fetching native currency or token balance. +Hook for fetching native currency balance. ## Import @@ -168,47 +168,6 @@ function App() { <<< @/snippets/react/config.ts[config.ts] ::: -### token [deprecated](/react/guides/migrate-from-v1-to-v2#deprecated-usebalance-token-parameter) - -`Address | undefined` - -ERC-20 token address to get balance for. - -::: code-group -```ts [index.ts] -import { useBalance } from 'wagmi' - -function App() { - const result = useBalance({ - address: '0x4557B18E779944BFE9d78A672452331C186a9f48', - token: '0x6B175474E89094C44Da98b954EedeAC495271d0F', // [!code focus] - }) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - -### unit [deprecated](/react/guides/migrate-from-v1-to-v2#deprecated-usebalance-unit-parameter-and-formatted-return-value) - -`'ether' | 'gwei' | 'wei' | number | undefined` - -- Units to use when formatting result. -- Defaults to `'ether'`. - -::: code-group -```ts [index.ts] -import { useBalance } from 'wagmi' - -function App() { - const result = useBalance({ - address: '0x4557B18E779944BFE9d78A672452331C186a9f48', - unit: 'ether', // [!code focus] - }) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - ## Return Type diff --git a/site/react/api/hooks/useConnect.md b/site/react/api/hooks/useConnect.md index 690eee10f6..513e3ebee6 100644 --- a/site/react/api/hooks/useConnect.md +++ b/site/react/api/hooks/useConnect.md @@ -77,7 +77,7 @@ function App() { import { type UseConnectReturnType } from 'wagmi' ``` -### connectors +### connectors [deprecated](/react/guides/migrate-from-v2-to-v3#removed-useconnect-connectors-usereconnect-connectors) `readonly Connector[]` diff --git a/site/react/api/hooks/useAccount.md b/site/react/api/hooks/useConnection.md similarity index 52% rename from site/react/api/hooks/useAccount.md rename to site/react/api/hooks/useConnection.md index d5b9e2964c..5ba384c191 100644 --- a/site/react/api/hooks/useAccount.md +++ b/site/react/api/hooks/useConnection.md @@ -1,26 +1,26 @@ --- -title: useAccount -description: Hook for getting current account. +title: useConnection +description: Hook for getting current connection. --- -# useAccount +# useConnection -Hook for getting current account. +Hook for getting current connection. ## Import ```ts -import { useAccount } from 'wagmi' +import { useConnection } from 'wagmi' ``` ## Usage ::: code-group ```tsx [index.tsx] -import { useAccount } from 'wagmi' +import { useConnection } from 'wagmi' function App() { - const account = useAccount() + const connection = useConnection() } ``` <<< @/snippets/react/config.ts[config.ts] @@ -29,7 +29,7 @@ function App() { ## Parameters ```ts -import { type UseAccountParameters } from 'wagmi' +import { type UseConnectionParameters } from 'wagmi' ``` ### config @@ -40,11 +40,11 @@ import { type UseAccountParameters } from 'wagmi' ::: code-group ```tsx [index.tsx] -import { useAccount } from 'wagmi' +import { useConnection } from 'wagmi' import { config } from './config' // [!code focus] function App() { - const account = useAccount({ + const connection = useConnection({ config, // [!code focus] }) } @@ -55,11 +55,11 @@ function App() { ## Return Type ```ts -import { type UseAccountReturnType } from 'wagmi' +import { type UseConnectionReturnType } from 'wagmi' ``` - + ## Action -- [`getAccount`](/core/api/actions/getAccount) +- [`getConnection`](/core/api/actions/getConnection) diff --git a/site/react/api/hooks/useAccountEffect.md b/site/react/api/hooks/useConnectionEffect.md similarity index 67% rename from site/react/api/hooks/useAccountEffect.md rename to site/react/api/hooks/useConnectionEffect.md index 6636f4bbaa..ffa4a21331 100644 --- a/site/react/api/hooks/useAccountEffect.md +++ b/site/react/api/hooks/useConnectionEffect.md @@ -1,26 +1,26 @@ --- -title: useAccountEffect -description: Hook for listening to account lifecycle events. +title: useConnectionEffect +description: Hook for listening to connection lifecycle events. --- -# useAccountEffect +# useConnectionEffect -Hook for listening to account lifecycle events. +Hook for listening to connection lifecycle events. ## Import ```ts -import { useAccountEffect } from 'wagmi' +import { useConnectionEffect } from 'wagmi' ``` ## Usage ::: code-group ```tsx [index.tsx] -import { useAccountEffect } from 'wagmi' +import { useConnectionEffect } from 'wagmi' function App() { - useAccountEffect({ + useConnectionEffect({ onConnect(data) { console.log('Connected!', data) }, @@ -36,7 +36,7 @@ function App() { ## Parameters ```ts -import { type UseAccountEffectParameters } from 'wagmi' +import { type UseConnectionEffectParameters } from 'wagmi' ``` ### config @@ -47,11 +47,11 @@ import { type UseAccountEffectParameters } from 'wagmi' ::: code-group ```tsx [index.tsx] -import { useAccountEffect } from 'wagmi' +import { useConnectionEffect } from 'wagmi' import { config } from './config' // [!code focus] function App() { - useAccountEffect({ + useConnectionEffect({ config, // [!code focus] onConnect(data) { console.log('Connected!', data) @@ -69,14 +69,14 @@ function App() { `` ((data: { address: `0x${string}`; addresses: readonly [`0x${string}`, ...`0x${string}`[]]; chain: Chain | undefined chainId: number; connector: Connector; isReconnected: boolean }) => void) | undefined `` -Callback that is called when accounts are connected. +Callback that is called when connection is made. ::: code-group ```tsx [index.tsx] -import { useAccountEffect } from 'wagmi' +import { useConnectionEffect } from 'wagmi' function App() { - useAccountEffect({ + useConnectionEffect({ onConnect(data) { // [!code focus] console.log('Connected!', data) // [!code focus] }, // [!code focus] @@ -90,14 +90,14 @@ function App() { `(() => void) | undefined` -Callback that is called when no more accounts are connected. +Callback that is called when there no more connections. ::: code-group ```tsx [index.tsx] -import { useAccountEffect } from 'wagmi' +import { useConnectionEffect } from 'wagmi' function App() { - useAccountEffect({ + useConnectionEffect({ onDisconnect() { // [!code focus] console.log('Disconnected!') // [!code focus] }, // [!code focus] @@ -109,5 +109,5 @@ function App() { ## Action -- [`getAccount`](/core/api/actions/getAccount) -- [`watchAccount`](/core/api/actions/watchAccount) +- [`getConnection`](/core/api/actions/getConnection) +- [`watchConnection`](/core/api/actions/watchConnection) diff --git a/site/react/api/hooks/useDisconnect.md b/site/react/api/hooks/useDisconnect.md index 5e537a846d..3b8d38be81 100644 --- a/site/react/api/hooks/useDisconnect.md +++ b/site/react/api/hooks/useDisconnect.md @@ -76,7 +76,7 @@ function App() { import { type UseDisconnectReturnType } from 'wagmi' ``` -### connectors +### connectors [deprecated](/react/guides/migrate-from-v2-to-v3#removed-usedisconnect-connectors-useswitchconnection-connectors) `readonly Connector[]` @@ -84,11 +84,12 @@ Connectors that are currently connected. Useful for rendering a list of connecto ::: code-group ```tsx [index.tsx] -import { useDisconnect } from 'wagmi' +import { useConnectors, useDisconnect } from 'wagmi' import { mainnet } from 'wagmi/chains' function App() { - const { connectors, disconnect } = useDisconnect() + const { disconnect } = useDisconnect() + const connectors = useConnectors() return (
      diff --git a/site/react/api/hooks/useEstimateFeesPerGas.md b/site/react/api/hooks/useEstimateFeesPerGas.md index 29b8711673..2ff6ace4a2 100644 --- a/site/react/api/hooks/useEstimateFeesPerGas.md +++ b/site/react/api/hooks/useEstimateFeesPerGas.md @@ -7,7 +7,7 @@ description: Hook for fetching an estimate for the fees per gas (in wei) for a t const packageName = 'wagmi' const actionName = 'estimateFeesPerGas' const typeName = 'EstimateFeesPerGas' -const TData = '{ formatted: { gasPrice: string | undefined; maxFeePerGas: string | undefined; maxPriorityFeePerGas: string | undefined; }; gasPrice: bigint | undefined; maxFeePerGas: bigint | undefined; maxPriorityFeePerGas: bigint | undefined; }' +const TData = '{ gasPrice: bigint | undefined; maxFeePerGas: bigint | undefined; maxPriorityFeePerGas: bigint | undefined; }' const TError = 'EstimateFeesPerGasErrorType' @@ -80,26 +80,6 @@ function App() { <<< @/snippets/react/config.ts[config.ts] ::: -### formatUnits - -`'ether' | 'gwei' | 'wei' | number | undefined` - -- Units to use when formatting result. -- Defaults to `'ether'`. - -::: code-group -```ts [index.ts] -import { useEstimateFeesPerGas } from 'wagmi' - -function App() { - const result = useEstimateFeesPerGas({ - formatUnits: 'ether', // [!code focus] - }) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - ### scopeKey `string | undefined` diff --git a/site/react/api/hooks/useReconnect.md b/site/react/api/hooks/useReconnect.md index 7aff4945c9..ca29c5ade7 100644 --- a/site/react/api/hooks/useReconnect.md +++ b/site/react/api/hooks/useReconnect.md @@ -79,7 +79,7 @@ function App() { import { type UseReconnectReturnType } from 'wagmi' ``` -### connectors +### connectors [deprecated](/react/guides/migrate-from-v2-to-v3#removed-useconnect-connectors-usereconnect-connectors) `readonly Connector[]` diff --git a/site/react/api/hooks/useSwitchAccount.md b/site/react/api/hooks/useSwitchAccount.md deleted file mode 100644 index 8dc3395a70..0000000000 --- a/site/react/api/hooks/useSwitchAccount.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: useSwitchAccount -description: Hook for switching the current account. ---- - - - -# useSwitchAccount - -Hook for switching the current account. - -## Import - -```ts -import { useSwitchAccount } from 'wagmi' -``` - -## Usage - -::: code-group -```tsx [index.tsx] -import { useSwitchAccount } from 'wagmi' - -function App() { - const { connectors, switchAccount } = useSwitchAccount() - - return ( -
      - {connectors.map((connector) => ( - - ))} -
      - ) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - -## Parameters - -```ts -import { type UseSwitchAccountParameters } from 'wagmi' -``` - -### config - -`Config | undefined` - -[`Config`](/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](/react/api/WagmiProvider). - -::: code-group -```tsx [index.tsx] -import { useSwitchAccount } from 'wagmi' -import { config } from './config' // [!code focus] - -function App() { - const result = useSwitchAccount({ - config, // [!code focus] - }) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - - - -## Return Type - -```ts -import { type UseSwitchAccountReturnType } from 'wagmi' -``` - -### connectors - -`readonly Connector[]` - -Globally configured and actively connected connectors. Useful for rendering a list of available connectors to switch to. - -::: code-group -```tsx [index.tsx] -import { useSwitchAccount } from 'wagmi' - -function App() { - const { connectors, switchAccount } = useSwitchAccount() - - return ( -
      - {connectors.map((connector) => ( - - ))} -
      - ) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - - - - - -## Action - -- [`switchAccount`](/core/api/actions/switchAccount) diff --git a/site/react/api/hooks/useSwitchChain.md b/site/react/api/hooks/useSwitchChain.md index 3b139bd701..6a3de786af 100644 --- a/site/react/api/hooks/useSwitchChain.md +++ b/site/react/api/hooks/useSwitchChain.md @@ -27,10 +27,11 @@ import { useSwitchChain } from 'wagmi' ::: code-group ```tsx [index.tsx] -import { useSwitchChain } from 'wagmi' +import { useChains, useSwitchChain } from 'wagmi' function App() { - const { chains, switchChain } = useSwitchChain() + const { switchChain } = useSwitchChain() + const chains = useChains() return (
      @@ -84,7 +85,7 @@ function App() { import { type UseSwitchChainReturnType } from 'wagmi' ``` -### chains +### chains [deprecated](/react/guides/migrate-from-v2-to-v3#removed-useswitchchain-chains) `readonly [Chain, ...Chain[]]` diff --git a/site/react/api/hooks/useSwitchConnection.md b/site/react/api/hooks/useSwitchConnection.md new file mode 100644 index 0000000000..f452e290ee --- /dev/null +++ b/site/react/api/hooks/useSwitchConnection.md @@ -0,0 +1,117 @@ +--- +title: useSwitchConnection +description: Hook for switching the current connection. +--- + + + +# useSwitchConnection + +Hook for switching the current connection. + +## Import + +```ts +import { useSwitchConnection } from 'wagmi' +``` + +## Usage + +::: code-group +```tsx [index.tsx] +import { useConnections, useSwitchConnection } from 'wagmi' + +function App() { + const { switchConnection } = useSwitchConnection() + const connections = useConnections() + + return ( +
      + {connections.map((connection) => ( + + ))} +
      + ) +} +``` +<<< @/snippets/react/config.ts[config.ts] +::: + +## Parameters + +```ts +import { type UseSwitchConnectionParameters } from 'wagmi' +``` + +### config + +`Config | undefined` + +[`Config`](/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](/react/api/WagmiProvider). + +::: code-group +```tsx [index.tsx] +import { useSwitchConnection } from 'wagmi' +import { config } from './config' // [!code focus] + +function App() { + const result = useSwitchConnection({ + config, // [!code focus] + }) +} +``` +<<< @/snippets/react/config.ts[config.ts] +::: + + + +## Return Type + +```ts +import { type UseSwitchConnectionReturnType } from 'wagmi' +``` + +### connectors [deprecated](/react/guides/migrate-from-v2-to-v3#removed-usedisconnect-connectors-useswitchconnection-connectors) + +`readonly Connector[]` + +Globally configured and actively connected connectors. Useful for rendering a list of available connectors to switch to. + +::: code-group +```tsx [index.tsx] +import { useSwitchConnection } from 'wagmi' + +function App() { + const { connectors, switchConnection } = useSwitchConnection() + + return ( +
      + {connectors.map((connector) => ( + + ))} +
      + ) +} +``` +<<< @/snippets/react/config.ts[config.ts] +::: + + + + + +## Action + +- [`switchConnection`](/core/api/actions/switchConnection) diff --git a/site/react/api/hooks/useToken.md b/site/react/api/hooks/useToken.md deleted file mode 100644 index cd4c6dbec2..0000000000 --- a/site/react/api/hooks/useToken.md +++ /dev/null @@ -1,162 +0,0 @@ ---- -title: useToken -description: Hook for fetching token info. ---- - - - -# useToken [deprecated](/react/guides/migrate-from-v1-to-v2#deprecated-usetoken) - -Hook for fetching token info. - -## Import - -```ts -import { useToken } from 'wagmi' -``` - -## Usage - -::: code-group -```tsx [index.tsx] -import { useToken } from 'wagmi' - -function App() { - const result = useToken({ - address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', - }) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - -## Parameters - -```ts -import { type UseTokenParameters } from 'wagmi' -``` - -### address - -`Address | undefined` - -Address to get token for. [`enabled`](#enabled) set to `false` if `address` is `undefined`. - -::: code-group -```tsx [index.tsx] -import { useToken } from 'wagmi' -import { mainnet } from 'wagmi/chains' - -function App() { - const result = useToken({ - address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', // [!code focus] - }) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - -### chainId - -`config['chains'][number]['id'] | undefined` - -ID of chain to use when fetching data. - -::: code-group -```tsx [index.tsx] -import { useToken } from 'wagmi' -import { mainnet } from 'wagmi/chains' // [!code focus] - -function App() { - const result = useToken({ - address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', - chainId: mainnet.id, // [!code focus] - }) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - -### config - -`Config | undefined` - -[`Config`](/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](/react/api/WagmiProvider). - -::: code-group -```tsx [index.tsx] -import { useToken } from 'wagmi' -import { config } from './config' // [!code focus] - -function App() { - const result = useToken({ - address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', - config, // [!code focus] - }) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - -### formatUnits - -`'ether' | 'gwei' | 'wei' | number | undefined` - -- Units to use when formatting result. -- Defaults to `'ether'`. - -::: code-group -```ts [index.ts] -import { useToken } from 'wagmi' - -function App() { - const result = useToken({ - address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', - formatUnits: 'ether', // [!code focus] - }) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - -### scopeKey - -`string | undefined` - -Scopes the cache to a given context. Hooks that have identical context will share the same cache. - -::: code-group -```ts [index.ts] -import { useToken } from 'wagmi' - -function App() { - const result = useToken({ - address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', - scopeKey: 'foo', // [!code focus] - }) -} -``` -<<< @/snippets/react/config.ts[config.ts] -::: - - - -## Return Type - -```ts -import { type UseTokenReturnType } from 'wagmi' -``` - - - - - -## Action - -- [`getToken`](/core/api/actions/getToken) diff --git a/site/react/api/utilities/normalizeChainId.md b/site/react/api/utilities/normalizeChainId.md deleted file mode 100644 index ad7cc8aa3e..0000000000 --- a/site/react/api/utilities/normalizeChainId.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: normalizeChainId ---- - - - - diff --git a/site/react/getting-started.md b/site/react/getting-started.md index c015cbba1a..f91d1a300f 100644 --- a/site/react/getting-started.md +++ b/site/react/getting-started.md @@ -171,10 +171,10 @@ Now that everything is set up, every component inside the Wagmi and TanStack Que ::: code-group ```tsx [profile.tsx] -import { useAccount, useEnsName } from 'wagmi' +import { useConnection, useEnsName } from 'wagmi' export function Profile() { - const { address } = useAccount() + const { address } = useConnection() const { data, error, status } = useEnsName({ address }) if (status === 'pending') return
      Loading ENS name
      if (status === 'error') diff --git a/site/react/guides/connect-wallet.md b/site/react/guides/connect-wallet.md index 34a7e7bea3..9ae03f2332 100644 --- a/site/react/guides/connect-wallet.md +++ b/site/react/guides/connect-wallet.md @@ -125,10 +125,11 @@ Below, we are rendering a list of `connectors` retrieved from `useConnect`. When ```tsx [wallet-options.tsx] import * as React from 'react' -import { Connector, useConnect } from 'wagmi' +import { Connector, useConnect, useConnectors } from 'wagmi' export function WalletOptions() { - const { connectors, connect } = useConnect() + const { connect } = useConnect() + const connectors = useConnectors() return connectors.map((connector) => (