From c4eddba6b298c2afcfe14b821d9e551434b405bb Mon Sep 17 00:00:00 2001 From: Dawid Sowa Date: Tue, 5 Sep 2023 11:12:12 +0200 Subject: [PATCH] feat: use `@radixdlt/rola` + update to RCNet V3 --- .../apps/client/src/main.ts | 45 ++++---- .../apps/client/src/style.css | 1 - .../apps/server/package.json | 1 + .../apps/server/src/index.ts | 17 ++- .../apps/server/src/rola/crypto/blake2b.ts | 25 ----- .../apps/server/src/rola/crypto/curve25519.ts | 3 - .../apps/server/src/rola/crypto/secp256k1.ts | 3 - .../apps/server/src/rola/gateway.ts | 24 ---- .../rola/helpers/create-public-key-hash.ts | 12 -- .../rola/helpers/create-signature-message.ts | 35 ------ .../helpers/derive-address-from-public-key.ts | 65 ----------- .../server/src/rola/helpers/verify-proof.ts | 40 ------- .../apps/server/src/rola/rola.ts | 80 -------------- .../src/{rola/crypto => }/secure-random.ts | 0 .../typescript-full-stack/package-lock.json | 103 +++++++++--------- 15 files changed, 82 insertions(+), 372 deletions(-) delete mode 100644 examples/typescript-full-stack/apps/server/src/rola/crypto/blake2b.ts delete mode 100644 examples/typescript-full-stack/apps/server/src/rola/crypto/curve25519.ts delete mode 100644 examples/typescript-full-stack/apps/server/src/rola/crypto/secp256k1.ts delete mode 100644 examples/typescript-full-stack/apps/server/src/rola/gateway.ts delete mode 100644 examples/typescript-full-stack/apps/server/src/rola/helpers/create-public-key-hash.ts delete mode 100644 examples/typescript-full-stack/apps/server/src/rola/helpers/create-signature-message.ts delete mode 100644 examples/typescript-full-stack/apps/server/src/rola/helpers/derive-address-from-public-key.ts delete mode 100644 examples/typescript-full-stack/apps/server/src/rola/helpers/verify-proof.ts delete mode 100644 examples/typescript-full-stack/apps/server/src/rola/rola.ts rename examples/typescript-full-stack/apps/server/src/{rola/crypto => }/secure-random.ts (100%) diff --git a/examples/typescript-full-stack/apps/client/src/main.ts b/examples/typescript-full-stack/apps/client/src/main.ts index 239cd2b..15ea2e9 100644 --- a/examples/typescript-full-stack/apps/client/src/main.ts +++ b/examples/typescript-full-stack/apps/client/src/main.ts @@ -1,12 +1,13 @@ -import "./style.css"; -import typescriptLogo from "./typescript.svg"; -import radixLogo from "/radix-icon_128x128.png"; +import './style.css' +import typescriptLogo from './typescript.svg' +import radixLogo from '/radix-icon_128x128.png' import { DataRequestBuilder, RadixDappToolkit, -} from "@radixdlt/radix-dapp-toolkit"; + RadixNetwork, +} from '@radixdlt/radix-dapp-toolkit' -document.querySelector("#app")!.innerHTML = ` +document.querySelector('#app')!.innerHTML = `
@@ -21,43 +22,43 @@ document.querySelector("#app")!.innerHTML = ` Click on the Radix and TypeScript logos to learn more

-`; +` const radixDappToolkit = RadixDappToolkit({ dAppDefinitionAddress: - "account_tdx_d_12xxwkx4fmz680e9wz8atdnyslr9vt7x9qvcfxhtqfnpfhxyjzwtyna", - networkId: 13, -}); + 'account_tdx_e_1285lfp3kwjnyu5esdsy7u9j0482tsw8fj3tnj95gjsgj6qa23yarx8', + networkId: RadixNetwork.RCnetV3, +}) // Clear the dApp state for example purposes setTimeout(() => { - radixDappToolkit.disconnect(); -}); + radixDappToolkit.disconnect() +}) radixDappToolkit.walletApi.setRequestData( DataRequestBuilder.persona().withProof(), DataRequestBuilder.accounts().atLeast(1).withProof() -); +) const getChallenge: () => Promise = () => - fetch("http://localhost:3000/create-challenge") + fetch('http://localhost:3000/create-challenge') .then((res) => res.json()) - .then((res) => res.challenge); + .then((res) => res.challenge) -radixDappToolkit.walletApi.provideChallengeGenerator(getChallenge); +radixDappToolkit.walletApi.provideChallengeGenerator(getChallenge) -const rolaResultElement = document.getElementById("rola-result")!; +const rolaResultElement = document.getElementById('rola-result')! radixDappToolkit.walletApi.dataRequestControl(async ({ proofs }) => { - const { valid } = await fetch("http://localhost:3000/verify", { - method: "POST", + const { valid } = await fetch('http://localhost:3000/verify', { + method: 'POST', body: JSON.stringify(proofs), - headers: { "content-type": "application/json" }, - }).then((res): Promise<{ valid: boolean }> => res.json()); + headers: { 'content-type': 'application/json' }, + }).then((res): Promise<{ valid: boolean }> => res.json()) rolaResultElement.innerHTML = JSON.stringify( proofs.map((item) => ({ ...item, rolaVerified: valid })), null, 2 - ); -}); + ) +}) diff --git a/examples/typescript-full-stack/apps/client/src/style.css b/examples/typescript-full-stack/apps/client/src/style.css index 51a6ca1..b034f58 100644 --- a/examples/typescript-full-stack/apps/client/src/style.css +++ b/examples/typescript-full-stack/apps/client/src/style.css @@ -98,6 +98,5 @@ button:focus-visible { pre { text-align: left; - background: black; padding: 1rem; } diff --git a/examples/typescript-full-stack/apps/server/package.json b/examples/typescript-full-stack/apps/server/package.json index 0aedae8..fecd91d 100644 --- a/examples/typescript-full-stack/apps/server/package.json +++ b/examples/typescript-full-stack/apps/server/package.json @@ -10,6 +10,7 @@ "license": "MIT", "dependencies": { "@radixdlt/radix-dapp-toolkit": "0.6.1", + "@radixdlt/rola": "0.2.1", "@radixdlt/radix-engine-toolkit": "0.3.0", "@types/cors": "^2.8.13", "@types/elliptic": "^6.4.14", diff --git a/examples/typescript-full-stack/apps/server/src/index.ts b/examples/typescript-full-stack/apps/server/src/index.ts index 349f20e..0fc6c58 100644 --- a/examples/typescript-full-stack/apps/server/src/index.ts +++ b/examples/typescript-full-stack/apps/server/src/index.ts @@ -1,9 +1,8 @@ import express from 'express' -import { secureRandom } from './rola/crypto/secure-random' -import { SignedChallenge } from '@radixdlt/radix-dapp-toolkit' -import { RolaFactory } from './rola/rola' +import { secureRandom } from './secure-random' import cors from 'cors' -import { GatewayService } from './rola/gateway' +import { Rola } from '@radixdlt/rola' +import { SignedChallenge, RadixNetwork } from '@radixdlt/radix-dapp-toolkit' import { ResultAsync } from 'neverthrow' const app = express() @@ -40,11 +39,11 @@ const ChallengeStore = () => { const challengeStore = ChallengeStore() -const rola = RolaFactory({ - gatewayService: GatewayService('https://ansharnet-gateway.radixdlt.com'), // gateway service to query the ledger +const { verifySignedChallenge } = Rola({ + applicationName: 'Rola Full Stack Typescript Example', dAppDefinitionAddress: - 'account_tdx_d_12xxwkx4fmz680e9wz8atdnyslr9vt7x9qvcfxhtqfnpfhxyjzwtyna', // address of the dApp definition - networkId: 13, // network id of the Radix network + 'account_tdx_e_1285lfp3kwjnyu5esdsy7u9j0482tsw8fj3tnj95gjsgj6qa23yarx8', // address of the dApp definition + networkId: RadixNetwork.RCnetV3, // network id of the Radix network expectedOrigin: 'http://localhost:4000', // origin of the client making the wallet request }) @@ -67,7 +66,7 @@ app.post<{}, { valid: boolean }, SignedChallenge[]>( if (!isChallengeValid) return res.send({ valid: false }) const result = await ResultAsync.combine( - req.body.map((signedChallenge) => rola(signedChallenge)) + req.body.map((signedChallenge) => verifySignedChallenge(signedChallenge)) ) if (result.isErr()) return res.send({ valid: false }) diff --git a/examples/typescript-full-stack/apps/server/src/rola/crypto/blake2b.ts b/examples/typescript-full-stack/apps/server/src/rola/crypto/blake2b.ts deleted file mode 100644 index 692cc83..0000000 --- a/examples/typescript-full-stack/apps/server/src/rola/crypto/blake2b.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Result, err, ok } from 'neverthrow' -import blake from 'blakejs' -import { Buffer } from 'buffer' - -const toArrayBuffer = (buffer: Buffer): ArrayBuffer => { - const arrayBuffer = new ArrayBuffer(buffer.length) - const view = new Uint8Array(arrayBuffer) - for (let i = 0; i < buffer.length; ++i) { - view[i] = buffer[i] - } - return arrayBuffer -} - -const bufferToUnit8Array = (buffer: Buffer): Uint8Array => - new Uint8Array(toArrayBuffer(buffer)) - -export const blake2b = (input: Buffer): Result => { - try { - return ok(blake.blake2bHex(bufferToUnit8Array(input), undefined, 32)).map( - (hex) => Buffer.from(hex, 'hex') - ) - } catch (error) { - return err(error as Error) - } -} diff --git a/examples/typescript-full-stack/apps/server/src/rola/crypto/curve25519.ts b/examples/typescript-full-stack/apps/server/src/rola/crypto/curve25519.ts deleted file mode 100644 index 6fae341..0000000 --- a/examples/typescript-full-stack/apps/server/src/rola/crypto/curve25519.ts +++ /dev/null @@ -1,3 +0,0 @@ -import ec from 'elliptic' - -export const curve25519 = new ec.eddsa('ed25519') diff --git a/examples/typescript-full-stack/apps/server/src/rola/crypto/secp256k1.ts b/examples/typescript-full-stack/apps/server/src/rola/crypto/secp256k1.ts deleted file mode 100644 index 41cb5cf..0000000 --- a/examples/typescript-full-stack/apps/server/src/rola/crypto/secp256k1.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Elliptic from 'elliptic' - -export const secp256k1 = new Elliptic.ec('secp256k1') diff --git a/examples/typescript-full-stack/apps/server/src/rola/gateway.ts b/examples/typescript-full-stack/apps/server/src/rola/gateway.ts deleted file mode 100644 index 7275cff..0000000 --- a/examples/typescript-full-stack/apps/server/src/rola/gateway.ts +++ /dev/null @@ -1,24 +0,0 @@ -export type GatewayService = ReturnType -import { GatewayApiClient } from '@radixdlt/babylon-gateway-api-sdk' -import { ResultAsync } from 'neverthrow' - -export const GatewayService = (basePath: string) => { - const { state } = GatewayApiClient.initialize({ - basePath, - }) - - const getEntityDetails = (address: string) => - ResultAsync.fromPromise( - state.getEntityDetailsVaultAggregated(address), - (e: unknown) => e as Error - ) - - return { - getEntityOwnerKeys: (address: string) => - getEntityDetails(address).map( - (response) => - response?.metadata?.items.find((item) => item.key === 'owner_keys') - ?.value.raw_hex ?? '' - ), - } -} diff --git a/examples/typescript-full-stack/apps/server/src/rola/helpers/create-public-key-hash.ts b/examples/typescript-full-stack/apps/server/src/rola/helpers/create-public-key-hash.ts deleted file mode 100644 index 4e40db6..0000000 --- a/examples/typescript-full-stack/apps/server/src/rola/helpers/create-public-key-hash.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Buffer } from 'buffer' -import { blake2b } from '../crypto/blake2b' -import { Result } from 'neverthrow' - -type HexEncodedPublicKeyHash = string - -export const createPublicKeyHash = ( - publicKey: string -): Result => - blake2b(Buffer.from(publicKey, 'hex')) - .map((hash) => hash.subarray(-29)) - .map((hash) => Buffer.from(hash).toString('hex')) diff --git a/examples/typescript-full-stack/apps/server/src/rola/helpers/create-signature-message.ts b/examples/typescript-full-stack/apps/server/src/rola/helpers/create-signature-message.ts deleted file mode 100644 index 29cfe87..0000000 --- a/examples/typescript-full-stack/apps/server/src/rola/helpers/create-signature-message.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Buffer } from 'buffer' -import type { Result } from 'neverthrow' -import { blake2b } from '../crypto/blake2b' - -export const createSignatureMessage = ({ - challenge, - dAppDefinitionAddress, - origin, -}: { - challenge: string - dAppDefinitionAddress: string - origin: string -}): Result => { - const prefix = Buffer.from('R', 'ascii') - const lengthOfDappDefAddress = dAppDefinitionAddress.length - const lengthOfDappDefAddressBuffer = Buffer.from( - lengthOfDappDefAddress.toString(16), - 'hex' - ) - const dappDefAddressBuffer = Buffer.from(dAppDefinitionAddress, 'utf-8') - const originBuffer = Buffer.from(origin, 'utf-8') - const challengeBuffer = Buffer.from(challenge, 'hex') - - const messageBuffer = Buffer.concat([ - prefix, - challengeBuffer, - lengthOfDappDefAddressBuffer, - dappDefAddressBuffer, - originBuffer, - ]) - - return blake2b(messageBuffer) - .map((hash) => Buffer.from(hash).toString('hex')) - .mapErr((jsError) => ({ reason: 'couldNotHashMessage', jsError })) -} diff --git a/examples/typescript-full-stack/apps/server/src/rola/helpers/derive-address-from-public-key.ts b/examples/typescript-full-stack/apps/server/src/rola/helpers/derive-address-from-public-key.ts deleted file mode 100644 index d655453..0000000 --- a/examples/typescript-full-stack/apps/server/src/rola/helpers/derive-address-from-public-key.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { SignedChallenge } from '@radixdlt/radix-dapp-toolkit' -import { ManifestAstValue, PublicKey } from '@radixdlt/radix-engine-toolkit' -import { ResultAsync, errAsync } from 'neverthrow' - -const deriveVirtualIdentityAddress = (publicKey: string, networkId: number) => - ResultAsync.fromPromise( - ManifestAstValue.Address.virtualIdentityAddress( - new PublicKey.Ed25519(publicKey), - networkId /* The ID of the network to derive the address for. */ - ), - (error: any): Error => error - ) - -const deriveVirtualEddsaEd25519AccountAddress = ( - publicKey: string, - networkId: number -) => - ResultAsync.fromPromise( - ManifestAstValue.Address.virtualAccountAddress( - new PublicKey.Ed25519(publicKey), - networkId /* The ID of the network to derive the address for. */ - ), - (error: any): Error => error - ) - -const deriveVirtualEcdsaSecp256k1AccountAddress = ( - publicKey: string, - networkId: number -) => - ResultAsync.fromPromise( - ManifestAstValue.Address.virtualAccountAddress( - new PublicKey.Secp256k1(publicKey), - networkId /* The ID of the network to derive the address for. */ - ), - (error: any): Error => error - ) - -export const deriveVirtualAddress = ( - signedChallenge: SignedChallenge, - networkId: number -) => { - if (signedChallenge.type === 'persona') - return deriveVirtualIdentityAddress( - signedChallenge.proof.publicKey, - networkId - ) - else if ( - signedChallenge.type === 'account' && - signedChallenge.proof.curve === 'curve25519' - ) - return deriveVirtualEddsaEd25519AccountAddress( - signedChallenge.proof.publicKey, - networkId - ) - else if ( - signedChallenge.type === 'account' && - signedChallenge.proof.curve === 'secp256k1' - ) - return deriveVirtualEcdsaSecp256k1AccountAddress( - signedChallenge.proof.publicKey, - networkId - ) - - return errAsync(new Error('Could not derive virtual address')) -} diff --git a/examples/typescript-full-stack/apps/server/src/rola/helpers/verify-proof.ts b/examples/typescript-full-stack/apps/server/src/rola/helpers/verify-proof.ts deleted file mode 100644 index 2142725..0000000 --- a/examples/typescript-full-stack/apps/server/src/rola/helpers/verify-proof.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Result, err, ok } from 'neverthrow' -import { curve25519 } from '../crypto/curve25519' -import { secp256k1 } from '../crypto/secp256k1' -import { SignedChallenge } from '@radixdlt/radix-dapp-toolkit' - -const supportedCurves = new Set(['curve25519', 'secp256k1']) - -export const verifyProofFactory = - (input: SignedChallenge) => - ( - signatureMessageHex: string - ): Result => { - const isSupportedCurve = supportedCurves.has(input.proof.curve) - if (!isSupportedCurve) return err({ reason: 'unsupportedCurve' }) - - try { - let isValid = false - - if (input.proof.curve === 'curve25519') { - const publicKey = curve25519.keyFromPublic( - input.proof.publicKey, - // @ts-ignore: incorrect type definition in EC lib - 'hex' - ) - isValid = publicKey.verify(signatureMessageHex, input.proof.signature) - } else { - const signature = Buffer.from(input.proof.signature, 'hex') - .toJSON() - .data.slice(1) - const r = signature.slice(0, 32) - const s = signature.slice(32, 64) - isValid = secp256k1 - .keyFromPublic(input.proof.publicKey, 'hex') - .verify(signatureMessageHex, { r, s }) - } - return isValid ? ok(undefined) : err({ reason: 'invalidSignature' }) - } catch (error: any) { - return err({ reason: 'invalidPublicKey', jsError: error }) - } - } diff --git a/examples/typescript-full-stack/apps/server/src/rola/rola.ts b/examples/typescript-full-stack/apps/server/src/rola/rola.ts deleted file mode 100644 index 90460ba..0000000 --- a/examples/typescript-full-stack/apps/server/src/rola/rola.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { ResultAsync, err, errAsync, ok } from 'neverthrow' -import { createSignatureMessage } from './helpers/create-signature-message' -import { verifyProofFactory } from './helpers/verify-proof' -import { deriveVirtualAddress } from './helpers/derive-address-from-public-key' -import { GatewayService } from './gateway' -import { createPublicKeyHash } from './helpers/create-public-key-hash' -import { SignedChallenge } from '@radixdlt/radix-dapp-toolkit' - -export type RolaError = { reason: string; jsError?: Error } - -export type VerifyOwnerKeyOnLedgerFn = ( - address: string, - publicKeyHex: string -) => ResultAsync - -export const RolaFactory = - ({ - gatewayService, - expectedOrigin, - dAppDefinitionAddress, - networkId, - }: { - gatewayService: GatewayService - expectedOrigin: string - dAppDefinitionAddress: string - networkId: number - }) => - (signedChallenge: SignedChallenge): ResultAsync => { - const result = createPublicKeyHash(signedChallenge.proof.publicKey) - - if (result.isErr()) return errAsync({ reason: 'couldNotHashPublicKey' }) - - const hashedPublicKey = result.value - - const verifyProof = verifyProofFactory(signedChallenge) - - const getDerivedAddress = () => - deriveVirtualAddress(signedChallenge, networkId) - .map(({ value }) => value) - .mapErr((jsError) => ({ - reason: 'couldNotDeriveAddressFromPublicKey', - jsError, - })) - - const queryLedger = () => - gatewayService - .getEntityOwnerKeys(signedChallenge.address) - .mapErr(() => ({ reason: 'couldNotVerifyPublicKeyOnLedger' })) - .map((ownerKeys) => ({ - ownerKeysMatchesProvidedPublicKey: ownerKeys - .toUpperCase() - .includes(hashedPublicKey.toUpperCase()), - ownerKeysSet: !!ownerKeys, - })) - - const deriveAddressFromPublicKeyAndQueryLedger = () => - ResultAsync.combine([getDerivedAddress(), queryLedger()]) - - return createSignatureMessage({ - dAppDefinitionAddress, - origin: expectedOrigin, - challenge: signedChallenge.challenge, - }) - .andThen(verifyProof) - .asyncAndThen(deriveAddressFromPublicKeyAndQueryLedger) - .andThen( - ([ - derivedAddress, - { ownerKeysMatchesProvidedPublicKey, ownerKeysSet }, - ]) => { - const derivedAddressMatchesPublicKey = - !ownerKeysSet && derivedAddress === signedChallenge.address - - return ownerKeysMatchesProvidedPublicKey || - derivedAddressMatchesPublicKey - ? ok(undefined) - : err({ reason: 'invalidPublicKey' }) - } - ) - } diff --git a/examples/typescript-full-stack/apps/server/src/rola/crypto/secure-random.ts b/examples/typescript-full-stack/apps/server/src/secure-random.ts similarity index 100% rename from examples/typescript-full-stack/apps/server/src/rola/crypto/secure-random.ts rename to examples/typescript-full-stack/apps/server/src/secure-random.ts diff --git a/examples/typescript-full-stack/package-lock.json b/examples/typescript-full-stack/package-lock.json index ebbfec5..ee45913 100644 --- a/examples/typescript-full-stack/package-lock.json +++ b/examples/typescript-full-stack/package-lock.json @@ -1,5 +1,5 @@ { - "name": "rola-examples", + "name": "typescript-full-stack", "lockfileVersion": 3, "requires": true, "packages": { @@ -24,30 +24,13 @@ "vite": "^4.4.0" } }, - "apps/client/node_modules/@radixdlt/radix-dapp-toolkit": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@radixdlt/radix-dapp-toolkit/-/radix-dapp-toolkit-0.6.1.tgz", - "integrity": "sha512-rVU71RYbF8ZkBMWtzN2Gr1PrcdSdAjxGUBeDBq/hB2aAo9hvOjURbvoQWTylEJznOQfINQM9IWVHNSfAUuCZ6g==", - "dependencies": { - "@radixdlt/babylon-gateway-api-sdk": "1.0.0-rc.3.2", - "@radixdlt/connect-button": "0.13.4", - "@radixdlt/wallet-sdk": "0.10.1-alpha.1", - "immer": "^10.0.2", - "lodash.isequal": "^4.5.0", - "neverthrow": "^6.0.0", - "rxjs": "^7.8.1", - "zod": "^3.21.4" - }, - "engines": { - "node": ">=16.0.0" - } - }, "apps/server": { "version": "0.0.0", "license": "MIT", "dependencies": { "@radixdlt/radix-dapp-toolkit": "0.6.1", "@radixdlt/radix-engine-toolkit": "0.3.0", + "@radixdlt/rola": "0.2.1", "@types/cors": "^2.8.13", "@types/elliptic": "^6.4.14", "@types/express": "^4.17.17", @@ -63,40 +46,6 @@ "typescript": "^5.1.6" } }, - "apps/server/node_modules/@radixdlt/radix-dapp-toolkit": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@radixdlt/radix-dapp-toolkit/-/radix-dapp-toolkit-0.6.1.tgz", - "integrity": "sha512-rVU71RYbF8ZkBMWtzN2Gr1PrcdSdAjxGUBeDBq/hB2aAo9hvOjURbvoQWTylEJznOQfINQM9IWVHNSfAUuCZ6g==", - "dependencies": { - "@radixdlt/babylon-gateway-api-sdk": "1.0.0-rc.3.2", - "@radixdlt/connect-button": "0.13.4", - "@radixdlt/wallet-sdk": "0.10.1-alpha.1", - "immer": "^10.0.2", - "lodash.isequal": "^4.5.0", - "neverthrow": "^6.0.0", - "rxjs": "^7.8.1", - "zod": "^3.21.4" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "apps/server/node_modules/@radixdlt/radix-engine-toolkit": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@radixdlt/radix-engine-toolkit/-/radix-engine-toolkit-0.3.0.tgz", - "integrity": "sha512-bODSTuAICMW2MT2R6IcUvacIek8AHBfYh4bABFQliP+FXsjRk+3MNQbGACuEGLuU9jfWrandZUXADgKPs6Wniw==", - "dependencies": { - "@noble/ed25519": "2.0.0", - "@noble/hashes": "1.3.0", - "@types/secp256k1": "4.0.3", - "@types/secure-random": "1.1.0", - "blakejs": "1.2.1", - "change-case": "4.1.2", - "decimal.js": "10.4.3", - "reflect-metadata": "0.1.13", - "secp256k1": "5.0.0" - } - }, "client": { "version": "0.0.0", "extraneous": true, @@ -548,6 +497,54 @@ "node": ">=16.0.0" } }, + "node_modules/@radixdlt/radix-dapp-toolkit": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@radixdlt/radix-dapp-toolkit/-/radix-dapp-toolkit-0.6.1.tgz", + "integrity": "sha512-rVU71RYbF8ZkBMWtzN2Gr1PrcdSdAjxGUBeDBq/hB2aAo9hvOjURbvoQWTylEJznOQfINQM9IWVHNSfAUuCZ6g==", + "dependencies": { + "@radixdlt/babylon-gateway-api-sdk": "1.0.0-rc.3.2", + "@radixdlt/connect-button": "0.13.4", + "@radixdlt/wallet-sdk": "0.10.1-alpha.1", + "immer": "^10.0.2", + "lodash.isequal": "^4.5.0", + "neverthrow": "^6.0.0", + "rxjs": "^7.8.1", + "zod": "^3.21.4" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@radixdlt/radix-engine-toolkit": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@radixdlt/radix-engine-toolkit/-/radix-engine-toolkit-0.3.0.tgz", + "integrity": "sha512-bODSTuAICMW2MT2R6IcUvacIek8AHBfYh4bABFQliP+FXsjRk+3MNQbGACuEGLuU9jfWrandZUXADgKPs6Wniw==", + "dependencies": { + "@noble/ed25519": "2.0.0", + "@noble/hashes": "1.3.0", + "@types/secp256k1": "4.0.3", + "@types/secure-random": "1.1.0", + "blakejs": "1.2.1", + "change-case": "4.1.2", + "decimal.js": "10.4.3", + "reflect-metadata": "0.1.13", + "secp256k1": "5.0.0" + } + }, + "node_modules/@radixdlt/rola": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@radixdlt/rola/-/rola-0.2.1.tgz", + "integrity": "sha512-9cuyZxfC/CymKd7WKYDbjpsl4+jh8ERJtP4JVsd+VaBrJ56rA+fpowfwXMH4u1t6bzouiIJ2WIQcR4mwGZIveQ==", + "dependencies": { + "@radixdlt/radix-dapp-toolkit": "0.6.1", + "@radixdlt/radix-engine-toolkit": "0.3.0", + "elliptic": "^6.5.4", + "neverthrow": "^6.0.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@radixdlt/wallet-sdk": { "version": "0.10.1-alpha.1", "resolved": "https://registry.npmjs.org/@radixdlt/wallet-sdk/-/wallet-sdk-0.10.1-alpha.1.tgz",