@oobe-protocol-labs/synapse-sap-sdk 0.9.1 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,7 +38,7 @@
38
38
  */
39
39
  import { PublicKey, type TransactionInstruction } from "@solana/web3.js";
40
40
  import type { SapProgram } from "../modules/base";
41
- import type { AgentAccountData, AgentStatsData } from "../types";
41
+ import type { AgentAccountData, AgentStatsData, Capability } from "../types";
42
42
  /**
43
43
  * @interface Eip8004Service
44
44
  * @description One service entry in an EIP-8004 registration document.
@@ -132,6 +132,181 @@ export interface UnifiedProfile {
132
132
  readonly mpl: MplAgentSnapshot | null;
133
133
  readonly linked: boolean;
134
134
  }
135
+ /**
136
+ * @interface AgentIdentifierResolution
137
+ * @description Resolution result for an agent identifier that may be either
138
+ * an SAP owner wallet or an MPL Core asset address.
139
+ *
140
+ * - `kind = "wallet"`: input is treated as owner wallet.
141
+ * - `kind = "core-asset"`: input is an MPL Core asset; `wallet` is asset owner.
142
+ * - `kind = "unknown"`: input is invalid or cannot be resolved.
143
+ *
144
+ * @category Registries
145
+ * @since v0.9.2
146
+ */
147
+ export interface AgentIdentifierResolution {
148
+ readonly input: string;
149
+ readonly kind: "wallet" | "core-asset" | "unknown";
150
+ readonly wallet: PublicKey | null;
151
+ readonly sapAgentPda: PublicKey | null;
152
+ readonly asset: PublicKey | null;
153
+ readonly hasSapAgent: boolean;
154
+ readonly error: string | null;
155
+ }
156
+ /**
157
+ * @interface RegisterAgentInput
158
+ * @description Minimal input set the bridge needs to construct a SAP
159
+ * `registerAgent` instruction. Exposed independently so the bridge does not
160
+ * import `RegisterAgentArgs` from another module (keeping the public surface flat).
161
+ *
162
+ * @category Registries
163
+ * @since v0.9.3
164
+ */
165
+ export interface RegisterAgentInput {
166
+ readonly name: string;
167
+ readonly description: string;
168
+ readonly capabilities: readonly Capability[];
169
+ readonly pricing: unknown;
170
+ readonly protocols: readonly number[];
171
+ readonly agentId?: string | null;
172
+ readonly agentUri?: string | null;
173
+ readonly x402Endpoint?: string | null;
174
+ }
175
+ /**
176
+ * @interface MintAttachOpts
177
+ * @description Inputs for {@link MetaplexBridge.buildMintAndAttachIxs}.
178
+ * Builds: MPL Core `create` (mint a fresh asset) + `addExternalPluginAdapterV1`
179
+ * (attach AgentIdentity → SAP EIP-8004 URL) — produced as two web3.js
180
+ * instructions in deterministic order.
181
+ *
182
+ * The caller MUST sign with the returned `assetSigner` in addition to the
183
+ * wallet authority, since Core mint requires the asset keypair as a signer.
184
+ *
185
+ * @category Registries
186
+ * @since v0.9.3
187
+ */
188
+ export interface MintAttachOpts {
189
+ readonly sapAgentOwner: PublicKey;
190
+ readonly authority: PublicKey;
191
+ readonly payer?: PublicKey;
192
+ readonly owner?: PublicKey;
193
+ readonly name: string;
194
+ readonly metadataUri: string;
195
+ readonly registrationBaseUrl: string;
196
+ readonly rpcUrl: string;
197
+ readonly collection?: PublicKey;
198
+ }
199
+ /**
200
+ * @interface MintAttachResult
201
+ * @description Return shape of {@link MetaplexBridge.buildMintAndAttachIxs}
202
+ * and the mint half of {@link MetaplexBridge.buildRegisterBothIxs}.
203
+ *
204
+ * `assetSecretKey` is the freshly generated asset keypair's secret. The
205
+ * caller is responsible for safe handling: server-side flows should
206
+ * partial-sign the assembled transaction with it and then discard.
207
+ *
208
+ * @category Registries
209
+ * @since v0.9.3
210
+ */
211
+ export interface MintAttachResult {
212
+ readonly assetAddress: PublicKey;
213
+ readonly assetSecretKey: Uint8Array;
214
+ readonly registrationUrl: string;
215
+ readonly instructions: readonly TransactionInstruction[];
216
+ }
217
+ /**
218
+ * @interface SapForMplOpts
219
+ * @description Inputs for {@link MetaplexBridge.buildRegisterSapForMplOwnerIx}.
220
+ * Resolves the owner of `asset`, derives that owner's SAP PDA, and (if no
221
+ * agent exists yet) returns the `registerAgent` instruction the owner must sign.
222
+ *
223
+ * @category Registries
224
+ * @since v0.9.3
225
+ */
226
+ export interface SapForMplOpts {
227
+ readonly asset: PublicKey;
228
+ readonly registerArgs: RegisterAgentInput;
229
+ readonly rpcUrl: string;
230
+ }
231
+ /**
232
+ * @interface SapForMplResult
233
+ * @description Result of {@link MetaplexBridge.buildRegisterSapForMplOwnerIx}.
234
+ * `instruction` is `null` when the asset owner already has a SAP agent
235
+ * (idempotent: nothing to do).
236
+ *
237
+ * @category Registries
238
+ * @since v0.9.3
239
+ */
240
+ export interface SapForMplResult {
241
+ readonly assetOwner: PublicKey;
242
+ readonly sapAgentPda: PublicKey;
243
+ readonly alreadyRegistered: boolean;
244
+ readonly currentAgentIdentityUri: string | null;
245
+ readonly instruction: TransactionInstruction | null;
246
+ }
247
+ /**
248
+ * @interface RegisterBothOpts
249
+ * @description Inputs for {@link MetaplexBridge.buildRegisterBothIxs}.
250
+ * Builds the atomic SAP `registerAgent` + MPL Core `create` + `AgentIdentity`
251
+ * attach sequence for a wallet that owns neither side yet.
252
+ *
253
+ * @category Registries
254
+ * @since v0.9.3
255
+ */
256
+ export interface RegisterBothOpts {
257
+ readonly wallet: PublicKey;
258
+ readonly payer?: PublicKey;
259
+ readonly registerArgs: RegisterAgentInput;
260
+ readonly mintName: string;
261
+ readonly mintMetadataUri: string;
262
+ readonly registrationBaseUrl: string;
263
+ readonly rpcUrl: string;
264
+ readonly collection?: PublicKey;
265
+ }
266
+ /**
267
+ * @interface RegisterBothResult
268
+ * @description Result of {@link MetaplexBridge.buildRegisterBothIxs}.
269
+ * Instructions are ordered: `[0]` SAP `registerAgent`, `[1]` MPL Core mint,
270
+ * `[2]` MPL `AgentIdentity` attach. All three execute atomically inside one
271
+ * transaction signed by the wallet + `assetSecretKey`.
272
+ *
273
+ * @category Registries
274
+ * @since v0.9.3
275
+ */
276
+ export interface RegisterBothResult {
277
+ readonly sapAgentPda: PublicKey;
278
+ readonly assetAddress: PublicKey;
279
+ readonly assetSecretKey: Uint8Array;
280
+ readonly registrationUrl: string;
281
+ readonly instructions: readonly TransactionInstruction[];
282
+ }
283
+ /**
284
+ * @interface TripleCheckResult
285
+ * @description Result of {@link MetaplexBridge.tripleCheckLink} — the explicit
286
+ * 3-layer verification used by explorer/host badges.
287
+ *
288
+ * - `mplOnChain`: MPL Core asset fetched on-chain via mpl-core (gRPC/RPC).
289
+ * - `eip8004Json`: registration JSON fetched from `agentIdentityUri` and
290
+ * its `synapseAgent` matches the SAP PDA.
291
+ * - `sapOnChain`: a SAP `AgentAccount` exists on-chain at that PDA.
292
+ *
293
+ * `linked = true` only when **all three** layers pass.
294
+ *
295
+ * @category Registries
296
+ * @since v0.9.3
297
+ */
298
+ export interface TripleCheckResult {
299
+ readonly asset: PublicKey;
300
+ readonly sapAgentPda: PublicKey;
301
+ readonly mplOnChain: boolean;
302
+ readonly eip8004Json: boolean;
303
+ readonly sapOnChain: boolean;
304
+ readonly linked: boolean;
305
+ readonly agentIdentityUri: string | null;
306
+ readonly registration: Eip8004Registration | null;
307
+ readonly identity: AgentAccountData | null;
308
+ readonly error: string | null;
309
+ }
135
310
  /**
136
311
  * @name MetaplexBridge
137
312
  * @description Read-side merger and write-side instruction composer for
@@ -186,6 +361,51 @@ export declare class MetaplexBridge {
186
361
  * @since v0.9.0
187
362
  */
