{"path":"lib/sdk/src/pda.ts","size":669,"locked":false,"binary":false,"truncated":false,"content":"import { PublicKey } from \"@solana/web3.js\";\nimport { MAPPERS_PROGRAM_ID, PDA_SEEDS } from \"./constants.js\";\n\nexport function deriveEscrowPda(\n  client: PublicKey,\n  jobId: string,\n  programId: PublicKey = MAPPERS_PROGRAM_ID\n): [PublicKey, number] {\n  return PublicKey.findProgramAddressSync(\n    [Buffer.from(PDA_SEEDS.ESCROW), client.toBuffer(), Buffer.from(jobId)],\n    programId\n  );\n}\n\nexport function deriveVaultPda(\n  client: PublicKey,\n  jobId: string,\n  programId: PublicKey = MAPPERS_PROGRAM_ID\n): [PublicKey, number] {\n  return PublicKey.findProgramAddressSync(\n    [Buffer.from(PDA_SEEDS.VAULT), client.toBuffer(), Buffer.from(jobId)],\n    programId\n  );\n}\n"}