|
1 | 1 | import { createHash } from 'node:crypto'; |
2 | 2 |
|
3 | 3 | const PRIVY_API_BASE = 'https://api.privy.io'; |
4 | | -const AGW_MCP_SIGNER_LABEL_PREFIX = 'AGW MCP'; |
| 4 | +const SIGNER_LABEL_PREFIX = 'AGW CLI'; |
5 | 5 |
|
6 | 6 | export interface PrivyAdminConfig { |
7 | 7 | appId: string; |
@@ -173,7 +173,7 @@ function normalizeKeyQuorumRecord(value: Record<string, unknown>): PrivyKeyQuoru |
173 | 173 | const id = typeof value.id === 'string' ? value.id : ''; |
174 | 174 | const displayName = typeof value.display_name === 'string' && value.display_name.trim() |
175 | 175 | ? value.display_name.trim() |
176 | | - : `${AGW_MCP_SIGNER_LABEL_PREFIX} signer`; |
| 176 | + : `${SIGNER_LABEL_PREFIX} signer`; |
177 | 177 | const publicKeys = Array.isArray(value.authorization_keys) |
178 | 178 | ? value.authorization_keys.flatMap(entry => { |
179 | 179 | if (!entry || typeof entry !== 'object') { |
@@ -202,7 +202,7 @@ export function computeSignerFingerprint(publicKeyBase64: string): string { |
202 | 202 | } |
203 | 203 |
|
204 | 204 | export function buildSignerLabel(fingerprint: string): string { |
205 | | - return `${AGW_MCP_SIGNER_LABEL_PREFIX} ${fingerprint}`; |
| 205 | + return `${SIGNER_LABEL_PREFIX} ${fingerprint}`; |
206 | 206 | } |
207 | 207 |
|
208 | 208 | export async function findWalletByAddress(address: string): Promise<PrivyWalletRecord> { |
@@ -288,7 +288,7 @@ export async function listExistingAgwMcpSigners(wallet: PrivyWalletRecord) { |
288 | 288 | wallet.additionalSigners.map(async signer => { |
289 | 289 | try { |
290 | 290 | const keyQuorum = await getKeyQuorumById(signer.signerId); |
291 | | - if (!keyQuorum.displayName.startsWith(AGW_MCP_SIGNER_LABEL_PREFIX)) { |
| 291 | + if (!keyQuorum.displayName.startsWith(SIGNER_LABEL_PREFIX)) { |
292 | 292 | return null; |
293 | 293 | } |
294 | 294 | return { |
|
0 commit comments