188
363
  buildUpdateAgentIdentityUriIx(opts: UpdateAgentIdentityUriOpts): Promise<TransactionInstruction>;
364
+ /**
365
+ * @name buildMintAndAttachIxs
366
+ * @description Build the two MPL Core instructions needed to mint a new
367
+ * asset for an existing SAP agent and immediately bind it via the
368
+ * `AgentIdentity` plugin (URI = canonical EIP-8004 URL).
369
+ *
370
+ * Flow:
371
+ * 1. Generate a fresh asset keypair (returned as `assetSecretKey`).
372
+ * 2. Build `mpl_core::create` with the new asset as signer.
373
+ * 3. Build `addExternalPluginAdapterV1` for the AgentIdentity URI.
374
+ *
375
+ * The returned `instructions` are deterministic order. The caller
376
+ * partial-signs the assembled transaction with `assetSecretKey` and the
377
+ * authority/payer wallet.
378
+ *
379
+ * @since v0.9.3
380
+ */
381
+ buildMintAndAttachIxs(opts: MintAttachOpts): Promise<MintAttachResult>;
382
+ /**
383
+ * @name buildRegisterSapForMplOwnerIx
384
+ * @description Given an existing MPL Core asset, resolve its on-chain
385
+ * owner and build the SAP `registerAgent` instruction the owner must
386
+ * sign. Idempotent: if a SAP agent already exists for that owner the
387
+ * method returns `instruction: null` with `alreadyRegistered: true`.
388
+ *
389
+ * Use after a wallet has minted (or holds) an MPL Core agent NFT and
390
+ * wants to back-fill a SAP identity at the canonical PDA so the bridge's
391
+ * EIP-8004 URL becomes resolvable.
392
+ *
393
+ * @since v0.9.3
394
+ */
395
+ buildRegisterSapForMplOwnerIx(opts: SapForMplOpts): Promise<SapForMplResult>;
396
+ /**
397
+ * @name buildRegisterBothIxs
398
+ * @description Atomic 3-instruction bundle for a wallet that owns
399
+ * neither side: `[SAP registerAgent, MPL Core create, MPL AgentIdentity attach]`.
400
+ * Single transaction, single user signature (plus the ephemeral asset
401
+ * keypair returned in `assetSecretKey`).
402
+ *
403
+ * Throws if a SAP agent already exists for `wallet` — callers should
404
+ * fall through to {@link MetaplexBridge.buildMintAndAttachIxs} instead.
405
+ *
406
+ * @since v0.9.3
407
+ */
408
+ buildRegisterBothIxs(opts: RegisterBothOpts): Promise<RegisterBothResult>;
189
409
  /**
190
410
  * @name getUnifiedProfile
191
411
  * @description Fetch a merged view of an agent across SAP and Metaplex.
@@ -197,7 +417,25 @@ export declare class MetaplexBridge {
197
417
  wallet?: PublicKey;
198
418
  asset?: PublicKey;
199
419
  rpcUrl: string;
420
+ rpcHeaders?: Record<string, string>;
200
421
  }): Promise<UnifiedProfile>;
422
+ /**
423
+ * @name resolveAgentIdentifier
424
+ * @description Resolve a generic agent identifier to canonical SAP routing
425
+ * keys. Useful when callers may receive either owner wallets or Metaplex
426
+ * Core asset IDs (e.g. metaplex.com/agents/<core-asset-id>).
427
+ *
428
+ * Resolution order:
429
+ * 1) Treat input as wallet and check if a SAP agent exists.
430
+ * 2) If not found, treat input as MPL Core asset and resolve owner wallet.
431
+ *
432
+ * @since v0.9.2
433
+ */
434
+ resolveAgentIdentifier(input: {
435
+ identifier: string;
436
+ rpcUrl: string;
437
+ rpcHeaders?: Record<string, string>;
438
+ }): Promise<AgentIdentifierResolution>;
201
439
  /**
202
440
  * @name verifyLink
203
441
  * @description Verify the bidirectional link between an MPL Core asset
@@ -210,15 +448,37 @@ export declare class MetaplexBridge {
210
448
  asset: PublicKey;
211
449
  sapAgentPda: PublicKey;
212
450
  rpcUrl: string;
451
+ rpcHeaders?: Record<string, string>;
213
452
  }): Promise<boolean>;
453
+ /**
454
+ * @name tripleCheckLink
455
+ * @description Explicit 3-layer verification for explorer/host badges.
456
+ * Returns one struct enumerating each check independently so UIs can
457
+ * present partial trust states (e.g. "MPL plugin present, JSON pending").
458
+ *
459
+ * Layers:
460
+ * 1. **mplOnChain** — Asset + AgentIdentity URI fetched on-chain.
461
+ * 2. **eip8004Json** — JSON fetched and `synapseAgent` matches PDA.
462
+ * 3. **sapOnChain** — `AgentAccount` PDA exists on the SAP program.
463
+ *
464
+ * @since v0.9.3
465
+ */
466
+ tripleCheckLink(args: {
467
+ asset: PublicKey;
468
+ expectedOwner?: PublicKey;
469
+ rpcUrl: string;
470
+ rpcHeaders?: Record<string, string>;
471
+ }): Promise<TripleCheckResult>;
214
472
  private get accounts();
