From bae0d1323a9c8ab515c1430adb898e7567e53e20 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Thu, 24 Oct 2024 16:14:26 +0530 Subject: [PATCH 01/27] Update Project entity --- packages/backend/src/entity/Project.ts | 6 ++++++ packages/backend/src/schema.gql | 2 ++ .../src/components/projects/create/Configure.tsx | 13 +++++++++++++ packages/frontend/src/stories/MockStoriesData.ts | 2 ++ packages/gql-client/src/queries.ts | 6 ++++++ packages/gql-client/src/types.ts | 6 ++++++ 6 files changed, 35 insertions(+) diff --git a/packages/backend/src/entity/Project.ts b/packages/backend/src/entity/Project.ts index 9edfdfd5..aa622dd7 100644 --- a/packages/backend/src/entity/Project.ts +++ b/packages/backend/src/entity/Project.ts @@ -66,6 +66,12 @@ export class Project { @Column('varchar', { nullable: true }) framework!: string | null; + @Column('varchar') + paymentAddress!: string; + + @Column('varchar') + txHash!: string; + @Column({ type: 'simple-array' }) diff --git a/packages/backend/src/schema.gql b/packages/backend/src/schema.gql index 5cead09e..e51c1310 100644 --- a/packages/backend/src/schema.gql +++ b/packages/backend/src/schema.gql @@ -77,6 +77,8 @@ type Project { fundsReleased: Boolean template: String framework: String + paymentAddress: String! + txHash: String! webhooks: [String!] members: [ProjectMember!] environmentVariables: [EnvironmentVariable!] diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index 058d18c7..54a67a40 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -66,6 +66,8 @@ const Configure = () => { const createProject = async ( data: FieldValues, envVariables: AddEnvironmentVariableInput[], + senderAddress: string, + txHash: string ): Promise => { setIsLoading(true); let projectId: string | null = null; @@ -90,6 +92,8 @@ const Configure = () => { owner, name, isPrivate, + paymentAddress: senderAddress, + txHash }; const { addProjectFromTemplate } = await client.addProjectFromTemplate( @@ -109,6 +113,8 @@ const Configure = () => { prodBranch: defaultBranch!, repository: fullName!, template: 'webapp', + paymentAddress: senderAddress, + txHash }, lrn, auctionParams, @@ -138,6 +144,11 @@ const Configure = () => { const handleFormSubmit = useCallback( async (createFormData: FieldValues) => { + // Send tx request to wallet -> amount = createFormData.maxPrice * createFormData.numProviders + // Get address of sender account(from wallet connect session) and txHash(result.signature) + const senderAddress = 'address'; + const txHash = 'txHash'; + const environmentVariables = createFormData.variables.map( (variable: any) => { return { @@ -153,6 +164,8 @@ const Configure = () => { const projectId = await createProject( createFormData, environmentVariables, + senderAddress, + txHash ); await client.getEnvironmentVariables(projectId); diff --git a/packages/frontend/src/stories/MockStoriesData.ts b/packages/frontend/src/stories/MockStoriesData.ts index 49e67885..09959838 100644 --- a/packages/frontend/src/stories/MockStoriesData.ts +++ b/packages/frontend/src/stories/MockStoriesData.ts @@ -134,6 +134,8 @@ export const project: Project = { deployerLrn: 'lrn://deployer.apps.snowballtools.com ', }, ], + paymentAddress: '0x657868687686rb4787987br8497298r79284797487', + txHash: '74btygeuydguygf838gcergurcbhuedbcjhu', webhooks: ['beepboop'], icon: 'Icon', fundsReleased: true, diff --git a/packages/gql-client/src/queries.ts b/packages/gql-client/src/queries.ts index a1ac2af2..e3274827 100644 --- a/packages/gql-client/src/queries.ts +++ b/packages/gql-client/src/queries.ts @@ -29,6 +29,8 @@ query ($projectId: String!) { deployerId deployerApiUrl } + paymentAddress + txHash fundsReleased framework repository @@ -85,6 +87,8 @@ query ($organizationSlug: String!) { deployerId deployerApiUrl } + paymentAddress + txHash fundsReleased prodBranch webhooks @@ -212,6 +216,8 @@ query ($searchText: String!) { deployerId deployerApiUrl } + paymentAddress + txHash fundsReleased prodBranch webhooks diff --git a/packages/gql-client/src/types.ts b/packages/gql-client/src/types.ts index a7c24aa3..2e879913 100644 --- a/packages/gql-client/src/types.ts +++ b/packages/gql-client/src/types.ts @@ -177,6 +177,8 @@ export type Project = { framework: string; deployers: [Deployer] auctionId: string; + paymentAddress: string; + txHash: string; fundsReleased: boolean; webhooks: string[]; members: ProjectMember[]; @@ -306,6 +308,8 @@ export type AddProjectFromTemplateInput = { owner: string; name: string; isPrivate: boolean; + paymentAddress: string; + txHash: string; }; export type AddProjectInput = { @@ -313,6 +317,8 @@ export type AddProjectInput = { repository: string; prodBranch: string; template?: string; + paymentAddress: string; + txHash: string; }; export type UpdateProjectInput = { -- 2.45.2 From 92a270afa22e94b34887a9e129eb1bac5b36f726 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Thu, 24 Oct 2024 16:31:49 +0530 Subject: [PATCH 02/27] Return extra funds to owner on successful deployment --- packages/backend/src/registry.ts | 15 +++++++++++++++ packages/backend/src/service.ts | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/packages/backend/src/registry.ts b/packages/backend/src/registry.ts index 59f3a178..37f1f830 100644 --- a/packages/backend/src/registry.ts +++ b/packages/backend/src/registry.ts @@ -483,6 +483,21 @@ export class Registry { return this.registry.getAuctionsByIds([auctionId]); } + async sendTokensToAccount(receiverAddress: string, amount: string): Promise { + const fee = parseGasAndFees(this.registryConfig.fee.gas, this.registryConfig.fee.fees); + await registryTransactionWithRetry(() => + this.registry.sendCoins( + { + amount, + denom: 'tlnt', + destinationAddress: receiverAddress + }, + this.registryConfig.privateKey, + fee + ) + ); + } + getLrn(appName: string): string { assert(this.registryConfig.authority, "Authority doesn't exist"); return `lrn://${this.registryConfig.authority}/applications/${appName}`; diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index 028b662b..f91f8e0f 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -212,6 +212,9 @@ export class Service { if (!deployment.project.fundsReleased) { const fundsReleased = await this.releaseDeployerFundsByProjectId(deployment.projectId); + // Return remaining amount to owner + await this.returnCreatorFundsByProjectId(deployment.projectId); + await this.db.updateProjectById(deployment.projectId, { fundsReleased, }); @@ -1324,6 +1327,24 @@ export class Service { return false; } + async returnCreatorFundsByProjectId(projectId: string) { + const project = await this.db.getProjectById(projectId); + + if (!project || !project.auctionId) { + log(`Project ${projectId} ${!project ? 'not found' : 'does not have an auction'}`); + + return false; + } + + const auction = await this.getAuctionData(project.auctionId); + const amountToBeReturned = auction.winnerPrice * auction.numProviders + + await this.laconicRegistry.sendTokensToAccount( + project.paymentAddress, + amountToBeReturned.toString() + ); + } + async getDeployers(): Promise { const dbDeployers = await this.db.getDeployers(); -- 2.45.2 From 8dc9da3ca0781888bc4f943711a2cbc2e519ef8a Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Thu, 24 Oct 2024 17:05:28 +0530 Subject: [PATCH 03/27] Pass payment address and txHash when creating project --- packages/backend/src/resolvers.ts | 2 +- packages/backend/src/schema.gql | 4 ++++ packages/backend/src/service.ts | 2 ++ packages/backend/src/types.ts | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/resolvers.ts b/packages/backend/src/resolvers.ts index b4c2c01c..e4692d99 100644 --- a/packages/backend/src/resolvers.ts +++ b/packages/backend/src/resolvers.ts @@ -221,7 +221,7 @@ export const createResolvers = async (service: Service): Promise => { organizationSlug: string; data: AddProjectFromTemplateInput; lrn: string; - auctionParams: AuctionParams, + auctionParams: AuctionParams; environmentVariables: EnvironmentVariables[]; }, context: any, diff --git a/packages/backend/src/schema.gql b/packages/backend/src/schema.gql index e51c1310..81f3ac85 100644 --- a/packages/backend/src/schema.gql +++ b/packages/backend/src/schema.gql @@ -159,6 +159,8 @@ input AddProjectFromTemplateInput { owner: String! name: String! isPrivate: Boolean! + paymentAddress: String! + txHash: String! } input AddProjectInput { @@ -166,6 +168,8 @@ input AddProjectInput { repository: String! prodBranch: String! template: String + paymentAddress: String! + txHash: String! } input UpdateProjectInput { diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index f91f8e0f..69dacb42 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -832,6 +832,8 @@ export class Service { repository: gitRepo.data.full_name, // TODO: Set selected template template: 'webapp', + paymentAddress: data.paymentAddress, + txHash: data.txHash }, lrn, auctionParams, environmentVariables); if (!project || !project.id) { diff --git a/packages/backend/src/types.ts b/packages/backend/src/types.ts index 4ea4123c..3223067d 100644 --- a/packages/backend/src/types.ts +++ b/packages/backend/src/types.ts @@ -70,6 +70,8 @@ export interface AddProjectFromTemplateInput { owner: string; name: string; isPrivate: boolean; + paymentAddress: string; + txHash: string; } export interface AuctionParams { -- 2.45.2 From df6a492d072c56215abbe7166347970eb6ba790a Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Thu, 24 Oct 2024 17:18:41 +0530 Subject: [PATCH 04/27] Return funds if no winners are present --- packages/backend/src/service.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index 69dacb42..0801ebfa 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -213,7 +213,7 @@ export class Service { const fundsReleased = await this.releaseDeployerFundsByProjectId(deployment.projectId); // Return remaining amount to owner - await this.returnCreatorFundsByProjectId(deployment.projectId); + await this.returnCreatorFundsByProjectId(deployment.projectId, true); await this.db.updateProjectById(deployment.projectId, { fundsReleased, @@ -312,6 +312,9 @@ export class Service { if (!deployerRecords) { log(`No winning deployer for auction ${project!.auctionId}`); + + // Return all funds to the owner + await this.returnCreatorFundsByProjectId(project.id, false) } else { const deployers = await this.saveDeployersByDeployerRecords(deployerRecords); for (const deployer of deployers) { @@ -1329,7 +1332,7 @@ export class Service { return false; } - async returnCreatorFundsByProjectId(projectId: string) { + async returnCreatorFundsByProjectId(projectId: string, winningDeployersPresent: boolean) { const project = await this.db.getProjectById(projectId); if (!project || !project.auctionId) { @@ -1339,7 +1342,13 @@ export class Service { } const auction = await this.getAuctionData(project.auctionId); - const amountToBeReturned = auction.winnerPrice * auction.numProviders + + let amountToBeReturned; + if (winningDeployersPresent) { + amountToBeReturned = auction.winnerPrice * auction.numProviders; + } else { + amountToBeReturned = auction.maxPrice * auction.numProviders; + } await this.laconicRegistry.sendTokensToAccount( project.paymentAddress, -- 2.45.2 From 3033e75a9e51fec697bfbbcbaff2321287449fb5 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Thu, 24 Oct 2024 17:44:17 +0530 Subject: [PATCH 05/27] Add wallet connect provider for making payments --- .../components/projects/create/Configure.tsx | 4 + .../src/context/WalletConnectContext.tsx | 193 ++++++++++++++++++ packages/frontend/src/index.tsx | 19 +- packages/frontend/src/utils/web3modal.ts | 7 + 4 files changed, 215 insertions(+), 8 deletions(-) create mode 100644 packages/frontend/src/context/WalletConnectContext.tsx create mode 100644 packages/frontend/src/utils/web3modal.ts diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index 54a67a40..3a17b14e 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -22,6 +22,7 @@ import { useToast } from 'components/shared/Toast'; import { useGQLClient } from '../../../context/GQLClientContext'; import EnvironmentVariablesForm from 'pages/org-slug/projects/id/settings/EnvironmentVariablesForm'; import { EnvironmentVariablesFormValues } from 'types/types'; +import { useWalletConnectClient } from 'context/WalletConnectContext'; type ConfigureDeploymentFormValues = { option: string; @@ -34,6 +35,8 @@ type ConfigureFormValues = ConfigureDeploymentFormValues & EnvironmentVariablesFormValues; const Configure = () => { + const { onConnect } = useWalletConnectClient() + const [isLoading, setIsLoading] = useState(false); const [deployers, setDeployers] = useState([]); @@ -349,6 +352,7 @@ const Configure = () => { + ); diff --git a/packages/frontend/src/context/WalletConnectContext.tsx b/packages/frontend/src/context/WalletConnectContext.tsx new file mode 100644 index 00000000..ca45e184 --- /dev/null +++ b/packages/frontend/src/context/WalletConnectContext.tsx @@ -0,0 +1,193 @@ +import { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react'; + +import SignClient from '@walletconnect/sign-client'; +import { getSdkError } from '@walletconnect/utils'; +import { SessionTypes } from '@walletconnect/types'; +import { StargateClient } from '@cosmjs/stargate'; + +import { walletConnectModal } from '../utils/web3modal'; +import { VITE_WALLET_CONNECT_ID } from 'utils/constants'; + +interface ClientInterface { + signClient: SignClient | undefined; + session: SessionTypes.Struct | undefined; + loadingSession: boolean; + onConnect: () => Promise; + onDisconnect: () => Promise; + onSessionDelete: () => void; + accounts: {address: string, balance?: string}[] | undefined; +} + +const ClientContext = createContext({} as ClientInterface); + +export const useWalletConnectClient = () => { + return useContext(ClientContext); +}; + +export const WalletConnectClientProvider = ({ children }: {children: JSX.Element}) => { + const [signClient, setSignClient] = useState(); + const [session, setSession] = useState(); + const [loadingSession, setLoadingSession] = useState(true); + const [accounts, setAccounts] = useState<{address: string, balance?: string}[]>(); + + const isSignClientInitializing = useRef(false); + + const createCosmosClient = useCallback(async (endpoint: string) => { + return await StargateClient.connect(endpoint); + }, []); + + const onSessionConnect = useCallback(async(session: SessionTypes.Struct) => { + setSession(session); + }, []); + + useEffect(()=>{ + console.log(accounts) + }, [accounts]) + + const subscribeToEvents = useCallback( + async (client: SignClient) => { + client.on('session_update', ({ topic, params }) => { + const { namespaces } = params; + const currentSession = client.session.get(topic); + const updatedSession = { ...currentSession, namespaces }; + setSession(updatedSession); + });}, + [setSession] + ); + + const onConnect = async () => { + console.log({signClient}) + try { + const { uri, approval } = await signClient!.connect({}); + + console.log({uri}) + console.log({uri}) + + if (uri) { + walletConnectModal.openModal({ uri }); + const session = await approval(); + onSessionConnect(session); + walletConnectModal.closeModal(); + } + } catch (e) { + console.error(e); + } + }; + + const onDisconnect = useCallback(async () => { + if (typeof signClient === 'undefined') { + throw new Error('WalletConnect is not initialized'); + } + if (typeof session === 'undefined') { + throw new Error('Session is not connected'); + } + + await signClient.disconnect({ + topic: session.topic, + reason: getSdkError('USER_DISCONNECTED'), + }); + + onSessionDelete(); + }, [signClient, session]); + + const onSessionDelete = () => { + setAccounts(undefined); + setSession(undefined); + }; + + const checkPersistedState = useCallback( + async (signClient: SignClient) => { + if (typeof signClient === 'undefined') { + throw new Error('WalletConnect is not initialized'); + } + + if (typeof session !== 'undefined') return; + if (signClient.session.length) { + const lastKeyIndex = signClient.session.keys.length - 1; + const previousSsession = signClient.session.get( + signClient.session.keys[lastKeyIndex] + ); + + await onSessionConnect(previousSsession); + return previousSsession; + } + },[session, onSessionConnect]); + + const createClient = useCallback( async () => { + isSignClientInitializing.current = true; + try{ + const signClient = await SignClient.init({ + projectId: VITE_WALLET_CONNECT_ID, + metadata: { + name: 'Laconic Pay', + description: 'App for payments', + url: window.location.href, + icons: ['https://avatars.githubusercontent.com/u/92608123'] + } + }); + + setSignClient(signClient); + await checkPersistedState(signClient); + await subscribeToEvents(signClient); + setLoadingSession(false); + + } catch(e) { + console.error('error in createClient', e); + } + isSignClientInitializing.current = false; + }, [setSignClient, checkPersistedState, subscribeToEvents]); + + useEffect(() => { + if (!signClient && !isSignClientInitializing.current) { + createClient(); + } + }, [signClient, createClient]); + + useEffect(() => { + const populateAccounts = async () => { + if (!session) { + return; + } + const cosmosAddresses = session.namespaces['cosmos'].accounts; + + const cosmosAccounts = cosmosAddresses.map((address) => ({ + address, + })); + + const allAccounts = cosmosAccounts; + + setAccounts(allAccounts); + }; + + populateAccounts(); + }, [session, createCosmosClient]); + + useEffect(() => { + if(!signClient){ + return; + } + + signClient.on('session_delete', onSessionDelete); + + return () => { + signClient.off('session_delete', onSessionDelete); + }; + }); + + return ( + + {children} + + ); +}; diff --git a/packages/frontend/src/index.tsx b/packages/frontend/src/index.tsx index 66812111..787cef61 100644 --- a/packages/frontend/src/index.tsx +++ b/packages/frontend/src/index.tsx @@ -16,6 +16,7 @@ import { Toaster } from 'components/shared/Toast'; import { LogErrorBoundary } from 'utils/log-error'; import { BASE_URL } from 'utils/constants'; import Web3ModalProvider from './context/Web3Provider'; +import { WalletConnectClientProvider } from 'context/WalletConnectContext'; console.log(`v-0.0.9`); @@ -31,14 +32,16 @@ const gqlClient = new GQLClient({ gqlEndpoint }); root.render( - - - - - - - - + + + + + + + + + + , ); diff --git a/packages/frontend/src/utils/web3modal.ts b/packages/frontend/src/utils/web3modal.ts new file mode 100644 index 00000000..b89a6aff --- /dev/null +++ b/packages/frontend/src/utils/web3modal.ts @@ -0,0 +1,7 @@ +import { WalletConnectModal } from '@walletconnect/modal'; +import { VITE_WALLET_CONNECT_ID } from 'utils/constants'; + +export const walletConnectModal = new WalletConnectModal({ + projectId: VITE_WALLET_CONNECT_ID!, + chains:['cosmos:theta-testnet-001'] +}); -- 2.45.2 From a1597900f6c6ad911605e44382104a22083ceb45 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Thu, 24 Oct 2024 18:56:46 +0530 Subject: [PATCH 06/27] Add required namespaces and use laconic chain ID --- packages/frontend/.env.example | 2 + .../src/context/WalletConnectContext.tsx | 93 +++++++++++-------- packages/frontend/src/utils/constants.ts | 1 + packages/frontend/src/utils/web3modal.ts | 2 +- 4 files changed, 59 insertions(+), 39 deletions(-) diff --git a/packages/frontend/.env.example b/packages/frontend/.env.example index 24d6d6da..ac6ba474 100644 --- a/packages/frontend/.env.example +++ b/packages/frontend/.env.example @@ -15,3 +15,5 @@ VITE_BUGSNAG_API_KEY= VITE_PASSKEY_WALLET_RPID= VITE_TURNKEY_API_BASE_URL= VITE_TURNKEY_ORGANIZATION_ID= + +VITE_LACONICD_CHAIN_ID= diff --git a/packages/frontend/src/context/WalletConnectContext.tsx b/packages/frontend/src/context/WalletConnectContext.tsx index ca45e184..e4b2e173 100644 --- a/packages/frontend/src/context/WalletConnectContext.tsx +++ b/packages/frontend/src/context/WalletConnectContext.tsx @@ -1,4 +1,11 @@ -import { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react'; +import { + createContext, + useCallback, + useContext, + useEffect, + useRef, + useState, +} from 'react'; import SignClient from '@walletconnect/sign-client'; import { getSdkError } from '@walletconnect/utils'; @@ -6,7 +13,10 @@ import { SessionTypes } from '@walletconnect/types'; import { StargateClient } from '@cosmjs/stargate'; import { walletConnectModal } from '../utils/web3modal'; -import { VITE_WALLET_CONNECT_ID } from 'utils/constants'; +import { + VITE_LACONICD_CHAIN_ID, + VITE_WALLET_CONNECT_ID, +} from 'utils/constants'; interface ClientInterface { signClient: SignClient | undefined; @@ -15,7 +25,7 @@ interface ClientInterface { onConnect: () => Promise; onDisconnect: () => Promise; onSessionDelete: () => void; - accounts: {address: string, balance?: string}[] | undefined; + accounts: { address: string; balance?: string }[] | undefined; } const ClientContext = createContext({} as ClientInterface); @@ -24,11 +34,15 @@ export const useWalletConnectClient = () => { return useContext(ClientContext); }; -export const WalletConnectClientProvider = ({ children }: {children: JSX.Element}) => { +export const WalletConnectClientProvider = ({ + children, +}: { + children: JSX.Element; +}) => { const [signClient, setSignClient] = useState(); const [session, setSession] = useState(); const [loadingSession, setLoadingSession] = useState(true); - const [accounts, setAccounts] = useState<{address: string, balance?: string}[]>(); + const [accounts, setAccounts] = useState<{ address: string }[]>(); const isSignClientInitializing = useRef(false); @@ -36,14 +50,10 @@ export const WalletConnectClientProvider = ({ children }: {children: JSX.Element return await StargateClient.connect(endpoint); }, []); - const onSessionConnect = useCallback(async(session: SessionTypes.Struct) => { + const onSessionConnect = useCallback(async (session: SessionTypes.Struct) => { setSession(session); }, []); - useEffect(()=>{ - console.log(accounts) - }, [accounts]) - const subscribeToEvents = useCallback( async (client: SignClient) => { client.on('session_update', ({ topic, params }) => { @@ -51,17 +61,24 @@ export const WalletConnectClientProvider = ({ children }: {children: JSX.Element const currentSession = client.session.get(topic); const updatedSession = { ...currentSession, namespaces }; setSession(updatedSession); - });}, - [setSession] + }); + }, + [setSession], ); const onConnect = async () => { - console.log({signClient}) - try { - const { uri, approval } = await signClient!.connect({}); + const proposalNamespace = { + cosmos: { + methods: ['cosmos_sendTransaction'], + chains: [`cosmos:${VITE_LACONICD_CHAIN_ID}`], + events: [], + }, + }; - console.log({uri}) - console.log({uri}) + try { + const { uri, approval } = await signClient!.connect({ + requiredNamespaces: proposalNamespace, + }); if (uri) { walletConnectModal.openModal({ uri }); @@ -105,33 +122,34 @@ export const WalletConnectClientProvider = ({ children }: {children: JSX.Element if (signClient.session.length) { const lastKeyIndex = signClient.session.keys.length - 1; const previousSsession = signClient.session.get( - signClient.session.keys[lastKeyIndex] + signClient.session.keys[lastKeyIndex], ); await onSessionConnect(previousSsession); return previousSsession; } - },[session, onSessionConnect]); + }, + [session, onSessionConnect], + ); - const createClient = useCallback( async () => { + const createClient = useCallback(async () => { isSignClientInitializing.current = true; - try{ + try { const signClient = await SignClient.init({ projectId: VITE_WALLET_CONNECT_ID, metadata: { - name: 'Laconic Pay', - description: 'App for payments', + name: 'Snowball', + description: 'App for deploying apps', url: window.location.href, - icons: ['https://avatars.githubusercontent.com/u/92608123'] - } + icons: ['https://avatars.githubusercontent.com/u/92608123'], + }, }); setSignClient(signClient); await checkPersistedState(signClient); await subscribeToEvents(signClient); setLoadingSession(false); - - } catch(e) { + } catch (e) { console.error('error in createClient', e); } isSignClientInitializing.current = false; @@ -163,7 +181,7 @@ export const WalletConnectClientProvider = ({ children }: {children: JSX.Element }, [session, createCosmosClient]); useEffect(() => { - if(!signClient){ + if (!signClient) { return; } @@ -176,16 +194,15 @@ export const WalletConnectClientProvider = ({ children }: {children: JSX.Element return ( {children} diff --git a/packages/frontend/src/utils/constants.ts b/packages/frontend/src/utils/constants.ts index 57bd5391..8e2d77b0 100644 --- a/packages/frontend/src/utils/constants.ts +++ b/packages/frontend/src/utils/constants.ts @@ -9,3 +9,4 @@ export const VITE_GITHUB_CLIENT_ID = import.meta.env.VITE_GITHUB_CLIENT_ID; export const VITE_WALLET_CONNECT_ID = import.meta.env.VITE_WALLET_CONNECT_ID; export const VITE_BUGSNAG_API_KEY = import.meta.env.VITE_BUGSNAG_API_KEY; export const VITE_LIT_RELAY_API_KEY = import.meta.env.VITE_LIT_RELAY_API_KEY; +export const VITE_LACONICD_CHAIN_ID = import.meta.env.VITE_LACONICD_CHAIN_ID; diff --git a/packages/frontend/src/utils/web3modal.ts b/packages/frontend/src/utils/web3modal.ts index b89a6aff..45a6d204 100644 --- a/packages/frontend/src/utils/web3modal.ts +++ b/packages/frontend/src/utils/web3modal.ts @@ -3,5 +3,5 @@ import { VITE_WALLET_CONNECT_ID } from 'utils/constants'; export const walletConnectModal = new WalletConnectModal({ projectId: VITE_WALLET_CONNECT_ID!, - chains:['cosmos:theta-testnet-001'] + chains:['cosmos:theta-testnet-001', 'cosmos:laconic_9000-1'], }); -- 2.45.2 From 7383d5c36d1d890ebb72a1c2a7b4def94e1b8c1a Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Thu, 24 Oct 2024 19:07:02 +0530 Subject: [PATCH 07/27] Add method to get address from private key --- packages/backend/src/registry.ts | 9 ++++++++- packages/backend/src/resolvers.ts | 4 ++++ packages/backend/src/schema.gql | 1 + packages/backend/src/service.ts | 4 ++++ packages/gql-client/src/client.ts | 8 ++++++++ packages/gql-client/src/queries.ts | 6 ++++++ 6 files changed, 31 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/registry.ts b/packages/backend/src/registry.ts index 37f1f830..1519da71 100644 --- a/packages/backend/src/registry.ts +++ b/packages/backend/src/registry.ts @@ -5,7 +5,7 @@ import { Octokit } from 'octokit'; import { inc as semverInc } from 'semver'; import { DeepPartial } from 'typeorm'; -import { Registry as LaconicRegistry, getGasPrice, parseGasAndFees } from '@cerc-io/registry-sdk'; +import { Account, Registry as LaconicRegistry, getGasPrice, parseGasAndFees } from '@cerc-io/registry-sdk'; import { RegistryConfig } from './config'; import { @@ -498,6 +498,13 @@ export class Registry { ); } + async getAddress(): Promise { + const account = new Account(Buffer.from(this.registryConfig.privateKey, 'hex')); + await account.init(); + + return account.address; + } + getLrn(appName: string): string { assert(this.registryConfig.authority, "Authority doesn't exist"); return `lrn://${this.registryConfig.authority}/applications/${appName}`; diff --git a/packages/backend/src/resolvers.ts b/packages/backend/src/resolvers.ts index e4692d99..7995765d 100644 --- a/packages/backend/src/resolvers.ts +++ b/packages/backend/src/resolvers.ts @@ -80,6 +80,10 @@ export const createResolvers = async (service: Service): Promise => { deployers: async (_: any, __: any, context: any) => { return service.getDeployers(); }, + + address: async (_: any, __: any, context: any) => { + return service.getAddress(); + }, }, // TODO: Return error in GQL response diff --git a/packages/backend/src/schema.gql b/packages/backend/src/schema.gql index 81f3ac85..c4427b02 100644 --- a/packages/backend/src/schema.gql +++ b/packages/backend/src/schema.gql @@ -264,6 +264,7 @@ type Query { getAuctionData(auctionId: String!): Auction! domains(projectId: String!, filter: FilterDomainsInput): [Domain] deployers: [Deployer] + address: String! } type Mutation { diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index 0801ebfa..6f48cc9e 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -1401,4 +1401,8 @@ export class Service { return deployers; } + + async getAddress(): Promise { + return this.laconicRegistry.getAddress(); + } } diff --git a/packages/gql-client/src/client.ts b/packages/gql-client/src/client.ts index 87e4bc80..558ccc2c 100644 --- a/packages/gql-client/src/client.ts +++ b/packages/gql-client/src/client.ts @@ -432,4 +432,12 @@ export class GQLClient { return data; } + + async getAddress(): Promise { + const { data } = await this.client.query({ + query: queries.getAddress, + }); + + return data; + } } diff --git a/packages/gql-client/src/queries.ts b/packages/gql-client/src/queries.ts index e3274827..4aa12b83 100644 --- a/packages/gql-client/src/queries.ts +++ b/packages/gql-client/src/queries.ts @@ -323,3 +323,9 @@ query { } } `; + +export const getAddress = gql` +query { + address +} +`; -- 2.45.2 From 2b7c75f97b60aa381f057793895ec98f3d73bfce Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Thu, 24 Oct 2024 19:07:50 +0530 Subject: [PATCH 08/27] Display account addresses after connecting wallet --- .../components/projects/create/Configure.tsx | 6 ++-- .../projects/create/ConnectWallet.tsx | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 packages/frontend/src/components/projects/create/ConnectWallet.tsx diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index 3a17b14e..addcdd6a 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -22,7 +22,7 @@ import { useToast } from 'components/shared/Toast'; import { useGQLClient } from '../../../context/GQLClientContext'; import EnvironmentVariablesForm from 'pages/org-slug/projects/id/settings/EnvironmentVariablesForm'; import { EnvironmentVariablesFormValues } from 'types/types'; -import { useWalletConnectClient } from 'context/WalletConnectContext'; +import ConnectWallet from './ConnectWallet'; type ConfigureDeploymentFormValues = { option: string; @@ -35,8 +35,6 @@ type ConfigureFormValues = ConfigureDeploymentFormValues & EnvironmentVariablesFormValues; const Configure = () => { - const { onConnect } = useWalletConnectClient() - const [isLoading, setIsLoading] = useState(false); const [deployers, setDeployers] = useState([]); @@ -352,7 +350,7 @@ const Configure = () => { - + ); diff --git a/packages/frontend/src/components/projects/create/ConnectWallet.tsx b/packages/frontend/src/components/projects/create/ConnectWallet.tsx new file mode 100644 index 00000000..9dbc6e6a --- /dev/null +++ b/packages/frontend/src/components/projects/create/ConnectWallet.tsx @@ -0,0 +1,32 @@ +import { Button } from '../../shared/Button'; +import { useWalletConnectClient } from 'context/WalletConnectContext'; +// import { useGQLClient } from '../../../context/GQLClientContext'; +import { Select, Option } from '@snowballtools/material-tailwind-react-fork'; + +const ConnectWallet = () => { + const { onConnect, accounts } = useWalletConnectClient(); + // const client = useGQLClient(); + + const handleConnect = async () => { + await onConnect(); + // const snowballaddress = await client.getAddress(); + }; + + return ( + <> + {!accounts ? ( + + ) : ( + + )} + + ); +}; + +export default ConnectWallet; -- 2.45.2 From 9443d90a6fc86ed5855415339091fa44219f5328 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Fri, 25 Oct 2024 10:58:57 +0530 Subject: [PATCH 09/27] Add method to make payments using wallet --- .../projects/create/ConnectWallet.tsx | 93 ++++++++++++++++--- .../src/context/WalletConnectContext.tsx | 2 +- packages/gql-client/src/client.ts | 2 +- 3 files changed, 84 insertions(+), 13 deletions(-) diff --git a/packages/frontend/src/components/projects/create/ConnectWallet.tsx b/packages/frontend/src/components/projects/create/ConnectWallet.tsx index 9dbc6e6a..09bd87bb 100644 --- a/packages/frontend/src/components/projects/create/ConnectWallet.tsx +++ b/packages/frontend/src/components/projects/create/ConnectWallet.tsx @@ -1,29 +1,100 @@ import { Button } from '../../shared/Button'; import { useWalletConnectClient } from 'context/WalletConnectContext'; -// import { useGQLClient } from '../../../context/GQLClientContext'; import { Select, Option } from '@snowballtools/material-tailwind-react-fork'; +import { useGQLClient } from 'context/GQLClientContext'; +import { useCallback, useEffect, useState } from 'react'; + +const TEST_AMOUNT = "10000" const ConnectWallet = () => { - const { onConnect, accounts } = useWalletConnectClient(); - // const client = useGQLClient(); + const { onConnect, accounts, signClient, session } = useWalletConnectClient(); + const client = useGQLClient(); + + const [selectedAccount, setSelectedAccount] = useState<{ + address: string; + balance?: string; + }>(); + const [txHash, setTxHash] = useState(); + const [snowballAddress, setSnowballAddress] = useState(); const handleConnect = async () => { await onConnect(); - // const snowballaddress = await client.getAddress(); }; + const cosmosSendTokensHandler = useCallback( + async (senderAddress: string, amount: string) => { + if (!signClient || !session || !selectedAccount) { + console.log({signClient, session, selectedAccount}) + return; + } + + const chainId = selectedAccount.address.split(':')[1]; + + try { + const result: { + signature: string; + } = await signClient.request({ + topic: session.topic, + chainId: `cosmos:${chainId}`, + request: { + method: 'cosmos_sendTokens', + params: [ + { + from: senderAddress, + to: snowballAddress, + value: amount, + }, + ], + }, + }); + if (!result) { + throw new Error('Error completing transaction'); + } + + setTxHash(result.signature); + console.log(txHash) + } catch (error: any) { + throw error; + } + }, + [session, signClient, selectedAccount], + ); + + const fetchSnowballAddress = useCallback(async() => { + + const address = await client.getAddress(); + setSnowballAddress(address); + + console.log(address) + }, [client]) + + useEffect(() => { + fetchSnowballAddress() + }, []) + return ( <> {!accounts ? ( ) : ( - +
+ + +
)} ); diff --git a/packages/frontend/src/context/WalletConnectContext.tsx b/packages/frontend/src/context/WalletConnectContext.tsx index e4b2e173..3639e161 100644 --- a/packages/frontend/src/context/WalletConnectContext.tsx +++ b/packages/frontend/src/context/WalletConnectContext.tsx @@ -69,7 +69,7 @@ export const WalletConnectClientProvider = ({ const onConnect = async () => { const proposalNamespace = { cosmos: { - methods: ['cosmos_sendTransaction'], + methods: ['cosmos_sendTokens'], chains: [`cosmos:${VITE_LACONICD_CHAIN_ID}`], events: [], }, diff --git a/packages/gql-client/src/client.ts b/packages/gql-client/src/client.ts index 558ccc2c..5bf769d9 100644 --- a/packages/gql-client/src/client.ts +++ b/packages/gql-client/src/client.ts @@ -438,6 +438,6 @@ export class GQLClient { query: queries.getAddress, }); - return data; + return data.address; } } -- 2.45.2 From 31c1409312c4a9a5fe0605be033fb96e50e8c0b0 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Fri, 25 Oct 2024 11:26:14 +0530 Subject: [PATCH 10/27] Add method to verify tx hash --- packages/backend/src/registry.ts | 11 +++++++++- packages/backend/src/resolvers.ts | 11 ++++++++++ packages/backend/src/schema.gql | 1 + packages/backend/src/service.ts | 22 +++++++++++++++++++ .../projects/create/template/index.tsx | 10 --------- packages/gql-client/src/client.ts | 18 +++++++++++++++ packages/gql-client/src/queries.ts | 6 +++++ 7 files changed, 68 insertions(+), 11 deletions(-) diff --git a/packages/backend/src/registry.ts b/packages/backend/src/registry.ts index 1519da71..4f1cf626 100644 --- a/packages/backend/src/registry.ts +++ b/packages/backend/src/registry.ts @@ -5,7 +5,7 @@ import { Octokit } from 'octokit'; import { inc as semverInc } from 'semver'; import { DeepPartial } from 'typeorm'; -import { Account, Registry as LaconicRegistry, getGasPrice, parseGasAndFees } from '@cerc-io/registry-sdk'; +import { Account, Registry as LaconicRegistry, getGasPrice, parseGasAndFees, IndexedTx } from '@cerc-io/registry-sdk'; import { RegistryConfig } from './config'; import { @@ -505,6 +505,15 @@ export class Registry { return account.address; } + async getTxResponse(txHash: string): Promise { + const account = new Account(Buffer.from(this.registryConfig.privateKey, 'hex')); + await account.init(); + const laconicClient = await this.registry.getLaconicClient(account); + const txResponse: IndexedTx | null = await laconicClient.getTx(txHash); + + return txResponse; + } + getLrn(appName: string): string { assert(this.registryConfig.authority, "Authority doesn't exist"); return `lrn://${this.registryConfig.authority}/applications/${appName}`; diff --git a/packages/backend/src/resolvers.ts b/packages/backend/src/resolvers.ts index 7995765d..3fe9a9be 100644 --- a/packages/backend/src/resolvers.ts +++ b/packages/backend/src/resolvers.ts @@ -84,6 +84,17 @@ export const createResolvers = async (service: Service): Promise => { address: async (_: any, __: any, context: any) => { return service.getAddress(); }, + + verifyTx: async ( + _: any, + { + txHash, + amount, + senderAddress, + }: { txHash: string; amount: string; senderAddress: string }, + ) => { + return service.verifyTx(txHash, amount, senderAddress); + }, }, // TODO: Return error in GQL response diff --git a/packages/backend/src/schema.gql b/packages/backend/src/schema.gql index c4427b02..4ea3f22c 100644 --- a/packages/backend/src/schema.gql +++ b/packages/backend/src/schema.gql @@ -265,6 +265,7 @@ type Query { domains(projectId: String!, filter: FilterDomainsInput): [Domain] deployers: [Deployer] address: String! + verifyTx(txhash: String!, amount: String!, senderAddress: String!): Boolean! } type Mutation { diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index 6f48cc9e..0788db85 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -1405,4 +1405,26 @@ export class Service { async getAddress(): Promise { return this.laconicRegistry.getAddress(); } + + async verifyTx(txhash: string, amountSent: string, senderAddress: string): Promise { + const txResponse = await this.laconicRegistry.getTxResponse(txhash); + if (!txResponse) { + log('Transaction response not found'); + return false; + } + + const transfer = txResponse.events.find(e => e.type === 'transfer' && e.attributes.some(a => a.key === 'msg_index')); + if (!transfer) { + log('No transfer event found'); + return false; + } + + const sender = transfer.attributes.find(a => a.key === 'sender')?.value; + const recipient = transfer.attributes.find(a => a.key === 'recipient')?.value; + const amount = transfer.attributes.find(a => a.key === 'amount')?.value; + + const recipientAddress = await this.getAddress(); + + return amount === amountSent && sender === senderAddress && recipient === recipientAddress; + } } diff --git a/packages/frontend/src/pages/org-slug/projects/create/template/index.tsx b/packages/frontend/src/pages/org-slug/projects/create/template/index.tsx index 9879c56d..7e855240 100644 --- a/packages/frontend/src/pages/org-slug/projects/create/template/index.tsx +++ b/packages/frontend/src/pages/org-slug/projects/create/template/index.tsx @@ -14,7 +14,6 @@ import { ArrowRightCircleFilledIcon, LoadingIcon, } from 'components/shared/CustomIcon'; -import { Checkbox } from 'components/shared/Checkbox'; import { Button } from 'components/shared/Button'; import { useToast } from 'components/shared/Toast'; @@ -169,15 +168,6 @@ const CreateRepo = () => { )} /> -
- ( - - )} - /> -
@@ -350,7 +359,7 @@ const Configure = () => { - + ); diff --git a/packages/frontend/src/components/projects/create/ConnectWallet.tsx b/packages/frontend/src/components/projects/create/ConnectWallet.tsx index 0c38a1e4..86b79c0c 100644 --- a/packages/frontend/src/components/projects/create/ConnectWallet.tsx +++ b/packages/frontend/src/components/projects/create/ConnectWallet.tsx @@ -1,39 +1,46 @@ +import { useMemo, useState, useCallback } from 'react'; +import { Select, Option } from '@snowballtools/material-tailwind-react-fork'; import { Button } from '../../shared/Button'; import { useWalletConnectClient } from 'context/WalletConnectContext'; -import { Select, Option } from '@snowballtools/material-tailwind-react-fork'; import { useGQLClient } from 'context/GQLClientContext'; -import { useCallback, useEffect, useState } from 'react'; -const TEST_AMOUNT = "10000" - -const ConnectWallet = () => { +const ConnectWallet = ({ numProviders }: { numProviders: number }) => { const { onConnect, accounts, signClient, session } = useWalletConnectClient(); const client = useGQLClient(); - const [selectedAccount, setSelectedAccount] = useState<{ - address: string; - balance?: string; - }>(); - const [txHash, setTxHash] = useState(); - const [snowballAddress, setSnowballAddress] = useState(); + const [selectedAccount, setSelectedAccount] = useState(); + const [isTxValid, setIsTxValid] = useState(false); + + const amount = useMemo(() => numProviders * 10000, [numProviders]); const handleConnect = async () => { await onConnect(); }; + const verifyTx = async ( + senderAddress: string, + txHash: string, + ): Promise => { + const isValid = await client.verifyTx( + txHash, + `${amount.toString()}alnt`, + senderAddress, + ); + return isValid; + }; + const cosmosSendTokensHandler = useCallback( - async (senderAddress: string, amount: string) => { - if (!signClient || !session || !selectedAccount || !snowballAddress) { - console.log({signClient, session, selectedAccount}) + async (selectedAccount: string) => { + if (!signClient || !session || !selectedAccount) { return; } - const chainId = selectedAccount.address.split(':')[1]; + const chainId = selectedAccount.split(':')[1]; + const senderAddress = selectedAccount.split(':')[2]; + const snowballAddress = await client.getAddress(); try { - const result: { - signature: string; - } = await signClient.request({ + const result: { signature: string } = await signClient.request({ topic: session.topic, chainId: `cosmos:${chainId}`, request: { @@ -47,47 +54,33 @@ const ConnectWallet = () => { ], }, }); + if (!result) { throw new Error('Error completing transaction'); } - setTxHash(result.signature); + const isValid = await verifyTx(senderAddress, result.signature); + setIsTxValid(isValid); } catch (error: any) { throw error; } }, - [session, signClient, selectedAccount, snowballAddress], + [session, signClient, selectedAccount, amount], ); - useEffect(() => { - console.log(txHash) - }, [txHash]) - - const fetchSnowballAddress = useCallback(async() => { - - const address = await client.getAddress(); - setSnowballAddress(address); - - console.log(address) - }, [client]) - - useEffect(() => { - fetchSnowballAddress() - }, []) - return ( - <> +
{!accounts ? ( + ) : isTxValid ? ( +
Tx successful!
) : (
- +
)} - +
); }; diff --git a/packages/frontend/src/context/WalletConnectContext.tsx b/packages/frontend/src/context/WalletConnectContext.tsx index 3639e161..a8a1bfe6 100644 --- a/packages/frontend/src/context/WalletConnectContext.tsx +++ b/packages/frontend/src/context/WalletConnectContext.tsx @@ -25,7 +25,7 @@ interface ClientInterface { onConnect: () => Promise; onDisconnect: () => Promise; onSessionDelete: () => void; - accounts: { address: string; balance?: string }[] | undefined; + accounts: { address: string }[] | undefined; } const ClientContext = createContext({} as ClientInterface); diff --git a/packages/frontend/src/utils/web3modal.ts b/packages/frontend/src/utils/web3modal.ts index 45a6d204..ae8c90a1 100644 --- a/packages/frontend/src/utils/web3modal.ts +++ b/packages/frontend/src/utils/web3modal.ts @@ -3,5 +3,5 @@ import { VITE_WALLET_CONNECT_ID } from 'utils/constants'; export const walletConnectModal = new WalletConnectModal({ projectId: VITE_WALLET_CONNECT_ID!, - chains:['cosmos:theta-testnet-001', 'cosmos:laconic_9000-1'], + chains: ['cosmos:theta-testnet-001', 'cosmos:laconic_9000-1'], }); diff --git a/packages/gql-client/src/client.ts b/packages/gql-client/src/client.ts index edd0cd77..adfa6ada 100644 --- a/packages/gql-client/src/client.ts +++ b/packages/gql-client/src/client.ts @@ -441,21 +441,21 @@ export class GQLClient { return data.address; } - async verifyTx(txhash: string, amount: string, senderAddress: string): Promise { + async verifyTx(txHash: string, amount: string, senderAddress: string): Promise { console.log('Verifying Transaction with parameters:', { - txhash, + txHash, amount, senderAddress }); - const { data } = await this.client.query({ + const { data: verifyTx } = await this.client.query({ query: queries.verifyTx, variables: { - txhash, + txHash, amount, senderAddress } }); - return data; + return verifyTx; } } diff --git a/packages/gql-client/src/queries.ts b/packages/gql-client/src/queries.ts index a9c3e8e3..815fa073 100644 --- a/packages/gql-client/src/queries.ts +++ b/packages/gql-client/src/queries.ts @@ -331,7 +331,7 @@ query { `; export const verifyTx = gql` -query ($txhash: String!, $amount: String!, $senderAddress: String!) { - verifyTx(txhash: $txhash, amount: $amount, senderAddress: $senderAddress) +query ($txHash: String!, $amount: String!, $senderAddress: String!) { + verifyTx(txHash: $txHash, amount: $amount, senderAddress: $senderAddress) } `; -- 2.45.2 From 1af5d64b1f520a0367b7ed57e5c8397ee1da88d4 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Fri, 25 Oct 2024 14:45:36 +0530 Subject: [PATCH 13/27] Update flow in UI for making payments --- packages/backend/src/resolvers.ts | 20 ++--- .../components/projects/create/Configure.tsx | 87 +++++++++++++++++-- .../projects/create/ConnectWallet.tsx | 82 +++-------------- 3 files changed, 104 insertions(+), 85 deletions(-) diff --git a/packages/backend/src/resolvers.ts b/packages/backend/src/resolvers.ts index 3fe9a9be..f9282423 100644 --- a/packages/backend/src/resolvers.ts +++ b/packages/backend/src/resolvers.ts @@ -85,16 +85,16 @@ export const createResolvers = async (service: Service): Promise => { return service.getAddress(); }, - verifyTx: async ( - _: any, - { - txHash, - amount, - senderAddress, - }: { txHash: string; amount: string; senderAddress: string }, - ) => { - return service.verifyTx(txHash, amount, senderAddress); - }, + // verifyTx: async ( + // _: any, + // { + // txHash, + // amount, + // senderAddress, + // }: { txHash: string; amount: string; senderAddress: string }, + // ) => { + // return service.verifyTx(txHash, amount, senderAddress); + // }, }, // TODO: Return error in GQL response diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index ca64d1bd..b89e5dbf 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -23,6 +23,7 @@ import { useGQLClient } from '../../../context/GQLClientContext'; import EnvironmentVariablesForm from 'pages/org-slug/projects/id/settings/EnvironmentVariablesForm'; import { EnvironmentVariablesFormValues } from 'types/types'; import ConnectWallet from './ConnectWallet'; +import { useWalletConnectClient } from 'context/WalletConnectContext'; type ConfigureDeploymentFormValues = { option: string; @@ -35,8 +36,11 @@ type ConfigureFormValues = ConfigureDeploymentFormValues & EnvironmentVariablesFormValues; const Configure = () => { + const { signClient, session } = useWalletConnectClient(); + const [isLoading, setIsLoading] = useState(false); const [deployers, setDeployers] = useState([]); + const [selectedAccount, setSelectedAccount] = useState(); const [searchParams] = useSearchParams(); const templateId = searchParams.get('templateId'); @@ -148,12 +152,41 @@ const Configure = () => { } }; + // const verifyTx = async ( + // senderAddress: string, + // txHash: string, + // ): Promise => { + // const isValid = await client.verifyTx( + // txHash, + // `${amount.toString()}alnt`, + // senderAddress, + // ); + // return isValid; + // }; + const handleFormSubmit = useCallback( async (createFormData: FieldValues) => { // Send tx request to wallet -> amount = createFormData.maxPrice * createFormData.numProviders // Get address of sender account(from wallet connect session) and txHash(result.signature) - const senderAddress = 'address'; - const txHash = 'txHash'; + if (!selectedAccount) { + return; + } + + const senderAddress = selectedAccount; + + const amount = createFormData.numProviders * createFormData.maxPrice; + const txHash = await cosmosSendTokensHandler( + selectedAccount, + String(amount), + ); + + console.log(txHash); + + // const isTxHashValid = verifyTx(senderAddress, txHash); + // if (!isTxHashValid) { + // console.error("Invalid Tx hash", txHash) + // return + // } const environmentVariables = createFormData.variables.map( (variable: any) => { @@ -171,7 +204,7 @@ const Configure = () => { createFormData, environmentVariables, senderAddress, - txHash, + txHash!, ); await client.getEnvironmentVariables(projectId); @@ -202,6 +235,48 @@ const Configure = () => { setDeployers(res.deployers); }, [client]); + const onAccountChange = useCallback((account: string) => { + setSelectedAccount(account); + }, []); + + const cosmosSendTokensHandler = useCallback( + async (selectedAccount: string, amount: string) => { + if (!signClient || !session || !selectedAccount) { + return; + } + + const chainId = selectedAccount.split(':')[1]; + const senderAddress = selectedAccount.split(':')[2]; + const snowballAddress = await client.getAddress(); + + try { + const result: { signature: string } = await signClient.request({ + topic: session.topic, + chainId: `cosmos:${chainId}`, + request: { + method: 'cosmos_sendTokens', + params: [ + { + from: senderAddress, + to: snowballAddress, + value: amount, + }, + ], + }, + }); + + if (!result) { + throw new Error('Error completing transaction'); + } + + return result.signature; + } catch (error: any) { + throw error; + } + }, + [session, signClient], + ); + useEffect(() => { fetchDeployers(); }, []); @@ -340,7 +415,10 @@ const Configure = () => {
- + + Connect to your wallet + +
- ); diff --git a/packages/frontend/src/components/projects/create/ConnectWallet.tsx b/packages/frontend/src/components/projects/create/ConnectWallet.tsx index 86b79c0c..fffa82eb 100644 --- a/packages/frontend/src/components/projects/create/ConnectWallet.tsx +++ b/packages/frontend/src/components/projects/create/ConnectWallet.tsx @@ -1,86 +1,33 @@ -import { useMemo, useState, useCallback } from 'react'; import { Select, Option } from '@snowballtools/material-tailwind-react-fork'; import { Button } from '../../shared/Button'; import { useWalletConnectClient } from 'context/WalletConnectContext'; -import { useGQLClient } from 'context/GQLClientContext'; -const ConnectWallet = ({ numProviders }: { numProviders: number }) => { - const { onConnect, accounts, signClient, session } = useWalletConnectClient(); - const client = useGQLClient(); - - const [selectedAccount, setSelectedAccount] = useState(); - const [isTxValid, setIsTxValid] = useState(false); - - const amount = useMemo(() => numProviders * 10000, [numProviders]); +const ConnectWallet = ({ + onAccountChange, +}: { + onAccountChange: (selectedAccount: string) => void; +}) => { + const { onConnect, accounts } = useWalletConnectClient(); const handleConnect = async () => { await onConnect(); }; - const verifyTx = async ( - senderAddress: string, - txHash: string, - ): Promise => { - const isValid = await client.verifyTx( - txHash, - `${amount.toString()}alnt`, - senderAddress, - ); - return isValid; - }; - - const cosmosSendTokensHandler = useCallback( - async (selectedAccount: string) => { - if (!signClient || !session || !selectedAccount) { - return; - } - - const chainId = selectedAccount.split(':')[1]; - const senderAddress = selectedAccount.split(':')[2]; - const snowballAddress = await client.getAddress(); - - try { - const result: { signature: string } = await signClient.request({ - topic: session.topic, - chainId: `cosmos:${chainId}`, - request: { - method: 'cosmos_sendTokens', - params: [ - { - from: senderAddress, - to: snowballAddress, - value: amount, - }, - ], - }, - }); - - if (!result) { - throw new Error('Error completing transaction'); - } - - const isValid = await verifyTx(senderAddress, result.signature); - setIsTxValid(isValid); - } catch (error: any) { - throw error; - } - }, - [session, signClient, selectedAccount, amount], - ); - return (
{!accounts ? ( - - ) : isTxValid ? ( -
Tx successful!
+
+ +
) : (
-
)}
-- 2.45.2 From 9937547277e6ee9c869278f4d84f007a19149b69 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Fri, 25 Oct 2024 15:20:16 +0530 Subject: [PATCH 14/27] Use minimum payment for set deployer flow --- packages/backend/src/entity/Deployer.ts | 3 + packages/backend/src/schema.gql | 1 + packages/backend/src/service.ts | 4 +- packages/backend/src/types.ts | 1 + .../components/projects/create/Configure.tsx | 65 ++++++++++----- .../frontend/src/pages/auth/CreatePasskey.tsx | 83 ------------------- .../frontend/src/pages/components/modals.tsx | 1 + .../frontend/src/stories/MockStoriesData.ts | 2 + packages/frontend/src/utils/use-snowball.ts | 33 -------- packages/gql-client/src/queries.ts | 5 ++ packages/gql-client/src/types.ts | 1 + 11 files changed, 60 insertions(+), 139 deletions(-) delete mode 100644 packages/frontend/src/pages/auth/CreatePasskey.tsx delete mode 100644 packages/frontend/src/utils/use-snowball.ts diff --git a/packages/backend/src/entity/Deployer.ts b/packages/backend/src/entity/Deployer.ts index 854ab1dd..4328a122 100644 --- a/packages/backend/src/entity/Deployer.ts +++ b/packages/backend/src/entity/Deployer.ts @@ -15,6 +15,9 @@ export class Deployer { @Column('varchar') baseDomain!: string; + @Column('varchar', { nullable: true }) + minimumPayment!: string | null; + @ManyToMany(() => Project, (project) => project.deployers) projects!: Project[]; } diff --git a/packages/backend/src/schema.gql b/packages/backend/src/schema.gql index 593682ed..3f7a615d 100644 --- a/packages/backend/src/schema.gql +++ b/packages/backend/src/schema.gql @@ -139,6 +139,7 @@ type Deployer { deployerLrn: String! deployerId: String! deployerApiUrl: String! + minimumPayment: String createdAt: String! updatedAt: String! } diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index f55e854d..417e3cfb 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -1384,13 +1384,15 @@ export class Service { const deployerId = record.id; const deployerLrn = record.names[0]; const deployerApiUrl = record.attributes.apiUrl; + const minimumPayment = record.attributes.minimumPayment const baseDomain = deployerApiUrl.substring(deployerApiUrl.indexOf('.') + 1); const deployerData = { deployerLrn, deployerId, deployerApiUrl, - baseDomain + baseDomain, + minimumPayment }; // TODO: Update deployers table in a separate job diff --git a/packages/backend/src/types.ts b/packages/backend/src/types.ts index 3223067d..83c810ae 100644 --- a/packages/backend/src/types.ts +++ b/packages/backend/src/types.ts @@ -94,6 +94,7 @@ export interface DeployerRecord { expiryTime: string; attributes: { apiUrl: string; + minimumPayment: string | null; name: string; paymentAddress: string; publicKey: string; diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index b89e5dbf..d6d8dacb 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -152,41 +152,62 @@ const Configure = () => { } }; - // const verifyTx = async ( - // senderAddress: string, - // txHash: string, - // ): Promise => { - // const isValid = await client.verifyTx( - // txHash, - // `${amount.toString()}alnt`, - // senderAddress, - // ); - // return isValid; - // }; + const verifyTx = async ( + senderAddress: string, + txHash: string, + amount: string + ): Promise => { + const isValid = await client.verifyTx( + txHash, + `${amount.toString()}alnt`, + senderAddress, + ); + return isValid; + }; const handleFormSubmit = useCallback( async (createFormData: FieldValues) => { - // Send tx request to wallet -> amount = createFormData.maxPrice * createFormData.numProviders - // Get address of sender account(from wallet connect session) and txHash(result.signature) if (!selectedAccount) { return; } const senderAddress = selectedAccount; - const amount = createFormData.numProviders * createFormData.maxPrice; + let amount: string; + if(createFormData.option === 'LRN') { + const deployerLrn = createFormData.lrn; + const deployer = deployers.find(deployer => deployer.deployerLrn === deployerLrn); + if (!deployer?.minimumPayment) { + toast({ + id: 'no-payment-required', + title: 'No payment', + variant: 'info', + onDismiss: dismiss, + }); + + amount = '' + } else { + amount = deployer!.minimumPayment + } + } else { + amount = (createFormData.numProviders * createFormData.maxPrice).toString(); + } + const txHash = await cosmosSendTokensHandler( selectedAccount, - String(amount), + amount, ); - console.log(txHash); + if(!txHash) { + console.error('Tx not successful'); + return; + } - // const isTxHashValid = verifyTx(senderAddress, txHash); - // if (!isTxHashValid) { - // console.error("Invalid Tx hash", txHash) - // return - // } + const isTxHashValid = verifyTx(senderAddress, txHash, amount.toString()); + if (!isTxHashValid) { + console.error("Invalid Tx hash", txHash) + return + } const environmentVariables = createFormData.variables.map( (variable: any) => { @@ -352,7 +373,7 @@ const Configure = () => { key={deployer.deployerLrn} value={deployer.deployerLrn} > - {deployer.deployerLrn} + {deployer.deployerLrn} {deployer.minimumPayment} ))} diff --git a/packages/frontend/src/pages/auth/CreatePasskey.tsx b/packages/frontend/src/pages/auth/CreatePasskey.tsx deleted file mode 100644 index b976f973..00000000 --- a/packages/frontend/src/pages/auth/CreatePasskey.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import { Button } from 'components/shared/Button'; -import { LoaderIcon } from 'components/shared/CustomIcon'; -import { KeyIcon } from 'components/shared/CustomIcon/KeyIcon'; -import { InlineNotification } from 'components/shared/InlineNotification'; -import { Input } from 'components/shared/Input'; -import { WavyBorder } from 'components/shared/WavyBorder'; -import { useState } from 'react'; -import { IconRight } from 'react-day-picker'; -import { useSnowball } from 'utils/use-snowball'; - -type Props = { - onDone: () => void; -}; - -export const CreatePasskey = ({}: Props) => { - const snowball = useSnowball(); - const [name, setName] = useState(''); - - const auth = snowball.auth.passkey; - const loading = !!auth.state.loading; - - async function createPasskey() { - await auth.register(name); - } - - return ( -
-
-
- -
-
-
- Create a passkey -
-
- Passkeys allow you to sign in securely without using passwords. -
-
-
- -
-
-
-
-
- Give it a name -
-
- { - setName(e.target.value); - }} - /> -
- - {auth.state.error ? ( - - ) : ( - - )} -
- -
-
- ); -}; diff --git a/packages/frontend/src/pages/components/modals.tsx b/packages/frontend/src/pages/components/modals.tsx index 91d5f29b..cf75a813 100644 --- a/packages/frontend/src/pages/components/modals.tsx +++ b/packages/frontend/src/pages/components/modals.tsx @@ -40,6 +40,7 @@ const deployment: Deployment = { deployerApiUrl: 'https://webapp-deployer-api.example.com', deployerId: 'bafyreicrtgmkir4evvvysxdqxddf2ftdq2wrzuodgvwnxr4rmubi4obdfu', deployerLrn: 'lrn://example/deployers/webapp-deployer-api.example.com', + minimumPayment: '1000units' }, status: DeploymentStatus.Ready, createdBy: { diff --git a/packages/frontend/src/stories/MockStoriesData.ts b/packages/frontend/src/stories/MockStoriesData.ts index 09959838..750b36b4 100644 --- a/packages/frontend/src/stories/MockStoriesData.ts +++ b/packages/frontend/src/stories/MockStoriesData.ts @@ -106,6 +106,7 @@ export const deployment0: Deployment = { deployerApiUrl: 'https://webapp-deployer-api.example.com', deployerId: 'bafyreicrtgmkir4evvvysxdqxddf2ftdq2wrzuodgvwnxr4rmubi4obdfu', deployerLrn: 'lrn://deployer.apps.snowballtools.com ', + minimumPayment: '1000units' }, applicationDeploymentRequestId: 'bafyreiaycvq6imoppnpwdve4smj6t6ql5svt5zl3x6rimu4qwyzgjorize', @@ -132,6 +133,7 @@ export const project: Project = { deployerApiUrl: 'https://webapp-deployer-api.example.com', deployerId: 'bafyreicrtgmkir4evvvysxdqxddf2ftdq2wrzuodgvwnxr4rmubi4obdfu', deployerLrn: 'lrn://deployer.apps.snowballtools.com ', + minimumPayment: '1000units' }, ], paymentAddress: '0x657868687686rb4787987br8497298r79284797487', diff --git a/packages/frontend/src/utils/use-snowball.ts b/packages/frontend/src/utils/use-snowball.ts deleted file mode 100644 index 179f4d8a..00000000 --- a/packages/frontend/src/utils/use-snowball.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { useEffect, useState } from 'react'; -import { Snowball, SnowballChain } from '@snowballtools/js-sdk'; -import { - // LitAppleAuth, - LitGoogleAuth, - LitPasskeyAuth, -} from '@snowballtools/auth-lit'; -import { VITE_LIT_RELAY_API_KEY } from './constants'; - -export const snowball = Snowball.withAuth({ - google: LitGoogleAuth.configure({ - litRelayApiKey: VITE_LIT_RELAY_API_KEY!, - }), - // apple: LitAppleAuth.configure({ - // litRelayApiKey: VITE_LIT_RELAY_API_KEY!, - // }), - passkey: LitPasskeyAuth.configure({ - litRelayApiKey: VITE_LIT_RELAY_API_KEY!, - }), -}).create({ - initialChain: SnowballChain.sepolia, -}); - -export function useSnowball() { - const [state, setState] = useState(100); - - useEffect(() => { - // Subscribe and directly return the unsubscribe function - return snowball.subscribe(() => setState(state + 1)); - }, [state]); - - return snowball; -} diff --git a/packages/gql-client/src/queries.ts b/packages/gql-client/src/queries.ts index 815fa073..467e0583 100644 --- a/packages/gql-client/src/queries.ts +++ b/packages/gql-client/src/queries.ts @@ -28,6 +28,7 @@ query ($projectId: String!) { deployerLrn deployerId deployerApiUrl + minimumPayment } paymentAddress txHash @@ -86,6 +87,7 @@ query ($organizationSlug: String!) { deployerLrn deployerId deployerApiUrl + minimumPayment } paymentAddress txHash @@ -152,6 +154,7 @@ query ($projectId: String!) { deployerLrn deployerId deployerApiUrl + minimumPayment } environment isCurrent @@ -215,6 +218,7 @@ query ($searchText: String!) { deployerLrn deployerId deployerApiUrl + minimumPayment } paymentAddress txHash @@ -320,6 +324,7 @@ query { deployerLrn deployerId deployerApiUrl + minimumPayment } } `; diff --git a/packages/gql-client/src/types.ts b/packages/gql-client/src/types.ts index 2e879913..b4685706 100644 --- a/packages/gql-client/src/types.ts +++ b/packages/gql-client/src/types.ts @@ -119,6 +119,7 @@ export type Deployer = { deployerLrn: string; deployerId: string; deployerApiUrl: string; + minimumPayment: string | null; } export type OrganizationMember = { -- 2.45.2 From c52514e83334cb5acc9ad3faf37b72bb0209df46 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Fri, 25 Oct 2024 15:37:42 +0530 Subject: [PATCH 15/27] Add toasts for payments flow --- .../components/projects/create/Configure.tsx | 74 ++++++++++++++----- 1 file changed, 55 insertions(+), 19 deletions(-) diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index d6d8dacb..1559ef6d 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -36,11 +36,13 @@ type ConfigureFormValues = ConfigureDeploymentFormValues & EnvironmentVariablesFormValues; const Configure = () => { - const { signClient, session } = useWalletConnectClient(); + const { signClient, session, accounts } = useWalletConnectClient(); const [isLoading, setIsLoading] = useState(false); const [deployers, setDeployers] = useState([]); const [selectedAccount, setSelectedAccount] = useState(); + const [isPaymentLoading, setIsPaymentLoading] = useState(false); + const [isPaymentDone, setIsPaymentDone] = useState(false); const [searchParams] = useSearchParams(); const templateId = searchParams.get('templateId'); @@ -271,6 +273,16 @@ const Configure = () => { const snowballAddress = await client.getAddress(); try { + setIsPaymentDone(false); + setIsPaymentLoading(true); + + toast({ + id: 'sending-payment-request', + title: 'Check your wallet and approve payment request', + variant: 'loading', + onDismiss: dismiss, + }); + const result: { signature: string } = await signClient.request({ topic: session.topic, chainId: `cosmos:${chainId}`, @@ -290,12 +302,28 @@ const Configure = () => { throw new Error('Error completing transaction'); } + toast({ + id: 'payment-successful', + title: 'Payment successful', + variant: 'success', + onDismiss: dismiss, + }); + return result.signature; } catch (error: any) { - throw error; + console.error('Error sending tokens', error); + toast({ + id: 'error-sending-tokens', + title: 'Error sending tokens', + variant: 'error', + onDismiss: dismiss, + }); + } finally { + setIsPaymentLoading(false); + setIsPaymentDone(true); } }, - [session, signClient], + [session, signClient, toast], ); useEffect(() => { @@ -440,22 +468,30 @@ const Configure = () => { Connect to your wallet -
- -
+ {accounts && accounts?.length > 0 && ( +
+ +
+ )} -- 2.45.2 From 9e9e8f34aae6dee643eb8e3137f0dd81c7c08acc Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Fri, 25 Oct 2024 16:08:32 +0530 Subject: [PATCH 16/27] Handle deployer minimum payment being null --- .../components/projects/create/Configure.tsx | 64 ++++++++++--------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index 1559ef6d..375392b4 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -164,6 +164,7 @@ const Configure = () => { `${amount.toString()}alnt`, senderAddress, ); + return isValid; }; @@ -174,41 +175,46 @@ const Configure = () => { } const senderAddress = selectedAccount; + const deployerLrn = createFormData.lrn; + const deployer = deployers.find(deployer => deployer.deployerLrn === deployerLrn); let amount: string; - if(createFormData.option === 'LRN') { - const deployerLrn = createFormData.lrn; - const deployer = deployers.find(deployer => deployer.deployerLrn === deployerLrn); - if (!deployer?.minimumPayment) { - toast({ - id: 'no-payment-required', - title: 'No payment', - variant: 'info', - onDismiss: dismiss, - }); + let txHash: string; + if (createFormData.option === 'LRN' && !deployer?.minimumPayment) { + toast({ + id: 'no-payment-required', + title: 'No payment required. Deploying app...', + variant: 'info', + onDismiss: dismiss, + }); - amount = '' - } else { - amount = deployer!.minimumPayment - } + txHash = ''; } else { - amount = (createFormData.numProviders * createFormData.maxPrice).toString(); - } + if (createFormData.option === 'LRN') { + amount = deployer?.minimumPayment!; + } else { + amount = (createFormData.numProviders * createFormData.maxPrice).toString(); + } - const txHash = await cosmosSendTokensHandler( - selectedAccount, - amount, - ); + const amountToBePaid = (amount.replace(/\D/g, '')).toString(); - if(!txHash) { - console.error('Tx not successful'); - return; - } + const txHashResponse = await cosmosSendTokensHandler( + selectedAccount, + amountToBePaid, + ); - const isTxHashValid = verifyTx(senderAddress, txHash, amount.toString()); - if (!isTxHashValid) { - console.error("Invalid Tx hash", txHash) - return + if (!txHashResponse) { + console.error('Tx not successful'); + return; + } + + txHash = txHashResponse; + + const isTxHashValid = verifyTx(senderAddress, txHash, amount.toString()); + if (!isTxHashValid) { + console.error("Invalid Tx hash", txHash) + return; + } } const environmentVariables = createFormData.variables.map( @@ -227,7 +233,7 @@ const Configure = () => { createFormData, environmentVariables, senderAddress, - txHash!, + txHash, ); await client.getEnvironmentVariables(projectId); -- 2.45.2 From c64d7c3761015e812ae2cf2a0fc42d9390e451e2 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Fri, 25 Oct 2024 16:12:19 +0530 Subject: [PATCH 17/27] Display address without chain id in dropdown --- .../frontend/src/components/projects/create/ConnectWallet.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/projects/create/ConnectWallet.tsx b/packages/frontend/src/components/projects/create/ConnectWallet.tsx index fffa82eb..c1e57f13 100644 --- a/packages/frontend/src/components/projects/create/ConnectWallet.tsx +++ b/packages/frontend/src/components/projects/create/ConnectWallet.tsx @@ -32,7 +32,7 @@ const ConnectWallet = ({ > {accounts.map((account, index) => ( ))} -- 2.45.2 From f3070dae5caef74a393766fd013f558dffb2e073 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Mon, 28 Oct 2024 09:42:25 +0530 Subject: [PATCH 18/27] Remove unused files --- packages/backend/src/registry.ts | 3 +- packages/backend/src/resolvers.ts | 20 +- packages/frontend/package.json | 4 - .../frontend/src/pages/components/modals.tsx | 2 +- .../frontend/src/stories/MockStoriesData.ts | 4 +- packages/frontend/src/utils/siwe.ts | 48 - yarn.lock | 1361 +---------------- 7 files changed, 62 insertions(+), 1380 deletions(-) delete mode 100644 packages/frontend/src/utils/siwe.ts diff --git a/packages/backend/src/registry.ts b/packages/backend/src/registry.ts index 4f1cf626..b962a653 100644 --- a/packages/backend/src/registry.ts +++ b/packages/backend/src/registry.ts @@ -5,7 +5,8 @@ import { Octokit } from 'octokit'; import { inc as semverInc } from 'semver'; import { DeepPartial } from 'typeorm'; -import { Account, Registry as LaconicRegistry, getGasPrice, parseGasAndFees, IndexedTx } from '@cerc-io/registry-sdk'; +import { Account, Registry as LaconicRegistry, getGasPrice, parseGasAndFees } from '@cerc-io/registry-sdk'; +import { IndexedTx } from '@cosmjs/stargate'; import { RegistryConfig } from './config'; import { diff --git a/packages/backend/src/resolvers.ts b/packages/backend/src/resolvers.ts index f9282423..3fe9a9be 100644 --- a/packages/backend/src/resolvers.ts +++ b/packages/backend/src/resolvers.ts @@ -85,16 +85,16 @@ export const createResolvers = async (service: Service): Promise => { return service.getAddress(); }, - // verifyTx: async ( - // _: any, - // { - // txHash, - // amount, - // senderAddress, - // }: { txHash: string; amount: string; senderAddress: string }, - // ) => { - // return service.verifyTx(txHash, amount, senderAddress); - // }, + verifyTx: async ( + _: any, + { + txHash, + amount, + senderAddress, + }: { txHash: string; amount: string; senderAddress: string }, + ) => { + return service.verifyTx(txHash, amount, senderAddress); + }, }, // TODO: Return error in GQL response diff --git a/packages/frontend/package.json b/packages/frontend/package.json index d395b256..b0104445 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -30,10 +30,6 @@ "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-toast": "^1.1.5", "@radix-ui/react-tooltip": "^1.0.7", - "@snowballtools/auth": "^0.2.0", - "@snowballtools/auth-lit": "^0.2.0", - "@snowballtools/js-sdk": "^0.1.1", - "@snowballtools/link-lit-alchemy-light": "^0.2.0", "@snowballtools/material-tailwind-react-fork": "^2.1.10", "@snowballtools/smartwallet-alchemy-light": "^0.2.0", "@snowballtools/types": "^0.2.0", diff --git a/packages/frontend/src/pages/components/modals.tsx b/packages/frontend/src/pages/components/modals.tsx index cf75a813..1044bd11 100644 --- a/packages/frontend/src/pages/components/modals.tsx +++ b/packages/frontend/src/pages/components/modals.tsx @@ -40,7 +40,7 @@ const deployment: Deployment = { deployerApiUrl: 'https://webapp-deployer-api.example.com', deployerId: 'bafyreicrtgmkir4evvvysxdqxddf2ftdq2wrzuodgvwnxr4rmubi4obdfu', deployerLrn: 'lrn://example/deployers/webapp-deployer-api.example.com', - minimumPayment: '1000units' + minimumPayment: '1000alnt' }, status: DeploymentStatus.Ready, createdBy: { diff --git a/packages/frontend/src/stories/MockStoriesData.ts b/packages/frontend/src/stories/MockStoriesData.ts index 750b36b4..dd872fd1 100644 --- a/packages/frontend/src/stories/MockStoriesData.ts +++ b/packages/frontend/src/stories/MockStoriesData.ts @@ -106,7 +106,7 @@ export const deployment0: Deployment = { deployerApiUrl: 'https://webapp-deployer-api.example.com', deployerId: 'bafyreicrtgmkir4evvvysxdqxddf2ftdq2wrzuodgvwnxr4rmubi4obdfu', deployerLrn: 'lrn://deployer.apps.snowballtools.com ', - minimumPayment: '1000units' + minimumPayment: '1000alnt' }, applicationDeploymentRequestId: 'bafyreiaycvq6imoppnpwdve4smj6t6ql5svt5zl3x6rimu4qwyzgjorize', @@ -133,7 +133,7 @@ export const project: Project = { deployerApiUrl: 'https://webapp-deployer-api.example.com', deployerId: 'bafyreicrtgmkir4evvvysxdqxddf2ftdq2wrzuodgvwnxr4rmubi4obdfu', deployerLrn: 'lrn://deployer.apps.snowballtools.com ', - minimumPayment: '1000units' + minimumPayment: '1000alnt' }, ], paymentAddress: '0x657868687686rb4787987br8497298r79284797487', diff --git a/packages/frontend/src/utils/siwe.ts b/packages/frontend/src/utils/siwe.ts deleted file mode 100644 index 8007be0f..00000000 --- a/packages/frontend/src/utils/siwe.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { SiweMessage } from 'siwe'; -import { PKPEthersWallet } from '@lit-protocol/pkp-ethers'; -import { v4 as uuid } from 'uuid'; - -import { BASE_URL } from './constants'; - -const domain = window.location.host; -const origin = window.location.origin; - -export async function signInWithEthereum( - chainId: number, - action: 'signup' | 'login', - wallet: PKPEthersWallet, -) { - const message = await createSiweMessage( - chainId, - await wallet.getAddress(), - 'Sign in with Ethereum to the app.', - ); - const signature = await wallet.signMessage(message); - - const res = await fetch(`${BASE_URL}/auth/validate`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ action, message, signature }), - credentials: 'include', - }); - return (await res.json()) as { success: boolean; error?: string }; -} - -async function createSiweMessage( - chainId: number, - address: string, - statement: string, -) { - const message = new SiweMessage({ - domain, - address, - statement, - uri: origin, - version: '1', - chainId, - nonce: uuid().replace(/[^a-z0-9]/g, ''), - }); - return message.prepareMessage(); -} diff --git a/yarn.lock b/yarn.lock index aa2b70f4..38ff090a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,11 +12,6 @@ resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7" integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q== -"@adraffy/ens-normalize@1.10.1": - version "1.10.1" - resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz#63430d04bd8c5e74f8d7d049338f1cd9d4f02069" - integrity sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw== - "@adraffy/ens-normalize@1.11.0": version "1.11.0" resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz#42cc67c5baa407ac25059fcd7d405cc5ecdb0c33" @@ -198,11 +193,6 @@ dependencies: xss "^1.0.8" -"@assemblyscript/loader@^0.9.4": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@assemblyscript/loader/-/loader-0.9.4.tgz#a483c54c1253656bb33babd464e3154a173e1577" - integrity sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA== - "@aw-web-design/x-default-browser@1.4.126": version "1.4.126" resolved "https://registry.yarnpkg.com/@aw-web-design/x-default-browser/-/x-default-browser-1.4.126.tgz#43e4bd8f0314ed907a8718d7e862a203af79bc16" @@ -1640,7 +1630,7 @@ "@cosmjs/math" "0.27.1" "@cosmjs/utils" "0.27.1" -"@cosmjs/amino@0.30.1", "@cosmjs/amino@^0.30.1": +"@cosmjs/amino@0.30.1": version "0.30.1" resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.30.1.tgz#7c18c14627361ba6c88e3495700ceea1f76baace" integrity sha512-yNHnzmvAlkETDYIpeCTdVqgvrdt1qgkOXwuRVi8s27UKI5hfqyE9fJ/fuunXE6ZZPnKkjIecDznmuUOMrMvw4w== @@ -1761,14 +1751,6 @@ bech32 "^1.1.4" readonly-date "^1.0.0" -"@cosmjs/json-rpc@^0.30.1": - version "0.30.1" - resolved "https://registry.yarnpkg.com/@cosmjs/json-rpc/-/json-rpc-0.30.1.tgz#16f21305fc167598c8a23a45549b85106b2372bc" - integrity sha512-pitfC/2YN9t+kXZCbNuyrZ6M8abnCC2n62m+JtU9vQUfaEtVsgy+1Fk4TRQ175+pIWSdBMFi2wT8FWVEE4RhxQ== - dependencies: - "@cosmjs/stream" "^0.30.1" - xstream "^11.14.0" - "@cosmjs/json-rpc@^0.32.4": version "0.32.4" resolved "https://registry.yarnpkg.com/@cosmjs/json-rpc/-/json-rpc-0.32.4.tgz#be91eb89ea78bd5dc02d0a9fa184dd6790790f0b" @@ -1818,19 +1800,6 @@ dependencies: bn.js "^5.2.0" -"@cosmjs/proto-signing@^0.30.1": - version "0.30.1" - resolved "https://registry.yarnpkg.com/@cosmjs/proto-signing/-/proto-signing-0.30.1.tgz#f0dda372488df9cd2677150b89b3e9c72b3cb713" - integrity sha512-tXh8pPYXV4aiJVhTKHGyeZekjj+K9s2KKojMB93Gcob2DxUjfKapFYBMJSgfKPuWUPEmyr8Q9km2hplI38ILgQ== - dependencies: - "@cosmjs/amino" "^0.30.1" - "@cosmjs/crypto" "^0.30.1" - "@cosmjs/encoding" "^0.30.1" - "@cosmjs/math" "^0.30.1" - "@cosmjs/utils" "^0.30.1" - cosmjs-types "^0.7.1" - long "^4.0.0" - "@cosmjs/proto-signing@^0.32.2", "@cosmjs/proto-signing@^0.32.4": version "0.32.4" resolved "https://registry.yarnpkg.com/@cosmjs/proto-signing/-/proto-signing-0.32.4.tgz#5a06e087c6d677439c8c9b25b5223d5e72c4cd93" @@ -1843,16 +1812,6 @@ "@cosmjs/utils" "^0.32.4" cosmjs-types "^0.9.0" -"@cosmjs/socket@^0.30.1": - version "0.30.1" - resolved "https://registry.yarnpkg.com/@cosmjs/socket/-/socket-0.30.1.tgz#00b22f4b5e2ab01f4d82ccdb7b2e59536bfe5ce0" - integrity sha512-r6MpDL+9N+qOS/D5VaxnPaMJ3flwQ36G+vPvYJsXArj93BjgyFB7BwWwXCQDzZ+23cfChPUfhbINOenr8N2Kow== - dependencies: - "@cosmjs/stream" "^0.30.1" - isomorphic-ws "^4.0.1" - ws "^7" - xstream "^11.14.0" - "@cosmjs/socket@^0.32.4": version "0.32.4" resolved "https://registry.yarnpkg.com/@cosmjs/socket/-/socket-0.32.4.tgz#86ab6adf3a442314774c0810b7a7cfcddf4f2082" @@ -1863,24 +1822,6 @@ ws "^7" xstream "^11.14.0" -"@cosmjs/stargate@^0.30.1": - version "0.30.1" - resolved "https://registry.yarnpkg.com/@cosmjs/stargate/-/stargate-0.30.1.tgz#e1b22e1226cffc6e93914a410755f1f61057ba04" - integrity sha512-RdbYKZCGOH8gWebO7r6WvNnQMxHrNXInY/gPHPzMjbQF6UatA6fNM2G2tdgS5j5u7FTqlCI10stNXrknaNdzog== - dependencies: - "@confio/ics23" "^0.6.8" - "@cosmjs/amino" "^0.30.1" - "@cosmjs/encoding" "^0.30.1" - "@cosmjs/math" "^0.30.1" - "@cosmjs/proto-signing" "^0.30.1" - "@cosmjs/stream" "^0.30.1" - "@cosmjs/tendermint-rpc" "^0.30.1" - "@cosmjs/utils" "^0.30.1" - cosmjs-types "^0.7.1" - long "^4.0.0" - protobufjs "~6.11.3" - xstream "^11.14.0" - "@cosmjs/stargate@^0.32.2": version "0.32.4" resolved "https://registry.yarnpkg.com/@cosmjs/stargate/-/stargate-0.32.4.tgz#bd0e4d3bf613b629addbf5f875d3d3b50f640af1" @@ -1897,13 +1838,6 @@ cosmjs-types "^0.9.0" xstream "^11.14.0" -"@cosmjs/stream@^0.30.1": - version "0.30.1" - resolved "https://registry.yarnpkg.com/@cosmjs/stream/-/stream-0.30.1.tgz#ba038a2aaf41343696b1e6e759d8e03a9516ec1a" - integrity sha512-Fg0pWz1zXQdoxQZpdHRMGvUH5RqS6tPv+j9Eh7Q953UjMlrwZVo0YFLC8OTf/HKVf10E4i0u6aM8D69Q6cNkgQ== - dependencies: - xstream "^11.14.0" - "@cosmjs/stream@^0.32.4": version "0.32.4" resolved "https://registry.yarnpkg.com/@cosmjs/stream/-/stream-0.32.4.tgz#83e1f2285807467c56d9ea0e1113f79d9fa63802" @@ -1911,22 +1845,6 @@ dependencies: xstream "^11.14.0" -"@cosmjs/tendermint-rpc@^0.30.1": - version "0.30.1" - resolved "https://registry.yarnpkg.com/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.30.1.tgz#c16378892ba1ac63f72803fdf7567eab9d4f0aa0" - integrity sha512-Z3nCwhXSbPZJ++v85zHObeUggrEHVfm1u18ZRwXxFE9ZMl5mXTybnwYhczuYOl7KRskgwlB+rID0WYACxj4wdQ== - dependencies: - "@cosmjs/crypto" "^0.30.1" - "@cosmjs/encoding" "^0.30.1" - "@cosmjs/json-rpc" "^0.30.1" - "@cosmjs/math" "^0.30.1" - "@cosmjs/socket" "^0.30.1" - "@cosmjs/stream" "^0.30.1" - "@cosmjs/utils" "^0.30.1" - axios "^0.21.2" - readonly-date "^1.0.0" - xstream "^11.14.0" - "@cosmjs/tendermint-rpc@^0.32.2", "@cosmjs/tendermint-rpc@^0.32.4": version "0.32.4" resolved "https://registry.yarnpkg.com/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.32.4.tgz#b36f9ec657498e42c97e21bb7368798ef6279752" @@ -2884,15 +2802,7 @@ resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== -"@ipld/dag-cbor@^6.0.3": - version "6.0.15" - resolved "https://registry.yarnpkg.com/@ipld/dag-cbor/-/dag-cbor-6.0.15.tgz#aebe7a26c391cae98c32faedb681b1519e3d2372" - integrity sha512-Vm3VTSTwlmGV92a3C5aeY+r2A18zbH2amehNhsX8PBa3muXICaWrN8Uri85A5hLH7D7ElhE8PdjxD6kNqUmTZA== - dependencies: - cborg "^1.5.4" - multiformats "^9.5.4" - -"@ipld/dag-cbor@^7.0.0", "@ipld/dag-cbor@^7.0.1": +"@ipld/dag-cbor@^7.0.1": version "7.0.3" resolved "https://registry.yarnpkg.com/@ipld/dag-cbor/-/dag-cbor-7.0.3.tgz#aa31b28afb11a807c3d627828a344e5521ac4a1e" integrity sha512-1VVh2huHsuohdXC1bGJNE8WR72slZ9XE2T3wbBBq31dm7ZBatmKLLxrB+XAqafxfRFjv08RZmj/W/ZqaM13AuA== @@ -2900,7 +2810,7 @@ cborg "^1.6.0" multiformats "^9.5.4" -"@ipld/dag-json@^8.0.1", "@ipld/dag-json@^8.0.9": +"@ipld/dag-json@^8.0.9": version "8.0.11" resolved "https://registry.yarnpkg.com/@ipld/dag-json/-/dag-json-8.0.11.tgz#8d30cc2dfacb0aef04d327465d3df91e79e8b6ce" integrity sha512-Pea7JXeYHTWXRTIhBqBlhw7G53PJ7yta3G/sizGEZyzdeEwhZRr0od5IQ0r2ZxOt1Do+2czddjeEPp+YTxDwCA== @@ -2908,20 +2818,6 @@ cborg "^1.5.4" multiformats "^9.5.4" -"@ipld/dag-pb@^2.1.3": - version "2.1.18" - resolved "https://registry.yarnpkg.com/@ipld/dag-pb/-/dag-pb-2.1.18.tgz#12d63e21580e87c75fd1a2c62e375a78e355c16f" - integrity sha512-ZBnf2fuX9y3KccADURG5vb9FaOeMjFkCrNysB0PtftME/4iCTjxfaLoNq/IAh5fTqUOMXvryN6Jyka4ZGuMLIg== - dependencies: - multiformats "^9.5.4" - -"@ipld/dag-pb@^4.0.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@ipld/dag-pb/-/dag-pb-4.1.0.tgz#4ebec92eeb9e8f317b8ef971221c6dac7b12b302" - integrity sha512-LJU451Drqs5zjFm7jI4Hs3kHlilOqkjcSfPiQgVsZnWaYb2C7YdfhnclrVn/X+ucKejlU9BL3+gXFCZUXkMuCg== - dependencies: - multiformats "^13.1.0" - "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" @@ -3095,24 +2991,6 @@ resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.0.tgz#353ce4a76c83fadec272ea5674ede767650762fd" integrity sha512-yWJKmpGE6lUURKAaIltoPIE/wrbY3TEkqQt+X0m+7fQNnAv0keydnYvbiJFP1PnMhizmIWRWOG5KLhYyc/xl+g== -"@lit-protocol/access-control-conditions@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/access-control-conditions/-/access-control-conditions-3.0.32.tgz#e21c4e55327adcd2c7537ae30e733c0db30b5e33" - integrity sha512-m8xKM7Nh8WkXq7dWsJsjUEkMnbEo/iPDAX3kvZkPRoeo3RZ9abOBedfMsBIjx9R4hj/poyfC7TSGhstvoesGGQ== - dependencies: - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/logger" "3.0.32" - "@lit-protocol/misc" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@lit-protocol/uint8arrays" "3.0.32" - ethers "^5.7.1" - jszip "^3.10.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - uint8arrays "^4.0.3" - "@lit-protocol/access-control-conditions@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/access-control-conditions/-/access-control-conditions-6.0.0-beta.2.tgz#fae2b2007c8a35a930c6b07d169cad1d4475f508" @@ -3143,32 +3021,6 @@ dependencies: ajv "^8.12.0" -"@lit-protocol/auth-browser@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/auth-browser/-/auth-browser-3.0.32.tgz#8c03645394fab27afd9fbe93a3adab70bed43a50" - integrity sha512-aY2BYZJJZQLZczM/WRcUbB5J54SXh4wn+P2+L9VpQTlKkshjgNLLeYOv705Y0uVaK1r9b2wTVjaMzZJPMZ4qXw== - dependencies: - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/logger" "3.0.32" - "@lit-protocol/misc" "3.0.32" - "@lit-protocol/misc-browser" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@lit-protocol/uint8arrays" "3.0.32" - "@walletconnect/ethereum-provider" "2.9.2" - "@walletconnect/modal" "2.6.1" - ethers "^5.7.1" - jszip "^3.10.1" - lit-siwe "^1.1.8" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - tweetnacl "^1.0.3" - tweetnacl-util "^0.13.3" - uint8arrays "^4.0.3" - util "^0.12.4" - web-vitals "^3.0.4" - "@lit-protocol/auth-browser@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/auth-browser/-/auth-browser-6.0.0-beta.2.tgz#88932f8629ee8379d5fda4699f5cf43e1eb6b608" @@ -3195,15 +3047,6 @@ tslib "1.14.1" uint8arrays "^4.0.3" -"@lit-protocol/auth-helpers@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/auth-helpers/-/auth-helpers-3.0.32.tgz#1879796afee55e8c23950c9a10f2ca8bed5e1a89" - integrity sha512-QSnApvcDMkxSpRy6P46RSeCJcOJ05JC8WW++VeFkQbzRKcYU8lfkF39Xi6/I1h9sv2LFHrfbT7fY7ijPF7IjWA== - dependencies: - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - "@lit-protocol/auth-helpers@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/auth-helpers/-/auth-helpers-6.0.0-beta.2.tgz#230d0cb2dd39725966cca903e3b4ece884bab81d" @@ -3229,14 +3072,6 @@ uint8arrays "^4.0.3" util "0.12.5" -"@lit-protocol/bls-sdk@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/bls-sdk/-/bls-sdk-3.0.32.tgz#53fee54b2d17363b92cc5f901a473c07f35ad58e" - integrity sha512-8wDcmMmeFA6YuxGn4wNCTrkTPyEBJ8qSXsXJCMHkuglwVgrI2rOK26PK/k++0mf1+i4C2TzKeF9V8GJagb/o3w== - dependencies: - pako "^2.1.0" - tslib "^2.3.0" - "@lit-protocol/bls-sdk@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/bls-sdk/-/bls-sdk-6.0.0-beta.2.tgz#c713c53e9f0ab791b248ee8fd2abb79553ccc3b8" @@ -3245,19 +3080,6 @@ tslib "1.14.1" util "0.12.5" -"@lit-protocol/constants@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/constants/-/constants-3.0.32.tgz#c41bd2bc0b583bed747fcf518a9c712fde7174a3" - integrity sha512-hSna3+qRGuS9Hg6VrUnBUrLH+PZQINBQAEIwq2xQzWR234H1za1g9PNMibgjCfwcV2j9f6tiJgYoPAp4n0O21w== - dependencies: - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/types" "3.0.32" - ethers "^5.7.1" - jszip "^3.10.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - "@lit-protocol/constants@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/constants/-/constants-6.0.0-beta.2.tgz#d8de75ce1df4c5bda369cd6f60b2fd062d8dd19a" @@ -3271,28 +3093,6 @@ siwe "^2.0.5" tslib "1.14.1" -"@lit-protocol/contracts-sdk@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/contracts-sdk/-/contracts-sdk-3.0.32.tgz#3254b128feb67e75f61ff180f66131ba12e47511" - integrity sha512-uqmTXQeele9HOWvu7ozQb7RvFjJxpDiQJOtqie17AR5O3J9DR6uASsr80uDP5zdlPnoouXnk22KNmsBsgvNo8g== - dependencies: - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/logger" "3.0.32" - "@lit-protocol/misc" "3.0.32" - "@lit-protocol/types" "3.0.32" - bitcoinjs-lib "^6.1.0" - bs58 "^5.0.0" - date-and-time "^2.4.1" - ethers "^5.7.1" - jose "^4.14.4" - jszip "^3.10.1" - multiformats "^9.7.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - uint8arrays "^4.0.3" - "@lit-protocol/contracts-sdk@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/contracts-sdk/-/contracts-sdk-6.0.0-beta.2.tgz#49dcb42fd36134f35d56d716396b8d0a6dcdd2c2" @@ -3322,37 +3122,6 @@ uint8arrays "^4.0.3" util "0.12.5" -"@lit-protocol/core@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/core/-/core-3.0.32.tgz#55a5834fa8c3dd3c5c03d3468146989d90c2edd2" - integrity sha512-YrtOJhTr7amaPE2CX5n7zgrKTF0opjS432YKQ8gyAwXUmlEyoNOBiGIa+HFLPgmw/AntQYV89zomjzx3hVgM7g== - dependencies: - "@lit-protocol/access-control-conditions" "3.0.32" - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/bls-sdk" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/contracts-sdk" "3.0.32" - "@lit-protocol/crypto" "3.0.32" - "@lit-protocol/ecdsa-sdk" "3.0.32" - "@lit-protocol/logger" "3.0.32" - "@lit-protocol/misc" "3.0.32" - "@lit-protocol/nacl" "3.0.32" - "@lit-protocol/sev-snp-utils-sdk" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@lit-protocol/uint8arrays" "3.0.32" - bitcoinjs-lib "^6.1.0" - bs58 "^5.0.0" - date-and-time "^2.4.1" - ethers "^5.7.1" - jose "^4.14.4" - jszip "^3.10.1" - multiformats "^10.0.2" - node-fetch "^2.6.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - uint8arrays "^4.0.3" - "@lit-protocol/core@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/core/-/core-6.0.0-beta.2.tgz#1ea3a37741fa9eb84a3d1c24fbcfc17107655b4e" @@ -3395,29 +3164,6 @@ uint8arrays "^4.0.3" util "0.12.5" -"@lit-protocol/crypto@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/crypto/-/crypto-3.0.32.tgz#5febca628798fd49a002d5e4a43c8acb8f9e127d" - integrity sha512-Me7I2VVMg+dL0Q0x2Cqw6KTnYotRqGGNBuS/pay2kooI4UkheCz6ZnTt9eCtN7JF2pBIe0o/IFAzh1SFzSEZBQ== - dependencies: - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/bls-sdk" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/ecdsa-sdk" "3.0.32" - "@lit-protocol/logger" "3.0.32" - "@lit-protocol/misc" "3.0.32" - "@lit-protocol/nacl" "3.0.32" - "@lit-protocol/sev-snp-utils-sdk" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@lit-protocol/uint8arrays" "3.0.32" - ethers "^5.7.1" - jszip "^3.10.1" - node-fetch "^2.6.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - uint8arrays "^4.0.3" - "@lit-protocol/crypto@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/crypto/-/crypto-6.0.0-beta.2.tgz#e21fdbae091aac7e2e9b9b22ddabfefdd46ee1fc" @@ -3447,14 +3193,6 @@ uint8arrays "^4.0.3" util "0.12.5" -"@lit-protocol/ecdsa-sdk@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/ecdsa-sdk/-/ecdsa-sdk-3.0.32.tgz#9ebac8ecfc275a6f2149fd56b1e13b3e8ed3bb7e" - integrity sha512-zuyE8ui+rIpM0MyoY5cPq9I+wQfxEouaRmbDplybaJc12UKWmnLDQCSQ4mPnZTs8FC5785Qfxj5VAe5CLQ+yEw== - dependencies: - pako "^2.1.0" - tslib "^2.3.0" - "@lit-protocol/ecdsa-sdk@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/ecdsa-sdk/-/ecdsa-sdk-6.0.0-beta.2.tgz#a65d0b430b3be56898eb0024cab787fec331f2a2" @@ -3463,31 +3201,6 @@ tslib "1.14.1" util "0.12.5" -"@lit-protocol/encryption@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/encryption/-/encryption-3.0.32.tgz#b167df877bd8e0778104c1767998a4c8491fa731" - integrity sha512-YMx3MQotn0cr26LcVNTLIPdl5xENP97TcsPsoXCaH7ArIOKXvmhqH3PbxfhyU9i/TTzCshDE18b0P9Od6oAwDQ== - dependencies: - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/bls-sdk" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/crypto" "3.0.32" - "@lit-protocol/ecdsa-sdk" "3.0.32" - "@lit-protocol/logger" "3.0.32" - "@lit-protocol/misc" "3.0.32" - "@lit-protocol/nacl" "3.0.32" - "@lit-protocol/sev-snp-utils-sdk" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@lit-protocol/uint8arrays" "3.0.32" - ethers "^5.7.1" - ipfs-http-client "56.0.0" - jszip "^3.10.1" - node-fetch "^2.6.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - uint8arrays "^4.0.3" - "@lit-protocol/encryption@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/encryption/-/encryption-6.0.0-beta.2.tgz#7b9d05d398a4fc5cfce44dace59467808d5c96bf" @@ -3518,108 +3231,6 @@ uint8arrays "^4.0.3" util "0.12.5" -"@lit-protocol/lit-auth-client@6.0.0-beta.2": - version "6.0.0-beta.2" - resolved "https://registry.yarnpkg.com/@lit-protocol/lit-auth-client/-/lit-auth-client-6.0.0-beta.2.tgz#14a6c831cb37dd3ad398fce3942491865964372c" - integrity sha512-De3ZJ0wcSV+CerXfjh/hpD9IMfA+k31FNoMKQmxSIiIa5VeKzVIXGDlWnE09Gl17YMZ1t/OWqSsxhgRCN7gSZw== - dependencies: - "@cosmjs/amino" "0.30.1" - "@cosmjs/crypto" "0.30.1" - "@cosmjs/encoding" "0.30.1" - "@ethersproject/abi" "5.7.0" - "@ethersproject/abstract-provider" "5.7.0" - "@ethersproject/bytes" "5.7.0" - "@ethersproject/contracts" "5.7.0" - "@ethersproject/providers" "5.7.2" - "@ethersproject/strings" "5.7.0" - "@ethersproject/transactions" "5.7.0" - "@ethersproject/wallet" "5.7.0" - "@lit-protocol/access-control-conditions" "6.0.0-beta.2" - "@lit-protocol/accs-schemas" "0.0.7" - "@lit-protocol/auth-browser" "6.0.0-beta.2" - "@lit-protocol/auth-helpers" "6.0.0-beta.2" - "@lit-protocol/bls-sdk" "6.0.0-beta.2" - "@lit-protocol/constants" "6.0.0-beta.2" - "@lit-protocol/contracts-sdk" "6.0.0-beta.2" - "@lit-protocol/core" "6.0.0-beta.2" - "@lit-protocol/crypto" "6.0.0-beta.2" - "@lit-protocol/ecdsa-sdk" "6.0.0-beta.2" - "@lit-protocol/encryption" "6.0.0-beta.2" - "@lit-protocol/lit-node-client" "6.0.0-beta.2" - "@lit-protocol/lit-node-client-nodejs" "6.0.0-beta.2" - "@lit-protocol/logger" "6.0.0-beta.2" - "@lit-protocol/misc" "6.0.0-beta.2" - "@lit-protocol/misc-browser" "6.0.0-beta.2" - "@lit-protocol/nacl" "6.0.0-beta.2" - "@lit-protocol/sev-snp-utils-sdk" "6.0.0-beta.2" - "@lit-protocol/types" "6.0.0-beta.2" - "@lit-protocol/uint8arrays" "6.0.0-beta.2" - "@walletconnect/ethereum-provider" "2.9.2" - "@walletconnect/modal" "2.6.1" - ajv "^8.12.0" - base64url "^3.0.1" - bitcoinjs-lib "^6.1.0" - bs58 "^5.0.0" - buffer "5.7.1" - cbor-web "^9.0.1" - cross-fetch "3.1.4" - date-and-time "^2.4.1" - ethers "^5.7.1" - jose "^4.14.4" - jszip "^3.10.1" - multiformats "^9.7.1" - pako "1.0.11" - process "0.11.10" - punycode "2.3.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - tweetnacl "^1.0.3" - tweetnacl-util "^0.15.1" - uint8arrays "^4.0.3" - util "0.12.5" - -"@lit-protocol/lit-node-client-nodejs@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/lit-node-client-nodejs/-/lit-node-client-nodejs-3.0.32.tgz#0627b094d1d7de8370da4ade0bd5ecab7894feae" - integrity sha512-vivyz7SFHBpWk0j0teTEy+lxGYEftHecJRNPcEagBW2pmyMCQBL4XrwFBNH+k9aaCo1Zx4Q9WnVH0H78otcuLg== - dependencies: - "@cosmjs/proto-signing" "^0.30.1" - "@cosmjs/stargate" "^0.30.1" - "@lit-protocol/access-control-conditions" "3.0.32" - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/bls-sdk" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/contracts-sdk" "3.0.32" - "@lit-protocol/core" "3.0.32" - "@lit-protocol/crypto" "3.0.32" - "@lit-protocol/ecdsa-sdk" "3.0.32" - "@lit-protocol/encryption" "3.0.32" - "@lit-protocol/lit-third-party-libs" "3.0.32" - "@lit-protocol/logger" "3.0.32" - "@lit-protocol/misc" "3.0.32" - "@lit-protocol/misc-browser" "3.0.32" - "@lit-protocol/nacl" "3.0.32" - "@lit-protocol/sev-snp-utils-sdk" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@lit-protocol/uint8arrays" "3.0.32" - bitcoinjs-lib "^6.1.0" - blockstore-core "^3.0.0" - bs58 "^5.0.0" - date-and-time "^2.4.1" - ethers "^5.7.1" - ipfs-http-client "56.0.0" - ipfs-unixfs-importer "^12.0.0" - jose "^4.14.4" - jszip "^3.10.1" - lit-siwe "^1.1.8" - multiformats "^10.0.2" - node-fetch "^2.6.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - uint8arrays "^4.0.3" - "@lit-protocol/lit-node-client-nodejs@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/lit-node-client-nodejs/-/lit-node-client-nodejs-6.0.0-beta.2.tgz#364ff0972ce3c0fa7f45a8e2dc08f13080b76675" @@ -3668,53 +3279,6 @@ uint8arrays "^4.0.3" util "0.12.5" -"@lit-protocol/lit-node-client@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/lit-node-client/-/lit-node-client-3.0.32.tgz#84e8f1da5f10a8ba5a377d1421a045fd5830a1c4" - integrity sha512-YAlMvhHq2d1vdHNVbqho8pqzEWY2MtsFOMGHVG11711oLal1fyFDr4iGJ5KnxxvK6+In2Amv65jQVSr1wlkdVQ== - dependencies: - "@cosmjs/proto-signing" "^0.30.1" - "@cosmjs/stargate" "^0.30.1" - "@lit-protocol/access-control-conditions" "3.0.32" - "@lit-protocol/auth-browser" "3.0.32" - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/bls-sdk" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/contracts-sdk" "3.0.32" - "@lit-protocol/core" "3.0.32" - "@lit-protocol/crypto" "3.0.32" - "@lit-protocol/ecdsa-sdk" "3.0.32" - "@lit-protocol/encryption" "3.0.32" - "@lit-protocol/lit-node-client-nodejs" "3.0.32" - "@lit-protocol/lit-third-party-libs" "3.0.32" - "@lit-protocol/logger" "3.0.32" - "@lit-protocol/misc" "3.0.32" - "@lit-protocol/misc-browser" "3.0.32" - "@lit-protocol/nacl" "3.0.32" - "@lit-protocol/sev-snp-utils-sdk" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@lit-protocol/uint8arrays" "3.0.32" - "@walletconnect/ethereum-provider" "2.9.2" - "@walletconnect/modal" "2.6.1" - bitcoinjs-lib "^6.1.0" - blockstore-core "^3.0.0" - bs58 "^5.0.0" - date-and-time "^2.4.1" - ethers "^5.7.1" - ipfs-http-client "56.0.0" - ipfs-unixfs-importer "^12.0.0" - jose "^4.14.4" - jszip "^3.10.1" - lit-siwe "^1.1.8" - multiformats "^10.0.2" - node-fetch "^2.6.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - tweetnacl "^1.0.3" - tweetnacl-util "^0.15.1" - uint8arrays "^4.0.3" - "@lit-protocol/lit-node-client@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/lit-node-client/-/lit-node-client-6.0.0-beta.2.tgz#fc898d7334a68c6d50bed7ec375f9628a0b5e2e3" @@ -3772,32 +3336,6 @@ uint8arrays "^4.0.3" util "0.12.5" -"@lit-protocol/lit-third-party-libs@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/lit-third-party-libs/-/lit-third-party-libs-3.0.32.tgz#6813976bdf245df24431cd55065389fb739efe09" - integrity sha512-FtxJtuYLSKV6sesRA+GthEa/VrrEQag+oFM26mWu569SCBnsbMxaz2IJ3telpXKR8FXkaiIYXgsdkyEPj9KyNQ== - dependencies: - "@cosmjs/proto-signing" "^0.30.1" - "@cosmjs/stargate" "^0.30.1" - blockstore-core "^3.0.0" - ipfs-unixfs-importer "^12.0.0" - tslib "^2.3.0" - -"@lit-protocol/logger@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/logger/-/logger-3.0.32.tgz#081ff6ac421cd3ab3bc993bb1c4b3c75b6deac50" - integrity sha512-18Vi6vbbenDMRhDGQTJolVG4rnhl5NQzplC327XYEkNN8lGR8bxbx9ajSC71anB5/XYtHy57yotMtvZTPK0uWg== - dependencies: - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/types" "3.0.32" - ethers "^5.7.1" - jszip "^3.10.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - uint8arrays "^4.0.3" - "@lit-protocol/logger@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/logger/-/logger-6.0.0-beta.2.tgz#ce5a6f62e0dbd71731442612718acbe551b3fdf2" @@ -3814,21 +3352,6 @@ tslib "1.14.1" uint8arrays "^4.0.3" -"@lit-protocol/misc-browser@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/misc-browser/-/misc-browser-3.0.32.tgz#3b38d2caf2286372ccce5a52d493c20b1579c652" - integrity sha512-r7YsHO+HOA1pvpMHJ3mptTDYSGizNyitqRSgk1vGoufk4jAsnXkGQS3HGfhcP0PADEWhiIo/tGVa9DSPlN58Sw== - dependencies: - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@lit-protocol/uint8arrays" "3.0.32" - ethers "^5.7.1" - jszip "^3.10.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - "@lit-protocol/misc-browser@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/misc-browser/-/misc-browser-6.0.0-beta.2.tgz#42c9da675465f939eb78c2913d1b606cd187cd01" @@ -3844,22 +3367,6 @@ siwe "^2.0.5" tslib "1.14.1" -"@lit-protocol/misc@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/misc/-/misc-3.0.32.tgz#80eb73665c80e7eae88bc3e8519a0c6a7e5d2c26" - integrity sha512-zH7Xr729/k6Yr8PqR0LWMro++C3guidvL1ukseht98gymVMwavKVmQg0+USDkXugzY6fKBIMzonOF4j5TK7zuw== - dependencies: - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/logger" "3.0.32" - "@lit-protocol/types" "3.0.32" - ethers "^5.7.1" - jszip "^3.10.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - uint8arrays "^4.0.3" - "@lit-protocol/misc@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/misc/-/misc-6.0.0-beta.2.tgz#3fc65873f14e31c2c049ee06340c5b368dd0f657" @@ -3881,13 +3388,6 @@ uint8arrays "^4.0.3" util "0.12.5" -"@lit-protocol/nacl@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/nacl/-/nacl-3.0.32.tgz#3b936c5bc8c45cc81f10d58e5a5aa69b271b66c2" - integrity sha512-LqIbqWlDVwqrhSpTdb60rvLQ1p3P5PI96N+8WfXPtdTVIOJLJFvKsqbwv5Atzkn3PaUURCWkmpIafEHxEmGIqg== - dependencies: - tslib "^2.3.0" - "@lit-protocol/nacl@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/nacl/-/nacl-6.0.0-beta.2.tgz#2e711f327764815fb1ade65b6e5e346d6a63d99f" @@ -3895,55 +3395,6 @@ dependencies: tslib "1.14.1" -"@lit-protocol/pkp-base@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/pkp-base/-/pkp-base-3.0.32.tgz#e89d8cb73de5dfb1ea11aae9d7def9f8350f339e" - integrity sha512-oBEs4mfYnRdsoctT+YOMGjU+07VvPM6C0XBnM1/w7XHnVcGWXv5Q0HVp/+mVNmqH8pDhYAA9R64IUEpsP8UcNQ== - dependencies: - "@cosmjs/proto-signing" "^0.30.1" - "@cosmjs/stargate" "^0.30.1" - "@lit-protocol/access-control-conditions" "3.0.32" - "@lit-protocol/auth-browser" "3.0.32" - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/bls-sdk" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/contracts-sdk" "3.0.32" - "@lit-protocol/core" "3.0.32" - "@lit-protocol/crypto" "3.0.32" - "@lit-protocol/ecdsa-sdk" "3.0.32" - "@lit-protocol/encryption" "3.0.32" - "@lit-protocol/lit-node-client" "3.0.32" - "@lit-protocol/lit-node-client-nodejs" "3.0.32" - "@lit-protocol/lit-third-party-libs" "3.0.32" - "@lit-protocol/logger" "3.0.32" - "@lit-protocol/misc" "3.0.32" - "@lit-protocol/misc-browser" "3.0.32" - "@lit-protocol/nacl" "3.0.32" - "@lit-protocol/sev-snp-utils-sdk" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@lit-protocol/uint8arrays" "3.0.32" - "@walletconnect/ethereum-provider" "2.9.2" - "@walletconnect/modal" "2.6.1" - bitcoinjs-lib "^6.1.0" - blockstore-core "^3.0.0" - bs58 "^5.0.0" - date-and-time "^2.4.1" - ethers "^5.7.1" - ipfs-http-client "56.0.0" - ipfs-unixfs-importer "^12.0.0" - jose "^4.14.4" - jszip "^3.10.1" - lit-siwe "^1.1.8" - multiformats "^10.0.2" - node-fetch "^2.6.1" - secp256k1 "^5.0.0" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - tweetnacl "^1.0.3" - tweetnacl-util "^0.15.1" - uint8arrays "^4.0.3" - "@lit-protocol/pkp-base@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/pkp-base/-/pkp-base-6.0.0-beta.2.tgz#beda71572b8e68e1d3a1745bc5ab8730be576a95" @@ -4004,57 +3455,6 @@ uint8arrays "^4.0.3" util "0.12.5" -"@lit-protocol/pkp-ethers@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/pkp-ethers/-/pkp-ethers-3.0.32.tgz#6dbbf6637a3a56c3749131443ad7fb0e377d314f" - integrity sha512-1CNwPZzv9RWkpjbElOJ/FNECO/6T2/rL9wPO3uCXPnpqvfWCe3gY+mB2agjm2goCIIFOfscOVdyP2aQOmyoJ4w== - dependencies: - "@cosmjs/proto-signing" "^0.30.1" - "@cosmjs/stargate" "^0.30.1" - "@lit-protocol/access-control-conditions" "3.0.32" - "@lit-protocol/auth-browser" "3.0.32" - "@lit-protocol/auth-helpers" "3.0.32" - "@lit-protocol/bls-sdk" "3.0.32" - "@lit-protocol/constants" "3.0.32" - "@lit-protocol/contracts-sdk" "3.0.32" - "@lit-protocol/core" "3.0.32" - "@lit-protocol/crypto" "3.0.32" - "@lit-protocol/ecdsa-sdk" "3.0.32" - "@lit-protocol/encryption" "3.0.32" - "@lit-protocol/lit-node-client" "3.0.32" - "@lit-protocol/lit-node-client-nodejs" "3.0.32" - "@lit-protocol/lit-third-party-libs" "3.0.32" - "@lit-protocol/logger" "3.0.32" - "@lit-protocol/misc" "3.0.32" - "@lit-protocol/misc-browser" "3.0.32" - "@lit-protocol/nacl" "3.0.32" - "@lit-protocol/pkp-base" "3.0.32" - "@lit-protocol/sev-snp-utils-sdk" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@lit-protocol/uint8arrays" "3.0.32" - "@metamask/eth-sig-util" "5.0.2" - "@walletconnect/ethereum-provider" "2.9.2" - "@walletconnect/modal" "2.6.1" - bitcoinjs-lib "^6.1.0" - blockstore-core "^3.0.0" - bs58 "^5.0.0" - date-and-time "^2.4.1" - ethers "^5.7.1" - ipfs-http-client "56.0.0" - ipfs-unixfs-importer "^12.0.0" - jose "^4.14.4" - jszip "^3.10.1" - lit-siwe "^1.1.8" - multiformats "^10.0.2" - node-fetch "^2.6.1" - secp256k1 "^5.0.0" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - tweetnacl "^1.0.3" - tweetnacl-util "^0.15.1" - uint8arrays "^4.0.3" - "@lit-protocol/pkp-ethers@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/pkp-ethers/-/pkp-ethers-6.0.0-beta.2.tgz#583ce600d64b663edf79bfd32886bb47a4b4a515" @@ -4127,16 +3527,6 @@ uint8arrays "^4.0.3" util "0.12.5" -"@lit-protocol/sev-snp-utils-sdk@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/sev-snp-utils-sdk/-/sev-snp-utils-sdk-3.0.32.tgz#c0e2a2f117b03170bd264408a7b892e14e31ec0f" - integrity sha512-H+DiTpWxgmcNqJuVKY3Ldy29J+42/+OwseIgOt21KldRk4Rymaa9O6hHaqEFSmjjJevMGzxJ+m0KzxWoM90GDg== - dependencies: - "@lit-protocol/uint8arrays" "3.0.32" - node-fetch "^2.6.1" - pako "^2.1.0" - tslib "^2.3.0" - "@lit-protocol/sev-snp-utils-sdk@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/sev-snp-utils-sdk/-/sev-snp-utils-sdk-6.0.0-beta.2.tgz#87ac956953b9f3c87c1bcf52a4e03e86b9dbf0d8" @@ -4145,18 +3535,6 @@ cross-fetch "3.1.4" tslib "1.14.1" -"@lit-protocol/types@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/types/-/types-3.0.32.tgz#6c0971a21dff6cb1a72ad5e70ab40f9a6caa92b6" - integrity sha512-rizsbqNzA+g8uP/Tfc3GPf+3ZCinYY886iTQbSY2wY7pj70ws3rmM9g/d5CS1laQvAhNlV6ak8uO9P0MVrppmg== - dependencies: - "@lit-protocol/auth-helpers" "3.0.32" - ethers "^5.7.1" - jszip "^3.10.1" - siwe "^2.0.5" - siwe-recap "0.0.2-alpha.0" - tslib "^2.3.0" - "@lit-protocol/types@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/types/-/types-6.0.0-beta.2.tgz#d2c6dfb8e9719ec2d26dd8ad242ab56808eb00b7" @@ -4169,13 +3547,6 @@ siwe "^2.0.5" tslib "1.14.1" -"@lit-protocol/uint8arrays@3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@lit-protocol/uint8arrays/-/uint8arrays-3.0.32.tgz#2962c3b1ef2dad9da03212c38f9de183ec401730" - integrity sha512-sZavZXFj9xSwMBnUp1xRii5n12LwpaxmYiDdIspo9yHCDTq60XNHgd2J+llk2Hge0H17MTnoPbICLwZlQ9YJmA== - dependencies: - tslib "^2.3.0" - "@lit-protocol/uint8arrays@6.0.0-beta.2": version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/@lit-protocol/uint8arrays/-/uint8arrays-6.0.0-beta.2.tgz#6bf7ae2f8fc10d15c7dc4f398bbd8004d1598a0a" @@ -4570,14 +3941,6 @@ prop-types "^15.8.1" react-is "^18.3.1" -"@multiformats/murmur3@^2.0.0": - version "2.1.8" - resolved "https://registry.yarnpkg.com/@multiformats/murmur3/-/murmur3-2.1.8.tgz#81c1c15b6391109f3febfca4b3205196615a04e9" - integrity sha512-6vId1C46ra3R1sbJUOFCZnsUIveR9oF20yhPmAFxPm0JfrX3/ZRCgP3YDrBzlGoEppOXnA9czHeYc0T9mB6hbA== - dependencies: - multiformats "^13.0.0" - murmurhash3js-revisited "^3.0.0" - "@ndelangen/get-tarball@^3.0.7": version "3.0.9" resolved "https://registry.yarnpkg.com/@ndelangen/get-tarball/-/get-tarball-3.0.9.tgz#727ff4454e65f34707e742a59e5e6b1f525d8964" @@ -5992,84 +5355,11 @@ "@sigstore/core" "^1.1.0" "@sigstore/protobuf-specs" "^0.3.1" -"@simplewebauthn/browser@^10.0.0": - version "10.0.0" - resolved "https://registry.yarnpkg.com/@simplewebauthn/browser/-/browser-10.0.0.tgz#8305a57dacb35ab6a71a8b670c699ee7ef1c11c4" - integrity sha512-hG0JMZD+LiLUbpQcAjS4d+t4gbprE/dLYop/CkE01ugU/9sKXflxV5s0DRjdz3uNMFecatRfb4ZLG3XvF8m5zg== - dependencies: - "@simplewebauthn/types" "^10.0.0" - -"@simplewebauthn/types@^10.0.0": - version "10.0.0" - resolved "https://registry.yarnpkg.com/@simplewebauthn/types/-/types-10.0.0.tgz#a07259d42fbdff7a014473f78401d262b298ed8e" - integrity sha512-SFXke7xkgPRowY2E+8djKbdEznTVnD5R6GO7GPTthpHrokLvNKw8C3lFZypTxLI7KkCfGPfhtqB3d7OVGGa9jQ== - "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== -"@snowballtools/auth-lit@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@snowballtools/auth-lit/-/auth-lit-0.2.0.tgz#c22c5326a3cc3a2be270b752ac6f5f69dcc53826" - integrity sha512-FZMEAkGsgb1LrWYwIkw1AP1eJ54nNTTdhOTpv6vD+n6ScrG8uIVolZw+nVYyB0yof0OFnn+z/TvzBQ2iqpaNeQ== - dependencies: - "@lit-protocol/auth-helpers" "6.0.0-beta.2" - "@lit-protocol/constants" "6.0.0-beta.2" - "@lit-protocol/lit-auth-client" "6.0.0-beta.2" - "@lit-protocol/lit-node-client" "6.0.0-beta.2" - "@lit-protocol/pkp-ethers" "6.0.0-beta.2" - "@lit-protocol/types" "6.0.0-beta.2" - "@simplewebauthn/browser" "^10.0.0" - "@snowballtools/auth" "*" - "@snowballtools/types" "*" - "@snowballtools/utils" "*" - -"@snowballtools/auth@*": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@snowballtools/auth/-/auth-0.1.0.tgz#f6bca8e631d754b524525153769bf28fa956cfa8" - integrity sha512-jsviORyBcDporAFDCKGNHK4WCNBD68DdMJJ4wcnIa5DNXHjYLU4YYLqcbpccgnL1l+02o2nC/FyIwwDNcxWtjw== - dependencies: - "@lit-protocol/pkp-ethers" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@snowballtools/types" "*" - "@snowballtools/utils" "*" - debug "*" - -"@snowballtools/auth@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@snowballtools/auth/-/auth-0.2.0.tgz#3bd320c190d810b7a43ef559253ed791eeeffbef" - integrity sha512-pBDEIoUU7Xb5jlQ0h2Dq+tBSFcyeILdvcA17myCDmaMe0bhZlV+Xv3MzwLMo/E1qnUw0t0xN9CoXSijPn4XJ0Q== - dependencies: - "@lit-protocol/pkp-ethers" "6.0.0-beta.2" - "@lit-protocol/types" "6.0.0-beta.2" - "@snowballtools/types" "*" - "@snowballtools/utils" "*" - debug "*" - -"@snowballtools/js-sdk@^0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@snowballtools/js-sdk/-/js-sdk-0.1.1.tgz#f463b34d49246b0cccff2fe6004fe7bd238e29fd" - integrity sha512-ViPvKeuOdbPVup5YYZUoWPRWVdM44EERzg1+gLi4tpdo0NjWC5gHr+w3+ESr88CV1Tr/vIn5HfOLxL5DT32qyw== - dependencies: - "@snowballtools/auth" "*" - "@snowballtools/types" "*" - "@snowballtools/utils" "*" - -"@snowballtools/link-lit-alchemy-light@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@snowballtools/link-lit-alchemy-light/-/link-lit-alchemy-light-0.2.0.tgz#4566f3650a83e4fab364ce2e2859405bda3c0455" - integrity sha512-ZMdEubATpmka3vbPoYQXoZRwpRHXj7Oi9BFg/wkhfYznCLZG7HN8CXVnGl2TOdHHrAvegPtXLU6HusDlfVvPJg== - dependencies: - "@alchemy/aa-alchemy" "^3.6.1" - "@alchemy/aa-core" "^3.6.1" - "@lit-protocol/pkp-ethers" "6.0.0-beta.2" - "@snowballtools/smartwallet-alchemy-light" "*" - "@snowballtools/types" "*" - "@snowballtools/utils" "*" - ethers "^6.11.1" - viem "2.x" - "@snowballtools/material-tailwind-react-fork@^2.1.10": version "2.1.10" resolved "https://registry.yarnpkg.com/@snowballtools/material-tailwind-react-fork/-/material-tailwind-react-fork-2.1.10.tgz#7a3e582122505157cb033168e48d6c93d93336e8" @@ -6085,19 +5375,6 @@ react-dom "18.2.0" tailwind-merge "1.8.1" -"@snowballtools/smartwallet-alchemy-light@*": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@snowballtools/smartwallet-alchemy-light/-/smartwallet-alchemy-light-0.1.0.tgz#659be4924c15c015b56453c508ee78cd3d64f837" - integrity sha512-gR69Kq3Bl8qxmMqBjac5lINRlABH25U+oUmrzUsul9TtUdfJMtA/96jR48v6upliKyncGoSIf+KJQ8opA5DqHw== - dependencies: - "@alchemy/aa-accounts" "^3.6.1" - "@alchemy/aa-alchemy" "^3.6.1" - "@alchemy/aa-core" "^3.6.1" - "@lit-protocol/pkp-ethers" "3.0.32" - "@lit-protocol/types" "3.0.32" - "@snowballtools/types" "*" - "@snowballtools/utils" "*" - "@snowballtools/smartwallet-alchemy-light@^0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@snowballtools/smartwallet-alchemy-light/-/smartwallet-alchemy-light-0.2.0.tgz#4af402aa660b86320ef7d13f631d85844a34c8c1" @@ -6156,13 +5433,6 @@ uri-js "^4.4.1" valid-url "^1.0.9" -"@spruceid/siwe-parser@1.1.3": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@spruceid/siwe-parser/-/siwe-parser-1.1.3.tgz#0eebe8bbd63c6de89cb44c06b6329b00b305df65" - integrity sha512-oQ8PcwDqjGWJvLmvAF2yzd6iniiWxK0Qtz+Dw+gLD/W5zOQJiKIUXwslHOm8VB8OOOKW9vfR3dnPBhHaZDvRsw== - dependencies: - apg-js "^4.1.1" - "@sqltools/formatter@^1.2.5": version "1.2.5" resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.5.tgz#3abc203c79b8c3e90fd6c156a0c62d5403520e12" @@ -7582,7 +6852,7 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== -"@types/minimatch@^3.0.3", "@types/minimatch@^3.0.4": +"@types/minimatch@^3.0.3": version "3.0.5" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== @@ -7609,11 +6879,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== -"@types/node@18.15.13": - version "18.15.13" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469" - integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== - "@types/node@^10.1.0": version "10.17.60" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" @@ -8806,11 +8071,6 @@ aes-js@3.0.0: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== -aes-js@4.0.0-beta.5: - version "4.0.0-beta.5" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873" - integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q== - agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -8921,11 +8181,6 @@ any-promise@^1.0.0: resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== -any-signal@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/any-signal/-/any-signal-3.0.1.tgz#49cae34368187a3472e31de28fb5cb1430caa9a6" - integrity sha512-xgZgJtKEa9YmDqXodIgl7Fl1C8yNXr8w6gXjqK3LW4GcEiYT+6AQfJSE/8SPsEpLLmcvbv8YU+qet94UewHxqg== - anymatch@^3.1.3, anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" @@ -8934,7 +8189,7 @@ anymatch@^3.1.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" -apg-js@^4.1.1, apg-js@^4.3.0: +apg-js@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/apg-js/-/apg-js-4.3.0.tgz#2c55d3f1aa6b90be5d3c6539f346cf2c726702c3" integrity sha512-8U8MULS+JocCnm11bfrVS4zxtAcE3uOiCAI21SnjDrV9LNhMSGwTGGeko3QfyK1JLWwT7KebFqJMB2puzfdFMQ== @@ -9292,11 +8547,6 @@ base64-js@^1.3.0, base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -base64url@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" - integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== - bech32@1.1.4, bech32@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" @@ -9394,41 +8644,11 @@ bl@^4.0.3, bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" -bl@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-5.1.0.tgz#183715f678c7188ecef9fe475d90209400624273" - integrity sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ== - dependencies: - buffer "^6.0.3" - inherits "^2.0.4" - readable-stream "^3.4.0" - blakejs@^1.1.0: version "1.2.1" resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== -blob-to-it@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/blob-to-it/-/blob-to-it-1.0.4.tgz#f6caf7a4e90b7bb9215fa6a318ed6bd8ad9898cb" - integrity sha512-iCmk0W4NdbrWgRRuxOriU8aM5ijeVLI61Zulsmg/lUHNr7pYjoj+U77opLefNagevtrrbMt3JQ5Qip7ar178kA== - dependencies: - browser-readablestream-to-it "^1.0.3" - -blockstore-core@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/blockstore-core/-/blockstore-core-3.0.0.tgz#08f52d954fe079d2735b745d218e737071badd97" - integrity sha512-5ZZB5nh6kErcjZ/CTK6lCwTIGlPdkTXbD8+2xLC4Fm0WGh7g2e2lW2bfURw7mvnPtSX1xV+sN4V2ndowSgIiHQ== - dependencies: - err-code "^3.0.1" - interface-blockstore "^4.0.0" - interface-store "^3.0.0" - it-all "^2.0.0" - it-drain "^2.0.0" - it-filter "^2.0.0" - it-take "^2.0.0" - multiformats "^11.0.0" - bn.js@^4.11.0, bn.js@^4.11.8, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" @@ -9506,11 +8726,6 @@ browser-assert@^1.2.1: resolved "https://registry.yarnpkg.com/browser-assert/-/browser-assert-1.2.1.tgz#9aaa5a2a8c74685c2ae05bfe46efd606f068c200" integrity sha512-nfulgvOR6S4gt9UKCeGJOuSGBPGiFT6oQ/2UBnvTY/5aQ1PnksW72fhZkM30DzoRRv2WpwZf1vHHEr3mtuXIWQ== -browser-readablestream-to-it@^1.0.0, browser-readablestream-to-it@^1.0.1, browser-readablestream-to-it@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/browser-readablestream-to-it/-/browser-readablestream-to-it-1.0.3.tgz#ac3e406c7ee6cdf0a502dd55db33bab97f7fba76" - integrity sha512-+12sHB+Br8HIh6VAMVEG5r3UXCyESIgDW7kzk3BjIXa43DVqVwL7GC5TW3jeh+72dtcH99pPVpw0X8i0jt+/kw== - browserify-aes@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" @@ -9599,7 +8814,7 @@ buffer@5.7.1, buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.3: +buffer@6.0.3, buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -9759,11 +8974,6 @@ canonicalize@^2.0.0: resolved "https://registry.yarnpkg.com/canonicalize/-/canonicalize-2.0.0.tgz#32be2cef4446d67fd5348027a384cae28f17226a" integrity sha512-ulDEYPv7asdKvqahuAY35c1selLdzDwHqugK92hfkzvlDCwXRRelDkR+Er33md/PtnpqHemgkuDPanZ4fiYZ8w== -cbor-web@^9.0.1: - version "9.0.2" - resolved "https://registry.yarnpkg.com/cbor-web/-/cbor-web-9.0.2.tgz#1915f1ef1a72ea905db07480f71cf12ff601c661" - integrity sha512-N6gU2GsJS8RR5gy1d9wQcSPgn9FGJFY7KNvdDRlwHfz6kCxrQr2TDnrjXHmr6TFSl6Fd0FC4zRnityEldjRGvQ== - cborg@^1.5.4, cborg@^1.6.0: version "1.10.2" resolved "https://registry.yarnpkg.com/cborg/-/cborg-1.10.2.tgz#83cd581b55b3574c816f82696307c7512db759a1" @@ -10354,14 +9564,6 @@ cosmiconfig@^8.2.0: parse-json "^5.2.0" path-type "^4.0.0" -cosmjs-types@^0.7.1: - version "0.7.2" - resolved "https://registry.yarnpkg.com/cosmjs-types/-/cosmjs-types-0.7.2.tgz#a757371abd340949c5bd5d49c6f8379ae1ffd7e2" - integrity sha512-vf2uLyktjr/XVAgEq0DjMxeAWh1yYREe7AMHDKd7EiHVqxBPCaBS+qEEQUkXbR9ndnckqr1sUG8BQhazh4X5lA== - dependencies: - long "^4.0.0" - protobufjs "~6.11.2" - cosmjs-types@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/cosmjs-types/-/cosmjs-types-0.9.0.tgz#c3bc482d28c7dfa25d1445093fdb2d9da1f6cfcc" @@ -10507,14 +9709,6 @@ d@1, d@^1.0.1, d@^1.0.2: es5-ext "^0.10.64" type "^2.7.2" -dag-jose@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dag-jose/-/dag-jose-1.0.0.tgz#52e42d70cb5bee31ae4e8e3ab860615568d7ad73" - integrity sha512-U0b/YsIPBp6YZNTFrVjwLZAlY3qGRxZTIEcM/CcQmrVrCWq9MWQq9pheXVSPLIhF4SNwzp2SikPva4/BIrJY+g== - dependencies: - "@ipld/dag-cbor" "^6.0.3" - multiformats "^9.0.2" - dargs@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" @@ -10547,13 +9741,6 @@ dayjs@1.11.10, dayjs@^1.11.9: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0" integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ== -debug@*, debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - debug@2.6.9, debug@^2.2.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -10568,6 +9755,13 @@ debug@3.2.7: dependencies: ms "^2.1.1" +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + debug@~4.3.1, debug@~4.3.2: version "4.3.7" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" @@ -10859,15 +10053,6 @@ dlv@^1.1.3: resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== -dns-over-http-resolver@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/dns-over-http-resolver/-/dns-over-http-resolver-1.2.3.tgz#194d5e140a42153f55bb79ac5a64dd2768c36af9" - integrity sha512-miDiVSI6KSNbi4SVifzO/reD8rMnxgrlnkrlkugOLQpWQTe2qMdHsZp5DmfKjxNE+/T3VAAYLQUZMv9SMr6+AA== - dependencies: - debug "^4.3.1" - native-fetch "^3.0.0" - receptacle "^1.3.2" - doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -10989,13 +10174,6 @@ ejs@^3.1.7, ejs@^3.1.8: dependencies: jake "^10.8.5" -electron-fetch@^1.7.2: - version "1.9.1" - resolved "https://registry.yarnpkg.com/electron-fetch/-/electron-fetch-1.9.1.tgz#e28bfe78d467de3f2dec884b1d72b8b05322f30f" - integrity sha512-M9qw6oUILGVrcENMSRRefE1MbHPIz0h79EKIeJWK9v563aT9Qkh8aEHPO1H5vi970wPirNY+jO9OpFoLiMsMGA== - dependencies: - encoding "^0.1.13" - electron-to-chromium@^1.4.668: version "1.4.746" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.746.tgz#787213e75f6c7bccb55dfe8b68170555c548d093" @@ -11109,11 +10287,6 @@ err-code@^2.0.2: resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== -err-code@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/err-code/-/err-code-3.0.1.tgz#a444c7b992705f2b120ee320b09972eef331c920" - integrity sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA== - error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -11505,19 +10678,6 @@ ethers@^5.6.2, ethers@^5.7.1: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" -ethers@^6.11.1: - version "6.11.1" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.11.1.tgz#96aae00b627c2e35f9b0a4d65c7ab658259ee6af" - integrity sha512-mxTAE6wqJQAbp5QAe/+o+rXOID7Nw91OZXvgpjDa1r4fAbq2Nu314oEZSbjoRLacuCzs7kUC3clEvkCQowffGg== - dependencies: - "@adraffy/ens-normalize" "1.10.1" - "@noble/curves" "1.2.0" - "@noble/hashes" "1.3.2" - "@types/node" "18.15.13" - aes-js "4.0.0-beta.5" - tslib "2.4.0" - ws "8.5.0" - ethjs-util@0.1.6, ethjs-util@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" @@ -11724,11 +10884,6 @@ fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-fifo@^1.0.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" - integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== - fast-glob@^3.2.9, fast-glob@^3.3.0: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -12109,11 +11264,6 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" -get-iterator@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-iterator/-/get-iterator-1.0.2.tgz#cd747c02b4c084461fac14f48f6b45a80ed25c82" - integrity sha512-v+dm9bNVfOYsY1OrhaCrmyOcYoSeVvbt+hHZ0Au+T+p1y+0Uyj9aMaGIeUTT6xdpRbWzDeYKvfOslPhggQMcsg== - get-nonce@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/get-nonce/-/get-nonce-1.0.1.tgz#fdf3f0278073820d2ce9426c18f07481b1e0cdf3" @@ -12413,14 +11563,6 @@ h3@^1.10.2, h3@^1.11.1: uncrypto "^0.1.3" unenv "^1.9.0" -hamt-sharding@^3.0.0: - version "3.0.6" - resolved "https://registry.yarnpkg.com/hamt-sharding/-/hamt-sharding-3.0.6.tgz#3643107a3021af66ac95684aec87b196add5ba57" - integrity sha512-nZeamxfymIWLpVcAN0CRrb7uVq3hCOGj9IcL6NMA6VVCVWqj+h9Jo/SmaWuS92AEDf1thmHsM5D5c70hM3j2Tg== - dependencies: - sparse-array "^1.3.1" - uint8arrays "^5.0.1" - handlebars@^4.7.7: version "4.7.8" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" @@ -12837,33 +11979,6 @@ inquirer@^8.2.4: through "^2.3.6" wrap-ansi "^6.0.1" -interface-blockstore@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/interface-blockstore/-/interface-blockstore-4.0.1.tgz#0dda1774d72ca7e990dc1921cfc524b3e9d1b9ca" - integrity sha512-ROWKGJls7vLeFaQtI3hZVCJOkUoZ05xAi2t2qysM4d7dwVKrfm5jUOqWh8JgLL7Iup3XqJ0mKXXZuwJ3s03RSw== - dependencies: - interface-store "^3.0.0" - multiformats "^11.0.0" - -interface-datastore@^6.0.2: - version "6.1.1" - resolved "https://registry.yarnpkg.com/interface-datastore/-/interface-datastore-6.1.1.tgz#5150a00de2e7513eaadba58bcafd059cb50004c1" - integrity sha512-AmCS+9CT34pp2u0QQVXjKztkuq3y5T+BIciuiHDDtDZucZD8VudosnSdUyXJV6IsRkN5jc4RFDhCk1O6Q3Gxjg== - dependencies: - interface-store "^2.0.2" - nanoid "^3.0.2" - uint8arrays "^3.0.0" - -interface-store@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/interface-store/-/interface-store-2.0.2.tgz#83175fd2b0c501585ed96db54bb8ba9d55fce34c" - integrity sha512-rScRlhDcz6k199EkHqT8NpM87ebN89ICOzILoBHgaG36/WX50N32BnU/kpZgCGPLhARRAWUUX5/cyaIjt7Kipg== - -interface-store@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/interface-store/-/interface-store-3.0.4.tgz#670d95ef45f3b7061d154c3cbfaf39a538167ad7" - integrity sha512-OjHUuGXbH4eXSBx1TF1tTySvjLldPLzRSYYXJwrEQI+XfH5JWYZofr0gVMV4F8XTwC+4V7jomDYkvGRmDSRKqQ== - internal-slot@^1.0.4: version "1.0.7" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" @@ -12893,11 +12008,6 @@ ip-address@^9.0.5: jsbn "1.1.0" sprintf-js "^1.1.3" -ip-regex@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" - integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== - ip@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105" @@ -12908,126 +12018,6 @@ ipaddr.js@1.9.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -ipfs-core-types@^0.10.0, ipfs-core-types@^0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/ipfs-core-types/-/ipfs-core-types-0.10.3.tgz#89ebe98199d4d829f2b20104bfa3299f808c80fe" - integrity sha512-GNid2lRBjR5qgScCglgk7w9Hk3TZAwPHQXxOLQx72wgyc0jF2U5NXRoKW0GRvX8NPbHmsrFszForIqxd23I1Gw== - dependencies: - "@ipld/dag-pb" "^2.1.3" - interface-datastore "^6.0.2" - ipfs-unixfs "^6.0.3" - multiaddr "^10.0.0" - multiformats "^9.5.1" - -ipfs-core-utils@^0.14.0: - version "0.14.3" - resolved "https://registry.yarnpkg.com/ipfs-core-utils/-/ipfs-core-utils-0.14.3.tgz#d04c631c472507bdefc58d4e8d1d9109efbb411c" - integrity sha512-aBkewVhgAj3NWXPwu6imj0wADGiGVZmJzqKzODOJsibDjkx6FGdMv8kvvqtLnK8LS/dvSk9yk32IDtuDyYoV7Q== - dependencies: - any-signal "^3.0.0" - blob-to-it "^1.0.1" - browser-readablestream-to-it "^1.0.1" - debug "^4.1.1" - err-code "^3.0.1" - ipfs-core-types "^0.10.3" - ipfs-unixfs "^6.0.3" - ipfs-utils "^9.0.6" - it-all "^1.0.4" - it-map "^1.0.4" - it-peekable "^1.0.2" - it-to-stream "^1.0.0" - merge-options "^3.0.4" - multiaddr "^10.0.0" - multiaddr-to-uri "^8.0.0" - multiformats "^9.5.1" - nanoid "^3.1.23" - parse-duration "^1.0.0" - timeout-abort-controller "^3.0.0" - uint8arrays "^3.0.0" - -ipfs-http-client@56.0.0: - version "56.0.0" - resolved "https://registry.yarnpkg.com/ipfs-http-client/-/ipfs-http-client-56.0.0.tgz#f42fa2bbf987bfa128ce0025de5d668586f4a815" - integrity sha512-JF3on9c0hB9XHk/UCxbyC6rSpERuj8F/0QcN/HImZoHNUKZ0/T8DpgVopocKdmGi1gr3Izlop7poaXomSt8Nug== - dependencies: - "@ipld/dag-cbor" "^7.0.0" - "@ipld/dag-json" "^8.0.1" - "@ipld/dag-pb" "^2.1.3" - any-signal "^3.0.0" - dag-jose "^1.0.0" - debug "^4.1.1" - err-code "^3.0.1" - ipfs-core-types "^0.10.0" - ipfs-core-utils "^0.14.0" - ipfs-utils "^9.0.2" - it-first "^1.0.6" - it-last "^1.0.4" - merge-options "^3.0.4" - multiaddr "^10.0.0" - multiformats "^9.4.13" - parse-duration "^1.0.0" - stream-to-it "^0.2.2" - uint8arrays "^3.0.0" - -ipfs-unixfs-importer@^12.0.0: - version "12.0.1" - resolved "https://registry.yarnpkg.com/ipfs-unixfs-importer/-/ipfs-unixfs-importer-12.0.1.tgz#316a52d8a793e9e006b1ee43edc50b83e00ef306" - integrity sha512-//VPZOqbONtc1HNtb+sBrw+nIGijHEloSm1O3LVR5orSlhHQ8X7+OCkeqceFBhu40tPMe/TwgAPrkvh+fXL+bA== - dependencies: - "@ipld/dag-pb" "^4.0.0" - "@multiformats/murmur3" "^2.0.0" - err-code "^3.0.1" - hamt-sharding "^3.0.0" - interface-blockstore "^4.0.0" - ipfs-unixfs "^9.0.0" - it-all "^2.0.0" - it-batch "^2.0.0" - it-first "^2.0.0" - it-parallel-batch "^2.0.0" - merge-options "^3.0.4" - multiformats "^11.0.0" - rabin-wasm "^0.1.4" - uint8arraylist "^2.3.3" - uint8arrays "^4.0.2" - -ipfs-unixfs@^6.0.3: - version "6.0.9" - resolved "https://registry.yarnpkg.com/ipfs-unixfs/-/ipfs-unixfs-6.0.9.tgz#f6613b8e081d83faa43ed96e016a694c615a9374" - integrity sha512-0DQ7p0/9dRB6XCb0mVCTli33GzIzSVx5udpJuVM47tGcD+W+Bl4LsnoLswd3ggNnNEakMv1FdoFITiEnchXDqQ== - dependencies: - err-code "^3.0.1" - protobufjs "^6.10.2" - -ipfs-unixfs@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/ipfs-unixfs/-/ipfs-unixfs-9.0.1.tgz#d06e688e07ef4ce08d610337ba2fe8c143c386e7" - integrity sha512-jh2CbXyxID+v3jLml9CqMwjdSS9ZRnsGfQGGPOfem0/hT/L48xUeTPvh7qLFWkZcIMhZtG+fnS1teei8x5uGBg== - dependencies: - err-code "^3.0.1" - protobufjs "^7.0.0" - -ipfs-utils@^9.0.2, ipfs-utils@^9.0.6: - version "9.0.14" - resolved "https://registry.yarnpkg.com/ipfs-utils/-/ipfs-utils-9.0.14.tgz#24f5fda1f4567685eb32bca2543d518f95fd8704" - integrity sha512-zIaiEGX18QATxgaS0/EOQNoo33W0islREABAcxXE8n7y2MGAlB+hdsxXn4J0hGZge8IqVQhW8sWIb+oJz2yEvg== - dependencies: - any-signal "^3.0.0" - browser-readablestream-to-it "^1.0.0" - buffer "^6.0.1" - electron-fetch "^1.7.2" - err-code "^3.0.1" - is-electron "^2.2.0" - iso-url "^1.1.5" - it-all "^1.0.4" - it-glob "^1.0.1" - it-to-stream "^1.0.0" - merge-options "^3.0.4" - nanoid "^3.1.20" - native-fetch "^3.0.0" - node-fetch "^2.6.8" - react-native-fetch-api "^3.0.0" - stream-to-it "^0.2.2" - iron-webcrypto@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/iron-webcrypto/-/iron-webcrypto-1.1.1.tgz#245c9d467075ee810343ddfa53dd4909616aaf33" @@ -13140,11 +12130,6 @@ is-docker@^3.0.0: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== -is-electron@^2.2.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/is-electron/-/is-electron-2.2.2.tgz#3778902a2044d76de98036f5dc58089ac4d80bb9" - integrity sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg== - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -13196,13 +12181,6 @@ is-interactive@^1.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== -is-ip@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-ip/-/is-ip-3.1.0.tgz#2ae5ddfafaf05cb8008a62093cf29734f657c5d8" - integrity sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q== - dependencies: - ip-regex "^4.0.0" - is-lambda@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" @@ -13419,11 +12397,6 @@ isexe@^3.1.1: resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d" integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== -iso-url@^1.1.5: - version "1.2.1" - resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-1.2.1.tgz#db96a49d8d9a64a1c889fc07cc525d093afb1811" - integrity sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng== - isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" @@ -13452,88 +12425,6 @@ isows@1.0.6: resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.6.tgz#0da29d706fa51551c663c627ace42769850f86e7" integrity sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw== -it-all@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/it-all/-/it-all-1.0.6.tgz#852557355367606295c4c3b7eff0136f07749335" - integrity sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A== - -it-all@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/it-all/-/it-all-2.0.1.tgz#45d530ecf6e13fb81d7ba583cdfd55ffdb376b05" - integrity sha512-9UuJcCRZsboz+HBQTNOau80Dw+ryGaHYFP/cPYzFBJBFcfDathMYnhHk4t52en9+fcyDGPTdLB+lFc1wzQIroA== - -it-batch@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/it-batch/-/it-batch-2.0.1.tgz#a0822be9b18743c41d8525835f788a7f297ba41f" - integrity sha512-2gWFuPzamh9Dh3pW+OKjc7UwJ41W4Eu2AinVAfXDMfrC5gXfm3b1TF+1UzsygBUgKBugnxnGP+/fFRyn+9y1mQ== - -it-drain@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/it-drain/-/it-drain-2.0.1.tgz#f50f6ce5cb8592a9d6337c9b5e780348877b152d" - integrity sha512-ESuHV6MLUNxuSy0vGZpKhSRjW0ixczN1FhbVy7eGJHjX6U2qiiXTyMvDc0z/w+nifOOwPyI5DT9Rc3o9IaGqEQ== - -it-filter@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/it-filter/-/it-filter-2.0.2.tgz#c849b3de4a12a2de3cc45be734ee55f69a0ed284" - integrity sha512-gocw1F3siqupegsOzZ78rAc9C+sYlQbI2af/TmzgdrR613MyEJHbvfwBf12XRekGG907kqXSOGKPlxzJa6XV1Q== - -it-first@^1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/it-first/-/it-first-1.0.7.tgz#a4bef40da8be21667f7d23e44dae652f5ccd7ab1" - integrity sha512-nvJKZoBpZD/6Rtde6FXqwDqDZGF1sCADmr2Zoc0hZsIvnE449gRFnGctxDf09Bzc/FWnHXAdaHVIetY6lrE0/g== - -it-first@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/it-first/-/it-first-2.0.1.tgz#75d66b254c385ae3a1906def060a69006a437cef" - integrity sha512-noC1oEQcWZZMUwq7VWxHNLML43dM+5bviZpfmkxkXlvBe60z7AFRqpZSga9uQBo792jKv9otnn1IjA4zwgNARw== - -it-glob@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/it-glob/-/it-glob-1.0.2.tgz#bab9b04d6aaac42884502f3a0bfee84c7a29e15e" - integrity sha512-Ch2Dzhw4URfB9L/0ZHyY+uqOnKvBNeS/SMcRiPmJfpHiM0TsUZn+GkpcZxAoF3dJVdPm/PuIk3A4wlV7SUo23Q== - dependencies: - "@types/minimatch" "^3.0.4" - minimatch "^3.0.4" - -it-last@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/it-last/-/it-last-1.0.6.tgz#4106232e5905ec11e16de15a0e9f7037eaecfc45" - integrity sha512-aFGeibeiX/lM4bX3JY0OkVCFkAw8+n9lkukkLNivbJRvNz8lI3YXv5xcqhFUV2lDJiraEK3OXRDbGuevnnR67Q== - -it-map@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/it-map/-/it-map-1.0.6.tgz#6aa547e363eedcf8d4f69d8484b450bc13c9882c" - integrity sha512-XT4/RM6UHIFG9IobGlQPFQUrlEKkU4eBUFG3qhWhfAdh1JfF2x11ShCrKCdmZ0OiZppPfoLuzcfA4cey6q3UAQ== - -it-parallel-batch@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/it-parallel-batch/-/it-parallel-batch-2.0.1.tgz#23eb07bbeb73521253d7c8a1566b53137103077c" - integrity sha512-tXh567/JfDGJ90Zi//H9HkL7kY27ARp0jf2vu2jUI6PUVBWfsoT+gC4eT41/b4+wkJXSGgT8ZHnivAOlMfcNjA== - dependencies: - it-batch "^2.0.0" - -it-peekable@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/it-peekable/-/it-peekable-1.0.3.tgz#8ebe933767d9c5aa0ae4ef8e9cb3a47389bced8c" - integrity sha512-5+8zemFS+wSfIkSZyf0Zh5kNN+iGyccN02914BY4w/Dj+uoFEoPSvj5vaWn8pNZJNSxzjW0zHRxC3LUb2KWJTQ== - -it-take@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/it-take/-/it-take-2.0.1.tgz#f9e5ddf0b73a18ba00e62fb532d9d3cde3fe4ce6" - integrity sha512-DL7kpZNjuoeSTnB9dMAJ0Z3m2T29LRRAU+HIgkiQM+1jH3m8l9e/1xpWs8JHTlbKivbqSFrQMTc8KVcaQNmsaA== - -it-to-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/it-to-stream/-/it-to-stream-1.0.0.tgz#6c47f91d5b5df28bda9334c52782ef8e97fe3a4a" - integrity sha512-pLULMZMAB/+vbdvbZtebC0nWBTbG581lk6w8P7DfIIIKUfa8FbY7Oi0FxZcFPbxvISs7A9E+cMpLDBc1XhpAOA== - dependencies: - buffer "^6.0.3" - fast-fifo "^1.0.0" - get-iterator "^1.0.2" - p-defer "^3.0.0" - p-fifo "^1.0.0" - readable-stream "^3.6.0" - jackspeak@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" @@ -14123,15 +13014,6 @@ lit-html@^3.1.0, lit-html@^3.1.2: dependencies: "@types/trusted-types" "^2.0.2" -lit-siwe@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/lit-siwe/-/lit-siwe-1.1.8.tgz#6a393069012816d629c518bb8aa410f1e4a78bd7" - integrity sha512-gXI8GG0GAClw6G7T9p4p6Kn9ywDo8j2d90ShaYArJdsqqO9gwXfzxF84SMeY+bpsNqqQ3FahrhEwTCHd6w7wNw== - dependencies: - "@spruceid/siwe-parser" "1.1.3" - "@stablelib/random" "^1.0.1" - apg-js "^4.1.1" - lit@2.7.6: version "2.7.6" resolved "https://registry.yarnpkg.com/lit/-/lit-2.7.6.tgz#810007b876ed43e0c70124de91831921598b1665" @@ -14299,11 +13181,6 @@ long@^4.0.0: resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== -long@^5.0.0: - version "5.2.3" - resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" - integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== - loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -14854,31 +13731,7 @@ ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -multiaddr-to-uri@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/multiaddr-to-uri/-/multiaddr-to-uri-8.0.0.tgz#65efe4b1f9de5f6b681aa42ff36a7c8db7625e58" - integrity sha512-dq4p/vsOOUdVEd1J1gl+R2GFrXJQH8yjLtz4hodqdVbieg39LvBOdMQRdQnfbg5LSM/q1BYNVf5CBbwZFFqBgA== - dependencies: - multiaddr "^10.0.0" - -multiaddr@^10.0.0: - version "10.0.1" - resolved "https://registry.yarnpkg.com/multiaddr/-/multiaddr-10.0.1.tgz#0d15848871370860a4d266bb44d93b3dac5d90ef" - integrity sha512-G5upNcGzEGuTHkzxezPrrD6CaIHR9uo+7MwqhNVcXTs33IInon4y7nMiGxl2CY5hG7chvYQUQhz5V52/Qe3cbg== - dependencies: - dns-over-http-resolver "^1.2.3" - err-code "^3.0.1" - is-ip "^3.1.0" - multiformats "^9.4.5" - uint8arrays "^3.0.0" - varint "^6.0.0" - -multiformats@^10.0.2: - version "10.0.3" - resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-10.0.3.tgz#d4147d01f9a31271c6fb5d24adf9b01f9e656bba" - integrity sha512-K2yGSmstS/oEmYiEIieHb53jJCaqp4ERPDQAYrm5sV3UUrVDZeshJQCK6GHAKyIGufU1vAcbS0PdAAZmC7Tzcw== - -multiformats@^11.0.0, multiformats@^11.0.2: +multiformats@^11.0.2: version "11.0.2" resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-11.0.2.tgz#b14735efc42cd8581e73895e66bebb9752151b60" integrity sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg== @@ -14888,12 +13741,7 @@ multiformats@^12.0.1: resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-12.1.3.tgz#cbf7a9861e11e74f8228b21376088cb43ba8754e" integrity sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw== -multiformats@^13.0.0, multiformats@^13.1.0: - version "13.1.0" - resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-13.1.0.tgz#5aa9d2175108a448fc3bdb54ba8a3d0b6cab3ac3" - integrity sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ== - -multiformats@^9.0.2, multiformats@^9.4.13, multiformats@^9.4.2, multiformats@^9.4.5, multiformats@^9.5.1, multiformats@^9.5.4, multiformats@^9.7.1: +multiformats@^9.4.2, multiformats@^9.5.4, multiformats@^9.7.1: version "9.9.0" resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== @@ -14909,11 +13757,6 @@ multimatch@5.0.0, multimatch@^5.0.0: arrify "^2.0.1" minimatch "^3.0.4" -murmurhash3js-revisited@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz#6bd36e25de8f73394222adc6e41fa3fac08a5869" - integrity sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g== - mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" @@ -14943,7 +13786,7 @@ nanoid-dictionary@^5.0.0-beta.1: resolved "https://registry.yarnpkg.com/nanoid-dictionary/-/nanoid-dictionary-5.0.0-beta.1.tgz#f2a2aa05b04f7ac6a9327c62a96146e8aa1b025d" integrity sha512-xBkL9zzkNjzJ/UnmWyiOUDVX/COoi05eS0oU28RYKFFQhdnzO5dTOPbVZ/fCFgIOGr1zNinDHJ68mm/KQfcgcw== -nanoid@3, nanoid@^3.0.2, nanoid@^3.1.20, nanoid@^3.1.23, nanoid@^3.3.6, nanoid@^3.3.7: +nanoid@3, nanoid@^3.3.6, nanoid@^3.3.7: version "3.3.7" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== @@ -14958,11 +13801,6 @@ napi-wasm@^1.1.0: resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.0.tgz#bbe617823765ae9c1bc12ff5942370eae7b2ba4e" integrity sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg== -native-fetch@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/native-fetch/-/native-fetch-3.0.0.tgz#06ccdd70e79e171c365c75117959cf4fe14a09bb" - integrity sha512-G3Z7vx0IFb/FQ4JxvtqGABsOTIqRWvgQz6e+erkB+JJD6LrszQtMozEHI4EkmgZQvnGHrpLVzUWk7t4sJCIkVw== - negotiator@0.6.3, negotiator@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" @@ -15029,7 +13867,7 @@ node-fetch@2.6.7: dependencies: whatwg-url "^5.0.0" -node-fetch@^2.0.0, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7, node-fetch@^2.6.8: +node-fetch@^2.0.0, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -15527,19 +14365,6 @@ p-defer@^1.0.0: resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" integrity sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw== -p-defer@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-3.0.0.tgz#d1dceb4ee9b2b604b1d94ffec83760175d4e6f83" - integrity sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw== - -p-fifo@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-fifo/-/p-fifo-1.0.0.tgz#e29d5cf17c239ba87f51dde98c1d26a9cfe20a63" - integrity sha512-IjoCxXW48tqdtDFz6fqo5q1UfFVjjVZe8TC1QRflvNUJtNfCUhxOUw6MOVZhDPjqhSzc26xKdugsO17gmzd5+A== - dependencies: - fast-fifo "^1.0.0" - p-defer "^3.0.0" - p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -15677,11 +14502,6 @@ pako@1.0.11, pako@~1.0.2: resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== -pako@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" - integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== - pako@~0.2.0: version "0.2.9" resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" @@ -15694,11 +14514,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-duration@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-1.1.0.tgz#5192084c5d8f2a3fd676d04a451dbd2e05a1819c" - integrity sha512-z6t9dvSJYaPoQq7quMzdEagSFtpGu+utzHqqxmpVWNNZRIXnvqyCvn9XsTdh7c/w0Bqmdz3RB3YnRaKtpRtEXQ== - parse-entities@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8" @@ -16228,7 +15043,7 @@ property-information@^5.0.0: dependencies: xtend "^4.0.0" -protobufjs@^6.10.2, protobufjs@^6.8.8, protobufjs@~6.11.2, protobufjs@~6.11.3: +protobufjs@^6.8.8: version "6.11.4" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.4.tgz#29a412c38bf70d89e537b6d02d904a6f448173aa" integrity sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw== @@ -16247,24 +15062,6 @@ protobufjs@^6.10.2, protobufjs@^6.8.8, protobufjs@~6.11.2, protobufjs@~6.11.3: "@types/node" ">=13.7.0" long "^4.0.0" -protobufjs@^7.0.0: - version "7.2.6" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.6.tgz#4a0ccd79eb292717aacf07530a07e0ed20278215" - integrity sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/node" ">=13.7.0" - long "^5.0.0" - protocols@^2.0.0, protocols@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.1.tgz#8f155da3fc0f32644e83c5782c8e8212ccf70a86" @@ -16384,18 +15181,6 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -rabin-wasm@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/rabin-wasm/-/rabin-wasm-0.1.5.tgz#5b625ca007d6a2cbc1456c78ae71d550addbc9c9" - integrity sha512-uWgQTo7pim1Rnj5TuWcCewRDTf0PEFTSlaUjWP4eY9EbLV9em08v89oCz/WO+wRxpYuO36XEHp4wgYQnAgOHzA== - dependencies: - "@assemblyscript/loader" "^0.9.4" - bl "^5.0.0" - debug "^4.3.1" - minimist "^1.2.5" - node-fetch "^2.6.1" - readable-stream "^3.6.0" - radix3@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/radix3/-/radix3-1.1.2.tgz#fd27d2af3896c6bf4bcdfab6427c69c2afc69ec0" @@ -16577,13 +15362,6 @@ react-is@^18.3.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== -react-native-fetch-api@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/react-native-fetch-api/-/react-native-fetch-api-3.0.0.tgz#81e1bb6562c292521bc4eca52fe1097f4c1ebab5" - integrity sha512-g2rtqPjdroaboDKTsJCTlcmtw54E25OjyaunUP0anOZn4Fuo2IKs8BVfe02zVggA/UysbmfSnRJIqtNkAgggNA== - dependencies: - p-defer "^3.0.0" - react-native-webview@^11.26.0: version "11.26.1" resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.26.1.tgz#658c09ed5162dc170b361e48c2dd26c9712879da" @@ -16848,13 +15626,6 @@ recast@^0.23.3, recast@^0.23.5: tiny-invariant "^1.3.3" tslib "^2.0.1" -receptacle@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/receptacle/-/receptacle-1.3.2.tgz#a7994c7efafc7a01d0e2041839dab6c4951360d2" - integrity sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A== - dependencies: - ms "^2.1.1" - rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -17037,11 +15808,6 @@ restore-cursor@^3.1.0: onetime "^5.1.0" signal-exit "^3.0.2" -retimer@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/retimer/-/retimer-3.0.0.tgz#98b751b1feaf1af13eb0228f8ea68b8f9da530df" - integrity sha512-WKE0j11Pa0ZJI5YIk0nflGI7SQsfl2ljihVy7ogh7DeQSeYAUi0ubZ/yEueGtDfUPk6GH5LRw1hBdLq4IwUBWA== - retry@0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" @@ -17589,11 +16355,6 @@ space-separated-tokens@^2.0.0: resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz#1ecd9d2350a3844572c3f4a312bceb018348859f" integrity sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q== -sparse-array@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/sparse-array/-/sparse-array-1.3.2.tgz#0e1a8b71706d356bc916fe754ff496d450ec20b0" - integrity sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg== - spdx-correct@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" @@ -17729,19 +16490,21 @@ stream-shift@^1.0.0, stream-shift@^1.0.2: resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== -stream-to-it@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/stream-to-it/-/stream-to-it-0.2.4.tgz#d2fd7bfbd4a899b4c0d6a7e6a533723af5749bd0" - integrity sha512-4vEbkSs83OahpmBybNJXlJd7d6/RxzkkSdT3I0mnGt79Xd2Kk+e1JqbvAvsQfCeKj3aKb0QIWkyK3/n0j506vQ== - dependencies: - get-iterator "^1.0.2" - strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -17785,7 +16548,14 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -18120,13 +16890,6 @@ through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -timeout-abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/timeout-abort-controller/-/timeout-abort-controller-3.0.0.tgz#dd57ffca041652c03769904f8d95afd93fb95595" - integrity sha512-O3e+2B8BKrQxU2YRyEjC/2yFdb33slI22WRdUaDx6rvysfi9anloNZyR2q0l6LnePo5qH7gSM7uZtvvwZbc2yA== - dependencies: - retimer "^3.0.0" - tiny-invariant@^1.3.1, tiny-invariant@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127" @@ -18259,11 +17022,6 @@ tslib@1.14.1, tslib@^1.13.0, tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" - integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== - tslib@2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" @@ -18341,11 +17099,6 @@ tween-functions@^1.2.0: resolved "https://registry.yarnpkg.com/tween-functions/-/tween-functions-1.2.0.tgz#1ae3a50e7c60bb3def774eac707acbca73bbc3ff" integrity sha512-PZBtLYcCLtEcjL14Fzb1gSxPBeL7nWvGhO5ZFPGqziCcr8uvHp0NDmdjBchp6KHL+tExcg0m3NISmKxhU394dA== -tweetnacl-util@^0.13.3: - version "0.13.5" - resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.13.5.tgz#e39cd5d99709ee7125a18b03895b45a1299e475f" - integrity sha512-/4Q3hpPFAnbBjNLLOmdTdyvInBfZcQBTWy+LWbypmWxAKwOpSQOyyv4ZZts4CoiYtS8Skyix5CkOWytf7XNK9A== - tweetnacl-util@^0.15.1: version "0.15.1" resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" @@ -18469,13 +17222,6 @@ uid-safe@~2.1.5: dependencies: random-bytes "~1.0.0" -uint8arraylist@^2.3.3: - version "2.4.8" - resolved "https://registry.yarnpkg.com/uint8arraylist/-/uint8arraylist-2.4.8.tgz#5a4d17f4defd77799cb38e93fd5db0f0dceddc12" - integrity sha512-vc1PlGOzglLF0eae1M8mLRTBivsvrGsdmJ5RbK3e+QRvRLOZfZhQROTwH/OfyF3+ZVUg9/8hE8bmKP2CvP9quQ== - dependencies: - uint8arrays "^5.0.1" - uint8arrays@^3.0.0, uint8arrays@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" @@ -18483,20 +17229,13 @@ uint8arrays@^3.0.0, uint8arrays@^3.1.0: dependencies: multiformats "^9.4.2" -uint8arrays@^4.0.2, uint8arrays@^4.0.3: +uint8arrays@^4.0.3: version "4.0.10" resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-4.0.10.tgz#3ec5cde3348903c140e87532fc53f46b8f2e921f" integrity sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA== dependencies: multiformats "^12.0.1" -uint8arrays@^5.0.1: - version "5.0.3" - resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-5.0.3.tgz#92b894d9c4269ba97c51544d6e1f279fe6f80d1f" - integrity sha512-6LBuKji28kHjgPJMkQ6GDaBb1lRwIhyOYq6pDGwYMoDPfImE9SkuYENVmR0yu9yGgs2clHUSY9fKDukR+AXfqQ== - dependencies: - multiformats "^13.0.0" - uncrypto@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/uncrypto/-/uncrypto-0.1.3.tgz#e1288d609226f2d02d8d69ee861fa20d8348ef2b" @@ -18809,11 +17548,6 @@ value-or-promise@^1.0.12: resolved "https://registry.yarnpkg.com/value-or-promise/-/value-or-promise-1.0.12.tgz#0e5abfeec70148c78460a849f6b003ea7986f15c" integrity sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q== -varint@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" - integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== - varuint-bitcoin@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz#e76c138249d06138b480d4c5b40ef53693e24e92" @@ -18946,11 +17680,6 @@ web-vitals@^2.1.4: resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-2.1.4.tgz#76563175a475a5e835264d373704f9dde718290c" integrity sha512-sVWcwhU5mX6crfI5Vd2dC4qchyTqxV8URinzt25XqVh+bHEPGH4C3NPrNionCP7Obx59wrYEbNlw4Z8sjALzZg== -web-vitals@^3.0.4: - version "3.5.2" - resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-3.5.2.tgz#5bb58461bbc173c3f00c2ddff8bfe6e680999ca9" - integrity sha512-c0rhqNcHXRkY/ogGDJQxZ9Im9D19hDihbzSQJrsioex+KnFgmMzBiy57Z1EjkhX/+OjyBpclDCzz2ITtjokFmg== - webauthn-p256@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/webauthn-p256/-/webauthn-p256-0.0.10.tgz#877e75abe8348d3e14485932968edf3325fd2fdd" @@ -19112,7 +17841,7 @@ workspace@^0.0.1-preview.1: resolved "https://registry.yarnpkg.com/workspace/-/workspace-0.0.1-preview.1.tgz#0ba0a6b92b3dbc7f1502dd12bc27a37b1eec9083" integrity sha512-oPpEvU7NIQ0MW7ReL+EigMUI2JPNp05kmqzWS6zXVUaSq5KxuQzfgxGd8wuurBulBkTaOnEcGge+2rriyDVHkw== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -19130,6 +17859,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -19197,11 +17935,6 @@ ws@8.18.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== -ws@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" - integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== - ws@^7, ws@^7.5.1: version "7.5.9" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" -- 2.45.2 From aff015794ee637becf989704ba6176e5761932bc Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Mon, 28 Oct 2024 10:07:42 +0530 Subject: [PATCH 19/27] Remove unused config values from toml file --- .../backend/environments/local.toml.example | 3 - packages/backend/src/config.ts | 11 -- packages/backend/src/database.ts | 2 +- packages/backend/src/index.ts | 2 +- packages/backend/src/routes/auth.ts | 72 +++++----- packages/backend/src/turnkey-backend.ts | 130 ------------------ 6 files changed, 38 insertions(+), 182 deletions(-) delete mode 100644 packages/backend/src/turnkey-backend.ts diff --git a/packages/backend/environments/local.toml.example b/packages/backend/environments/local.toml.example index efebff59..233d495c 100644 --- a/packages/backend/environments/local.toml.example +++ b/packages/backend/environments/local.toml.example @@ -41,6 +41,3 @@ revealFee = "100000" revealsDuration = "120s" denom = "alnt" - -[misc] - projectDomain = "apps.snowballtools.com" diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts index 38285f72..cb4f5b7d 100644 --- a/packages/backend/src/config.ts +++ b/packages/backend/src/config.ts @@ -51,21 +51,10 @@ export interface AuctionConfig { denom: string; } -export interface MiscConfig { - projectDomain: string; -} - export interface Config { server: ServerConfig; database: DatabaseConfig; gitHub: GitHubConfig; registryConfig: RegistryConfig; auction: AuctionConfig; - misc: MiscConfig; - turnkey: { - apiBaseUrl: string; - apiPublicKey: string; - apiPrivateKey: string; - defaultOrganizationId: string; - }; } diff --git a/packages/backend/src/database.ts b/packages/backend/src/database.ts index 8bf75d32..bae1769c 100644 --- a/packages/backend/src/database.ts +++ b/packages/backend/src/database.ts @@ -13,7 +13,7 @@ import assert from 'assert'; import { customAlphabet } from 'nanoid'; import { lowercase, numbers } from 'nanoid-dictionary'; -import { DatabaseConfig, MiscConfig } from './config'; +import { DatabaseConfig } from './config'; import { User } from './entity/User'; import { Organization } from './entity/Organization'; import { Project } from './entity/Project'; diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index 629bd6e7..7e4ab14a 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -17,7 +17,7 @@ const log = debug('snowball:server'); const OAUTH_CLIENT_TYPE = 'oauth-app'; export const main = async (): Promise => { - const { server, database, gitHub, registryConfig, misc } = await getConfig(); + const { server, database, gitHub, registryConfig } = await getConfig(); const app = new OAuthApp({ clientType: OAUTH_CLIENT_TYPE, diff --git a/packages/backend/src/routes/auth.ts b/packages/backend/src/routes/auth.ts index 3c4aa4bb..fbe9f137 100644 --- a/packages/backend/src/routes/auth.ts +++ b/packages/backend/src/routes/auth.ts @@ -1,50 +1,50 @@ import { Router } from 'express'; import { SiweMessage } from 'siwe'; import { Service } from '../service'; -import { authenticateUser, createUser } from '../turnkey-backend'; +// import { authenticateUser, createUser } from '../turnkey-backend'; const router = Router(); // // Turnkey // -router.get('/registration/:email', async (req, res) => { - const service: Service = req.app.get('service'); - const user = await service.getUserByEmail(req.params.email); - if (user) { - return res.send({ subOrganizationId: user?.subOrgId }); - } else { - return res.sendStatus(204); - } -}); +// router.get('/registration/:email', async (req, res) => { +// const service: Service = req.app.get('service'); +// const user = await service.getUserByEmail(req.params.email); +// if (user) { +// return res.send({ subOrganizationId: user?.subOrgId }); +// } else { +// return res.sendStatus(204); +// } +// }); -router.post('/register', async (req, res) => { - console.log('Register', req.body); - const { email, challenge, attestation } = req.body; - const user = await createUser(req.app.get('service'), { - challenge, - attestation, - userEmail: email, - userName: email.split('@')[0], - }); - req.session.address = user.id; - res.sendStatus(200); -}); +// router.post('/register', async (req, res) => { +// console.log('Register', req.body); +// const { email, challenge, attestation } = req.body; +// const user = await createUser(req.app.get('service'), { +// challenge, +// attestation, +// userEmail: email, +// userName: email.split('@')[0], +// }); +// req.session.address = user.id; +// res.sendStatus(200); +// }); -router.post('/authenticate', async (req, res) => { - console.log('Authenticate', req.body); - const { signedWhoamiRequest } = req.body; - const user = await authenticateUser( - req.app.get('service'), - signedWhoamiRequest, - ); - if (user) { - req.session.address = user.id; - res.sendStatus(200); - } else { - res.sendStatus(401); - } -}); +// router.post('/authenticate', async (req, res) => { +// console.log('Authenticate', req.body); +// const { signedWhoamiRequest } = req.body; +// const user = await authenticateUser( +// req.app.get('service'), +// signedWhoamiRequest, +// ); +// if (user) { +// req.session.address = user.id; +// res.sendStatus(200); +// } else { +// res.sendStatus(401); +// } +// }); // // SIWE Auth diff --git a/packages/backend/src/turnkey-backend.ts b/packages/backend/src/turnkey-backend.ts deleted file mode 100644 index 541f76ff..00000000 --- a/packages/backend/src/turnkey-backend.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { Turnkey, TurnkeyApiTypes } from '@turnkey/sdk-server'; - -// Default path for the first Ethereum address in a new HD wallet. -// See https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki, paths are in the form: -// m / purpose' / coin_type' / account' / change / address_index -// - Purpose is a constant set to 44' following the BIP43 recommendation. -// - Coin type is set to 60 (ETH) -- see https://github.com/satoshilabs/slips/blob/master/slip-0044.md -// - Account, Change, and Address Index are set to 0 -import { DEFAULT_ETHEREUM_ACCOUNTS } from '@turnkey/sdk-server'; -import { getConfig } from './utils'; -import { Service } from './service'; - -type TAttestation = TurnkeyApiTypes['v1Attestation']; - -type CreateUserParams = { - userName: string; - userEmail: string; - challenge: string; - attestation: TAttestation; -}; - -export async function createUser( - service: Service, - { userName, userEmail, challenge, attestation }: CreateUserParams, -) { - try { - if (await service.getUserByEmail(userEmail)) { - throw new Error(`User already exists: ${userEmail}`); - } - - const config = await getConfig(); - const turnkey = new Turnkey(config.turnkey); - - const apiClient = turnkey.api(); - - const walletName = `Default ETH Wallet`; - - const createSubOrgResponse = await apiClient.createSubOrganization({ - subOrganizationName: `Default SubOrg for ${userEmail}`, - rootQuorumThreshold: 1, - rootUsers: [ - { - userName, - userEmail, - apiKeys: [], - authenticators: [ - { - authenticatorName: 'Passkey', - challenge, - attestation, - }, - ], - }, - ], - wallet: { - walletName: walletName, - accounts: DEFAULT_ETHEREUM_ACCOUNTS, - }, - }); - - const subOrgId = refineNonNull(createSubOrgResponse.subOrganizationId); - const wallet = refineNonNull(createSubOrgResponse.wallet); - - const result = { - id: wallet.walletId, - address: wallet.addresses[0], - subOrgId: subOrgId, - }; - console.log('Turnkey success', result); - - const user = await service.createUser({ - name: userName, - email: userEmail, - subOrgId, - ethAddress: wallet.addresses[0], - turnkeyWalletId: wallet.walletId, - }); - console.log('New user', user); - - return user; - } catch (e) { - console.error('Failed to create user:', e); - throw e; - } -} - -export async function authenticateUser( - service: Service, - signedWhoamiRequest: { - url: string; - body: any; - stamp: { - stampHeaderName: string; - stampHeaderValue: string; - }; - }, -) { - try { - const tkRes = await fetch(signedWhoamiRequest.url, { - method: 'POST', - body: signedWhoamiRequest.body, - headers: { - [signedWhoamiRequest.stamp.stampHeaderName]: - signedWhoamiRequest.stamp.stampHeaderValue, - }, - }); - console.log('AUTH RESULT', tkRes.status); - if (tkRes.status !== 200) { - console.log(await tkRes.text()); - return null; - } - const orgId = (await tkRes.json()).organizationId; - const user = await service.getUserBySubOrgId(orgId); - return user; - } catch (e) { - console.error('Failed to authenticate:', e); - throw e; - } -} - -function refineNonNull( - input: T | null | undefined, - errorMessage?: string, -): T { - if (input == null) { - throw new Error(errorMessage ?? `Unexpected ${JSON.stringify(input)}`); - } - - return input; -} -- 2.45.2 From a0e6add04de53791cf9e5fe115c57fbb25b5de9c Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Mon, 28 Oct 2024 10:53:18 +0530 Subject: [PATCH 20/27] Update stop watch for deployment status --- packages/frontend/src/components/StopWatch.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/components/StopWatch.tsx b/packages/frontend/src/components/StopWatch.tsx index fb512e24..d5c7d63d 100644 --- a/packages/frontend/src/components/StopWatch.tsx +++ b/packages/frontend/src/components/StopWatch.tsx @@ -17,7 +17,7 @@ interface StopwatchProps extends Omit { } const Stopwatch = ({ offsetTimestamp, isPaused, ...props }: StopwatchProps) => { - const { totalSeconds, pause } = useStopwatch({ + const { totalSeconds, pause, start } = useStopwatch({ autoStart: true, offsetTimestamp: offsetTimestamp, }); @@ -25,6 +25,8 @@ const Stopwatch = ({ offsetTimestamp, isPaused, ...props }: StopwatchProps) => { useEffect(() => { if (isPaused) { pause(); + } else { + start(); } }, [isPaused]); -- 2.45.2 From c62ea68669bfb04fd95005f5b884f853e7521383 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Mon, 28 Oct 2024 11:24:53 +0530 Subject: [PATCH 21/27] Set payment done to false if tx request fails --- .../frontend/src/components/projects/create/Configure.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index 375392b4..978399be 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -315,18 +315,22 @@ const Configure = () => { onDismiss: dismiss, }); + setIsPaymentDone(true); + return result.signature; } catch (error: any) { console.error('Error sending tokens', error); + toast({ id: 'error-sending-tokens', title: 'Error sending tokens', variant: 'error', onDismiss: dismiss, }); + + setIsPaymentDone(false); } finally { setIsPaymentLoading(false); - setIsPaymentDone(true); } }, [session, signClient, toast], @@ -490,7 +494,7 @@ const Configure = () => { > {!isPaymentDone ? isPaymentLoading - ? 'Paying' + ? 'Transaction Requested' : 'Pay and Deploy' : isLoading ? 'Deploying repo' -- 2.45.2 From e86e1d9eb9405047dc14b4d664a2c72a2b328e92 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Mon, 28 Oct 2024 11:37:09 +0530 Subject: [PATCH 22/27] Update build logs UI --- packages/backend/src/registry.ts | 2 +- .../projects/project/deployments/DeploymentDetailsCard.tsx | 4 ++-- packages/gql-client/src/client.ts | 5 ----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/backend/src/registry.ts b/packages/backend/src/registry.ts index b962a653..a7f5441f 100644 --- a/packages/backend/src/registry.ts +++ b/packages/backend/src/registry.ts @@ -490,7 +490,7 @@ export class Registry { this.registry.sendCoins( { amount, - denom: 'tlnt', + denom: 'alnt', destinationAddress: receiverAddress }, this.registryConfig.privateKey, diff --git a/packages/frontend/src/components/projects/project/deployments/DeploymentDetailsCard.tsx b/packages/frontend/src/components/projects/project/deployments/DeploymentDetailsCard.tsx index 5dbabfee..bbf31076 100644 --- a/packages/frontend/src/components/projects/project/deployments/DeploymentDetailsCard.tsx +++ b/packages/frontend/src/components/projects/project/deployments/DeploymentDetailsCard.tsx @@ -93,20 +93,20 @@ const DeploymentDetailsCard = ({ }; const fetchDeploymentLogs = async () => { + setDeploymentLogs('Loading logs...'); + handleOpenDialog(); const statusUrl = `${deployment.deployer.deployerApiUrl}/${deployment.applicationDeploymentRequestId}`; const statusRes = await fetch(statusUrl, { cache: 'no-store' }).then( (res) => res.json(), ); if (!statusRes.logAvailable) { setDeploymentLogs(statusRes.lastState); - handleOpenDialog(); } else { const logsUrl = `${deployment.deployer.deployerApiUrl}/log/${deployment.applicationDeploymentRequestId}`; const logsRes = await fetch(logsUrl, { cache: 'no-store' }).then((res) => res.text(), ); setDeploymentLogs(logsRes); - handleOpenDialog(); } }; diff --git a/packages/gql-client/src/client.ts b/packages/gql-client/src/client.ts index adfa6ada..201f9fcb 100644 --- a/packages/gql-client/src/client.ts +++ b/packages/gql-client/src/client.ts @@ -442,11 +442,6 @@ export class GQLClient { } async verifyTx(txHash: string, amount: string, senderAddress: string): Promise { - console.log('Verifying Transaction with parameters:', { - txHash, - amount, - senderAddress - }); const { data: verifyTx } = await this.client.query({ query: queries.verifyTx, variables: { -- 2.45.2 From e1f5fbab3c7d4dc7bfffc034d055607c610c78df Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Mon, 28 Oct 2024 11:43:21 +0530 Subject: [PATCH 23/27] Update back-end auth files --- packages/backend/src/config.ts | 6 ++ packages/backend/src/routes/auth.ts | 72 ++++++------- packages/backend/src/turnkey-backend.ts | 130 ++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 36 deletions(-) create mode 100644 packages/backend/src/turnkey-backend.ts diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts index cb4f5b7d..a524446c 100644 --- a/packages/backend/src/config.ts +++ b/packages/backend/src/config.ts @@ -57,4 +57,10 @@ export interface Config { gitHub: GitHubConfig; registryConfig: RegistryConfig; auction: AuctionConfig; + turnkey: { + apiBaseUrl: string; + apiPublicKey: string; + apiPrivateKey: string; + defaultOrganizationId: string; + }; } diff --git a/packages/backend/src/routes/auth.ts b/packages/backend/src/routes/auth.ts index fbe9f137..3c4aa4bb 100644 --- a/packages/backend/src/routes/auth.ts +++ b/packages/backend/src/routes/auth.ts @@ -1,50 +1,50 @@ import { Router } from 'express'; import { SiweMessage } from 'siwe'; import { Service } from '../service'; -// import { authenticateUser, createUser } from '../turnkey-backend'; +import { authenticateUser, createUser } from '../turnkey-backend'; const router = Router(); // // Turnkey // -// router.get('/registration/:email', async (req, res) => { -// const service: Service = req.app.get('service'); -// const user = await service.getUserByEmail(req.params.email); -// if (user) { -// return res.send({ subOrganizationId: user?.subOrgId }); -// } else { -// return res.sendStatus(204); -// } -// }); +router.get('/registration/:email', async (req, res) => { + const service: Service = req.app.get('service'); + const user = await service.getUserByEmail(req.params.email); + if (user) { + return res.send({ subOrganizationId: user?.subOrgId }); + } else { + return res.sendStatus(204); + } +}); -// router.post('/register', async (req, res) => { -// console.log('Register', req.body); -// const { email, challenge, attestation } = req.body; -// const user = await createUser(req.app.get('service'), { -// challenge, -// attestation, -// userEmail: email, -// userName: email.split('@')[0], -// }); -// req.session.address = user.id; -// res.sendStatus(200); -// }); +router.post('/register', async (req, res) => { + console.log('Register', req.body); + const { email, challenge, attestation } = req.body; + const user = await createUser(req.app.get('service'), { + challenge, + attestation, + userEmail: email, + userName: email.split('@')[0], + }); + req.session.address = user.id; + res.sendStatus(200); +}); -// router.post('/authenticate', async (req, res) => { -// console.log('Authenticate', req.body); -// const { signedWhoamiRequest } = req.body; -// const user = await authenticateUser( -// req.app.get('service'), -// signedWhoamiRequest, -// ); -// if (user) { -// req.session.address = user.id; -// res.sendStatus(200); -// } else { -// res.sendStatus(401); -// } -// }); +router.post('/authenticate', async (req, res) => { + console.log('Authenticate', req.body); + const { signedWhoamiRequest } = req.body; + const user = await authenticateUser( + req.app.get('service'), + signedWhoamiRequest, + ); + if (user) { + req.session.address = user.id; + res.sendStatus(200); + } else { + res.sendStatus(401); + } +}); // // SIWE Auth diff --git a/packages/backend/src/turnkey-backend.ts b/packages/backend/src/turnkey-backend.ts new file mode 100644 index 00000000..541f76ff --- /dev/null +++ b/packages/backend/src/turnkey-backend.ts @@ -0,0 +1,130 @@ +import { Turnkey, TurnkeyApiTypes } from '@turnkey/sdk-server'; + +// Default path for the first Ethereum address in a new HD wallet. +// See https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki, paths are in the form: +// m / purpose' / coin_type' / account' / change / address_index +// - Purpose is a constant set to 44' following the BIP43 recommendation. +// - Coin type is set to 60 (ETH) -- see https://github.com/satoshilabs/slips/blob/master/slip-0044.md +// - Account, Change, and Address Index are set to 0 +import { DEFAULT_ETHEREUM_ACCOUNTS } from '@turnkey/sdk-server'; +import { getConfig } from './utils'; +import { Service } from './service'; + +type TAttestation = TurnkeyApiTypes['v1Attestation']; + +type CreateUserParams = { + userName: string; + userEmail: string; + challenge: string; + attestation: TAttestation; +}; + +export async function createUser( + service: Service, + { userName, userEmail, challenge, attestation }: CreateUserParams, +) { + try { + if (await service.getUserByEmail(userEmail)) { + throw new Error(`User already exists: ${userEmail}`); + } + + const config = await getConfig(); + const turnkey = new Turnkey(config.turnkey); + + const apiClient = turnkey.api(); + + const walletName = `Default ETH Wallet`; + + const createSubOrgResponse = await apiClient.createSubOrganization({ + subOrganizationName: `Default SubOrg for ${userEmail}`, + rootQuorumThreshold: 1, + rootUsers: [ + { + userName, + userEmail, + apiKeys: [], + authenticators: [ + { + authenticatorName: 'Passkey', + challenge, + attestation, + }, + ], + }, + ], + wallet: { + walletName: walletName, + accounts: DEFAULT_ETHEREUM_ACCOUNTS, + }, + }); + + const subOrgId = refineNonNull(createSubOrgResponse.subOrganizationId); + const wallet = refineNonNull(createSubOrgResponse.wallet); + + const result = { + id: wallet.walletId, + address: wallet.addresses[0], + subOrgId: subOrgId, + }; + console.log('Turnkey success', result); + + const user = await service.createUser({ + name: userName, + email: userEmail, + subOrgId, + ethAddress: wallet.addresses[0], + turnkeyWalletId: wallet.walletId, + }); + console.log('New user', user); + + return user; + } catch (e) { + console.error('Failed to create user:', e); + throw e; + } +} + +export async function authenticateUser( + service: Service, + signedWhoamiRequest: { + url: string; + body: any; + stamp: { + stampHeaderName: string; + stampHeaderValue: string; + }; + }, +) { + try { + const tkRes = await fetch(signedWhoamiRequest.url, { + method: 'POST', + body: signedWhoamiRequest.body, + headers: { + [signedWhoamiRequest.stamp.stampHeaderName]: + signedWhoamiRequest.stamp.stampHeaderValue, + }, + }); + console.log('AUTH RESULT', tkRes.status); + if (tkRes.status !== 200) { + console.log(await tkRes.text()); + return null; + } + const orgId = (await tkRes.json()).organizationId; + const user = await service.getUserBySubOrgId(orgId); + return user; + } catch (e) { + console.error('Failed to authenticate:', e); + throw e; + } +} + +function refineNonNull( + input: T | null | undefined, + errorMessage?: string, +): T { + if (input == null) { + throw new Error(errorMessage ?? `Unexpected ${JSON.stringify(input)}`); + } + + return input; +} -- 2.45.2 From ea3dbc004c78f34734ef7599617c3233015e8f45 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Mon, 28 Oct 2024 12:00:30 +0530 Subject: [PATCH 24/27] Store address without chainId in DB --- .../components/projects/create/Configure.tsx | 24 ++++++++++++------- .../projects/create/ConnectWallet.tsx | 2 +- .../frontend/src/pages/components/modals.tsx | 2 +- .../frontend/src/stories/MockStoriesData.ts | 4 ++-- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index 978399be..9a5e1501 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -157,7 +157,7 @@ const Configure = () => { const verifyTx = async ( senderAddress: string, txHash: string, - amount: string + amount: string, ): Promise => { const isValid = await client.verifyTx( txHash, @@ -176,7 +176,9 @@ const Configure = () => { const senderAddress = selectedAccount; const deployerLrn = createFormData.lrn; - const deployer = deployers.find(deployer => deployer.deployerLrn === deployerLrn); + const deployer = deployers.find( + (deployer) => deployer.deployerLrn === deployerLrn, + ); let amount: string; let txHash: string; @@ -193,10 +195,12 @@ const Configure = () => { if (createFormData.option === 'LRN') { amount = deployer?.minimumPayment!; } else { - amount = (createFormData.numProviders * createFormData.maxPrice).toString(); + amount = ( + createFormData.numProviders * createFormData.maxPrice + ).toString(); } - const amountToBePaid = (amount.replace(/\D/g, '')).toString(); + const amountToBePaid = amount.replace(/\D/g, '').toString(); const txHashResponse = await cosmosSendTokensHandler( selectedAccount, @@ -210,9 +214,13 @@ const Configure = () => { txHash = txHashResponse; - const isTxHashValid = verifyTx(senderAddress, txHash, amount.toString()); + const isTxHashValid = verifyTx( + senderAddress, + txHash, + amount.toString(), + ); if (!isTxHashValid) { - console.error("Invalid Tx hash", txHash) + console.error('Invalid Tx hash', txHash); return; } } @@ -232,7 +240,7 @@ const Configure = () => { const projectId = await createProject( createFormData, environmentVariables, - senderAddress, + senderAddress.split(':')[2], txHash, ); @@ -411,7 +419,7 @@ const Configure = () => { key={deployer.deployerLrn} value={deployer.deployerLrn} > - {deployer.deployerLrn} {deployer.minimumPayment} + {`${deployer.deployerLrn} ${deployer.minimumPayment ? `(${deployer.minimumPayment})` : ''}`} ))} diff --git a/packages/frontend/src/components/projects/create/ConnectWallet.tsx b/packages/frontend/src/components/projects/create/ConnectWallet.tsx index c1e57f13..fffa82eb 100644 --- a/packages/frontend/src/components/projects/create/ConnectWallet.tsx +++ b/packages/frontend/src/components/projects/create/ConnectWallet.tsx @@ -32,7 +32,7 @@ const ConnectWallet = ({ > {accounts.map((account, index) => ( ))} diff --git a/packages/frontend/src/pages/components/modals.tsx b/packages/frontend/src/pages/components/modals.tsx index 1044bd11..cf734d31 100644 --- a/packages/frontend/src/pages/components/modals.tsx +++ b/packages/frontend/src/pages/components/modals.tsx @@ -40,7 +40,7 @@ const deployment: Deployment = { deployerApiUrl: 'https://webapp-deployer-api.example.com', deployerId: 'bafyreicrtgmkir4evvvysxdqxddf2ftdq2wrzuodgvwnxr4rmubi4obdfu', deployerLrn: 'lrn://example/deployers/webapp-deployer-api.example.com', - minimumPayment: '1000alnt' + minimumPayment: '1000alnt', }, status: DeploymentStatus.Ready, createdBy: { diff --git a/packages/frontend/src/stories/MockStoriesData.ts b/packages/frontend/src/stories/MockStoriesData.ts index dd872fd1..d6dbb544 100644 --- a/packages/frontend/src/stories/MockStoriesData.ts +++ b/packages/frontend/src/stories/MockStoriesData.ts @@ -106,7 +106,7 @@ export const deployment0: Deployment = { deployerApiUrl: 'https://webapp-deployer-api.example.com', deployerId: 'bafyreicrtgmkir4evvvysxdqxddf2ftdq2wrzuodgvwnxr4rmubi4obdfu', deployerLrn: 'lrn://deployer.apps.snowballtools.com ', - minimumPayment: '1000alnt' + minimumPayment: '1000alnt', }, applicationDeploymentRequestId: 'bafyreiaycvq6imoppnpwdve4smj6t6ql5svt5zl3x6rimu4qwyzgjorize', @@ -133,7 +133,7 @@ export const project: Project = { deployerApiUrl: 'https://webapp-deployer-api.example.com', deployerId: 'bafyreicrtgmkir4evvvysxdqxddf2ftdq2wrzuodgvwnxr4rmubi4obdfu', deployerLrn: 'lrn://deployer.apps.snowballtools.com ', - minimumPayment: '1000alnt' + minimumPayment: '1000alnt', }, ], paymentAddress: '0x657868687686rb4787987br8497298r79284797487', -- 2.45.2 From b8c31df54f4edaab892d3de20a02097ee140f979 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Mon, 28 Oct 2024 12:22:13 +0530 Subject: [PATCH 25/27] Refactor out method to get account from private key --- packages/backend/src/registry.ts | 7 +++---- packages/backend/src/service.ts | 10 ++++++---- packages/frontend/src/components/StopWatch.tsx | 6 +----- .../src/components/projects/create/ConnectWallet.tsx | 2 +- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/packages/backend/src/registry.ts b/packages/backend/src/registry.ts index a7f5441f..9f3b314c 100644 --- a/packages/backend/src/registry.ts +++ b/packages/backend/src/registry.ts @@ -499,16 +499,15 @@ export class Registry { ); } - async getAddress(): Promise { + async getAccount(): Promise { const account = new Account(Buffer.from(this.registryConfig.privateKey, 'hex')); await account.init(); - return account.address; + return account; } async getTxResponse(txHash: string): Promise { - const account = new Account(Buffer.from(this.registryConfig.privateKey, 'hex')); - await account.init(); + const account = await this.getAccount(); const laconicClient = await this.registry.getLaconicClient(account); const txResponse: IndexedTx | null = await laconicClient.getTx(txHash); diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index 417e3cfb..e697b663 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -213,7 +213,7 @@ export class Service { const fundsReleased = await this.releaseDeployerFundsByProjectId(deployment.projectId); // Return remaining amount to owner - await this.returnCreatorFundsByProjectId(deployment.projectId, true); + await this.returnUserFundsByProjectId(deployment.projectId, true); await this.db.updateProjectById(deployment.projectId, { fundsReleased, @@ -314,7 +314,7 @@ export class Service { log(`No winning deployer for auction ${project!.auctionId}`); // Return all funds to the owner - await this.returnCreatorFundsByProjectId(project.id, false) + await this.returnUserFundsByProjectId(project.id, false) } else { const deployers = await this.saveDeployersByDeployerRecords(deployerRecords); for (const deployer of deployers) { @@ -1332,7 +1332,7 @@ export class Service { return false; } - async returnCreatorFundsByProjectId(projectId: string, winningDeployersPresent: boolean) { + async returnUserFundsByProjectId(projectId: string, winningDeployersPresent: boolean) { const project = await this.db.getProjectById(projectId); if (!project || !project.auctionId) { @@ -1405,7 +1405,9 @@ export class Service { } async getAddress(): Promise { - return this.laconicRegistry.getAddress(); + const account = await this.laconicRegistry.getAccount(); + + return account.address; } async verifyTx(txHash: string, amountSent: string, senderAddress: string): Promise { diff --git a/packages/frontend/src/components/StopWatch.tsx b/packages/frontend/src/components/StopWatch.tsx index d5c7d63d..34e7d97b 100644 --- a/packages/frontend/src/components/StopWatch.tsx +++ b/packages/frontend/src/components/StopWatch.tsx @@ -23,11 +23,7 @@ const Stopwatch = ({ offsetTimestamp, isPaused, ...props }: StopwatchProps) => { }); useEffect(() => { - if (isPaused) { - pause(); - } else { - start(); - } + isPaused ? pause() : start(); }, [isPaused]); return ; diff --git a/packages/frontend/src/components/projects/create/ConnectWallet.tsx b/packages/frontend/src/components/projects/create/ConnectWallet.tsx index fffa82eb..40dc2d81 100644 --- a/packages/frontend/src/components/projects/create/ConnectWallet.tsx +++ b/packages/frontend/src/components/projects/create/ConnectWallet.tsx @@ -32,7 +32,7 @@ const ConnectWallet = ({ > {accounts.map((account, index) => ( ))} -- 2.45.2 From 0ee8ed651c613c0298988c7adb8b1fece33f3875 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Mon, 28 Oct 2024 14:34:30 +0530 Subject: [PATCH 26/27] Add laconicd chain ID env variable in deploy-frontend script --- build-webapp.sh | 1 + packages/deployer/deploy-frontend.sh | 1 + packages/deployer/deploy-frontend.staging.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/build-webapp.sh b/build-webapp.sh index 4f411db9..9608dbf2 100755 --- a/build-webapp.sh +++ b/build-webapp.sh @@ -15,6 +15,7 @@ VITE_GITHUB_CLIENT_ID = 'LACONIC_HOSTED_CONFIG_github_clientid' VITE_GITHUB_PWA_TEMPLATE_REPO = 'LACONIC_HOSTED_CONFIG_github_pwa_templaterepo' VITE_GITHUB_IMAGE_UPLOAD_PWA_TEMPLATE_REPO = 'LACONIC_HOSTED_CONFIG_github_image_upload_templaterepo' VITE_WALLET_CONNECT_ID = 'LACONIC_HOSTED_CONFIG_wallet_connect_id' +VITE_LACONICD_CHAIN_ID = 'LACONIC_HOSTED_CONFIG_laconicd_chain_id' VITE_LIT_RELAY_API_KEY = 'LACONIC_HOSTED_CONFIG_lit_relay_api_key' VITE_BUGSNAG_API_KEY = 'LACONIC_HOSTED_CONFIG_bugsnag_api_key' VITE_PASSKEY_WALLET_RPID = 'LACONIC_HOSTED_CONFIG_passkey_wallet_rpid' diff --git a/packages/deployer/deploy-frontend.sh b/packages/deployer/deploy-frontend.sh index 4af80bf1..b210d8bd 100755 --- a/packages/deployer/deploy-frontend.sh +++ b/packages/deployer/deploy-frontend.sh @@ -127,6 +127,7 @@ record: LACONIC_HOSTED_CONFIG_github_pwa_templaterepo: laconic-templates/test-progressive-web-app LACONIC_HOSTED_CONFIG_github_image_upload_templaterepo: laconic-templates/image-upload-pwa-example LACONIC_HOSTED_CONFIG_wallet_connect_id: 63cad7ba97391f63652161f484670e15 + LACONIC_HOSTED_CONFIG_laconicd_chain_id: laconic-testnet-2 meta: note: Added by Snowball @ $CURRENT_DATE_TIME repository: "$REPO_URL" diff --git a/packages/deployer/deploy-frontend.staging.sh b/packages/deployer/deploy-frontend.staging.sh index 2672ddbd..09ebb820 100755 --- a/packages/deployer/deploy-frontend.staging.sh +++ b/packages/deployer/deploy-frontend.staging.sh @@ -41,6 +41,7 @@ record: LACONIC_HOSTED_CONFIG_github_pwa_templaterepo: snowball-tools/test-progressive-web-app LACONIC_HOSTED_CONFIG_github_image_upload_templaterepo: snowball-tools/image-upload-pwa-example LACONIC_HOSTED_CONFIG_wallet_connect_id: eda9ba18042a5ea500f358194611ece2 + LACONIC_HOSTED_CONFIG_laconicd_chain_id: laconic-testnet-2 LACONIC_HOSTED_CONFIG_lit_relay_api_key: 15DDD969-E75F-404D-AAD9-58A37C4FD354_snowball LACONIC_HOSTED_CONFIG_aplchemy_api_key: THvPart_gqI5x02RNYSBntlmwA66I_qc LACONIC_HOSTED_CONFIG_bugsnag_api_key: 8c480cd5386079f9dd44f9581264a073 -- 2.45.2 From cf09fa412f93cdc0ef9b64e1794813ba8411aa9a Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Mon, 28 Oct 2024 14:48:38 +0530 Subject: [PATCH 27/27] Display wallet connect only when payment is required --- .../components/projects/create/Configure.tsx | 72 ++++++++++++++----- .../projects/create/ConnectWallet.tsx | 1 + .../src/context/WalletConnectContext.tsx | 4 +- packages/frontend/src/utils/web3modal.ts | 5 +- 4 files changed, 59 insertions(+), 23 deletions(-) diff --git a/packages/frontend/src/components/projects/create/Configure.tsx b/packages/frontend/src/components/projects/create/Configure.tsx index 9a5e1501..711b448b 100644 --- a/packages/frontend/src/components/projects/create/Configure.tsx +++ b/packages/frontend/src/components/projects/create/Configure.tsx @@ -35,12 +35,15 @@ type ConfigureDeploymentFormValues = { type ConfigureFormValues = ConfigureDeploymentFormValues & EnvironmentVariablesFormValues; +const DEFAULT_MAX_PRICE = '10000'; + const Configure = () => { const { signClient, session, accounts } = useWalletConnectClient(); const [isLoading, setIsLoading] = useState(false); const [deployers, setDeployers] = useState([]); const [selectedAccount, setSelectedAccount] = useState(); + const [selectedDeployer, setSelectedDeployer] = useState(); const [isPaymentLoading, setIsPaymentLoading] = useState(false); const [isPaymentDone, setIsPaymentDone] = useState(false); @@ -64,9 +67,9 @@ const Configure = () => { const methods = useForm({ defaultValues: { option: 'Auction', - maxPrice: '0', + maxPrice: DEFAULT_MAX_PRICE, lrn: '', - numProviders: 0, + numProviders: 1, }, }); @@ -214,12 +217,12 @@ const Configure = () => { txHash = txHashResponse; - const isTxHashValid = verifyTx( + const isTxHashValid = await verifyTx( senderAddress, txHash, amount.toString(), ); - if (!isTxHashValid) { + if (isTxHashValid === false) { console.error('Invalid Tx hash', txHash); return; } @@ -276,6 +279,11 @@ const Configure = () => { setSelectedAccount(account); }, []); + const onDeployerChange = useCallback((selectedLrn: string) => { + const deployer = deployers.find((d) => d.deployerLrn === selectedLrn); + setSelectedDeployer(deployer); + }, [deployers]); + const cosmosSendTokensHandler = useCallback( async (selectedAccount: string, amount: string) => { if (!signClient || !session || !selectedAccount) { @@ -410,7 +418,10 @@ const Configure = () => {