@oobe-protocol-labs/synapse-sap-sdk 0.7.0 → 0.9.1
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.
- package/dist/cjs/constants/seeds.js +2 -0
- package/dist/cjs/constants/seeds.js.map +1 -1
- package/dist/cjs/core/client.js +44 -0
- package/dist/cjs/core/client.js.map +1 -1
- package/dist/cjs/idl/synapse_agent_sap.json +1050 -629
- package/dist/cjs/index.js +8 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/modules/escrow-v2.js +17 -38
- package/dist/cjs/modules/escrow-v2.js.map +1 -1
- package/dist/cjs/modules/index.js +3 -1
- package/dist/cjs/modules/index.js.map +1 -1
- package/dist/cjs/modules/receipt.js +144 -0
- package/dist/cjs/modules/receipt.js.map +1 -0
- package/dist/cjs/pda/index.js +24 -1
- package/dist/cjs/pda/index.js.map +1 -1
- package/dist/cjs/registries/index.js +3 -1
- package/dist/cjs/registries/index.js.map +1 -1
- package/dist/cjs/registries/metaplex-bridge.js +446 -0
- package/dist/cjs/registries/metaplex-bridge.js.map +1 -0
- package/dist/cjs/types/enums.js +47 -2
- package/dist/cjs/types/enums.js.map +1 -1
- package/dist/cjs/types/index.js +3 -1
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/esm/constants/seeds.js +2 -0
- package/dist/esm/constants/seeds.js.map +1 -1
- package/dist/esm/core/client.js +44 -0
- package/dist/esm/core/client.js.map +1 -1
- package/dist/esm/idl/synapse_agent_sap.json +1050 -629
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/modules/escrow-v2.js +18 -39
- package/dist/esm/modules/escrow-v2.js.map +1 -1
- package/dist/esm/modules/index.js +1 -0
- package/dist/esm/modules/index.js.map +1 -1
- package/dist/esm/modules/receipt.js +140 -0
- package/dist/esm/modules/receipt.js.map +1 -0
- package/dist/esm/pda/index.js +22 -0
- package/dist/esm/pda/index.js.map +1 -1
- package/dist/esm/registries/index.js +1 -0
- package/dist/esm/registries/index.js.map +1 -1
- package/dist/esm/registries/metaplex-bridge.js +409 -0
- package/dist/esm/registries/metaplex-bridge.js.map +1 -0
- package/dist/esm/types/enums.js +46 -1
- package/dist/esm/types/enums.js.map +1 -1
- package/dist/esm/types/index.js +1 -1
- package/dist/esm/types/index.js.map +1 -1
- package/dist/types/constants/seeds.d.ts +2 -0
- package/dist/types/constants/seeds.d.ts.map +1 -1
- package/dist/types/core/client.d.ts +38 -0
- package/dist/types/core/client.d.ts.map +1 -1
- package/dist/types/index.d.ts +6 -6
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/escrow-v2.d.ts +13 -6
- package/dist/types/modules/escrow-v2.d.ts.map +1 -1
- package/dist/types/modules/index.d.ts +1 -0
- package/dist/types/modules/index.d.ts.map +1 -1
- package/dist/types/modules/receipt.d.ts +77 -0
- package/dist/types/modules/receipt.d.ts.map +1 -0
- package/dist/types/pda/index.d.ts +15 -0
- package/dist/types/pda/index.d.ts.map +1 -1
- package/dist/types/registries/index.d.ts +2 -0
- package/dist/types/registries/index.d.ts.map +1 -1
- package/dist/types/registries/metaplex-bridge.d.ts +228 -0
- package/dist/types/registries/metaplex-bridge.d.ts.map +1 -0
- package/dist/types/types/accounts.d.ts +46 -2
- package/dist/types/types/accounts.d.ts.map +1 -1
- package/dist/types/types/enums.d.ts +52 -1
- package/dist/types/types/enums.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +3 -3
- package/dist/types/types/index.d.ts.map +1 -1
- package/package.json +26 -6
- package/src/constants/seeds.ts +2 -0
- package/src/core/client.ts +46 -0
- package/src/idl/synapse_agent_sap.json +1050 -629
- package/src/index.ts +14 -0
- package/src/modules/escrow-v2.ts +21 -42
- package/src/modules/index.ts +1 -0
- package/src/modules/receipt.ts +207 -0
- package/src/pda/index.ts +32 -0
- package/src/registries/index.ts +10 -0
- package/src/registries/metaplex-bridge.ts +645 -0
- package/src/types/accounts.ts +51 -2
- package/src/types/enums.ts +55 -1
- package/src/types/index.ts +5 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
*/
|
|
46
46
|
export { SapClient, SapConnection, KeypairWallet } from "./core";
|
|
47
47
|
export type { SapCluster, SapConnectionConfig, SapWallet } from "./core";
|
|
48
|
-
export type { TokenTypeKind, PluginTypeKind, SettlementModeKind, ToolHttpMethodKind, ToolCategoryKind, DelegatePermissionBit, SchemaTypeValue, CompressionTypeValue, SettlementSecurityKind, DisputeOutcomeKind, BillingIntervalKind, Capability, VolumeCurveBreakpoint, PricingTier, PluginRef, Settlement, AgentAccountData, FeedbackAccountData, CapabilityIndexData, ProtocolIndexData, GlobalRegistryData, MemoryVaultData, SessionLedgerData, EpochPageData, VaultDelegateData, ToolDescriptorData, SessionCheckpointData, EscrowAccountData, AgentStatsData, ToolCategoryIndexData, AgentAttestationData, MemoryLedgerData, LedgerPageData, EscrowAccountV2Data, PendingSettlementData, DisputeRecordData, AgentStakeData, SubscriptionData, CounterShardData, IndexPageData, RegisterAgentArgs, UpdateAgentArgs, GiveFeedbackArgs, UpdateFeedbackArgs, PublishToolArgs, UpdateToolArgs, InscribeMemoryArgs, CompactInscribeArgs, CreateEscrowArgs, CreateAttestationArgs, InscribeToolSchemaArgs, CreateEscrowV2Args, CreateSubscriptionArgs, EndpointDescriptor, HealthCheckDescriptor, ToolManifestEntry, AgentManifest, EndpointValidationResult, } from "./types";
|
|
49
|
-
export { TokenType, PluginType, SettlementMode, ToolHttpMethod, ToolCategory, DelegatePermission, SchemaType, CompressionType, SettlementSecurity, DisputeOutcome, BillingInterval, } from "./types";
|
|
48
|
+
export type { TokenTypeKind, PluginTypeKind, SettlementModeKind, ToolHttpMethodKind, ToolCategoryKind, DelegatePermissionBit, SchemaTypeValue, CompressionTypeValue, SettlementSecurityKind, DisputeOutcomeKind, BillingIntervalKind, DisputeTypeValue, ResolutionLayerKind, Capability, VolumeCurveBreakpoint, PricingTier, PluginRef, Settlement, AgentAccountData, FeedbackAccountData, CapabilityIndexData, ProtocolIndexData, GlobalRegistryData, MemoryVaultData, SessionLedgerData, EpochPageData, VaultDelegateData, ToolDescriptorData, SessionCheckpointData, EscrowAccountData, AgentStatsData, ToolCategoryIndexData, AgentAttestationData, MemoryLedgerData, LedgerPageData, EscrowAccountV2Data, PendingSettlementData, DisputeRecordData, ReceiptBatchData, AgentStakeData, SubscriptionData, CounterShardData, IndexPageData, RegisterAgentArgs, UpdateAgentArgs, GiveFeedbackArgs, UpdateFeedbackArgs, PublishToolArgs, UpdateToolArgs, InscribeMemoryArgs, CompactInscribeArgs, CreateEscrowArgs, CreateAttestationArgs, InscribeToolSchemaArgs, CreateEscrowV2Args, CreateSubscriptionArgs, EndpointDescriptor, HealthCheckDescriptor, ToolManifestEntry, AgentManifest, EndpointValidationResult, } from "./types";
|
|
49
|
+
export { TokenType, PluginType, SettlementMode, ToolHttpMethod, ToolCategory, DelegatePermission, SchemaType, CompressionType, SettlementSecurity, DisputeOutcome, BillingInterval, DisputeType, ResolutionLayer, } from "./types";
|
|
50
50
|
export { SAP_PROGRAM_ADDRESS, SAP_PROGRAM_ID, MAINNET_SAP_PROGRAM_ID, DEVNET_SAP_PROGRAM_ID, LOCALNET_SAP_PROGRAM_ID, SEEDS, LIMITS, AGENT_VERSION, VAULT_PROTOCOL_VERSION, TOOL_CATEGORY_VALUES, HTTP_METHOD_VALUES, SapNetwork, } from "./constants";
|
|
51
51
|
export type { SapNetworkId } from "./constants";
|
|
52
52
|
export { SAP_IDL, IDL_PROGRAM_ADDRESS, IDL_METADATA } from "./idl/index";
|
|
53
53
|
export type { SynapseAgentSapIDL } from "./idl/index";
|
|
54
|
-
export { deriveGlobalRegistry, deriveAgent, deriveAgentStats, deriveFeedback, deriveCapabilityIndex, deriveProtocolIndex, deriveToolCategoryIndex, deriveVault, deriveSession, deriveEpochPage, deriveVaultDelegate, deriveCheckpoint, deriveTool, deriveEscrow, deriveEscrowV2, derivePendingSettlement, deriveDispute, deriveStake, deriveSubscription, deriveShard, deriveIndexPage, deriveAttestation, deriveLedger, deriveLedgerPage, } from "./pda";
|
|
54
|
+
export { deriveGlobalRegistry, deriveAgent, deriveAgentStats, deriveFeedback, deriveCapabilityIndex, deriveProtocolIndex, deriveToolCategoryIndex, deriveVault, deriveSession, deriveEpochPage, deriveVaultDelegate, deriveCheckpoint, deriveTool, deriveEscrow, deriveEscrowV2, derivePendingSettlement, deriveDispute, deriveStake, deriveSubscription, deriveShard, deriveIndexPage, deriveAttestation, deriveLedger, deriveLedgerPage, deriveReceiptBatch, } from "./pda";
|
|
55
55
|
export { sha256, hashToArray, assert } from "./utils";
|
|
56
56
|
export { serializeAccount, serializeValue } from "./utils";
|
|
57
57
|
export { normalizeNetworkId, isNetworkEquivalent, getNetworkGenesisHash, getNetworkClusterName, isKnownNetwork, } from "./utils";
|
|
@@ -69,7 +69,7 @@ export { EventParser, SAP_EVENT_NAMES } from "./events";
|
|
|
69
69
|
export type { SapEvent, SapEventName, ParsedEvent, RegisteredEventData, UpdatedEventData, FeedbackEventData, MemoryInscribedEventData, PaymentSettledEventData, LedgerEntryEventData, } from "./events";
|
|
70
70
|
export { GeyserEventStream } from "./events/geyser";
|
|
71
71
|
export type { GeyserConfig, GeyserStreamEvents } from "./events/geyser";
|
|
72
|
-
export { AgentModule, FeedbackModule, IndexingModule, ToolsModule, VaultModule, EscrowModule, EscrowV2Module, StakingModule, SubscriptionModule, AttestationModule, LedgerModule, BaseModule, } from "./modules/index";
|
|
72
|
+
export { AgentModule, FeedbackModule, IndexingModule, ToolsModule, VaultModule, EscrowModule, EscrowV2Module, ReceiptModule, StakingModule, SubscriptionModule, AttestationModule, LedgerModule, BaseModule, } from "./modules/index";
|
|
73
73
|
export type { SapProgram, SapTransactionResult } from "./modules/base";
|
|
74
74
|
export { createSAPPlugin, SAPPlugin } from "./plugin/index";
|
|
75
75
|
export type { SAPPluginConfig, SynapsePlugin, PluginMeta, PluginContext, PluginInstallResult, } from "./plugin/index";
|
|
@@ -79,6 +79,6 @@ export { SapPostgres, SapSyncEngine, SAP_TABLE_MAP } from "./postgres";
|
|
|
79
79
|
export type { PgClient, SyncAllResult, SapAccountType, SyncMeta, AgentRow, EscrowRow, ToolRow, LedgerRow, EventRow, SyncCursorRow, SyncOptions, } from "./postgres";
|
|
80
80
|
export { parseSapInstructionsFromTransaction, parseSapInstructionNamesFromTransaction, parseSapInstructionsFromList, parseSapInstructionNamesFromList, containsSapInstruction, parseSapTransactionComplete, parseSapTransactionBatch, decodeInnerInstructions, filterSapInnerInstructions, extractAccountKeys, TransactionParser, } from "./parser";
|
|
81
81
|
export type { DecodedSapInstruction, DecodedInnerInstruction, ParsedSapTransaction, ParseFilterOptions, SapInstructionCoder, CompiledInner, InnerInstructionGroup, } from "./parser";
|
|
82
|
-
export { DiscoveryRegistry, X402Registry, SessionManager, AgentBuilder, } from "./registries/index";
|
|
83
|
-
export type { DiscoveredAgent, AgentProfile, DiscoveredTool, NetworkOverview, ToolCategoryName, CostEstimate, PaymentContext, PreparePaymentOptions, X402Headers, EscrowBalance, SettlementResult, BatchSettlementResult, SettleOptions, SessionContext, WriteResult, SealResult, RingBufferEntry, SessionStatus, CapabilityInput, PricingTierInput, ToolInput, RegisterResult, RegisterWithToolsResult, } from "./registries/index";
|
|
82
|
+
export { DiscoveryRegistry, X402Registry, SessionManager, AgentBuilder, MetaplexBridge, } from "./registries/index";
|
|
83
|
+
export type { DiscoveredAgent, AgentProfile, DiscoveredTool, NetworkOverview, ToolCategoryName, CostEstimate, PaymentContext, PreparePaymentOptions, X402Headers, EscrowBalance, SettlementResult, BatchSettlementResult, SettleOptions, SessionContext, WriteResult, SealResult, RingBufferEntry, SessionStatus, CapabilityInput, PricingTierInput, ToolInput, RegisterResult, RegisterWithToolsResult, UnifiedProfile, MplAgentSnapshot, Eip8004Registration, Eip8004Service, AttachAgentIdentityOpts, UpdateAgentIdentityUriOpts, } from "./registries/index";
|
|
84
84
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAGH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGzE,YAAY,EAEV,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EAEnB,UAAU,EACV,qBAAqB,EACrB,WAAW,EACX,SAAS,EACT,UAAU,EAEV,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EAEd,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EAEb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EAEtB,kBAAkB,EAClB,sBAAsB,EAEtB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,SAAS,EACT,UAAU,EACV,cAAc,EACd,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,eAAe,GAChB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,EACL,MAAM,EACN,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACzE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGtD,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAGH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGzE,YAAY,EAEV,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EAEnB,UAAU,EACV,qBA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E,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACvE,YAAY,EACV,QAAQ,EACR,aAAa,EACb,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,OAAO,EACP,SAAS,EACT,QAAQ,EACR,aAAa,EACb,WAAW,GACZ,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,mCAAmC,EACnC,uCAAuC,EACvC,4BAA4B,EAC5B,gCAAgC,EAChC,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,cAAc,GACf,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,WAAW,EACX,UAAU,EACV,eAAe,EACf,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module escrow-v2
|
|
3
3
|
* @description V2 escrow settlement layer — supports settlement security
|
|
4
|
-
* modes (
|
|
5
|
-
* pending settlements, and
|
|
4
|
+
* modes (CoSigned, DisputeWindow), receipt-based dispute resolution,
|
|
5
|
+
* pending settlements, and automatic resolution via merkle proofs.
|
|
6
6
|
*
|
|
7
7
|
* @category Modules
|
|
8
8
|
* @since v0.7.0
|
|
@@ -31,15 +31,22 @@ export declare class EscrowV2Module extends BaseModule {
|
|
|
31
31
|
create(agentWallet: PublicKey, args: CreateEscrowV2Args, splAccounts?: AccountMeta[]): Promise<TransactionSignature>;
|
|
32
32
|
deposit(agentWallet: PublicKey, nonce: BN | number | bigint, amount: BN | number | bigint, splAccounts?: AccountMeta[]): Promise<TransactionSignature>;
|
|
33
33
|
settle(depositorWallet: PublicKey, nonce: BN | number | bigint, callsToSettle: BN | number | bigint, serviceHash: number[], splAccounts?: AccountMeta[], opts?: SettleOptions): Promise<TransactionSignature>;
|
|
34
|
-
createPendingSettlement(agentWallet: PublicKey, depositorWallet: PublicKey, nonce: BN | number | bigint, settlementIndex: BN | number | bigint, callsToSettle: BN | number | bigint, amount: BN | number | bigint, serviceHash: number[]): Promise<TransactionSignature>;
|
|
34
|
+
createPendingSettlement(agentWallet: PublicKey, depositorWallet: PublicKey, nonce: BN | number | bigint, settlementIndex: BN | number | bigint, callsToSettle: BN | number | bigint, amount: BN | number | bigint, serviceHash: number[], receiptMerkleRoot?: number[]): Promise<TransactionSignature>;
|
|
35
35
|
finalizeSettlement(agentWallet: PublicKey, depositorWallet: PublicKey, nonce: BN | number | bigint, settlementIndex: BN | number | bigint): Promise<TransactionSignature>;
|
|
36
|
-
fileDispute(agentWallet: PublicKey, nonce: BN | number | bigint, settlementIndex: BN | number | bigint, evidenceHash: number[]): Promise<TransactionSignature>;
|
|
37
|
-
|
|
36
|
+
fileDispute(agentWallet: PublicKey, nonce: BN | number | bigint, settlementIndex: BN | number | bigint, evidenceHash: number[], disputeType?: number): Promise<TransactionSignature>;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Since v0.7.0 — Arbiter-based resolution removed.
|
|
39
|
+
* Use {@link ReceiptModule.submitReceiptProof} + {@link ReceiptModule.autoResolveDispute} instead.
|
|
40
|
+
*/
|
|
41
|
+
resolveDispute(_depositorWallet: PublicKey, _agentWallet: PublicKey, _nonce: BN | number | bigint, _settlementIndex: BN | number | bigint, _outcome: number): Promise<TransactionSignature>;
|
|
38
42
|
closeDispute(pendingSettlementPda: PublicKey): Promise<TransactionSignature>;
|
|
39
43
|
closePendingSettlement(pendingSettlementPda: PublicKey): Promise<TransactionSignature>;
|
|
40
44
|
withdraw(agentWallet: PublicKey, nonce: BN | number | bigint, amount: BN | number | bigint): Promise<TransactionSignature>;
|
|
41
45
|
close(agentWallet: PublicKey, nonce?: BN | number | bigint): Promise<TransactionSignature>;
|
|
42
|
-
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated Since v0.7.0 — Migration instruction removed from program.
|
|
48
|
+
*/
|
|
49
|
+
migrateFromV1(_agentWallet: PublicKey): Promise<TransactionSignature>;
|
|
43
50
|
fetch(agentPda: PublicKey, depositor?: PublicKey, nonce?: BN | number | bigint): Promise<EscrowAccountV2Data>;
|
|
44
51
|
fetchNullable(agentPda: PublicKey, depositor?: PublicKey, nonce?: BN | number | bigint): Promise<EscrowAccountV2Data | null>;
|
|
45
52
|
fetchByPda(escrowPda: PublicKey): Promise<EscrowAccountV2Data>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escrow-v2.d.ts","sourceRoot":"","sources":["../../../src/modules/escrow-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"escrow-v2.d.ts","sourceRoot":"","sources":["../../../src/modules/escrow-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;G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aultModule } from "./vault";
|
|
19
19
|
export { EscrowModule } from "./escrow";
|
|
20
20
|
export { EscrowV2Module } from "./escrow-v2";
|
|
21
|
+
export { ReceiptModule } from "./receipt";
|
|
21
22
|
export { StakingModule } from "./staking";
|
|
22
23
|
export { SubscriptionModule } from "./subscription";
|
|
23
24
|
export { AttestationModule } from "./attestation";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module receipt
|
|
3
|
+
* @description Receipt-based trustless dispute resolution (v0.7).
|
|
4
|
+
*
|
|
5
|
+
* Agents inscribe merkle roots of call receipt batches on-chain.
|
|
6
|
+
* During disputes, agents submit merkle inclusion proofs to prove delivery.
|
|
7
|
+
* After the proof deadline, anyone can trigger automatic proportional resolution.
|
|
8
|
+
*
|
|
9
|
+
* @category Modules
|
|
10
|
+
* @since v0.7.0
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
import { type PublicKey, type TransactionSignature } from "@solana/web3.js";
|
|
14
|
+
import { BN } from "@coral-xyz/anchor";
|
|
15
|
+
import { BaseModule } from "./base";
|
|
16
|
+
import type { ReceiptBatchData } from "../types";
|
|
17
|
+
/**
|
|
18
|
+
* @name ReceiptModule
|
|
19
|
+
* @description Manages receipt batch inscriptions, merkle proof submissions,
|
|
20
|
+
* and automatic dispute resolution for the v0.7 trustless settlement layer.
|
|
21
|
+
*
|
|
22
|
+
* @category Modules
|
|
23
|
+
* @since v0.7.0
|
|
24
|
+
* @extends BaseModule
|
|
25
|
+
*/
|
|
26
|
+
export declare class ReceiptModule extends BaseModule {
|
|
27
|
+
private toNum;
|
|
28
|
+
deriveReceiptBatch(escrowV2Pda: PublicKey, batchIndex: number): readonly [PublicKey, number];
|
|
29
|
+
/**
|
|
30
|
+
* Inscribe a receipt batch merkle root on-chain.
|
|
31
|
+
*
|
|
32
|
+
* Called by the **agent** to commit a cryptographic proof of calls delivered.
|
|
33
|
+
* The `merkleRoot` is the root of a merkle tree whose leaves are individual
|
|
34
|
+
* call receipt hashes.
|
|
35
|
+
*
|
|
36
|
+
* @param depositorWallet - The depositor's wallet (needed for escrow PDA derivation).
|
|
37
|
+
* @param nonce - Escrow nonce.
|
|
38
|
+
* @param batchIndex - Zero-based batch index (must equal escrow.receipt_batch_count).
|
|
39
|
+
* @param merkleRoot - 32-byte merkle root of the receipt batch.
|
|
40
|
+
* @param callCount - Number of calls in the batch.
|
|
41
|
+
* @param periodStart - Unix timestamp for the start of the covered period.
|
|
42
|
+
* @param periodEnd - Unix timestamp for the end of the covered period.
|
|
43
|
+
*/
|
|
44
|
+
inscribeReceiptBatch(depositorWallet: PublicKey, nonce: BN | number | bigint, batchIndex: number, merkleRoot: number[], callCount: BN | number | bigint, periodStart: BN | number | bigint, periodEnd: BN | number | bigint): Promise<TransactionSignature>;
|
|
45
|
+
/**
|
|
46
|
+
* Submit a merkle inclusion proof during a dispute.
|
|
47
|
+
*
|
|
48
|
+
* Called by the **agent** to prove delivery of specific calls.
|
|
49
|
+
* Each proof verifies that a set of receipt hashes are included
|
|
50
|
+
* in the previously inscribed merkle root.
|
|
51
|
+
*
|
|
52
|
+
* @param depositorWallet - The depositor's wallet.
|
|
53
|
+
* @param nonce - Escrow nonce.
|
|
54
|
+
* @param settlementIndex - Index of the disputed pending settlement.
|
|
55
|
+
* @param batchIndex - Receipt batch index containing the proof.
|
|
56
|
+
* @param provenCount - Number of calls proven in this proof submission.
|
|
57
|
+
* @param proof - Array of 32-byte merkle proof hashes.
|
|
58
|
+
* @param leaf - The 32-byte leaf hash being proven.
|
|
59
|
+
*/
|
|
60
|
+
submitReceiptProof(depositorWallet: PublicKey, nonce: BN | number | bigint, settlementIndex: BN | number | bigint, batchIndex: number, provenCount: BN | number | bigint, proof: number[][], leaf: number[]): Promise<TransactionSignature>;
|
|
61
|
+
/**
|
|
62
|
+
* Trigger automatic dispute resolution after the proof deadline.
|
|
63
|
+
*
|
|
64
|
+
* Permissionless crank — anyone can call this once the deadline has passed.
|
|
65
|
+
* Resolution is proportional: if the agent proved N of M claimed calls,
|
|
66
|
+
* N/M of the settlement amount goes to the agent, the rest is refunded.
|
|
67
|
+
*
|
|
68
|
+
* @param agentWallet - The agent's wallet.
|
|
69
|
+
* @param depositorWallet - The depositor's wallet.
|
|
70
|
+
* @param nonce - Escrow nonce.
|
|
71
|
+
* @param settlementIndex - Index of the disputed pending settlement.
|
|
72
|
+
*/
|
|
73
|
+
autoResolveDispute(agentWallet: PublicKey, depositorWallet: PublicKey, nonce: BN | number | bigint, settlementIndex: BN | number | bigint): Promise<TransactionSignature>;
|
|
74
|
+
fetchReceiptBatch(escrowV2Pda: PublicKey, batchIndex: number): Promise<ReceiptBatchData>;
|
|
75
|
+
fetchReceiptBatchNullable(escrowV2Pda: PublicKey, batchIndex: number): Promise<ReceiptBatchData | null>;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=receipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../../../src/modules/receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AASpC,OA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;IAKtB,yBAAyB,CAC7B,WAAW,EAAE,SAAS,EACtB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;CAIpC"}
|
|
@@ -470,5 +470,20 @@ export declare const deriveShard: (shardIndex: number, programId?: PublicKey) =>
|
|
|
470
470
|
* @since v0.5.0
|
|
471
471
|
*/
|
|
472
472
|
export declare const deriveIndexPage: (parentIndexPda: PublicKey, pageIndex: number, programId?: PublicKey) => PdaResult;
|
|
473
|
+
/**
|
|
474
|
+
* Derive the **ReceiptBatch** PDA.
|
|
475
|
+
*
|
|
476
|
+
* Seeds: `["sap_receipt", escrow_v2_pda, batch_index_u32_le]`
|
|
477
|
+
*
|
|
478
|
+
* @name deriveReceiptBatch
|
|
479
|
+
* @description Computes the receipt batch PDA storing a merkle root of call receipts.
|
|
480
|
+
* @param escrowV2Pda - The parent V2 escrow PDA.
|
|
481
|
+
* @param batchIndex - Zero-based batch index (u32).
|
|
482
|
+
* @param programId - Override program ID.
|
|
483
|
+
* @returns {PdaResult} `[pda, bump]` tuple.
|
|
484
|
+
* @category PDA
|
|
485
|
+
* @since v0.7.0
|
|
486
|
+
*/
|
|
487
|
+
export declare const deriveReceiptBatch: (escrowV2Pda: PublicKey, batchIndex: number, programId?: PublicKey) => PdaResult;
|
|
473
488
|
export {};
|
|
474
489
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pda/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C;;;;;;;;GAQG;AACH,KAAK,SAAS,GAAG,SAAS,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAoEzD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB,GAC/B,qBAA0B,KACzB,S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EACpB,QAAO,MAAM,GAAG,MAAU,EAC1B,qBAA0B,KACzB,SASA,CAAC;AAEJ;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,GAClC,aAAa,SAAS,EACtB,iBAAiB,MAAM,GAAG,MAAM,EAChC,qBAA0B,KACzB,SAQA,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,GACxB,sBAAsB,SAAS,EAC/B,qBAA0B,KACzB,SAIA,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,GACtB,UAAU,SAAS,EACnB,qBAA0B,KACzB,SACgE,CAAC;AAEpE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,GAC7B,UAAU,SAAS,EACnB,YAAY,SAAS,EACrB,QAAO,MAAM,GAAG,MAAU,EAC1B,qBAA0B,KACzB,SASA,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,GACtB,YAAY,MAAM,EAClB,qBAA0B,KACzB,SAIA,CAAC;AAEJ;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,GAC1B,gBAAgB,SAAS,EACzB,WAAW,MAAM,EACjB,qBAA0B,KACzB,SAQA,CAAC;AAMJ;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,GAC7B,aAAa,SAAS,EACtB,YAAY,MAAM,EAClB,qBAA0B,KACzB,SAQA,CAAC"}
|
|
@@ -45,4 +45,6 @@ export { SessionManager } from "./session";
|
|
|
45
45
|
export type { SessionContext, WriteResult, SealResult, RingBufferEntry, SessionStatus, } from "./session";
|
|
46
46
|
export { AgentBuilder } from "./builder";
|
|
47
47
|
export type { CapabilityInput, PricingTierInput, ToolInput, RegisterResult, RegisterWithToolsResult, } from "./builder";
|
|
48
|
+
export { MetaplexBridge } from "./metaplex-bridge";
|
|
49
|
+
export type { UnifiedProfile, MplAgentSnapshot, Eip8004Registration, Eip8004Service, AttachAgentIdentityOpts, UpdateAgentIdentityUriOpts, } from "./metaplex-bridge";
|
|
48
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/registries/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,eAAe,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,YAAY,EACV,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,GACd,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EACV,cAAc,EACd,WAAW,EACX,UAAU,EACV,eAAe,EACf,aAAa,GACd,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,uBAAuB,GACxB,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/registries/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,eAAe,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,YAAY,EACV,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,GACd,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EACV,cAAc,EACd,WAAW,EACX,UAAU,EACV,eAAe,EACf,aAAa,GACd,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,uBAAuB,GACxB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EACV,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module registries/metaplex-bridge
|
|
3
|
+
* @description Bridge between Synapse Agent Protocol (SAP) and Metaplex
|
|
4
|
+
* Core's `AgentIdentity` external plugin adapter (mpl-core ≥ 1.9.0).
|
|
5
|
+
*
|
|
6
|
+
* ## Why this design (verified against mpl-core PR #258, v1.9.0)
|
|
7
|
+
*
|
|
8
|
+
* The MPL Core `AgentIdentity` plugin has exactly one field:
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* type AgentIdentity = { uri: string };
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* The URI must point to an **EIP-8004** agent registration JSON. There is
|
|
15
|
+
* no on-chain executive list, no `addExecutive` / `delegateExecutionV1`
|
|
16
|
+
* instruction. Capabilities, services, executives, and reputation live
|
|
17
|
+
* off-chain in that JSON. The plugin only hooks the `Execute` lifecycle
|
|
18
|
+
* event, allowing the URI's authority to gate execution.
|
|
19
|
+
*
|
|
20
|
+
* The most efficient SAP × MPL integration therefore is:
|
|
21
|
+
*
|
|
22
|
+
* 1. SAP serves a **live EIP-8004 JSON** at a deterministic URL derived
|
|
23
|
+
* from the SAP `AgentAccount` PDA (e.g.
|
|
24
|
+
* `https://explorer.oobeprotocol.ai/agents/<sapAgentPda>/eip-8004.json`).
|
|
25
|
+
* 2. The MPL Core asset attaches an `AgentIdentity` adapter whose `uri`
|
|
26
|
+
* points to that URL.
|
|
27
|
+
* 3. Every SAP write (capability change, vault delegate add/revoke, x402
|
|
28
|
+
* tier update) is reflected in the JSON automatically — **no second
|
|
29
|
+
* transaction required, on either chain or for any wallet.**
|
|
30
|
+
*
|
|
31
|
+
* One SAP transaction = both protocols updated. That is the efficiency
|
|
32
|
+
* win that motivated the Phase 1 redesign on 2026-04-22.
|
|
33
|
+
*
|
|
34
|
+
* @category Registries
|
|
35
|
+
* @since v0.9.0
|
|
36
|
+
* @see https://github.com/metaplex-foundation/mpl-core/pull/258
|
|
37
|
+
* @see https://eips.ethereum.org/EIPS/eip-8004
|
|
38
|
+
*/
|
|
39
|
+
import { PublicKey, type TransactionInstruction } from "@solana/web3.js";
|
|
40
|
+
import type { SapProgram } from "../modules/base";
|
|
41
|
+
import type { AgentAccountData, AgentStatsData } from "../types";
|
|
42
|
+
/**
|
|
43
|
+
* @interface Eip8004Service
|
|
44
|
+
* @description One service entry in an EIP-8004 registration document.
|
|
45
|
+
* @category Registries
|
|
46
|
+
* @since v0.9.0
|
|
47
|
+
*/
|
|
48
|
+
export interface Eip8004Service {
|
|
49
|
+
readonly id: string;
|
|
50
|
+
readonly type: string;
|
|
51
|
+
readonly url: string;
|
|
52
|
+
readonly priceLamports?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @interface Eip8004Registration
|
|
56
|
+
* @description Subset of an EIP-8004 registration document used by the
|
|
57
|
+
* bridge. Hosts may include additional fields; they are passed through
|
|
58
|
+
* via `extra`.
|
|
59
|
+
* @category Registries
|
|
60
|
+
* @since v0.9.0
|
|
61
|
+
*/
|
|
62
|
+
export interface Eip8004Registration {
|
|
63
|
+
readonly version: string;
|
|
64
|
+
readonly name: string;
|
|
65
|
+
readonly description?: string;
|
|
66
|
+
readonly synapseAgent: string;
|
|
67
|
+
readonly authority: string;
|
|
68
|
+
readonly capabilities: readonly string[];
|
|
69
|
+
readonly services: readonly Eip8004Service[];
|
|
70
|
+
readonly executives: readonly {
|
|
71
|
+
wallet: string;
|
|
72
|
+
expiresAt: string | null;
|
|
73
|
+
}[];
|
|
74
|
+
readonly updatedAt: string;
|
|
75
|
+
readonly extra?: Record<string, unknown>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @interface AttachAgentIdentityOpts
|
|
79
|
+
* @description Parameters for {@link MetaplexBridge.buildAttachAgentIdentityIx}.
|
|
80
|
+
* @category Registries
|
|
81
|
+
* @since v0.9.0
|
|
82
|
+
*/
|
|
83
|
+
export interface AttachAgentIdentityOpts {
|
|
84
|
+
readonly asset: PublicKey;
|
|
85
|
+
readonly authority: PublicKey;
|
|
86
|
+
readonly payer?: PublicKey;
|
|
87
|
+
readonly sapAgentOwner: PublicKey;
|
|
88
|
+
readonly registrationBaseUrl: string;
|
|
89
|
+
readonly rpcUrl: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @interface UpdateAgentIdentityUriOpts
|
|
93
|
+
* @description Parameters for {@link MetaplexBridge.buildUpdateAgentIdentityUriIx}.
|
|
94
|
+
* @category Registries
|
|
95
|
+
* @since v0.9.0
|
|
96
|
+
*/
|
|
97
|
+
export interface UpdateAgentIdentityUriOpts {
|
|
98
|
+
readonly asset: PublicKey;
|
|
99
|
+
readonly authority: PublicKey;
|
|
100
|
+
readonly payer?: PublicKey;
|
|
101
|
+
readonly newUri: string;
|
|
102
|
+
readonly rpcUrl: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @interface MplAgentSnapshot
|
|
106
|
+
* @description Subset of an MPL Core Asset relevant to the bridge.
|
|
107
|
+
* @category Registries
|
|
108
|
+
* @since v0.9.0
|
|
109
|
+
*/
|
|
110
|
+
export interface MplAgentSnapshot {
|
|
111
|
+
readonly asset: PublicKey;
|
|
112
|
+
readonly owner: PublicKey;
|
|
113
|
+
readonly name: string | null;
|
|
114
|
+
readonly agentIdentityUri: string | null;
|
|
115
|
+
readonly registration: Eip8004Registration | null;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @interface UnifiedProfile
|
|
119
|
+
* @description Merged read-only profile combining SAP identity and an
|
|
120
|
+
* (optional) MPL Core asset side. The `linked` flag is `true` when the
|
|
121
|
+
* MPL asset's `AgentIdentity.uri` references the SAP agent PDA both in
|
|
122
|
+
* the URL path and in the `synapseAgent` JSON field.
|
|
123
|
+
* @category Registries
|
|
124
|
+
* @since v0.9.0
|
|
125
|
+
*/
|
|
126
|
+
export interface UnifiedProfile {
|
|
127
|
+
readonly sap: {
|
|
128
|
+
readonly pda: PublicKey;
|
|
129
|
+
readonly identity: AgentAccountData | null;
|
|
130
|
+
readonly stats: AgentStatsData | null;
|
|
131
|
+
};
|
|
132
|
+
readonly mpl: MplAgentSnapshot | null;
|
|
133
|
+
readonly linked: boolean;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @name MetaplexBridge
|
|
137
|
+
* @description Read-side merger and write-side instruction composer for
|
|
138
|
+
* SAP × Metaplex Core `AgentIdentity` integration.
|
|
139
|
+
*
|
|
140
|
+
* Linking is **single-transaction**: the MPL `addExternalPluginAdapterV1`
|
|
141
|
+
* instruction sets a URI that points at SAP's live registration host.
|
|
142
|
+
* Subsequent SAP state changes propagate automatically — no extra MPL
|
|
143
|
+
* transaction required.
|
|
144
|
+
*
|
|
145
|
+
* @category Registries
|
|
146
|
+
* @since v0.9.0
|
|
147
|
+
*/
|
|
148
|
+
export declare class MetaplexBridge {
|
|
149
|
+
private readonly program;
|
|
150
|
+
constructor(program: SapProgram);
|
|
151
|
+
/**
|
|
152
|
+
* @name deriveRegistrationUrl
|
|
153
|
+
* @description Compute the deterministic EIP-8004 registration URL for
|
|
154
|
+
* a SAP agent. Hosts MUST serve the JSON at exactly this path so that
|
|
155
|
+
* {@link MetaplexBridge.verifyLink} validates without external config.
|
|
156
|
+
*
|
|
157
|
+
* @since v0.9.0
|
|
158
|
+
*/
|
|
159
|
+
deriveRegistrationUrl(sapAgentPda: PublicKey, baseUrl: string): string;
|
|
160
|
+
/**
|
|
161
|
+
* @name buildEip8004Registration
|
|
162
|
+
* @description Build a canonical EIP-8004 JSON document for a SAP agent.
|
|
163
|
+
* Designed to be called server-side by a registry host.
|
|
164
|
+
*
|
|
165
|
+
* @since v0.9.0
|
|
166
|
+
*/
|
|
167
|
+
buildEip8004Registration(args: {
|
|
168
|
+
sapAgentOwner: PublicKey;
|
|
169
|
+
services?: readonly Eip8004Service[];
|
|
170
|
+
extra?: Record<string, unknown>;
|
|
171
|
+
}): Promise<Eip8004Registration>;
|
|
172
|
+
/**
|
|
173
|
+
* @name buildAttachAgentIdentityIx
|
|
174
|
+
* @description Build the MPL Core `addExternalPluginAdapterV1`
|
|
175
|
+
* `TransactionInstruction` that attaches an `AgentIdentity` plugin
|
|
176
|
+
* pointing at SAP's live EIP-8004 registration URL.
|
|
177
|
+
*
|
|
178
|
+
* @since v0.9.0
|
|
179
|
+
*/
|
|
180
|
+
buildAttachAgentIdentityIx(opts: AttachAgentIdentityOpts): Promise<TransactionInstruction>;
|
|
181
|
+
/**
|
|
182
|
+
* @name buildUpdateAgentIdentityUriIx
|
|
183
|
+
* @description Build the MPL Core `updateExternalPluginAdapterV1`
|
|
184
|
+
* instruction that re-points an existing `AgentIdentity` plugin.
|
|
185
|
+
*
|
|
186
|
+
* @since v0.9.0
|
|
187
|
+
*/
|
|
188
|
+
buildUpdateAgentIdentityUriIx(opts: UpdateAgentIdentityUriOpts): Promise<TransactionInstruction>;
|
|
189
|
+
/**
|
|
190
|
+
* @name getUnifiedProfile
|
|
191
|
+
* @description Fetch a merged view of an agent across SAP and Metaplex.
|
|
192
|
+
* Provide `wallet` (SAP-first) or `asset` (MPL-first), or both.
|
|
193
|
+
*
|
|
194
|
+
* @since v0.9.0
|
|
195
|
+
*/
|
|
196
|
+
getUnifiedProfile(input: {
|
|
197
|
+
wallet?: PublicKey;
|
|
198
|
+
asset?: PublicKey;
|
|
199
|
+
rpcUrl: string;
|
|
200
|
+
}): Promise<UnifiedProfile>;
|
|
201
|
+
/**
|
|
202
|
+
* @name verifyLink
|
|
203
|
+
* @description Verify the bidirectional link between an MPL Core asset
|
|
204
|
+
* and a SAP agent. Returns `true` only when both URL and JSON sides
|
|
205
|
+
* reference the SAP agent PDA.
|
|
206
|
+
*
|
|
207
|
+
* @since v0.9.0
|
|
208
|
+
*/
|
|
209
|
+
verifyLink(args: {
|
|
210
|
+
asset: PublicKey;
|
|
211
|
+
sapAgentPda: PublicKey;
|
|
212
|
+
rpcUrl: string;
|
|
213
|
+
}): Promise<boolean>;
|
|
214
|
+
private get accounts();
|
|
215
|
+
private fetchAgentNullable;
|
|
216
|
+
private fetchStatsNullable;
|
|
217
|
+
private fetchActiveVaultDelegates;
|
|
218
|
+
private fetchMplSnapshot;
|
|
219
|
+
private extractAgentIdentityUri;
|
|
220
|
+
private fetchEip8004Safe;
|
|
221
|
+
private buildAddExternalPluginIx;
|
|
222
|
+
private firstWeb3Ix;
|
|
223
|
+
private umiIxToWeb3;
|
|
224
|
+
private detectLink;
|
|
225
|
+
private readString;
|
|
226
|
+
private readCapabilities;
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=metaplex-bridge.d.ts.map
|
|
@@ -0,0 +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,EAC5B,MAAM,iBAAiB,CAAC;AAYzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;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S,CAAC;QACzB,QAAQ,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;QACrC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjC,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA2BhC;;;;;;;OAOG;IACG,0BAA0B,CAC9B,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,sBAAsB,CAAC;IAYlC;;;;;;OAMG;IACG,6BAA6B,CACjC,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,sBAAsB,CAAC;IAkClC;;;;;;OAMG;IACG,iBAAiB,CAAC,KAAK,EAAE;QAC7B,MAAM,CAAC,EAAE,SAAS,CAAC;QACnB,KAAK,CAAC,EAAE,SAAS,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,cAAc,CAAC;IAwC3B;;;;;;;OAOG;IACG,UAAU,CAAC,IAAI,EAAE;QACrB,KAAK,EAAE,SAAS,CAAC;QACjB,WAAW,EAAE,SAAS,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,OAAO,CAAC;IAYpB,OAAO,KAAK,QAAQ,GAEnB;YAEa,kBAAkB;YAUlB,kBAAkB;YAWlB,yBAAyB;YA2BzB,gBAAgB;IA0B9B,OAAO,CAAC,uBAAuB;YAQjB,gBAAgB;YAkChB,wBAAwB;YAmCxB,WAAW;IAYzB,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,gBAAgB;CAIzB"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { PublicKey } from "@solana/web3.js";
|
|
12
12
|
import type BN from "bn.js";
|
|
13
|
-
import type { ToolHttpMethodKind, ToolCategoryKind, SettlementSecurityKind, DisputeOutcomeKind, BillingIntervalKind } from "./enums";
|
|
13
|
+
import type { ToolHttpMethodKind, ToolCategoryKind, SettlementSecurityKind, DisputeOutcomeKind, BillingIntervalKind, ResolutionLayerKind } from "./enums";
|
|
14
14
|
import type { Capability, PricingTier, PluginRef, VolumeCurveBreakpoint } from "./common";
|
|
15
15
|
/**
|
|
16
16
|
* @interface AgentAccountData
|
|
@@ -593,9 +593,12 @@ export interface EscrowAccountV2Data {
|
|
|
593
593
|
readonly disputeWindowSlots: BN;
|
|
594
594
|
readonly settlementIndex: BN;
|
|
595
595
|
readonly coSigner: PublicKey | null;
|
|
596
|
+
/** @deprecated Since v0.7.0 — arbiter role replaced by automatic receipt verification */
|
|
596
597
|
readonly arbiter: PublicKey | null;
|
|
597
598
|
readonly pendingAmount: BN;
|
|
598
599
|
readonly pendingCalls: BN;
|
|
600
|
+
/** @since v0.7.0 — Number of receipt batches inscribed against this escrow */
|
|
601
|
+
readonly receiptBatchCount: number;
|
|
599
602
|
}
|
|
600
603
|
/**
|
|
601
604
|
* @interface PendingSettlementData
|
|
@@ -618,10 +621,12 @@ export interface PendingSettlementData {
|
|
|
618
621
|
readonly isFinalized: boolean;
|
|
619
622
|
readonly isDisputed: boolean;
|
|
620
623
|
readonly outcome: DisputeOutcomeKind;
|
|
624
|
+
/** @since v0.7.0 — Merkle root of receipts backing this settlement */
|
|
625
|
+
readonly receiptMerkleRoot: number[];
|
|
621
626
|
}
|
|
622
627
|
/**
|
|
623
628
|
* @interface DisputeRecordData
|
|
624
|
-
* @description On-chain dispute with
|
|
629
|
+
* @description On-chain dispute with automatic receipt-based resolution (v0.7).
|
|
625
630
|
* @category Types
|
|
626
631
|
* @since v0.5.0
|
|
627
632
|
*/
|
|
@@ -633,12 +638,51 @@ export interface DisputeRecordData {
|
|
|
633
638
|
readonly agent: PublicKey;
|
|
634
639
|
readonly evidenceHash: number[];
|
|
635
640
|
readonly agentEvidenceHash: number[];
|
|
641
|
+
/** @deprecated Since v0.7.0 — arbiter role replaced by automatic resolution */
|
|
636
642
|
readonly arbiter: PublicKey;
|
|
637
643
|
readonly outcome: DisputeOutcomeKind;
|
|
638
644
|
readonly createdAt: BN;
|
|
639
645
|
readonly resolvedAt: BN;
|
|
640
646
|
readonly resolutionHash: number[];
|
|
641
647
|
readonly slashAmount: BN;
|
|
648
|
+
/** @since v0.7.0 — Category of dispute (NonDelivery=0, PartialDelivery=1, Overcharge=2, Quality=3) */
|
|
649
|
+
readonly disputeType: number;
|
|
650
|
+
/** @since v0.7.0 — How the dispute was resolved (Pending/Auto/Governance) */
|
|
651
|
+
readonly resolutionLayer: ResolutionLayerKind;
|
|
652
|
+
/** @since v0.7.0 — Bond deposited by the disputer (lamports) */
|
|
653
|
+
readonly disputeBond: BN;
|
|
654
|
+
/** @since v0.7.0 — Number of calls the agent proved via merkle proofs */
|
|
655
|
+
readonly provenCalls: BN;
|
|
656
|
+
/** @since v0.7.0 — Number of calls the agent originally claimed */
|
|
657
|
+
readonly claimedCalls: BN;
|
|
658
|
+
/** @since v0.7.0 — Unix timestamp by which agent must submit proof */
|
|
659
|
+
readonly proofDeadline: BN;
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* @interface ReceiptBatchData
|
|
663
|
+
* @description Merkle root of a batch of call receipts inscribed by an agent.
|
|
664
|
+
*
|
|
665
|
+
* Seeds: `["sap_receipt", escrow_v2_pda, batch_index_u32_le]`
|
|
666
|
+
*
|
|
667
|
+
* @category Types
|
|
668
|
+
* @since v0.7.0
|
|
669
|
+
*/
|
|
670
|
+
export interface ReceiptBatchData {
|
|
671
|
+
readonly bump: number;
|
|
672
|
+
/** Parent escrow V2 PDA */
|
|
673
|
+
readonly escrow: PublicKey;
|
|
674
|
+
/** Zero-based batch index */
|
|
675
|
+
readonly batchIndex: number;
|
|
676
|
+
/** Merkle root of the receipt batch */
|
|
677
|
+
readonly merkleRoot: number[];
|
|
678
|
+
/** Number of calls in the batch */
|
|
679
|
+
readonly callCount: BN;
|
|
680
|
+
/** Unix timestamp for the start of the period covered */
|
|
681
|
+
readonly periodStart: BN;
|
|
682
|
+
/** Unix timestamp for the end of the period covered */
|
|
683
|
+
readonly periodEnd: BN;
|
|
684
|
+
/** Unix timestamp when the batch was inscribed */
|
|
685
|
+
readonly inscribedAt: BN;
|
|
642
686
|
}
|
|
643
687
|
/**
|
|
644
688
|
* @interface AgentStakeData
|