215
473
  private fetchAgentNullable;
216
474
  private fetchStatsNullable;
217
475
  private fetchActiveVaultDelegates;
476
+ private buildUmi;
218
477
  private fetchMplSnapshot;
219
478
  private extractAgentIdentityUri;
220
479
  private fetchEip8004Safe;
221
480
  private buildAddExternalPluginIx;
481
+ private buildRegisterAgentIx;
222
482
  private firstWeb3Ix;
223
483
  private umiIxToWeb3;
224
484
  private detectLink;
@@ -1 +1 @@
1
- {"version":3,"file":"metaplex-bridge.d.ts","sourceRoot":"","sources":["../../../src/registries/metaplex-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EACL,SAAS,EACT,KAAK,sBAAsB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E;QAC1B,KAAK,EAAE,SAAS,CAAC;QACjB,aAAa,CAAC,EAAE,SAAS,CAAC;QAC1B,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACrC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAoD9B,OAAO,KAAK,QAAQ,GAEnB;YAEa,kBAAkB;YAUlB,kBAAkB;YAWlB,yBAAyB;YA2BzB,QAAQ;YAiBR,gBAAgB;IA2B9B,OAAO,CAAC,uBAAuB;YAQjB,gBAAgB;YAkChB,wBAAwB;YAuCxB,oBAAoB;YAmCpB,WAAW;IAYzB,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,gBAAgB;CAIzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oobe-protocol-labs/synapse-sap-sdk",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "description": "TypeScript SDK for the Synapse Agent Protocol (SAP v2) on Solana Mainnet/Devnet",
5
5
  "license": "MIT",
6
6
  "main": "dist/cjs/index.js",
package/src/index.ts CHANGED
@@ -400,6 +400,7 @@ export type {
400
400
  RegisterResult,
401
401
  RegisterWithToolsResult,
402
402
  UnifiedProfile,
403
+ AgentIdentifierResolution,
403
404
  MplAgentSnapshot,
404
405
  Eip8004Registration,
405
406
  Eip8004Service,
@@ -80,9 +80,18 @@ export type {
80
80
  export { MetaplexBridge } from "./metaplex-bridge";
81
81
  export type {
82
82
  UnifiedProfile,
83
+ AgentIdentifierResolution,
83
84
  MplAgentSnapshot,
84
85
  Eip8004Registration,
85
86
  Eip8004Service,
86
87
  AttachAgentIdentityOpts,
87
88
  UpdateAgentIdentityUriOpts,
89
+ RegisterAgentInput,
90
+ MintAttachOpts,
91
+ MintAttachResult,
92
+ SapForMplOpts,
93
+ SapForMplResult,
94
+ RegisterBothOpts,
95
+ RegisterBothResult,
96
+ TripleCheckResult,
88
97
  } from "./metaplex-bridge";