From 5f304f06da4bcee437d1a8d098116b0edf5a12fc Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Tue, 2 Apr 2024 14:03:48 +0300 Subject: [PATCH 1/4] Automatically register account if needed when locking (#210) * implement 142 -- simplify the process of voting by registering eoa as account. Given that account is often used a synonym for eoa it was not clear from error messages that one must run account:register. this was it happens automatically --- .changeset/early-geckos-rescue.md | 5 ++ .../cli/src/commands/lockedgold/lock.test.ts | 76 ++++++++++++++++++- packages/cli/src/commands/lockedgold/lock.ts | 14 +++- 3 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 .changeset/early-geckos-rescue.md diff --git a/.changeset/early-geckos-rescue.md b/.changeset/early-geckos-rescue.md new file mode 100644 index 000000000..f631ce993 --- /dev/null +++ b/.changeset/early-geckos-rescue.md @@ -0,0 +1,5 @@ +--- +'@celo/celocli': minor +--- + +feat: Running celocli lockedgold:lock will now automatically register the eoa as an account if needed before locking diff --git a/packages/cli/src/commands/lockedgold/lock.test.ts b/packages/cli/src/commands/lockedgold/lock.test.ts index 4c3b5c6a2..7e0ca1018 100644 --- a/packages/cli/src/commands/lockedgold/lock.test.ts +++ b/packages/cli/src/commands/lockedgold/lock.test.ts @@ -1,7 +1,13 @@ import { newKitFromWeb3 } from '@celo/contractkit' import { testWithGanache } from '@celo/dev-utils/lib/ganache-test' +import { ux } from '@oclif/core' +import BigNumber from 'bignumber.js' import Web3 from 'web3' -import { LONG_TIMEOUT_MS, testLocally } from '../../test-utils/cliUtils' +import { + LONG_TIMEOUT_MS, + stripAnsiCodesFromNestedArray, + testLocally, +} from '../../test-utils/cliUtils' import Register from '../account/register' import Lock from './lock' import Unlock from './unlock' @@ -27,4 +33,72 @@ testWithGanache('lockedgold:lock cmd', (web3: Web3) => { }, LONG_TIMEOUT_MS ) + describe('when EOA is not yet an account', () => { + it('performs the registration and locks the value', async () => { + const eoaAddresses = await web3.eth.getAccounts() + const eoa = eoaAddresses[1] + const kit = newKitFromWeb3(web3) + const accountsContract = await kit.contracts.getAccounts() + const lockedGoldContract = await kit.contracts.getLockedGold() + + const logSpy = jest.spyOn(console, 'log') + const actionSpy = jest.spyOn(ux.action, 'stop') + + // pre check + expect(await accountsContract.isAccount(eoa)).toBe(false) + + await testLocally(Lock, ['--from', eoa, '--value', '100']) + + expect(stripAnsiCodesFromNestedArray(logSpy.mock.calls)).toMatchInlineSnapshot(` + [ + [ + "Running Checks:", + ], + [ + " ✔ Value [100] is > 0 ", + ], + [ + "All checks passed", + ], + [ + "Address will be registered with Account contract to enable locking.", + ], + [ + "SendTransaction: register", + ], + [ + "txHash: 0x9322aba7cf28f466f1377b1da9a1e7ed94c3109aa5fd2f4ea23caab371f1cb0f", + ], + [ + "Running Checks:", + ], + [ + " ✔ Account has at least 0.0000000000000001 CELO ", + ], + [ + "All checks passed", + ], + [ + "SendTransaction: lock", + ], + [ + "txHash: 0x947e5f8c97fdfabf688b3879f5856e1165c3578f2741d2481c3c961aa83bba51", + ], + ] + `) + + expect(actionSpy.mock.calls).toMatchInlineSnapshot(` + [ + [], + [], + ] + `) + + expect(await accountsContract.isAccount(eoa)).toBe(true) + + expect(await lockedGoldContract.getAccountTotalLockedGold(eoa)).toEqBigNumber( + new BigNumber('100') + ) + }) + }) }) diff --git a/packages/cli/src/commands/lockedgold/lock.ts b/packages/cli/src/commands/lockedgold/lock.ts index bc6102db3..f4b6f9a0d 100644 --- a/packages/cli/src/commands/lockedgold/lock.ts +++ b/packages/cli/src/commands/lockedgold/lock.ts @@ -32,10 +32,20 @@ export default class Lock extends BaseCommand { await newCheckBuilder(this) .addCheck(`Value [${value.toFixed()}] is > 0`, () => value.gt(0)) - .isAccount(address) .runChecks() - const lockedGold = await kit.contracts.getLockedGold() + const [lockedGold, accountsContract] = await Promise.all([ + kit.contracts.getLockedGold(), + kit.contracts.getAccounts(), + ]) + + const isAccount = await accountsContract.isAccount(address) + + if (!isAccount) { + console.log('Address will be registered with Account contract to enable locking.') + await displaySendTx('register', accountsContract.createAccount()) + } + const pendingWithdrawalsValue = await lockedGold.getPendingWithdrawalsTotalValue(address) const relockValue = BigNumber.minimum(pendingWithdrawalsValue, value) const lockValue = value.minus(relockValue) From 38b26316d615e836e21bbfe2f44853f7e8220e03 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Tue, 2 Apr 2024 14:07:04 +0200 Subject: [PATCH 2/4] elliptic -> @noble/* (#59) * chore: add snapshot * wip: first attempt, the ecies file is not done * wip * fix: ecies module works * fix: ??? * chore: remove unused concatkdf? * fix: types * fix: wallets * fix: wallet-gcp * fix: regression tests * chore: add a note * chore: add changeset * fix: test * fix: web3 resolution * Refactor: dependencies dedup (such as keccaak, bip, etc) (#139) * test: add bls regression tests * refactor: more deps gone * refactor: types * refactor: getWordList * refactor: more deps gone * fix: utils * fix: keccak hash * fix: various buffer fixes * fix: force keccak to consider string as bytes * chore: update docs * fix: type * refactor: rlp -> @ethereumjs/rlp * refactor: eth-lib removal wip * refactor: eth-lib removal * chore: regenerate docs * fix: ensure no 0x-prefixed string is passed to hextobytes * fix: update snapshot * fix: ensure r,s,v are 0x prefixed * chore: regenerate docs * test: bls * test: some more signing-utils tests * chore: regenerate docs * chore: regenerate docs * fix: web3 resolution * fix: ledger SignMessage * chore: add note * chore: regenerate docs * chore: remove comment * chore: changesets * chore: changesets wording * chore: changesets wording * chore: remove comments --- .changeset/angry-coats-decide.md | 5 + .changeset/chilly-plums-tap.md | 5 + .changeset/cool-hairs-report.md | 6 + .changeset/eighty-adults-hunt.md | 5 + .changeset/hot-spoons-protect.md | 5 + .changeset/kind-eyes-confess.md | 5 + .changeset/lazy-beans-travel.md | 5 + .changeset/little-ears-search.md | 5 + .changeset/neat-countries-watch.md | 5 + .changeset/orange-bats-destroy.md | 5 + .changeset/pink-dragons-smile.md | 5 + .changeset/purple-bikes-confess.md | 5 + .changeset/rotten-brooms-whisper.md | 5 + .changeset/selfish-moles-occur.md | 5 + .changeset/sixty-crabs-call.md | 5 + .eslintrc.js | 15 - package.json | 3 +- packages/cli/bin/dev.js | 2 +- packages/cli/package.json | 1 - .../sdk/docs/base/interfaces/account.Bip39.md | 12 +- .../interfaces/account.Bip39.md | 12 +- .../commentEncryption.EncryptionStatus.md | 4 +- .../sdk/docs/cryptographic-utils/modules.md | 1 + .../cryptographic-utils/modules/account.md | 49 +- .../docs/cryptographic-utils/modules/bls.md | 14 +- .../modules/commentEncryption.md | 10 +- .../modules/dataEncryptionKey.md | 10 +- .../docs/cryptographic-utils/modules/index.md | 7 + .../cryptographic-utils/modules/wordlists.md | 19 + .../sign_typed_data_utils.EIP712Parameter.md | 4 +- .../sign_typed_data_utils.EIP712TypedData.md | 8 +- ...typed_data_utils.EIP712TypesWithPrimary.md | 4 +- packages/docs/sdk/docs/utils/modules/ecdh.md | 10 +- packages/docs/sdk/docs/utils/modules/ecies.md | 105 +- .../docs/sdk/docs/utils/modules/istanbul.md | 4 +- .../utils/modules/sign_typed_data_utils.md | 34 +- .../sdk/docs/wallet-base/modules/index.md | 35 + .../docs/wallet-base/modules/signing_utils.md | 164 +- .../classes/aws_hsm_signer.AwsHsmSigner.md | 14 +- .../classes/gcp_hsm_signer.GcpHsmSigner.md | 12 +- .../classes/signature_utils.Signature.md | 8 +- .../wallet-hsm/modules/signature_utils.md | 20 +- .../docs/sdk/docs/wallet-ledger/README.md | 1 + .../classes/ledger_signer.LedgerSigner.md | 10 +- .../classes/ledger_wallet.LedgerWallet.md | 12 +- .../enums/ledger_wallet.AddressValidation.md | 8 +- .../wallet-ledger/interfaces/types.ILedger.md | 135 + .../wallet-ledger/modules/ledger_wallet.md | 4 +- .../sdk/docs/wallet-ledger/modules/types.md | 31 + .../classes/local_signer.LocalSigner.md | 14 +- packages/sdk/base/package.json | 4 +- packages/sdk/base/src/account.ts | 4 +- packages/sdk/cryptographic-utils/package.json | 18 +- .../cryptographic-utils/src/account.test.ts | 7 +- .../sdk/cryptographic-utils/src/account.ts | 76 +- .../sdk/cryptographic-utils/src/bls.test.ts | 61 + packages/sdk/cryptographic-utils/src/bls.ts | 18 +- .../src/commentEncryption.test.ts | 19 +- .../src/commentEncryption.ts | 20 +- .../src/dataEncryptionKey.test.ts | 22 +- .../src/dataEncryptionKey.ts | 19 +- .../sdk/cryptographic-utils/src/wordlists.ts | 25 + .../explorer/fixtures/contract.metadata.json | 2 +- packages/sdk/governance/package.json | 1 - packages/sdk/governance/src/proposals.ts | 8 +- packages/sdk/utils/package.json | 9 +- packages/sdk/utils/src/ecdh.ts | 38 +- packages/sdk/utils/src/ecies.test.ts | 70 +- packages/sdk/utils/src/ecies.ts | 175 +- packages/sdk/utils/src/istanbul.ts | 21 +- .../utils/src/sign-typed-data-utils.test.ts | 54 +- .../sdk/utils/src/sign-typed-data-utils.ts | 43 +- packages/sdk/wallets/wallet-base/package.json | 6 +- .../wallet-base/src/signing-utils.test.ts | 47 +- .../wallets/wallet-base/src/signing-utils.ts | 391 +-- .../sdk/wallets/wallet-hsm-aws/package.json | 8 +- .../wallet-hsm-aws/src/aws-hsm-signer.ts | 11 +- .../wallet-hsm-aws/src/aws-hsm-wallet.test.ts | 10 +- .../wallet-hsm-aws/src/aws-hsm-wallet.ts | 1 + .../sdk/wallets/wallet-hsm-azure/package.json | 8 +- .../sdk/wallets/wallet-hsm-gcp/package.json | 9 +- .../wallet-hsm-gcp/src/gcp-hsm-signer.ts | 7 + .../wallet-hsm-gcp/src/gcp-hsm-wallet.test.ts | 10 +- packages/sdk/wallets/wallet-hsm/package.json | 8 +- .../wallets/wallet-hsm/src/signature-utils.ts | 53 +- .../sdk/wallets/wallet-ledger/package.json | 6 +- .../wallet-ledger/src/ledger-signer.ts | 14 +- .../wallet-ledger/src/ledger-wallet.test.ts | 128 +- .../wallet-ledger/src/ledger-wallet.ts | 9 +- .../sdk/wallets/wallet-ledger/src/types.d.ts | 18 + .../sdk/wallets/wallet-local/package.json | 3 +- .../wallets/wallet-local/src/local-signer.ts | 19 +- .../sdk/wallets/wallet-remote/package.json | 3 +- .../sdk/wallets/wallet-rpc/src/rpc-signer.ts | 6 +- yarn.lock | 2367 ++++++++--------- 95 files changed, 2573 insertions(+), 2155 deletions(-) create mode 100644 .changeset/angry-coats-decide.md create mode 100644 .changeset/chilly-plums-tap.md create mode 100644 .changeset/cool-hairs-report.md create mode 100644 .changeset/eighty-adults-hunt.md create mode 100644 .changeset/hot-spoons-protect.md create mode 100644 .changeset/kind-eyes-confess.md create mode 100644 .changeset/lazy-beans-travel.md create mode 100644 .changeset/little-ears-search.md create mode 100644 .changeset/neat-countries-watch.md create mode 100644 .changeset/orange-bats-destroy.md create mode 100644 .changeset/pink-dragons-smile.md create mode 100644 .changeset/purple-bikes-confess.md create mode 100644 .changeset/rotten-brooms-whisper.md create mode 100644 .changeset/selfish-moles-occur.md create mode 100644 .changeset/sixty-crabs-call.md create mode 100644 packages/docs/sdk/docs/cryptographic-utils/modules/wordlists.md create mode 100644 packages/docs/sdk/docs/wallet-ledger/interfaces/types.ILedger.md create mode 100644 packages/docs/sdk/docs/wallet-ledger/modules/types.md create mode 100644 packages/sdk/cryptographic-utils/src/bls.test.ts create mode 100644 packages/sdk/cryptographic-utils/src/wordlists.ts create mode 100644 packages/sdk/wallets/wallet-ledger/src/types.d.ts diff --git a/.changeset/angry-coats-decide.md b/.changeset/angry-coats-decide.md new file mode 100644 index 000000000..082320991 --- /dev/null +++ b/.changeset/angry-coats-decide.md @@ -0,0 +1,5 @@ +--- +'@celo/cryptographic-utils': minor +--- + +CHANGE - Replaced all deprecated cryptographic depencies with the audited and maintained suite of crypto libraries `@noble/*` and `@scure/*` diff --git a/.changeset/chilly-plums-tap.md b/.changeset/chilly-plums-tap.md new file mode 100644 index 000000000..723122f6c --- /dev/null +++ b/.changeset/chilly-plums-tap.md @@ -0,0 +1,5 @@ +--- +'@celo/wallet-base': minor +--- + +CHANGE - Replaced all deprecated cryptographic depencies with the audited and maintained suite of crypto libraries `@noble/*` and `@scure/*` diff --git a/.changeset/cool-hairs-report.md b/.changeset/cool-hairs-report.md new file mode 100644 index 000000000..db33f4d0a --- /dev/null +++ b/.changeset/cool-hairs-report.md @@ -0,0 +1,6 @@ +--- +'@celo/utils': major +--- + +CHANGE - Replaced all deprecated cryptographic depencies with the audited and maintained suite of crypto libraries `@noble/*` and `@scure/*` +BREAKING - Some functions that used to return a `Buffer` now return a `UInt8Array` instead due to underlying changed diff --git a/.changeset/eighty-adults-hunt.md b/.changeset/eighty-adults-hunt.md new file mode 100644 index 000000000..6eb81b8f9 --- /dev/null +++ b/.changeset/eighty-adults-hunt.md @@ -0,0 +1,5 @@ +--- +'@celo/base': minor +--- + +CHANGE - Replaced all deprecated cryptographic depencies with the audited and maintained suite of crypto libraries `@noble/*` and `@scure/*` diff --git a/.changeset/hot-spoons-protect.md b/.changeset/hot-spoons-protect.md new file mode 100644 index 000000000..6bf9518c1 --- /dev/null +++ b/.changeset/hot-spoons-protect.md @@ -0,0 +1,5 @@ +--- +'@celo/wallet-hsm': patch +--- + +CHANGE - Update the code to match @celo/wallet-base changes diff --git a/.changeset/kind-eyes-confess.md b/.changeset/kind-eyes-confess.md new file mode 100644 index 000000000..d403bb014 --- /dev/null +++ b/.changeset/kind-eyes-confess.md @@ -0,0 +1,5 @@ +--- +'@celo/wallet-hsm-azure': patch +--- + +CHANGE - Update the code to match @celo/wallet-base changes diff --git a/.changeset/lazy-beans-travel.md b/.changeset/lazy-beans-travel.md new file mode 100644 index 000000000..51f9beefb --- /dev/null +++ b/.changeset/lazy-beans-travel.md @@ -0,0 +1,5 @@ +--- +'@celo/wallet-hsm-aws': patch +--- + +CHANGE - Update the code to match @celo/wallet-base changes diff --git a/.changeset/little-ears-search.md b/.changeset/little-ears-search.md new file mode 100644 index 000000000..2ea0e3350 --- /dev/null +++ b/.changeset/little-ears-search.md @@ -0,0 +1,5 @@ +--- +'@celo/wallet-rpc': patch +--- + +CHANGE - Update the code to match @celo/wallet-base changes diff --git a/.changeset/neat-countries-watch.md b/.changeset/neat-countries-watch.md new file mode 100644 index 000000000..a9d217154 --- /dev/null +++ b/.changeset/neat-countries-watch.md @@ -0,0 +1,5 @@ +--- +'@celo/wallet-hsm-gcp': patch +--- + +CHANGE - Update the code to match @celo/wallet-base changes diff --git a/.changeset/orange-bats-destroy.md b/.changeset/orange-bats-destroy.md new file mode 100644 index 000000000..e838c0b31 --- /dev/null +++ b/.changeset/orange-bats-destroy.md @@ -0,0 +1,5 @@ +--- +'@celo/wallet-ledger': patch +--- + +CHANGE - Update the code to match @celo/wallet-base changes diff --git a/.changeset/pink-dragons-smile.md b/.changeset/pink-dragons-smile.md new file mode 100644 index 000000000..9837a3c0d --- /dev/null +++ b/.changeset/pink-dragons-smile.md @@ -0,0 +1,5 @@ +--- +'@celo/wallet-remote': patch +--- + +CHANGE - Update the code to match @celo/wallet-base changes diff --git a/.changeset/purple-bikes-confess.md b/.changeset/purple-bikes-confess.md new file mode 100644 index 000000000..58f61fdd3 --- /dev/null +++ b/.changeset/purple-bikes-confess.md @@ -0,0 +1,5 @@ +--- +'@celo/wallet-local': patch +--- + +CHANGE - Update the code to match @celo/wallet-base changes diff --git a/.changeset/rotten-brooms-whisper.md b/.changeset/rotten-brooms-whisper.md new file mode 100644 index 000000000..929ff6c04 --- /dev/null +++ b/.changeset/rotten-brooms-whisper.md @@ -0,0 +1,5 @@ +--- +'@celo/governance': patch +--- + +CHANGE - Replaced all deprecated cryptographic depencies with the audited and maintained suite of crypto libraries `@noble/*` and `@scure/*` diff --git a/.changeset/selfish-moles-occur.md b/.changeset/selfish-moles-occur.md new file mode 100644 index 000000000..70df8670c --- /dev/null +++ b/.changeset/selfish-moles-occur.md @@ -0,0 +1,5 @@ +--- +'@celo/explorer': patch +--- + +CHANGE - Replaced all deprecated cryptographic depencies with the audited and maintained suite of crypto libraries `@noble/*` and `@scure/*` diff --git a/.changeset/sixty-crabs-call.md b/.changeset/sixty-crabs-call.md new file mode 100644 index 000000000..3b0fb2c8e --- /dev/null +++ b/.changeset/sixty-crabs-call.md @@ -0,0 +1,5 @@ +--- +'@celo/celocli': patch +--- + +CHANGE - Replaced all deprecated cryptographic depencies with the audited and maintained suite of crypto libraries `@noble/*` and `@scure/*` diff --git a/.eslintrc.js b/.eslintrc.js index 25669ec4a..1c09663e3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -18,10 +18,6 @@ module.exports = { }, extends: ['prettier'], parser: '@typescript-eslint/parser', - parserOptions: { - project: './eslint.tsconfig.json', - sourceType: 'module', - }, plugins: ['eslint-plugin-unicorn', 'eslint-plugin-import', '@typescript-eslint'], root: true, rules: { @@ -170,17 +166,6 @@ module.exports = { 'no-new-func': 'error', 'no-new-wrappers': 'error', 'no-redeclare': 'off', - 'no-restricted-imports': [ - 'error', - { - paths: [ - { - name: 'elliptic', - importNames: ['ec'], - }, - ], - }, - ], 'no-restricted-syntax': ['error', 'ForInStatement'], 'no-return-await': 'error', 'no-sequences': 'error', diff --git a/package.json b/package.json index 4921f74aa..3bea1b75f 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,8 @@ }, "resolutions": { "ganache": "npm:@celo/ganache@7.8.0-unofficial.0", - "bip39": "https://github.com/bitcoinjs/bip39#a7ecbfe2e60d0214ce17163d610cad9f7b23140c", + "web3": "1.10.4", + "web3-utils": "1.10.4", "blind-threshold-bls": "npm:@celo/blind-threshold-bls@1.0.0-beta", "@types/bn.js": "4.11.6", "bignumber.js": "9.0.0" diff --git a/packages/cli/bin/dev.js b/packages/cli/bin/dev.js index ad39b1eae..287325519 100644 --- a/packages/cli/bin/dev.js +++ b/packages/cli/bin/dev.js @@ -3,5 +3,5 @@ ;(async () => { const oclif = await import('@oclif/core') console.info('Running in development mode') - await oclif.execute({ development: true, dir: __dirname }) + await oclif.execute({ development: false, dir: __dirname }) })() diff --git a/packages/cli/package.json b/packages/cli/package.json index 4f29098b9..06cef13bd 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -58,7 +58,6 @@ "@oclif/plugin-warn-if-update-available": "^3.0.9", "@types/command-exists": "^1.2.3", "bignumber.js": "9.0.0", - "bip32": "3.1.0", "chalk": "^2.4.2", "command-exists": "^1.2.9", "cross-fetch": "3.1.5", diff --git a/packages/docs/sdk/docs/base/interfaces/account.Bip39.md b/packages/docs/sdk/docs/base/interfaces/account.Bip39.md index 04db09581..43b8c908c 100644 --- a/packages/docs/sdk/docs/base/interfaces/account.Bip39.md +++ b/packages/docs/sdk/docs/base/interfaces/account.Bip39.md @@ -43,11 +43,11 @@ ___ ### mnemonicToSeed -• **mnemonicToSeed**: (`mnemonic`: `string`, `password?`: `string`) => `Promise`\<`Buffer`\> +• **mnemonicToSeed**: (`mnemonic`: `string`, `password?`: `string`) => `Promise`\<`Uint8Array`\> #### Type declaration -▸ (`mnemonic`, `password?`): `Promise`\<`Buffer`\> +▸ (`mnemonic`, `password?`): `Promise`\<`Uint8Array`\> ##### Parameters @@ -58,7 +58,7 @@ ___ ##### Returns -`Promise`\<`Buffer`\> +`Promise`\<`Uint8Array`\> #### Defined in @@ -68,11 +68,11 @@ ___ ### mnemonicToSeedSync -• **mnemonicToSeedSync**: (`mnemonic`: `string`, `password?`: `string`) => `Buffer` +• **mnemonicToSeedSync**: (`mnemonic`: `string`, `password?`: `string`) => `Uint8Array` #### Type declaration -▸ (`mnemonic`, `password?`): `Buffer` +▸ (`mnemonic`, `password?`): `Uint8Array` ##### Parameters @@ -83,7 +83,7 @@ ___ ##### Returns -`Buffer` +`Uint8Array` #### Defined in diff --git a/packages/docs/sdk/docs/cryptographic-utils/interfaces/account.Bip39.md b/packages/docs/sdk/docs/cryptographic-utils/interfaces/account.Bip39.md index 3e9e4faa0..690daf184 100644 --- a/packages/docs/sdk/docs/cryptographic-utils/interfaces/account.Bip39.md +++ b/packages/docs/sdk/docs/cryptographic-utils/interfaces/account.Bip39.md @@ -43,11 +43,11 @@ ___ ### mnemonicToSeed -• **mnemonicToSeed**: (`mnemonic`: `string`, `password?`: `string`) => `Promise`\<`Buffer`\> +• **mnemonicToSeed**: (`mnemonic`: `string`, `password?`: `string`) => `Promise`\<`Uint8Array`\> #### Type declaration -▸ (`mnemonic`, `password?`): `Promise`\<`Buffer`\> +▸ (`mnemonic`, `password?`): `Promise`\<`Uint8Array`\> ##### Parameters @@ -58,7 +58,7 @@ ___ ##### Returns -`Promise`\<`Buffer`\> +`Promise`\<`Uint8Array`\> #### Defined in @@ -68,11 +68,11 @@ ___ ### mnemonicToSeedSync -• **mnemonicToSeedSync**: (`mnemonic`: `string`, `password?`: `string`) => `Buffer` +• **mnemonicToSeedSync**: (`mnemonic`: `string`, `password?`: `string`) => `Uint8Array` #### Type declaration -▸ (`mnemonic`, `password?`): `Buffer` +▸ (`mnemonic`, `password?`): `Uint8Array` ##### Parameters @@ -83,7 +83,7 @@ ___ ##### Returns -`Buffer` +`Uint8Array` #### Defined in diff --git a/packages/docs/sdk/docs/cryptographic-utils/interfaces/commentEncryption.EncryptionStatus.md b/packages/docs/sdk/docs/cryptographic-utils/interfaces/commentEncryption.EncryptionStatus.md index 53fa2fdf5..2d9742098 100644 --- a/packages/docs/sdk/docs/cryptographic-utils/interfaces/commentEncryption.EncryptionStatus.md +++ b/packages/docs/sdk/docs/cryptographic-utils/interfaces/commentEncryption.EncryptionStatus.md @@ -19,7 +19,7 @@ #### Defined in -[cryptographic-utils/src/commentEncryption.ts:16](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L16) +[cryptographic-utils/src/commentEncryption.ts:17](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L17) ___ @@ -29,4 +29,4 @@ ___ #### Defined in -[cryptographic-utils/src/commentEncryption.ts:15](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L15) +[cryptographic-utils/src/commentEncryption.ts:16](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L16) diff --git a/packages/docs/sdk/docs/cryptographic-utils/modules.md b/packages/docs/sdk/docs/cryptographic-utils/modules.md index 2dd2163c1..a65227d5b 100644 --- a/packages/docs/sdk/docs/cryptographic-utils/modules.md +++ b/packages/docs/sdk/docs/cryptographic-utils/modules.md @@ -12,3 +12,4 @@ - [dataEncryptionKey](modules/dataEncryptionKey.md) - [index](modules/index.md) - [types](modules/types.md) +- [wordlists](modules/wordlists.md) diff --git a/packages/docs/sdk/docs/cryptographic-utils/modules/account.md b/packages/docs/sdk/docs/cryptographic-utils/modules/account.md index 1ffc4e1b2..5932c0726 100644 --- a/packages/docs/sdk/docs/cryptographic-utils/modules/account.md +++ b/packages/docs/sdk/docs/cryptographic-utils/modules/account.md @@ -32,6 +32,7 @@ - [generateMnemonic](account.md#generatemnemonic) - [generateSeed](account.md#generateseed) - [getAllLanguages](account.md#getalllanguages) +- [getWordList](account.md#getwordlist) - [invalidMnemonicWords](account.md#invalidmnemonicwords) - [mnemonicLengthFromStrength](account.md#mnemoniclengthfromstrength) - [normalizeMnemonic](account.md#normalizemnemonic) @@ -85,7 +86,7 @@ base/lib/account.d.ts:18 #### Defined in -[cryptographic-utils/src/account.ts:465](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L465) +[cryptographic-utils/src/account.ts:455](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L455) ___ @@ -125,7 +126,7 @@ malformed. It may occasionally occur that a typo results in word from another la #### Defined in -[cryptographic-utils/src/account.ts:233](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L233) +[cryptographic-utils/src/account.ts:220](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L220) ___ @@ -149,7 +150,7 @@ now an alias for normalizeMnemonic. #### Defined in -[cryptographic-utils/src/account.ts:159](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L159) +[cryptographic-utils/src/account.ts:166](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L166) ___ @@ -178,7 +179,7 @@ ___ #### Defined in -[cryptographic-utils/src/account.ts:416](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L416) +[cryptographic-utils/src/account.ts:403](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L403) ___ @@ -203,7 +204,7 @@ ___ #### Defined in -[cryptographic-utils/src/account.ts:403](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L403) +[cryptographic-utils/src/account.ts:390](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L390) ___ @@ -232,7 +233,7 @@ ___ #### Defined in -[cryptographic-utils/src/account.ts:444](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L444) +[cryptographic-utils/src/account.ts:431](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L431) ___ @@ -254,7 +255,7 @@ ___ #### Defined in -[cryptographic-utils/src/account.ts:54](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L54) +[cryptographic-utils/src/account.ts:61](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L61) ___ @@ -277,7 +278,7 @@ ___ #### Defined in -[cryptographic-utils/src/account.ts:429](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L429) +[cryptographic-utils/src/account.ts:416](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L416) ___ @@ -291,7 +292,27 @@ ___ #### Defined in -[cryptographic-utils/src/account.ts:188](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L188) +[cryptographic-utils/src/account.ts:175](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L175) + +___ + +### getWordList + +▸ **getWordList**(`language?`): `string`[] + +#### Parameters + +| Name | Type | Default value | +| :------ | :------ | :------ | +| `language` | [`MnemonicLanguages`](../enums/account.MnemonicLanguages.md) | `MnemonicLanguages.english` | + +#### Returns + +`string`[] + +#### Defined in + +[cryptographic-utils/src/account.ts:171](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L171) ___ @@ -320,7 +341,7 @@ invalid, or half of the valid words are from one language and the other half fro #### Defined in -[cryptographic-utils/src/account.ts:88](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L88) +[cryptographic-utils/src/account.ts:95](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L95) ___ @@ -340,7 +361,7 @@ ___ #### Defined in -[cryptographic-utils/src/account.ts:202](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L202) +[cryptographic-utils/src/account.ts:189](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L189) ___ @@ -369,7 +390,7 @@ that all the words in the phrase are contained in a valid wordlist. #### Defined in -[cryptographic-utils/src/account.ts:109](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L109) +[cryptographic-utils/src/account.ts:116](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L116) ___ @@ -410,7 +431,7 @@ It is recommended to normalize the mnemonic phrase before inputting to this func #### Defined in -[cryptographic-utils/src/account.ts:288](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L288) +[cryptographic-utils/src/account.ts:275](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L275) ___ @@ -432,4 +453,4 @@ ___ #### Defined in -[cryptographic-utils/src/account.ts:62](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L62) +[cryptographic-utils/src/account.ts:69](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/account.ts#L69) diff --git a/packages/docs/sdk/docs/cryptographic-utils/modules/bls.md b/packages/docs/sdk/docs/cryptographic-utils/modules/bls.md index fa57df6ce..964ec5fe9 100644 --- a/packages/docs/sdk/docs/cryptographic-utils/modules/bls.md +++ b/packages/docs/sdk/docs/cryptographic-utils/modules/bls.md @@ -23,7 +23,7 @@ #### Defined in -[cryptographic-utils/src/bls.ts:12](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L12) +[cryptographic-utils/src/bls.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L11) ___ @@ -33,13 +33,13 @@ ___ #### Defined in -[cryptographic-utils/src/bls.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L11) +[cryptographic-utils/src/bls.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L10) ## Functions ### blsPrivateKeyToProcessedPrivateKey -▸ **blsPrivateKeyToProcessedPrivateKey**(`privateKeyHex`): `any` +▸ **blsPrivateKeyToProcessedPrivateKey**(`privateKeyHex`): `Buffer` #### Parameters @@ -49,11 +49,11 @@ ___ #### Returns -`any` +`Buffer` #### Defined in -[cryptographic-utils/src/bls.ts:14](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L14) +[cryptographic-utils/src/bls.ts:13](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L13) ___ @@ -74,7 +74,7 @@ ___ #### Defined in -[cryptographic-utils/src/bls.ts:53](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L53) +[cryptographic-utils/src/bls.ts:51](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L51) ___ @@ -94,4 +94,4 @@ ___ #### Defined in -[cryptographic-utils/src/bls.ts:48](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L48) +[cryptographic-utils/src/bls.ts:46](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/bls.ts#L46) diff --git a/packages/docs/sdk/docs/cryptographic-utils/modules/commentEncryption.md b/packages/docs/sdk/docs/cryptographic-utils/modules/commentEncryption.md index 96f41052c..b38c10d2c 100644 --- a/packages/docs/sdk/docs/cryptographic-utils/modules/commentEncryption.md +++ b/packages/docs/sdk/docs/cryptographic-utils/modules/commentEncryption.md @@ -34,7 +34,7 @@ #### Defined in -[cryptographic-utils/src/commentEncryption.ts:115](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L115) +[cryptographic-utils/src/commentEncryption.ts:119](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L119) ## Functions @@ -61,7 +61,7 @@ Decrypted comment if can decrypt, otherwise comment. #### Defined in -[cryptographic-utils/src/commentEncryption.ts:104](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L104) +[cryptographic-utils/src/commentEncryption.ts:108](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L108) ___ @@ -87,7 +87,7 @@ Decrypted data. #### Defined in -[cryptographic-utils/src/commentEncryption.ts:45](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L45) +[cryptographic-utils/src/commentEncryption.ts:46](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L46) ___ @@ -115,7 +115,7 @@ base64 string of encrypted comment if can encrypt, otherwise comment. #### Defined in -[cryptographic-utils/src/commentEncryption.ts:69](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L69) +[cryptographic-utils/src/commentEncryption.ts:73](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L73) ___ @@ -141,4 +141,4 @@ Encrypted data to sender and recipient. #### Defined in -[cryptographic-utils/src/commentEncryption.ts:27](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L27) +[cryptographic-utils/src/commentEncryption.ts:28](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/commentEncryption.ts#L28) diff --git a/packages/docs/sdk/docs/cryptographic-utils/modules/dataEncryptionKey.md b/packages/docs/sdk/docs/cryptographic-utils/modules/dataEncryptionKey.md index e50421ae5..12a659b5f 100644 --- a/packages/docs/sdk/docs/cryptographic-utils/modules/dataEncryptionKey.md +++ b/packages/docs/sdk/docs/cryptographic-utils/modules/dataEncryptionKey.md @@ -30,7 +30,7 @@ #### Defined in -[cryptographic-utils/src/dataEncryptionKey.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts#L56) +[cryptographic-utils/src/dataEncryptionKey.ts:47](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts#L47) ## Functions @@ -50,11 +50,11 @@ Turns a private key to a compressed public key (hex string with hex leader). `string` -Corresponding compessed public key in hex encoding with '0x' leader. +Corresponding compressed public key in hex encoding with '0x' leader. #### Defined in -[cryptographic-utils/src/dataEncryptionKey.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts#L10) +[cryptographic-utils/src/dataEncryptionKey.ts:12](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts#L12) ___ @@ -79,7 +79,7 @@ Decompresssed public key without prefix. #### Defined in -[cryptographic-utils/src/dataEncryptionKey.ts:27](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts#L27) +[cryptographic-utils/src/dataEncryptionKey.ts:23](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts#L23) ___ @@ -104,4 +104,4 @@ Comment Encryption Private key. #### Defined in -[cryptographic-utils/src/dataEncryptionKey.ts:42](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts#L42) +[cryptographic-utils/src/dataEncryptionKey.ts:33](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts#L33) diff --git a/packages/docs/sdk/docs/cryptographic-utils/modules/index.md b/packages/docs/sdk/docs/cryptographic-utils/modules/index.md index a76fda8e3..a0b8a720d 100644 --- a/packages/docs/sdk/docs/cryptographic-utils/modules/index.md +++ b/packages/docs/sdk/docs/cryptographic-utils/modules/index.md @@ -35,6 +35,7 @@ - [getAllLanguages](index.md#getalllanguages) - [getBlsPoP](index.md#getblspop) - [getBlsPublicKey](index.md#getblspublickey) +- [getWordList](index.md#getwordlist) - [invalidMnemonicWords](index.md#invalidmnemonicwords) - [mnemonicLengthFromStrength](index.md#mnemoniclengthfromstrength) - [normalizeMnemonic](index.md#normalizemnemonic) @@ -217,6 +218,12 @@ Re-exports [getBlsPublicKey](bls.md#getblspublickey) ___ +### getWordList + +Re-exports [getWordList](account.md#getwordlist) + +___ + ### invalidMnemonicWords Re-exports [invalidMnemonicWords](account.md#invalidmnemonicwords) diff --git a/packages/docs/sdk/docs/cryptographic-utils/modules/wordlists.md b/packages/docs/sdk/docs/cryptographic-utils/modules/wordlists.md new file mode 100644 index 000000000..31bf54b02 --- /dev/null +++ b/packages/docs/sdk/docs/cryptographic-utils/modules/wordlists.md @@ -0,0 +1,19 @@ +[@celo/cryptographic-utils](../README.md) / [Exports](../modules.md) / wordlists + +# Module: wordlists + +## Table of contents + +### Variables + +- [default](wordlists.md#default) + +## Variables + +### default + +• `Const` **default**: `Record`\<[`MnemonicLanguages`](../enums/account.MnemonicLanguages.md), `string`[]\> + +#### Defined in + +[cryptographic-utils/src/wordlists.ts:13](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/cryptographic-utils/src/wordlists.ts#L13) diff --git a/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712Parameter.md b/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712Parameter.md index 56f0d7fef..0d038e838 100644 --- a/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712Parameter.md +++ b/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712Parameter.md @@ -19,7 +19,7 @@ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L10) +[packages/sdk/utils/src/sign-typed-data-utils.ts:9](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L9) ___ @@ -29,4 +29,4 @@ ___ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L11) +[packages/sdk/utils/src/sign-typed-data-utils.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L10) diff --git a/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712TypedData.md b/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712TypedData.md index 93b565fd3..c76cad3ab 100644 --- a/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712TypedData.md +++ b/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712TypedData.md @@ -21,7 +21,7 @@ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:38](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L38) +[packages/sdk/utils/src/sign-typed-data-utils.ts:37](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L37) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:39](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L39) +[packages/sdk/utils/src/sign-typed-data-utils.ts:38](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L38) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:40](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L40) +[packages/sdk/utils/src/sign-typed-data-utils.ts:39](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L39) ___ @@ -51,4 +51,4 @@ ___ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:37](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L37) +[packages/sdk/utils/src/sign-typed-data-utils.ts:36](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L36) diff --git a/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712TypesWithPrimary.md b/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712TypesWithPrimary.md index b0d00d733..d01d88fa3 100644 --- a/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712TypesWithPrimary.md +++ b/packages/docs/sdk/docs/utils/interfaces/sign_typed_data_utils.EIP712TypesWithPrimary.md @@ -19,7 +19,7 @@ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:20](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L20) +[packages/sdk/utils/src/sign-typed-data-utils.ts:19](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L19) ___ @@ -29,4 +29,4 @@ ___ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:19](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L19) +[packages/sdk/utils/src/sign-typed-data-utils.ts:18](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L18) diff --git a/packages/docs/sdk/docs/utils/modules/ecdh.md b/packages/docs/sdk/docs/utils/modules/ecdh.md index c932e9af1..66adeb1fc 100644 --- a/packages/docs/sdk/docs/utils/modules/ecdh.md +++ b/packages/docs/sdk/docs/utils/modules/ecdh.md @@ -51,13 +51,13 @@ ___ #### Defined in -[packages/sdk/utils/src/ecdh.ts:18](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecdh.ts#L18) +[packages/sdk/utils/src/ecdh.ts:21](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecdh.ts#L21) ___ ### ensureUncompressed -▸ **ensureUncompressed**(`publicKey`): `any` +▸ **ensureUncompressed**(`publicKey`): `Uint8Array` #### Parameters @@ -67,7 +67,7 @@ ___ #### Returns -`any` +`Uint8Array` #### Defined in @@ -91,7 +91,7 @@ ___ #### Defined in -[packages/sdk/utils/src/ecdh.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecdh.ts#L10) +[packages/sdk/utils/src/ecdh.ts:13](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecdh.ts#L13) ___ @@ -111,4 +111,4 @@ ___ #### Defined in -[packages/sdk/utils/src/ecdh.ts:40](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecdh.ts#L40) +[packages/sdk/utils/src/ecdh.ts:32](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecdh.ts#L32) diff --git a/packages/docs/sdk/docs/utils/modules/ecies.md b/packages/docs/sdk/docs/utils/modules/ecies.md index e42535cde..60d4b0a17 100644 --- a/packages/docs/sdk/docs/utils/modules/ecies.md +++ b/packages/docs/sdk/docs/utils/modules/ecies.md @@ -15,6 +15,7 @@ - [AES128DecryptAndHMAC](ecies.md#aes128decryptandhmac) - [AES128Encrypt](ecies.md#aes128encrypt) - [AES128EncryptAndHMAC](ecies.md#aes128encryptandhmac) +- [ConcatKDF](ecies.md#concatkdf) - [Decrypt](ecies.md#decrypt) - [Encrypt](ecies.md#encrypt) @@ -28,14 +29,14 @@ | Name | Type | | :------ | :------ | -| `AES128DecryptAndHMAC` | (`encryptionKey`: `Buffer`, `macKey`: `Buffer`, `ciphertext`: `Buffer`) => `Buffer` | -| `AES128EncryptAndHMAC` | (`encryptionKey`: `Buffer`, `macKey`: `Buffer`, `plaintext`: `Buffer`) => `Buffer` | -| `Decrypt` | (`privKey`: `Buffer`, `encrypted`: `Buffer`) => `Buffer` | -| `Encrypt` | (`pubKeyTo`: `Buffer`, `plaintext`: `Buffer`) => `Buffer` | +| `AES128DecryptAndHMAC` | (`encryptionKey`: `Uint8Array`, `macKey`: `Uint8Array`, `ciphertext`: `Uint8Array`) => `Uint8Array` | +| `AES128EncryptAndHMAC` | (`encryptionKey`: `Uint8Array`, `macKey`: `Uint8Array`, `plaintext`: `Uint8Array`) => `Uint8Array` | +| `Decrypt` | (`privKey`: `PrivKey`, `encrypted`: `Buffer`) => `Uint8Array` | +| `Encrypt` | (`pubKeyTo`: `PubKey`, `plaintext`: `Uint8Array`) => `Buffer` | #### Defined in -[packages/sdk/utils/src/ecies.ts:184](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L184) +[packages/sdk/utils/src/ecies.ts:199](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L199) ___ @@ -45,13 +46,13 @@ ___ #### Defined in -[packages/sdk/utils/src/ecies.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L11) +[packages/sdk/utils/src/ecies.ts:18](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L18) ## Functions ### AES128Decrypt -▸ **AES128Decrypt**(`encryptionKey`, `iv`, `ciphertext`): `Buffer` +▸ **AES128Decrypt**(`encryptionKey`, `iv`, `ciphertext`): `Uint8Array` AES-128 CTR decrypt @@ -59,25 +60,25 @@ AES-128 CTR decrypt | Name | Type | | :------ | :------ | -| `encryptionKey` | `Buffer` | -| `iv` | `Buffer` | -| `ciphertext` | `Buffer` | +| `encryptionKey` | `Uint8Array` | +| `iv` | `Uint8Array` | +| `ciphertext` | `Uint8Array` | #### Returns -`Buffer` +`Uint8Array` plaintext #### Defined in -[packages/sdk/utils/src/ecies.ts:96](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L96) +[packages/sdk/utils/src/ecies.ts:106](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L106) ___ ### AES128DecryptAndHMAC -▸ **AES128DecryptAndHMAC**(`encryptionKey`, `macKey`, `ciphertext`): `Buffer` +▸ **AES128DecryptAndHMAC**(`encryptionKey`, `macKey`, `ciphertext`): `Uint8Array` AES-128 CTR decrypt with message authentication @@ -85,25 +86,25 @@ AES-128 CTR decrypt with message authentication | Name | Type | | :------ | :------ | -| `encryptionKey` | `Buffer` | -| `macKey` | `Buffer` | -| `ciphertext` | `Buffer` | +| `encryptionKey` | `Uint8Array` | +| `macKey` | `Uint8Array` | +| `ciphertext` | `Uint8Array` | #### Returns -`Buffer` +`Uint8Array` plaintext #### Defined in -[packages/sdk/utils/src/ecies.ts:111](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L111) +[packages/sdk/utils/src/ecies.ts:122](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L122) ___ ### AES128Encrypt -▸ **AES128Encrypt**(`encryptionKey`, `iv`, `plaintext`): `Buffer` +▸ **AES128Encrypt**(`encryptionKey`, `iv`, `plaintext`): `Uint8Array` AES-128 CTR encrypt @@ -111,25 +112,25 @@ AES-128 CTR encrypt | Name | Type | | :------ | :------ | -| `encryptionKey` | `Buffer` | -| `iv` | `Buffer` | -| `plaintext` | `Buffer` | +| `encryptionKey` | `Uint8Array` | +| `iv` | `Uint8Array` | +| `plaintext` | `Uint8Array` | #### Returns -`Buffer` +`Uint8Array` ciphertext #### Defined in -[packages/sdk/utils/src/ecies.ts:63](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L63) +[packages/sdk/utils/src/ecies.ts:70](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L70) ___ ### AES128EncryptAndHMAC -▸ **AES128EncryptAndHMAC**(`encryptionKey`, `macKey`, `plaintext`): `Buffer` +▸ **AES128EncryptAndHMAC**(`encryptionKey`, `macKey`, `plaintext`): `Uint8Array` AES-128 CTR encrypt with message authentication @@ -137,25 +138,55 @@ AES-128 CTR encrypt with message authentication | Name | Type | | :------ | :------ | -| `encryptionKey` | `Buffer` | -| `macKey` | `Buffer` | -| `plaintext` | `Buffer` | +| `encryptionKey` | `Uint8Array` | +| `macKey` | `Uint8Array` | +| `plaintext` | `Uint8Array` | #### Returns -`Buffer` +`Uint8Array` ciphertext #### Defined in -[packages/sdk/utils/src/ecies.ts:77](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L77) +[packages/sdk/utils/src/ecies.ts:88](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L88) + +___ + +### ConcatKDF + +▸ **ConcatKDF**(`px`, `kdLen`): `Buffer` + +NIST 8000-56C Rev 1 One Step KDF with the following parameters: +- H(x) is SHA-256(x) +- Fixed info is null + +TODO: +- Implement proper ceiling on reps. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `px` | `Buffer` | Input keying material to derive key from. | +| `kdLen` | `number` | Length of output in bytes | + +#### Returns + +`Buffer` + +Output keying material of length kdLen bytes. + +#### Defined in + +[packages/sdk/utils/src/ecies.ts:48](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L48) ___ ### Decrypt -▸ **Decrypt**(`privKey`, `encrypted`): `Buffer` +▸ **Decrypt**(`privKey`, `encrypted`): `Uint8Array` ECIES decrypt @@ -163,18 +194,18 @@ ECIES decrypt | Name | Type | Description | | :------ | :------ | :------ | -| `privKey` | `Buffer` | Ethereum private key, 32 bytes. | +| `privKey` | `PrivKey` | Ethereum private key, 32 bytes. | | `encrypted` | `Buffer` | Encrypted message, serialized, 113+ bytes | #### Returns -`Buffer` +`Uint8Array` plaintext #### Defined in -[packages/sdk/utils/src/ecies.ts:163](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L163) +[packages/sdk/utils/src/ecies.ts:179](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L179) ___ @@ -188,8 +219,8 @@ ECIES encrypt | Name | Type | Description | | :------ | :------ | :------ | -| `pubKeyTo` | `Buffer` | Ethereum pub key, 64 bytes. | -| `plaintext` | `Buffer` | Plaintext to be encrypted. | +| `pubKeyTo` | `PubKey` | Ethereum pub key, 64 bytes. | +| `plaintext` | `Uint8Array` | Plaintext to be encrypted. | #### Returns @@ -199,4 +230,4 @@ Encrypted message, serialized, 113+ bytes #### Defined in -[packages/sdk/utils/src/ecies.ts:134](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L134) +[packages/sdk/utils/src/ecies.ts:145](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/ecies.ts#L145) diff --git a/packages/docs/sdk/docs/utils/modules/istanbul.md b/packages/docs/sdk/docs/utils/modules/istanbul.md index 77679fa64..079576ff8 100644 --- a/packages/docs/sdk/docs/utils/modules/istanbul.md +++ b/packages/docs/sdk/docs/utils/modules/istanbul.md @@ -47,7 +47,7 @@ #### Defined in -[packages/sdk/utils/src/istanbul.ts:66](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/istanbul.ts#L66) +[packages/sdk/utils/src/istanbul.ts:71](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/istanbul.ts#L71) ## Functions @@ -68,7 +68,7 @@ #### Defined in -[packages/sdk/utils/src/istanbul.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/istanbul.ts#L56) +[packages/sdk/utils/src/istanbul.ts:61](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/istanbul.ts#L61) ___ diff --git a/packages/docs/sdk/docs/utils/modules/sign_typed_data_utils.md b/packages/docs/sdk/docs/utils/modules/sign_typed_data_utils.md index 355f15173..295436f8d 100644 --- a/packages/docs/sdk/docs/utils/modules/sign_typed_data_utils.md +++ b/packages/docs/sdk/docs/utils/modules/sign_typed_data_utils.md @@ -46,7 +46,7 @@ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:23](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L23) +[packages/sdk/utils/src/sign-typed-data-utils.ts:22](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L22) ___ @@ -76,7 +76,7 @@ EIP712Optonal is not part of the EIP712 standard, but is fully compatible with i #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:81](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L81) +[packages/sdk/utils/src/sign-typed-data-utils.ts:80](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L80) ## Variables @@ -88,7 +88,7 @@ Array of all EIP-712 atomic type names. #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:44](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L44) +[packages/sdk/utils/src/sign-typed-data-utils.ts:43](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L43) ___ @@ -98,7 +98,7 @@ ___ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:64](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L64) +[packages/sdk/utils/src/sign-typed-data-utils.ts:63](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L63) ___ @@ -108,7 +108,7 @@ ___ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:62](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L62) +[packages/sdk/utils/src/sign-typed-data-utils.ts:61](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L61) ___ @@ -120,7 +120,7 @@ Undefined EIP712Optional type with value type boolean. #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:115](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L115) +[packages/sdk/utils/src/sign-typed-data-utils.ts:114](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L114) ___ @@ -132,7 +132,7 @@ Undefined EIP712Optional type with value type number. #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:121](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L121) +[packages/sdk/utils/src/sign-typed-data-utils.ts:120](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L120) ___ @@ -144,7 +144,7 @@ Undefined EIP712Optional type with value type string. #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:127](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L127) +[packages/sdk/utils/src/sign-typed-data-utils.ts:126](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L126) ## Functions @@ -172,7 +172,7 @@ Utility to construct an defined EIP712Optional value with inferred type. #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:109](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L109) +[packages/sdk/utils/src/sign-typed-data-utils.ts:108](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L108) ___ @@ -200,7 +200,7 @@ Utility to build EIP712Optional schemas for encoding and decoding with io-ts. #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:102](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L102) +[packages/sdk/utils/src/sign-typed-data-utils.ts:101](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L101) ___ @@ -222,7 +222,7 @@ Utility to build EIP712Optional types to insert in EIP-712 type arrays. #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:91](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L91) +[packages/sdk/utils/src/sign-typed-data-utils.ts:90](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L90) ___ @@ -246,7 +246,7 @@ Constructs the struct encoding of the data as the primary type. #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:248](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L248) +[packages/sdk/utils/src/sign-typed-data-utils.ts:251](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L251) ___ @@ -270,7 +270,7 @@ E.g. "Transaction(Person from,Person to,Asset tx)Asset(address token,uint256 amo #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:183](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L183) +[packages/sdk/utils/src/sign-typed-data-utils.ts:184](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L184) ___ @@ -294,7 +294,7 @@ A Buffer containing the hash of the typed data. #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:137](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L137) +[packages/sdk/utils/src/sign-typed-data-utils.ts:136](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L136) ___ @@ -316,7 +316,7 @@ ___ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:257](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L257) +[packages/sdk/utils/src/sign-typed-data-utils.ts:260](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L260) ___ @@ -337,7 +337,7 @@ ___ #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:194](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L194) +[packages/sdk/utils/src/sign-typed-data-utils.ts:195](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L195) ___ @@ -368,4 +368,4 @@ Note that EIP-712 does not specify zero values, and so this is non-standard. #### Defined in -[packages/sdk/utils/src/sign-typed-data-utils.ts:273](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L273) +[packages/sdk/utils/src/sign-typed-data-utils.ts:276](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L276) diff --git a/packages/docs/sdk/docs/wallet-base/modules/index.md b/packages/docs/sdk/docs/wallet-base/modules/index.md index 7227e45a8..5a5a4a2c5 100644 --- a/packages/docs/sdk/docs/wallet-base/modules/index.md +++ b/packages/docs/sdk/docs/wallet-base/modules/index.md @@ -15,11 +15,16 @@ - [extractSignature](index.md#extractsignature) - [getHashFromEncoded](index.md#gethashfromencoded) - [getSignerFromTxEIP2718TX](index.md#getsignerfromtxeip2718tx) +- [handleBigInt](index.md#handlebigint) +- [handleData](index.md#handledata) +- [handleHexString](index.md#handlehexstring) +- [handleNumber](index.md#handlenumber) - [isPriceToLow](index.md#ispricetolow) - [publicKeyPrefix](index.md#publickeyprefix) - [recoverMessageSigner](index.md#recovermessagesigner) - [recoverTransaction](index.md#recovertransaction) - [rlpEncodedTx](index.md#rlpencodedtx) +- [signTransaction](index.md#signtransaction) - [sixtyFour](index.md#sixtyfour) - [stringNumberOrBNToHex](index.md#stringnumberorbntohex) - [thirtyTwo](index.md#thirtytwo) @@ -82,6 +87,30 @@ Re-exports [getSignerFromTxEIP2718TX](signing_utils.md#getsignerfromtxeip2718tx) ___ +### handleBigInt + +Re-exports [handleBigInt](signing_utils.md#handlebigint) + +___ + +### handleData + +Re-exports [handleData](signing_utils.md#handledata) + +___ + +### handleHexString + +Re-exports [handleHexString](signing_utils.md#handlehexstring) + +___ + +### handleNumber + +Re-exports [handleNumber](signing_utils.md#handlenumber) + +___ + ### isPriceToLow Re-exports [isPriceToLow](signing_utils.md#ispricetolow) @@ -112,6 +141,12 @@ Re-exports [rlpEncodedTx](signing_utils.md#rlpencodedtx) ___ +### signTransaction + +Re-exports [signTransaction](signing_utils.md#signtransaction) + +___ + ### sixtyFour Re-exports [sixtyFour](signing_utils.md#sixtyfour) diff --git a/packages/docs/sdk/docs/wallet-base/modules/signing_utils.md b/packages/docs/sdk/docs/wallet-base/modules/signing_utils.md index d1d08af50..ebf09d040 100644 --- a/packages/docs/sdk/docs/wallet-base/modules/signing_utils.md +++ b/packages/docs/sdk/docs/wallet-base/modules/signing_utils.md @@ -18,10 +18,15 @@ - [extractSignature](signing_utils.md#extractsignature) - [getHashFromEncoded](signing_utils.md#gethashfromencoded) - [getSignerFromTxEIP2718TX](signing_utils.md#getsignerfromtxeip2718tx) +- [handleBigInt](signing_utils.md#handlebigint) +- [handleData](signing_utils.md#handledata) +- [handleHexString](signing_utils.md#handlehexstring) +- [handleNumber](signing_utils.md#handlenumber) - [isPriceToLow](signing_utils.md#ispricetolow) - [recoverMessageSigner](signing_utils.md#recovermessagesigner) - [recoverTransaction](signing_utils.md#recovertransaction) - [rlpEncodedTx](signing_utils.md#rlpencodedtx) +- [signTransaction](signing_utils.md#signtransaction) - [stringNumberOrBNToHex](signing_utils.md#stringnumberorbntohex) - [verifyEIP712TypedDataSigner](signing_utils.md#verifyeip712typeddatasigner) - [verifySignatureWithoutPrefix](signing_utils.md#verifysignaturewithoutprefix) @@ -34,7 +39,7 @@ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:44](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L44) +[wallets/wallet-base/src/signing-utils.ts:40](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L40) ___ @@ -44,7 +49,7 @@ ___ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:45](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L45) +[wallets/wallet-base/src/signing-utils.ts:41](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L41) ___ @@ -54,7 +59,7 @@ ___ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:46](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L46) +[wallets/wallet-base/src/signing-utils.ts:42](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L42) ## Functions @@ -80,13 +85,14 @@ ___ ### decodeSig -▸ **decodeSig**(`sig`): `Object` +▸ **decodeSig**(`sig`, `addToV?`): `Object` #### Parameters -| Name | Type | -| :------ | :------ | -| `sig` | `any` | +| Name | Type | Default value | +| :------ | :------ | :------ | +| `sig` | \`0x$\{string}\` \| `RecoveredSignatureType` | `undefined` | +| `addToV` | `number` | `0` | #### Returns @@ -100,7 +106,7 @@ ___ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:774](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L774) +[wallets/wallet-base/src/signing-utils.ts:796](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L796) ___ @@ -124,7 +130,7 @@ ___ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:348](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L348) +[wallets/wallet-base/src/signing-utils.ts:350](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L350) ___ @@ -144,19 +150,19 @@ ___ | Name | Type | | :------ | :------ | -| `r` | `string` | -| `s` | `string` | -| `v` | `undefined` \| `string` | +| `r` | \`0x$\{string}\` | +| `s` | \`0x$\{string}\` | +| `v` | \`0x$\{string}\` | #### Defined in -[wallets/wallet-base/src/signing-utils.ts:445](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L445) +[wallets/wallet-base/src/signing-utils.ts:444](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L444) ___ ### getHashFromEncoded -▸ **getHashFromEncoded**(`rlpEncode`): `string` +▸ **getHashFromEncoded**(`rlpEncode`): `StrongAddress` #### Parameters @@ -166,7 +172,7 @@ ___ #### Returns -`string` +`StrongAddress` #### Defined in @@ -190,7 +196,87 @@ ___ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:518](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L518) +[wallets/wallet-base/src/signing-utils.ts:514](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L514) + +___ + +### handleBigInt + +▸ **handleBigInt**(`n`): `bigint` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `n` | `Uint8Array` | + +#### Returns + +`bigint` + +#### Defined in + +[wallets/wallet-base/src/signing-utils.ts:821](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L821) + +___ + +### handleData + +▸ **handleData**(`data`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `Uint8Array` | + +#### Returns + +`string` + +#### Defined in + +[wallets/wallet-base/src/signing-utils.ts:835](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L835) + +___ + +### handleHexString + +▸ **handleHexString**(`adr`): `StrongAddress` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `adr` | `Uint8Array` | + +#### Returns + +`StrongAddress` + +#### Defined in + +[wallets/wallet-base/src/signing-utils.ts:827](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L827) + +___ + +### handleNumber + +▸ **handleNumber**(`n`): `number` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `n` | `Uint8Array` | + +#### Returns + +`number` + +#### Defined in + +[wallets/wallet-base/src/signing-utils.ts:815](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L815) ___ @@ -210,7 +296,7 @@ ___ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:290](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L290) +[wallets/wallet-base/src/signing-utils.ts:292](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L292) ___ @@ -231,7 +317,7 @@ ___ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:742](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L742) +[wallets/wallet-base/src/signing-utils.ts:764](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L764) ___ @@ -251,7 +337,7 @@ ___ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:479](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L479) +[wallets/wallet-base/src/signing-utils.ts:475](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L475) ___ @@ -271,13 +357,41 @@ ___ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:113](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L113) +[wallets/wallet-base/src/signing-utils.ts:115](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L115) + +___ + +### signTransaction + +▸ **signTransaction**(`hash`, `privateKey`, `addToV?`): `Object` + +#### Parameters + +| Name | Type | Default value | +| :------ | :------ | :------ | +| `hash` | \`0x$\{string}\` | `undefined` | +| `privateKey` | \`0x$\{string}\` | `undefined` | +| `addToV` | `number` | `0` | + +#### Returns + +`Object` + +| Name | Type | +| :------ | :------ | +| `r` | `Buffer` | +| `s` | `Buffer` | +| `v` | `number` | + +#### Defined in + +[wallets/wallet-base/src/signing-utils.ts:806](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L806) ___ ### stringNumberOrBNToHex -▸ **stringNumberOrBNToHex**(`num?`): `Hex` +▸ **stringNumberOrBNToHex**(`num?`): `StrongAddress` #### Parameters @@ -287,11 +401,11 @@ ___ #### Returns -`Hex` +`StrongAddress` #### Defined in -[wallets/wallet-base/src/signing-utils.ts:97](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L97) +[wallets/wallet-base/src/signing-utils.ts:99](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L99) ___ @@ -313,7 +427,7 @@ ___ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:752](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L752) +[wallets/wallet-base/src/signing-utils.ts:774](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L774) ___ @@ -335,4 +449,4 @@ ___ #### Defined in -[wallets/wallet-base/src/signing-utils.ts:761](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L761) +[wallets/wallet-base/src/signing-utils.ts:783](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L783) diff --git a/packages/docs/sdk/docs/wallet-hsm-aws/classes/aws_hsm_signer.AwsHsmSigner.md b/packages/docs/sdk/docs/wallet-hsm-aws/classes/aws_hsm_signer.AwsHsmSigner.md index 10a97d1bf..0c3297240 100644 --- a/packages/docs/sdk/docs/wallet-hsm-aws/classes/aws_hsm_signer.AwsHsmSigner.md +++ b/packages/docs/sdk/docs/wallet-hsm-aws/classes/aws_hsm_signer.AwsHsmSigner.md @@ -43,7 +43,7 @@ #### Defined in -[wallet-hsm-aws/src/aws-hsm-signer.ts:26](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L26) +[wallet-hsm-aws/src/aws-hsm-signer.ts:25](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L25) ## Methods @@ -67,7 +67,7 @@ Signer.computeSharedSecret #### Defined in -[wallet-hsm-aws/src/aws-hsm-signer.ts:112](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L112) +[wallet-hsm-aws/src/aws-hsm-signer.ts:117](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L117) ___ @@ -91,7 +91,7 @@ Signer.decrypt #### Defined in -[wallet-hsm-aws/src/aws-hsm-signer.ts:106](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L106) +[wallet-hsm-aws/src/aws-hsm-signer.ts:111](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L111) ___ @@ -109,7 +109,7 @@ Signer.getNativeKey #### Defined in -[wallet-hsm-aws/src/aws-hsm-signer.ts:102](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L102) +[wallet-hsm-aws/src/aws-hsm-signer.ts:107](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L107) ___ @@ -133,7 +133,7 @@ Signer.signPersonalMessage #### Defined in -[wallet-hsm-aws/src/aws-hsm-signer.ts:79](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L79) +[wallet-hsm-aws/src/aws-hsm-signer.ts:84](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L84) ___ @@ -158,7 +158,7 @@ Signer.signTransaction #### Defined in -[wallet-hsm-aws/src/aws-hsm-signer.ts:67](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L67) +[wallet-hsm-aws/src/aws-hsm-signer.ts:72](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L72) ___ @@ -182,4 +182,4 @@ Signer.signTypedData #### Defined in -[wallet-hsm-aws/src/aws-hsm-signer.ts:91](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L91) +[wallet-hsm-aws/src/aws-hsm-signer.ts:96](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L96) diff --git a/packages/docs/sdk/docs/wallet-hsm-gcp/classes/gcp_hsm_signer.GcpHsmSigner.md b/packages/docs/sdk/docs/wallet-hsm-gcp/classes/gcp_hsm_signer.GcpHsmSigner.md index b2369e9ae..8688a4442 100644 --- a/packages/docs/sdk/docs/wallet-hsm-gcp/classes/gcp_hsm_signer.GcpHsmSigner.md +++ b/packages/docs/sdk/docs/wallet-hsm-gcp/classes/gcp_hsm_signer.GcpHsmSigner.md @@ -67,7 +67,7 @@ Signer.computeSharedSecret #### Defined in -[wallet-hsm-gcp/src/gcp-hsm-signer.ts:108](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L108) +[wallet-hsm-gcp/src/gcp-hsm-signer.ts:115](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L115) ___ @@ -91,7 +91,7 @@ Signer.decrypt #### Defined in -[wallet-hsm-gcp/src/gcp-hsm-signer.ts:102](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L102) +[wallet-hsm-gcp/src/gcp-hsm-signer.ts:109](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L109) ___ @@ -109,7 +109,7 @@ Signer.getNativeKey #### Defined in -[wallet-hsm-gcp/src/gcp-hsm-signer.ts:98](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L98) +[wallet-hsm-gcp/src/gcp-hsm-signer.ts:105](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L105) ___ @@ -133,7 +133,7 @@ Signer.signPersonalMessage #### Defined in -[wallet-hsm-gcp/src/gcp-hsm-signer.ts:75](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L75) +[wallet-hsm-gcp/src/gcp-hsm-signer.ts:82](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L82) ___ @@ -158,7 +158,7 @@ Signer.signTransaction #### Defined in -[wallet-hsm-gcp/src/gcp-hsm-signer.ts:63](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L63) +[wallet-hsm-gcp/src/gcp-hsm-signer.ts:70](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L70) ___ @@ -182,4 +182,4 @@ Signer.signTypedData #### Defined in -[wallet-hsm-gcp/src/gcp-hsm-signer.ts:87](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L87) +[wallet-hsm-gcp/src/gcp-hsm-signer.ts:94](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts#L94) diff --git a/packages/docs/sdk/docs/wallet-hsm/classes/signature_utils.Signature.md b/packages/docs/sdk/docs/wallet-hsm/classes/signature_utils.Signature.md index 9938b08a8..a0d6224cb 100644 --- a/packages/docs/sdk/docs/wallet-hsm/classes/signature_utils.Signature.md +++ b/packages/docs/sdk/docs/wallet-hsm/classes/signature_utils.Signature.md @@ -36,7 +36,7 @@ #### Defined in -[signature-utils.ts:48](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L48) +[signature-utils.ts:46](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L46) ## Properties @@ -46,7 +46,7 @@ #### Defined in -[signature-utils.ts:45](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L45) +[signature-utils.ts:43](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L43) ___ @@ -56,7 +56,7 @@ ___ #### Defined in -[signature-utils.ts:46](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L46) +[signature-utils.ts:44](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L44) ___ @@ -66,4 +66,4 @@ ___ #### Defined in -[signature-utils.ts:44](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L44) +[signature-utils.ts:42](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L42) diff --git a/packages/docs/sdk/docs/wallet-hsm/modules/signature_utils.md b/packages/docs/sdk/docs/wallet-hsm/modules/signature_utils.md index d0b9c5b67..5eb11d69b 100644 --- a/packages/docs/sdk/docs/wallet-hsm/modules/signature_utils.md +++ b/packages/docs/sdk/docs/wallet-hsm/modules/signature_utils.md @@ -30,7 +30,7 @@ #### Defined in -[signature-utils.ts:8](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L8) +[signature-utils.ts:9](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L9) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[signature-utils.ts:9](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L9) +[signature-utils.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L10) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[signature-utils.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L10) +[signature-utils.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L11) ## Functions @@ -71,7 +71,7 @@ ___ #### Defined in -[signature-utils.ts:34](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L34) +[signature-utils.ts:32](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L32) ___ @@ -91,7 +91,7 @@ ___ #### Defined in -[signature-utils.ts:30](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L30) +[signature-utils.ts:28](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L28) ___ @@ -111,7 +111,7 @@ ___ #### Defined in -[signature-utils.ts:78](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L78) +[signature-utils.ts:99](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L99) ___ @@ -136,13 +136,13 @@ https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#Low_S_values_in_s #### Defined in -[signature-utils.ts:18](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L18) +[signature-utils.ts:19](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L19) ___ ### recoverKeyIndex -▸ **recoverKeyIndex**(`signature`, `publicKey`, `hash`): `number` +▸ **recoverKeyIndex**(`signature`, `_publicKey`, `hash`): `number` Attempts each recovery key to find a match @@ -151,7 +151,7 @@ Attempts each recovery key to find a match | Name | Type | | :------ | :------ | | `signature` | `Uint8Array` | -| `publicKey` | `BigNumber` | +| `_publicKey` | `BigNumber` | | `hash` | `Uint8Array` | #### Returns @@ -160,4 +160,4 @@ Attempts each recovery key to find a match #### Defined in -[signature-utils.ts:58](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L58) +[signature-utils.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L56) diff --git a/packages/docs/sdk/docs/wallet-ledger/README.md b/packages/docs/sdk/docs/wallet-ledger/README.md index be7dbb496..8843df04f 100644 --- a/packages/docs/sdk/docs/wallet-ledger/README.md +++ b/packages/docs/sdk/docs/wallet-ledger/README.md @@ -12,3 +12,4 @@ - [ledger-utils](modules/ledger_utils.md) - [ledger-wallet](modules/ledger_wallet.md) - [tokens](modules/tokens.md) +- [types](modules/types.md) diff --git a/packages/docs/sdk/docs/wallet-ledger/classes/ledger_signer.LedgerSigner.md b/packages/docs/sdk/docs/wallet-ledger/classes/ledger_signer.LedgerSigner.md index 0b7a4414e..47e6f4bb1 100644 --- a/packages/docs/sdk/docs/wallet-ledger/classes/ledger_signer.LedgerSigner.md +++ b/packages/docs/sdk/docs/wallet-ledger/classes/ledger_signer.LedgerSigner.md @@ -35,7 +35,7 @@ Signs the EVM transaction with a Ledger device | Name | Type | | :------ | :------ | -| `ledger` | `any` | +| `ledger` | [`ILedger`](../interfaces/types.ILedger.md) | | `derivationPath` | `string` | | `ledgerAddressValidation` | [`AddressValidation`](../enums/ledger_wallet.AddressValidation.md) | | `appConfiguration` | `Object` | @@ -48,7 +48,7 @@ Signs the EVM transaction with a Ledger device #### Defined in -[wallet-ledger/src/ledger-signer.ts:24](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L24) +[wallet-ledger/src/ledger-signer.ts:25](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L25) ## Methods @@ -114,7 +114,7 @@ Signer.getNativeKey #### Defined in -[wallet-ledger/src/ledger-signer.ts:39](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L39) +[wallet-ledger/src/ledger-signer.ts:40](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L40) ___ @@ -163,7 +163,7 @@ Signer.signTransaction #### Defined in -[wallet-ledger/src/ledger-signer.ts:43](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L43) +[wallet-ledger/src/ledger-signer.ts:44](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L44) ___ @@ -187,4 +187,4 @@ Signer.signTypedData #### Defined in -[wallet-ledger/src/ledger-signer.ts:103](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L103) +[wallet-ledger/src/ledger-signer.ts:102](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L102) diff --git a/packages/docs/sdk/docs/wallet-ledger/classes/ledger_wallet.LedgerWallet.md b/packages/docs/sdk/docs/wallet-ledger/classes/ledger_wallet.LedgerWallet.md index 8bc189d59..61216db4f 100644 --- a/packages/docs/sdk/docs/wallet-ledger/classes/ledger_wallet.LedgerWallet.md +++ b/packages/docs/sdk/docs/wallet-ledger/classes/ledger_wallet.LedgerWallet.md @@ -65,7 +65,7 @@ RemoteWallet\<LedgerSigner\>.constructor #### Defined in -[wallet-ledger/src/ledger-wallet.ts:55](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L55) +[wallet-ledger/src/ledger-wallet.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L56) ## Properties @@ -77,7 +77,7 @@ base derivation path. Default: "44'/52752'/0'/0" #### Defined in -[wallet-ledger/src/ledger-wallet.ts:57](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L57) +[wallet-ledger/src/ledger-wallet.ts:58](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L58) ___ @@ -92,7 +92,7 @@ Example: [3, 99, 53] will retrieve the derivation paths of #### Defined in -[wallet-ledger/src/ledger-wallet.ts:56](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L56) +[wallet-ledger/src/ledger-wallet.ts:57](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L57) ___ @@ -124,7 +124,7 @@ ___ #### Defined in -[wallet-ledger/src/ledger-wallet.ts:59](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L59) +[wallet-ledger/src/ledger-wallet.ts:60](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L60) ___ @@ -136,7 +136,7 @@ Transport to connect the ledger device #### Defined in -[wallet-ledger/src/ledger-wallet.ts:58](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L58) +[wallet-ledger/src/ledger-wallet.ts:59](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L59) ## Methods @@ -360,7 +360,7 @@ RemoteWallet.signTransaction #### Defined in -[wallet-ledger/src/ledger-wallet.ts:70](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L70) +[wallet-ledger/src/ledger-wallet.ts:71](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L71) ___ diff --git a/packages/docs/sdk/docs/wallet-ledger/enums/ledger_wallet.AddressValidation.md b/packages/docs/sdk/docs/wallet-ledger/enums/ledger_wallet.AddressValidation.md index c601e3478..fac61ee74 100644 --- a/packages/docs/sdk/docs/wallet-ledger/enums/ledger_wallet.AddressValidation.md +++ b/packages/docs/sdk/docs/wallet-ledger/enums/ledger_wallet.AddressValidation.md @@ -21,7 +21,7 @@ #### Defined in -[wallet-ledger/src/ledger-wallet.ts:19](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L19) +[wallet-ledger/src/ledger-wallet.ts:20](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L20) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[wallet-ledger/src/ledger-wallet.ts:21](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L21) +[wallet-ledger/src/ledger-wallet.ts:22](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L22) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[wallet-ledger/src/ledger-wallet.ts:17](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L17) +[wallet-ledger/src/ledger-wallet.ts:18](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L18) ___ @@ -51,4 +51,4 @@ ___ #### Defined in -[wallet-ledger/src/ledger-wallet.ts:23](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L23) +[wallet-ledger/src/ledger-wallet.ts:24](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L24) diff --git a/packages/docs/sdk/docs/wallet-ledger/interfaces/types.ILedger.md b/packages/docs/sdk/docs/wallet-ledger/interfaces/types.ILedger.md new file mode 100644 index 000000000..18bb00255 --- /dev/null +++ b/packages/docs/sdk/docs/wallet-ledger/interfaces/types.ILedger.md @@ -0,0 +1,135 @@ +[@celo/wallet-ledger](../README.md) / [types](../modules/types.md) / ILedger + +# Interface: ILedger + +[types](../modules/types.md).ILedger + +## Table of contents + +### Methods + +- [getAddress](types.ILedger.md#getaddress) +- [getAppConfiguration](types.ILedger.md#getappconfiguration) +- [provideERC20TokenInformation](types.ILedger.md#provideerc20tokeninformation) +- [signEIP712HashedMessage](types.ILedger.md#signeip712hashedmessage) +- [signPersonalMessage](types.ILedger.md#signpersonalmessage) +- [signTransaction](types.ILedger.md#signtransaction) + +## Methods + +### getAddress + +▸ **getAddress**(`derivationPath`, `forceValidation?`): `Promise`\<\{ `address?`: \`0x$\{string}\` ; `derivationPath?`: `string` }\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `derivationPath` | `string` | +| `forceValidation?` | `boolean` | + +#### Returns + +`Promise`\<\{ `address?`: \`0x$\{string}\` ; `derivationPath?`: `string` }\> + +#### Defined in + +[wallet-ledger/src/types.d.ts:5](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/types.d.ts#L5) + +___ + +### getAppConfiguration + +▸ **getAppConfiguration**(): `Promise`\<\{ `arbitraryDataEnabled`: `number` ; `version`: `string` }\> + +#### Returns + +`Promise`\<\{ `arbitraryDataEnabled`: `number` ; `version`: `string` }\> + +#### Defined in + +[wallet-ledger/src/types.d.ts:16](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/types.d.ts#L16) + +___ + +### provideERC20TokenInformation + +▸ **provideERC20TokenInformation**(`TokenInfo`): `Promise`\<`unknown`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `TokenInfo` | `any` | + +#### Returns + +`Promise`\<`unknown`\> + +#### Defined in + +[wallet-ledger/src/types.d.ts:17](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/types.d.ts#L17) + +___ + +### signEIP712HashedMessage + +▸ **signEIP712HashedMessage**(`derivationPath`, `domainSeparator`, `structHash`): `Promise`\<[`LedgerSignature`](../modules/types.md#ledgersignature)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `derivationPath` | `string` | +| `domainSeparator` | `Buffer` | +| `structHash` | `Buffer` | + +#### Returns + +`Promise`\<[`LedgerSignature`](../modules/types.md#ledgersignature)\> + +#### Defined in + +[wallet-ledger/src/types.d.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/types.d.ts#L11) + +___ + +### signPersonalMessage + +▸ **signPersonalMessage**(`derivationPath`, `data`): `Promise`\<[`LedgerSignature`](../modules/types.md#ledgersignature)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `derivationPath` | `string` | +| `data` | `string` | + +#### Returns + +`Promise`\<[`LedgerSignature`](../modules/types.md#ledgersignature)\> + +#### Defined in + +[wallet-ledger/src/types.d.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/types.d.ts#L10) + +___ + +### signTransaction + +▸ **signTransaction**(`derivationPath`, `data`): `Promise`\<[`LedgerSignature`](../modules/types.md#ledgersignature)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `derivationPath` | `string` | +| `data` | `string` | + +#### Returns + +`Promise`\<[`LedgerSignature`](../modules/types.md#ledgersignature)\> + +#### Defined in + +[wallet-ledger/src/types.d.ts:9](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/types.d.ts#L9) diff --git a/packages/docs/sdk/docs/wallet-ledger/modules/ledger_wallet.md b/packages/docs/sdk/docs/wallet-ledger/modules/ledger_wallet.md index 6511e76de..cd4e7fee0 100644 --- a/packages/docs/sdk/docs/wallet-ledger/modules/ledger_wallet.md +++ b/packages/docs/sdk/docs/wallet-ledger/modules/ledger_wallet.md @@ -28,7 +28,7 @@ #### Defined in -[wallet-ledger/src/ledger-wallet.ts:11](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L11) +[wallet-ledger/src/ledger-wallet.ts:12](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L12) ## Functions @@ -51,4 +51,4 @@ #### Defined in -[wallet-ledger/src/ledger-wallet.ts:26](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L26) +[wallet-ledger/src/ledger-wallet.ts:27](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L27) diff --git a/packages/docs/sdk/docs/wallet-ledger/modules/types.md b/packages/docs/sdk/docs/wallet-ledger/modules/types.md new file mode 100644 index 000000000..4f3b61670 --- /dev/null +++ b/packages/docs/sdk/docs/wallet-ledger/modules/types.md @@ -0,0 +1,31 @@ +[@celo/wallet-ledger](../README.md) / types + +# Module: types + +## Table of contents + +### Interfaces + +- [ILedger](../interfaces/types.ILedger.md) + +### Type Aliases + +- [LedgerSignature](types.md#ledgersignature) + +## Type Aliases + +### LedgerSignature + +Ƭ **LedgerSignature**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `r` | `string` | +| `s` | `string` | +| `v` | `string` | + +#### Defined in + +[wallet-ledger/src/types.d.ts:3](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-ledger/src/types.d.ts#L3) diff --git a/packages/docs/sdk/docs/wallet-local/classes/local_signer.LocalSigner.md b/packages/docs/sdk/docs/wallet-local/classes/local_signer.LocalSigner.md index 6a8cf8617..d1acf05f4 100644 --- a/packages/docs/sdk/docs/wallet-local/classes/local_signer.LocalSigner.md +++ b/packages/docs/sdk/docs/wallet-local/classes/local_signer.LocalSigner.md @@ -43,7 +43,7 @@ Signs the EVM transaction using the provided private key #### Defined in -[wallet-local/src/local-signer.ts:17](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L17) +[wallet-local/src/local-signer.ts:15](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L15) ## Methods @@ -67,7 +67,7 @@ Signer.computeSharedSecret #### Defined in -[wallet-local/src/local-signer.ts:71](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L71) +[wallet-local/src/local-signer.ts:66](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L66) ___ @@ -91,7 +91,7 @@ Signer.decrypt #### Defined in -[wallet-local/src/local-signer.ts:63](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L63) +[wallet-local/src/local-signer.ts:59](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L59) ___ @@ -109,7 +109,7 @@ Signer.getNativeKey #### Defined in -[wallet-local/src/local-signer.ts:21](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L21) +[wallet-local/src/local-signer.ts:19](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L19) ___ @@ -133,7 +133,7 @@ Signer.signPersonalMessage #### Defined in -[wallet-local/src/local-signer.ts:34](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L34) +[wallet-local/src/local-signer.ts:30](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L30) ___ @@ -158,7 +158,7 @@ Signer.signTransaction #### Defined in -[wallet-local/src/local-signer.ts:25](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L25) +[wallet-local/src/local-signer.ts:23](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L23) ___ @@ -182,4 +182,4 @@ Signer.signTypedData #### Defined in -[wallet-local/src/local-signer.ts:50](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L50) +[wallet-local/src/local-signer.ts:46](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L46) diff --git a/packages/sdk/base/package.json b/packages/sdk/base/package.json index 298c4ab68..ba116c8ee 100644 --- a/packages/sdk/base/package.json +++ b/packages/sdk/base/package.json @@ -23,8 +23,10 @@ ], "devDependencies": { "@celo/typescript": "0.0.1", + "@noble/ciphers": "0.4.1", + "@noble/curves": "1.3.0", + "@noble/hashes": "1.3.3", "bignumber.js": "^9.0.0", - "elliptic": "^6.5.4", "web3-utils": "1.10.4" } } diff --git a/packages/sdk/base/src/account.ts b/packages/sdk/base/src/account.ts index bd13ab400..d3444eba8 100644 --- a/packages/sdk/base/src/account.ts +++ b/packages/sdk/base/src/account.ts @@ -23,8 +23,8 @@ export type RandomNumberGenerator = ( ) => void export interface Bip39 { - mnemonicToSeedSync: (mnemonic: string, password?: string) => Buffer - mnemonicToSeed: (mnemonic: string, password?: string) => Promise + mnemonicToSeedSync: (mnemonic: string, password?: string) => Uint8Array + mnemonicToSeed: (mnemonic: string, password?: string) => Promise generateMnemonic: ( strength?: number, rng?: RandomNumberGenerator, diff --git a/packages/sdk/cryptographic-utils/package.json b/packages/sdk/cryptographic-utils/package.json index 1bb367530..cd70976ae 100644 --- a/packages/sdk/cryptographic-utils/package.json +++ b/packages/sdk/cryptographic-utils/package.json @@ -25,19 +25,13 @@ "@celo/base": "^6.0.1", "@celo/bls12377js": "0.1.1", "@celo/utils": "^6.0.1", - "@ethereumjs/util": "8.0.5", + "@noble/ciphers": "0.4.1", + "@noble/curves": "1.3.0", + "@noble/hashes": "1.3.3", + "@scure/bip32": "^1.3.3", + "@scure/bip39": "^1.2.2", "@types/bn.js": "^5.1.0", - "@types/elliptic": "^6.4.9", - "@types/node": "^18.7.16", - "@types/randombytes": "^2.0.0", - "bigi": "^1.4.2", - "bip32": "^3.1.0", - "bip39": "https://github.com/bitcoinjs/bip39#a7ecbfe2e60d0214ce17163d610cad9f7b23140c", - "buffer-reverse": "^1.0.1", - "elliptic": "^6.5.4", - "ethereum-cryptography": "1.2.0", - "randombytes": "^2.0.1", - "tiny-secp256k1": "2.2.1" + "@types/node": "^18.7.16" }, "devDependencies": { "@celo/typescript": "0.0.1" diff --git a/packages/sdk/cryptographic-utils/src/account.test.ts b/packages/sdk/cryptographic-utils/src/account.test.ts index bf4aefb72..84b4a5b6f 100644 --- a/packages/sdk/cryptographic-utils/src/account.test.ts +++ b/packages/sdk/cryptographic-utils/src/account.test.ts @@ -1,9 +1,10 @@ import { MnemonicLanguages } from '@celo/base/lib/account' -import * as bip39 from 'bip39' +import * as bip39 from '@scure/bip39' import { generateKeys, generateMnemonic, getAllLanguages, + getWordList, invalidMnemonicWords, MnemonicStrength, normalizeMnemonic, @@ -32,7 +33,7 @@ describe('AccountUtils', () => { // This validates against all languages expect(validateMnemonic(mnemonic)).toBeTruthy() // This validates using a specific wordlist - expect(bip39.validateMnemonic(mnemonic, bip39.wordlists[languageName])).toBeTruthy() + expect(bip39.validateMnemonic(mnemonic, getWordList(language))).toBeTruthy() }) } }) @@ -69,7 +70,7 @@ describe('AccountUtils', () => { // This validates against all languages expect(validateMnemonic(mnemonic)).toBeTruthy() // This validates using a specific wordlist - expect(bip39.validateMnemonic(mnemonic, bip39.wordlists[languageName])).toBeTruthy() + expect(bip39.validateMnemonic(mnemonic, getWordList(language))).toBeTruthy() }) } }) diff --git a/packages/sdk/cryptographic-utils/src/account.ts b/packages/sdk/cryptographic-utils/src/account.ts index 5771dadd8..7f8b99dc4 100644 --- a/packages/sdk/cryptographic-utils/src/account.ts +++ b/packages/sdk/cryptographic-utils/src/account.ts @@ -8,12 +8,13 @@ import { import { normalizeAccents } from '@celo/base/lib/string' import { privateKeyToAddress } from '@celo/utils/lib/address' import { levenshteinDistance } from '@celo/utils/lib/levenshtein' -import BIP32Factory from 'bip32' -import * as bip39 from 'bip39' -import { keccak256 } from 'ethereum-cryptography/keccak' -import { utf8ToBytes } from 'ethereum-cryptography/utils' -import randomBytes from 'randombytes' -import * as ecc from 'tiny-secp256k1' +import { keccak_256 } from '@noble/hashes/sha3' +import { bytesToHex, utf8ToBytes } from '@noble/hashes/utils' +import { HDKey } from '@scure/bip32' +import * as bip39 from '@scure/bip39' +import { randomBytes } from 'crypto' +import wordlists from './wordlists' + // Exports moved to @celo/base, forwarding them // here for backwards compatibility export { @@ -23,12 +24,11 @@ export { MnemonicStrength, RandomNumberGenerator, } from '@celo/base/lib/account' -const bip32 = BIP32Factory(ecc) function defaultGenerateMnemonic( strength?: number, rng?: RandomNumberGenerator, - wordlist?: string[] + wordlist: string[] = wordlists[MnemonicLanguages.english] ): Promise { return new Promise((resolve, reject) => { strength = strength || 128 @@ -38,30 +38,37 @@ function defaultGenerateMnemonic( if (error) { reject(error) } else { - resolve(bip39.entropyToMnemonic(randomBytesBuffer.toString('hex'), wordlist)) + resolve(bip39.entropyToMnemonic(randomBytesBuffer, wordlist)) } }) }) } +function _validateMnemonic( + mnemonic: string, + wordlist: string[] = wordlists[MnemonicLanguages.english] +) { + return bip39.validateMnemonic(mnemonic, wordlist) +} + const bip39Wrapper: Bip39 = { mnemonicToSeedSync: bip39.mnemonicToSeedSync, mnemonicToSeed: bip39.mnemonicToSeed, generateMnemonic: defaultGenerateMnemonic, - validateMnemonic: bip39.validateMnemonic, + validateMnemonic: _validateMnemonic, } export async function generateMnemonic( strength: MnemonicStrength = MnemonicStrength.s256_24words, language?: MnemonicLanguages, - bip39ToUse: Bip39 = bip39Wrapper + bip39ToUse = bip39Wrapper ): Promise { return bip39ToUse.generateMnemonic(strength, undefined, getWordList(language)) } export function validateMnemonic( mnemonic: string, - bip39ToUse: Bip39 = bip39Wrapper, + bip39ToUse = bip39Wrapper, language?: MnemonicLanguages ) { if (language !== undefined) { @@ -161,28 +168,8 @@ export function formatNonAccentedCharacters(mnemonic: string) { } // Unify the bip39.wordlists (otherwise depends on the instance of the bip39) -function getWordList(language?: MnemonicLanguages): string[] { - // Use exhaustive switch to ensure that every language is accounted for. - switch (language ?? MnemonicLanguages.english) { - case MnemonicLanguages.chinese_simplified: - return bip39.wordlists.chinese_simplified - case MnemonicLanguages.chinese_traditional: - return bip39.wordlists.chinese_traditional - case MnemonicLanguages.english: - return bip39.wordlists.english - case MnemonicLanguages.french: - return bip39.wordlists.french - case MnemonicLanguages.italian: - return bip39.wordlists.italian - case MnemonicLanguages.japanese: - return bip39.wordlists.japanese - case MnemonicLanguages.korean: - return bip39.wordlists.korean - case MnemonicLanguages.spanish: - return bip39.wordlists.spanish - case MnemonicLanguages.portuguese: - return bip39.wordlists.portuguese - } +export function getWordList(language: MnemonicLanguages = MnemonicLanguages.english): string[] { + return wordlists[language] } export function getAllLanguages(): MnemonicLanguages[] { @@ -405,7 +392,7 @@ export async function generateKeys( password?: string, changeIndex: number = 0, addressIndex: number = 0, - bip39ToUse: Bip39 = bip39Wrapper, + bip39ToUse = bip39Wrapper, derivationPath: string = CELO_DERIVATION_PATH_BASE ): Promise<{ privateKey: string; publicKey: string; address: string }> { const seed: Buffer = await generateSeed(mnemonic, password, bip39ToUse) @@ -420,7 +407,7 @@ export function generateDeterministicInviteCode( changeIndex: number = 0, derivationPath: string = CELO_DERIVATION_PATH_BASE ): { privateKey: string; publicKey: string } { - const seed = keccak256(utf8ToBytes(recipientPhoneHash + recipientPepper)) as Buffer + const seed = Buffer.from(keccak_256(utf8ToBytes(recipientPhoneHash + recipientPepper))) return generateKeysFromSeed(seed, changeIndex, addressIndex, derivationPath) } @@ -429,10 +416,10 @@ export function generateDeterministicInviteCode( export async function generateSeed( mnemonic: string, password?: string, - bip39ToUse: Bip39 = bip39Wrapper, + bip39ToUse = bip39Wrapper, keyByteLength: number = 64 ): Promise { - let seed: Buffer = await bip39ToUse.mnemonicToSeed(mnemonic, password) + let seed = Buffer.from(await bip39ToUse.mnemonicToSeed(mnemonic, password)) if (keyByteLength > 0 && seed.byteLength > keyByteLength) { const bufAux = Buffer.allocUnsafe(keyByteLength) seed.copy(bufAux, 0, 0, keyByteLength) @@ -447,18 +434,21 @@ export function generateKeysFromSeed( addressIndex: number = 0, derivationPath: string = CELO_DERIVATION_PATH_BASE ): { privateKey: string; publicKey: string; address: string } { - const node = bip32.fromSeed(seed) - const newNode = node.derivePath( + const node = HDKey.fromMasterSeed(seed) + const newNode = node.derive( `${derivationPath ? `${derivationPath}/` : ''}${changeIndex}/${addressIndex}` ) if (!newNode.privateKey) { // As we are generating the node from a seed, the node will always have a private key and this would never happened throw new Error('utils-accounts@generateKeys: invalid node to derivate') } + const privateKey = bytesToHex(newNode.privateKey) + const publicKey = bytesToHex(newNode.publicKey!) + return { - privateKey: newNode.privateKey.toString('hex'), - publicKey: newNode.publicKey.toString('hex'), - address: privateKeyToAddress(newNode.privateKey.toString('hex')), + privateKey, + publicKey, + address: privateKeyToAddress(privateKey), } } diff --git a/packages/sdk/cryptographic-utils/src/bls.test.ts b/packages/sdk/cryptographic-utils/src/bls.test.ts new file mode 100644 index 000000000..2758bf892 --- /dev/null +++ b/packages/sdk/cryptographic-utils/src/bls.test.ts @@ -0,0 +1,61 @@ +import { normalizeAddressWith0x } from '@celo/base' +import { privateKeyToAddress } from '@celo/utils/lib/address' +import { blsPrivateKeyToProcessedPrivateKey, getBlsPoP, getBlsPublicKey } from './bls' +const PRIVATE_KEY1 = '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef' +const ACCOUNT_ADDRESS1 = normalizeAddressWith0x(privateKeyToAddress(PRIVATE_KEY1)) as `0x${string}` + +describe('BLS regression tests', () => { + test('blsPrivateKeyToProcessedPrivateKey', () => { + expect(blsPrivateKeyToProcessedPrivateKey(PRIVATE_KEY1)).toMatchInlineSnapshot(` + { + "data": [ + 242, + 30, + 152, + 172, + 17, + 130, + 80, + 64, + 6, + 191, + 156, + 10, + 65, + 229, + 164, + 189, + 107, + 121, + 20, + 112, + 230, + 253, + 30, + 215, + 206, + 48, + 25, + 145, + 97, + 14, + 121, + 3, + ], + "type": "Buffer", + } + `) + }) + + test('getBlsPublicKey', () => { + expect(getBlsPublicKey(PRIVATE_KEY1)).toMatchInlineSnapshot( + `"0x71436cf1cd3aacc12cf48122094802172522e0ae788a3c53328c911c6b84920cf584a865cccb319c82dcebb00e37520031d5c4c68104f1ae9eebb34fa76060da75ae8039810227104a89d7e033e4af8813ba0556cc8ffc47ca0791c7fa4ec680"` + ) + }) + + test('getBlsPoP', () => { + expect(getBlsPoP(ACCOUNT_ADDRESS1, PRIVATE_KEY1)).toMatchInlineSnapshot( + `"0x049cb0478d23fe074f01f0d8e5a512e6fb4b1dfe1ed1e079aea01e88a693f59904fc7a1668fef32a4ea0ce4e4e71f800"` + ) + }) +}) diff --git a/packages/sdk/cryptographic-utils/src/bls.ts b/packages/sdk/cryptographic-utils/src/bls.ts index c4f22ca68..3451a67cc 100644 --- a/packages/sdk/cryptographic-utils/src/bls.ts +++ b/packages/sdk/cryptographic-utils/src/bls.ts @@ -1,11 +1,10 @@ import { BLS } from '@celo/bls12377js' // this is an implementation of a subset of BLS12-377 import { isValidAddress } from '@celo/utils/lib/address' -import { keccak256 } from 'ethereum-cryptography/keccak' -const BigInteger = require('bigi') -const reverse = require('buffer-reverse') +import { keccak_256 } from '@noble/hashes/sha3' +import { bytesToHex } from '@noble/hashes/utils' -const n = BigInteger.fromHex('12ab655e9a2ca55660b44d1e5c37b00159aa76fed00000010a11800000000001', 16) +const n = BigInt('0x12ab655e9a2ca55660b44d1e5c37b00159aa76fed00000010a11800000000001') const MODULUSMASK = 31 export const BLS_PUBLIC_KEY_SIZE = 96 @@ -22,19 +21,18 @@ export const blsPrivateKeyToProcessedPrivateKey = (privateKeyHex: string) => { iBuffer, originalPrivateKeyBytes, ]) - const privateKeyBLSBytes = keccak256(keyBytes) + const privateKeyBLSBytes = keccak_256(keyBytes) // eslint-disable-next-line no-bitwise privateKeyBLSBytes[0] &= MODULUSMASK - const privateKeyNum = BigInteger.fromBuffer(privateKeyBLSBytes) - if (privateKeyNum.compareTo(n) >= 0) { + const _privateKeyHex = `0x${bytesToHex(privateKeyBLSBytes)}` + const privateKeyNum = BigInt(_privateKeyHex) + if (privateKeyNum >= n) { continue } - const privateKeyBytes = reverse(privateKeyNum.toBuffer()) - - return privateKeyBytes + return Buffer.from(privateKeyBLSBytes.reverse()) } throw new Error("couldn't derive BLS key from ECDSA key") diff --git a/packages/sdk/cryptographic-utils/src/commentEncryption.test.ts b/packages/sdk/cryptographic-utils/src/commentEncryption.test.ts index c51e64396..1b30b8ba0 100644 --- a/packages/sdk/cryptographic-utils/src/commentEncryption.test.ts +++ b/packages/sdk/cryptographic-utils/src/commentEncryption.test.ts @@ -1,18 +1,15 @@ -import { randomBytes } from 'crypto' +import { secp256k1 } from '@noble/curves/secp256k1' import { decryptComment, encryptComment } from './commentEncryption' describe('Comment Encryption', () => { // NOTE: elliptic is disabled elsewhere in this library to prevent // accidental signing of truncated messages. - // tslint:disable-next-line:import-blacklist - const EC = require('elliptic').ec - const ec = new EC('secp256k1') - const self = ec.keyFromPrivate(randomBytes(32)) - const selfPublic = Buffer.from(self.getPublic('hex'), 'hex') - const selfPriv = Buffer.from(self.getPrivate('hex'), 'hex') - const recip = ec.keyFromPrivate(randomBytes(32)) - const recipPublic = Buffer.from(recip.getPublic('hex'), 'hex') - const recipPriv = Buffer.from(recip.getPrivate('hex'), 'hex') + const _selfPriv = secp256k1.utils.randomPrivateKey() + const selfPriv = Buffer.from(_selfPriv) + const selfPublic = Buffer.from(secp256k1.getPublicKey(_selfPriv)) + const _recipPriv = secp256k1.utils.randomPrivateKey() + const recipPriv = Buffer.from(_recipPriv) + const recipPublic = Buffer.from(secp256k1.getPublicKey(_recipPriv)) const comment = 'text' const emojis = '👮‍♂️👸👱‍♀️👷‍♂️🧟‍♀️🙅‍♀️🙅‍♂️☝️👉💪🌁⛺🏭🌅🚋🦄🐇🐧🐻🐐🐓🐊🐠🐬🦅🐠🦕🐙🏵🌺🌳🍀🌻🐝🍃' @@ -109,7 +106,7 @@ describe('Comment Encryption', () => { expect(decrypted).toEqual(newComment) expect(didDecrypt).toBeTruthy() }) - it('should not regress for recipeient', () => { + it('should not regress for recipient', () => { const { comment: decrypted, success: didDecrypt } = decryptComment( encrypted, newRecipPriv, diff --git a/packages/sdk/cryptographic-utils/src/commentEncryption.ts b/packages/sdk/cryptographic-utils/src/commentEncryption.ts index d6c2ffb9b..cef6497d9 100644 --- a/packages/sdk/cryptographic-utils/src/commentEncryption.ts +++ b/packages/sdk/cryptographic-utils/src/commentEncryption.ts @@ -4,7 +4,8 @@ import { Decrypt as ECIESDecrypt, Encrypt as ECIESEncrypt, } from '@celo/utils/lib/ecies' -import { randomBytes } from 'crypto' +import { u8 } from '@noble/ciphers/utils' +import { randomBytes } from '@noble/ciphers/webcrypto/utils' import { decompressPublicKey } from './dataEncryptionKey' const ECIES_SESSION_KEY_LEN = 129 @@ -25,10 +26,10 @@ export interface EncryptionStatus { * @returns {Buffer} Encrypted data to sender and recipient. */ export function encryptData(data: Buffer, pubKeyRecipient: Buffer, pubKeySelf: Buffer): Buffer { - const sessionKey: Buffer = randomBytes(16) + const sessionKey = randomBytes(16) const sessionKeyToSelf: Buffer = ECIESEncrypt(pubKeySelf, sessionKey) const sessionKeyToOther: Buffer = ECIESEncrypt(pubKeyRecipient, sessionKey) - const ciphertext = AES128EncryptAndHMAC(sessionKey, sessionKey, data) + const ciphertext = AES128EncryptAndHMAC(u8(sessionKey), sessionKey, u8(data)) return Buffer.concat([sessionKeyToOther, sessionKeyToSelf, ciphertext]) } @@ -48,12 +49,15 @@ export function decryptData(data: Buffer, key: Buffer, sender: boolean): Buffer throw new Error('Buffer length too short') } const sessionKeyEncrypted = sender - ? data.slice(ECIES_SESSION_KEY_LEN, ECIES_SESSION_KEY_LEN * 2) - : data.slice(0, ECIES_SESSION_KEY_LEN) - const sessionKey = ECIESDecrypt(key, sessionKeyEncrypted) + ? data.subarray(ECIES_SESSION_KEY_LEN, ECIES_SESSION_KEY_LEN * 2) + : data.subarray(0, ECIES_SESSION_KEY_LEN) + const sessionKey = ECIESDecrypt(u8(key), sessionKeyEncrypted) + if (sender) { + console.log(sessionKeyEncrypted) + } - const encryptedMessage = data.slice(ECIES_SESSION_KEY_LEN * 2) - return AES128DecryptAndHMAC(sessionKey, sessionKey, encryptedMessage) + const encryptedMessage = data.subarray(ECIES_SESSION_KEY_LEN * 2) + return Buffer.from(AES128DecryptAndHMAC(u8(sessionKey), u8(sessionKey), u8(encryptedMessage))) } /** diff --git a/packages/sdk/cryptographic-utils/src/dataEncryptionKey.test.ts b/packages/sdk/cryptographic-utils/src/dataEncryptionKey.test.ts index 9a850a266..7079048c2 100644 --- a/packages/sdk/cryptographic-utils/src/dataEncryptionKey.test.ts +++ b/packages/sdk/cryptographic-utils/src/dataEncryptionKey.test.ts @@ -1,4 +1,4 @@ -import { randomBytes } from 'crypto' +import { secp256k1 } from '@noble/curves/secp256k1' import { decompressPublicKey, deriveDek } from './dataEncryptionKey' describe('deriveDek', () => { @@ -13,26 +13,16 @@ describe('deriveDek', () => { describe('decompressPublicKey', () => { it('should work with compressed input', () => { - // NOTE: elliptic is disabled elsewhere in this library to prevent - // accidental signing of truncated messages. - // tslint:disable-next-line:import-blacklist - const EC = require('elliptic').ec - const ec = new EC('secp256k1') - const privateKey = ec.keyFromPrivate(randomBytes(32)) - const publicKeyFull = Buffer.from(privateKey.getPublic(false, 'hex'), 'hex') - const publicKeyCompressed = Buffer.from(privateKey.getPublic(true, 'hex'), 'hex') + const privateKey = secp256k1.utils.randomPrivateKey() + const publicKeyFull = Buffer.from(secp256k1.getPublicKey(privateKey, false)) + const publicKeyCompressed = Buffer.from(secp256k1.getPublicKey(privateKey)) const decompressed = decompressPublicKey(publicKeyCompressed) expect(Buffer.concat([Buffer.from('04', 'hex'), decompressed])).toEqual(publicKeyFull) expect(decompressed).toHaveLength(64) }) it('should work with long form input', () => { - // NOTE: elliptic is disabled elsewhere in this library to prevent - // accidental signing of truncated messages. - // tslint:disable-next-line:import-blacklist - const EC = require('elliptic').ec - const ec = new EC('secp256k1') - const privateKey = ec.keyFromPrivate(randomBytes(32)) - const publicKeyFull = Buffer.from(privateKey.getPublic(false, 'hex'), 'hex') + const privateKey = secp256k1.utils.randomPrivateKey() + const publicKeyFull = Buffer.from(secp256k1.getPublicKey(privateKey, false)) const decompressed = decompressPublicKey(publicKeyFull) expect(Buffer.concat([Buffer.from('04', 'hex'), decompressed])).toEqual(publicKeyFull) expect(decompressed).toHaveLength(64) diff --git a/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts b/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts index b7d0ad5fc..6efd601e3 100644 --- a/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts +++ b/packages/sdk/cryptographic-utils/src/dataEncryptionKey.ts @@ -1,20 +1,16 @@ import { ensureLeading0x } from '@celo/utils/lib/address' +import { bytesToHex } from '@noble/curves/abstract/utils' +import { secp256k1 } from '@noble/curves/secp256k1' import { Bip39, generateKeys } from './account' /** * Turns a private key to a compressed public key (hex string with hex leader). * * @param {Buffer} privateKey Private key. - * @returns {string} Corresponding compessed public key in hex encoding with '0x' leader. + * @returns {string} Corresponding compressed public key in hex encoding with '0x' leader. */ export function compressedPubKey(privateKey: Buffer): string { - // NOTE: elliptic is disabled elsewhere in this library to prevent - // accidental signing of truncated messages. - // tslint:disable-next-line:import-blacklist - const EC = require('elliptic').ec - const ec = new EC('secp256k1') - const key = ec.keyFromPrivate(privateKey) - return ensureLeading0x(key.getPublic(true, 'hex')) + return ensureLeading0x(bytesToHex(secp256k1.getPublicKey(privateKey))).slice(1) } /** @@ -25,12 +21,7 @@ export function compressedPubKey(privateKey: Buffer): string { * @returns Decompresssed public key without prefix. */ export function decompressPublicKey(publicKey: Buffer): Buffer { - // NOTE: elliptic is disabled elsewhere in this library to prevent - // accidental signing of truncated messages. - // tslint:disable-next-line:import-blacklist - const EC = require('elliptic').ec - const ec = new EC('secp256k1') - return Buffer.from(ec.keyFromPublic(publicKey).getPublic(false, 'hex'), 'hex').slice(1) + return Buffer.from(secp256k1.getSharedSecret(BigInt(1), publicKey, false)).slice(1) } /** diff --git a/packages/sdk/cryptographic-utils/src/wordlists.ts b/packages/sdk/cryptographic-utils/src/wordlists.ts new file mode 100644 index 000000000..9f9a40392 --- /dev/null +++ b/packages/sdk/cryptographic-utils/src/wordlists.ts @@ -0,0 +1,25 @@ +import { MnemonicLanguages } from '@celo/base/lib/account' + +import { wordlist as english } from '@scure/bip39/wordlists/english' +import { wordlist as french } from '@scure/bip39/wordlists/french' +import { wordlist as italian } from '@scure/bip39/wordlists/italian' +import { wordlist as japanese } from '@scure/bip39/wordlists/japanese' +import { wordlist as korean } from '@scure/bip39/wordlists/korean' +import { wordlist as portuguese } from '@scure/bip39/wordlists/portuguese' +import { wordlist as chinese_simplified } from '@scure/bip39/wordlists/simplified-chinese' +import { wordlist as spanish } from '@scure/bip39/wordlists/spanish' +import { wordlist as chinese_traditional } from '@scure/bip39/wordlists/traditional-chinese' + +const wordlists: Record = { + [MnemonicLanguages.english]: english, + [MnemonicLanguages.french]: french, + [MnemonicLanguages.italian]: italian, + [MnemonicLanguages.japanese]: japanese, + [MnemonicLanguages.korean]: korean, + [MnemonicLanguages.portuguese]: portuguese, + [MnemonicLanguages.chinese_simplified]: chinese_simplified, + [MnemonicLanguages.spanish]: spanish, + [MnemonicLanguages.chinese_traditional]: chinese_traditional, +} as const + +export default wordlists diff --git a/packages/sdk/explorer/fixtures/contract.metadata.json b/packages/sdk/explorer/fixtures/contract.metadata.json index 06546bdb4..775cab81e 100644 --- a/packages/sdk/explorer/fixtures/contract.metadata.json +++ b/packages/sdk/explorer/fixtures/contract.metadata.json @@ -2885,4 +2885,4 @@ } }, "version": 1 -} \ No newline at end of file +} diff --git a/packages/sdk/governance/package.json b/packages/sdk/governance/package.json index 74e7db528..41e47243e 100644 --- a/packages/sdk/governance/package.json +++ b/packages/sdk/governance/package.json @@ -32,7 +32,6 @@ "@types/inquirer": "^6.5.0", "bignumber.js": "^9.0.0", "debug": "^4.1.1", - "ethereum-cryptography": "1.2.0", "inquirer": "^7.0.5" }, "engines": { diff --git a/packages/sdk/governance/src/proposals.ts b/packages/sdk/governance/src/proposals.ts index f51040d86..77234b5fa 100644 --- a/packages/sdk/governance/src/proposals.ts +++ b/packages/sdk/governance/src/proposals.ts @@ -38,10 +38,10 @@ import { newBlockExplorer } from '@celo/explorer' import { fetchMetadata, tryGetProxyImplementation } from '@celo/explorer/lib/sourcify' import { isValidAddress } from '@celo/utils/lib/address' import { fromFixed } from '@celo/utils/lib/fixidity' +import { keccak_256 } from '@noble/hashes/sha3' +import { utf8ToBytes } from '@noble/hashes/utils' import { BigNumber } from 'bignumber.js' import debugFactory from 'debug' -import { keccak256 } from 'ethereum-cryptography/keccak' -import { utf8ToBytes } from 'ethereum-cryptography/utils' import * as inquirer from 'inquirer' const debug = debugFactory('governance:proposals') @@ -54,8 +54,8 @@ export const hotfixToEncodedParams = (kit: ContractKit, proposal: Proposal, salt hotfixToParams(proposal, salt) ) -export const hotfixToHash = (kit: ContractKit, proposal: Proposal, salt: Buffer) => - keccak256(utf8ToBytes(hotfixToEncodedParams(kit, proposal, salt))) as Buffer +export const hotfixToHash = (kit: ContractKit, proposal: Proposal, salt: Buffer): Buffer => + Buffer.from(keccak_256(utf8ToBytes(hotfixToEncodedParams(kit, proposal, salt)))) /** * JSON encoding of a proposal transaction. diff --git a/packages/sdk/utils/package.json b/packages/sdk/utils/package.json index b292b75b9..e3bb3ee00 100644 --- a/packages/sdk/utils/package.json +++ b/packages/sdk/utils/package.json @@ -23,15 +23,16 @@ ], "dependencies": { "@celo/base": "^6.0.1", + "@ethereumjs/rlp": "^5.0.2", "@ethereumjs/util": "8.0.5", - "@types/elliptic": "^6.4.9", + "@noble/ciphers": "0.4.1", + "@noble/curves": "1.3.0", + "@noble/hashes": "1.3.3", + "@types/bn.js": "^5.1.0", "@types/node": "^18.7.16", "bignumber.js": "^9.0.0", - "elliptic": "^6.5.4", - "ethereum-cryptography": "1.2.0", "fp-ts": "2.1.1", "io-ts": "2.0.1", - "rlp": "^2.2.4", "web3-eth-abi": "1.10.4", "web3-utils": "1.10.4" }, diff --git a/packages/sdk/utils/src/ecdh.ts b/packages/sdk/utils/src/ecdh.ts index d81101588..206f27527 100644 --- a/packages/sdk/utils/src/ecdh.ts +++ b/packages/sdk/utils/src/ecdh.ts @@ -1,10 +1,13 @@ import { trimLeading0x } from '@celo/base/lib/address' -import { createECDH } from 'crypto' +import { secp256k1 } from '@noble/curves/secp256k1' export function computeSharedSecret(privateKey: string, publicKey: string): Buffer { - const ecdh = createECDH('secp256k1') - ecdh.setPrivateKey(Buffer.from(trimLeading0x(privateKey), 'hex')) - return ecdh.computeSecret(Buffer.from(ensureCompressed(publicKey), 'hex')) + return Buffer.from( + secp256k1.getSharedSecret( + Buffer.from(trimLeading0x(privateKey), 'hex'), + Buffer.from(ensureCompressed(publicKey), 'hex') + ) + ) } export function isCompressed(publicKey: string) { @@ -16,25 +19,14 @@ export function isCompressed(publicKey: string) { } export function ensureCompressed(publicKey: string): string { - // NOTE: elliptic is disabled elsewhere in this library to prevent - // accidental signing of truncated messages. - // tslint:disable-next-line:import-blacklist - const EC = require('elliptic').ec - const ec = new EC('secp256k1') - return ec.keyFromPublic(ensureUncompressedPrefix(publicKey), 'hex').getPublic(true, 'hex') + return Buffer.from(secp256k1.getSharedSecret(BigInt(1), Buffer.from(publicKey, 'hex'))).toString( + 'hex' + ) } export function ensureUncompressed(publicKey: string) { const noLeading0x = trimLeading0x(publicKey) - // NOTE: elliptic is disabled elsewhere in this library to prevent - // accidental signing of truncated messages. - // tslint:disable-next-line:import-blacklist - const EC = require('elliptic').ec - const ec = new EC('secp256k1') - const uncompressed = ec - .keyFromPublic(ensureUncompressedPrefix(noLeading0x), 'hex') - .getPublic(false, 'hex') - return uncompressed + return secp256k1.getSharedSecret(BigInt(1), Buffer.from(noLeading0x, 'hex'), false) } export function trimUncompressedPrefix(publicKey: string) { @@ -44,11 +36,3 @@ export function trimUncompressedPrefix(publicKey: string) { } return noLeading0x } - -function ensureUncompressedPrefix(publicKey: string): string { - const noLeading0x = trimLeading0x(publicKey) - if (noLeading0x.length === 128) { - return `04${noLeading0x}` - } - return noLeading0x -} diff --git a/packages/sdk/utils/src/ecies.test.ts b/packages/sdk/utils/src/ecies.test.ts index 8c98d7911..a011f792e 100644 --- a/packages/sdk/utils/src/ecies.test.ts +++ b/packages/sdk/utils/src/ecies.test.ts @@ -1,60 +1,68 @@ -import { privateToPublic } from '@ethereumjs/util' -import { randomBytes } from 'crypto' +import { bytesToUtf8, u8, utf8ToBytes } from '@noble/ciphers/utils' +import { randomBytes } from '@noble/ciphers/webcrypto/utils' +import { secp256k1 } from '@noble/curves/secp256k1' import { ECIES } from './ecies' describe('ECIES', () => { describe('encrypt', () => { it('should encrypt a message without error', () => { const privKey = randomBytes(32) - const pubKey = privateToPublic(privKey) - const message = Buffer.from(`foo`) - const encrypted = ECIES.Encrypt(pubKey, message) - expect(encrypted.length).toBeGreaterThanOrEqual(113) - }) + const pubKey = secp256k1.getPublicKey(privKey, false).slice(1) + const message = Buffer.from('foo') + expect(() => ECIES.Encrypt(pubKey, message)).not.toThrow() + }) it('should throw an error if priv key is given', () => { const privKey = randomBytes(32) const message = Buffer.from('foo') - try { - ECIES.Encrypt(privKey, message) - expect(false).toBe(true) - } catch (error) { - // ok, encryption should not work when a priv key is given - } + + expect(() => ECIES.Encrypt(privKey, message)).toThrow() + }) + + it('should not regress', () => { + // snapshot generated on master at commit=4861e71d0 + // with message='foo' + // and privkey='f353837781491b9ded31b6cb669c867e4c91f0ccfdaa85db4b1f0a814bc060c5' + const snapshotPrivKey = u8( + Buffer.from('f353837781491b9ded31b6cb669c867e4c91f0ccfdaa85db4b1f0a814bc060c5', 'hex') + ) + const snapshotEncrypted = Buffer.from( + '0487d78806c22bc7a5dd5ab38b02fb7ef48220648b6dd815b7ea3466c0270ebfe17aafece9af8f1c827ae9c47bac4215cd344afd94132581f4d789f8715a429d5c5c2dc365496750655bcd1c29445b118967cf790bb46b6a708ff1b3e82982173d98546ae6f228260913572127dc38a015386cb8', + 'hex' + ) + expect(bytesToUtf8(ECIES.Decrypt(snapshotPrivKey, snapshotEncrypted))).toEqual('foo') }) }) describe('roundtrip', () => { it('should return the same plaintext after roundtrip', () => { - const plaintext = Buffer.from('spam') + const plaintext = 'spam' const privKey = randomBytes(32) - const pubKey = privateToPublic(privKey) - const encrypted = ECIES.Encrypt(pubKey, plaintext) - const decrypted = ECIES.Decrypt(privKey, encrypted) - expect(decrypted.toString()).toEqual(plaintext.toString()) + const pubKey = secp256k1.getPublicKey(privKey, false).slice(1) + const encrypted = ECIES.Encrypt(pubKey, utf8ToBytes(plaintext)) + const decrypted = ECIES.Decrypt(Buffer.from(privKey), encrypted) + + expect(bytesToUtf8(decrypted)).toEqual(plaintext) }) it('should only decrypt if correct priv key is given', () => { const plaintext = Buffer.from('spam') const privKey = randomBytes(32) - const pubKey = privateToPublic(privKey) + const pubKey = secp256k1.getPublicKey(privKey, false).slice(1) const fakePrivKey = randomBytes(32) - try { - ECIES.Encrypt(pubKey, plaintext) - ECIES.Decrypt(fakePrivKey, plaintext) - expect(false).toBe(true) - } catch (error) { - // ok, decryption should not work for incorrect priv key - } + const encrypted = ECIES.Encrypt(pubKey, plaintext) + + expect(() => ECIES.Decrypt(fakePrivKey, encrypted)).toThrow() }) it('should be able to encrypt and decrypt a longer message (1024 bytes)', () => { const plaintext = randomBytes(1024) const privKey = randomBytes(32) - const pubKey = privateToPublic(privKey) + const pubKey = secp256k1.getPublicKey(privKey, false).slice(1) const encrypted = ECIES.Encrypt(pubKey, plaintext) const decrypted = ECIES.Decrypt(privKey, encrypted) - expect(decrypted.toString()).toEqual(plaintext.toString()) + + expect(decrypted).toEqual(plaintext) }) }) }) @@ -77,7 +85,7 @@ describe('AES128CTR', () => { const macKey = randomBytes(16) const encrypted = ECIES.AES128EncryptAndHMAC(encKey, macKey, plaintext) const decrypted = ECIES.AES128DecryptAndHMAC(encKey, macKey, encrypted) - expect(decrypted.toString()).toEqual(plaintext.toString()) + expect(bytesToUtf8(decrypted)).toEqual(plaintext.toString()) }) it('should only decrypt if correct priv key is given', () => { @@ -86,7 +94,7 @@ describe('AES128CTR', () => { const macKey = randomBytes(16) const fakeKey = randomBytes(16) const encrypted = ECIES.AES128EncryptAndHMAC(encKey, macKey, plaintext) - console.info(encrypted.toString('hex').length) + // console.info(encrypted.toString('hex').length) const decrypted = ECIES.AES128DecryptAndHMAC(fakeKey, macKey, encrypted) expect(plaintext.equals(decrypted)).toBe(false) }) @@ -97,7 +105,7 @@ describe('AES128CTR', () => { const macKey = randomBytes(16) const encrypted = ECIES.AES128EncryptAndHMAC(encKey, macKey, plaintext) const decrypted = ECIES.AES128DecryptAndHMAC(encKey, macKey, encrypted) - expect(decrypted.toString()).toEqual(plaintext.toString()) + expect(decrypted).toEqual(plaintext) }) }) diff --git a/packages/sdk/utils/src/ecies.ts b/packages/sdk/utils/src/ecies.ts index 75c4bc13d..af09a2868 100644 --- a/packages/sdk/utils/src/ecies.ts +++ b/packages/sdk/utils/src/ecies.ts @@ -6,7 +6,14 @@ */ 'use strict' -import { createCipheriv, createDecipheriv, createHash, createHmac, randomBytes } from 'crypto' +import { ctr } from '@noble/ciphers/aes' +import { u8 } from '@noble/ciphers/utils' +import { PrivKey } from '@noble/curves/abstract/utils' +import { PubKey } from '@noble/curves/abstract/weierstrass' +import { secp256k1 } from '@noble/curves/secp256k1' +import { hmac } from '@noble/hashes/hmac' +import { sha256 } from '@noble/hashes/sha256' +import { randomBytes } from '@noble/hashes/utils' export const IV_LENGTH = 16 @@ -38,13 +45,13 @@ const IncCounter = (ctr: Buffer) => { * @param {number} kdLen Length of output in bytes * @returns {Buffer} Output keying material of length kdLen bytes. */ -const ConcatKDF = (px: Buffer, kdLen: number) => { +export const ConcatKDF = (px: Buffer, kdLen: number) => { const blockSize = 32 const reps = ((kdLen + 7) * 8) / (blockSize * 8) let counter = Buffer.from('00000001', 'hex') let k = Buffer.from('00', 'hex') for (let i = 0; i <= reps; i++) { - const hash = createHash('sha256') + const hash = sha256.create() hash.update(counter) hash.update(px) k = Buffer.concat([k, hash.digest()]) @@ -55,102 +62,111 @@ const ConcatKDF = (px: Buffer, kdLen: number) => { /** * AES-128 CTR encrypt - * @param {Buffer} encryptionKey - * @param {Buffer} iv - * @param {Buffer} plaintext - * @returns {Buffer} ciphertext + * @param {Uint8Array} encryptionKey + * @param {Uint8Array} iv + * @param {Uint8Array} plaintext + * @returns {Uint8Array} ciphertext */ -export function AES128Encrypt(encryptionKey: Buffer, iv: Buffer, plaintext: Buffer) { - const cipher = createCipheriv('aes-128-ctr', encryptionKey, iv) - const firstChunk = cipher.update(plaintext) - const secondChunk = cipher.final() - return Buffer.concat([iv, firstChunk, secondChunk]) +export function AES128Encrypt( + encryptionKey: Uint8Array, + iv: Uint8Array, + plaintext: Uint8Array +): Uint8Array { + const aes = ctr(encryptionKey, iv) + const message = aes.encrypt(plaintext) + return u8(Buffer.concat([iv, message])) } /** * AES-128 CTR encrypt with message authentication - * @param {Buffer} encryptionKey - * @param {Buffer} macKey - * @param {Buffer} plaintext - * @returns {Buffer} ciphertext + * @param {Uint8Array} encryptionKey + * @param {Uint8Array} macKey + * + * @param {Uint8Array} plaintext + * @returns {Uint8Array} ciphertext */ export function AES128EncryptAndHMAC( - encryptionKey: Buffer, - macKey: Buffer, - plaintext: Buffer -): Buffer { + encryptionKey: Uint8Array, + macKey: Uint8Array, + plaintext: Uint8Array +): Uint8Array { const iv = randomBytes(IV_LENGTH) const dataToMac = AES128Encrypt(encryptionKey, iv, plaintext) - const mac = createHmac('sha256', macKey).update(dataToMac).digest() - - return Buffer.concat([dataToMac, mac]) + const mac = hmac(sha256, macKey, dataToMac) + return u8(Buffer.concat([dataToMac, mac])) } /** * AES-128 CTR decrypt - * @param {Buffer} encryptionKey - * @param {Buffer} iv - * @param {Buffer} ciphertext - * @returns {Buffer} plaintext + * @param {Uint8Array} encryptionKey + * @param {Uint8Array} iv + * @param {Uint8Array} ciphertext + * @returns {Uint8Array} plaintext */ -export function AES128Decrypt(encryptionKey: Buffer, iv: Buffer, ciphertext: Buffer) { - const cipher = createDecipheriv('aes-128-ctr', encryptionKey, iv) - const firstChunk = cipher.update(ciphertext) - const secondChunk = cipher.final() - - return Buffer.concat([firstChunk, secondChunk]) +export function AES128Decrypt( + encryptionKey: Uint8Array, + iv: Uint8Array, + ciphertext: Uint8Array +): Uint8Array { + const aes = ctr(encryptionKey, iv) + return aes.decrypt(ciphertext) } /** * AES-128 CTR decrypt with message authentication - * @param {Buffer} encryptionKey - * @param {Buffer} macKey - * @param {Buffer} ciphertext - * @returns {Buffer} plaintext + * @param {Uint8Array} encryptionKey + * @param {Uint8Array} macKey + * @param {Uint8Array} ciphertext + * @returns {Uint8Array} plaintext */ export function AES128DecryptAndHMAC( - encryptionKey: Buffer, - macKey: Buffer, - ciphertext: Buffer -): Buffer { + encryptionKey: Uint8Array, + macKey: Uint8Array, + ciphertext: Uint8Array +): Uint8Array { const iv = ciphertext.slice(0, IV_LENGTH) - const message = ciphertext.slice(IV_LENGTH, ciphertext.length - 32) - const mac = ciphertext.slice(ciphertext.length - 32, ciphertext.length) + const message = ciphertext.slice(IV_LENGTH, ciphertext.length - sha256.outputLen) + const mac = ciphertext.slice(ciphertext.length - sha256.outputLen, ciphertext.length) const dataToMac = Buffer.concat([iv, message]) - const computedMac = createHmac('sha256', macKey).update(dataToMac).digest() - if (!mac.equals(computedMac)) { + const computedMac = hmac(sha256, macKey, dataToMac) + if (!Buffer.from(mac).equals(Buffer.from(computedMac))) { throw new Error('MAC mismatch') } - return AES128Decrypt(encryptionKey, iv, message) } +const UNCOMPRESSED_KEY_LENGTH = 65 /** * ECIES encrypt * @param {Buffer} pubKeyTo Ethereum pub key, 64 bytes. - * @param {Buffer} plaintext Plaintext to be encrypted. + * @param {Uint8Array} plaintext Plaintext to be encrypted. * @returns {Buffer} Encrypted message, serialized, 113+ bytes */ -export function Encrypt(pubKeyTo: Buffer, plaintext: Buffer) { - // NOTE: elliptic is disabled elsewhere in this library to prevent - // accidental signing of truncated messages. - // tslint:disable-next-line:import-blacklist - const EC = require('elliptic').ec - const ec = new EC('secp256k1') - const ephemPrivKey = ec.keyFromPrivate(randomBytes(32)) - const ephemPubKey = ephemPrivKey.getPublic(false, 'hex') - const ephemPubKeyEncoded = Buffer.from(ephemPubKey, 'hex') - const px = ephemPrivKey.derive( - ec.keyFromPublic(Buffer.concat([Buffer.from([0x04]), pubKeyTo])).getPublic() - ) - const hash = ConcatKDF(px.toArrayLike(Buffer), 32) - const encryptionKey = hash.slice(0, 16) - const macKey = createHash('sha256').update(hash.slice(16)).digest() - const message = AES128EncryptAndHMAC(encryptionKey, macKey, plaintext) +export function Encrypt(pubKeyTo: PubKey, plaintext: Uint8Array) { + const ephemPrivKey = secp256k1.utils.randomPrivateKey() + const ephemPubKey = Buffer.from(secp256k1.getPublicKey(ephemPrivKey, false)) + const ephemPubKeyEncoded = Buffer.from(ephemPubKey) + if (typeof pubKeyTo === 'string') { + pubKeyTo = secp256k1.ProjectivePoint.fromHex(pubKeyTo).toRawBytes() + } + + const pubKeyToEncoded = Buffer.concat([Buffer.from([0x04]), pubKeyTo as Buffer]) + const px = secp256k1.getSharedSecret(ephemPrivKey, pubKeyToEncoded).slice(1) + + // NOTE: + // Can't swap to proper hkdf implementation because then there's ALWAYS a mac mismatch + // for OLD comments. Maybe we should use a comment version? + // + // const hash = hkdf(sha256, px, undefined, undefined, 32) + const hash = ConcatKDF(Buffer.from(px), 32) + const encryptionKey = hash.subarray(0, 16) + const macKey = sha256.create().update(hash.subarray(16)).digest() + const message = AES128EncryptAndHMAC(Buffer.from(encryptionKey), macKey, plaintext) const serializedCiphertext = Buffer.concat([ - ephemPubKeyEncoded, // 65 bytes + ephemPubKeyEncoded, // {UNCOMPRESSED_KEY_LENGTH} bytes message, // iv + ciphertext + mac (min 48 bytes) ]) + return serializedCiphertext } @@ -160,25 +176,24 @@ export function Encrypt(pubKeyTo: Buffer, plaintext: Buffer) { * @param {Buffer} encrypted Encrypted message, serialized, 113+ bytes * @returns {Buffer} plaintext */ -export function Decrypt(privKey: Buffer, encrypted: Buffer) { +export function Decrypt(privKey: PrivKey, encrypted: Buffer) { // Read iv, ephemPubKey, mac, ciphertext from encrypted message - const ephemPubKeyEncoded = encrypted.slice(0, 65) - const symmetricEncrypted = encrypted.slice(65) - - // NOTE: elliptic is disabled elsewhere in this library to prevent - // accidental signing of truncated messages. - // tslint:disable-next-line:import-blacklist - const EC = require('elliptic').ec - const ec = new EC('secp256k1') - - const ephemPubKey = ec.keyFromPublic(ephemPubKeyEncoded).getPublic() - const px = ec.keyFromPrivate(privKey).derive(ephemPubKey) - const hash = ConcatKDF(px.toBuffer(), 32) + const ephemPubKeyEncoded = u8(encrypted).slice(0, UNCOMPRESSED_KEY_LENGTH) + const symmetricEncrypted = u8(encrypted).slice(UNCOMPRESSED_KEY_LENGTH) + + const px = secp256k1.getSharedSecret(privKey, ephemPubKeyEncoded).slice(1) + // NOTE: + // Can't swap to proper hkdf implementation because then there's ALWAYS a mac mismatch + // for OLD comments. Maybe we should use a comment version? + // + // const hash = hkdf(sha256, px, undefined, undefined, 32) + const hash = ConcatKDF(Buffer.from(px), 32) // km, ke - const encryptionKey = hash.slice(0, 16) - const macKey = createHash('sha256').update(hash.slice(16)).digest() + const encryptionKey = hash.subarray(0, 16) + + const macKey = sha256.create().update(hash.subarray(16)).digest() - return AES128DecryptAndHMAC(encryptionKey, macKey, symmetricEncrypted) + return AES128DecryptAndHMAC(Buffer.from(encryptionKey), macKey, symmetricEncrypted) } export const ECIES = { diff --git a/packages/sdk/utils/src/istanbul.ts b/packages/sdk/utils/src/istanbul.ts index 4ee6bcb08..eb190ae5c 100644 --- a/packages/sdk/utils/src/istanbul.ts +++ b/packages/sdk/utils/src/istanbul.ts @@ -1,6 +1,6 @@ import { bufferToHex, toChecksumAddress } from '@ethereumjs/util' import BigNumber from 'bignumber.js' -import * as rlp from 'rlp' +import * as rlp from '@ethereumjs/rlp' import { Address } from './address' // This file contains utilities that help with istanbul-specific block information. @@ -42,14 +42,19 @@ function sealFromBuffers(data: Buffer[]): Seal { // Parse RLP encoded block extra data into an IstanbulExtra object. export function parseBlockExtraData(data: string): IstanbulExtra { const buffer = Buffer.from(data.replace(/^0x/, ''), 'hex') - const decode: any = rlp.decode('0x' + buffer.slice(ISTANBUL_EXTRA_VANITY_BYTES).toString('hex')) + const decode = rlp.decode('0x' + buffer.subarray(ISTANBUL_EXTRA_VANITY_BYTES).toString('hex')) + return { - addedValidators: decode[0].map((addr: Buffer) => toChecksumAddress(bufferToHex(addr))), - addedValidatorsPublicKeys: decode[1].map((key: Buffer) => '0x' + key.toString('hex')), - removedValidators: bigNumberFromBuffer(decode[2]), - seal: '0x' + decode[3].toString('hex'), - aggregatedSeal: sealFromBuffers(decode[4]), - parentAggregatedSeal: sealFromBuffers(decode[5]), + addedValidators: (decode.at(0) as Uint8Array[]).map((addr) => + toChecksumAddress(bufferToHex(Buffer.from(addr))) + ), + addedValidatorsPublicKeys: (decode.at(1) as Uint8Array[]).map( + (key) => '0x' + Buffer.from(key).toString('hex') + ), + removedValidators: bigNumberFromBuffer(Buffer.from(decode.at(2) as Uint8Array)), + seal: '0x' + Buffer.from(decode.at(3) as Uint8Array).toString('hex'), + aggregatedSeal: sealFromBuffers((decode.at(4) as Uint8Array[]).map(Buffer.from)), + parentAggregatedSeal: sealFromBuffers((decode.at(5) as Uint8Array[]).map(Buffer.from)), } } diff --git a/packages/sdk/utils/src/sign-typed-data-utils.test.ts b/packages/sdk/utils/src/sign-typed-data-utils.test.ts index ad552fc1a..2a69be91c 100644 --- a/packages/sdk/utils/src/sign-typed-data-utils.test.ts +++ b/packages/sdk/utils/src/sign-typed-data-utils.test.ts @@ -1,7 +1,7 @@ import { NULL_ADDRESS } from '@celo/base/lib/address' +import { keccak_256 } from '@noble/hashes/sha3' +import { utf8ToBytes } from '@noble/hashes/utils' import { BigNumber } from 'bignumber.js' -import { keccak256 } from 'ethereum-cryptography/keccak' -import { utf8ToBytes } from 'ethereum-cryptography/utils' import { EIP712Object, EIP712ObjectValue, @@ -55,7 +55,7 @@ const TEST_TYPES: EIP712TestCase[] = [ dataEncoding: Buffer.concat([ Buffer.from('000000000000000000000000000000000000000000000000000000000000a1ce', 'hex'), Buffer.from('0000000000000000000000000000000000000000000000000000000000000b0b', 'hex'), - keccak256(utf8ToBytes('hello bob!')), + keccak_256(utf8ToBytes('hello bob!')), ]), }, { @@ -68,7 +68,7 @@ const TEST_TYPES: EIP712TestCase[] = [ dataEncoding: Buffer.concat([ Buffer.from('000000000000000000000000000000000000000000000000000000000000a1ce', 'hex'), Buffer.from('0000000000000000000000000000000000000000000000000000000000000b0b', 'hex'), - keccak256(Buffer.from('0xdeadbeef', 'utf8')), + keccak_256(utf8ToBytes('0xdeadbeef')), ]), }, ], @@ -108,29 +108,29 @@ const TEST_TYPES: EIP712TestCase[] = [ }, }, dataEncoding: Buffer.concat([ - keccak256( + keccak_256( Buffer.concat([ - keccak256(utf8ToBytes('Person(address wallet,string name)')), + keccak_256(utf8ToBytes('Person(address wallet,string name)')), Buffer.from( '000000000000000000000000000000000000000000000000000000000000a1ce', 'hex' ), - keccak256(utf8ToBytes('Alice')), + keccak_256(utf8ToBytes('Alice')), ]) ), - keccak256( + keccak_256( Buffer.concat([ - keccak256(utf8ToBytes('Person(address wallet,string name)')), + keccak_256(utf8ToBytes('Person(address wallet,string name)')), Buffer.from( '0000000000000000000000000000000000000000000000000000000000000b0b', 'hex' ), - keccak256(utf8ToBytes('Bob')), + keccak_256(utf8ToBytes('Bob')), ]) ), - keccak256( + keccak_256( Buffer.concat([ - keccak256(utf8ToBytes('Asset(address token,uint256 amount)')), + keccak_256(utf8ToBytes('Asset(address token,uint256 amount)')), Buffer.from( '000000000000000000000000000000000000000000000000000000000000ce10', 'hex' @@ -202,13 +202,13 @@ const TEST_TYPES: EIP712TestCase[] = [ ], }, dataEncoding: Buffer.concat([ - keccak256( + keccak_256( Buffer.concat([ - keccak256( + keccak_256( Buffer.concat([ - keccak256( + keccak_256( Buffer.concat([ - keccak256(utf8ToBytes('Tile(bool occupied,uint8 occupantId)')), + keccak_256(utf8ToBytes('Tile(bool occupied,uint8 occupantId)')), Buffer.from( '0000000000000000000000000000000000000000000000000000000000000001', 'hex' @@ -219,9 +219,9 @@ const TEST_TYPES: EIP712TestCase[] = [ ), ]) ), - keccak256( + keccak_256( Buffer.concat([ - keccak256(utf8ToBytes('Tile(bool occupied,uint8 occupantId)')), + keccak_256(utf8ToBytes('Tile(bool occupied,uint8 occupantId)')), Buffer.from( '0000000000000000000000000000000000000000000000000000000000000000', 'hex' @@ -234,11 +234,11 @@ const TEST_TYPES: EIP712TestCase[] = [ ), ]) ), - keccak256( + keccak_256( Buffer.concat([ - keccak256( + keccak_256( Buffer.concat([ - keccak256(utf8ToBytes('Tile(bool occupied,uint8 occupantId)')), + keccak_256(utf8ToBytes('Tile(bool occupied,uint8 occupantId)')), Buffer.from( '0000000000000000000000000000000000000000000000000000000000000001', 'hex' @@ -249,9 +249,9 @@ const TEST_TYPES: EIP712TestCase[] = [ ), ]) ), - keccak256( + keccak_256( Buffer.concat([ - keccak256(utf8ToBytes('Tile(bool occupied,uint8 occupantId)')), + keccak_256(utf8ToBytes('Tile(bool occupied,uint8 occupantId)')), Buffer.from( '0000000000000000000000000000000000000000000000000000000000000001', 'hex' @@ -446,7 +446,9 @@ describe('encodeType()', () => { describe('typeHash()', () => { for (const { primaryType, types, typeEncoding } of TEST_TYPES) { it(`should hash type ${primaryType} correctly`, () => { - expect(typeHash(primaryType, types)).toEqual(keccak256(utf8ToBytes(typeEncoding))) + expect(typeHash(primaryType, types)).toEqual( + Buffer.from(keccak_256(utf8ToBytes(typeEncoding))) + ) }) } }) @@ -468,7 +470,9 @@ describe('structHash()', () => { if (examples.length > 0) { it(`should hash data ${primaryType} correctly`, () => { for (const { data, dataEncoding } of examples) { - const expected = keccak256(Buffer.concat([typeHash(primaryType, types), dataEncoding])) + const expected = Buffer.from( + keccak_256(Buffer.concat([typeHash(primaryType, types), dataEncoding])) + ) expect(structHash(primaryType, data, types)).toEqual(expected) } }) diff --git a/packages/sdk/utils/src/sign-typed-data-utils.ts b/packages/sdk/utils/src/sign-typed-data-utils.ts index 5ac97de71..c49bd0b92 100644 --- a/packages/sdk/utils/src/sign-typed-data-utils.ts +++ b/packages/sdk/utils/src/sign-typed-data-utils.ts @@ -1,8 +1,7 @@ import { NULL_ADDRESS, trimLeading0x } from '@celo/base/lib/address' -import { toBuffer } from '@ethereumjs/util' +import { keccak_256 } from '@noble/hashes/sha3' +import { hexToBytes, utf8ToBytes } from '@noble/hashes/utils' import { BigNumber } from 'bignumber.js' -import { keccak256 } from 'ethereum-cryptography/keccak' -import { hexToBytes, utf8ToBytes } from 'ethereum-cryptography/utils' import * as t from 'io-ts' import coder from 'web3-eth-abi' @@ -135,13 +134,15 @@ export const noString: EIP712Optional = { * @return A Buffer containing the hash of the typed data. */ export function generateTypedDataHash(typedData: EIP712TypedData): Buffer { - return keccak256( - Buffer.concat([ - Buffer.from('1901', 'hex'), - structHash('EIP712Domain', typedData.domain, typedData.types), - structHash(typedData.primaryType, typedData.message, typedData.types), - ]) - ) as Buffer + return Buffer.from( + keccak_256( + Buffer.concat([ + Buffer.from('1901', 'hex'), + structHash('EIP712Domain', typedData.domain, typedData.types), + structHash(typedData.primaryType, typedData.message, typedData.types), + ]) + ) + ) } /** @@ -192,7 +193,7 @@ export function encodeType(primaryType: string, types: EIP712Types): string { } export function typeHash(primaryType: string, types: EIP712Types): Buffer { - return keccak256(utf8ToBytes(encodeType(primaryType, types))) as Buffer + return Buffer.from(keccak_256(utf8ToBytes(encodeType(primaryType, types)))) } /** Encodes a single EIP-712 value to a 32-byte buffer */ @@ -208,12 +209,12 @@ function encodeValue(valueType: string, value: EIP712ObjectValue, types: EIP712T // Converting to Buffer before passing to `keccak` prevents an issue where the string is // interpretted as a hex-encoded string when is starts with 0x. // https://github.com/ethereumjs/ethereumjs-util/blob/7e3be1d97b4e11fbc4924836b8c444e644f643ac/index.js#L155-L183 - return keccak256(Buffer.from(value as string, 'utf8')) as Buffer + return Buffer.from(keccak_256(Buffer.from(value as string, 'utf8'))) } if (valueType === 'bytes') { // Allow the user to use either utf8 (plain string) or hex encoding for their bytes. // Note: keccak throws if the value cannot be converted into a Buffer, - return toBuffer(keccak256(hexToBytes(trimLeading0x(value as string)))) + return Buffer.from(keccak_256(hexToBytes(trimLeading0x(value as string)))) } // Encode structs as its hashStruct (e.g. keccak(typeHash || encodeData(struct)) ). @@ -226,11 +227,13 @@ function encodeValue(valueType: string, value: EIP712ObjectValue, types: EIP712T // Note: If a fixed length is provided in the type, it is not checked. const match = EIP712_ARRAY_REGEXP.exec(valueType) const memberType: string = match?.groups?.memberType! - return keccak256( - Buffer.concat( - (value as EIP712ObjectValue[]).map((member) => encodeValue(memberType, member, types)) + return Buffer.from( + keccak_256( + Buffer.concat( + (value as EIP712ObjectValue[]).map((member) => encodeValue(memberType, member, types)) + ) ) - ) as Buffer + ) } throw new Error(`Unrecognized or unsupported type in EIP-712 encoding: ${valueType}`) @@ -255,9 +258,9 @@ export function encodeData(primaryType: string, data: EIP712Object, types: EIP71 } export function structHash(primaryType: string, data: EIP712Object, types: EIP712Types): Buffer { - return keccak256( - Buffer.concat([typeHash(primaryType, types), encodeData(primaryType, data, types)]) - ) as Buffer + return Buffer.from( + keccak_256(Buffer.concat([typeHash(primaryType, types), encodeData(primaryType, data, types)])) + ) } /** diff --git a/packages/sdk/wallets/wallet-base/package.json b/packages/sdk/wallets/wallet-base/package.json index 6859b72a1..46b1e3dd5 100644 --- a/packages/sdk/wallets/wallet-base/package.json +++ b/packages/sdk/wallets/wallet-base/package.json @@ -28,13 +28,13 @@ "@celo/base": "^6.0.1", "@celo/connect": "^5.3.0", "@celo/utils": "^6.0.1", - "@ethereumjs/rlp": "^5.0.0", + "@ethereumjs/rlp": "^5.0.2", "@ethereumjs/util": "8.0.5", + "@noble/curves": "^1.3.0", + "@noble/hashes": "^1.3.3", "@types/debug": "^4.1.5", "bignumber.js": "^9.0.0", "debug": "^4.1.1", - "eth-lib": "^0.2.8", - "ethereum-cryptography": "^2.1.2", "web3": "1.10.4", "web3-eth-accounts": "1.10.4" }, diff --git a/packages/sdk/wallets/wallet-base/src/signing-utils.test.ts b/packages/sdk/wallets/wallet-base/src/signing-utils.test.ts index 998c99c0a..7cdf73ed5 100644 --- a/packages/sdk/wallets/wallet-base/src/signing-utils.test.ts +++ b/packages/sdk/wallets/wallet-base/src/signing-utils.test.ts @@ -1,5 +1,6 @@ import { CeloTx } from '@celo/connect' import { normalizeAddressWith0x, privateKeyToAddress } from '@celo/utils/lib/address' +import { hexToBytes } from '@noble/hashes/utils' import { parseTransaction, serializeTransaction } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { celo } from 'viem/chains' @@ -7,6 +8,10 @@ import Web3 from 'web3' import { extractSignature, getSignerFromTxEIP2718TX, + handleBigInt, + handleData, + handleHexString, + handleNumber, isPriceToLow, recoverTransaction, rlpEncodedTx, @@ -298,7 +303,7 @@ describe('rlpEncodedTx', () => { function ckToViem(tx: CeloTx & { v?: number }) { return { ...tx, - gas: BigInt(tx.gas!), + gas: BigInt(tx.gas! as string), maxFeePerGas: BigInt(tx.maxFeePerGas?.toString()!), maxPriorityFeePerGas: BigInt(tx.maxPriorityFeePerGas?.toString()!), value: BigInt(tx.value?.toString()!), @@ -307,14 +312,13 @@ function ckToViem(tx: CeloTx & { v?: number }) { } describe('recoverTransaction', () => { - const ACCOUNT_ADDRESS1_UNFORMATTED = privateKeyToAddress(PRIVATE_KEY1) as `0x${string}` describe('with EIP1559 transactions', () => { test('ok', async () => { const account = privateKeyToAccount(PRIVATE_KEY1) const hash = await account.signTransaction({ type: 'eip1559' as const, - from: ACCOUNT_ADDRESS1_UNFORMATTED, - to: ACCOUNT_ADDRESS1_UNFORMATTED, + from: ACCOUNT_ADDRESS1, + to: ACCOUNT_ADDRESS1 as `0x${string}`, chainId: 2, value: BigInt(1000), nonce: 0, @@ -325,7 +329,7 @@ describe('recoverTransaction', () => { }) const [transaction, signer] = recoverTransaction(hash) - expect(signer).toEqual(ACCOUNT_ADDRESS1_UNFORMATTED) + expect(signer.toLowerCase()).toEqual(ACCOUNT_ADDRESS1.toLowerCase()) expect(transaction).toMatchInlineSnapshot(` { "accessList": [], @@ -622,8 +626,17 @@ describe('extractSignature', () => { `) }) it('fails when length is wrong', () => { + expect(() => + extractSignature( + '0xf88282ad5a8063630a94588e4b68193001e4d10928660ab4165b813717c0880de0b6b3a764000083abcdefc094cd2a3d9f938e13cd947ec05abc7fe734df8dd82680a091b5504a59e529e7efa42dbb97fbc3311a91d035c873a94ab0789441fc989f84a02e8254d6b3101b63417e5d496833bc84f4832d4a8bf8a2b83e291d8f38c0f62d' + ) + ).toThrowErrorMatchingInlineSnapshot( + `"@extractSignature: provided transaction has 13 elements but ethereum-legacy txs with a signature have 9 [{"0":173,"1":90},{},{"0":99},{"0":99},{"0":10},{"0":88,"1":142,"2":75,"3":104,"4":25,"5":48,"6":1,"7":228,"8":209,"9":9,"10":40,"11":102,"12":10,"13":180,"14":22,"15":91,"16":129,"17":55,"18":23,"19":192},{"0":13,"1":224,"2":182,"3":179,"4":167,"5":100,"6":0,"7":0},{"0":171,"1":205,"2":239},[],{"0":205,"1":42,"2":61,"3":159,"4":147,"5":142,"6":19,"7":205,"8":148,"9":126,"10":192,"11":90,"12":188,"13":127,"14":231,"15":52,"16":223,"17":141,"18":216,"19":38},{},{"0":145,"1":181,"2":80,"3":74,"4":89,"5":229,"6":41,"7":231,"8":239,"9":164,"10":45,"11":187,"12":151,"13":251,"14":195,"15":49,"16":26,"17":145,"18":208,"19":53,"20":200,"21":115,"22":169,"23":74,"24":176,"25":120,"26":148,"27":65,"28":252,"29":152,"30":159,"31":132},{"0":46,"1":130,"2":84,"3":214,"4":179,"5":16,"6":27,"7":99,"8":65,"9":126,"10":93,"11":73,"12":104,"13":51,"14":188,"15":132,"16":244,"17":131,"18":45,"19":74,"20":139,"21":248,"22":162,"23":184,"24":62,"25":41,"26":29,"27":143,"28":56,"29":192,"30":246,"31":45}]"` + ) + }) + it('fails when length is empty', () => { expect(() => extractSignature('0x')).toThrowErrorMatchingInlineSnapshot( - `"@extractSignature: provided transaction has 0 elements but ethereum-legacy txs with a signature have 9 []"` + `"Invalid byte sequence"` ) }) }) @@ -671,3 +684,25 @@ describe('stringNumberOrBNToHex', () => { expect(stringNumberOrBNToHex(biggie)).toEqual('0x7b') }) }) + +describe('handleNumber', () => { + test('handles numbers', () => { + expect(handleNumber(hexToBytes('cafe0123'))).toEqual(3405644067) + expect(handleNumber(hexToBytes(''))).toEqual(0) + }) +}) + +describe('handleBigInt', () => { + expect(handleBigInt(hexToBytes('ffffffffffffff'))).toEqual(BigInt('72057594037927935')) + expect(handleBigInt(hexToBytes(''))).toEqual(BigInt(0)) +}) + +describe('handleHexString', () => { + expect(handleHexString(hexToBytes('cafe0123'))).toEqual('0xcafe0123') + expect(handleHexString(hexToBytes(''))).toEqual('0x') +}) + +describe('handleData', () => { + expect(handleData(hexToBytes('cafe0123'))).toEqual('0xcafe0123') + expect(handleData(hexToBytes(''))).toEqual('0x') +}) diff --git a/packages/sdk/wallets/wallet-base/src/signing-utils.ts b/packages/sdk/wallets/wallet-base/src/signing-utils.ts index 705a37d5d..03bfbb3d3 100644 --- a/packages/sdk/wallets/wallet-base/src/signing-utils.ts +++ b/packages/sdk/wallets/wallet-base/src/signing-utils.ts @@ -1,9 +1,13 @@ -import { ensureLeading0x, trimLeading0x } from '@celo/base/lib/address' +import { + StrongAddress, + ensureLeading0x, + normalizeAddressWith0x, + trimLeading0x, +} from '@celo/base/lib/address' import { CeloTx, CeloTxWithSig, EncodedTransaction, - Hex, RLPEncodedTx, TransactionTypes, isPresent, @@ -15,25 +19,17 @@ import { } from '@celo/connect/lib/utils/formatter' import { EIP712TypedData, generateTypedDataHash } from '@celo/utils/lib/sign-typed-data-utils' import { parseSignatureWithoutPrefix } from '@celo/utils/lib/signatureUtils' -// @ts-ignore-next-line +import { publicKeyToAddress } from '@celo/utils/src/address' +import * as RLP from '@ethereumjs/rlp' import * as ethUtil from '@ethereumjs/util' +import { secp256k1 } from '@noble/curves/secp256k1' +import { keccak_256 } from '@noble/hashes/sha3' +import { bytesToHex, hexToBytes } from '@noble/hashes/utils' import debugFactory from 'debug' -// @ts-ignore-next-line eth-lib types not found -import { account as Account, bytes as Bytes, hash as Hash, RLP } from 'eth-lib' -import { keccak256 } from 'ethereum-cryptography/keccak' -import { hexToBytes } from 'ethereum-cryptography/utils.js' import Web3 from 'web3' // TODO try to do this without web3 direct import Accounts from 'web3-eth-accounts' -const { - Address, - ecrecover, - fromRpcSig, - hashPersonalMessage, - pubToAddress, - toBuffer, - toChecksumAddress, -} = ethUtil +const { ecrecover, fromRpcSig, hashPersonalMessage, toBuffer } = ethUtil const debug = debugFactory('wallet-base:tx:sign') // Original code taken from @@ -47,6 +43,10 @@ export const thirtyTwo: number = 32 const Y_PARITY_EIP_2098 = 27 +function rlpEncodeHex(value: RLP.Input): StrongAddress { + return ensureLeading0x(Buffer.from(RLP.encode(value)).toString('hex')) +} + function isNullOrUndefined(value: any): boolean { return value === null || value === undefined } @@ -57,8 +57,10 @@ export function chainIdTransformationForSigning(chainId: number): number { return chainId * 2 + 35 } -export function getHashFromEncoded(rlpEncode: string): string { - return Hash.keccak256(rlpEncode) +export function getHashFromEncoded(rlpEncode: string): StrongAddress { + const rlpBytes = hexToBytes(trimLeading0x(rlpEncode)) + const hash = Buffer.from(keccak_256(rlpBytes)) + return `0x${hash.toString('hex')}` } function trimLeadingZero(hex: string) { @@ -88,40 +90,40 @@ function signatureFormatter( v = signature.v === Y_PARITY_EIP_2098 ? 0 : 1 } return { - v: stringNumberToHex(v), - r: makeEven(trimLeadingZero(ensureLeading0x(signature.r.toString('hex')))), - s: makeEven(trimLeadingZero(ensureLeading0x(signature.s.toString('hex')))), + v: trimLeading0x(stringNumberToHex(v)), + r: trimLeading0x(makeEven(trimLeadingZero(ensureLeading0x(signature.r.toString('hex'))))), + s: trimLeading0x(makeEven(trimLeadingZero(ensureLeading0x(signature.s.toString('hex'))))), } } export function stringNumberOrBNToHex( num?: number | string | ReturnType -): Hex { +): StrongAddress { if (typeof num === 'string' || typeof num === 'number' || num === undefined) { return stringNumberToHex(num) } else { - return makeEven(`0x` + num.toString(16)) as Hex + return makeEven(`0x` + num.toString(16)) as StrongAddress } } -function stringNumberToHex(num?: number | string): Hex { +function stringNumberToHex(num?: number | string): StrongAddress { const auxNumber = Number(num) if (num === '0x' || num === undefined || auxNumber === 0) { return '0x' } - return makeEven(Web3.utils.numberToHex(num)) as Hex + return makeEven(Web3.utils.numberToHex(num)) as StrongAddress } export function rlpEncodedTx(tx: CeloTx): RLPEncodedTx { assertSerializableTX(tx) const transaction = inputCeloTxFormatter(tx) - transaction.to = Bytes.fromNat(tx.to || '0x').toLowerCase() + transaction.to = ensureLeading0x((tx.to || '0x').toLowerCase()) transaction.nonce = Number(((tx.nonce as any) !== '0x' ? tx.nonce : 0) || 0) - transaction.data = Bytes.fromNat(tx.data || '0x').toLowerCase() + transaction.data = (tx.data || '0x').toLowerCase() transaction.value = stringNumberOrBNToHex(tx.value) transaction.gas = stringNumberOrBNToHex(tx.gas) transaction.chainId = tx.chainId || 1 // Celo Specific - transaction.feeCurrency = Bytes.fromNat(tx.feeCurrency || '0x').toLowerCase() - transaction.gatewayFeeRecipient = Bytes.fromNat(tx.gatewayFeeRecipient || '0x').toLowerCase() + transaction.feeCurrency = ensureLeading0x((tx.feeCurrency || '0x').toLowerCase()) + transaction.gatewayFeeRecipient = ensureLeading0x((tx.gatewayFeeRecipient || '0x').toLowerCase()) transaction.gatewayFee = stringNumberOrBNToHex(tx.gatewayFee) // Legacy @@ -130,11 +132,11 @@ export function rlpEncodedTx(tx: CeloTx): RLPEncodedTx { transaction.maxFeePerGas = stringNumberOrBNToHex(tx.maxFeePerGas) transaction.maxPriorityFeePerGas = stringNumberOrBNToHex(tx.maxPriorityFeePerGas) - let rlpEncode: Hex + let rlpEncode: StrongAddress if (isCIP64(tx)) { // https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0064.md // 0x7b || rlp([chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data, accessList, feeCurrency, signatureYParity, signatureR, signatureS]). - rlpEncode = RLP.encode([ + rlpEncode = rlpEncodeHex([ stringNumberToHex(transaction.chainId), stringNumberToHex(transaction.nonce), transaction.maxPriorityFeePerGas || '0x', @@ -154,7 +156,7 @@ export function rlpEncodedTx(tx: CeloTx): RLPEncodedTx { // There shall be a typed transaction with the code 0x7c that has the following format: // 0x7c || rlp([chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, feecurrency, gatewayFeeRecipient, gatewayfee, destination, amount, data, access_list, signature_y_parity, signature_r, signature_s]). // This will be in addition to the type 0x02 transaction as specified in EIP-1559. - rlpEncode = RLP.encode([ + rlpEncode = rlpEncodeHex([ stringNumberToHex(transaction.chainId), stringNumberToHex(transaction.nonce), transaction.maxPriorityFeePerGas || '0x', @@ -173,7 +175,7 @@ export function rlpEncodedTx(tx: CeloTx): RLPEncodedTx { } else if (isEIP1559(tx)) { // https://eips.ethereum.org/EIPS/eip-1559 // 0x02 || rlp([chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, destination, amount, data, access_list, signature_y_parity, signature_r, signature_s]). - rlpEncode = RLP.encode([ + rlpEncode = rlpEncodeHex([ stringNumberToHex(transaction.chainId), stringNumberToHex(transaction.nonce), transaction.maxPriorityFeePerGas || '0x', @@ -196,7 +198,7 @@ export function rlpEncodedTx(tx: CeloTx): RLPEncodedTx { } else if (isCeloLegacy(tx)) { // This order should match the order in Geth. // https://github.com/celo-org/celo-blockchain/blob/027dba2e4584936cc5a8e8993e4e27d28d5247b8/core/types/transaction.go#L65 - rlpEncode = RLP.encode([ + rlpEncode = rlpEncodeHex([ stringNumberToHex(transaction.nonce), transaction.gasPrice, transaction.gas, @@ -214,7 +216,7 @@ export function rlpEncodedTx(tx: CeloTx): RLPEncodedTx { } else { // https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0035.md // rlp([nonce, gasprice, gaslimit, recipient, amount, data, v, r, s]) - rlpEncode = RLP.encode([ + rlpEncode = rlpEncodeHex([ stringNumberToHex(transaction.nonce), transaction.gasPrice, transaction.gas, @@ -243,12 +245,12 @@ enum TxTypeToPrefix { function concatTypePrefixHex( rawTransaction: string, txType: EncodedTransaction['tx']['type'] -): Hex { +): StrongAddress { const prefix = TxTypeToPrefix[txType] if (prefix) { return concatHex([prefix, rawTransaction]) } - return rawTransaction as Hex + return rawTransaction as StrongAddress } function assertSerializableTX(tx: CeloTx) { @@ -328,7 +330,7 @@ function isCeloLegacy(tx: CeloTx): boolean { ) } -function concatHex(values: string[]): Hex { +function concatHex(values: string[]): StrongAddress { return `0x${values.reduce((acc, x) => acc + x.replace('0x', ''), '')}` } @@ -350,12 +352,10 @@ export async function encodeTransaction( signature: { v: number; r: Buffer; s: Buffer } ): Promise { const sanitizedSignature = signatureFormatter(signature, rlpEncoded.type) - const v = sanitizedSignature.v - const r = sanitizedSignature.r - const s = sanitizedSignature.s - const decodedTX = prefixAwareRLPDecode(rlpEncoded.rlpEncode, rlpEncoded.type) - - let decodedFields: string[] + const { v, r, s } = sanitizedSignature + const decodedTX = prefixAwareRLPDecode(rlpEncoded.rlpEncode, rlpEncoded.type) as Uint8Array[] + // for legacy tx we need to slice but for new ones we do not want to do that + let decodedFields: typeof decodedTX // for legacy tx we need to slice but for new ones we do not want to do that if (rlpEncoded.type == 'celo-legacy') { @@ -365,11 +365,10 @@ export async function encodeTransaction( } else { decodedFields = decodedTX } - - const rawTx = decodedFields.concat([v, r, s]) + const rawTx = decodedFields.concat([hexToBytes(v), hexToBytes(r), hexToBytes(s)]) // After signing, the transaction is encoded again and type prefix added - const rawTransaction = concatTypePrefixHex(RLP.encode(rawTx), rlpEncoded.type) + const rawTransaction = concatTypePrefixHex(rlpEncodeHex(rawTx), rlpEncoded.type) const hash = getHashFromEncoded(rawTransaction) const baseTX = { @@ -378,9 +377,9 @@ export async function encodeTransaction( to: rlpEncoded.transaction.to!.toString(), value: rlpEncoded.transaction.value!.toString(), input: rlpEncoded.transaction.data!, - v, - r, - s, + v: ensureLeading0x(v), + r: ensureLeading0x(r), + s: ensureLeading0x(s), hash, } let tx: Partial = baseTX @@ -405,7 +404,7 @@ export async function encodeTransaction( if (rlpEncoded.type === 'celo-legacy' || rlpEncoded.type === 'ethereum-legacy') { tx = { ...tx, - // @ts-expect-error -- just a matter of how this tx is built + // @ts-expect-error -- just a matter of how this tx is built gasPrice: rlpEncoded.transaction.gasPrice!.toString(), } } @@ -418,7 +417,7 @@ export async function encodeTransaction( return result } // new types have prefix but legacy does not -function prefixAwareRLPDecode(rlpEncode: string, type: TransactionTypes): string[] { +function prefixAwareRLPDecode(rlpEncode: string, type: TransactionTypes) { if (type === 'celo-legacy' || type === 'ethereum-legacy') { return RLP.decode(rlpEncode) } @@ -453,10 +452,10 @@ export function extractSignature(rawTx: string) { )} ${JSON.stringify(rawValues)}` ) } - return extractSignatureFromDecoded(rawValues) + return extractSignatureFromDecoded(rawValues as Uint8Array[]) } -function extractSignatureFromDecoded(rawValues: string[]) { +function extractSignatureFromDecoded(rawValues: Uint8Array[]) { // signature is always (for the tx we support so far) the last three elements of the array in order v, r, s, const v = rawValues.at(-3) let r = rawValues.at(-2) @@ -464,13 +463,10 @@ function extractSignatureFromDecoded(rawValues: string[]) { // https://github.com/wagmi-dev/viem/blob/993321689b3e2220976504e7e170fe47731297ce/src/utils/transaction/parseTransaction.ts#L281 // Account.recover cannot handle canonicalized signatures // A canonicalized signature may have the first byte removed if its value is 0 - r = ensureLeading0x(trimLeading0x(r as string).padStart(64, '0')) - s = ensureLeading0x(trimLeading0x(s as string).padStart(64, '0')) - return { - v, - r, - s, + v: handleHexString(v!), + r: ensureLeading0x(bytesToHex(r!).padStart(64, '0')), + s: ensureLeading0x(bytesToHex(s!).padStart(64, '0')), } } @@ -483,29 +479,29 @@ export function recoverTransaction(rawTx: string): [CeloTx, string] { switch (determineTXType(rawTx)) { case 'cip64': - return recoverTransactionCIP64(rawTx as Hex) + return recoverTransactionCIP64(rawTx as StrongAddress) case 'cip42': - return recoverTransactionCIP42(rawTx as Hex) + return recoverTransactionCIP42(rawTx as StrongAddress) case 'eip1559': - return recoverTransactionEIP1559(rawTx as Hex) + return recoverTransactionEIP1559(rawTx as StrongAddress) case 'celo-legacy': - return recoverCeloLegacy(rawTx as Hex) + return recoverCeloLegacy(rawTx as StrongAddress) default: - return recoverEthereumLegacy(rawTx as Hex) + return recoverEthereumLegacy(rawTx as StrongAddress) } } // inspired by @ethereumjs/tx -function getPublicKeyofSignerFromTx(transactionArray: string[], type: TransactionTypes) { +function getPublicKeyofSignerFromTx(transactionArray: Uint8Array[], type: TransactionTypes) { // this needs to be 10 for cip64, 12 for cip42 and eip1559 const base = transactionArray.slice(0, correctLengthOf(type, false)) - const message = concatHex([TxTypeToPrefix[type], RLP.encode(base).slice(2)]) - const msgHash = keccak256(hexToBytes(message)) + const message = concatHex([TxTypeToPrefix[type], rlpEncodeHex(base).slice(2)]) + const msgHash = keccak_256(hexToBytes(trimLeading0x(message))) const { v, r, s } = extractSignatureFromDecoded(transactionArray) try { return ecrecover( - toBuffer(msgHash), + Buffer.from(msgHash), v === '0x' || v === undefined ? BigInt(0) : BigInt(1), toBuffer(r), toBuffer(s) @@ -516,12 +512,13 @@ function getPublicKeyofSignerFromTx(transactionArray: string[], type: Transactio } export function getSignerFromTxEIP2718TX(serializedTransaction: string): string { - const transactionArray: any[] = RLP.decode(`0x${serializedTransaction.slice(4)}`) + const transactionArray = RLP.decode(`0x${serializedTransaction.slice(4)}`) const signer = getPublicKeyofSignerFromTx( - transactionArray, + transactionArray as Uint8Array[], determineTXType(serializedTransaction) ) - return toChecksumAddress(Address.fromPublicKey(signer).toString()) + + return publicKeyToAddress(signer.toString('hex')) } function determineTXType(serializedTransaction: string): TransactionTypes { @@ -553,8 +550,8 @@ function vrsForRecovery(vRaw: string, r: string, s: string) { } as const } -function recoverTransactionCIP42(serializedTransaction: Hex): [CeloTxWithSig, string] { - const transactionArray: any[] = prefixAwareRLPDecode(serializedTransaction, 'cip42') +function recoverTransactionCIP42(serializedTransaction: StrongAddress): [CeloTxWithSig, string] { + const transactionArray = prefixAwareRLPDecode(serializedTransaction, 'cip42') debug('signing-utils@recoverTransactionCIP42: values are %s', transactionArray) if (transactionArray.length !== 15 && transactionArray.length !== 12) { throw new Error( @@ -577,24 +574,23 @@ function recoverTransactionCIP42(serializedTransaction: Hex): [CeloTxWithSig, st vRaw, r, s, - ] = transactionArray + ] = transactionArray as Uint8Array[] const celoTX: CeloTxWithSig = { type: 'cip42', - nonce: nonce.toLowerCase() === '0x' ? 0 : parseInt(nonce, 16), - maxPriorityFeePerGas: - maxPriorityFeePerGas.toLowerCase() === '0x' ? 0 : parseInt(maxPriorityFeePerGas, 16), - maxFeePerGas: maxFeePerGas.toLowerCase() === '0x' ? 0 : parseInt(maxFeePerGas, 16), - gas: gas.toLowerCase() === '0x' ? 0 : parseInt(gas, 16), - feeCurrency, - gatewayFeeRecipient, - gatewayFee, - to, - value: value.toLowerCase() === '0x' ? 0 : parseInt(value, 16), - data, - chainId: chainId.toLowerCase() === '0x' ? 0 : parseInt(chainId, 16), - accessList: parseAccessList(accessList), - ...vrsForRecovery(vRaw, r, s), + nonce: handleNumber(nonce), + maxPriorityFeePerGas: handleNumber(maxPriorityFeePerGas), + maxFeePerGas: handleNumber(maxFeePerGas), + gas: handleNumber(gas), + feeCurrency: handleHexString(feeCurrency), + gatewayFeeRecipient: handleHexString(gatewayFeeRecipient), + gatewayFee: handleHexString(gatewayFee), + to: handleHexString(to), + value: handleNumber(value), + data: handleData(data), + chainId: handleNumber(chainId), + accessList: parseAccessList(accessList as unknown as [string, string[]][]), + ...vrsForRecovery(handleHexString(vRaw), handleHexString(r), handleHexString(s)), } const signer = @@ -602,8 +598,8 @@ function recoverTransactionCIP42(serializedTransaction: Hex): [CeloTxWithSig, st return [celoTX, signer] } -function recoverTransactionCIP64(serializedTransaction: Hex): [CeloTxWithSig, string] { - const transactionArray: any[] = prefixAwareRLPDecode(serializedTransaction, 'cip64') +function recoverTransactionCIP64(serializedTransaction: StrongAddress): [CeloTxWithSig, string] { + const transactionArray = prefixAwareRLPDecode(serializedTransaction, 'cip64') debug('signing-utils@recoverTransactionCIP64: values are %s', transactionArray) if (transactionArray.length !== 13 && transactionArray.length !== 10) { throw new Error( @@ -624,22 +620,21 @@ function recoverTransactionCIP64(serializedTransaction: Hex): [CeloTxWithSig, st vRaw, r, s, - ] = transactionArray + ] = transactionArray as Uint8Array[] const celoTX: CeloTxWithSig = { type: 'cip64', - nonce: nonce.toLowerCase() === '0x' ? 0 : parseInt(nonce, 16), - maxPriorityFeePerGas: - maxPriorityFeePerGas.toLowerCase() === '0x' ? 0 : parseInt(maxPriorityFeePerGas, 16), - maxFeePerGas: maxFeePerGas.toLowerCase() === '0x' ? 0 : parseInt(maxFeePerGas, 16), - gas: gas.toLowerCase() === '0x' ? 0 : parseInt(gas, 16), - feeCurrency, - to, - value: value.toLowerCase() === '0x' ? 0 : parseInt(value, 16), - data, - chainId: chainId.toLowerCase() === '0x' ? 0 : parseInt(chainId, 16), - accessList: parseAccessList(accessList), - ...vrsForRecovery(vRaw, r, s), + nonce: handleNumber(nonce), + maxPriorityFeePerGas: handleNumber(maxPriorityFeePerGas), + maxFeePerGas: handleNumber(maxFeePerGas), + gas: handleNumber(gas), + feeCurrency: handleHexString(feeCurrency), + to: handleHexString(to), + value: handleNumber(value), + data: handleData(data), + chainId: handleNumber(chainId), + accessList: parseAccessList(accessList as unknown as [string, string[]][]), + ...vrsForRecovery(handleHexString(vRaw), handleHexString(r), handleHexString(s)), } const signer = @@ -647,8 +642,8 @@ function recoverTransactionCIP64(serializedTransaction: Hex): [CeloTxWithSig, st return [celoTX, signer] } -function recoverTransactionEIP1559(serializedTransaction: Hex): [CeloTxWithSig, string] { - const transactionArray: any[] = prefixAwareRLPDecode(serializedTransaction, 'eip1559') +function recoverTransactionEIP1559(serializedTransaction: StrongAddress): [CeloTxWithSig, string] { + const transactionArray = prefixAwareRLPDecode(serializedTransaction, 'eip1559') debug('signing-utils@recoverTransactionEIP1559: values are %s', transactionArray) const [ @@ -664,21 +659,20 @@ function recoverTransactionEIP1559(serializedTransaction: Hex): [CeloTxWithSig, vRaw, r, s, - ] = transactionArray + ] = transactionArray as Uint8Array[] const celoTx: CeloTxWithSig = { type: 'eip1559', - nonce: nonce.toLowerCase() === '0x' ? 0 : parseInt(nonce, 16), - gas: gas.toLowerCase() === '0x' ? 0 : parseInt(gas, 16), - maxPriorityFeePerGas: - maxPriorityFeePerGas.toLowerCase() === '0x' ? 0 : parseInt(maxPriorityFeePerGas, 16), - maxFeePerGas: maxFeePerGas.toLowerCase() === '0x' ? 0 : parseInt(maxFeePerGas, 16), - to, - value: value.toLowerCase() === '0x' ? 0 : parseInt(value, 16), - data, - chainId: chainId.toLowerCase() === '0x' ? 0 : parseInt(chainId, 16), - accessList: parseAccessList(accessList), - ...vrsForRecovery(vRaw, r, s), + nonce: handleNumber(nonce), + gas: handleNumber(gas), + maxPriorityFeePerGas: handleNumber(maxPriorityFeePerGas), + maxFeePerGas: handleNumber(maxFeePerGas), + to: handleHexString(to), + value: handleNumber(value), + data: handleData(data), + chainId: handleNumber(chainId), + accessList: parseAccessList(accessList as unknown as [string, string[]][]), + ...vrsForRecovery(handleHexString(vRaw), handleHexString(r), handleHexString(s)), } const web3Account = new Accounts() const signer = web3Account.recoverTransaction(serializedTransaction) @@ -686,57 +680,85 @@ function recoverTransactionEIP1559(serializedTransaction: Hex): [CeloTxWithSig, return [celoTx, signer] } -function recoverCeloLegacy(serializedTransaction: Hex): [CeloTx, string] { - const rawValues = RLP.decode(serializedTransaction) +function recoverCeloLegacy(serializedTransaction: StrongAddress): [CeloTx, string] { + const rawValues = RLP.decode(serializedTransaction) as Uint8Array[] debug('signing-utils@recoverTransaction: values are %s', rawValues) - const recovery = Bytes.toNumber(rawValues[9]) - // eslint-disable-next-line no-bitwise - const chainId = Bytes.fromNumber((recovery - 35) >> 1) + const recovery = handleNumber(rawValues[9]) + // eslint-disable-next-line no-bitwise + const chainId = (recovery - 35) >> 1 const celoTx: CeloTx = { type: 'celo-legacy', - nonce: rawValues[0].toLowerCase() === '0x' ? 0 : parseInt(rawValues[0], 16), - gasPrice: rawValues[1].toLowerCase() === '0x' ? 0 : parseInt(rawValues[1], 16), - gas: rawValues[2].toLowerCase() === '0x' ? 0 : parseInt(rawValues[2], 16), - feeCurrency: rawValues[3], - gatewayFeeRecipient: rawValues[4], - gatewayFee: rawValues[5], - to: rawValues[6], - value: rawValues[7], - data: rawValues[8], - chainId, - } - const { r, v, s } = extractSignatureFromDecoded(rawValues) - const signature = Account.encodeSignature([v, r, s]) - const extraData = recovery < 35 ? [] : [chainId, '0x', '0x'] + nonce: handleNumber(rawValues[0]), + // NOTE: I used `handleNumber` to make it match the snapshot but we may + // lose accuracy, should use `handleHexString` + gasPrice: handleNumber(rawValues[1]), + // NOTE: I used `handleNumber` to make it match the snapshot but we may + // lose accuracy, should use `handleHexString` + gas: handleNumber(rawValues[2]), + feeCurrency: handleHexString(rawValues[3]), + gatewayFeeRecipient: handleHexString(rawValues[4]), + gatewayFee: handleHexString(rawValues[5]), + to: handleHexString(rawValues[6]), + value: handleHexString(rawValues[7]), + data: handleData(rawValues[8]), + // NOTE: I stringified to make it match the snapshot but it doesn't + // match the signature of TransactionConfig which expects a number + // @ts-expect-error + chainId: ensureLeading0x(chainId.toString(16)), + } + const { r, v: _v, s } = extractSignatureFromDecoded(rawValues) + let v = parseInt(_v || '0x0', 16) + const signature = new secp256k1.Signature(BigInt(r), BigInt(s)).addRecoveryBit( + v - chainIdTransformationForSigning(chainId) + ) + const safeChainId = trimLeading0x( + makeEven(trimLeadingZero(ensureLeading0x(chainId.toString(16)))) + ) + const extraData = recovery < 35 ? [] : [hexToBytes(safeChainId), hexToBytes(''), hexToBytes('')] const signingData = rawValues.slice(0, 9).concat(extraData) - const signingDataHex = RLP.encode(signingData) - const signer = Account.recover(getHashFromEncoded(signingDataHex), signature) - return [celoTx, signer] + const signingDataHex = rlpEncodeHex(signingData) + const signingDataHash = getHashFromEncoded(signingDataHex) + const publicKey = signature.recoverPublicKey(trimLeading0x(signingDataHash)).toHex(false) + return [celoTx, publicKeyToAddress(publicKey)] } -function recoverEthereumLegacy(serializedTransaction: Hex): [CeloTx, string] { - const rawValues = RLP.decode(serializedTransaction) +function recoverEthereumLegacy(serializedTransaction: StrongAddress): [CeloTx, string] { + const rawValues = RLP.decode(serializedTransaction) as Uint8Array[] debug('signing-utils@recoverTransaction: values are %s', rawValues) - const recovery = Bytes.toNumber(rawValues[6]) - // eslint-disable-next-line no-bitwise - const chainId = Bytes.fromNumber((recovery - 35) >> 1) + const recovery = handleNumber(rawValues[6]) + // eslint-disable-next-line no-bitwise + const chainId = (recovery - 35) >> 1 const celoTx: CeloTx = { type: 'ethereum-legacy', - nonce: rawValues[0].toLowerCase() === '0x' ? 0 : parseInt(rawValues[0], 16), - gasPrice: rawValues[1].toLowerCase() === '0x' ? 0 : parseInt(rawValues[1], 16), - gas: rawValues[2].toLowerCase() === '0x' ? 0 : parseInt(rawValues[2], 16), - to: rawValues[3], - value: rawValues[4], - data: rawValues[5], - chainId, - } - const { r, v, s } = extractSignatureFromDecoded(rawValues) - const signature = Account.encodeSignature([v, r, s]) - const extraData = recovery < 35 ? [] : [chainId, '0x', '0x'] + nonce: handleNumber(rawValues[0]), + // NOTE: I used `handleNumber` to make it match the snapshot but we may + // lose accuracy, should use `handleHexString` + gasPrice: handleNumber(rawValues[1]), + // NOTE: I used `handleNumber` to make it match the snapshot but we may + // lose accuracy, should use `handleHexString` + gas: handleNumber(rawValues[2]), + to: handleHexString(rawValues[3]), + value: handleHexString(rawValues[4]), + data: handleData(rawValues[5]), + // NOTE: I stringified to make it match the snapshot but it doesn't + // match the signature of TransactionConfig which expects a number + // @ts-expect-error + chainId: ensureLeading0x(chainId.toString(16)), + } + const { r, v: _v, s } = extractSignatureFromDecoded(rawValues) + let v = parseInt(_v || '0x0', 16) + const signature = new secp256k1.Signature(BigInt(r), BigInt(s)).addRecoveryBit( + v - chainIdTransformationForSigning(chainId) + ) + const safeChainId = trimLeading0x( + makeEven(trimLeadingZero(ensureLeading0x(chainId.toString(16)))) + ) + const extraData = recovery < 35 ? [] : [hexToBytes(safeChainId), hexToBytes(''), hexToBytes('')] const signingData = rawValues.slice(0, 6).concat(extraData) - const signingDataHex = RLP.encode(signingData) - const signer = Account.recover(getHashFromEncoded(signingDataHex), signature) - return [celoTx, signer] + const signingDataHex = rlpEncodeHex(signingData) + const signingDataHash = getHashFromEncoded(signingDataHex) + const publicKey = signature.recoverPublicKey(trimLeading0x(signingDataHash)).toHex(false) + return [celoTx, publicKeyToAddress(publicKey)] } export function recoverMessageSigner(signingDataHex: string, signedData: string): string { @@ -745,8 +767,8 @@ export function recoverMessageSigner(signingDataHex: string, signedData: string) const signature = fromRpcSig(signedData) const publicKey = ecrecover(msgHashBuff, signature.v, signature.r, signature.s) - const address = pubToAddress(publicKey, true) - return ensureLeading0x(address.toString('hex')) + const address = publicKeyToAddress(publicKey.toString('hex')) + return ensureLeading0x(address) } export function verifyEIP712TypedDataSigner( @@ -771,12 +793,49 @@ export function verifySignatureWithoutPrefix( } } -export function decodeSig(sig: any) { - const [v, r, s] = Account.decodeSignature(sig) +export function decodeSig(sig: StrongAddress | ReturnType, addToV = 0) { + const { recovery, r, s } = typeof sig === 'string' ? secp256k1.Signature.fromCompact(sig) : sig return { - v: parseInt(v, 16), - r: toBuffer(r) as Buffer, - s: toBuffer(s) as Buffer, + v: recovery! + addToV, + r: Buffer.from(r.toString(16).padStart(64, '0'), 'hex'), + s: Buffer.from(s.toString(16).padStart(64, '0'), 'hex'), + } +} + +export function signTransaction(hash: StrongAddress, privateKey: StrongAddress, addToV = 0) { + const signature = secp256k1.sign( + trimLeading0x(hash), + hexToBytes(trimLeading0x(privateKey)), + { lowS: true } // canonical:true + ) + return decodeSig(signature, addToV) +} + +export function handleNumber(n: Uint8Array): number { + const hex = `0x${bytesToHex(n)}` + if (hex === '0x') return 0 + return parseInt(hex, 16) +} + +export function handleBigInt(n: Uint8Array): bigint { + const hex = `0x${bytesToHex(n)}` + if (hex === '0x') return BigInt(0) + return BigInt(hex) +} + +export function handleHexString(adr: Uint8Array): StrongAddress { + if (!adr.length) { + return '0x' + } + const hex = `0x${bytesToHex(adr)}` + return normalizeAddressWith0x(hex) +} + +export function handleData(data: Uint8Array): string { + if (!data.length) { + return '0x' } + const hex = `0x${bytesToHex(data)}` + return hex } diff --git a/packages/sdk/wallets/wallet-hsm-aws/package.json b/packages/sdk/wallets/wallet-hsm-aws/package.json index 5b1f20fdb..d91e93c9b 100644 --- a/packages/sdk/wallets/wallet-hsm-aws/package.json +++ b/packages/sdk/wallets/wallet-hsm-aws/package.json @@ -32,13 +32,13 @@ "@types/secp256k1": "^4.0.0", "aws-sdk": "^2.705.0", "bignumber.js": "^9.0.0", - "debug": "^4.1.1", - "eth-lib": "^0.2.8", - "secp256k1": "^4.0.0" + "debug": "^4.1.1" }, "devDependencies": { + "@noble/ciphers": "0.4.1", + "@noble/curves": "1.3.0", + "@noble/hashes": "1.3.3", "dotenv": "^8.2.0", - "elliptic": "^6.5.4", "web3": "1.10.4" }, "engines": { diff --git a/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts b/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts index ab933cbcc..a81fe40b8 100644 --- a/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts +++ b/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts @@ -1,7 +1,7 @@ import { RLPEncodedTx, Signer } from '@celo/connect' import { ensureLeading0x, trimLeading0x } from '@celo/utils/lib/address' import { EIP712TypedData, generateTypedDataHash } from '@celo/utils/lib/sign-typed-data-utils' -import { getHashFromEncoded } from '@celo/wallet-base' +import { getHashFromEncoded, sixtyFour } from '@celo/wallet-base' import { Signature, bigNumberToBuffer, @@ -9,7 +9,6 @@ import { makeCanonical, parseBERSignature, recoverKeyIndex, - sixtyFour, thirtyTwo, } from '@celo/wallet-hsm' import * as ethUtil from '@ethereumjs/util' @@ -51,12 +50,18 @@ export class AwsHsmSigner implements Signer { const { R, S } = await this.findCanonicalSignature(buffer) const rBuff = bigNumberToBuffer(R, thirtyTwo) const sBuff = bigNumberToBuffer(S, thirtyTwo) + + // TODO: either move away from bignumber or update bignumber + // to get the BigNumber::toBigInt() method + // the following is the same as + /* + new secp256k1.Signature(R.toBigInt(), S.toBigInt()).toCompactHex() + */ const recoveryParam = recoverKeyIndex( Buffer.concat([rBuff, sBuff], sixtyFour), this.publicKey, buffer ) - return { r: rBuff, s: sBuff, diff --git a/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-wallet.test.ts b/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-wallet.test.ts index 518a761e7..206ab5768 100644 --- a/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-wallet.test.ts +++ b/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-wallet.test.ts @@ -9,6 +9,7 @@ import { verifySignature } from '@celo/utils/lib/signatureUtils' import { recoverTransaction, verifyEIP712TypedDataSigner } from '@celo/wallet-base' import { asn1FromPublicKey } from '@celo/wallet-hsm' import * as ethUtil from '@ethereumjs/util' +import { secp256k1 } from '@noble/curves/secp256k1' import { BigNumber } from 'bignumber.js' import Web3 from 'web3' import { AwsHsmWallet } from './aws-hsm-wallet' @@ -130,13 +131,8 @@ describe('AwsHsmWallet class', () => { const privateKey = trimLeading0x(keys.get(KeyId)!) if (privateKey) { const pkBuffer = Buffer.from(privateKey, 'hex') - // NOTE: elliptic is disabled elsewhere in this library to prevent - // accidental signing of truncated messages. - // tslint:disable-next-line:import-blacklist - const EC = require('elliptic').ec - const ec = new EC('secp256k1') - const signature = ec.sign(Message, pkBuffer, { canonical: true }) - return { Signature: Buffer.from(signature.toDER()) } + const signature = secp256k1.sign(Message, pkBuffer, { lowS: true }) + return { Signature: signature.toDERRawBytes() } } throw new Error(`Unable to locate key: ${KeyId}`) }, diff --git a/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-wallet.ts b/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-wallet.ts index a0fb3c1d2..b27fc1004 100644 --- a/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-wallet.ts +++ b/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-wallet.ts @@ -91,6 +91,7 @@ export class AwsHsmWallet extends RemoteWallet implements ReadOnly */ async getAddressFromKeyId(keyId: string): Promise
{ const publicKey = await this.getPublicKeyFromKeyId(keyId) + return getAddressFromPublicKey(publicKey) } } diff --git a/packages/sdk/wallets/wallet-hsm-azure/package.json b/packages/sdk/wallets/wallet-hsm-azure/package.json index 11c9b2574..a07a1e2a8 100644 --- a/packages/sdk/wallets/wallet-hsm-azure/package.json +++ b/packages/sdk/wallets/wallet-hsm-azure/package.json @@ -34,13 +34,13 @@ "@ethereumjs/util": "8.0.5", "@types/secp256k1": "^4.0.0", "bignumber.js": "^9.0.0", - "debug": "^4.1.1", - "eth-lib": "^0.2.8", - "secp256k1": "^4.0.0" + "debug": "^4.1.1" }, "devDependencies": { + "@noble/ciphers": "0.4.1", + "@noble/curves": "1.3.0", + "@noble/hashes": "1.3.3", "dotenv": "^8.2.0", - "elliptic": "^6.5.4", "web3": "1.10.4" }, "engines": { diff --git a/packages/sdk/wallets/wallet-hsm-gcp/package.json b/packages/sdk/wallets/wallet-hsm-gcp/package.json index 12808eafd..808dfc3fe 100644 --- a/packages/sdk/wallets/wallet-hsm-gcp/package.json +++ b/packages/sdk/wallets/wallet-hsm-gcp/package.json @@ -27,16 +27,17 @@ "@celo/wallet-remote": "^5.2.0", "@ethereumjs/util": "8.0.5", "@google-cloud/kms": "~2.9.0", + "@noble/curves": "^1.3.0", "@types/debug": "^4.1.5", "@types/secp256k1": "^4.0.0", "bignumber.js": "^9.0.0", - "debug": "^4.1.1", - "eth-lib": "^0.2.8", - "secp256k1": "^4.0.0" + "debug": "^4.1.1" }, "devDependencies": { + "@noble/ciphers": "0.4.1", + "@noble/curves": "1.3.0", + "@noble/hashes": "1.3.3", "dotenv": "^8.2.0", - "elliptic": "^6.5.4", "web3": "1.10.4" }, "engines": { diff --git a/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts b/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts index ed8d5c5c0..b2cca9a84 100644 --- a/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts +++ b/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-signer.ts @@ -47,6 +47,13 @@ export class GcpHsmSigner implements Signer { const { R, S } = await this.findCanonicalSignature(buffer) const rBuff = bigNumberToBuffer(R, thirtyTwo) const sBuff = bigNumberToBuffer(S, thirtyTwo) + + // TODO: either move away from bignumber or update bignumber + // to get the BigNumber::toBigInt() method + // the following is the same as + /* + new secp256k1.Signature(R.toBigInt(), S.toBigInt()).toCompactHex() + */ const recoveryParam = recoverKeyIndex( Buffer.concat([rBuff, sBuff], sixtyFour), this.publicKey, diff --git a/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-wallet.test.ts b/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-wallet.test.ts index 901d2aff4..ef361c686 100644 --- a/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-wallet.test.ts +++ b/packages/sdk/wallets/wallet-hsm-gcp/src/gcp-hsm-wallet.test.ts @@ -9,11 +9,8 @@ import { verifySignature } from '@celo/utils/lib/signatureUtils' import { recoverTransaction, verifyEIP712TypedDataSigner } from '@celo/wallet-base' import { asn1FromPublicKey } from '@celo/wallet-hsm' import * as ethUtil from '@ethereumjs/util' +import { secp256k1 } from '@noble/curves/secp256k1' import { BigNumber } from 'bignumber.js' -// NOTE: elliptic is disabled elsewhere in this library to prevent -// accidental signing of truncated messages. -// eslint-disable-next-line no-restricted-imports -import { ec as EC } from 'elliptic' import Web3 from 'web3' import { GcpHsmWallet } from './gcp-hsm-wallet' require('dotenv').config() @@ -74,7 +71,6 @@ const MOCK_VERSION_NAME = '1d6db902-9a45-4dd5-bd1e-7250b2306f18' const GCP_VERSION_NAME = USING_MOCK ? MOCK_VERSION_NAME : process.env.GCP_VERSION_NAME! const key1 = PRIVATE_KEY1 -const ec = new EC('secp256k1') const keys: Map = new Map([[MOCK_VERSION_NAME, key1]]) @@ -119,8 +115,8 @@ describe('GcpHsmWallet class', () => { const privateKey = trimLeading0x(keys.get(name)!) if (privateKey) { const pkBuffer = Buffer.from(privateKey, 'hex') - const signature = ec.sign(digest.sha256, pkBuffer, { canonical: true }) - return [{ signature: Buffer.from(signature.toDER()) }] + const signature = secp256k1.sign(digest.sha256, pkBuffer, { lowS: true }) + return [{ signature: signature.toDERRawBytes() }] } throw new Error(`Unable to locate key: ${name}`) }, diff --git a/packages/sdk/wallets/wallet-hsm/package.json b/packages/sdk/wallets/wallet-hsm/package.json index 644104399..be7447bcf 100644 --- a/packages/sdk/wallets/wallet-hsm/package.json +++ b/packages/sdk/wallets/wallet-hsm/package.json @@ -24,14 +24,14 @@ "dependencies": { "@celo/base": "^6.0.1", "@ethereumjs/util": "8.0.5", + "@noble/ciphers": "0.4.1", + "@noble/curves": "1.3.0", + "@noble/hashes": "1.3.3", "@types/asn1js": "^0.0.2", "@types/debug": "^4.1.5", "@types/secp256k1": "^4.0.0", "asn1js": "^2.0.26", - "bignumber.js": "^9.0.0", - "elliptic": "^6.5.4", - "eth-lib": "^0.2.8", - "secp256k1": "^4.0.0" + "bignumber.js": "^9.0.0" }, "devDependencies": { "dotenv": "^8.2.0" diff --git a/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts b/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts index fdcbb2c60..75bab7bb3 100644 --- a/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts +++ b/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts @@ -1,7 +1,8 @@ import { Address, ensureLeading0x } from '@celo/base/lib/address' import * as ethUtil from '@ethereumjs/util' +import { SignatureType } from '@noble/curves/abstract/weierstrass' +import { secp256k1 } from '@noble/curves/secp256k1' import { BigNumber } from 'bignumber.js' -import { ecdsaRecover } from 'secp256k1' // 0x04 prefix indicates that the key is not compressed // https://tools.ietf.org/html/rfc5480#section-2.2 @@ -16,10 +17,7 @@ export const thirtyTwo: number = 32 * https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#Low_S_values_in_signatures */ export const makeCanonical = (S: BigNumber): BigNumber => { - // tslint:disable-next-line:import-blacklist - const EC = require('elliptic').ec - const secp256k1Curve = new EC('secp256k1') - const curveN = bufferToBigNumber(secp256k1Curve.curve.n) + const curveN = new BigNumber(secp256k1.CURVE.n.toString()) const isCanonical = S.comparedTo(curveN.dividedBy(2)) <= 0 if (!isCanonical) { return curveN.minus(S) @@ -57,21 +55,44 @@ export class Signature { */ export function recoverKeyIndex( signature: Uint8Array, - publicKey: BigNumber, + _publicKey: BigNumber, hash: Uint8Array ): number { - for (let i = 0; i < 4; i++) { - const compressed = false - // Force types to be Uint8Array - const signatureArray = new Uint8Array(signature) - const hashArray = new Uint8Array(hash) - const recoveredPublicKeyByteArr = ecdsaRecover(signatureArray, i, hashArray, compressed) - const publicKeyBuff = Buffer.from(recoveredPublicKeyByteArr) - const recoveredPublicKey = bufferToBigNumber(publicKeyBuff) - if (publicKey.eq(recoveredPublicKey)) { - return i + const formats = ['fromCompact', 'fromDER'] as const + + for (let format of formats) { + let sig: SignatureType + try { + sig = secp256k1.Signature[format](signature) + } catch (e) { + continue + } + + for (let i = 0; i < 4; i++) { + sig = sig.addRecoveryBit(i) + const recoveredPublicKeyByteArr = sig.recoverPublicKey(hash) + + // NOTE: + // converting hex value to bigint allows for discrepencies between + // libraries to disappear, ran into an issue where + // "0x01234" wasn't equal to "0x1234", the conversion removes it + const compressedRecoveredPublicKey = BigInt( + ensureLeading0x(recoveredPublicKeyByteArr.toHex(false)) + ) + const uncompressedRecoveredPublicKey = BigInt( + ensureLeading0x(recoveredPublicKeyByteArr.toHex(true)) + ) + const publicKey = BigInt(ensureLeading0x(_publicKey.toString(16))) + + if ( + publicKey === compressedRecoveredPublicKey || + publicKey === uncompressedRecoveredPublicKey + ) { + return i + } } } + throw new Error('Unable to generate recovery key from signature.') } diff --git a/packages/sdk/wallets/wallet-ledger/package.json b/packages/sdk/wallets/wallet-ledger/package.json index 284f76f89..e94d38ae3 100644 --- a/packages/sdk/wallets/wallet-ledger/package.json +++ b/packages/sdk/wallets/wallet-ledger/package.json @@ -18,6 +18,7 @@ "clean": "yarn run --top-level tsc -b . --clean", "docs": "yarn run --top-level typedoc", "test": "yarn run --top-level jest --runInBand", + "test:physical_ledger": "USE_PHYSICAL_LEDGER=true yarn test", "lint": "yarn run --top-level eslint -c .eslintrc.js ", "prepublishOnly": "yarn build" }, @@ -31,12 +32,11 @@ "@ledgerhq/errors": "^5.50.0", "@ledgerhq/hw-app-eth": "~5.11.0", "@ledgerhq/hw-transport": "~5.11.0", - "debug": "^4.1.1", - "eth-lib": "^0.2.8", - "ethereum-cryptography": "1.2.0" + "debug": "^4.1.1" }, "devDependencies": { "@ledgerhq/hw-transport-node-hid": "^6.27.4", + "@noble/hashes": "^1.3.3", "web3": "1.10.4" }, "engines": { diff --git a/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts b/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts index 4ff801529..68e7ee532 100644 --- a/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts +++ b/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts @@ -7,6 +7,7 @@ import debugFactory from 'debug' import { transportErrorFriendlyMessage } from './ledger-utils' import { AddressValidation } from './ledger-wallet' import { compareLedgerAppVersions, tokenInfoByAddressAndChainId } from './tokens' +import { ILedger } from './types' const debug = debugFactory('kit:wallet:ledger') const CELO_APP_ACCEPTS_CONTRACT_DATA_FROM_VERSION = '1.0.2' @@ -15,14 +16,14 @@ const CELO_APP_ACCEPTS_CONTRACT_DATA_FROM_VERSION = '1.0.2' * Signs the EVM transaction with a Ledger device */ export class LedgerSigner implements Signer { - private ledger: any + private ledger: ILedger private derivationPath: string private validated: boolean = false private ledgerAddressValidation: AddressValidation private appConfiguration: { arbitraryDataEnabled: number; version: string } constructor( - ledger: any, + ledger: ILedger, derivationPath: string, ledgerAddressValidation: AddressValidation, appConfiguration: { arbitraryDataEnabled: number; version: string } = { @@ -57,9 +58,8 @@ export class LedgerSigner implements Signer { if (rv !== addToV && (rv & addToV) !== rv) { addToV += 1 // add signature v bit. } - signature.v = addToV.toString(10) return { - v: signature.v, + v: addToV, r: ethUtil.toBuffer(ensureLeading0x(signature.r)) as Buffer, s: ethUtil.toBuffer(ensureLeading0x(signature.s)) as Buffer, } @@ -86,9 +86,8 @@ export class LedgerSigner implements Signer { await this.getValidatedDerivationPath(), trimLeading0x(data) ) - return { - v: signature.v, + v: parseInt(signature.v, 10), r: ethUtil.toBuffer(ensureLeading0x(signature.r)) as Buffer, s: ethUtil.toBuffer(ensureLeading0x(signature.s)) as Buffer, } @@ -109,6 +108,7 @@ export class LedgerSigner implements Signer { typedData.types ) + // NOTE: this function doesn't exist on ledger 5.11 so it fails, probably never worked const sig = await this.ledger!.signEIP712HashedMessage( await this.getValidatedDerivationPath(), domainSeparator, @@ -116,7 +116,7 @@ export class LedgerSigner implements Signer { ) return { - v: parseInt(sig.v, 10), + v: parseInt(sig.v, 16), r: ethUtil.toBuffer(ensureLeading0x(sig.r)) as Buffer, s: ethUtil.toBuffer(ensureLeading0x(sig.s)) as Buffer, } diff --git a/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.test.ts b/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.test.ts index 4764ee164..4b822c9e1 100644 --- a/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.test.ts +++ b/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.test.ts @@ -4,25 +4,25 @@ import { normalizeAddressWith0x, trimLeading0x, } from '@celo/base/lib/address' -import { CeloTx, EncodedTransaction } from '@celo/connect' +import { CeloTx, EncodedTransaction, Hex } from '@celo/connect' import { privateKeyToAddress } from '@celo/utils/lib/address' import { verifySignature } from '@celo/utils/lib/signatureUtils' import { chainIdTransformationForSigning, getHashFromEncoded, recoverTransaction, + signTransaction, verifyEIP712TypedDataSigner, } from '@celo/wallet-base' import * as ethUtil from '@ethereumjs/util' import TransportNodeHid from '@ledgerhq/hw-transport-node-hid' -// @ts-ignore-next-line eth-lib types not found -import { account as Account } from 'eth-lib' -import { keccak256 } from 'ethereum-cryptography/keccak' +import { keccak_256 } from '@noble/hashes/sha3' import Web3 from 'web3' import { AddressValidation, LedgerWallet } from './ledger-wallet' +import { ILedger } from './types' // Update this variable when testing using a physical device -const USE_PHYSICAL_LEDGER = false +const USE_PHYSICAL_LEDGER = process.env.USE_PHYSICAL_LEDGER === 'true' // Increase timeout to give developer time to respond on device const TEST_TIMEOUT_IN_MS = USE_PHYSICAL_LEDGER ? 30 * 1000 : 1 * 1000 @@ -39,7 +39,7 @@ const ACCOUNT_ADDRESS5 = normalizeAddressWith0x(privateKeyToAddress(PRIVATE_KEY5 const PRIVATE_KEY_NEVER = '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890ffffff' const ACCOUNT_ADDRESS_NEVER = normalizeAddressWith0x(privateKeyToAddress(PRIVATE_KEY_NEVER)) -const ledgerAddresses: { [myKey: string]: { address: string; privateKey: string } } = { +const ledgerAddresses: { [myKey: string]: { address: Hex; privateKey: Hex } } = { "44'/52752'/0'/0/0": { address: ACCOUNT_ADDRESS1, privateKey: PRIVATE_KEY1, @@ -105,68 +105,76 @@ const TYPED_DATA = { } function mockLedger(wallet: LedgerWallet, mockForceValidation: () => void) { - jest.spyOn(wallet, 'generateNewLedger').mockImplementation((_transport: any) => { - return { - getAddress: async (derivationPath: string, forceValidation?: boolean) => { - if (forceValidation) { - mockForceValidation() - } - if (ledgerAddresses[derivationPath]) { - return { address: ledgerAddresses[derivationPath].address, derivationPath } - } - return {} - }, - signTransaction: async (derivationPath: string, data: string) => { - if (ledgerAddresses[derivationPath]) { - const hash = getHashFromEncoded(ensureLeading0x(data)) - const signature = Account.makeSigner(chainIdTransformationForSigning(CHAIN_ID))( - hash, - ledgerAddresses[derivationPath].privateKey + jest + .spyOn(wallet, 'generateNewLedger') + .mockImplementation((_transport: any): ILedger => { + return { + getAddress: async (derivationPath: string, forceValidation?: boolean) => { + if (forceValidation) { + mockForceValidation() + } + if (ledgerAddresses[derivationPath]) { + return { address: ledgerAddresses[derivationPath].address, derivationPath } + } + return {} + }, + signTransaction: async (derivationPath: string, data: string) => { + if (ledgerAddresses[derivationPath]) { + const { r, s, v } = signTransaction( + getHashFromEncoded(ensureLeading0x(data)), + ledgerAddresses[derivationPath].privateKey, + chainIdTransformationForSigning(CHAIN_ID) + ) + return { + v: v.toString(16), + r: r.toString('hex'), + s: s.toString('hex'), + } + } + throw new Error('Invalid Path') + }, + signPersonalMessage: async (derivationPath: string, data: string) => { + if (ledgerAddresses[derivationPath]) { + const dataBuff = ethUtil.toBuffer(ensureLeading0x(data)) + const msgHashBuff = ethUtil.hashPersonalMessage(dataBuff) + + const trimmedKey = trimLeading0x(ledgerAddresses[derivationPath].privateKey) + const pkBuffer = Buffer.from(trimmedKey, 'hex') + const signature = ethUtil.ecsign(msgHashBuff, pkBuffer) + return { + v: signature.v.toString(10), + r: signature.r.toString('hex'), + s: signature.s.toString('hex'), + } + } + throw new Error('Invalid Path') + }, + signEIP712HashedMessage: async ( + derivationPath: string, + domainSeparator: Buffer, + structHash: Buffer + ) => { + const messageHash = Buffer.from( + keccak_256(Buffer.concat([Buffer.from('1901', 'hex'), domainSeparator, structHash])) ) - const [v, r, s] = Account.decodeSignature(signature) - return { v, r, s } - } - throw new Error('Invalid Path') - }, - signPersonalMessage: async (derivationPath: string, data: string) => { - if (ledgerAddresses[derivationPath]) { - const dataBuff = ethUtil.toBuffer(ensureLeading0x(data)) - const msgHashBuff = ethUtil.hashPersonalMessage(dataBuff) const trimmedKey = trimLeading0x(ledgerAddresses[derivationPath].privateKey) const pkBuffer = Buffer.from(trimmedKey, 'hex') - const signature = ethUtil.ecsign(msgHashBuff, pkBuffer) + const signature = ethUtil.ecsign(messageHash, pkBuffer) return { - v: signature.v, + v: signature.v.toString(16), r: signature.r.toString('hex'), s: signature.s.toString('hex'), } - } - throw new Error('Invalid Path') - }, - signEIP712HashedMessage: async ( - derivationPath: string, - domainSeparator: Buffer, - structHash: Buffer - ) => { - const messageHash = keccak256( - Buffer.concat([Buffer.from('1901', 'hex'), domainSeparator, structHash]) - ) as Buffer - - const trimmedKey = trimLeading0x(ledgerAddresses[derivationPath].privateKey) - const pkBuffer = Buffer.from(trimmedKey, 'hex') - const signature = ethUtil.ecsign(messageHash, pkBuffer) - return { - v: signature.v, - r: signature.r.toString('hex'), - s: signature.s.toString('hex'), - } - }, - getAppConfiguration: async () => { - return { arbitraryDataEnabled: 1, version: '0.0.0' } - }, - } - }) + }, + getAppConfiguration: async () => { + return { arbitraryDataEnabled: 1, version: '0.0.0' } + }, + provideERC20TokenInformation: async (_token) => { + return {} + }, + } + }) } describe('LedgerWallet class', () => { diff --git a/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts b/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts index 0ac4d7aa5..15747cd34 100644 --- a/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts +++ b/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts @@ -7,6 +7,7 @@ import Ledger from '@ledgerhq/hw-app-eth' import debugFactory from 'debug' import { LedgerSigner } from './ledger-signer' import { transportErrorFriendlyMessage } from './ledger-utils' +import { ILedger } from './types' export const CELO_BASE_DERIVATION_PATH = `${CELO_DERIVATION_PATH_BASE.slice(2)}/0` const ADDRESS_QTY = 5 @@ -42,7 +43,7 @@ export async function newLedgerWalletWithSetup( const debug = debugFactory('kit:wallet:ledger') export class LedgerWallet extends RemoteWallet implements ReadOnlyWallet { - private ledger: any + private ledger: ILedger | undefined /** * @param derivationPathIndexes number array of "address_index" for the base derivation path. @@ -82,7 +83,7 @@ export class LedgerWallet extends RemoteWallet implements ReadOnly protected async loadAccountSigners(): Promise> { if (!this.ledger) { - this.ledger = this.generateNewLedger(this.transport) + this.ledger = this.generateNewLedger(this.transport) as ILedger } debug('Fetching addresses from the ledger') let addressToSigner = new Map() @@ -112,9 +113,9 @@ export class LedgerWallet extends RemoteWallet implements ReadOnly const derivationPath = `${this.baseDerivationPath}/${value}` const addressInfo = await this.ledger!.getAddress(derivationPath, validationRequired) addressToSigner.set( - addressInfo.address, + addressInfo.address!, new LedgerSigner( - this.ledger, + this.ledger!, derivationPath, this.ledgerAddressValidation, appConfiguration diff --git a/packages/sdk/wallets/wallet-ledger/src/types.d.ts b/packages/sdk/wallets/wallet-ledger/src/types.d.ts new file mode 100644 index 000000000..991902965 --- /dev/null +++ b/packages/sdk/wallets/wallet-ledger/src/types.d.ts @@ -0,0 +1,18 @@ +import { Hex } from '@celo/connect' + +type LedgerSignature = { v: string; r: string; s: string } +export interface ILedger { + getAddress( + derivationPath: string, + forceValidation?: boolean + ): Promise<{ address?: Hex; derivationPath?: string }> + signTransaction(derivationPath: string, data: string): Promise + signPersonalMessage(derivationPath: string, data: string): Promise + signEIP712HashedMessage( + derivationPath: string, + domainSeparator: Buffer, + structHash: Buffer + ): Promise + getAppConfiguration(): Promise<{ arbitraryDataEnabled: number; version: string }> + provideERC20TokenInformation(TokenInfo): Promise +} diff --git a/packages/sdk/wallets/wallet-local/package.json b/packages/sdk/wallets/wallet-local/package.json index 5974963b7..cb870ff85 100644 --- a/packages/sdk/wallets/wallet-local/package.json +++ b/packages/sdk/wallets/wallet-local/package.json @@ -25,8 +25,7 @@ "@celo/connect": "^5.3.0", "@celo/utils": "^6.0.1", "@celo/wallet-base": "^5.2.0", - "@ethereumjs/util": "8.0.5", - "eth-lib": "^0.2.8" + "@ethereumjs/util": "8.0.5" }, "devDependencies": { "viem": "~1.5.4", diff --git a/packages/sdk/wallets/wallet-local/src/local-signer.ts b/packages/sdk/wallets/wallet-local/src/local-signer.ts index 0f24c8241..5f2199f0a 100644 --- a/packages/sdk/wallets/wallet-local/src/local-signer.ts +++ b/packages/sdk/wallets/wallet-local/src/local-signer.ts @@ -1,21 +1,19 @@ -import { RLPEncodedTx, Signer } from '@celo/connect' +import { Hex, RLPEncodedTx, Signer } from '@celo/connect' import { ensureLeading0x, trimLeading0x } from '@celo/utils/lib/address' import { computeSharedSecret as computeECDHSecret } from '@celo/utils/lib/ecdh' import { Decrypt } from '@celo/utils/lib/ecies' import { EIP712TypedData, generateTypedDataHash } from '@celo/utils/lib/sign-typed-data-utils' -import { decodeSig, getHashFromEncoded } from '@celo/wallet-base' +import { getHashFromEncoded, signTransaction } from '@celo/wallet-base' import * as ethUtil from '@ethereumjs/util' -// @ts-ignore eth-lib types not found -import { account as Account } from 'eth-lib' /** * Signs the EVM transaction using the provided private key */ export class LocalSigner implements Signer { - private privateKey: string + private privateKey: Hex constructor(privateKey: string) { - this.privateKey = privateKey + this.privateKey = ensureLeading0x(privateKey) } getNativeKey(): string { @@ -26,9 +24,7 @@ export class LocalSigner implements Signer { addToV: number, encodedTx: RLPEncodedTx ): Promise<{ v: number; r: Buffer; s: Buffer }> { - const hash = getHashFromEncoded(encodedTx.rlpEncode) - const signature = Account.makeSigner(addToV)(hash, this.privateKey) - return decodeSig(signature) + return signTransaction(getHashFromEncoded(encodedTx.rlpEncode), this.privateKey, addToV) } async signPersonalMessage(data: string): Promise<{ v: number; r: Buffer; s: Buffer }> { @@ -61,9 +57,8 @@ export class LocalSigner implements Signer { } decrypt(ciphertext: Buffer) { - const decryptedPlaintext = Decrypt( - Buffer.from(trimLeading0x(this.privateKey), 'hex'), - ciphertext + const decryptedPlaintext = Buffer.from( + Decrypt(Buffer.from(trimLeading0x(this.privateKey), 'hex'), ciphertext) ) return Promise.resolve(decryptedPlaintext) } diff --git a/packages/sdk/wallets/wallet-remote/package.json b/packages/sdk/wallets/wallet-remote/package.json index a51130325..e203d2c7a 100644 --- a/packages/sdk/wallets/wallet-remote/package.json +++ b/packages/sdk/wallets/wallet-remote/package.json @@ -26,8 +26,7 @@ "@celo/utils": "^6.0.1", "@celo/wallet-base": "^5.2.0", "@ethereumjs/util": "8.0.5", - "@types/debug": "^4.1.5", - "eth-lib": "^0.2.8" + "@types/debug": "^4.1.5" }, "devDependencies": { "web3": "1.10.4" diff --git a/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts b/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts index 3fef77474..80178d981 100644 --- a/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts +++ b/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts @@ -1,5 +1,5 @@ import { ensureLeading0x, normalizeAddressWith0x, trimLeading0x } from '@celo/base/lib/address' -import { CeloTx, EncodedTransaction, RpcCaller, Signer } from '@celo/connect' +import { CeloTx, EncodedTransaction, Hex, RpcCaller, Signer } from '@celo/connect' import { EIP712TypedData } from '@celo/utils/lib/sign-typed-data-utils' import { decodeSig } from '@celo/wallet-base' import BigNumber from 'bignumber.js' @@ -109,7 +109,7 @@ export class RpcSigner implements Signer { typedData, ]) - return decodeSig(result) + return decodeSig(result as Hex) } async signPersonalMessage(data: string): Promise<{ v: number; r: Buffer; s: Buffer }> { @@ -117,7 +117,7 @@ export class RpcSigner implements Signer { this.account, data, ]) - return decodeSig(result) + return decodeSig(result as Hex) } getNativeKey = () => this.account diff --git a/yarn.lock b/yarn.lock index 7a07f686b..15033c8cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -122,576 +122,576 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-cloudfront@npm:^3.501.0": - version: 3.501.0 - resolution: "@aws-sdk/client-cloudfront@npm:3.501.0" +"@aws-sdk/client-cloudfront@npm:^3.468.0": + version: 3.490.0 + resolution: "@aws-sdk/client-cloudfront@npm:3.490.0" dependencies: "@aws-crypto/sha256-browser": "npm:3.0.0" "@aws-crypto/sha256-js": "npm:3.0.0" - "@aws-sdk/client-sts": "npm:3.501.0" - "@aws-sdk/core": "npm:3.496.0" - "@aws-sdk/credential-provider-node": "npm:3.501.0" - "@aws-sdk/middleware-host-header": "npm:3.496.0" - "@aws-sdk/middleware-logger": "npm:3.496.0" - "@aws-sdk/middleware-recursion-detection": "npm:3.496.0" - "@aws-sdk/middleware-signing": "npm:3.496.0" - "@aws-sdk/middleware-user-agent": "npm:3.496.0" - "@aws-sdk/region-config-resolver": "npm:3.496.0" - "@aws-sdk/types": "npm:3.496.0" - "@aws-sdk/util-endpoints": "npm:3.496.0" - "@aws-sdk/util-user-agent-browser": "npm:3.496.0" - "@aws-sdk/util-user-agent-node": "npm:3.496.0" - "@aws-sdk/xml-builder": "npm:3.496.0" - "@smithy/config-resolver": "npm:^2.1.1" - "@smithy/core": "npm:^1.3.1" - "@smithy/fetch-http-handler": "npm:^2.4.1" - "@smithy/hash-node": "npm:^2.1.1" - "@smithy/invalid-dependency": "npm:^2.1.1" - "@smithy/middleware-content-length": "npm:^2.1.1" - "@smithy/middleware-endpoint": "npm:^2.4.1" - "@smithy/middleware-retry": "npm:^2.1.1" - "@smithy/middleware-serde": "npm:^2.1.1" - "@smithy/middleware-stack": "npm:^2.1.1" - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/node-http-handler": "npm:^2.3.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/smithy-client": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/url-parser": "npm:^2.1.1" - "@smithy/util-base64": "npm:^2.1.1" - "@smithy/util-body-length-browser": "npm:^2.1.1" - "@smithy/util-body-length-node": "npm:^2.2.1" - "@smithy/util-defaults-mode-browser": "npm:^2.1.1" - "@smithy/util-defaults-mode-node": "npm:^2.1.1" - "@smithy/util-endpoints": "npm:^1.1.1" - "@smithy/util-retry": "npm:^2.1.1" - "@smithy/util-stream": "npm:^2.1.1" - "@smithy/util-utf8": "npm:^2.1.1" - "@smithy/util-waiter": "npm:^2.1.1" + "@aws-sdk/client-sts": "npm:3.490.0" + "@aws-sdk/core": "npm:3.490.0" + "@aws-sdk/credential-provider-node": "npm:3.490.0" + "@aws-sdk/middleware-host-header": "npm:3.489.0" + "@aws-sdk/middleware-logger": "npm:3.489.0" + "@aws-sdk/middleware-recursion-detection": "npm:3.489.0" + "@aws-sdk/middleware-signing": "npm:3.489.0" + "@aws-sdk/middleware-user-agent": "npm:3.489.0" + "@aws-sdk/region-config-resolver": "npm:3.489.0" + "@aws-sdk/types": "npm:3.489.0" + "@aws-sdk/util-endpoints": "npm:3.489.0" + "@aws-sdk/util-user-agent-browser": "npm:3.489.0" + "@aws-sdk/util-user-agent-node": "npm:3.489.0" + "@aws-sdk/xml-builder": "npm:3.485.0" + "@smithy/config-resolver": "npm:^2.0.23" + "@smithy/core": "npm:^1.2.2" + "@smithy/fetch-http-handler": "npm:^2.3.2" + "@smithy/hash-node": "npm:^2.0.18" + "@smithy/invalid-dependency": "npm:^2.0.16" + "@smithy/middleware-content-length": "npm:^2.0.18" + "@smithy/middleware-endpoint": "npm:^2.3.0" + "@smithy/middleware-retry": "npm:^2.0.26" + "@smithy/middleware-serde": "npm:^2.0.16" + "@smithy/middleware-stack": "npm:^2.0.10" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/node-http-handler": "npm:^2.2.2" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/smithy-client": "npm:^2.2.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/url-parser": "npm:^2.0.16" + "@smithy/util-base64": "npm:^2.0.1" + "@smithy/util-body-length-browser": "npm:^2.0.1" + "@smithy/util-body-length-node": "npm:^2.1.0" + "@smithy/util-defaults-mode-browser": "npm:^2.0.24" + "@smithy/util-defaults-mode-node": "npm:^2.0.32" + "@smithy/util-endpoints": "npm:^1.0.8" + "@smithy/util-retry": "npm:^2.0.9" + "@smithy/util-stream": "npm:^2.0.24" + "@smithy/util-utf8": "npm:^2.0.2" + "@smithy/util-waiter": "npm:^2.0.16" fast-xml-parser: "npm:4.2.5" tslib: "npm:^2.5.0" - checksum: 5749aff693630e265433867d8320a4abf53a99b0da5d7628a08a0fc7eb84c467f63d3efe5ab72003de13f471ee304af91cf8907a6b95e54d089c7ff00a755f24 + checksum: 47cbfdbdb4d54f9ab6dc11749000f2fd727eeb9cc354dbe607ded40e3b92f74f041c399eaecacbd46c9e24a6553030e0233b4e41e1a361ee9a20efb1972d4639 languageName: node linkType: hard -"@aws-sdk/client-s3@npm:^3.496.0": - version: 3.501.0 - resolution: "@aws-sdk/client-s3@npm:3.501.0" +"@aws-sdk/client-s3@npm:^3.490.0": + version: 3.490.0 + resolution: "@aws-sdk/client-s3@npm:3.490.0" dependencies: "@aws-crypto/sha1-browser": "npm:3.0.0" "@aws-crypto/sha256-browser": "npm:3.0.0" "@aws-crypto/sha256-js": "npm:3.0.0" - "@aws-sdk/client-sts": "npm:3.501.0" - "@aws-sdk/core": "npm:3.496.0" - "@aws-sdk/credential-provider-node": "npm:3.501.0" - "@aws-sdk/middleware-bucket-endpoint": "npm:3.496.0" - "@aws-sdk/middleware-expect-continue": "npm:3.496.0" - "@aws-sdk/middleware-flexible-checksums": "npm:3.496.0" - "@aws-sdk/middleware-host-header": "npm:3.496.0" - "@aws-sdk/middleware-location-constraint": "npm:3.496.0" - "@aws-sdk/middleware-logger": "npm:3.496.0" - "@aws-sdk/middleware-recursion-detection": "npm:3.496.0" - "@aws-sdk/middleware-sdk-s3": "npm:3.499.0" - "@aws-sdk/middleware-signing": "npm:3.496.0" - "@aws-sdk/middleware-ssec": "npm:3.498.0" - "@aws-sdk/middleware-user-agent": "npm:3.496.0" - "@aws-sdk/region-config-resolver": "npm:3.496.0" - "@aws-sdk/signature-v4-multi-region": "npm:3.499.0" - "@aws-sdk/types": "npm:3.496.0" - "@aws-sdk/util-endpoints": "npm:3.496.0" - "@aws-sdk/util-user-agent-browser": "npm:3.496.0" - "@aws-sdk/util-user-agent-node": "npm:3.496.0" - "@aws-sdk/xml-builder": "npm:3.496.0" - "@smithy/config-resolver": "npm:^2.1.1" - "@smithy/core": "npm:^1.3.1" - "@smithy/eventstream-serde-browser": "npm:^2.1.1" - "@smithy/eventstream-serde-config-resolver": "npm:^2.1.1" - "@smithy/eventstream-serde-node": "npm:^2.1.1" - "@smithy/fetch-http-handler": "npm:^2.4.1" - "@smithy/hash-blob-browser": "npm:^2.1.1" - "@smithy/hash-node": "npm:^2.1.1" - "@smithy/hash-stream-node": "npm:^2.1.1" - "@smithy/invalid-dependency": "npm:^2.1.1" - "@smithy/md5-js": "npm:^2.1.1" - "@smithy/middleware-content-length": "npm:^2.1.1" - "@smithy/middleware-endpoint": "npm:^2.4.1" - "@smithy/middleware-retry": "npm:^2.1.1" - "@smithy/middleware-serde": "npm:^2.1.1" - "@smithy/middleware-stack": "npm:^2.1.1" - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/node-http-handler": "npm:^2.3.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/smithy-client": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/url-parser": "npm:^2.1.1" - "@smithy/util-base64": "npm:^2.1.1" - "@smithy/util-body-length-browser": "npm:^2.1.1" - "@smithy/util-body-length-node": "npm:^2.2.1" - "@smithy/util-defaults-mode-browser": "npm:^2.1.1" - "@smithy/util-defaults-mode-node": "npm:^2.1.1" - "@smithy/util-endpoints": "npm:^1.1.1" - "@smithy/util-retry": "npm:^2.1.1" - "@smithy/util-stream": "npm:^2.1.1" - "@smithy/util-utf8": "npm:^2.1.1" - "@smithy/util-waiter": "npm:^2.1.1" + "@aws-sdk/client-sts": "npm:3.490.0" + "@aws-sdk/core": "npm:3.490.0" + "@aws-sdk/credential-provider-node": "npm:3.490.0" + "@aws-sdk/middleware-bucket-endpoint": "npm:3.489.0" + "@aws-sdk/middleware-expect-continue": "npm:3.489.0" + "@aws-sdk/middleware-flexible-checksums": "npm:3.489.0" + "@aws-sdk/middleware-host-header": "npm:3.489.0" + "@aws-sdk/middleware-location-constraint": "npm:3.489.0" + "@aws-sdk/middleware-logger": "npm:3.489.0" + "@aws-sdk/middleware-recursion-detection": "npm:3.489.0" + "@aws-sdk/middleware-sdk-s3": "npm:3.489.0" + "@aws-sdk/middleware-signing": "npm:3.489.0" + "@aws-sdk/middleware-ssec": "npm:3.489.0" + "@aws-sdk/middleware-user-agent": "npm:3.489.0" + "@aws-sdk/region-config-resolver": "npm:3.489.0" + "@aws-sdk/signature-v4-multi-region": "npm:3.489.0" + "@aws-sdk/types": "npm:3.489.0" + "@aws-sdk/util-endpoints": "npm:3.489.0" + "@aws-sdk/util-user-agent-browser": "npm:3.489.0" + "@aws-sdk/util-user-agent-node": "npm:3.489.0" + "@aws-sdk/xml-builder": "npm:3.485.0" + "@smithy/config-resolver": "npm:^2.0.23" + "@smithy/core": "npm:^1.2.2" + "@smithy/eventstream-serde-browser": "npm:^2.0.16" + "@smithy/eventstream-serde-config-resolver": "npm:^2.0.16" + "@smithy/eventstream-serde-node": "npm:^2.0.16" + "@smithy/fetch-http-handler": "npm:^2.3.2" + "@smithy/hash-blob-browser": "npm:^2.0.17" + "@smithy/hash-node": "npm:^2.0.18" + "@smithy/hash-stream-node": "npm:^2.0.18" + "@smithy/invalid-dependency": "npm:^2.0.16" + "@smithy/md5-js": "npm:^2.0.18" + "@smithy/middleware-content-length": "npm:^2.0.18" + "@smithy/middleware-endpoint": "npm:^2.3.0" + "@smithy/middleware-retry": "npm:^2.0.26" + "@smithy/middleware-serde": "npm:^2.0.16" + "@smithy/middleware-stack": "npm:^2.0.10" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/node-http-handler": "npm:^2.2.2" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/smithy-client": "npm:^2.2.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/url-parser": "npm:^2.0.16" + "@smithy/util-base64": "npm:^2.0.1" + "@smithy/util-body-length-browser": "npm:^2.0.1" + "@smithy/util-body-length-node": "npm:^2.1.0" + "@smithy/util-defaults-mode-browser": "npm:^2.0.24" + "@smithy/util-defaults-mode-node": "npm:^2.0.32" + "@smithy/util-endpoints": "npm:^1.0.8" + "@smithy/util-retry": "npm:^2.0.9" + "@smithy/util-stream": "npm:^2.0.24" + "@smithy/util-utf8": "npm:^2.0.2" + "@smithy/util-waiter": "npm:^2.0.16" fast-xml-parser: "npm:4.2.5" tslib: "npm:^2.5.0" - checksum: d8a174716d90c46ed193ceaefee8a7c3049e5488ff0495265184243c01931bb6159bec97f37da7cd34e56d62029f5cb527b718e0098387033398c4de8cdeb4cf + checksum: 1829e8178fd5c269d018086031f6c11b4e28d339b8eb7f12c0a974b02eb282fbea64510dfca0cac7682b488f5514b81316367c6e83ed89ae465572ac95a07f0b languageName: node linkType: hard -"@aws-sdk/client-sso@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/client-sso@npm:3.496.0" +"@aws-sdk/client-sso@npm:3.490.0": + version: 3.490.0 + resolution: "@aws-sdk/client-sso@npm:3.490.0" dependencies: "@aws-crypto/sha256-browser": "npm:3.0.0" "@aws-crypto/sha256-js": "npm:3.0.0" - "@aws-sdk/core": "npm:3.496.0" - "@aws-sdk/middleware-host-header": "npm:3.496.0" - "@aws-sdk/middleware-logger": "npm:3.496.0" - "@aws-sdk/middleware-recursion-detection": "npm:3.496.0" - "@aws-sdk/middleware-user-agent": "npm:3.496.0" - "@aws-sdk/region-config-resolver": "npm:3.496.0" - "@aws-sdk/types": "npm:3.496.0" - "@aws-sdk/util-endpoints": "npm:3.496.0" - "@aws-sdk/util-user-agent-browser": "npm:3.496.0" - "@aws-sdk/util-user-agent-node": "npm:3.496.0" - "@smithy/config-resolver": "npm:^2.1.1" - "@smithy/core": "npm:^1.3.1" - "@smithy/fetch-http-handler": "npm:^2.4.1" - "@smithy/hash-node": "npm:^2.1.1" - "@smithy/invalid-dependency": "npm:^2.1.1" - "@smithy/middleware-content-length": "npm:^2.1.1" - "@smithy/middleware-endpoint": "npm:^2.4.1" - "@smithy/middleware-retry": "npm:^2.1.1" - "@smithy/middleware-serde": "npm:^2.1.1" - "@smithy/middleware-stack": "npm:^2.1.1" - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/node-http-handler": "npm:^2.3.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/smithy-client": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/url-parser": "npm:^2.1.1" - "@smithy/util-base64": "npm:^2.1.1" - "@smithy/util-body-length-browser": "npm:^2.1.1" - "@smithy/util-body-length-node": "npm:^2.2.1" - "@smithy/util-defaults-mode-browser": "npm:^2.1.1" - "@smithy/util-defaults-mode-node": "npm:^2.1.1" - "@smithy/util-endpoints": "npm:^1.1.1" - "@smithy/util-retry": "npm:^2.1.1" - "@smithy/util-utf8": "npm:^2.1.1" + "@aws-sdk/core": "npm:3.490.0" + "@aws-sdk/middleware-host-header": "npm:3.489.0" + "@aws-sdk/middleware-logger": "npm:3.489.0" + "@aws-sdk/middleware-recursion-detection": "npm:3.489.0" + "@aws-sdk/middleware-user-agent": "npm:3.489.0" + "@aws-sdk/region-config-resolver": "npm:3.489.0" + "@aws-sdk/types": "npm:3.489.0" + "@aws-sdk/util-endpoints": "npm:3.489.0" + "@aws-sdk/util-user-agent-browser": "npm:3.489.0" + "@aws-sdk/util-user-agent-node": "npm:3.489.0" + "@smithy/config-resolver": "npm:^2.0.23" + "@smithy/core": "npm:^1.2.2" + "@smithy/fetch-http-handler": "npm:^2.3.2" + "@smithy/hash-node": "npm:^2.0.18" + "@smithy/invalid-dependency": "npm:^2.0.16" + "@smithy/middleware-content-length": "npm:^2.0.18" + "@smithy/middleware-endpoint": "npm:^2.3.0" + "@smithy/middleware-retry": "npm:^2.0.26" + "@smithy/middleware-serde": "npm:^2.0.16" + "@smithy/middleware-stack": "npm:^2.0.10" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/node-http-handler": "npm:^2.2.2" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/smithy-client": "npm:^2.2.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/url-parser": "npm:^2.0.16" + "@smithy/util-base64": "npm:^2.0.1" + "@smithy/util-body-length-browser": "npm:^2.0.1" + "@smithy/util-body-length-node": "npm:^2.1.0" + "@smithy/util-defaults-mode-browser": "npm:^2.0.24" + "@smithy/util-defaults-mode-node": "npm:^2.0.32" + "@smithy/util-endpoints": "npm:^1.0.8" + "@smithy/util-retry": "npm:^2.0.9" + "@smithy/util-utf8": "npm:^2.0.2" tslib: "npm:^2.5.0" - checksum: 4544cca0dd1f5bf4cfbc82c4fdf5416a5472f8ed99b93ad57cc10e78e49294a797bc02fec5850ca91cd280e81e499c9e6cec10ecf6ba94844caa2eb06257ebda + checksum: 785147e3c255897345ac5b06daacdefd6f53952bef74d22b8a48906d5e320481eb2f52235db5364e194b3632360056b3a37124974398abcd7374f21ce9fea3a9 languageName: node linkType: hard -"@aws-sdk/client-sts@npm:3.501.0": - version: 3.501.0 - resolution: "@aws-sdk/client-sts@npm:3.501.0" +"@aws-sdk/client-sts@npm:3.490.0": + version: 3.490.0 + resolution: "@aws-sdk/client-sts@npm:3.490.0" dependencies: "@aws-crypto/sha256-browser": "npm:3.0.0" "@aws-crypto/sha256-js": "npm:3.0.0" - "@aws-sdk/core": "npm:3.496.0" - "@aws-sdk/credential-provider-node": "npm:3.501.0" - "@aws-sdk/middleware-host-header": "npm:3.496.0" - "@aws-sdk/middleware-logger": "npm:3.496.0" - "@aws-sdk/middleware-recursion-detection": "npm:3.496.0" - "@aws-sdk/middleware-user-agent": "npm:3.496.0" - "@aws-sdk/region-config-resolver": "npm:3.496.0" - "@aws-sdk/types": "npm:3.496.0" - "@aws-sdk/util-endpoints": "npm:3.496.0" - "@aws-sdk/util-user-agent-browser": "npm:3.496.0" - "@aws-sdk/util-user-agent-node": "npm:3.496.0" - "@smithy/config-resolver": "npm:^2.1.1" - "@smithy/core": "npm:^1.3.1" - "@smithy/fetch-http-handler": "npm:^2.4.1" - "@smithy/hash-node": "npm:^2.1.1" - "@smithy/invalid-dependency": "npm:^2.1.1" - "@smithy/middleware-content-length": "npm:^2.1.1" - "@smithy/middleware-endpoint": "npm:^2.4.1" - "@smithy/middleware-retry": "npm:^2.1.1" - "@smithy/middleware-serde": "npm:^2.1.1" - "@smithy/middleware-stack": "npm:^2.1.1" - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/node-http-handler": "npm:^2.3.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/smithy-client": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/url-parser": "npm:^2.1.1" - "@smithy/util-base64": "npm:^2.1.1" - "@smithy/util-body-length-browser": "npm:^2.1.1" - "@smithy/util-body-length-node": "npm:^2.2.1" - "@smithy/util-defaults-mode-browser": "npm:^2.1.1" - "@smithy/util-defaults-mode-node": "npm:^2.1.1" - "@smithy/util-endpoints": "npm:^1.1.1" - "@smithy/util-middleware": "npm:^2.1.1" - "@smithy/util-retry": "npm:^2.1.1" - "@smithy/util-utf8": "npm:^2.1.1" + "@aws-sdk/core": "npm:3.490.0" + "@aws-sdk/credential-provider-node": "npm:3.490.0" + "@aws-sdk/middleware-host-header": "npm:3.489.0" + "@aws-sdk/middleware-logger": "npm:3.489.0" + "@aws-sdk/middleware-recursion-detection": "npm:3.489.0" + "@aws-sdk/middleware-user-agent": "npm:3.489.0" + "@aws-sdk/region-config-resolver": "npm:3.489.0" + "@aws-sdk/types": "npm:3.489.0" + "@aws-sdk/util-endpoints": "npm:3.489.0" + "@aws-sdk/util-user-agent-browser": "npm:3.489.0" + "@aws-sdk/util-user-agent-node": "npm:3.489.0" + "@smithy/config-resolver": "npm:^2.0.23" + "@smithy/core": "npm:^1.2.2" + "@smithy/fetch-http-handler": "npm:^2.3.2" + "@smithy/hash-node": "npm:^2.0.18" + "@smithy/invalid-dependency": "npm:^2.0.16" + "@smithy/middleware-content-length": "npm:^2.0.18" + "@smithy/middleware-endpoint": "npm:^2.3.0" + "@smithy/middleware-retry": "npm:^2.0.26" + "@smithy/middleware-serde": "npm:^2.0.16" + "@smithy/middleware-stack": "npm:^2.0.10" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/node-http-handler": "npm:^2.2.2" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/smithy-client": "npm:^2.2.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/url-parser": "npm:^2.0.16" + "@smithy/util-base64": "npm:^2.0.1" + "@smithy/util-body-length-browser": "npm:^2.0.1" + "@smithy/util-body-length-node": "npm:^2.1.0" + "@smithy/util-defaults-mode-browser": "npm:^2.0.24" + "@smithy/util-defaults-mode-node": "npm:^2.0.32" + "@smithy/util-endpoints": "npm:^1.0.8" + "@smithy/util-middleware": "npm:^2.0.9" + "@smithy/util-retry": "npm:^2.0.9" + "@smithy/util-utf8": "npm:^2.0.2" fast-xml-parser: "npm:4.2.5" tslib: "npm:^2.5.0" - checksum: 3e9078d836a01ef401fbd25d91df6c0d5752c0a74225ff560f01cda6b205df32ed67a37b87c23e3152485b4c9877b8c3e8508763887b7feedb01411cc0c3ba6b + checksum: 19d1b98694d600cac8a5518a2c05ab8d008c8eaaa25253397462d3d70e1a7c2ae7ab792b6814312536e0a2d140690d38ba166c1c28e82dd02daaa1173675f75c languageName: node linkType: hard -"@aws-sdk/core@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/core@npm:3.496.0" +"@aws-sdk/core@npm:3.490.0": + version: 3.490.0 + resolution: "@aws-sdk/core@npm:3.490.0" dependencies: - "@smithy/core": "npm:^1.3.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/signature-v4": "npm:^2.1.1" - "@smithy/smithy-client": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/core": "npm:^1.2.2" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/signature-v4": "npm:^2.0.0" + "@smithy/smithy-client": "npm:^2.2.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 177d31f2f72d0c4ba184949d08aa6229307fd6fac9c404b442364381aa9d5a2fd955b01b9ccfe152e96741648232008d1ded75ca79b7cefbc051bda3ed1187ad + checksum: 3e81f378253be05efda42bd4c8d6d3a4969826f42ed48b904d760a4450f8affefe4f9c389bbdd975949831b0569e522db16d0bdfd829e9a6ddf98f08bc593f38 languageName: node linkType: hard -"@aws-sdk/credential-provider-env@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/credential-provider-env@npm:3.496.0" +"@aws-sdk/credential-provider-env@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/credential-provider-env@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/property-provider": "npm:^2.0.0" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 8b32ff1d3c1f4b40cba3d6d9047bde936bf57669ca37a50f3d6cc26b2736dd8498f8c0010927a3b6de64b4646201ef841760ce51acfaff87838a489365a37619 + checksum: 95ab96ee49a3ebf7957feb97987c2863c280c0daa67dcb5168874b8da3d807909e6b494405d5e42c33871a474db8f252ccd0d5eb2af55430a03d023eb9525c5c languageName: node linkType: hard -"@aws-sdk/credential-provider-ini@npm:3.501.0": - version: 3.501.0 - resolution: "@aws-sdk/credential-provider-ini@npm:3.501.0" +"@aws-sdk/credential-provider-ini@npm:3.490.0": + version: 3.490.0 + resolution: "@aws-sdk/credential-provider-ini@npm:3.490.0" dependencies: - "@aws-sdk/credential-provider-env": "npm:3.496.0" - "@aws-sdk/credential-provider-process": "npm:3.496.0" - "@aws-sdk/credential-provider-sso": "npm:3.501.0" - "@aws-sdk/credential-provider-web-identity": "npm:3.496.0" - "@aws-sdk/types": "npm:3.496.0" - "@smithy/credential-provider-imds": "npm:^2.2.1" - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/shared-ini-file-loader": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/credential-provider-env": "npm:3.489.0" + "@aws-sdk/credential-provider-process": "npm:3.489.0" + "@aws-sdk/credential-provider-sso": "npm:3.490.0" + "@aws-sdk/credential-provider-web-identity": "npm:3.489.0" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/credential-provider-imds": "npm:^2.0.0" + "@smithy/property-provider": "npm:^2.0.0" + "@smithy/shared-ini-file-loader": "npm:^2.0.6" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 85c603423076f55b8c9d9f3949e449f048a0bf3d89e86d6e1e5378c32fb398744dce19746fa4f339ec279ac0b0e78efe1edc4985759cd36d70a1b731a407bbf4 + checksum: 4e4cd2633a4ea64e88b353bf85e9efc569704d6be5eb48845cb5bfe378706fe0f942d62c958acabf050d6778576b69bcce9dffd74a75ef75c5b5e76b972c3998 languageName: node linkType: hard -"@aws-sdk/credential-provider-node@npm:3.501.0": - version: 3.501.0 - resolution: "@aws-sdk/credential-provider-node@npm:3.501.0" +"@aws-sdk/credential-provider-node@npm:3.490.0": + version: 3.490.0 + resolution: "@aws-sdk/credential-provider-node@npm:3.490.0" dependencies: - "@aws-sdk/credential-provider-env": "npm:3.496.0" - "@aws-sdk/credential-provider-ini": "npm:3.501.0" - "@aws-sdk/credential-provider-process": "npm:3.496.0" - "@aws-sdk/credential-provider-sso": "npm:3.501.0" - "@aws-sdk/credential-provider-web-identity": "npm:3.496.0" - "@aws-sdk/types": "npm:3.496.0" - "@smithy/credential-provider-imds": "npm:^2.2.1" - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/shared-ini-file-loader": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/credential-provider-env": "npm:3.489.0" + "@aws-sdk/credential-provider-ini": "npm:3.490.0" + "@aws-sdk/credential-provider-process": "npm:3.489.0" + "@aws-sdk/credential-provider-sso": "npm:3.490.0" + "@aws-sdk/credential-provider-web-identity": "npm:3.489.0" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/credential-provider-imds": "npm:^2.0.0" + "@smithy/property-provider": "npm:^2.0.0" + "@smithy/shared-ini-file-loader": "npm:^2.0.6" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 24921bc124a1eb6fe873bf17ff69ad30b67eeb1276a5ee146f9631e44372857973419d64b998683687e15e71be8014ad5fa0c9324c452b9c8871e42858538b05 + checksum: 2f8141c3e17935d418e10b5b2df8eba4090dee40e53855bc5ddc5357ef80ef769df2e157002ebbce014946dcc1553200c2bd962f36602fe85e788423652d7e46 languageName: node linkType: hard -"@aws-sdk/credential-provider-process@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/credential-provider-process@npm:3.496.0" +"@aws-sdk/credential-provider-process@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/credential-provider-process@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/shared-ini-file-loader": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/property-provider": "npm:^2.0.0" + "@smithy/shared-ini-file-loader": "npm:^2.0.6" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 94e1816fe2e8c9dbb7a5ca694178bd6e139363248543941fac45566a9031153481ff2b6d2336ad6219451240181003973e06beca2da9a4021d688bbcc237b8ed + checksum: 42f4f5f21de3d29425ac32770707d908b613e7bfc4018ccfa1321a0d1f263364d4df6500268a2c7067b36aba7b1245481a3cd1db0bad7fc5f92a39616997b847 languageName: node linkType: hard -"@aws-sdk/credential-provider-sso@npm:3.501.0": - version: 3.501.0 - resolution: "@aws-sdk/credential-provider-sso@npm:3.501.0" +"@aws-sdk/credential-provider-sso@npm:3.490.0": + version: 3.490.0 + resolution: "@aws-sdk/credential-provider-sso@npm:3.490.0" dependencies: - "@aws-sdk/client-sso": "npm:3.496.0" - "@aws-sdk/token-providers": "npm:3.501.0" - "@aws-sdk/types": "npm:3.496.0" - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/shared-ini-file-loader": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/client-sso": "npm:3.490.0" + "@aws-sdk/token-providers": "npm:3.489.0" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/property-provider": "npm:^2.0.0" + "@smithy/shared-ini-file-loader": "npm:^2.0.6" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: b135dc73843cf52d4b637dff119f1dd9455e593698101b968f12280bcb26ff354cfb799550c297504be90ff670751c7aa32c02a01c48c5881cd4af8a1964b78e + checksum: ef2eff8fbc6f3e7a4cd5dfd3eeb88d4ce4a3841813bd405a7f52ce650795a5bcf24363632aaa6fb7a88e980fdf4684c899bd74f83323a2f9c9b6d550746e7ef3 languageName: node linkType: hard -"@aws-sdk/credential-provider-web-identity@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/credential-provider-web-identity@npm:3.496.0" +"@aws-sdk/credential-provider-web-identity@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/credential-provider-web-identity@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/property-provider": "npm:^2.0.0" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: a43c0bf19de371d602669188ce357fe0fd0def52396152ecc1067a4ae08e15822697f96630619052ae7cf96777a800a9d16fa9f63f645d07d10dc13492141c34 + checksum: 911bc3fd2830167218083a42743360e91a04fe06bfe25a6108d7be94a851848ec9563cf7287c504011c3d88307d80f3340c657271ecf356995f1b6e369040cc6 languageName: node linkType: hard -"@aws-sdk/middleware-bucket-endpoint@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/middleware-bucket-endpoint@npm:3.496.0" +"@aws-sdk/middleware-bucket-endpoint@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/middleware-bucket-endpoint@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@aws-sdk/util-arn-parser": "npm:3.495.0" - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-config-provider": "npm:^2.2.1" + "@aws-sdk/types": "npm:3.489.0" + "@aws-sdk/util-arn-parser": "npm:3.465.0" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-config-provider": "npm:^2.1.0" tslib: "npm:^2.5.0" - checksum: 00b4facd3e350519a249fa619b21f182ca76a0dd076078da61999790f6994ea898c887f96556516c9d4fee4c5731a04abc9173b3e49e368f7eea3cb08ee781dd + checksum: 06a3c32eebd74774264eb086eaaa90914caa37f1d136f8ea0cdcbe81ffecd37e444a124101843e8595184757582077fcc78aba293be6871a3e2ae79ed40255f0 languageName: node linkType: hard -"@aws-sdk/middleware-expect-continue@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/middleware-expect-continue@npm:3.496.0" +"@aws-sdk/middleware-expect-continue@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/middleware-expect-continue@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 3fe6a8e132747cca354369d00a2ca8f07206f751726fa713dcd011163dfb9c4451def68ddc72fa19ead6ab34974ce9f8d103655963262f243a0aef4210a06edd + checksum: 9df967db833614b90615a40a318043ea457d3b7211cc8a4f23c8a38766bc76966b26957b9acc1db787c0f10df86f7291c96a07ac255a147d50a7b55de4695a87 languageName: node linkType: hard -"@aws-sdk/middleware-flexible-checksums@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/middleware-flexible-checksums@npm:3.496.0" +"@aws-sdk/middleware-flexible-checksums@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/middleware-flexible-checksums@npm:3.489.0" dependencies: "@aws-crypto/crc32": "npm:3.0.0" "@aws-crypto/crc32c": "npm:3.0.0" - "@aws-sdk/types": "npm:3.496.0" - "@smithy/is-array-buffer": "npm:^2.1.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-utf8": "npm:^2.1.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/is-array-buffer": "npm:^2.0.0" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-utf8": "npm:^2.0.2" tslib: "npm:^2.5.0" - checksum: 7a15e90b29febccbcfb5d90e49258bf7b4857511a41f1c60041c9df11b862d25b1b5c7089d0f88fe281041350400bfc8ce49c6e3b1d4669dbda357abc804944c + checksum: e4289a142603a0d96c51c1d0c107f25217d01066d864f218c11766b35aa765f31672414753b83dd2ae33c5e280177719cd0dfc5ddc7968e04ff1a13976371aee languageName: node linkType: hard -"@aws-sdk/middleware-host-header@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/middleware-host-header@npm:3.496.0" +"@aws-sdk/middleware-host-header@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/middleware-host-header@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 148547d93094a2c175d15c23436b4585bfc4676224be45c631e55cd045737277f9bb1079ad5060163a47d8b52a11b87a81fde58aac132a4ea091a58c45b31e2a + checksum: 3f80f716911369f27be55b553e6be74f006039b8ae4888440ccb503c74e9b9dfcf49c98a0582e3f9c84e89de7dad4199fb054c27e56c24c33238c2ad13e46433 languageName: node linkType: hard -"@aws-sdk/middleware-location-constraint@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/middleware-location-constraint@npm:3.496.0" +"@aws-sdk/middleware-location-constraint@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/middleware-location-constraint@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: f293604f9aff7bc1a72a1dc5704ce1f66f54da2530ae6855776189ecc57f2f0507eb0eb7306875cdcb1a7fdcd817d0894a228d48f4a6c56f83529ae5567cefba + checksum: 2609d38fed15fbce6612ba7d0d8b0e834e9d2ba336c208760941d036e7b24af1169164c0bea562321c7a12656e6f2fc1d54e05984ba4e2e0413163f2b093c3cc languageName: node linkType: hard -"@aws-sdk/middleware-logger@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/middleware-logger@npm:3.496.0" +"@aws-sdk/middleware-logger@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/middleware-logger@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 1a1845b6452716e9d4bde8fae3896acfaeec6c5a6902f415ed79141346ffa23d423aa4e2940f1c8d138e14e666d93158d3640ee4f4fb5a2485e5644147d07245 + checksum: 0bbf9d08c70cf1d87c67b3aed49ce1e0252b3c654a4e878648a56d05c59a4b5c23485acb6d9804cdfa9add9f88dcaefba249128d405a165ecf6a141e0217974f languageName: node linkType: hard -"@aws-sdk/middleware-recursion-detection@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/middleware-recursion-detection@npm:3.496.0" +"@aws-sdk/middleware-recursion-detection@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/middleware-recursion-detection@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: cfc97c7084a4aa3f0da7fb58cc2eb41d4fb35ad7f9b485b359c5e21b427203ed237af66bbd3a5de9040b7a32ba17a8ec92be3c12e25672f1019bfa28895cb253 + checksum: 91eb0b3b466478b27fd7f3e7f09a9596fe91fb50f1101ff2ed5b2d28e59e810797336a19917a5e9bd61ddf0aa52d210ff4273582bfc779910eece8a7ea0a8461 languageName: node linkType: hard -"@aws-sdk/middleware-sdk-s3@npm:3.499.0": - version: 3.499.0 - resolution: "@aws-sdk/middleware-sdk-s3@npm:3.499.0" - dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@aws-sdk/util-arn-parser": "npm:3.495.0" - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/signature-v4": "npm:^2.1.1" - "@smithy/smithy-client": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-config-provider": "npm:^2.2.1" +"@aws-sdk/middleware-sdk-s3@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/middleware-sdk-s3@npm:3.489.0" + dependencies: + "@aws-sdk/types": "npm:3.489.0" + "@aws-sdk/util-arn-parser": "npm:3.465.0" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/signature-v4": "npm:^2.0.0" + "@smithy/smithy-client": "npm:^2.2.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-config-provider": "npm:^2.1.0" tslib: "npm:^2.5.0" - checksum: fccfd29e224aa58ce8719eba1054ffbfb03756fb08de561456a035f3c31d4f3915652b55743fd513a989a4f8934cd3e7a29951f3ed480e82a0ef3e97ac97020c + checksum: 72731d234ad47aabbd1dbd70ac367fcd9484524ef9c26b2e5d2f446670a3614a1414cc28cf2c4024bb048f3381d50fb37ce4fb190c71e6ada9a4f99caa51cf1e languageName: node linkType: hard -"@aws-sdk/middleware-signing@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/middleware-signing@npm:3.496.0" +"@aws-sdk/middleware-signing@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/middleware-signing@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/signature-v4": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-middleware": "npm:^2.1.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/property-provider": "npm:^2.0.0" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/signature-v4": "npm:^2.0.0" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-middleware": "npm:^2.0.9" tslib: "npm:^2.5.0" - checksum: ddba07855b98d25bd93a57859fc8c03e8ab6048c53f942751accdc8d71ccf5c676e82bcf3de5e890665951aff90fc981a72a22b0f095a573563cc5f52b6824c4 + checksum: 6fedba456932f5a80c1604a841c08c74de9a091db389f6561f0f475630c643e309e3ede5bb4c96002a7fc17ac30eb9b6a8dd12989235e50aefd316ab282975a1 languageName: node linkType: hard -"@aws-sdk/middleware-ssec@npm:3.498.0": - version: 3.498.0 - resolution: "@aws-sdk/middleware-ssec@npm:3.498.0" +"@aws-sdk/middleware-ssec@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/middleware-ssec@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 22c53fe93ca49843eb2ade5e55b8e5b10254227604a60b1637c46e553a0fa1acedf6b7d332397b7ff2675c8754284592b25744105155fad5803fcad105556888 + checksum: e59d0153db00301a2843f8c029ade88ff81408f02625e4ad129b31f7f0c600c31c9430277b1a2f7b68e41db0524a82c2c8059883e91c078d5fc2aa938baad7f7 languageName: node linkType: hard -"@aws-sdk/middleware-user-agent@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/middleware-user-agent@npm:3.496.0" +"@aws-sdk/middleware-user-agent@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/middleware-user-agent@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@aws-sdk/util-endpoints": "npm:3.496.0" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@aws-sdk/util-endpoints": "npm:3.489.0" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 4863d3f7678ecc936f5baf82c3bb9ece94b72fa20bdc0a1aab0c55afd843f3f02730c0c7cbec5e4b60661fb5e6db058d71e1dc2851d51b4f8011d2ee0df50e80 + checksum: 51fc7a8a03db40ccef888725c4893951dd4114077851225e691b3144924046272c75a2263f8651723977e5aac9463ed6d470c0b6e13e1555cc59f2e6d4754329 languageName: node linkType: hard -"@aws-sdk/region-config-resolver@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/region-config-resolver@npm:3.496.0" +"@aws-sdk/region-config-resolver@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/region-config-resolver@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-config-provider": "npm:^2.2.1" - "@smithy/util-middleware": "npm:^2.1.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-config-provider": "npm:^2.1.0" + "@smithy/util-middleware": "npm:^2.0.9" tslib: "npm:^2.5.0" - checksum: 08858d55220f886da272e89acbe76136bb2815af06bb34f1156fe8b620200bfbe6d88535e0d98bcc7dbad8454dcadbb2291655028efb865356e157a7ba8f3a7f + checksum: 045a630c94638a05b60f8d4805ff0f0709c39201e44f4c3453c8fc1d6cf331a550bb5e74980cadc86436a67786b7fc34380a25503d720e160b74c1eff434abaa languageName: node linkType: hard -"@aws-sdk/signature-v4-multi-region@npm:3.499.0": - version: 3.499.0 - resolution: "@aws-sdk/signature-v4-multi-region@npm:3.499.0" +"@aws-sdk/signature-v4-multi-region@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/signature-v4-multi-region@npm:3.489.0" dependencies: - "@aws-sdk/middleware-sdk-s3": "npm:3.499.0" - "@aws-sdk/types": "npm:3.496.0" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/signature-v4": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/middleware-sdk-s3": "npm:3.489.0" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/signature-v4": "npm:^2.0.0" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 6fe18183544d81a42d7f021ea215d67c33c870b0e47973553366d673fe3432e2abdab32ec6a6f4be858bdca9daa6cffd49aef584b3b612d79df8123ca6e332e5 + checksum: 0b3dd6f6b66cf4e392b2ceb9656acdb8a55fccf2bb2045c4238aa237c73697bb1082bca252e7435f2830c72b7e31c2253f74daefb4edc69f1c168f72bad800d4 languageName: node linkType: hard -"@aws-sdk/token-providers@npm:3.501.0": - version: 3.501.0 - resolution: "@aws-sdk/token-providers@npm:3.501.0" +"@aws-sdk/token-providers@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/token-providers@npm:3.489.0" dependencies: "@aws-crypto/sha256-browser": "npm:3.0.0" "@aws-crypto/sha256-js": "npm:3.0.0" - "@aws-sdk/middleware-host-header": "npm:3.496.0" - "@aws-sdk/middleware-logger": "npm:3.496.0" - "@aws-sdk/middleware-recursion-detection": "npm:3.496.0" - "@aws-sdk/middleware-user-agent": "npm:3.496.0" - "@aws-sdk/region-config-resolver": "npm:3.496.0" - "@aws-sdk/types": "npm:3.496.0" - "@aws-sdk/util-endpoints": "npm:3.496.0" - "@aws-sdk/util-user-agent-browser": "npm:3.496.0" - "@aws-sdk/util-user-agent-node": "npm:3.496.0" - "@smithy/config-resolver": "npm:^2.1.1" - "@smithy/fetch-http-handler": "npm:^2.4.1" - "@smithy/hash-node": "npm:^2.1.1" - "@smithy/invalid-dependency": "npm:^2.1.1" - "@smithy/middleware-content-length": "npm:^2.1.1" - "@smithy/middleware-endpoint": "npm:^2.4.1" - "@smithy/middleware-retry": "npm:^2.1.1" - "@smithy/middleware-serde": "npm:^2.1.1" - "@smithy/middleware-stack": "npm:^2.1.1" - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/node-http-handler": "npm:^2.3.1" - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/shared-ini-file-loader": "npm:^2.3.1" - "@smithy/smithy-client": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/url-parser": "npm:^2.1.1" - "@smithy/util-base64": "npm:^2.1.1" - "@smithy/util-body-length-browser": "npm:^2.1.1" - "@smithy/util-body-length-node": "npm:^2.2.1" - "@smithy/util-defaults-mode-browser": "npm:^2.1.1" - "@smithy/util-defaults-mode-node": "npm:^2.1.1" - "@smithy/util-endpoints": "npm:^1.1.1" - "@smithy/util-retry": "npm:^2.1.1" - "@smithy/util-utf8": "npm:^2.1.1" + "@aws-sdk/middleware-host-header": "npm:3.489.0" + "@aws-sdk/middleware-logger": "npm:3.489.0" + "@aws-sdk/middleware-recursion-detection": "npm:3.489.0" + "@aws-sdk/middleware-user-agent": "npm:3.489.0" + "@aws-sdk/region-config-resolver": "npm:3.489.0" + "@aws-sdk/types": "npm:3.489.0" + "@aws-sdk/util-endpoints": "npm:3.489.0" + "@aws-sdk/util-user-agent-browser": "npm:3.489.0" + "@aws-sdk/util-user-agent-node": "npm:3.489.0" + "@smithy/config-resolver": "npm:^2.0.23" + "@smithy/fetch-http-handler": "npm:^2.3.2" + "@smithy/hash-node": "npm:^2.0.18" + "@smithy/invalid-dependency": "npm:^2.0.16" + "@smithy/middleware-content-length": "npm:^2.0.18" + "@smithy/middleware-endpoint": "npm:^2.3.0" + "@smithy/middleware-retry": "npm:^2.0.26" + "@smithy/middleware-serde": "npm:^2.0.16" + "@smithy/middleware-stack": "npm:^2.0.10" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/node-http-handler": "npm:^2.2.2" + "@smithy/property-provider": "npm:^2.0.0" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/shared-ini-file-loader": "npm:^2.0.6" + "@smithy/smithy-client": "npm:^2.2.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/url-parser": "npm:^2.0.16" + "@smithy/util-base64": "npm:^2.0.1" + "@smithy/util-body-length-browser": "npm:^2.0.1" + "@smithy/util-body-length-node": "npm:^2.1.0" + "@smithy/util-defaults-mode-browser": "npm:^2.0.24" + "@smithy/util-defaults-mode-node": "npm:^2.0.32" + "@smithy/util-endpoints": "npm:^1.0.8" + "@smithy/util-retry": "npm:^2.0.9" + "@smithy/util-utf8": "npm:^2.0.2" tslib: "npm:^2.5.0" - checksum: 775459ec0c107bc7010072ff45521df8913ad70a4ff7284249bb15ad00e9fe135d1e0280805d389d583a7d32e0744621e1adb83dcdb59b2086ca42d316d67404 + checksum: ee7a20eff71284f33a2f9ad9aeb0f8a3c2a40adbb8b88053a903a64115b3b802aa9a8f8de781b422d88340b8d6fe0ff6c255c1ae6792bde569fed817d7a8933c languageName: node linkType: hard -"@aws-sdk/types@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/types@npm:3.496.0" +"@aws-sdk/types@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/types@npm:3.489.0" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 98eba036198e697e1820627ab182a649c987b7c18fc57d401fa80702e1a0b1c829ae2db9fbec09219951c4b65d6efa1828c164d9174affdd4276bb0742c48fd1 + checksum: 48778dad14f6966e974b14b9d421372846c0242e2aa47f76a8161b22f5d9430bf530b88163d913a8acad48480199fc99a012df3689e94a317c1dc875f4a353ed languageName: node linkType: hard "@aws-sdk/types@npm:^3.222.0": - version: 3.489.0 - resolution: "@aws-sdk/types@npm:3.489.0" + version: 3.496.0 + resolution: "@aws-sdk/types@npm:3.496.0" dependencies: - "@smithy/types": "npm:^2.8.0" + "@smithy/types": "npm:^2.9.1" tslib: "npm:^2.5.0" - checksum: 48778dad14f6966e974b14b9d421372846c0242e2aa47f76a8161b22f5d9430bf530b88163d913a8acad48480199fc99a012df3689e94a317c1dc875f4a353ed + checksum: 98eba036198e697e1820627ab182a649c987b7c18fc57d401fa80702e1a0b1c829ae2db9fbec09219951c4b65d6efa1828c164d9174affdd4276bb0742c48fd1 languageName: node linkType: hard -"@aws-sdk/util-arn-parser@npm:3.495.0": - version: 3.495.0 - resolution: "@aws-sdk/util-arn-parser@npm:3.495.0" +"@aws-sdk/util-arn-parser@npm:3.465.0": + version: 3.465.0 + resolution: "@aws-sdk/util-arn-parser@npm:3.465.0" dependencies: tslib: "npm:^2.5.0" - checksum: 8f8574376e21ae90f2e5ee0ddf6516e8fb31ac433989f7015f0feed185b518108c7c65fc346c64924feb917daed6bfd7ede0c6cf047b64f09cff0125041162b6 + checksum: 0fb11c7e3d09901708f46cb0c885c2df7a8e8af70560484fa478bf9e2f8ee2aa6028c67187c0520eec6a92003bc43ae68c0ddc32db3af3e6d554b48080910af5 languageName: node linkType: hard -"@aws-sdk/util-endpoints@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/util-endpoints@npm:3.496.0" +"@aws-sdk/util-endpoints@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/util-endpoints@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-endpoints": "npm:^1.1.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-endpoints": "npm:^1.0.8" tslib: "npm:^2.5.0" - checksum: e916aad6ee123437c8b9f08ac80b584d05e5a235de5cbbca76db8fad7ce031f1b8b0861fc1fa6ae8e168e3c0d3986748a0c868158341a94a5024b06b1b8eef87 + checksum: 68f921982f651be0254040633e602406648a6dafa9c6030a2e97b3a632a21866cb7bac098f3d2212aebf866032a26a9e9b8e53a6531c1773bc4a990d17399e39 languageName: node linkType: hard @@ -704,32 +704,32 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-user-agent-browser@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/util-user-agent-browser@npm:3.496.0" +"@aws-sdk/util-user-agent-browser@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/util-user-agent-browser@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/types": "npm:^2.8.0" bowser: "npm:^2.11.0" tslib: "npm:^2.5.0" - checksum: 671b0b117795387108abedc3b8d1ec64f2eee9e4b808216ab70cb4a7529801e14c7f2ddfd814d94834a49fcdef6a8a08700849537d68d2d83c8b2cc75c0fadba + checksum: 2bb414b8d8a84f159bc8635796a5eafdeac7d325a8d4bec5e4c735b2f12029b54f750ec53b22f44f2a402aa2e3d7935572e3c77fc60ddaf776f5c34ac8707768 languageName: node linkType: hard -"@aws-sdk/util-user-agent-node@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/util-user-agent-node@npm:3.496.0" +"@aws-sdk/util-user-agent-node@npm:3.489.0": + version: 3.489.0 + resolution: "@aws-sdk/util-user-agent-node@npm:3.489.0" dependencies: - "@aws-sdk/types": "npm:3.496.0" - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/types": "npm:^2.9.1" + "@aws-sdk/types": "npm:3.489.0" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" peerDependencies: aws-crt: ">=1.0.0" peerDependenciesMeta: aws-crt: optional: true - checksum: 21e18674ded51ffdf4537b434f77f405fc1b0767773c34ec4da8ccd7be68ae9c2ac5fdc7f4a80205dd3de55eab28b66d302b85fa45e975ae2c0c75f6ea8311ca + checksum: 95dc1e07b6b8b38b8d3bb922ae3619c4910dbc413a24bc5daca6ecaeab6891c2f3765ca85ed64a80532adfab09fc70e1d224c7679d763cecebe1ec48e4975bc8 languageName: node linkType: hard @@ -742,13 +742,13 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/xml-builder@npm:3.496.0": - version: 3.496.0 - resolution: "@aws-sdk/xml-builder@npm:3.496.0" +"@aws-sdk/xml-builder@npm:3.485.0": + version: 3.485.0 + resolution: "@aws-sdk/xml-builder@npm:3.485.0" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 9a5904a674f8e66be5528deac59f8d863bb4ea213a34e456c40b38d5bfdff3527d6ea79264ebdb4ab0b994d53b40f7bf93413308befd060fb07ab72e3708e103 + checksum: 82bee30922662391703fca2ca1c735f6a91b031e3330091ca3fab774062742ac0dd88085feeebc2431e7d3c3d02f50bfa0d1bec7673e691dcd07ef03ff6bb880 languageName: node linkType: hard @@ -1051,7 +1051,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.21.4, @babel/generator@npm:^7.7.2": +"@babel/generator@npm:^7.21.4": version: 7.21.4 resolution: "@babel/generator@npm:7.21.4" dependencies: @@ -1075,6 +1075,18 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.7.2": + version: 7.23.6 + resolution: "@babel/generator@npm:7.23.6" + dependencies: + "@babel/types": "npm:^7.23.6" + "@jridgewell/gen-mapping": "npm:^0.3.2" + "@jridgewell/trace-mapping": "npm:^0.3.17" + jsesc: "npm:^2.5.1" + checksum: 864090d5122c0aa3074471fd7b79d8a880c1468480cbd28925020a3dcc7eb6e98bedcdb38983df299c12b44b166e30915b8085a7bc126e68fa7e2aadc7bd1ac5 + languageName: node + linkType: hard + "@babel/helper-compilation-targets@npm:^7.21.4": version: 7.21.4 resolution: "@babel/helper-compilation-targets@npm:7.21.4" @@ -1148,7 +1160,14 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.8.0": +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.8.0": + version: 7.22.5 + resolution: "@babel/helper-plugin-utils@npm:7.22.5" + checksum: ab220db218089a2aadd0582f5833fd17fa300245999f5f8784b10f5a75267c4e808592284a29438a0da365e702f05acb369f99e1c915c02f9f9210ec60eab8ea + languageName: node + linkType: hard + +"@babel/helper-plugin-utils@npm:^7.20.2": version: 7.20.2 resolution: "@babel/helper-plugin-utils@npm:7.20.2" checksum: 7bd5be752998e8bfa616e6fbf1fd8f1a7664039a435d5da11cfd97a320b6eb58e28156f4789b2da242a53ed45994d04632b2e19684c1209e827522a07f0cd022 @@ -1448,15 +1467,15 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.4.4": - version: 7.23.6 - resolution: "@babel/runtime@npm:7.23.6" + version: 7.24.1 + resolution: "@babel/runtime@npm:7.24.1" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: 4c4ab16f0361c59fb23956e4d0a29935f1f8a64aa8dd37876ce38355b6f4d8f0e54237aacb89c73b1532def60539ddde2d651523c8fa887b30b19a8cf0c465b0 + checksum: 3a8d61400c636d1ce3a42895a106cd4dfb4e9b88832a8a754a724c68652f821d7a46dce394305d7623f9f0d3597bf0a98aeb5f9c150ef60e14bbbf66caab4654 languageName: node linkType: hard -"@babel/template@npm:^7.20.7, @babel/template@npm:^7.3.3": +"@babel/template@npm:^7.20.7": version: 7.20.7 resolution: "@babel/template@npm:7.20.7" dependencies: @@ -1467,7 +1486,7 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:^7.22.15": +"@babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": version: 7.22.15 resolution: "@babel/template@npm:7.22.15" dependencies: @@ -1496,7 +1515,18 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.18.6, @babel/types@npm:^7.20.2, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.0, @babel/types@npm:^7.21.2, @babel/types@npm:^7.21.4, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.23.6, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": + version: 7.23.6 + resolution: "@babel/types@npm:7.23.6" + dependencies: + "@babel/helper-string-parser": "npm:^7.23.4" + "@babel/helper-validator-identifier": "npm:^7.22.20" + to-fast-properties: "npm:^2.0.0" + checksum: 07e70bb94d30b0231396b5e9a7726e6d9227a0a62e0a6830c0bd3232f33b024092e3d5a7d1b096a65bbf2bb43a9ab4c721bf618e115bfbb87b454fa060f88cbf + languageName: node + linkType: hard + +"@babel/types@npm:^7.18.6, @babel/types@npm:^7.20.2, @babel/types@npm:^7.21.0, @babel/types@npm:^7.21.2, @babel/types@npm:^7.21.4, @babel/types@npm:^7.3.0": version: 7.21.4 resolution: "@babel/types@npm:7.21.4" dependencies: @@ -1518,17 +1548,6 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.8.3": - version: 7.23.6 - resolution: "@babel/types@npm:7.23.6" - dependencies: - "@babel/helper-string-parser": "npm:^7.23.4" - "@babel/helper-validator-identifier": "npm:^7.22.20" - to-fast-properties: "npm:^2.0.0" - checksum: 07e70bb94d30b0231396b5e9a7726e6d9227a0a62e0a6830c0bd3232f33b024092e3d5a7d1b096a65bbf2bb43a9ab4c721bf618e115bfbb87b454fa060f88cbf - languageName: node - linkType: hard - "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -1543,20 +1562,15 @@ __metadata: languageName: node linkType: hard -"@celo/base@npm:^6.0.0": - version: 6.0.0 - resolution: "@celo/base@npm:6.0.0" - checksum: 0ce49ce58f7824708967412cfcd30f3c981f74e93132475575ffa3f5cbd233652c8e8bb51ff999fff4f49c36f5ef8e61d2db30857310d0342d16a20585da4ccc - languageName: node - linkType: hard - -"@celo/base@npm:^6.0.1, @celo/base@workspace:packages/sdk/base": +"@celo/base@npm:^6.0.0, @celo/base@npm:^6.0.1, @celo/base@workspace:packages/sdk/base": version: 0.0.0-use.local resolution: "@celo/base@workspace:packages/sdk/base" dependencies: "@celo/typescript": "npm:0.0.1" + "@noble/ciphers": "npm:0.4.1" + "@noble/curves": "npm:1.3.0" + "@noble/hashes": "npm:1.3.3" bignumber.js: "npm:^9.0.0" - elliptic: "npm:^6.5.4" web3-utils: "npm:1.10.4" languageName: unknown linkType: soft @@ -1626,7 +1640,6 @@ __metadata: "@types/node": "npm:^18.7.16" "@types/prompts": "npm:^1.1.1" bignumber.js: "npm:9.0.0" - bip32: "npm:3.1.0" chalk: "npm:^2.4.2" command-exists: "npm:^1.2.9" cross-fetch: "npm:3.1.5" @@ -1763,19 +1776,13 @@ __metadata: "@celo/bls12377js": "npm:0.1.1" "@celo/typescript": "npm:0.0.1" "@celo/utils": "npm:^6.0.1" - "@ethereumjs/util": "npm:8.0.5" + "@noble/ciphers": "npm:0.4.1" + "@noble/curves": "npm:1.3.0" + "@noble/hashes": "npm:1.3.3" + "@scure/bip32": "npm:^1.3.3" + "@scure/bip39": "npm:^1.2.2" "@types/bn.js": "npm:^5.1.0" - "@types/elliptic": "npm:^6.4.9" "@types/node": "npm:^18.7.16" - "@types/randombytes": "npm:^2.0.0" - bigi: "npm:^1.4.2" - bip32: "npm:^3.1.0" - bip39: "https://github.com/bitcoinjs/bip39#a7ecbfe2e60d0214ce17163d610cad9f7b23140c" - buffer-reverse: "npm:^1.0.1" - elliptic: "npm:^6.5.4" - ethereum-cryptography: "npm:1.2.0" - randombytes: "npm:^2.0.1" - tiny-secp256k1: "npm:2.2.1" languageName: unknown linkType: soft @@ -1829,7 +1836,6 @@ __metadata: "@types/inquirer": "npm:^6.5.0" bignumber.js: "npm:^9.0.0" debug: "npm:^4.1.1" - ethereum-cryptography: "npm:1.2.0" inquirer: "npm:^7.0.5" languageName: unknown linkType: soft @@ -1952,41 +1958,22 @@ __metadata: languageName: unknown linkType: soft -"@celo/utils@npm:^6.0.0": - version: 6.0.0 - resolution: "@celo/utils@npm:6.0.0" - dependencies: - "@celo/base": "npm:^6.0.0" - "@ethereumjs/util": "npm:8.0.5" - "@types/elliptic": "npm:^6.4.9" - "@types/node": "npm:^18.7.16" - bignumber.js: "npm:^9.0.0" - elliptic: "npm:^6.5.4" - ethereum-cryptography: "npm:1.2.0" - fp-ts: "npm:2.1.1" - io-ts: "npm:2.0.1" - rlp: "npm:^2.2.4" - web3-eth-abi: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: e8828369726f958d2db7c3f5b321e07c0243d48cc16e0ebef938ae404b1e26aabb11203d971c9f578731bf58424ece5b1bcb5e7710b29653241179cd10473c8e - languageName: node - linkType: hard - -"@celo/utils@npm:^6.0.1, @celo/utils@workspace:packages/sdk/utils": +"@celo/utils@npm:^6.0.0, @celo/utils@npm:^6.0.1, @celo/utils@workspace:packages/sdk/utils": version: 0.0.0-use.local resolution: "@celo/utils@workspace:packages/sdk/utils" dependencies: "@celo/base": "npm:^6.0.1" "@celo/typescript": "npm:0.0.1" + "@ethereumjs/rlp": "npm:^5.0.2" "@ethereumjs/util": "npm:8.0.5" - "@types/elliptic": "npm:^6.4.9" + "@noble/ciphers": "npm:0.4.1" + "@noble/curves": "npm:1.3.0" + "@noble/hashes": "npm:1.3.3" + "@types/bn.js": "npm:^5.1.0" "@types/node": "npm:^18.7.16" bignumber.js: "npm:^9.0.0" - elliptic: "npm:^6.5.4" - ethereum-cryptography: "npm:1.2.0" fp-ts: "npm:2.1.1" io-ts: "npm:2.0.1" - rlp: "npm:^2.2.4" web3-eth-abi: "npm:1.10.4" web3-utils: "npm:1.10.4" languageName: unknown @@ -2019,13 +2006,13 @@ __metadata: "@celo/base": "npm:^6.0.1" "@celo/connect": "npm:^5.3.0" "@celo/utils": "npm:^6.0.1" - "@ethereumjs/rlp": "npm:^5.0.0" + "@ethereumjs/rlp": "npm:^5.0.2" "@ethereumjs/util": "npm:8.0.5" + "@noble/curves": "npm:^1.3.0" + "@noble/hashes": "npm:^1.3.3" "@types/debug": "npm:^4.1.5" bignumber.js: "npm:^9.0.0" debug: "npm:^4.1.1" - eth-lib: "npm:^0.2.8" - ethereum-cryptography: "npm:^2.1.2" viem: "npm:~1.5.4" web3: "npm:1.10.4" web3-eth-accounts: "npm:1.10.4" @@ -2042,15 +2029,15 @@ __metadata: "@celo/wallet-hsm": "npm:^5.2.0" "@celo/wallet-remote": "npm:^5.2.0" "@ethereumjs/util": "npm:8.0.5" + "@noble/ciphers": "npm:0.4.1" + "@noble/curves": "npm:1.3.0" + "@noble/hashes": "npm:1.3.3" "@types/debug": "npm:^4.1.5" "@types/secp256k1": "npm:^4.0.0" aws-sdk: "npm:^2.705.0" bignumber.js: "npm:^9.0.0" debug: "npm:^4.1.1" dotenv: "npm:^8.2.0" - elliptic: "npm:^6.5.4" - eth-lib: "npm:^0.2.8" - secp256k1: "npm:^4.0.0" web3: "npm:1.10.4" languageName: unknown linkType: soft @@ -2069,13 +2056,13 @@ __metadata: "@celo/wallet-hsm": "npm:^5.2.0" "@celo/wallet-remote": "npm:^5.2.0" "@ethereumjs/util": "npm:8.0.5" + "@noble/ciphers": "npm:0.4.1" + "@noble/curves": "npm:1.3.0" + "@noble/hashes": "npm:1.3.3" "@types/secp256k1": "npm:^4.0.0" bignumber.js: "npm:^9.0.0" debug: "npm:^4.1.1" dotenv: "npm:^8.2.0" - elliptic: "npm:^6.5.4" - eth-lib: "npm:^0.2.8" - secp256k1: "npm:^4.0.0" web3: "npm:1.10.4" languageName: unknown linkType: soft @@ -2091,14 +2078,14 @@ __metadata: "@celo/wallet-remote": "npm:^5.2.0" "@ethereumjs/util": "npm:8.0.5" "@google-cloud/kms": "npm:~2.9.0" + "@noble/ciphers": "npm:0.4.1" + "@noble/curves": "npm:1.3.0" + "@noble/hashes": "npm:1.3.3" "@types/debug": "npm:^4.1.5" "@types/secp256k1": "npm:^4.0.0" bignumber.js: "npm:^9.0.0" debug: "npm:^4.1.1" dotenv: "npm:^8.2.0" - elliptic: "npm:^6.5.4" - eth-lib: "npm:^0.2.8" - secp256k1: "npm:^4.0.0" web3: "npm:1.10.4" languageName: unknown linkType: soft @@ -2109,15 +2096,15 @@ __metadata: dependencies: "@celo/base": "npm:^6.0.1" "@ethereumjs/util": "npm:8.0.5" + "@noble/ciphers": "npm:0.4.1" + "@noble/curves": "npm:1.3.0" + "@noble/hashes": "npm:1.3.3" "@types/asn1js": "npm:^0.0.2" "@types/debug": "npm:^4.1.5" "@types/secp256k1": "npm:^4.0.0" asn1js: "npm:^2.0.26" bignumber.js: "npm:^9.0.0" dotenv: "npm:^8.2.0" - elliptic: "npm:^6.5.4" - eth-lib: "npm:^0.2.8" - secp256k1: "npm:^4.0.0" languageName: unknown linkType: soft @@ -2135,9 +2122,8 @@ __metadata: "@ledgerhq/hw-app-eth": "npm:~5.11.0" "@ledgerhq/hw-transport": "npm:~5.11.0" "@ledgerhq/hw-transport-node-hid": "npm:^6.27.4" + "@noble/hashes": "npm:^1.3.3" debug: "npm:^4.1.1" - eth-lib: "npm:^0.2.8" - ethereum-cryptography: "npm:1.2.0" web3: "npm:1.10.4" languageName: unknown linkType: soft @@ -2163,7 +2149,6 @@ __metadata: "@celo/utils": "npm:^6.0.1" "@celo/wallet-base": "npm:^5.2.0" "@ethereumjs/util": "npm:8.0.5" - eth-lib: "npm:^0.2.8" viem: "npm:~1.5.4" web3: "npm:1.10.4" languageName: unknown @@ -2178,7 +2163,6 @@ __metadata: "@celo/wallet-base": "npm:^5.2.0" "@ethereumjs/util": "npm:8.0.5" "@types/debug": "npm:^4.1.5" - eth-lib: "npm:^0.2.8" web3: "npm:1.10.4" languageName: unknown linkType: soft @@ -2640,6 +2624,15 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/rlp@npm:^5.0.2": + version: 5.0.2 + resolution: "@ethereumjs/rlp@npm:5.0.2" + bin: + rlp: bin/rlp.cjs + checksum: 2af80d98faf7f64dfb6d739c2df7da7350ff5ad52426c3219897e843ee441215db0ffa346873200a6be6d11142edb9536e66acd62436b5005fa935baaf7eb6bd + languageName: node + linkType: hard + "@ethereumjs/tx@npm:3.3.2": version: 3.3.2 resolution: "@ethereumjs/tx@npm:3.3.2" @@ -3126,17 +3119,16 @@ __metadata: linkType: hard "@grpc/proto-loader@npm:^0.7.0": - version: 0.7.6 - resolution: "@grpc/proto-loader@npm:0.7.6" + version: 0.7.10 + resolution: "@grpc/proto-loader@npm:0.7.10" dependencies: - "@types/long": "npm:^4.0.1" lodash.camelcase: "npm:^4.3.0" - long: "npm:^4.0.0" - protobufjs: "npm:^7.0.0" - yargs: "npm:^16.2.0" + long: "npm:^5.0.0" + protobufjs: "npm:^7.2.4" + yargs: "npm:^17.7.2" bin: proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 65a82829c6e03593c5e09153cad30dc7d74ed8f873749967f1d568ab08993a031afa4410a19b59e29f55ce298dd7c0249b441f9424b273eddab4ca631b8caeb9 + checksum: 1fdc0b10480614cecc4bf52578756cbf59ec75f1bea37452947125eff81cd3ceabba04606247ed8361f97bcd00d147ca4118abc22b046cc0541cb749671b97d9 languageName: node linkType: hard @@ -3273,15 +3265,6 @@ __metadata: languageName: node linkType: hard -"@jest/expect-utils@npm:^29.5.0": - version: 29.5.0 - resolution: "@jest/expect-utils@npm:29.5.0" - dependencies: - jest-get-type: "npm:^29.4.3" - checksum: 2df3ee42f6f7e904e06dd8be65662344493ec5525554fa76a91f80bbbcf85d207f40bb308bf0dd2e52b4b2ce42167a650ab686c109ecc736e9582e08d7f19e42 - languageName: node - linkType: hard - "@jest/expect-utils@npm:^29.7.0": version: 29.7.0 resolution: "@jest/expect-utils@npm:29.7.0" @@ -3364,15 +3347,6 @@ __metadata: languageName: node linkType: hard -"@jest/schemas@npm:^29.4.3": - version: 29.4.3 - resolution: "@jest/schemas@npm:29.4.3" - dependencies: - "@sinclair/typebox": "npm:^0.25.16" - checksum: ac754e245c19dc39e10ebd41dce09040214c96a4cd8efa143b82148e383e45128f24599195ab4f01433adae4ccfbe2db6574c90db2862ccd8551a86704b5bebd - languageName: node - linkType: hard - "@jest/schemas@npm:^29.6.3": version: 29.6.3 resolution: "@jest/schemas@npm:29.6.3" @@ -3440,20 +3414,6 @@ __metadata: languageName: node linkType: hard -"@jest/types@npm:^29.5.0": - version: 29.5.0 - resolution: "@jest/types@npm:29.5.0" - dependencies: - "@jest/schemas": "npm:^29.4.3" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - "@types/istanbul-reports": "npm:^3.0.0" - "@types/node": "npm:*" - "@types/yargs": "npm:^17.0.8" - chalk: "npm:^4.0.0" - checksum: 910a134cd1c2cd7d74dfcf9981c2f1a6c1d9772edecb7738947b059c4e0bb843a0d26a3c7dfff112f2fc4a473ecc18679edda498416f0048a8d181ff43a08bee - languageName: node - linkType: hard - "@jest/types@npm:^29.6.3": version: 29.6.3 resolution: "@jest/types@npm:29.6.3" @@ -3712,6 +3672,13 @@ __metadata: languageName: node linkType: hard +"@noble/ciphers@npm:0.4.1": + version: 0.4.1 + resolution: "@noble/ciphers@npm:0.4.1" + checksum: f3787b00c9486d0e23afd3c3aeab288f18c895f7d0ae6395bfaeb80e1a02e20b258c1bcf264d6db568c135512095eb2731438ee229987479c457cbc5186bb720 + languageName: node + linkType: hard + "@noble/curves@npm:1.0.0, @noble/curves@npm:~1.0.0": version: 1.0.0 resolution: "@noble/curves@npm:1.0.0" @@ -3730,6 +3697,15 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.3.0, @noble/curves@npm:^1.3.0, @noble/curves@npm:~1.3.0": + version: 1.3.0 + resolution: "@noble/curves@npm:1.3.0" + dependencies: + "@noble/hashes": "npm:1.3.3" + checksum: f3cbdd1af00179e30146eac5539e6df290228fb857a7a8ba36d1a772cbe59288a2ca83d06f175d3446ef00db3a80d7fd8b8347f7de9c2d4d5bf3865d8bb78252 + languageName: node + linkType: hard + "@noble/hashes@npm:1.2.0, @noble/hashes@npm:~1.2.0": version: 1.2.0 resolution: "@noble/hashes@npm:1.2.0" @@ -3751,7 +3727,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:^1.2.0": +"@noble/hashes@npm:1.3.3, @noble/hashes@npm:^1.3.3, @noble/hashes@npm:~1.3.2": version: 1.3.3 resolution: "@noble/hashes@npm:1.3.3" checksum: 1025ddde4d24630e95c0818e63d2d54ee131b980fe113312d17ed7468bc18f54486ac86c907685759f8a7e13c2f9b9e83ec7b67d1cc20836f36b5e4a65bb102d @@ -4217,10 +4193,11 @@ __metadata: languageName: node linkType: hard -"@oclif/core@npm:^3.10.2, @oclif/core@npm:^3.16.0": - version: 3.16.0 - resolution: "@oclif/core@npm:3.16.0" +"@oclif/core@npm:^3.10.2, @oclif/core@npm:^3.16.0, @oclif/core@npm:^3.18.1": + version: 3.18.1 + resolution: "@oclif/core@npm:3.18.1" dependencies: + "@types/cli-progress": "npm:^3.11.5" ansi-escapes: "npm:^4.3.2" ansi-styles: "npm:^4.3.0" cardinal: "npm:^2.1.1" @@ -4244,19 +4221,17 @@ __metadata: strip-ansi: "npm:^6.0.1" supports-color: "npm:^8.1.1" supports-hyperlinks: "npm:^2.2.0" - tsconfck: "npm:^3.0.0" widest-line: "npm:^3.1.0" wordwrap: "npm:^1.0.0" wrap-ansi: "npm:^7.0.0" - checksum: 8599544a57dfff79319dedbdd3f29c61a1780dcd7dc84b1e543dd416baa03294b1df3185a11f898124d3f16bbe88bd763877deae14c1adaf19dec402d2e57996 + checksum: 1c2b115cbf1343d42bdae3f950ac69bb79064430a7a799652533f4c2e972a9ba85b990719a644ce8835b97b9495a161378e49e678a0855243c61573301623633 languageName: node linkType: hard -"@oclif/core@npm:^3.18.1": - version: 3.18.1 - resolution: "@oclif/core@npm:3.18.1" +"@oclif/core@npm:^3.15.0": + version: 3.16.0 + resolution: "@oclif/core@npm:3.16.0" dependencies: - "@types/cli-progress": "npm:^3.11.5" ansi-escapes: "npm:^4.3.2" ansi-styles: "npm:^4.3.0" cardinal: "npm:^2.1.1" @@ -4280,10 +4255,11 @@ __metadata: strip-ansi: "npm:^6.0.1" supports-color: "npm:^8.1.1" supports-hyperlinks: "npm:^2.2.0" + tsconfck: "npm:^3.0.0" widest-line: "npm:^3.1.0" wordwrap: "npm:^1.0.0" wrap-ansi: "npm:^7.0.0" - checksum: 1c2b115cbf1343d42bdae3f950ac69bb79064430a7a799652533f4c2e972a9ba85b990719a644ce8835b97b9495a161378e49e678a0855243c61573301623633 + checksum: 8599544a57dfff79319dedbdd3f29c61a1780dcd7dc84b1e543dd416baa03294b1df3185a11f898124d3f16bbe88bd763877deae14c1adaf19dec402d2e57996 languageName: node linkType: hard @@ -4356,7 +4332,16 @@ __metadata: languageName: node linkType: hard -"@oclif/plugin-not-found@npm:^3.0.9": +"@oclif/plugin-help@npm:^6.0.9": + version: 6.0.9 + resolution: "@oclif/plugin-help@npm:6.0.9" + dependencies: + "@oclif/core": "npm:^3.15.0" + checksum: f765237cba9bb7bc56d0e350ec5b258c5b370eacbc9dd89104cd8fff2200b4de9c1aa38bcf615dbacf60700dbad788df7b06f2c2f98310de90ad2169f2d9f405 + languageName: node + linkType: hard + +"@oclif/plugin-not-found@npm:^3.0.8, @oclif/plugin-not-found@npm:^3.0.9": version: 3.0.9 resolution: "@oclif/plugin-not-found@npm:3.0.9" dependencies: @@ -4608,10 +4593,10 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:~1.1.0": - version: 1.1.1 - resolution: "@scure/base@npm:1.1.1" - checksum: 9aaa525ac25215cbe1bde00733a2fd25e99f03793aa1fd2961c567bb62b60c8a3a485a7cb5d748c41604fca79d149de19b05e64449b770c0a04b9ae38d0b5b2b +"@scure/base@npm:~1.1.0, @scure/base@npm:~1.1.4": + version: 1.1.5 + resolution: "@scure/base@npm:1.1.5" + checksum: 543fa9991c6378b6a0d5ab7f1e27b30bb9c1e860d3ac81119b4213cfdf0ad7b61be004e06506e89de7ce0cec9391c17f5c082bb34c3b617a2ee6a04129f52481 languageName: node linkType: hard @@ -4648,6 +4633,17 @@ __metadata: languageName: node linkType: hard +"@scure/bip32@npm:^1.3.3": + version: 1.3.3 + resolution: "@scure/bip32@npm:1.3.3" + dependencies: + "@noble/curves": "npm:~1.3.0" + "@noble/hashes": "npm:~1.3.2" + "@scure/base": "npm:~1.1.4" + checksum: 4b8b75567866ff7d6b3ba154538add02d2951e9433e8dd7f0014331ac500cda5a88fe3d39b408fcc36e86b633682013f172b967af022c2e4e4ab07336801d688 + languageName: node + linkType: hard + "@scure/bip39@npm:1.1.1": version: 1.1.1 resolution: "@scure/bip39@npm:1.1.1" @@ -4678,6 +4674,16 @@ __metadata: languageName: node linkType: hard +"@scure/bip39@npm:^1.2.2": + version: 1.2.2 + resolution: "@scure/bip39@npm:1.2.2" + dependencies: + "@noble/hashes": "npm:~1.3.2" + "@scure/base": "npm:~1.1.4" + checksum: f71aceda10a7937bf3779fd2b4c4156c95ec9813269470ddca464cb8ab610d2451b173037f4b1e6dac45414e406e7adc7b5814c51279f4474d5d38140bbee542 + languageName: node + linkType: hard + "@sigstore/bundle@npm:^1.1.0": version: 1.1.0 resolution: "@sigstore/bundle@npm:1.1.0" @@ -4696,6 +4702,22 @@ __metadata: languageName: node linkType: hard +"@sigstore/bundle@npm:^2.1.1": + version: 2.1.1 + resolution: "@sigstore/bundle@npm:2.1.1" + dependencies: + "@sigstore/protobuf-specs": "npm:^0.2.1" + checksum: e29916ad3f37d4e1c5b98d7a614cddb1301d4bdfa5ebe0cb2733f4cbc78710b8320aa62ad033e4702c5ec7bcd9c371278b7934ce45f3df71bb3ffa07f5502742 + languageName: node + linkType: hard + +"@sigstore/core@npm:^0.2.0": + version: 0.2.0 + resolution: "@sigstore/core@npm:0.2.0" + checksum: 6a9e7f0dcbaad3e330207f6ce0aa0cb229416eb8ece71a31e427f71f021ce25ef8230faaca93c8abf428dab391f63ef7a08c8a88e0237dee3b15daf35c53a86a + languageName: node + linkType: hard + "@sigstore/protobuf-specs@npm:^0.2.0, @sigstore/protobuf-specs@npm:^0.2.1": version: 0.2.1 resolution: "@sigstore/protobuf-specs@npm:0.2.1" @@ -4725,6 +4747,18 @@ __metadata: languageName: node linkType: hard +"@sigstore/sign@npm:^2.2.1": + version: 2.2.1 + resolution: "@sigstore/sign@npm:2.2.1" + dependencies: + "@sigstore/bundle": "npm:^2.1.1" + "@sigstore/core": "npm:^0.2.0" + "@sigstore/protobuf-specs": "npm:^0.2.1" + make-fetch-happen: "npm:^13.0.0" + checksum: a829c479418a86f9919d85aec0349fd4a9c297aaacc4e838580bc9b5ba9a372fb318b4829b78cc5c9e56b8fd1b7d11a06e31384eff55bd0813f5d0993f5fb9db + languageName: node + linkType: hard + "@sigstore/tuf@npm:^1.0.3": version: 1.0.3 resolution: "@sigstore/tuf@npm:1.0.3" @@ -4735,20 +4769,24 @@ __metadata: languageName: node linkType: hard -"@sigstore/tuf@npm:^2.1.0": - version: 2.2.0 - resolution: "@sigstore/tuf@npm:2.2.0" +"@sigstore/tuf@npm:^2.1.0, @sigstore/tuf@npm:^2.3.0": + version: 2.3.0 + resolution: "@sigstore/tuf@npm:2.3.0" dependencies: "@sigstore/protobuf-specs": "npm:^0.2.1" - tuf-js: "npm:^2.1.0" - checksum: d20f7fadd1c0ec74ec33f01b0def42ccfc1e32d1e6be3da85f1ab709b59ed1d25ba12c2b86a3b5082600c8935a77914afd9b9ff6bb64425160eafb1ccabcd2bc + tuf-js: "npm:^2.2.0" + checksum: c4a9e87c1d4b48de87526fd37b154382dd7caf6fe784329b829270ed431741bb1a4ecde6d8aa2bbe72124a24ef1b616c098a4b036cd04965e02f039de11acd4f languageName: node linkType: hard -"@sinclair/typebox@npm:^0.25.16": - version: 0.25.24 - resolution: "@sinclair/typebox@npm:0.25.24" - checksum: d415546153478befa3c8386a4723e3061ac065867c7e22fe0374d36091991676d231e5381e66daa0ed21639217c6c80e0d6224a9c89aaac269e58b82b2f4a2f4 +"@sigstore/verify@npm:^0.1.0": + version: 0.1.0 + resolution: "@sigstore/verify@npm:0.1.0" + dependencies: + "@sigstore/bundle": "npm:^2.1.1" + "@sigstore/core": "npm:^0.2.0" + "@sigstore/protobuf-specs": "npm:^0.2.1" + checksum: 9dc208a4d0ace4d836aa1717cd02236b480d883e2a7a4f40fb87ccb0e7b7e6d4805c5628bb5cc3aec392bafe866e59f3ce55c2b16ef9ed224ae6a60c07984e65 languageName: node linkType: hard @@ -4784,385 +4822,385 @@ __metadata: languageName: node linkType: hard -"@smithy/abort-controller@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/abort-controller@npm:2.1.1" +"@smithy/abort-controller@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/abort-controller@npm:2.0.16" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: a35a94ed87980fb6c40ee44d2d6334fe6a0126de7192bd5d72aacb8caaa5580f92b3ce52609e55dc07c92ec0acf2df66fd9b314deb26538ff09c93f840b040c1 + checksum: 3fa2db15cb247d63649ff95f676b4caf5ad311fc5103c432a9eb80ef3bafd1eaed688f926ae00f94e6965e959b6f52885eea29da367bc94b2d08df0f5cf5f778 languageName: node linkType: hard -"@smithy/chunked-blob-reader-native@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/chunked-blob-reader-native@npm:2.1.1" +"@smithy/chunked-blob-reader-native@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/chunked-blob-reader-native@npm:2.0.1" dependencies: - "@smithy/util-base64": "npm:^2.1.1" + "@smithy/util-base64": "npm:^2.0.1" tslib: "npm:^2.5.0" - checksum: 3e4bfc4afe794e98fd9f0f6d8fa7eceea5fa79c330c42eb96d27d74d81d2fb65d89482e705e20537c68042688aa53c3c7b08743900eb8c06567fd9ac4b2f6368 + checksum: 3e3e1a9004336ab6853efe024aee053ee63e833b5f5e812d877fd4c7be74d7f8123c0352d749de77713d1152cf390991814c01e42d1ee5e349cf6816789a3109 languageName: node linkType: hard -"@smithy/chunked-blob-reader@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/chunked-blob-reader@npm:2.1.1" +"@smithy/chunked-blob-reader@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/chunked-blob-reader@npm:2.0.0" dependencies: tslib: "npm:^2.5.0" - checksum: 130b8181184ed36f89e995870423b10e7730fe5f4ffc9ca3373e22a43f8195dbb5af230cae0bccd7b016d126796f742c3c44f51d21d08f178c541e767b71a9f4 + checksum: 3e35ce2bb2d8338f44b408958fd4b77054cb286b27730674a213d10b6ed84734889441d13dbdffb5f1971c61fe47c5f05703e5a93596ca0a6285937cd8b061cf languageName: node linkType: hard -"@smithy/config-resolver@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/config-resolver@npm:2.1.1" +"@smithy/config-resolver@npm:^2.0.23": + version: 2.0.23 + resolution: "@smithy/config-resolver@npm:2.0.23" dependencies: - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-config-provider": "npm:^2.2.1" - "@smithy/util-middleware": "npm:^2.1.1" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-config-provider": "npm:^2.1.0" + "@smithy/util-middleware": "npm:^2.0.9" tslib: "npm:^2.5.0" - checksum: eee4889ba8efd08d6d9e5b52360e2aebca03555a925a729269cbe83cb7a6a8d221c3e3382130382d8223aacdca6440fc05e56ae5e2c1805a41f8ae25d60fc732 + checksum: a590108883d6c56846e54b1e083484e7fb889d791121945b6508760d224c7f47fb78e6ae4cb927e73945d2854181bb33df7775fac95c3c0cb9ea9d3f27d95ed0 languageName: node linkType: hard -"@smithy/core@npm:^1.3.1": - version: 1.3.1 - resolution: "@smithy/core@npm:1.3.1" +"@smithy/core@npm:^1.2.2": + version: 1.2.2 + resolution: "@smithy/core@npm:1.2.2" dependencies: - "@smithy/middleware-endpoint": "npm:^2.4.1" - "@smithy/middleware-retry": "npm:^2.1.1" - "@smithy/middleware-serde": "npm:^2.1.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/smithy-client": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-middleware": "npm:^2.1.1" + "@smithy/middleware-endpoint": "npm:^2.3.0" + "@smithy/middleware-retry": "npm:^2.0.26" + "@smithy/middleware-serde": "npm:^2.0.16" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/smithy-client": "npm:^2.2.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-middleware": "npm:^2.0.9" tslib: "npm:^2.5.0" - checksum: 80b200f556fc608f1fc5254a3ae0958bbf0d92c8ad7b71da437b509a3013395c4fe83f0f289a54726088aa5af5c1c712f7a9a4833c7b46c0b4020732f6b1c581 + checksum: 4a6ff42aa0951f3e877b396dfd9d7f9c8bf28aa389bc7d19cc99fa6b9fab2edac069fc3c89beefa933f760362e5772d01ee46b7eaa79748f388e7d570403f40c languageName: node linkType: hard -"@smithy/credential-provider-imds@npm:^2.2.1": - version: 2.2.1 - resolution: "@smithy/credential-provider-imds@npm:2.2.1" +"@smithy/credential-provider-imds@npm:^2.0.0, @smithy/credential-provider-imds@npm:^2.1.5": + version: 2.1.5 + resolution: "@smithy/credential-provider-imds@npm:2.1.5" dependencies: - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/url-parser": "npm:^2.1.1" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/property-provider": "npm:^2.0.17" + "@smithy/types": "npm:^2.8.0" + "@smithy/url-parser": "npm:^2.0.16" tslib: "npm:^2.5.0" - checksum: 2e6ff2d96dbc27d9a3020d58b70423205c92c5a16bf5879182d1713f20212f8d7f97a6bdc769b3b04ef43869f605a1b6f6c889f6fa2a134105065309ef833f77 + checksum: 829d1c1c37fa68aa4e1802e95f3ebd7f6ed9a30334890dd1a34225503afcb8a20723540a6bf1e763840bdf170c183677160436458083bb1c9ecd55562f007868 languageName: node linkType: hard -"@smithy/eventstream-codec@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/eventstream-codec@npm:2.1.1" +"@smithy/eventstream-codec@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/eventstream-codec@npm:2.0.16" dependencies: "@aws-crypto/crc32": "npm:3.0.0" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-hex-encoding": "npm:^2.1.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-hex-encoding": "npm:^2.0.0" tslib: "npm:^2.5.0" - checksum: 54c5051acbb41552d9a1436ed658fe56c36a3be2558ddcae73d3b909d908cdf73c5fe16f62e62a6daff338b429c614b758e743c7a56be9cd5876d2c1204f5351 + checksum: c0fe19690bcb5f14b869841a2bde859894286d7eb2538146a3d12e6d957f36394bb90f38642ed5d35a88c66a4766a384c5d9b0ed3f22ead1c8fef1ec1531989b languageName: node linkType: hard -"@smithy/eventstream-serde-browser@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/eventstream-serde-browser@npm:2.1.1" +"@smithy/eventstream-serde-browser@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/eventstream-serde-browser@npm:2.0.16" dependencies: - "@smithy/eventstream-serde-universal": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/eventstream-serde-universal": "npm:^2.0.16" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: cbe857f80fb621bec432569b298785719f73dfe3a8e1763359a25a824463f35ad4355a87a04fe40475359a33d5ef1121785af3e01270ca684504f6fbf0edc02b + checksum: 7a8e5314a537e93f6a88df323d68ea5806cf659b07a586c86f359bf1b585f055de6d4d3f0c37d2e032d2aaa79015768c3f9d12a200ed49535d7134c72eed4cd2 languageName: node linkType: hard -"@smithy/eventstream-serde-config-resolver@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/eventstream-serde-config-resolver@npm:2.1.1" +"@smithy/eventstream-serde-config-resolver@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/eventstream-serde-config-resolver@npm:2.0.16" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 17be0e4a1c71a1927fa8a3d3dcd5718d6307c728fbdf5a72bd80b17bdb11c46adf5acbb6c161822c795dff24f534e914b725c4ff53b606bdcc2b5b7ee47b01fa + checksum: 4ed2af1665f7e2238d644e5c0e085def68915d9ca7f76a825cecc084fb242486c07b9fca3b1c5c1138beeba64090ef95d2b1c7f038dacd0eb80a87a1c81a752c languageName: node linkType: hard -"@smithy/eventstream-serde-node@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/eventstream-serde-node@npm:2.1.1" +"@smithy/eventstream-serde-node@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/eventstream-serde-node@npm:2.0.16" dependencies: - "@smithy/eventstream-serde-universal": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/eventstream-serde-universal": "npm:^2.0.16" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 34224b488444bd5e095aa0b597a938dcab65e262dbe54056178f544bedec72ac78e3c1642287703efd9af1bd891c63db26dbcb1f394477e3b57f8160c8138fc7 + checksum: 83c21f0d38a70b5b76032341b04e62f1094d1f25cbcacc9c0875b3aa34e99d084ae6fd12ded0551bd040612be62b44ab2e5b1abc51e786319eb22c1c07f9d5a0 languageName: node linkType: hard -"@smithy/eventstream-serde-universal@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/eventstream-serde-universal@npm:2.1.1" +"@smithy/eventstream-serde-universal@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/eventstream-serde-universal@npm:2.0.16" dependencies: - "@smithy/eventstream-codec": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/eventstream-codec": "npm:^2.0.16" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: ca52356375c9e7c701f3cd96179095435a37593edc84f55b686264b85825759d84827550db2f4644eb594ddb7cad24c54174581235ef189847574de27d520805 + checksum: fa35f3074547dac19476432c1abfb62b0b6432fc8c733aa5d8fb032c603fc35cf06bcf8b0559826e3108a0b67ec7986948f512efd4974e154cdbf88fbe1ae6a5 languageName: node linkType: hard -"@smithy/fetch-http-handler@npm:^2.4.1": - version: 2.4.1 - resolution: "@smithy/fetch-http-handler@npm:2.4.1" +"@smithy/fetch-http-handler@npm:^2.3.2": + version: 2.3.2 + resolution: "@smithy/fetch-http-handler@npm:2.3.2" dependencies: - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/querystring-builder": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-base64": "npm:^2.1.1" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/querystring-builder": "npm:^2.0.16" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-base64": "npm:^2.0.1" tslib: "npm:^2.5.0" - checksum: a91e454b70966d9b51bc762f065938bab51c86e0ff519ec09085a166a5b8d582d54f0bce5803c4f7df245255e6a822f8d5c15d70041d8a6c6be7714b32e8d489 + checksum: 0f64f8398f7e583390fc2fb967e55df4bc404a0d961353723095b18a2d64e65c72e58c20c6b33e42b1a62085ad39d67e804a6a4920b62ca9591c14bfe2803d65 languageName: node linkType: hard -"@smithy/hash-blob-browser@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/hash-blob-browser@npm:2.1.1" +"@smithy/hash-blob-browser@npm:^2.0.17": + version: 2.0.17 + resolution: "@smithy/hash-blob-browser@npm:2.0.17" dependencies: - "@smithy/chunked-blob-reader": "npm:^2.1.1" - "@smithy/chunked-blob-reader-native": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/chunked-blob-reader": "npm:^2.0.0" + "@smithy/chunked-blob-reader-native": "npm:^2.0.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: ff2537783211c65b6c57e21d605931c6715317b6644cdf19fd0a36d489b4cf3730a8a6dbe1ccc8d54301a5d575f63c14757b926652e719fef2b984557e6ad072 + checksum: a277c4c51ba05e78247f4979d1dccea1138c8fad85a59b4f25373737c607876e2b5f2af8d6b88b71a199ef73467e29a7305fe585da324a3d91e76d47a58c51bc languageName: node linkType: hard -"@smithy/hash-node@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/hash-node@npm:2.1.1" +"@smithy/hash-node@npm:^2.0.18": + version: 2.0.18 + resolution: "@smithy/hash-node@npm:2.0.18" dependencies: - "@smithy/types": "npm:^2.9.1" - "@smithy/util-buffer-from": "npm:^2.1.1" - "@smithy/util-utf8": "npm:^2.1.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-buffer-from": "npm:^2.0.0" + "@smithy/util-utf8": "npm:^2.0.2" tslib: "npm:^2.5.0" - checksum: 66514402c338a25d52b000cc8d740696367c4fc230af4bac2124bf7c8bfd9f955fdee1becdf290f21b1153596b7288400407850beeb92f78d0e1107f6454faa3 + checksum: ca85ebafafe6719f57a9dd784209aaef60295de6167f07dfbd764072d2e36327dcca088551180175faf528b9e3045ab600696934170d3ea256a5967383a1c53f languageName: node linkType: hard -"@smithy/hash-stream-node@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/hash-stream-node@npm:2.1.1" +"@smithy/hash-stream-node@npm:^2.0.18": + version: 2.0.18 + resolution: "@smithy/hash-stream-node@npm:2.0.18" dependencies: - "@smithy/types": "npm:^2.9.1" - "@smithy/util-utf8": "npm:^2.1.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-utf8": "npm:^2.0.2" tslib: "npm:^2.5.0" - checksum: b5ea20b8446db158207ddcc0e6f70d3368bac42bad165d5e58053c69892472b0248099d6d4fb96ecec4b29a73a6a15074ebce528465438cac7516726c59a5ad9 + checksum: 7b6c2caeaf8fa6f1910a2b4c3aef7472073c9e1ec4446e8a4af16ff58f7cd8838e7c81ddf6f206c2a339988c9120f6cba4728fd008b6f47d00befd8f54e08751 languageName: node linkType: hard -"@smithy/invalid-dependency@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/invalid-dependency@npm:2.1.1" +"@smithy/invalid-dependency@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/invalid-dependency@npm:2.0.16" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: c0c6540a06df1b9ea24632a5a03b7a951a137f155484f11e0a82312814234c61f60e2c4d7c5ae2557af875a78c9fd6d5bc3d0ea17c7e873f2650ea6761c0c147 + checksum: 0055d593c20bc0e5d86836fee62c1fc41d236115c80b61d088186192c4438412136e7be5b1e8ab4207108882a51d337c7017574622e0f4837f538be4d1f8a74c languageName: node linkType: hard -"@smithy/is-array-buffer@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/is-array-buffer@npm:2.1.1" +"@smithy/is-array-buffer@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/is-array-buffer@npm:2.0.0" dependencies: tslib: "npm:^2.5.0" - checksum: 0724355a8fa1e61c9fb77c6e6965cc7eae0cd561f158b768f8d1c9a26254db149bb545b318cdd81ebe383bbe5f26f6197b144c69e812dfd55f512e511e0ccbd8 + checksum: 30f8e51403c52f27b5a6777e565128f2c8523d6e9a99f2005cdcaa31b7401376de77fa4a245de4a397d605af1cead8bea3189f3e7450386888e1656fe728030d languageName: node linkType: hard -"@smithy/md5-js@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/md5-js@npm:2.1.1" +"@smithy/md5-js@npm:^2.0.18": + version: 2.0.18 + resolution: "@smithy/md5-js@npm:2.0.18" dependencies: - "@smithy/types": "npm:^2.9.1" - "@smithy/util-utf8": "npm:^2.1.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-utf8": "npm:^2.0.2" tslib: "npm:^2.5.0" - checksum: 17a622b78263e230817a3793d2e89f602ce62be9badd4e855c39117cb21cb1c203173ff01f3c17b9424183a4b900a1693d7162fe4a6e5b0409480896d49e5e7e + checksum: 471e7b3d4da5a72fd3632120df82feab20daecf5a67330b5e376bf5bbdd904c0d83768c8aea183e3287c1eea18de24ab9d145f6daf2b753139247a1b98c7fcd1 languageName: node linkType: hard -"@smithy/middleware-content-length@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/middleware-content-length@npm:2.1.1" +"@smithy/middleware-content-length@npm:^2.0.18": + version: 2.0.18 + resolution: "@smithy/middleware-content-length@npm:2.0.18" dependencies: - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: ca871efeafd7009609e73012e3a0ec1ab28418c93f839814c22063e7fcf033fc9f68dd7e3a005a188c91e02d745b699898c78d17d83bf7483cba705453ce7545 + checksum: 84414174ecadcfeba5236bc9ab5d69c0b85b25b2356a6fc20472b9e1aba6c33750cdc3bd0fa508609a0616a69b88c2591515cf22ad499e33a3b10bf37e590f68 languageName: node linkType: hard -"@smithy/middleware-endpoint@npm:^2.4.1": - version: 2.4.1 - resolution: "@smithy/middleware-endpoint@npm:2.4.1" +"@smithy/middleware-endpoint@npm:^2.3.0": + version: 2.3.0 + resolution: "@smithy/middleware-endpoint@npm:2.3.0" dependencies: - "@smithy/middleware-serde": "npm:^2.1.1" - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/shared-ini-file-loader": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/url-parser": "npm:^2.1.1" - "@smithy/util-middleware": "npm:^2.1.1" + "@smithy/middleware-serde": "npm:^2.0.16" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/shared-ini-file-loader": "npm:^2.2.8" + "@smithy/types": "npm:^2.8.0" + "@smithy/url-parser": "npm:^2.0.16" + "@smithy/util-middleware": "npm:^2.0.9" tslib: "npm:^2.5.0" - checksum: 4c23f4aac71e67f4bc4fded8cc033bfb881468d7c57e13927f32c554b77b62170057219751e1648a065630ceb4816321548a28f4e4b05a934f95f615bcfce887 + checksum: 6a4a40755647afa24334de39faac340541bbcef60ef51ef65e6912b81cc44a45aefe8c189dabc8df80fab7288503fcb90eeed456a7aa8e33abc081c290beb057 languageName: node linkType: hard -"@smithy/middleware-retry@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/middleware-retry@npm:2.1.1" +"@smithy/middleware-retry@npm:^2.0.26": + version: 2.0.26 + resolution: "@smithy/middleware-retry@npm:2.0.26" dependencies: - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/service-error-classification": "npm:^2.1.1" - "@smithy/smithy-client": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-middleware": "npm:^2.1.1" - "@smithy/util-retry": "npm:^2.1.1" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/service-error-classification": "npm:^2.0.9" + "@smithy/smithy-client": "npm:^2.2.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-middleware": "npm:^2.0.9" + "@smithy/util-retry": "npm:^2.0.9" tslib: "npm:^2.5.0" uuid: "npm:^8.3.2" - checksum: da2b108c96c1d3c10b1b41f58be3ddf9358fc85547afb6f5a626145a48d06d1403ff0600b632db99879f4cedd7bcfd0dc25786d8d583c09b8369b408b7787a82 + checksum: a615088a66392031cd6eac152bb7550232e5ec3bac53a7b19ac804a4e4fae128bcc3fbfc125bc3686585036056f5fee7520c986fa32b35071cfe69b786bec7a8 languageName: node linkType: hard -"@smithy/middleware-serde@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/middleware-serde@npm:2.1.1" +"@smithy/middleware-serde@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/middleware-serde@npm:2.0.16" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 84fd7a65e1e0c425607e09d06feaf4a7b7e99d22aba41dab057f3ccdc9b04095c8cb65090c4b2d1781ebce653cd997cd1d99cb5112595fa39abf1d0dd5cf86bd + checksum: d3b2ffafd106d2c4d9f5166411f70c9691c05a56d599c0a7d53d879d3d083f1940523c7fb8db509e65b79d11f4056e37ce8e776b607d6b479ef7ea8bacbd648c languageName: node linkType: hard -"@smithy/middleware-stack@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/middleware-stack@npm:2.1.1" +"@smithy/middleware-stack@npm:^2.0.10": + version: 2.0.10 + resolution: "@smithy/middleware-stack@npm:2.0.10" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 4de8e63047cc0d54e84a66b505f16b7bde4d2c91feb5f3aa9e5ad5429c1d71cc82876418e3d07dd942b4bdb4715e31f38efa0df966d02b5c01ba57fca7473f00 + checksum: fcd8236988295b39f03f93c083a449202b28f5b7d7cd3992e6c4cdad429b5e8fbb4fe31d6d749d7524c3780d521a6df2ae7157ee904174b423af39b74ef2d5c5 languageName: node linkType: hard -"@smithy/node-config-provider@npm:^2.2.1": - version: 2.2.1 - resolution: "@smithy/node-config-provider@npm:2.2.1" +"@smithy/node-config-provider@npm:^2.1.9": + version: 2.1.9 + resolution: "@smithy/node-config-provider@npm:2.1.9" dependencies: - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/shared-ini-file-loader": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/property-provider": "npm:^2.0.17" + "@smithy/shared-ini-file-loader": "npm:^2.2.8" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 1122407d9bae623a2bc009acfd2ea3a2b047b5a455573fa811ba493d9b6b03093a8a77ff8277aa63289ea1ce14428e8ba3d89c21dd0b5629fc1f73d8ac6fd484 + checksum: 32ef8d315096ddd728f00c3137a69c33438e27ea600ab9f0c720ad5535436357274399f0b5f6bc95fda02a0f30e77b6f8ef4ab7a5561b1723fcd1b422f88defa languageName: node linkType: hard -"@smithy/node-http-handler@npm:^2.3.1": - version: 2.3.1 - resolution: "@smithy/node-http-handler@npm:2.3.1" +"@smithy/node-http-handler@npm:^2.2.2": + version: 2.2.2 + resolution: "@smithy/node-http-handler@npm:2.2.2" dependencies: - "@smithy/abort-controller": "npm:^2.1.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/querystring-builder": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/abort-controller": "npm:^2.0.16" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/querystring-builder": "npm:^2.0.16" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 84e8c44b2f948e77fc96f327c72c8f8309dce410c398effd1bbdc7fb9e6f24364bed10fa6bd9feb119e4cdea7e76d03e3f3347bc2346fb2bf6d1aea4e2f36324 + checksum: 545e306c879062753178d3671e4b68f5fe5384f14cab90a60567c680eecfbc8f2615966bf89d6d464f68b1d8d1606aaf7d548f03bfe8ef0d52869337afd30db2 languageName: node linkType: hard -"@smithy/property-provider@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/property-provider@npm:2.1.1" +"@smithy/property-provider@npm:^2.0.0, @smithy/property-provider@npm:^2.0.17": + version: 2.0.17 + resolution: "@smithy/property-provider@npm:2.0.17" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 74392f4814da0d5546cfacf6598f2c00d619fa0ddad8b7fe75c9fa0e0fc4708905e8062e3a3409a46eaf952fb8d21830ce85e05c796e7ee17c5d989cd663e93e + checksum: f25ec4888b335c4a8ac38a78ee2ac12119ba1b717c8905856faf4041d003173dfaf3a484c651c17454705a61059abff7873fba5618ae2e5adab9234da9079233 languageName: node linkType: hard -"@smithy/protocol-http@npm:^3.1.1": - version: 3.1.1 - resolution: "@smithy/protocol-http@npm:3.1.1" +"@smithy/protocol-http@npm:^3.0.12": + version: 3.0.12 + resolution: "@smithy/protocol-http@npm:3.0.12" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 4b3f0acfbab4690f0e00d649fc9a6ea2e14e4cbe9b6ffba9f09353c24979a52cea175ea56dd0c91542dbd966b82a20a529983f44f5e392a15e32c2b31661b262 + checksum: 4fd205f54c9b17900a5b5135fc14d4b692ace53aba7d37cda18c42620d4380c46c93702d573debb2716207588295cee86640e9760cb8ca64dfb58a69898d2959 languageName: node linkType: hard -"@smithy/querystring-builder@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/querystring-builder@npm:2.1.1" +"@smithy/querystring-builder@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/querystring-builder@npm:2.0.16" dependencies: - "@smithy/types": "npm:^2.9.1" - "@smithy/util-uri-escape": "npm:^2.1.1" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-uri-escape": "npm:^2.0.0" tslib: "npm:^2.5.0" - checksum: 110d65892d7df181480ea6a6f8b276d10bac87b6c9a05f787a357712c039b18124ebad462852aaad4573d4fb925f4315ec5fc0389b784e73b57bbb2b24726a57 + checksum: 8dc67e8e3e933fe2dfe3846b42ceba8c445a9054087ca37ec5b3cacd4c108dffcf17b87a89b5248528e8662603a719dcdac5c5951db8a02115a3eefa40ab0b89 languageName: node linkType: hard -"@smithy/querystring-parser@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/querystring-parser@npm:2.1.1" +"@smithy/querystring-parser@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/querystring-parser@npm:2.0.16" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: f6bc4e1f6aa5b76440b9b0b249093594f28a4136fc499f698c916df30cb3fb25860cc2f94e3508f39828d95eb0bff644ee9a2e209dbf6c84bf9baf4409a7d03d + checksum: 0c0f34fcdea223f2b96dba9cbae083b785d4518407ebfe0491a2932318c21cae52c210ce9727848a6f2b58817bef3186baebc5aab5845a2e7edf2a7981843789 languageName: node linkType: hard -"@smithy/service-error-classification@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/service-error-classification@npm:2.1.1" +"@smithy/service-error-classification@npm:^2.0.9": + version: 2.0.9 + resolution: "@smithy/service-error-classification@npm:2.0.9" dependencies: - "@smithy/types": "npm:^2.9.1" - checksum: bd25500eb5a60aee36b51d6b5a0850f135b332b4cf5f42e35e88610fa695eb8c2f2ad012e244fb82327501b2eb143900026ba9b47365e5b93b4db5a860bf7eb6 + "@smithy/types": "npm:^2.8.0" + checksum: 5eaa401dbb1ebf6e7f27c0f05d2720ce65f4520d14085f43ebfe3b6ae145ff04a3424fee11669e485cd221eb12b8c3f6a2dbf8dff804581d9705f767f1fd52d5 languageName: node linkType: hard -"@smithy/shared-ini-file-loader@npm:^2.3.1": - version: 2.3.1 - resolution: "@smithy/shared-ini-file-loader@npm:2.3.1" +"@smithy/shared-ini-file-loader@npm:^2.0.6, @smithy/shared-ini-file-loader@npm:^2.2.8": + version: 2.2.8 + resolution: "@smithy/shared-ini-file-loader@npm:2.2.8" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 451570089499a97cc279001433def396fc510a5ee0d2ed687575fc33c2475d0f7a094338a4c5c609e6115d824a2f89eafa34894aff20d054c308571116d7dd5f + checksum: a6d9ee4e5929ce18447f9a852a83e86e73d5e119e059b47db1219753c54240130f0326ab11ef0fcf0b1c4c1cca6fdba0e9c8f28cb2dc2c9f55823fcd2621118e languageName: node linkType: hard -"@smithy/signature-v4@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/signature-v4@npm:2.1.1" +"@smithy/signature-v4@npm:^2.0.0": + version: 2.0.19 + resolution: "@smithy/signature-v4@npm:2.0.19" dependencies: - "@smithy/eventstream-codec": "npm:^2.1.1" - "@smithy/is-array-buffer": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-hex-encoding": "npm:^2.1.1" - "@smithy/util-middleware": "npm:^2.1.1" - "@smithy/util-uri-escape": "npm:^2.1.1" - "@smithy/util-utf8": "npm:^2.1.1" + "@smithy/eventstream-codec": "npm:^2.0.16" + "@smithy/is-array-buffer": "npm:^2.0.0" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-hex-encoding": "npm:^2.0.0" + "@smithy/util-middleware": "npm:^2.0.9" + "@smithy/util-uri-escape": "npm:^2.0.0" + "@smithy/util-utf8": "npm:^2.0.2" tslib: "npm:^2.5.0" - checksum: 4e4b4ae098af8ed9c09c024b489ef0b15bef3492cbd932ac0f4e59c6de9bc0ea59269baa75b4fe1cc90fdb904161067653da80dc884ca9e4f880f2bed2c8edd4 + checksum: 58eff5c6fd7d2353e64df9cb01fc1fdf7078df052cf91c856fa1a2f8df9edfc4a35c751ee7c377d4c45e0dc4a940a94659e1e5ddd4f1ffdb11627da700499090 languageName: node linkType: hard -"@smithy/smithy-client@npm:^2.3.1": - version: 2.3.1 - resolution: "@smithy/smithy-client@npm:2.3.1" +"@smithy/smithy-client@npm:^2.2.1": + version: 2.2.1 + resolution: "@smithy/smithy-client@npm:2.2.1" dependencies: - "@smithy/middleware-endpoint": "npm:^2.4.1" - "@smithy/middleware-stack": "npm:^2.1.1" - "@smithy/protocol-http": "npm:^3.1.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-stream": "npm:^2.1.1" + "@smithy/middleware-endpoint": "npm:^2.3.0" + "@smithy/middleware-stack": "npm:^2.0.10" + "@smithy/protocol-http": "npm:^3.0.12" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-stream": "npm:^2.0.24" tslib: "npm:^2.5.0" - checksum: c5841a915d95ae3b4402b670f566c2eb78b4e01360d3ec3a54147cb2997e04b489ae7f3c28aea65e1d9c26e40ef17ee915422e91855976cc85a67af97e235f22 + checksum: 6e5d67d11e7c10db35604caf2dc4daa841f0b55b9f97092b34d819250737af8ca7a84a98870cbd249067c2aff478901b39dd16d9cecdaa9a53c1b2c58f8eb4f7 languageName: node linkType: hard @@ -5184,176 +5222,176 @@ __metadata: languageName: node linkType: hard -"@smithy/url-parser@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/url-parser@npm:2.1.1" +"@smithy/url-parser@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/url-parser@npm:2.0.16" dependencies: - "@smithy/querystring-parser": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/querystring-parser": "npm:^2.0.16" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: c6452f923176747fe49d16e449624b7e7436d789faa1d30b5f5b07fd31a66ff624a80210fe6420c840b01903efe2b2492da40dd92ec0818f0358f1c64e97c103 + checksum: f9d6e65ee1cdcfa0f816c1c2c71988fd07d6abcc8d04e10cc05a8bf2c848656befb983a0c8118020e08e60e9704ba45436f7061a8717da8ac1f640e79aef9f95 languageName: node linkType: hard -"@smithy/util-base64@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-base64@npm:2.1.1" +"@smithy/util-base64@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/util-base64@npm:2.0.1" dependencies: - "@smithy/util-buffer-from": "npm:^2.1.1" + "@smithy/util-buffer-from": "npm:^2.0.0" tslib: "npm:^2.5.0" - checksum: 379aa5f1f1c4700e561767f8534ff3921bbacc8bb8afd915a22e242641bbb282ea6b5e19944c64ae014af56a7434354fe26f4387f3c75c5e4d692217ec423582 + checksum: 6c71765396e7c36229f78b3ab7404d86390b4191350955b3af3ca6e3e42f67428801722706153f5593571be51f3b418843c49326d894cd4445eb9ed9a04844a7 languageName: node linkType: hard -"@smithy/util-body-length-browser@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-body-length-browser@npm:2.1.1" +"@smithy/util-body-length-browser@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/util-body-length-browser@npm:2.0.1" dependencies: tslib: "npm:^2.5.0" - checksum: 749b3fcc72f5df40be377e997537a90a67b75b304b14cf141112093a587916c670a6e52e1bb663fff74e8f31129884bc78779b00a2f3549f659815562a304e7a + checksum: fdeea18772d7d4542d0192a5cf9b145f7626b8ab76be57bd7453cb73d84480bb12f83b982467b7e4dc015434e16c9e3f7ffdffa0e4ba1c4f6e570c0425bee3d1 languageName: node linkType: hard -"@smithy/util-body-length-node@npm:^2.2.1": - version: 2.2.1 - resolution: "@smithy/util-body-length-node@npm:2.2.1" +"@smithy/util-body-length-node@npm:^2.1.0": + version: 2.1.0 + resolution: "@smithy/util-body-length-node@npm:2.1.0" dependencies: tslib: "npm:^2.5.0" - checksum: 7e8df29ea7f2c08022c4339480ebde68173fb8147082123309253a6aa9a11055fde649483d743cfbac69f0789630e12e8e5afd276f55efe6a9b20bdf0ec6732d + checksum: 1b2e3a99811b623d68e800a4c400a0a55eb9ce12f5cfa5b8509a0fdd805a279a931759ff55472983b37dcbcc58221a3bbfef86e5e4304af973a1e2c5f8651078 languageName: node linkType: hard -"@smithy/util-buffer-from@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-buffer-from@npm:2.1.1" +"@smithy/util-buffer-from@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-buffer-from@npm:2.0.0" dependencies: - "@smithy/is-array-buffer": "npm:^2.1.1" + "@smithy/is-array-buffer": "npm:^2.0.0" tslib: "npm:^2.5.0" - checksum: 5de4cf8b2d9c5347990be5791882947a509ba00a55ee67589f327e4852309dac5278248317929519f5a9d2aa5dc1c11cd54803db962287909e0322b7f73332bc + checksum: 15326acdb8666ff8c342bfa23ace07ea6a1b7e849b118f5b28f0b93cd775e83c77fa53ab5b04b8f795798d316991042296c3c5522fb68c91df9e921d4c83e398 languageName: node linkType: hard -"@smithy/util-config-provider@npm:^2.2.1": - version: 2.2.1 - resolution: "@smithy/util-config-provider@npm:2.2.1" +"@smithy/util-config-provider@npm:^2.1.0": + version: 2.1.0 + resolution: "@smithy/util-config-provider@npm:2.1.0" dependencies: tslib: "npm:^2.5.0" - checksum: bdca0bdf95cfaf67916e130356f80aa67555c1c423c0b98d283f2852782371b6fa09fee375a0a85eb43732a94733e0da7ad004b01f961dbd88f35a90258f0722 + checksum: 42f02104e24ae9deadf69b45c2ebee4b7a65a908b7ccfeb85bb6d1036032d36d1c044ff1eab25f43147dc02a15adb8a9f6517ed586a545d4a757985a1530d2ac languageName: node linkType: hard -"@smithy/util-defaults-mode-browser@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-defaults-mode-browser@npm:2.1.1" +"@smithy/util-defaults-mode-browser@npm:^2.0.24": + version: 2.0.24 + resolution: "@smithy/util-defaults-mode-browser@npm:2.0.24" dependencies: - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/smithy-client": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/property-provider": "npm:^2.0.17" + "@smithy/smithy-client": "npm:^2.2.1" + "@smithy/types": "npm:^2.8.0" bowser: "npm:^2.11.0" tslib: "npm:^2.5.0" - checksum: 945ad1472d79d6e85cff706bd7fab7b628b54e112fd1891013a0bc600ed38a762425e1e995d3b67f730434445d428f95165d3cb9cfd20bfcb416c9ca610c5b52 + checksum: b8cf6f1fecd5765d55557b7656b12a12e8468b9f343ef04dfdededba9d8894172933201ee922547ee5025ba1ca979db2071e6588f9b6df16797087ab065b5690 languageName: node linkType: hard -"@smithy/util-defaults-mode-node@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-defaults-mode-node@npm:2.1.1" +"@smithy/util-defaults-mode-node@npm:^2.0.32": + version: 2.0.32 + resolution: "@smithy/util-defaults-mode-node@npm:2.0.32" dependencies: - "@smithy/config-resolver": "npm:^2.1.1" - "@smithy/credential-provider-imds": "npm:^2.2.1" - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/property-provider": "npm:^2.1.1" - "@smithy/smithy-client": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/config-resolver": "npm:^2.0.23" + "@smithy/credential-provider-imds": "npm:^2.1.5" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/property-provider": "npm:^2.0.17" + "@smithy/smithy-client": "npm:^2.2.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: f51ca2872b338eadcf685ca818372abe2ccd6d1d0599b302c46fc9700ef667b34290da1dc67f3f32442dcc7234b2f3729e91de20f3a5741a5af7aacac87d3d22 + checksum: d25372e50f91f593ca38c6d2cb722b0d87d6a0334de57d90fdd7364ef91fff227f19579a1734d6fcbd19a60563757ed9ff1afce4eeaf257d915876f832bed2fc languageName: node linkType: hard -"@smithy/util-endpoints@npm:^1.1.1": - version: 1.1.1 - resolution: "@smithy/util-endpoints@npm:1.1.1" +"@smithy/util-endpoints@npm:^1.0.8": + version: 1.0.8 + resolution: "@smithy/util-endpoints@npm:1.0.8" dependencies: - "@smithy/node-config-provider": "npm:^2.2.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/node-config-provider": "npm:^2.1.9" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 9119baa6f4a3ec89eb424b500ad0bfe635a91be57e1fcb8e5785f12c567d4b12a0310a686bbb44bfce4a5d64c810ef60c67d43d9d0cfaff3b128612e274dae1e + checksum: 09cdf2178131c323bd69000af9c5ea93654036ccaa04d963f67d86c87bb84875b070b71a6e07e809c30fb7cf1629c9e538516a00cb103f55ba22f2b58ebe0e07 languageName: node linkType: hard -"@smithy/util-hex-encoding@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-hex-encoding@npm:2.1.1" +"@smithy/util-hex-encoding@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-hex-encoding@npm:2.0.0" dependencies: tslib: "npm:^2.5.0" - checksum: df805a72f6d28fc081c4080f0a9c67f1fa3416f40b45f7491990b10b9ee044c3141fb1963bbdfe03cf599c5fe8bd3ed856f1463c6917a0d9f647bd1f37c72514 + checksum: 196b594d5e4a31fbc6a6ada8e1af307e0af55721685df70e20415733f46d6d2d6f7c52f9d2bf4512f0033cc1adb74f115c68025d9b7d7023342ef6f0514cee2a languageName: node linkType: hard -"@smithy/util-middleware@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-middleware@npm:2.1.1" +"@smithy/util-middleware@npm:^2.0.9": + version: 2.0.9 + resolution: "@smithy/util-middleware@npm:2.0.9" dependencies: - "@smithy/types": "npm:^2.9.1" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 80067715932c4c90ed79ce10e7cf5906c43f604be7a893a735c66e1d464299fcd4493c7ad6a8f9124f40e509e9f9131dd87a22bd5ed7b7a0d8ab831ffd1fb491 + checksum: 1d379da341488d8d9af31d2b589b2875afa6c12a977934b135fdada30e75eace64fea3b673d090aeb8976d21a836cb146603e88c84b44b39a0547ea7eaa10c94 languageName: node linkType: hard -"@smithy/util-retry@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-retry@npm:2.1.1" +"@smithy/util-retry@npm:^2.0.9": + version: 2.0.9 + resolution: "@smithy/util-retry@npm:2.0.9" dependencies: - "@smithy/service-error-classification": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/service-error-classification": "npm:^2.0.9" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: b3b2d11cd0579345eb94a73ffd98e8e9cd9b9d64ad3dee12680589018d54f1ac032e72725e4100ff06c59914b8b491b12820fb1003775062d22bf2fa5430cae3 + checksum: f28f1215cbe2c0eab5de65db21d13092b6b81ac807c08c491c36db9f68e8b1598e4f53f9536299aa770c115cd67bae8d10b1151ff7e253563bc1323ae9a9276e languageName: node linkType: hard -"@smithy/util-stream@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-stream@npm:2.1.1" +"@smithy/util-stream@npm:^2.0.24": + version: 2.0.24 + resolution: "@smithy/util-stream@npm:2.0.24" dependencies: - "@smithy/fetch-http-handler": "npm:^2.4.1" - "@smithy/node-http-handler": "npm:^2.3.1" - "@smithy/types": "npm:^2.9.1" - "@smithy/util-base64": "npm:^2.1.1" - "@smithy/util-buffer-from": "npm:^2.1.1" - "@smithy/util-hex-encoding": "npm:^2.1.1" - "@smithy/util-utf8": "npm:^2.1.1" + "@smithy/fetch-http-handler": "npm:^2.3.2" + "@smithy/node-http-handler": "npm:^2.2.2" + "@smithy/types": "npm:^2.8.0" + "@smithy/util-base64": "npm:^2.0.1" + "@smithy/util-buffer-from": "npm:^2.0.0" + "@smithy/util-hex-encoding": "npm:^2.0.0" + "@smithy/util-utf8": "npm:^2.0.2" tslib: "npm:^2.5.0" - checksum: dc490f6eb5e22ff24afcb374d30002ed404b00044534565813dd567ea3f76d9f473052878a7d5f660c78690600f562c85b1deed549cd494b8531b911ac9b1a74 + checksum: fa22edcd38385a5b261a678cef976eb24652f0a29f566e79a7503b04a44b698422ba975a27808e11e28f5a61d9d276dae3141cd9bb201ca7e618b74e15ae6a83 languageName: node linkType: hard -"@smithy/util-uri-escape@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-uri-escape@npm:2.1.1" +"@smithy/util-uri-escape@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-uri-escape@npm:2.0.0" dependencies: tslib: "npm:^2.5.0" - checksum: ca232b27b0ef25b3e3eca141454db1cc6d01b999b57b6b176c2af6578c38dbd1df5cb3d6984f0a30c55ea10b4e7d4e7758387da8ee674de91897b2c632a92995 + checksum: 2f121d1fce9878e22fc5eaa0f8f4e47e967fce6d727b4283902d842842c7835b47de08e16b2c6fef389457a6edf2523274019fe511ede98ce0f38a11aea63bc2 languageName: node linkType: hard -"@smithy/util-utf8@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-utf8@npm:2.1.1" +"@smithy/util-utf8@npm:^2.0.2": + version: 2.0.2 + resolution: "@smithy/util-utf8@npm:2.0.2" dependencies: - "@smithy/util-buffer-from": "npm:^2.1.1" + "@smithy/util-buffer-from": "npm:^2.0.0" tslib: "npm:^2.5.0" - checksum: 736992921e50c2c96234dc5eab305a30d29b1cfa29ce5ad2ec0e4b3f2e0dc3e2d29303bd1362bd20fa2e66c5fd494c558f4b1050b91ead5e13a479903bb9686f + checksum: 9356200ac7ccef414cd924b4fd2bfeb1d0a2e7992b4c924f0328205ab9bb8c688bc4b5c271c237db90ea75fb448f32c1f76c6e8883c2f088ea0559737ea99d9d languageName: node linkType: hard -"@smithy/util-waiter@npm:^2.1.1": - version: 2.1.1 - resolution: "@smithy/util-waiter@npm:2.1.1" +"@smithy/util-waiter@npm:^2.0.16": + version: 2.0.16 + resolution: "@smithy/util-waiter@npm:2.0.16" dependencies: - "@smithy/abort-controller": "npm:^2.1.1" - "@smithy/types": "npm:^2.9.1" + "@smithy/abort-controller": "npm:^2.0.16" + "@smithy/types": "npm:^2.8.0" tslib: "npm:^2.5.0" - checksum: 78aab62c873606478c2e8f0ebae9d02ee7dedd65ea1409aaf2f89ee7dd6cebafe249e6a8f1ed9d86d390bdd75dde068a49fb4bf69d62a3506ef2f36ed7bf62cf + checksum: 91cff83f1450cc761ec8a7b77c09af5ffa10619f40d560fd3f14633b63486dad2c274df7fc44fbd80c6e2ea4ec8b0514990ff8b989afa50467296e8cdada611b languageName: node linkType: hard @@ -5783,15 +5821,6 @@ __metadata: languageName: node linkType: hard -"@types/elliptic@npm:^6.4.9": - version: 6.4.14 - resolution: "@types/elliptic@npm:6.4.14" - dependencies: - "@types/bn.js": "npm:*" - checksum: 603e75b2eb5581d568d3506d26b00340aa2d1a459182a044e5358fdcf7cfcec068e1e25e2e281f44a02aafa1769c6da5dfd0b6a4a307e9f6d8cdb7f1a475d412 - languageName: node - linkType: hard - "@types/expect@npm:^1.20.4": version: 1.20.4 resolution: "@types/expect@npm:1.20.4" @@ -5800,9 +5829,9 @@ __metadata: linkType: hard "@types/fetch-mock@npm:^7.3.5": - version: 7.3.8 - resolution: "@types/fetch-mock@npm:7.3.8" - checksum: de8f44a697b2276c81d2e1ce63e3d2805b5d33b9405f2b313619d58da241e21fdc97402d722b8d17c28e4747cb65d129784d22cf8e5b04f0866b9a219a89e4bd + version: 7.3.5 + resolution: "@types/fetch-mock@npm:7.3.5" + checksum: 33c9d63fd91c6d2419013f99b448caa99bad6c73d35fc780eacf2ed03eb0850a21b0fd5e66238063823ce3b856c815b2ab79c830f051330e6bc46ad47ddb255f languageName: node linkType: hard @@ -5900,12 +5929,12 @@ __metadata: linkType: hard "@types/jest@npm:^29.1.1": - version: 29.5.12 - resolution: "@types/jest@npm:29.5.12" + version: 29.5.11 + resolution: "@types/jest@npm:29.5.11" dependencies: expect: "npm:^29.0.0" pretty-format: "npm:^29.0.0" - checksum: 312e8dcf92cdd5a5847d6426f0940829bca6fe6b5a917248f3d7f7ef5d85c9ce78ef05e47d2bbabc40d41a930e0e36db2d443d2610a9e3db9062da2d5c904211 + checksum: 798f4c89407d9457bea1256de74c26f2b279f6c789c0e3311cd604cc75cdab333b9a29b00c51b0090d31abdf11cc788b4103282851a653bef6daf72edf97eef2 languageName: node linkType: hard @@ -5933,13 +5962,13 @@ __metadata: linkType: hard "@types/ledgerhq__hw-transport-node-hid@npm:^4.22.2": - version: 4.22.5 - resolution: "@types/ledgerhq__hw-transport-node-hid@npm:4.22.5" + version: 4.22.2 + resolution: "@types/ledgerhq__hw-transport-node-hid@npm:4.22.2" dependencies: "@types/ledgerhq__hw-transport": "npm:*" "@types/node": "npm:*" "@types/node-hid": "npm:*" - checksum: 4b9934009e8e5aa43ece0268661cec17e8238c50214caa9a8c196edabb3a41005092932cba3b30e06457ff5cc953bad26a59f4d7b7398884b691ab51bc18a97d + checksum: f8196906ad4102f59046b921693b8d93317d7f641fd03796bd07839d1cec48e6eff5a4f58f969f783a9ded9cd250e5b7009a89ea6528f1e8739ceb52b1f36f46 languageName: node linkType: hard @@ -6003,7 +6032,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:>=12.12.47, @types/node@npm:>=13.7.0, @types/node@npm:^18.7.16": +"@types/node@npm:*, @types/node@npm:>=12.12.47, @types/node@npm:>=13.7.0": version: 18.15.13 resolution: "@types/node@npm:18.15.13" checksum: b9bbe923573797ef7c5fd2641a6793489e25d9369c32aeadcaa5c7c175c85b42eb12d6fe173f6781ab6f42eaa1ebd9576a419eeaa2a1ec810094adb8adaa9a54 @@ -6031,6 +6060,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^18.7.16": + version: 18.19.9 + resolution: "@types/node@npm:18.19.9" + dependencies: + undici-types: "npm:~5.26.4" + checksum: ac7187b2fec8354e0cbefe89baa94f88f48a9b496a0aaf234e811c1c133fd606097a98c7746e8e3b3b060237ddb86cacf6c704640badeaa81b53d1fc014f1fdb + languageName: node + linkType: hard + "@types/normalize-package-data@npm:^2.4.0": version: 2.4.1 resolution: "@types/normalize-package-data@npm:2.4.1" @@ -6061,21 +6099,12 @@ __metadata: languageName: node linkType: hard -"@types/qrcode@npm:^1.3.4": - version: 1.5.0 - resolution: "@types/qrcode@npm:1.5.0" - dependencies: - "@types/node": "npm:*" - checksum: 25c42140285feff5b71d16864a2e43de506463e5cef787b539676d51107b11afabd9819569988f3206a756f6b6940dcdcf29e4a81f790091503c2839098a2b3f - languageName: node - linkType: hard - -"@types/randombytes@npm:^2.0.0": - version: 2.0.0 - resolution: "@types/randombytes@npm:2.0.0" +"@types/qrcode@npm:^1.3.4": + version: 1.5.0 + resolution: "@types/qrcode@npm:1.5.0" dependencies: "@types/node": "npm:*" - checksum: 3835678127f020e1f0812f9dbcf400ef98916bc6fb9aff7d36e701c996ae668163f49a69aa6ce6832ca5dd150e6376e3e586094be4f45cc1e190b0db39320671 + checksum: 25c42140285feff5b71d16864a2e43de506463e5cef787b539676d51107b11afabd9819569988f3206a756f6b6940dcdcf29e4a81f790091503c2839098a2b3f languageName: node linkType: hard @@ -6519,16 +6548,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.4.1": - version: 8.8.2 - resolution: "acorn@npm:8.8.2" - bin: - acorn: bin/acorn - checksum: b4e77d56d24d3e11a45d9ac8ae661b4e14a4af04ae33edbf1e6bf910887e5bb352cc60e9ea06a0944880e6b658f58c095d3b54e88e1921cb9319608b51085dd7 - languageName: node - linkType: hard - -"acorn@npm:^8.9.0": +"acorn@npm:^8.4.1, acorn@npm:^8.9.0": version: 8.11.3 resolution: "acorn@npm:8.11.3" bin: @@ -6967,11 +6987,11 @@ __metadata: linkType: hard "async@npm:^2.4.0": - version: 2.6.3 - resolution: "async@npm:2.6.3" + version: 2.6.4 + resolution: "async@npm:2.6.4" dependencies: lodash: "npm:^4.17.14" - checksum: c6a04e7e5669fdda767a3eb9e3b1c40782bbc3cbb0a4297ad9f87e8b1b036b57c7e69a09f5541d3e2067f2f9d2a484f463231ad9890f24b2a628f8eb53c27e64 + checksum: df8e52817d74677ab50c438d618633b9450aff26deb274da6dfedb8014130909482acdc7753bce9b72e6171ce9a9f6a92566c4ced34c3cb3714d57421d58ad27 languageName: node linkType: hard @@ -7190,13 +7210,6 @@ __metadata: languageName: node linkType: hard -"bigi@npm:^1.4.2": - version: 1.4.2 - resolution: "bigi@npm:1.4.2" - checksum: e8165beb2ad113add286f81a066653295737a3edc6287effae7b72c2d7695be19d36774069e80a977df7187857c9e2c4a9517f6ec966bb887e097ea8d36cc2e0 - languageName: node - linkType: hard - "bignumber.js@npm:9.0.0": version: 9.0.0 resolution: "bignumber.js@npm:9.0.0" @@ -7253,29 +7266,6 @@ __metadata: languageName: node linkType: hard -"bip32@npm:3.1.0, bip32@npm:^3.1.0": - version: 3.1.0 - resolution: "bip32@npm:3.1.0" - dependencies: - bs58check: "npm:^2.1.1" - create-hash: "npm:^1.2.0" - create-hmac: "npm:^1.1.7" - ripemd160: "npm:^2.0.2" - typeforce: "npm:^1.11.5" - wif: "npm:^2.0.6" - checksum: 6cdad901d25959e21835fe7b43066fc2498548962aa07ce438860b7420a7a93ceec3a9b34ddee68bbc568a68b9d96029338dbea1eadb548651b06d800a14fc3d - languageName: node - linkType: hard - -"bip39@https://github.com/bitcoinjs/bip39#a7ecbfe2e60d0214ce17163d610cad9f7b23140c": - version: 3.1.0 - resolution: "bip39@https://github.com/bitcoinjs/bip39.git#commit=a7ecbfe2e60d0214ce17163d610cad9f7b23140c" - dependencies: - "@noble/hashes": "npm:^1.2.0" - checksum: 406c0b5bdab0d43df2ff8916c5b57bb7f65cd36a115cbd7620a75b972638f8511840bfc27bfc68946027086fd33ed3050d8cd304e85fd527503b23d857a8486e - languageName: node - linkType: hard - "bl@npm:^1.0.0": version: 1.2.3 resolution: "bl@npm:1.2.3" @@ -7504,7 +7494,7 @@ __metadata: languageName: node linkType: hard -"bs58check@npm:<3.0.0, bs58check@npm:^2.1.1, bs58check@npm:^2.1.2": +"bs58check@npm:^2.1.2": version: 2.1.2 resolution: "bs58check@npm:2.1.2" dependencies: @@ -7562,13 +7552,6 @@ __metadata: languageName: node linkType: hard -"buffer-reverse@npm:^1.0.1": - version: 1.0.1 - resolution: "buffer-reverse@npm:1.0.1" - checksum: e350872a89b17af0a7e1bd7a73239a535164f3f010b0800add44f2e52bd0511548dc5b96c20309effba969868c385023d2d02a0add6155f6a76da7b3073b77bd - languageName: node - linkType: hard - "buffer-to-arraybuffer@npm:^0.0.5": version: 0.0.5 resolution: "buffer-to-arraybuffer@npm:0.0.5" @@ -7829,17 +7812,7 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": - version: 1.0.2 - resolution: "call-bind@npm:1.0.2" - dependencies: - function-bind: "npm:^1.1.1" - get-intrinsic: "npm:^1.0.2" - checksum: ca787179c1cbe09e1697b56ad499fd05dc0ae6febe5081d728176ade699ea6b1589240cb1ff1fe11fcf9f61538c1af60ad37e8eb2ceb4ef21cd6085dfd3ccedd - languageName: node - linkType: hard - -"call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": +"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": version: 1.0.5 resolution: "call-bind@npm:1.0.5" dependencies: @@ -8200,9 +8173,9 @@ __metadata: linkType: hard "cjs-module-lexer@npm:^1.0.0": - version: 1.2.2 - resolution: "cjs-module-lexer@npm:1.2.2" - checksum: f80f84bfdcc53379cc18e25ea3c0cdb4595c142b8e28df304f5c88f38202e1bccf13e845401593656781f79fb43273e1d402d6187d0eeee8dca5ddecee1dcad4 + version: 1.2.3 + resolution: "cjs-module-lexer@npm:1.2.3" + checksum: f96a5118b0a012627a2b1c13bd2fcb92509778422aaa825c5da72300d6dcadfb47134dd2e9d97dfa31acd674891dd91642742772d19a09a8adc3e56bd2f5928c languageName: node linkType: hard @@ -8802,7 +8775,7 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:3.1.5": +"cross-fetch@npm:3.1.5, cross-fetch@npm:^3.1.4": version: 3.1.5 resolution: "cross-fetch@npm:3.1.5" dependencies: @@ -8811,15 +8784,6 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:^3.1.4": - version: 3.1.8 - resolution: "cross-fetch@npm:3.1.8" - dependencies: - node-fetch: "npm:^2.6.12" - checksum: ac8c4ca87d2ac0e17a19b6a293a67ee8934881aee5ec9a5a8323c30e9a9a60a0f5291d3c0d633ec2a2f970cbc60978d628804dfaf03add92d7e720b6d37f392c - languageName: node - linkType: hard - "cross-fetch@npm:^4.0.0": version: 4.0.0 resolution: "cross-fetch@npm:4.0.0" @@ -9128,7 +9092,18 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.1.4, define-properties@npm:^1.2.0": +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" + dependencies: + define-data-property: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.0" + object-keys: "npm:^1.1.1" + checksum: b4ccd00597dd46cb2d4a379398f5b19fca84a16f3374e2249201992f36b30f6835949a9429669ee6b41b6e837205a163eadd745e472069e70dfc10f03e5fcc12 + languageName: node + linkType: hard + +"define-properties@npm:^1.1.4": version: 1.2.0 resolution: "define-properties@npm:1.2.0" dependencies: @@ -9211,13 +9186,6 @@ __metadata: languageName: node linkType: hard -"diff-sequences@npm:^29.4.3": - version: 29.4.3 - resolution: "diff-sequences@npm:29.4.3" - checksum: 2287b259400513332d757f921eeda7c740863a919a00bd1d1b22ab2532b3e763538c404aec0953a813bbe33e660cbc77d0742875d6674d8dc5bc31d74ec88cc1 - languageName: node - linkType: hard - "diff-sequences@npm:^29.6.3": version: 29.6.3 resolution: "diff-sequences@npm:29.6.3" @@ -10027,7 +9995,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": +"ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -10224,20 +10192,7 @@ __metadata: languageName: node linkType: hard -"expect@npm:^29.0.0": - version: 29.5.0 - resolution: "expect@npm:29.5.0" - dependencies: - "@jest/expect-utils": "npm:^29.5.0" - jest-get-type: "npm:^29.4.3" - jest-matcher-utils: "npm:^29.5.0" - jest-message-util: "npm:^29.5.0" - jest-util: "npm:^29.5.0" - checksum: 32135b6d4ff798963eeac04f47fac3ee36f9b33532cf2ba91c8fd2e4fbba09a87bc8b02dab49c07d5c431c0471079272977b42602c2b75e601eb29b02e92e61e - languageName: node - linkType: hard - -"expect@npm:^29.7.0": +"expect@npm:^29.0.0, expect@npm:^29.7.0": version: 29.7.0 resolution: "expect@npm:29.7.0" dependencies: @@ -10993,18 +10948,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0": - version: 1.2.0 - resolution: "get-intrinsic@npm:1.2.0" - dependencies: - function-bind: "npm:^1.1.1" - has: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - checksum: f57c5fe67a96adace4f8e80c288728bcd0ccfdc82c9cc53e4a5ef1ec857b5f7ef4b1c289e39649b1df226bace81103630bf7e128c821f82cd603450036e54f97 - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": +"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": version: 1.2.2 resolution: "get-intrinsic@npm:1.2.2" dependencies: @@ -11420,11 +11364,11 @@ __metadata: linkType: hard "has-property-descriptors@npm:^1.0.0": - version: 1.0.0 - resolution: "has-property-descriptors@npm:1.0.0" + version: 1.0.1 + resolution: "has-property-descriptors@npm:1.0.1" dependencies: - get-intrinsic: "npm:^1.1.1" - checksum: a6d3f0a266d0294d972e354782e872e2fe1b6495b321e6ef678c9b7a06a40408a6891817350c62e752adced73a94ac903c54734fee05bf65b1905ee1368194bb + get-intrinsic: "npm:^1.2.2" + checksum: 21a47bb080a24e79594aef1ce71e1a18a1c5ab4120308e218088f67ebb7f6f408847541e2d96e5bd00e90eef5c5a49e4ebbdc8fc2d5b365a2c379aef071642f0 languageName: node linkType: hard @@ -11843,14 +11787,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.1.4, ignore@npm:^5.2.0": - version: 5.2.4 - resolution: "ignore@npm:5.2.4" - checksum: 4f7caf5d2005da21a382d4bd1d2aa741a3bed51de185c8562dd7f899a81a620ac4fd0619b06f7029a38ae79e4e4c134399db3bd0192c703c3ef54bb82df3086c - languageName: node - linkType: hard - -"ignore@npm:^5.2.4": +"ignore@npm:^5.1.4, ignore@npm:^5.2.0, ignore@npm:^5.2.4": version: 5.3.0 resolution: "ignore@npm:5.3.0" checksum: 51594355cea4c6ad6b28b3b85eb81afa7b988a1871feefd7062baf136c95aa06760ee934fa9590e43d967bd377ce84a4cf6135fbeb6063e063f1182a0e9a3bcd @@ -12159,16 +12096,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.11.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1": - version: 2.12.0 - resolution: "is-core-module@npm:2.12.0" - dependencies: - has: "npm:^1.0.3" - checksum: c1585e0695ad4f01ce67189c85ffc27b487c6b23f80f319c27f057f9724f8926c62baf53743bd77a717a0491c86eeb1a07b065e332672a1325872abf16e0cdbc - languageName: node - linkType: hard - -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1": +"is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1": version: 2.13.1 resolution: "is-core-module@npm:2.13.1" dependencies: @@ -12751,18 +12679,6 @@ __metadata: languageName: node linkType: hard -"jest-diff@npm:^29.5.0": - version: 29.5.0 - resolution: "jest-diff@npm:29.5.0" - dependencies: - chalk: "npm:^4.0.0" - diff-sequences: "npm:^29.4.3" - jest-get-type: "npm:^29.4.3" - pretty-format: "npm:^29.5.0" - checksum: c81f8da61d3af9d6b854c1099f1d54f71288d828a8730ff46298e63dc0afd4c89be61c6dfd2959a0bd8176bca14ce1198e34156866f34d5638ddc0f92726c995 - languageName: node - linkType: hard - "jest-diff@npm:^29.7.0": version: 29.7.0 resolution: "jest-diff@npm:29.7.0" @@ -12811,13 +12727,6 @@ __metadata: languageName: node linkType: hard -"jest-get-type@npm:^29.4.3": - version: 29.4.3 - resolution: "jest-get-type@npm:29.4.3" - checksum: 6ac7f2dde1c65e292e4355b6c63b3a4897d7e92cb4c8afcf6d397f2682f8080e094c8b0b68205a74d269882ec06bf696a9de6cd3e1b7333531e5ed7b112605ce - languageName: node - linkType: hard - "jest-get-type@npm:^29.6.3": version: 29.6.3 resolution: "jest-get-type@npm:29.6.3" @@ -12858,18 +12767,6 @@ __metadata: languageName: node linkType: hard -"jest-matcher-utils@npm:^29.5.0": - version: 29.5.0 - resolution: "jest-matcher-utils@npm:29.5.0" - dependencies: - chalk: "npm:^4.0.0" - jest-diff: "npm:^29.5.0" - jest-get-type: "npm:^29.4.3" - pretty-format: "npm:^29.5.0" - checksum: 80686b629d40489f09ef987a187d24c63528614fcfe34e62ec83f0485729396e11354e9ab9a28d6d80e82c9454e06cc810e936a2155e033bd112ab1fead11f1a - languageName: node - linkType: hard - "jest-matcher-utils@npm:^29.7.0": version: 29.7.0 resolution: "jest-matcher-utils@npm:29.7.0" @@ -12882,23 +12779,6 @@ __metadata: languageName: node linkType: hard -"jest-message-util@npm:^29.5.0": - version: 29.5.0 - resolution: "jest-message-util@npm:29.5.0" - dependencies: - "@babel/code-frame": "npm:^7.12.13" - "@jest/types": "npm:^29.5.0" - "@types/stack-utils": "npm:^2.0.0" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - micromatch: "npm:^4.0.4" - pretty-format: "npm:^29.5.0" - slash: "npm:^3.0.0" - stack-utils: "npm:^2.0.3" - checksum: eeb0a064e2db486428e37374422d4101a30845815a8842a0f62e77c2a82ae80837a74d5b4f58aaadfb3f19aa7d42e7d604aab1fb670cf170c46f0c46d0d725fd - languageName: node - linkType: hard - "jest-message-util@npm:^29.7.0": version: 29.7.0 resolution: "jest-message-util@npm:29.7.0" @@ -13060,21 +12940,7 @@ __metadata: languageName: node linkType: hard -"jest-util@npm:^29.0.0, jest-util@npm:^29.5.0": - version: 29.5.0 - resolution: "jest-util@npm:29.5.0" - dependencies: - "@jest/types": "npm:^29.5.0" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - graceful-fs: "npm:^4.2.9" - picomatch: "npm:^2.2.3" - checksum: 27ae6fc6221d29b31df9c071f190e0e27a9caaeca04ee1ce03f5c925ec8abf594fcf0cb57bdcb93149381415ff1f8198157332b0c76f3592065b7c3fdb35fca1 - languageName: node - linkType: hard - -"jest-util@npm:^29.7.0": +"jest-util@npm:^29.0.0, jest-util@npm:^29.7.0": version: 29.7.0 resolution: "jest-util@npm:29.7.0" dependencies: @@ -13481,16 +13347,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.0.0": - version: 4.5.2 - resolution: "keyv@npm:4.5.2" - dependencies: - json-buffer: "npm:3.0.1" - checksum: fbe6068cb46cfbf37b46f4a80e484a5e9c48c9a1eb09d9cb89382db6e12b801b60f07268ec8d7fa8d49f1f1e77badc5820c3135d478022df42691890a4c37038 - languageName: node - linkType: hard - -"keyv@npm:^4.5.3": +"keyv@npm:^4.0.0, keyv@npm:^4.5.3": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: @@ -15057,13 +14914,13 @@ __metadata: linkType: hard "node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.3.0": - version: 4.6.0 - resolution: "node-gyp-build@npm:4.6.0" + version: 4.8.0 + resolution: "node-gyp-build@npm:4.8.0" bin: node-gyp-build: bin.js node-gyp-build-optional: optional.js node-gyp-build-test: build-test.js - checksum: c8b57abe5e6e4a28dce450e3c0136bcce88d15602c33f1258ed9c9a52f156d34a00dd8864271b2f2acfd6ef4de0af3e75e5e76e771c4bc4f38dd0ee06ad178d8 + checksum: 80f410ab412df38e84171d3634a5716b6c6f14ecfa4eb971424d289381fb76f8bcbe1b666419ceb2c81060e558fd7c6d70cc0f60832bcca6a1559098925d9657 languageName: node linkType: hard @@ -15759,14 +15616,14 @@ __metadata: linkType: hard "oclif@npm:^4.3.4": - version: 4.4.2 - resolution: "oclif@npm:4.4.2" + version: 4.3.4 + resolution: "oclif@npm:4.3.4" dependencies: - "@aws-sdk/client-cloudfront": "npm:^3.501.0" - "@aws-sdk/client-s3": "npm:^3.496.0" + "@aws-sdk/client-cloudfront": "npm:^3.468.0" + "@aws-sdk/client-s3": "npm:^3.490.0" "@oclif/core": "npm:^3.18.1" - "@oclif/plugin-help": "npm:^6.0.12" - "@oclif/plugin-not-found": "npm:^3.0.9" + "@oclif/plugin-help": "npm:^6.0.9" + "@oclif/plugin-not-found": "npm:^3.0.8" "@oclif/plugin-warn-if-update-available": "npm:^3.0.9" async-retry: "npm:^1.3.3" change-case: "npm:^4" @@ -15783,7 +15640,7 @@ __metadata: yeoman-generator: "npm:^5.8.0" bin: oclif: bin/run.js - checksum: f0638750bebe9935449ebe84d9e4d58de8812e84530b858c5e4197931782035e780f7f67fc9884f3ce32919e55a4f1342d0eb3505359bd828ce0fd66e5988785 + checksum: 3ca293d9a330abbbfc9ea34d7fc20b97fd3b0ab403a422826d49e4b78602101a8c3fb00f0013e5a11fe08a391f62028acdd24103aa7f8b5de7dd0f7d10f536f8 languageName: node linkType: hard @@ -16512,11 +16369,11 @@ __metadata: linkType: hard "prettier@npm:^2.7.1": - version: 2.8.8 - resolution: "prettier@npm:2.8.8" + version: 2.8.7 + resolution: "prettier@npm:2.8.7" bin: prettier: bin-prettier.js - checksum: 00cdb6ab0281f98306cd1847425c24cbaaa48a5ff03633945ab4c701901b8e96ad558eb0777364ffc312f437af9b5a07d0f45346266e8245beaf6247b9c62b24 + checksum: 5d5acc2015dcd9ae4033c0ea3189820920149137100750c897d384bc9058c79c78af94ca892f3bc7c5b6da0661a50357e8eb9eb455c4c1da156b1d0757f54a8a languageName: node linkType: hard @@ -16527,18 +16384,7 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^29.0.0, pretty-format@npm:^29.5.0": - version: 29.5.0 - resolution: "pretty-format@npm:29.5.0" - dependencies: - "@jest/schemas": "npm:^29.4.3" - ansi-styles: "npm:^5.0.0" - react-is: "npm:^18.0.0" - checksum: b025cb1d2bf27b8dc338792b208811b196828ccf590a87014d9ac9406eb809324ef56151ba41d489c8a67fed94cdacc94ca003380c2795233e117a5874b2566b - languageName: node - linkType: hard - -"pretty-format@npm:^29.7.0": +"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": version: 29.7.0 resolution: "pretty-format@npm:29.7.0" dependencies: @@ -16654,7 +16500,7 @@ __metadata: languageName: node linkType: hard -"protobufjs@npm:6.11.3, protobufjs@npm:^6.11.2, protobufjs@npm:^6.11.3": +"protobufjs@npm:6.11.3": version: 6.11.3 resolution: "protobufjs@npm:6.11.3" dependencies: @@ -16678,9 +16524,33 @@ __metadata: languageName: node linkType: hard -"protobufjs@npm:^7.0.0": - version: 7.2.3 - resolution: "protobufjs@npm:7.2.3" +"protobufjs@npm:^6.11.2, protobufjs@npm:^6.11.3": + version: 6.11.4 + resolution: "protobufjs@npm:6.11.4" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/long": "npm:^4.0.1" + "@types/node": "npm:>=13.7.0" + long: "npm:^4.0.0" + bin: + pbjs: bin/pbjs + pbts: bin/pbts + checksum: 6b7fd7540d74350d65c38f69f398c9995ae019da070e79d9cd464a458c6d19b40b07c9a026be4e10704c824a344b603307745863310c50026ebd661ce4da0663 + languageName: node + linkType: hard + +"protobufjs@npm:^7.2.4": + version: 7.2.5 + resolution: "protobufjs@npm:7.2.5" dependencies: "@protobufjs/aspromise": "npm:^1.1.2" "@protobufjs/base64": "npm:^1.1.2" @@ -16694,7 +16564,7 @@ __metadata: "@protobufjs/utf8": "npm:^1.1.0" "@types/node": "npm:>=13.7.0" long: "npm:^5.0.0" - checksum: 194e4246ae6167a9c7ca2a9dbbc228d0cf80626eb9070b2ee8e8b798c2b6f2ba216a56b56c121557235eebf46d1c345ce44bc5975a7f794e88946aef21886e93 + checksum: 6c5aa62b61dff843f585f3acd9cb7a82d566de2dbf167a300b39afee91b04298c4b4aec61354b7c00308b40596f5f3f4b07d6246cfb4ee0abeaea25101033315 languageName: node linkType: hard @@ -17301,20 +17171,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.20.0": - version: 1.22.2 - resolution: "resolve@npm:1.22.2" - dependencies: - is-core-module: "npm:^2.11.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 116c5b221ed436dbe623a892102a6241f35bcca440c29693e1e4c81a5f1ebc1b8ce5bba301405160a937e1f36015a1f4a7af58d3e9c4c85fc791cf63c04774be - languageName: node - linkType: hard - -"resolve@npm:^1.22.4": +"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.20.0, resolve@npm:^1.22.4": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -17327,20 +17184,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin": - version: 1.22.2 - resolution: "resolve@patch:resolve@npm%3A1.22.2#optional!builtin::version=1.22.2&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.11.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 14594f99dbff19c1f51f6daac0caf0b75ed345256ada3722c23f63935eace79532dcfa349b3d8889d2771c143822c38dd5d7d8eb85fb8cff257b7abccbad7872 - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": +"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -17490,11 +17334,11 @@ __metadata: linkType: hard "rxjs@npm:^7.5.5": - version: 7.8.0 - resolution: "rxjs@npm:7.8.0" + version: 7.8.1 + resolution: "rxjs@npm:7.8.1" dependencies: tslib: "npm:^2.1.0" - checksum: ff9359cc7875edecc8fc487481366b876b488901178cca8f2bdad03e00d2b5a19b01d2b02d3b4ebd47e574264db8460c6c2386076c3189b359b5e8c70a6e51e3 + checksum: b10cac1a5258f885e9dd1b70d23c34daeb21b61222ee735d2ec40a8685bdca40429000703a44f0e638c27a684ac139e1c37e835d2a0dc16f6fc061a138ae3abb languageName: node linkType: hard @@ -17596,7 +17440,7 @@ __metadata: languageName: node linkType: hard -"secp256k1@npm:^4.0.0, secp256k1@npm:^4.0.1": +"secp256k1@npm:^4.0.1": version: 4.0.3 resolution: "secp256k1@npm:4.0.3" dependencies: @@ -17884,7 +17728,7 @@ __metadata: languageName: node linkType: hard -"sigstore@npm:^2.0.0, sigstore@npm:^2.1.0": +"sigstore@npm:^2.0.0": version: 2.1.0 resolution: "sigstore@npm:2.1.0" dependencies: @@ -17896,6 +17740,20 @@ __metadata: languageName: node linkType: hard +"sigstore@npm:^2.1.0": + version: 2.2.0 + resolution: "sigstore@npm:2.2.0" + dependencies: + "@sigstore/bundle": "npm:^2.1.1" + "@sigstore/core": "npm:^0.2.0" + "@sigstore/protobuf-specs": "npm:^0.2.1" + "@sigstore/sign": "npm:^2.2.1" + "@sigstore/tuf": "npm:^2.3.0" + "@sigstore/verify": "npm:^0.1.0" + checksum: d8e1fda202d2572b3bfa3eded15c9b826429187f52a287549074645670778cbdb78111cb8e3d0274f051838ee500db382be6124c45068985d095df54a3a0bd74 + languageName: node + linkType: hard + "simple-concat@npm:^1.0.0": version: 1.0.1 resolution: "simple-concat@npm:1.0.1" @@ -18748,15 +18606,6 @@ __metadata: languageName: node linkType: hard -"tiny-secp256k1@npm:2.2.1": - version: 2.2.1 - resolution: "tiny-secp256k1@npm:2.2.1" - dependencies: - uint8array-tools: "npm:0.0.7" - checksum: 8eb871e912c18d3282d9a6e4cf7f33e18548d48445b16d8381442529cbbf958bbaaa7912817898eadf896d2b8c631ddf3f212162e2305397d4260019d2e17418 - languageName: node - linkType: hard - "title-case@npm:^2.1.0": version: 2.1.1 resolution: "title-case@npm:2.1.1" @@ -19045,14 +18894,14 @@ __metadata: languageName: node linkType: hard -"tuf-js@npm:^2.1.0": - version: 2.1.0 - resolution: "tuf-js@npm:2.1.0" +"tuf-js@npm:^2.2.0": + version: 2.2.0 + resolution: "tuf-js@npm:2.2.0" dependencies: "@tufjs/models": "npm:2.0.0" debug: "npm:^4.3.4" make-fetch-happen: "npm:^13.0.0" - checksum: 56edb28d40185e0f51af486686e3785e685ff890a84c749cc73d729fea8eefca8c51da403082fab2e7af488757edda08aabc396c5e016c7b38d7a351ed684dfa + checksum: a513ce533c06390b7d8767fe68250adac2535bc63c460e9ab8cbae8253da5ccd6fd204448a460536a6e77f7cf5fcf5a3b104971610f9f319a9b8f95b3b574b95 languageName: node linkType: hard @@ -19230,13 +19079,6 @@ __metadata: languageName: node linkType: hard -"typeforce@npm:^1.11.5": - version: 1.18.0 - resolution: "typeforce@npm:1.18.0" - checksum: dbf98c75b1d57e56e33c1e1271d5505e67981f4e6a2e2e6e8e31160b58777fea1726160810b6c606517db16476805b7dce315926ba2d4859b9a56cab05b7a41f - languageName: node - linkType: hard - "typescript@npm:5.3.3": version: 5.3.3 resolution: "typescript@npm:5.3.3" @@ -19266,13 +19108,6 @@ __metadata: languageName: node linkType: hard -"uint8array-tools@npm:0.0.7": - version: 0.0.7 - resolution: "uint8array-tools@npm:0.0.7" - checksum: 6ffc45c7d2136757d63c6e556eb8345f908948618a9de37c805fec1249d989c265187b3fbef6cffc4ce5129083204829025b3c58800a0f24c8548e243d42ba13 - languageName: node - linkType: hard - "ultron@npm:~1.1.0": version: 1.1.1 resolution: "ultron@npm:1.1.1" @@ -19299,6 +19134,13 @@ __metadata: languageName: node linkType: hard +"undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: 0097779d94bc0fd26f0418b3a05472410408877279141ded2bd449167be1aed7ea5b76f756562cb3586a07f251b90799bab22d9019ceba49c037c76445f7cddd + languageName: node + linkType: hard + "unique-filename@npm:^1.1.1": version: 1.1.1 resolution: "unique-filename@npm:1.1.1" @@ -19769,17 +19611,6 @@ __metadata: languageName: node linkType: hard -"web3-bzz@npm:1.10.0": - version: 1.10.0 - resolution: "web3-bzz@npm:1.10.0" - dependencies: - "@types/node": "npm:^12.12.6" - got: "npm:12.1.0" - swarm-js: "npm:^0.1.40" - checksum: 3cfc6eedc5ba963d6580833e242a2dd6adf6076502cef31f02e3e5a0bb85243b6e1bcf63bb4d194f315ffca5bcf432441c9f2915aa1fea03224c860966b8c628 - languageName: node - linkType: hard - "web3-bzz@npm:1.10.4": version: 1.10.4 resolution: "web3-bzz@npm:1.10.4" @@ -20227,18 +20058,6 @@ __metadata: languageName: node linkType: hard -"web3-shh@npm:1.10.0": - version: 1.10.0 - resolution: "web3-shh@npm:1.10.0" - dependencies: - web3-core: "npm:1.10.0" - web3-core-method: "npm:1.10.0" - web3-core-subscriptions: "npm:1.10.0" - web3-net: "npm:1.10.0" - checksum: d51b29a2c953855b2ace74c53a18fe24399ff34533750710096d249a164725cd64a686fc90a5b1e4209c85a3824d6ec02c5d4615dd3ca66c020e8d4a18dba1bf - languageName: node - linkType: hard - "web3-shh@npm:1.10.4": version: 1.10.4 resolution: "web3-shh@npm:1.10.4" @@ -20251,22 +20070,7 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:1.10.0": - version: 1.10.0 - resolution: "web3-utils@npm:1.10.0" - dependencies: - bn.js: "npm:^5.2.1" - ethereum-bloom-filters: "npm:^1.0.6" - ethereumjs-util: "npm:^7.1.0" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 8766d5bafafe37a0c647c79ea1adf5782e90b8db71133a92e5e492d04af3be65c33562a22f5a29a303c034d1fa755d08a71bd83e3a3e236101bd0e13e75b31da - languageName: node - linkType: hard - -"web3-utils@npm:1.10.4, web3-utils@npm:^1.10.4": +"web3-utils@npm:1.10.4": version: 1.10.4 resolution: "web3-utils@npm:1.10.4" dependencies: @@ -20282,37 +20086,6 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:^1.0.0-beta.31, web3-utils@npm:^1.10.0": - version: 1.10.3 - resolution: "web3-utils@npm:1.10.3" - dependencies: - "@ethereumjs/util": "npm:^8.1.0" - bn.js: "npm:^5.2.1" - ethereum-bloom-filters: "npm:^1.0.6" - ethereum-cryptography: "npm:^2.1.2" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 7303919fbea2be4a720eb7688a51edb84f993e481bf08ac482c0e3a8f100300ce9a1b51b2775a8356fd397aa2a64fa016d9621d9ced05bdbfe1013d6b5ea90ef - languageName: node - linkType: hard - -"web3@npm:1.10.0": - version: 1.10.0 - resolution: "web3@npm:1.10.0" - dependencies: - web3-bzz: "npm:1.10.0" - web3-core: "npm:1.10.0" - web3-eth: "npm:1.10.0" - web3-eth-personal: "npm:1.10.0" - web3-net: "npm:1.10.0" - web3-shh: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 9c8349a46d01bc1b91483a953f6e9078b3a15af451a3092c0ac663cb05f6acb1be6ea4ce82646af27373889bdc9ab94c82ec9c6544d11ab7eec3d911a94d929b - languageName: node - linkType: hard - "web3@npm:1.10.4": version: 1.10.4 resolution: "web3@npm:1.10.4" @@ -20503,15 +20276,6 @@ __metadata: languageName: node linkType: hard -"wif@npm:^2.0.6": - version: 2.0.6 - resolution: "wif@npm:2.0.6" - dependencies: - bs58check: "npm:<3.0.0" - checksum: c8d7581664532d9ab6d163ee5194a9bec71b089a6e50d54d6ec57a9bd714fcf84bc8d9f22f4cfc7c297fc6ad10b973b8e83eca5c41240163fc61f44b5154b7da - languageName: node - linkType: hard - "window-size@npm:^0.2.0": version: 0.2.0 resolution: "window-size@npm:0.2.0" @@ -20877,22 +20641,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.3.1": - version: 17.7.1 - resolution: "yargs@npm:17.7.1" - dependencies: - cliui: "npm:^8.0.1" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.3" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^21.1.1" - checksum: 68beb0446b89fa0a087874d6eb8b3aa1e83c3718218fa0bc55bdb9cdc49068ad15c4a96553dbbdeeae4d9eae922a779bd1102952c44e75e80b41c61f27090cb5 - languageName: node - linkType: hard - -"yargs@npm:^17.7.1": +"yargs@npm:^17.3.1, yargs@npm:^17.7.1, yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: From a1c2e8a7eb4dd14f7e7ba924b2285406e8acee53 Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Wed, 3 Apr 2024 14:06:31 +0300 Subject: [PATCH 3/4] I wish there was an easier way to test renovate config changes (#216) --- dt-renovate-base.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dt-renovate-base.json b/dt-renovate-base.json index f7859f8bb..f43e12f34 100644 --- a/dt-renovate-base.json +++ b/dt-renovate-base.json @@ -6,15 +6,10 @@ "prCreation": "approval", "prConcurrentLimit": 2, "minimumReleaseAge": "5 days", + "rangeStrategy": "bump", "major": { "minimumReleaseAge": "14 days" }, - "minor": { - "rangeStrategy": "bump" - }, - "patch": { - "rangeStrategy": "bump" - }, "packageRules": [ { "matchManagers": ["github-actions"], From 28738ca591e54545bcd71c237fd5a9e4f077a9fd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:58:07 +0000 Subject: [PATCH 4/4] fix(deps): update dependency @celo/compliance to ~1.0.20 (#217) * fix(deps): update dependency @celo/compliance to ~1.0.20 * chore: add changeset renovate-724aca781 * add renovate-changeset so that prs from renovate automatically get a changeset created --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Aaron DeRuvo --- .changeset/renovate-724aca781.md | 5 +++++ .github/workflows/changeset-for-renovate.yml | 22 ++++++++++++++++++++ packages/cli/package.json | 2 +- yarn.lock | 10 ++++----- 4 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 .changeset/renovate-724aca781.md create mode 100644 .github/workflows/changeset-for-renovate.yml diff --git a/.changeset/renovate-724aca781.md b/.changeset/renovate-724aca781.md new file mode 100644 index 000000000..e5b9efb22 --- /dev/null +++ b/.changeset/renovate-724aca781.md @@ -0,0 +1,5 @@ +--- +'@celo/celocli': patch +--- + +Updated dependency `@celo/compliance` to `~1.0.20`. diff --git a/.github/workflows/changeset-for-renovate.yml b/.github/workflows/changeset-for-renovate.yml new file mode 100644 index 000000000..0d6c06a5f --- /dev/null +++ b/.github/workflows/changeset-for-renovate.yml @@ -0,0 +1,22 @@ +name: Write Renovate changeset +on: + pull_request_target: + paths: + - '.github/workflows/changeset-for-renovate.yml' + - '**/yarn.lock' + + +jobs: + generate-changeset: + runs-on: ['self-hosted', 'org', '8-cpu'] + if: github.actor == 'renovate[bot]' + steps: + - uses: actions/setup-node@v4 + with: + node-version: '18' + - uses: actions/checkout@v4 + - name: "Run changesets-renovate" + # when on a renovate branch which modified the package.json for a workspace this will create a changeset for those changes + run: npx @scaleway/changesets-renovate + + diff --git a/packages/cli/package.json b/packages/cli/package.json index 06cef13bd..f579f7934 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -34,7 +34,7 @@ "dependencies": { "@celo/abis": "11.0.0", "@celo/base": "^6.0.1", - "@celo/compliance": "~1.0.17", + "@celo/compliance": "~1.0.20", "@celo/connect": "^5.3.0", "@celo/contractkit": "^8.0.0", "@celo/cryptographic-utils": "^5.0.8", diff --git a/yarn.lock b/yarn.lock index 15033c8cc..edf4918df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1607,7 +1607,7 @@ __metadata: "@celo/abis": "npm:11.0.0" "@celo/base": "npm:^6.0.1" "@celo/celo-devchain": "npm:^7.0.0" - "@celo/compliance": "npm:~1.0.17" + "@celo/compliance": "npm:~1.0.20" "@celo/connect": "npm:^5.3.0" "@celo/contractkit": "npm:^8.0.0" "@celo/cryptographic-utils": "npm:^5.0.8" @@ -1664,10 +1664,10 @@ __metadata: languageName: unknown linkType: soft -"@celo/compliance@npm:~1.0.17": - version: 1.0.17 - resolution: "@celo/compliance@npm:1.0.17" - checksum: d38bcff8468066e348afba47747f4300533e90351ef9f7ae1de92df3979dd8072127d053f32bc36e0d0008c8a232d5f5bb522dd5aea8a48e05eeff361c7e44fb +"@celo/compliance@npm:~1.0.20": + version: 1.0.20 + resolution: "@celo/compliance@npm:1.0.20" + checksum: 39d4012a64dfa36cd5c3dac7ce1b56c59810e22cf3bb7fdc1cb9f5bd0a740cb7dc6efe51f4c8e1a7e199051711ee1a47425d73f4480dd61e36ff4ea48c16e57e languageName: node linkType: hard