@ghostspeak/sdk 2.0.8 → 2.0.10
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/.tsbuildinfo +1 -0
- package/dist/{GhostSpeakClient-bnXwUPHI.d.ts → GhostSpeakClient-qdLGyuDp.d.ts} +2 -2
- package/dist/{StakingModule-DunDShLq.d.ts → StakingModule-CPhp_ZY0.d.ts} +1 -1
- package/dist/{browser-CI5_6Gzk.d.ts → browser-D1TpjbjZ.d.ts} +3 -3
- package/dist/browser.d.ts +3 -2
- package/dist/browser.js +3 -3
- package/dist/{chunk-6XCCMJ6M.js → chunk-5SS3OL4B.js} +5 -5
- package/dist/{chunk-6XCCMJ6M.js.map → chunk-5SS3OL4B.js.map} +1 -1
- package/dist/{chunk-JYXSOXCP.js → chunk-63A7F2YP.js} +42 -32
- package/dist/chunk-63A7F2YP.js.map +1 -0
- package/dist/{chunk-5QBSC4T4.js → chunk-EU6PHSM5.js} +3 -3
- package/dist/{chunk-5QBSC4T4.js.map → chunk-EU6PHSM5.js.map} +1 -1
- package/dist/{chunk-OXA7MECJ.js → chunk-HIDBANFS.js} +56 -4
- package/dist/chunk-HIDBANFS.js.map +1 -0
- package/dist/{chunk-BQDGRTVP.js → chunk-QWQTPTZ4.js} +39 -51
- package/dist/chunk-QWQTPTZ4.js.map +1 -0
- package/dist/client.d.ts +3 -3
- package/dist/client.js +4 -4
- package/dist/index.d.ts +142 -11
- package/dist/index.js +149 -24
- package/dist/index.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/minimal/core-minimal.d.ts +0 -5
- package/dist/minimal/core-minimal.js +6 -6
- package/dist/minimal/core-minimal.js.map +1 -1
- package/dist/{signature-verification-DGxR4aYQ.d.ts → signature-verification-BDzoR1MG.d.ts} +0 -5
- package/dist/utils.d.ts +143 -2
- package/dist/utils.js +4 -4
- package/dist/utils.js.map +1 -1
- package/package.json +5 -3
- package/dist/chunk-BQDGRTVP.js.map +0 -1
- package/dist/chunk-JYXSOXCP.js.map +0 -1
- package/dist/chunk-OXA7MECJ.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {fixEncoderSize,getBytesEncoder,transformEncoder,getStructEncoder,getAddressEncoder,getU64Encoder,getI64Encoder,getU8Encoder,getOptionEncoder,addEncoderSizePrefix,getUtf8Encoder,getU32Encoder,getStructDecoder,fixDecoderSize,getAddressDecoder,getU64Decoder,getI64Decoder,getU8Decoder,getOptionDecoder,getBytesDecoder,addDecoderSizePrefix,getUtf8Decoder,getU32Decoder,combineCodec,getProgramDerivedAddress,AccountRole,upgradeRoleToSigner,isProgramError,containsBytes,getArrayEncoder,getBooleanEncoder,getArrayDecoder,getBooleanDecoder,getEnumEncoder,getEnumDecoder,getU16Encoder,getU16Decoder,getF64Encoder,getF64Decoder,getDiscriminatedUnionEncoder,getUnitEncoder,getTupleEncoder,getDiscriminatedUnionDecoder,getUnitDecoder,getTupleDecoder,assertAccountExists,fetchEncodedAccount,assertAccountsExist,fetchEncodedAccounts,decodeAccount,isTransactionSigner,pipe,createTransactionMessage,setTransactionMessageFeePayerSigner,setTransactionMessageLifetimeUsingBlockhash,appendTransactionMessageInstructions,signTransactionMessageWithSigners,setTransactionMessageFeePayer,compileTransactionMessage,getBase64EncodedWireTransaction,createSolanaRpc,createSolanaRpcSubscriptions,lamports}from'@solana/kit';import {LRUCache}from'lru-cache';import {address}from'@solana/addresses';import'@solana/sysvars';import {sha256}from'@noble/hashes/sha256';import Tt from'bs58';var Ku=Object.defineProperty;var C0=Object.getOwnPropertyDescriptor;var b0=Object.getOwnPropertyNames;var R0=Object.prototype.hasOwnProperty;var a=(n,e)=>()=>(n&&(e=n(n=0)),e);var oe=(n,e)=>{for(var t in e)Ku(n,t,{get:e[t],enumerable:true});},I0=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of b0(e))!R0.call(n,r)&&r!==t&&Ku(n,r,{get:()=>e[r],enumerable:!(o=C0(e,r))||o.enumerable});return n};var Of=n=>I0(Ku({},"__esModule",{value:true}),n);function mn(){return getStructEncoder([["auditEnabled",getBooleanEncoder()],["realTimeMonitoring",getBooleanEncoder()],["retentionPeriod",getI64Encoder()]])}function yn(){return getStructDecoder([["auditEnabled",getBooleanDecoder()],["realTimeMonitoring",getBooleanDecoder()],["retentionPeriod",getI64Decoder()]])}function _0(){return combineCodec(mn(),yn())}var Wf=a(()=>{});function Tn(){return getStructEncoder([["policyId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["policyType",Rn()],["rules",getArrayEncoder(Dn())],["scope",En()],["priority",getU8Encoder()],["status",Cn()],["effectiveDate",getI64Encoder()],["expirationDate",getOptionEncoder(getI64Encoder())],["metadata",Sn()]])}function fn(){return getStructDecoder([["policyId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["policyType",In()],["rules",getArrayDecoder(hn())],["scope",Pn()],["priority",getU8Decoder()],["status",bn()],["effectiveDate",getI64Decoder()],["expirationDate",getOptionDecoder(getI64Decoder())],["metadata",xn()]])}function K0(){return combineCodec(Tn(),fn())}var Lf=a(()=>{m();});function j(){return getEnumEncoder(vn)}function $(){return getEnumDecoder(vn)}function q0(){return combineCodec(j(),$())}var vn,Vf=a(()=>{vn=(c=>(c[c.None=0]="None",c[c.Basic=1]="Basic",c[c.Verified=2]="Verified",c[c.Pro=3]="Pro",c[c.Whale=4]="Whale",c))(vn||{});});function Mn(){return getStructEncoder([["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function kn(){return getStructDecoder([["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function o_(){return combineCodec(Mn(),kn())}var Kf=a(()=>{});function wn(){return getStructEncoder([["maxFailedAttempts",getU8Encoder()],["lockoutDuration",getI64Encoder()],["progressiveLockout",getBooleanEncoder()],["unlockMethods",getArrayEncoder(_n())],["notificationRequirements",getArrayEncoder(we())]])}function Un(){return getStructDecoder([["maxFailedAttempts",getU8Decoder()],["lockoutDuration",getI64Decoder()],["progressiveLockout",getBooleanDecoder()],["unlockMethods",getArrayDecoder(zn())],["notificationRequirements",getArrayDecoder(Ue())]])}function l_(){return combineCodec(wn(),Un())}var $f=a(()=>{m();});function On(){return getStructEncoder([["requirementType",Gn()],["approvers",getArrayEncoder(getAddressEncoder())],["minApprovals",getU8Encoder()],["approvalTimeout",getI64Encoder()],["evidenceRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function Fn(){return getStructDecoder([["requirementType",Wn()],["approvers",getArrayDecoder(getAddressDecoder())],["minApprovals",getU8Decoder()],["approvalTimeout",getI64Decoder()],["evidenceRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function M_(){return combineCodec(On(),Fn())}var Qf=a(()=>{m();});function Gn(){return getEnumEncoder(Nn)}function Wn(){return getEnumDecoder(Nn)}function __(){return combineCodec(Gn(),Wn())}var Nn,Xf=a(()=>{Nn=(s=>(s[s.ManagerApproval=0]="ManagerApproval",s[s.PeerReview=1]="PeerReview",s[s.SecurityClearance=2]="SecurityClearance",s[s.BackgroundCheck=3]="BackgroundCheck",s[s.TrainingCompletion=4]="TrainingCompletion",s[s.CertificationRequired=5]="CertificationRequired",s[s.BusinessJustification=6]="BusinessJustification",s[s.TechnicalAssessment=7]="TechnicalAssessment",s))(Nn||{});});function eS(){return getStructEncoder([["agent",getAddressEncoder()],["owner",getAddressEncoder()],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["timestamp",getI64Encoder()]])}function tS(){return getStructDecoder([["agent",getAddressDecoder()],["owner",getAddressDecoder()],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["timestamp",getI64Decoder()]])}function j_(){return combineCodec(eS(),tS())}var nS=a(()=>{});function iS(){return getStructEncoder([["agent",getAddressEncoder()],["owner",getAddressEncoder()],["timestamp",getI64Encoder()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["isActive",getBooleanEncoder()]])}function cS(){return getStructDecoder([["agent",getAddressDecoder()],["owner",getAddressDecoder()],["timestamp",getI64Decoder()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["isActive",getBooleanDecoder()]])}function cz(){return combineCodec(iS(),cS())}var sS=a(()=>{});function Ln(){return getEnumEncoder(Bn)}function Vn(){return getEnumDecoder(Bn)}function uz(){return combineCodec(Ln(),Vn())}var Bn,aS=a(()=>{Bn=(r=>(r[r.Unregistered=0]="Unregistered",r[r.Registered=1]="Registered",r[r.Claimed=2]="Claimed",r[r.Verified=3]="Verified",r))(Bn||{});});function pS(){return getStructEncoder([["agent",getAddressEncoder()],["previousStatus",getBooleanEncoder()],["newStatus",getBooleanEncoder()],["timestamp",getI64Encoder()],["authority",getAddressEncoder()]])}function lS(){return getStructDecoder([["agent",getAddressDecoder()],["previousStatus",getBooleanDecoder()],["newStatus",getBooleanDecoder()],["timestamp",getI64Decoder()],["authority",getAddressDecoder()]])}function yz(){return combineCodec(pS(),lS())}var mS=a(()=>{});function fS(){return getStructEncoder([["agent",getAddressEncoder()],["owner",getAddressEncoder()],["timestamp",getI64Encoder()]])}function SS(){return getStructDecoder([["agent",getAddressDecoder()],["owner",getAddressDecoder()],["timestamp",getI64Decoder()]])}function hz(){return combineCodec(fS(),SS())}var xS=a(()=>{});function Kn(){return getStructEncoder([["agentPubkey",getAddressEncoder()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["supportedCapabilities",getArrayEncoder(getU64Encoder())],["verifiedAt",getI64Encoder()]])}function Hn(){return getStructDecoder([["agentPubkey",getAddressDecoder()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["supportedCapabilities",getArrayDecoder(getU64Decoder())],["verifiedAt",getI64Decoder()]])}function Nz(){return combineCodec(Kn(),Hn())}var DS=a(()=>{});function jn(){return getStructEncoder([["biometricType",_e()],["maxAge",getI64Encoder()],["refreshRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["degradationHandling",qn()]])}function $n(){return getStructDecoder([["biometricType",ze()],["maxAge",getI64Decoder()],["refreshRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["degradationHandling",Jn()]])}function eO(){return combineCodec(jn(),$n())}var hS=a(()=>{m();});function Qn(){return getStructEncoder([["actionType",Oe()],["requiredApprovers",getArrayEncoder(getAddressEncoder())],["minApprovals",getU8Encoder()],["approvalTimeout",getI64Encoder()]])}function Xn(){return getStructDecoder([["actionType",Fe()],["requiredApprovers",getArrayDecoder(getAddressDecoder())],["minApprovals",getU8Decoder()],["approvalTimeout",getI64Decoder()]])}function AO(){return combineCodec(Qn(),Xn())}var ES=a(()=>{m();});function ie(){return getDiscriminatedUnionEncoder([["FavorClient",getStructEncoder([["reason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])],["FavorAgent",getStructEncoder([["reason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])],["Split",getStructEncoder([["clientPercentage",getU8Encoder()],["reason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])]])}function ce(){return getDiscriminatedUnionDecoder([["FavorClient",getStructDecoder([["reason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])],["FavorAgent",getStructDecoder([["reason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])],["Split",getStructDecoder([["clientPercentage",getU8Decoder()],["reason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])]])}function fO(){return combineCodec(ie(),ce())}function SO(n,e){return Array.isArray(e)?{__kind:n,fields:e}:{__kind:n,...e??{}}}function xO(n,e){return e.__kind===n}var PS=a(()=>{});function Oe(){return getEnumEncoder(Zn)}function Fe(){return getEnumDecoder(Zn)}function PO(){return combineCodec(Oe(),Fe())}var Zn,CS=a(()=>{Zn=(l=>(l[l.AgentRegistered=0]="AgentRegistered",l[l.AgentUpdated=1]="AgentUpdated",l[l.AgentDeactivated=2]="AgentDeactivated",l[l.AgentVerified=3]="AgentVerified",l[l.PaymentProcessed=4]="PaymentProcessed",l[l.EscrowCreated=5]="EscrowCreated",l[l.EscrowReleased=6]="EscrowReleased",l[l.FundsWithdrawn=7]="FundsWithdrawn",l[l.ProposalCreated=8]="ProposalCreated",l[l.VoteCast=9]="VoteCast",l[l.ProposalExecuted=10]="ProposalExecuted",l[l.GovernanceUpdated=11]="GovernanceUpdated",l[l.AccessGranted=12]="AccessGranted",l[l.AccessRevoked=13]="AccessRevoked",l[l.SecurityPolicyUpdated=14]="SecurityPolicyUpdated",l[l.SuspiciousActivity=15]="SuspiciousActivity",l[l.ComplianceReportGenerated=16]="ComplianceReportGenerated",l[l.RegulatorySubmission=17]="RegulatorySubmission",l[l.AuditRequested=18]="AuditRequested",l[l.ViolationDetected=19]="ViolationDetected",l[l.SystemConfigUpdated=20]="SystemConfigUpdated",l[l.EmergencyAction=21]="EmergencyAction",l[l.MaintenancePerformed=22]="MaintenancePerformed",l[l.WorkOrderCreated=23]="WorkOrderCreated",l[l.WorkOrderCompleted=24]="WorkOrderCompleted",l[l.DisputeRaised=25]="DisputeRaised",l[l.DisputeResolved=26]="DisputeResolved",l[l.MultisigCreated=27]="MultisigCreated",l[l.MultisigSigned=28]="MultisigSigned",l[l.MultisigExecuted=29]="MultisigExecuted",l[l.RiskAssessmentPerformed=30]="RiskAssessmentPerformed",l[l.RiskThresholdExceeded=31]="RiskThresholdExceeded",l[l.RiskMitigationApplied=32]="RiskMitigationApplied",l))(Zn||{});});function Ge(){return getStructEncoder([["maxEntries",getU32Encoder()],["retentionPeriod",getI64Encoder()],["autoArchive",getBooleanEncoder()],["reportingFrequency",tr()],["approvalLevels",getArrayEncoder(Qn())],["encryptionRequired",getBooleanEncoder()],["backupFrequency",Yn()]])}function We(){return getStructDecoder([["maxEntries",getU32Decoder()],["retentionPeriod",getI64Decoder()],["autoArchive",getBooleanDecoder()],["reportingFrequency",nr()],["approvalLevels",getArrayDecoder(Xn())],["encryptionRequired",getBooleanDecoder()],["backupFrequency",er()]])}function _O(){return combineCodec(Ge(),We())}var IS=a(()=>{m();});function rr(){return getStructEncoder([["metadata",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function or(){return getStructDecoder([["metadata",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function KO(){return combineCodec(rr(),or())}var vS=a(()=>{});function ir(){return getStructEncoder([["entryId",getU64Encoder()],["timestamp",getI64Encoder()],["action",Oe()],["actor",getAddressEncoder()],["target",getOptionEncoder(getAddressEncoder())],["context",rr()],["complianceFlags",sr()],["previousHash",fixEncoderSize(getBytesEncoder(),32)],["entryHash",fixEncoderSize(getBytesEncoder(),32)],["signature",getOptionEncoder(fixEncoderSize(getBytesEncoder(),64))]])}function cr(){return getStructDecoder([["entryId",getU64Decoder()],["timestamp",getI64Decoder()],["action",Fe()],["actor",getAddressDecoder()],["target",getOptionDecoder(getAddressDecoder())],["context",or()],["complianceFlags",ar()],["previousHash",fixDecoderSize(getBytesDecoder(),32)],["entryHash",fixDecoderSize(getBytesDecoder(),32)],["signature",getOptionDecoder(fixDecoderSize(getBytesDecoder(),64))]])}function ZO(){return combineCodec(ir(),cr())}var _S=a(()=>{m();});function zS(){return getStructEncoder([["entity",getAddressEncoder()],["entityType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["timestamp",getI64Encoder()]])}function OS(){return getStructDecoder([["entity",getAddressDecoder()],["entityType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["timestamp",getI64Decoder()]])}function A8(){return combineCodec(zS(),OS())}var FS=a(()=>{});function ur(){return getEnumEncoder(dr)}function gr(){return getEnumDecoder(dr)}function y8(){return combineCodec(ur(),gr())}var dr,GS=a(()=>{dr=(r=>(r[r.Low=0]="Low",r[r.Medium=1]="Medium",r[r.High=2]="High",r[r.VeryHigh=3]="VeryHigh",r))(dr||{});});function pr(){return getEnumEncoder(Ar)}function lr(){return getEnumDecoder(Ar)}function x8(){return combineCodec(pr(),lr())}var Ar,WS=a(()=>{Ar=(p=>(p[p.Password=0]="Password",p[p.DigitalSignature=1]="DigitalSignature",p[p.Biometric=2]="Biometric",p[p.Token=3]="Token",p[p.Certificate=4]="Certificate",p[p.Sms=5]="Sms",p[p.Email=6]="Email",p[p.App=7]="App",p[p.Hardware=8]="Hardware",p))(Ar||{});});function mr(){return getStructEncoder([["mfaRequired",getBooleanEncoder()],["supportedMethods",getArrayEncoder(pr())],["strengthRequirements",Tr()],["lockoutPolicies",wn()],["biometricPolicies",getOptionEncoder(Sr())]])}function yr(){return getStructDecoder([["mfaRequired",getBooleanDecoder()],["supportedMethods",getArrayDecoder(lr())],["strengthRequirements",fr()],["lockoutPolicies",Un()],["biometricPolicies",getOptionDecoder(xr())]])}function M8(){return combineCodec(mr(),yr())}var NS=a(()=>{m();});function Tr(){return getStructEncoder([["minimumLevel",ur()],["riskBased",getBooleanEncoder()],["adaptive",getBooleanEncoder()],["stepUpTriggers",getArrayEncoder(Dr())]])}function fr(){return getStructDecoder([["minimumLevel",gr()],["riskBased",getBooleanDecoder()],["adaptive",getBooleanDecoder()],["stepUpTriggers",getArrayDecoder(hr())]])}function O8(){return combineCodec(Tr(),fr())}var VS=a(()=>{m();});function Er(){return getStructEncoder([["defaultDeny",getBooleanEncoder()],["explicitPermissionsRequired",getBooleanEncoder()]])}function Pr(){return getStructDecoder([["defaultDeny",getBooleanDecoder()],["explicitPermissionsRequired",getBooleanDecoder()]])}function N8(){return combineCodec(Er(),Pr())}var jS=a(()=>{});function Yn(){return getEnumEncoder(Cr)}function er(){return getEnumDecoder(Cr)}function K8(){return combineCodec(Yn(),er())}var Cr,$S=a(()=>{Cr=(r=>(r[r.Hourly=0]="Hourly",r[r.Daily=1]="Daily",r[r.Weekly=2]="Weekly",r[r.Monthly=3]="Monthly",r))(Cr||{});});function Sr(){return getStructEncoder([["supportedTypes",getArrayEncoder(_e())],["qualityRequirements",Ir()],["livenessDetection",getBooleanEncoder()],["templateProtection",br()]])}function xr(){return getStructDecoder([["supportedTypes",getArrayDecoder(ze())],["qualityRequirements",vr()],["livenessDetection",getBooleanDecoder()],["templateProtection",Rr()]])}function Z8(){return combineCodec(Sr(),xr())}var qS=a(()=>{m();});function br(){return getStructEncoder([["encryptionRequired",getBooleanEncoder()],["storageMethod",Mr()],["revocationSupport",getBooleanEncoder()],["agingPolicies",getArrayEncoder(jn())]])}function Rr(){return getStructDecoder([["encryptionRequired",getBooleanDecoder()],["storageMethod",kr()],["revocationSupport",getBooleanDecoder()],["agingPolicies",getArrayDecoder($n())]])}function oF(){return combineCodec(br(),Rr())}var XS=a(()=>{m();});function Ir(){return getStructEncoder([["score",getU8Encoder()]])}function vr(){return getStructDecoder([["score",getU8Decoder()]])}function uF(){return combineCodec(Ir(),vr())}var ZS=a(()=>{});function Mr(){return getEnumEncoder(wr)}function kr(){return getEnumDecoder(wr)}function lF(){return combineCodec(Mr(),kr())}var wr,YS=a(()=>{wr=(c=>(c[c.OnDevice=0]="OnDevice",c[c.Encrypted=1]="Encrypted",c[c.Hashed=2]="Hashed",c[c.Distributed=3]="Distributed",c[c.None=4]="None",c))(wr||{});});function _e(){return getEnumEncoder(Ur)}function ze(){return getEnumDecoder(Ur)}function fF(){return combineCodec(_e(),ze())}var Ur,ex=a(()=>{Ur=(d=>(d[d.Fingerprint=0]="Fingerprint",d[d.FaceRecognition=1]="FaceRecognition",d[d.IrisRecognition=2]="IrisRecognition",d[d.VoiceRecognition=3]="VoiceRecognition",d[d.Signature=4]="Signature",d[d.Gait=5]="Gait",d[d.Behavioral=6]="Behavioral",d))(Ur||{});});function sr(){return getStructEncoder([["requiresReporting",getBooleanEncoder()],["highRisk",getBooleanEncoder()],["sensitiveData",getBooleanEncoder()],["crossBorder",getBooleanEncoder()],["largeAmount",getBooleanEncoder()],["suspicious",getBooleanEncoder()],["manualReview",getBooleanEncoder()],["jurisdiction",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function ar(){return getStructDecoder([["requiresReporting",getBooleanDecoder()],["highRisk",getBooleanDecoder()],["sensitiveData",getBooleanDecoder()],["crossBorder",getBooleanDecoder()],["largeAmount",getBooleanDecoder()],["suspicious",getBooleanDecoder()],["manualReview",getBooleanDecoder()],["jurisdiction",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function MF(){return combineCodec(sr(),ar())}var tx=a(()=>{});function _r(){return getStructEncoder([["complianceScore",getU8Encoder()],["policyAdherenceRate",getU8Encoder()],["avgIncidentResponseTime",getU64Encoder()],["falsePositiveRate",getU8Encoder()],["coveragePercentage",getU8Encoder()],["auditReadinessScore",getU8Encoder()]])}function zr(){return getStructDecoder([["complianceScore",getU8Decoder()],["policyAdherenceRate",getU8Decoder()],["avgIncidentResponseTime",getU64Decoder()],["falsePositiveRate",getU8Decoder()],["coveragePercentage",getU8Decoder()],["auditReadinessScore",getU8Decoder()]])}function OF(){return combineCodec(_r(),zr())}var nx=a(()=>{});function Or(){return getStructEncoder([["frameworks",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["auditRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["reportingRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function Fr(){return getStructDecoder([["frameworks",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["auditRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["reportingRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function NF(){return combineCodec(Or(),Fr())}var rx=a(()=>{});function cx(){return getStructEncoder([["report",getAddressEncoder()],["reportId",getU64Encoder()],["reportType",se()],["complianceRate",getU64Encoder()]])}function sx(){return getStructDecoder([["report",getAddressDecoder()],["reportId",getU64Decoder()],["reportType",ae()],["complianceRate",getU64Decoder()]])}function jF(){return combineCodec(cx(),sx())}var ax=a(()=>{m();});function Gr(){return getStructEncoder([["status",getU8Encoder()]])}function Wr(){return getStructDecoder([["status",getU8Decoder()]])}function ZF(){return combineCodec(Gr(),Wr())}var dx=a(()=>{});function yx(){return getStructEncoder([["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["owner",getAddressEncoder()],["treeAuthority",getAddressEncoder()],["merkleTree",getAddressEncoder()],["dataHash",fixEncoderSize(getBytesEncoder(),32)],["index",getU64Encoder()],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["createdAt",getI64Encoder()]])}function Tx(){return getStructDecoder([["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["owner",getAddressDecoder()],["treeAuthority",getAddressDecoder()],["merkleTree",getAddressDecoder()],["dataHash",fixDecoderSize(getBytesDecoder(),32)],["index",getU64Decoder()],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["createdAt",getI64Decoder()]])}function uG(){return combineCodec(yx(),Tx())}var fx=a(()=>{});function Br(){return getEnumEncoder(Nr)}function Lr(){return getEnumDecoder(Nr)}function lG(){return combineCodec(Br(),Lr())}var Nr,Sx=a(()=>{Nr=(i=>(i[i.TimeDelay=0]="TimeDelay",i[i.TokenBalance=1]="TokenBalance",i[i.PriceThreshold=2]="PriceThreshold",i[i.VoteCount=3]="VoteCount",i[i.ExternalOracle=4]="ExternalOracle",i[i.CustomLogic=5]="CustomLogic",i))(Nr||{});});function Vr(){return getStructEncoder([["attribute",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["operator",Hr()],["value",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["valueType",$r()]])}function Kr(){return getStructDecoder([["attribute",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["operator",jr()],["value",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["valueType",qr()]])}function fG(){return combineCodec(Vr(),Kr())}var bx=a(()=>{m();});function Hr(){return getEnumEncoder(Jr)}function jr(){return getEnumDecoder(Jr)}function hG(){return combineCodec(Hr(),jr())}var Jr,Rx=a(()=>{Jr=(x=>(x[x.Equals=0]="Equals",x[x.NotEquals=1]="NotEquals",x[x.GreaterThan=2]="GreaterThan",x[x.LessThan=3]="LessThan",x[x.GreaterThanOrEqual=4]="GreaterThanOrEqual",x[x.LessThanOrEqual=5]="LessThanOrEqual",x[x.Contains=6]="Contains",x[x.NotContains=7]="NotContains",x[x.In=8]="In",x[x.NotIn=9]="NotIn",x[x.Matches=10]="Matches",x[x.NotMatches=11]="NotMatches",x))(Jr||{});});function Ne(){return getEnumEncoder(Qr)}function Be(){return getEnumDecoder(Qr)}function bG(){return combineCodec(Ne(),Be())}var Qr,Ix=a(()=>{Qr=(c=>(c[c.AgentIdentity=0]="AgentIdentity",c[c.ReputationScore=1]="ReputationScore",c[c.JobCompletion=2]="JobCompletion",c[c.DelegatedSigner=3]="DelegatedSigner",c[c.Custom=4]="Custom",c))(Qr||{});});function Zr(){return getEnumEncoder(Xr)}function Yr(){return getEnumDecoder(Xr)}function MG(){return combineCodec(Zr(),Yr())}var Xr,vx=a(()=>{Xr=(r=>(r[r.Pending=0]="Pending",r[r.Active=1]="Active",r[r.Revoked=2]="Revoked",r[r.Expired=3]="Expired",r))(Xr||{});});function Le(){return getEnumEncoder(eo)}function Ve(){return getEnumDecoder(eo)}function _G(){return combineCodec(Le(),Ve())}var eo,Mx=a(()=>{eo=(r=>(r[r.NotSynced=0]="NotSynced",r[r.SyncPending=1]="SyncPending",r[r.SyncedToCrossmint=2]="SyncedToCrossmint",r[r.SyncFailed=3]="SyncFailed",r))(eo||{});});function no(){return getEnumEncoder(to)}function ro(){return getEnumDecoder(to)}function GG(){return combineCodec(no(),ro())}var to,kx=a(()=>{to=(c=>(c[c.Public=0]="Public",c[c.Internal=1]="Internal",c[c.Confidential=2]="Confidential",c[c.Restricted=3]="Restricted",c[c.TopSecret=4]="TopSecret",c))(to||{});});function oo(){return getStructEncoder([["encryptionRequired",getBooleanEncoder()],["classificationRequired",getBooleanEncoder()],["dlpEnabled",getBooleanEncoder()]])}function io(){return getStructDecoder([["encryptionRequired",getBooleanDecoder()],["classificationRequired",getBooleanDecoder()],["dlpEnabled",getBooleanDecoder()]])}function LG(){return combineCodec(oo(),io())}var wx=a(()=>{});function qn(){return getEnumEncoder(co)}function Jn(){return getEnumDecoder(co)}function jG(){return combineCodec(qn(),Jn())}var co,Ux=a(()=>{co=(r=>(r[r.RequireRefresh=0]="RequireRefresh",r[r.GradualDegradation=1]="GradualDegradation",r[r.ImmediateExpiry=2]="ImmediateExpiry",r[r.AdaptiveThreshold=3]="AdaptiveThreshold",r))(co||{});});function so(){return getStructEncoder([["delegator",getAddressEncoder()],["delegatedAt",getI64Encoder()],["scope",uo()],["expiresAt",getOptionEncoder(getI64Encoder())]])}function ao(){return getStructDecoder([["delegator",getAddressDecoder()],["delegatedAt",getI64Decoder()],["scope",go()],["expiresAt",getOptionDecoder(getI64Decoder())]])}function e2(){return combineCodec(so(),ao())}var Ox=a(()=>{m();});function uo(){return getDiscriminatedUnionEncoder([["All",getUnitEncoder()],["ProposalType",getStructEncoder([["fields",getTupleEncoder([de()])]])],["SingleProposal",getUnitEncoder()],["Limited",getUnitEncoder()]])}function go(){return getDiscriminatedUnionDecoder([["All",getUnitDecoder()],["ProposalType",getStructDecoder([["fields",getTupleDecoder([ue()])]])],["SingleProposal",getUnitDecoder()],["Limited",getUnitDecoder()]])}function a2(){return combineCodec(uo(),go())}function d2(n,e){return Array.isArray(e)?{__kind:n,fields:e}:{__kind:n,...e??{}}}function u2(n,e){return e.__kind===n}var Fx=a(()=>{m();});function Gx(){return getStructEncoder([["escrowId",getU64Encoder()],["agent",getAddressEncoder()],["deliveryProof",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function Wx(){return getStructDecoder([["escrowId",getU64Decoder()],["agent",getAddressDecoder()],["deliveryProof",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function P2(){return combineCodec(Gx(),Wx())}var Nx=a(()=>{});function Bx(){return getStructEncoder([["escrowId",getU64Encoder()],["client",getAddressEncoder()],["reason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function Lx(){return getStructDecoder([["escrowId",getU64Decoder()],["client",getAddressDecoder()],["reason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function G2(){return combineCodec(Bx(),Lx())}var Vx=a(()=>{});function Kx(){return getStructEncoder([["escrowId",getU64Encoder()],["decision",ie()],["arbitrator",getAddressEncoder()]])}function Hx(){return getStructDecoder([["escrowId",getU64Decoder()],["decision",ce()],["arbitrator",getAddressDecoder()]])}function j2(){return combineCodec(Kx(),Hx())}var jx=a(()=>{m();});function Ao(){return getStructEncoder([["breakGlassEnabled",getBooleanEncoder()],["emergencyContacts",getArrayEncoder(getAddressEncoder())],["approvalRequired",getBooleanEncoder()]])}function po(){return getStructDecoder([["breakGlassEnabled",getBooleanDecoder()],["emergencyContacts",getArrayDecoder(getAddressDecoder())],["approvalRequired",getBooleanDecoder()]])}function eW(){return combineCodec(Ao(),po())}var Jx=a(()=>{});function lo(){return getStructEncoder([["emergencyContacts",getArrayEncoder(getAddressEncoder())],["emergencyThreshold",getU8Encoder()],["emergencyTimeout",getI64Encoder()],["emergencyTransactionTypes",getArrayEncoder(Ke())],["freezeEnabled",getBooleanEncoder()],["frozen",getBooleanEncoder()],["frozenAt",getOptionEncoder(getI64Encoder())],["autoUnfreezeDuration",getOptionEncoder(getI64Encoder())]])}function mo(){return getStructDecoder([["emergencyContacts",getArrayDecoder(getAddressDecoder())],["emergencyThreshold",getU8Decoder()],["emergencyTimeout",getI64Decoder()],["emergencyTransactionTypes",getArrayDecoder(He())],["freezeEnabled",getBooleanDecoder()],["frozen",getBooleanDecoder()],["frozenAt",getOptionDecoder(getI64Decoder())],["autoUnfreezeDuration",getOptionDecoder(getI64Decoder())]])}function aW(){return combineCodec(lo(),mo())}var nD=a(()=>{m();});function je(){return getEnumEncoder(yo)}function $e(){return getEnumDecoder(yo)}function AW(){return combineCodec(je(),$e())}var yo,rD=a(()=>{yo=(r=>(r[r.Hard=0]="Hard",r[r.Soft=1]="Soft",r[r.Advisory=2]="Advisory",r[r.ExceptionBased=3]="ExceptionBased",r))(yo||{});});function cD(){return getStructEncoder([["escrowId",getU64Encoder()],["agent",getAddressEncoder()],["amount",getU64Encoder()]])}function sD(){return getStructDecoder([["escrowId",getU64Decoder()],["agent",getAddressDecoder()],["amount",getU64Decoder()]])}function fW(){return combineCodec(cD(),sD())}var aD=a(()=>{});function pD(){return getStructEncoder([["escrowId",getU64Encoder()],["client",getAddressEncoder()],["agent",getAddressEncoder()],["amount",getU64Encoder()],["deadline",getI64Encoder()]])}function lD(){return getStructDecoder([["escrowId",getU64Decoder()],["client",getAddressDecoder()],["agent",getAddressDecoder()],["amount",getU64Decoder()],["deadline",getI64Decoder()]])}function PW(){return combineCodec(pD(),lD())}var mD=a(()=>{});function fo(){return getEnumEncoder(To)}function So(){return getEnumDecoder(To)}function IW(){return combineCodec(fo(),So())}var To,yD=a(()=>{To=(r=>(r[r.Active=0]="Active",r[r.Completed=1]="Completed",r[r.Disputed=2]="Disputed",r[r.Cancelled=3]="Cancelled",r))(To||{});});function ge(){return getStructEncoder([["conditionType",Br()],["targetValue",getU64Encoder()],["currentValue",getU64Encoder()],["met",getBooleanEncoder()],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function Ae(){return getStructDecoder([["conditionType",Lr()],["targetValue",getU64Decoder()],["currentValue",getU64Decoder()],["met",getBooleanDecoder()],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function NW(){return combineCodec(ge(),Ae())}var SD=a(()=>{m();});function qe(){return getStructEncoder([["instructions",getArrayEncoder(xo())],["executionDelay",getI64Encoder()],["executionConditions",getArrayEncoder(ge())],["cancellable",getBooleanEncoder()],["autoExecute",getBooleanEncoder()],["executionAuthority",getAddressEncoder()]])}function Je(){return getStructDecoder([["instructions",getArrayDecoder(Do())],["executionDelay",getI64Decoder()],["executionConditions",getArrayDecoder(Ae())],["cancellable",getBooleanDecoder()],["autoExecute",getBooleanDecoder()],["executionAuthority",getAddressDecoder()]])}function qW(){return combineCodec(qe(),Je())}var PD=a(()=>{m();});function ho(){return getStructEncoder([["platform",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["externalId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["verified",getBooleanEncoder()],["verifiedAt",getI64Encoder()]])}function Eo(){return getStructDecoder([["platform",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["externalId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["verified",getBooleanDecoder()],["verifiedAt",getI64Decoder()]])}function n6(){return combineCodec(ho(),Eo())}var kD=a(()=>{});function Po(){return getStructEncoder([["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["latitudeRange",bo()],["longitudeRange",Io()],["radius",getOptionEncoder(getU32Encoder())]])}function Co(){return getStructDecoder([["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["latitudeRange",Ro()],["longitudeRange",vo()],["radius",getOptionDecoder(getU32Decoder())]])}function A6(){return combineCodec(Po(),Co())}var _D=a(()=>{m();});function zD(){return getStructEncoder([["agent",getAddressEncoder()],["amount",getU64Encoder()],["reason",Qe()],["newTier",j()]])}function OD(){return getStructDecoder([["agent",getAddressDecoder()],["amount",getU64Decoder()],["reason",Xe()],["newTier",$()]])}function x6(){return combineCodec(zD(),OD())}var FD=a(()=>{m();});function ND(){return getStructEncoder([["agent",getAddressEncoder()],["amount",getU64Encoder()],["unlockAt",getI64Encoder()],["reputationBoostBps",getU16Encoder()],["tier",j()],["dailyApiCalls",getU32Encoder()],["votingPower",getU64Encoder()]])}function BD(){return getStructDecoder([["agent",getAddressDecoder()],["amount",getU64Decoder()],["unlockAt",getI64Decoder()],["reputationBoostBps",getU16Decoder()],["tier",$()],["dailyApiCalls",getU32Decoder()],["votingPower",getU64Decoder()]])}function w6(){return combineCodec(ND(),BD())}var LD=a(()=>{m();});function VD(){return getStructEncoder([["agent",getAddressEncoder()],["amount",getU64Encoder()]])}function KD(){return getStructDecoder([["agent",getAddressDecoder()],["amount",getU64Decoder()]])}function N6(){return combineCodec(VD(),KD())}var HD=a(()=>{});function qD(){return getStructEncoder([["proposal",getAddressEncoder()],["proposalId",getU64Encoder()],["proposer",getAddressEncoder()],["title",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function JD(){return getStructDecoder([["proposal",getAddressDecoder()],["proposalId",getU64Decoder()],["proposer",getAddressDecoder()],["title",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Z6(){return combineCodec(qD(),JD())}var QD=a(()=>{});function Mo(){return getStructEncoder([["level",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["value",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["includeDescendants",getBooleanEncoder()]])}function ko(){return getStructDecoder([["level",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["value",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["includeDescendants",getBooleanDecoder()]])}function oN(){return combineCodec(Mo(),ko())}var rh=a(()=>{});function wo(){return getStructEncoder([["responseTeam",getArrayEncoder(getAddressEncoder())],["escalationProcedures",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["notificationRequirements",getArrayEncoder(we())]])}function Uo(){return getStructDecoder([["responseTeam",getArrayDecoder(getAddressDecoder())],["escalationProcedures",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["notificationRequirements",getArrayDecoder(Ue())]])}function yN(){return combineCodec(wo(),Uo())}var oh=a(()=>{m();});function bo(){return getStructEncoder([["min",getF64Encoder()],["max",getF64Encoder()]])}function Ro(){return getStructDecoder([["min",getF64Decoder()],["max",getF64Decoder()]])}function xN(){return combineCodec(bo(),Ro())}var sh=a(()=>{});function No(){return getStructEncoder([["allowedCountries",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["blockedCountries",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["allowedIpRanges",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["blockedIpRanges",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["geofencingEnabled",getBooleanEncoder()],["allowedRegions",getArrayEncoder(Po())]])}function Bo(){return getStructDecoder([["allowedCountries",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["blockedCountries",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["allowedIpRanges",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["blockedIpRanges",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["geofencingEnabled",getBooleanDecoder()],["allowedRegions",getArrayDecoder(Co())]])}function bN(){return combineCodec(No(),Bo())}var ah=a(()=>{m();});function Io(){return getStructEncoder([["min",getF64Encoder()],["max",getF64Encoder()]])}function vo(){return getStructDecoder([["min",getF64Decoder()],["max",getF64Decoder()]])}function MN(){return combineCodec(Io(),vo())}var gh=a(()=>{});function Ze(){return getStructEncoder([["threshold",getU8Encoder()]])}function Ye(){return getStructDecoder([["threshold",getU8Decoder()]])}function ON(){return combineCodec(Ze(),Ye())}var Ah=a(()=>{});function mh(){return getStructEncoder([["multisigId",getU64Encoder()],["multisigType",pe()],["owner",getAddressEncoder()],["threshold",getU8Encoder()],["signerCount",getU8Encoder()],["timestamp",getI64Encoder()]])}function yh(){return getStructDecoder([["multisigId",getU64Decoder()],["multisigType",le()],["owner",getAddressDecoder()],["threshold",getU8Decoder()],["signerCount",getU8Decoder()],["timestamp",getI64Decoder()]])}function jN(){return combineCodec(mh(),yh())}var Th=a(()=>{m();});function Lo(){return getStructEncoder([["signer",getAddressEncoder()],["signature",fixEncoderSize(getBytesEncoder(),64)],["signedAt",getI64Encoder()],["signatureMethod",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["verificationData",getOptionEncoder(addEncoderSizePrefix(getBytesEncoder(),getU32Encoder()))]])}function Vo(){return getStructDecoder([["signer",getAddressDecoder()],["signature",fixDecoderSize(getBytesDecoder(),64)],["signedAt",getI64Decoder()],["signatureMethod",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["verificationData",getOptionDecoder(addDecoderSizePrefix(getBytesDecoder(),getU32Decoder()))]])}function c4(){return combineCodec(Lo(),Vo())}var Ph=a(()=>{});function pe(){return getEnumEncoder(Ko)}function le(){return getEnumDecoder(Ko)}function u4(){return combineCodec(pe(),le())}var Ko,Ch=a(()=>{Ko=(i=>(i[i.Protocol=0]="Protocol",i[i.Dao=1]="Dao",i[i.Dispute=2]="Dispute",i[i.AgentConsortium=3]="AgentConsortium",i[i.AgentTreasury=4]="AgentTreasury",i[i.Custom=5]="Custom",i))(Ko||{});});function Ho(){return getStructEncoder([["multisigType",pe()],["timelockSeconds",getI64Encoder()],["minSigners",getU8Encoder()],["maxSigners",getU8Encoder()],["minReputationScore",getU16Encoder()],["requiresTokenHoldings",getBooleanEncoder()],["minTokenBalance",getU64Encoder()]])}function jo(){return getStructDecoder([["multisigType",le()],["timelockSeconds",getI64Decoder()],["minSigners",getU8Decoder()],["maxSigners",getU8Decoder()],["minReputationScore",getU16Decoder()],["requiresTokenHoldings",getBooleanDecoder()],["minTokenBalance",getU64Decoder()]])}function h4(){return combineCodec(Ho(),jo())}var Ih=a(()=>{m();});function $o(){return getStructEncoder([["firewallRequired",getBooleanEncoder()],["intrusionDetection",getBooleanEncoder()],["trafficMonitoring",getBooleanEncoder()]])}function qo(){return getStructDecoder([["firewallRequired",getBooleanDecoder()],["intrusionDetection",getBooleanDecoder()],["trafficMonitoring",getBooleanDecoder()]])}function b4(){return combineCodec($o(),qo())}var vh=a(()=>{});function Qo(){return getEnumEncoder(Jo)}function Xo(){return getEnumDecoder(Jo)}function M4(){return combineCodec(Qo(),Xo())}var Jo,Mh=a(()=>{Jo=(i=>(i[i.OnChain=0]="OnChain",i[i.Email=1]="Email",i[i.Sms=2]="Sms",i[i.Push=3]="Push",i[i.InApp=4]="InApp",i[i.All=5]="All",i))(Jo||{});});function Yo(){return getEnumEncoder(Zo)}function ei(){return getEnumDecoder(Zo)}function _4(){return combineCodec(Yo(),ei())}var Zo,kh=a(()=>{Zo=(c=>(c[c.Low=0]="Low",c[c.Medium=1]="Medium",c[c.High=2]="High",c[c.Critical=3]="Critical",c[c.Emergency=4]="Emergency",c))(Zo||{});});function we(){return getStructEncoder([["eventType",ii()],["targets",getArrayEncoder(ti())],["method",Qo()],["timing",ri()]])}function Ue(){return getStructDecoder([["eventType",ci()],["targets",getArrayDecoder(ni())],["method",Xo()],["timing",oi()]])}function N4(){return combineCodec(we(),Ue())}var wh=a(()=>{m();});function ti(){return getStructEncoder([["targetType",si()],["targetId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["priority",Yo()]])}function ni(){return getStructDecoder([["targetType",ai()],["targetId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["priority",ei()]])}function Q4(){return combineCodec(ti(),ni())}var Uh=a(()=>{m();});function si(){return getEnumEncoder(di)}function ai(){return getEnumDecoder(di)}function eB(){return combineCodec(si(),ai())}var di,_h=a(()=>{di=(d=>(d[d.User=0]="User",d[d.Administrator=1]="Administrator",d[d.SecurityTeam=2]="SecurityTeam",d[d.ComplianceTeam=3]="ComplianceTeam",d[d.Manager=4]="Manager",d[d.AuditTeam=5]="AuditTeam",d[d.ExternalSystem=6]="ExternalSystem",d))(di||{});});function ri(){return getEnumEncoder(ui)}function oi(){return getEnumDecoder(ui)}function oB(){return combineCodec(ri(),oi())}var ui,zh=a(()=>{ui=(r=>(r[r.Immediate=0]="Immediate",r[r.Delayed=1]="Delayed",r[r.Batched=2]="Batched",r[r.Scheduled=3]="Scheduled",r))(ui||{});});function gi(){return getStructEncoder([["minimumLength",getU8Encoder()],["complexityRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["historyCount",getU8Encoder()],["maxAge",getI64Encoder()]])}function Ai(){return getStructDecoder([["minimumLength",getU8Decoder()],["complexityRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["historyCount",getU8Decoder()],["maxAge",getI64Decoder()]])}function fB(){return combineCodec(gi(),Ai())}var Gh=a(()=>{});function pi(){return getStructEncoder([["transactionId",getU64Encoder()],["transactionType",Ke()],["target",getAddressEncoder()],["data",addEncoderSizePrefix(getBytesEncoder(),getU32Encoder())],["requiredSignatures",getU8Encoder()],["signatures",getArrayEncoder(Lo())],["createdAt",getI64Encoder()],["expiresAt",getI64Encoder()],["priority",Ti()],["executionConditions",getArrayEncoder(ge())],["status",Si()],["timeLock",getOptionEncoder(mi())]])}function li(){return getStructDecoder([["transactionId",getU64Decoder()],["transactionType",He()],["target",getAddressDecoder()],["data",addDecoderSizePrefix(getBytesDecoder(),getU32Decoder())],["requiredSignatures",getU8Decoder()],["signatures",getArrayDecoder(Vo())],["createdAt",getI64Decoder()],["expiresAt",getI64Decoder()],["priority",fi()],["executionConditions",getArrayDecoder(Ae())],["status",xi()],["timeLock",getOptionDecoder(yi())]])}function OB(){return combineCodec(pi(),li())}var Vh=a(()=>{m();});function Ri(){return getStructEncoder([["permissionId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["resourceType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["actions",getArrayEncoder(Mn())],["scope",Ui()],["constraints",getArrayEncoder(vi())],["metadata",ki()]])}function Ii(){return getStructDecoder([["permissionId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["resourceType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["actions",getArrayDecoder(kn())],["scope",_i()],["constraints",getArrayDecoder(Mi())],["metadata",wi()]])}function NB(){return combineCodec(Ri(),Ii())}var jh=a(()=>{m();});function vi(){return getStructEncoder([["constraintType",zi()],["conditions",getArrayEncoder(Vr())],["enforcement",je()]])}function Mi(){return getStructDecoder([["constraintType",Oi()],["conditions",getArrayDecoder(Kr())],["enforcement",$e()]])}function jB(){return combineCodec(vi(),Mi())}var $h=a(()=>{m();});function zi(){return getEnumEncoder(Fi)}function Oi(){return getEnumDecoder(Fi)}function QB(){return combineCodec(zi(),Oi())}var Fi,qh=a(()=>{Fi=(i=>(i[i.Temporal=0]="Temporal",i[i.Contextual=1]="Contextual",i[i.Conditional=2]="Conditional",i[i.ResourceBased=3]="ResourceBased",i[i.AttributeBased=4]="AttributeBased",i[i.RiskBased=5]="RiskBased",i))(Fi||{});});function ki(){return getStructEncoder([["businessJustification",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["riskAssessment",Gi()],["complianceMapping",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["relatedPermissions",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["owner",getOptionEncoder(getAddressEncoder())],["lastReview",getOptionEncoder(getI64Encoder())],["reviewFrequency",getI64Encoder()]])}function wi(){return getStructDecoder([["businessJustification",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["riskAssessment",Wi()],["complianceMapping",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["relatedPermissions",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["owner",getOptionDecoder(getAddressDecoder())],["lastReview",getOptionDecoder(getI64Decoder())],["reviewFrequency",getI64Decoder()]])}function nL(){return combineCodec(ki(),wi())}var tE=a(()=>{m();});function Ui(){return getStructEncoder([["scopeType",Li()],["boundaries",Ni()],["hierarchical",getBooleanEncoder()],["inherited",getBooleanEncoder()]])}function _i(){return getStructDecoder([["scopeType",Vi()],["boundaries",Bi()],["hierarchical",getBooleanDecoder()],["inherited",getBooleanDecoder()]])}function cL(){return combineCodec(Ui(),_i())}var oE=a(()=>{m();});function Sn(){return getStructEncoder([["author",getOptionEncoder(getAddressEncoder())],["approver",getOptionEncoder(getAddressEncoder())],["approvalDate",getOptionEncoder(getI64Encoder())],["businessJustification",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["complianceReferences",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["riskAssessment",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["reviewSchedule",ji()]])}function xn(){return getStructDecoder([["author",getOptionDecoder(getAddressDecoder())],["approver",getOptionDecoder(getAddressDecoder())],["approvalDate",getOptionDecoder(getI64Decoder())],["businessJustification",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["complianceReferences",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["riskAssessment",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["reviewSchedule",$i()]])}function lL(){return combineCodec(Sn(),xn())}var sE=a(()=>{m();});function Dn(){return getStructEncoder([["ruleId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["conditions",getArrayEncoder(qi())],["effect",Qi()],["priority",getU8Encoder()],["enabled",getBooleanEncoder()]])}function hn(){return getStructDecoder([["ruleId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["conditions",getArrayDecoder(Ji())],["effect",Xi()],["priority",getU8Decoder()],["enabled",getBooleanDecoder()]])}function ML(){return combineCodec(Dn(),hn())}var aE=a(()=>{m();});function En(){return getStructEncoder([["subjects",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["resources",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["actions",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["inheritance",Zi()]])}function Pn(){return getStructDecoder([["subjects",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["resources",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["actions",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["inheritance",Yi()]])}function _L(){return combineCodec(En(),Pn())}var dE=a(()=>{m();});function Cn(){return getEnumEncoder(ec)}function bn(){return getEnumDecoder(ec)}function GL(){return combineCodec(Cn(),bn())}var ec,uE=a(()=>{ec=(i=>(i[i.Active=0]="Active",i[i.Inactive=1]="Inactive",i[i.Draft=2]="Draft",i[i.UnderReview=3]="UnderReview",i[i.Deprecated=4]="Deprecated",i[i.Suspended=5]="Suspended",i))(ec||{});});function Rn(){return getEnumEncoder(tc)}function In(){return getEnumDecoder(tc)}function LL(){return combineCodec(Rn(),In())}var tc,gE=a(()=>{tc=(i=>(i[i.Allow=0]="Allow",i[i.Deny=1]="Deny",i[i.Conditional=2]="Conditional",i[i.Delegated=3]="Delegated",i[i.Temporary=4]="Temporary",i[i.Emergency=5]="Emergency",i))(tc||{});});function J(){return getEnumEncoder(Et)}function Q(){return getEnumDecoder(Et)}function jL(){return combineCodec(J(),Q())}var Et,AE=a(()=>{Et=(s=>(s[s.Fixed=0]="Fixed",s[s.Hourly=1]="Hourly",s[s.PerTask=2]="PerTask",s[s.Subscription=3]="Subscription",s[s.Auction=4]="Auction",s[s.Dynamic=5]="Dynamic",s[s.RevenueShare=6]="RevenueShare",s[s.Tiered=7]="Tiered",s))(Et||{});});function nc(){return getStructEncoder([["pubkey",getAddressEncoder()],["isSigner",getBooleanEncoder()],["isWritable",getBooleanEncoder()],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function rc(){return getStructDecoder([["pubkey",getAddressDecoder()],["isSigner",getBooleanDecoder()],["isWritable",getBooleanDecoder()],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function oV(){return combineCodec(nc(),rc())}var mE=a(()=>{});function xo(){return getStructEncoder([["programId",getAddressEncoder()],["accounts",getArrayEncoder(nc())],["data",addEncoderSizePrefix(getBytesEncoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function Do(){return getStructDecoder([["programId",getAddressDecoder()],["accounts",getArrayDecoder(rc())],["data",addDecoderSizePrefix(getBytesDecoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function yV(){return combineCodec(xo(),Do())}var xE=a(()=>{m();});function cc(){return getStructEncoder([["ipfsHash",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["externalReferences",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["tags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["riskAssessment",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["impactAnalysis",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["implementationTimeline",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function sc(){return getStructDecoder([["ipfsHash",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["externalReferences",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["tags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["riskAssessment",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["impactAnalysis",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["implementationTimeline",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function xV(){return combineCodec(cc(),sc())}var EE=a(()=>{});function dc(){return getEnumEncoder(ac)}function uc(){return getEnumDecoder(ac)}function PV(){return combineCodec(dc(),uc())}var ac,PE=a(()=>{ac=(s=>(s[s.Draft=0]="Draft",s[s.Active=1]="Active",s[s.Passed=2]="Passed",s[s.Failed=3]="Failed",s[s.Executed=4]="Executed",s[s.Cancelled=5]="Cancelled",s[s.Expired=6]="Expired",s[s.Queued=7]="Queued",s))(ac||{});});function de(){return getEnumEncoder(Pt)}function ue(){return getEnumDecoder(Pt)}function IV(){return combineCodec(de(),ue())}var Pt,Jg=a(()=>{Pt=(s=>(s[s.ParameterUpdate=0]="ParameterUpdate",s[s.ProtocolUpgrade=1]="ProtocolUpgrade",s[s.TreasuryOperation=2]="TreasuryOperation",s[s.FeeUpdate=3]="FeeUpdate",s[s.SecurityUpdate=4]="SecurityUpdate",s[s.GovernanceUpdate=5]="GovernanceUpdate",s[s.EmergencyAction=6]="EmergencyAction",s[s.Custom=7]="Custom",s))(Pt||{});});function vE(){return getStructEncoder([["authority",getAddressEncoder()],["feesEnabled",getBooleanEncoder()],["escrowFeeBps",getU16Encoder()],["agentRegistrationFee",getU64Encoder()],["listingFee",getU64Encoder()],["disputeFeeBps",getU16Encoder()],["timestamp",getI64Encoder()]])}function ME(){return getStructDecoder([["authority",getAddressDecoder()],["feesEnabled",getBooleanDecoder()],["escrowFeeBps",getU16Decoder()],["agentRegistrationFee",getU64Decoder()],["listingFee",getU64Decoder()],["disputeFeeBps",getU16Decoder()],["timestamp",getI64Decoder()]])}function GV(){return combineCodec(vE(),ME())}var kE=a(()=>{});function Ac(){return getEnumEncoder(gc)}function pc(){return getEnumDecoder(gc)}function LV(){return combineCodec(Ac(),pc())}var gc,wE=a(()=>{gc=(r=>(r[r.Absolute=0]="Absolute",r[r.Relative=1]="Relative",r[r.Weighted=2]="Weighted",r[r.Dynamic=3]="Dynamic",r))(gc||{});});function lc(){return getStructEncoder([["minimumParticipation",getU8Encoder()],["approvalThreshold",getU8Encoder()],["superMajorityRequired",getBooleanEncoder()],["minimumVotingPower",getU64Encoder()],["quorumMethod",Ac()]])}function mc(){return getStructDecoder([["minimumParticipation",getU8Decoder()],["approvalThreshold",getU8Decoder()],["superMajorityRequired",getBooleanDecoder()],["minimumVotingPower",getU64Decoder()],["quorumMethod",pc()]])}function QV(){return combineCodec(lc(),mc())}var zE=a(()=>{m();});function GE(){return getStructEncoder([["rbacConfig",getAddressEncoder()],["authority",getAddressEncoder()],["rolesCount",getU32Encoder()]])}function WE(){return getStructDecoder([["rbacConfig",getAddressDecoder()],["authority",getAddressDecoder()],["rolesCount",getU32Decoder()]])}function n3(){return combineCodec(GE(),WE())}var NE=a(()=>{});function Tc(){return getEnumEncoder(yc)}function fc(){return getEnumDecoder(yc)}function c3(){return combineCodec(Tc(),fc())}var yc,BE=a(()=>{yc=(t=>(t[t.Unlocked=0]="Unlocked",t[t.Locked=1]="Locked",t))(yc||{});});function Sc(){return getStructEncoder([["summary",Ec()],["entries",getArrayEncoder(Dc())],["complianceMetrics",_r()],["riskIndicators",getArrayEncoder(Cc())],["recommendations",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function xc(){return getStructDecoder([["summary",Pc()],["entries",getArrayDecoder(hc())],["complianceMetrics",zr()],["riskIndicators",getArrayDecoder(bc())],["recommendations",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function y3(){return combineCodec(Sc(),xc())}var LE=a(()=>{m();});function Dc(){return getStructEncoder([["data",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function hc(){return getStructDecoder([["data",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function b3(){return combineCodec(Dc(),hc())}var VE=a(()=>{});function tr(){return getEnumEncoder(Rc)}function nr(){return getEnumDecoder(Rc)}function M3(){return combineCodec(tr(),nr())}var Rc,KE=a(()=>{Rc=(i=>(i[i.Daily=0]="Daily",i[i.Weekly=1]="Weekly",i[i.Monthly=2]="Monthly",i[i.Quarterly=3]="Quarterly",i[i.Annually=4]="Annually",i[i.OnDemand=5]="OnDemand",i))(Rc||{});});function vc(){return getEnumEncoder(Ic)}function Mc(){return getEnumDecoder(Ic)}function _3(){return combineCodec(vc(),Mc())}var Ic,HE=a(()=>{Ic=(d=>(d[d.Draft=0]="Draft",d[d.Generated=1]="Generated",d[d.Reviewed=2]="Reviewed",d[d.Approved=3]="Approved",d[d.Submitted=4]="Submitted",d[d.Acknowledged=5]="Acknowledged",d[d.Rejected=6]="Rejected",d))(Ic||{});});function Ec(){return getStructEncoder([["totalTransactions",getU64Encoder()],["totalVolume",getU64Encoder()],["highRiskTransactions",getU64Encoder()],["complianceViolations",getU64Encoder()],["securityIncidents",getU64Encoder()],["averageRiskScore",getU8Encoder()]])}function Pc(){return getStructDecoder([["totalTransactions",getU64Decoder()],["totalVolume",getU64Decoder()],["highRiskTransactions",getU64Decoder()],["complianceViolations",getU64Decoder()],["securityIncidents",getU64Decoder()],["averageRiskScore",getU8Decoder()]])}function N3(){return combineCodec(Ec(),Pc())}var jE=a(()=>{});function se(){return getEnumEncoder(kc)}function ae(){return getEnumDecoder(kc)}function K3(){return combineCodec(se(),ae())}var kc,$E=a(()=>{kc=(s=>(s[s.FinancialTransactions=0]="FinancialTransactions",s[s.SuspiciousActivity=1]="SuspiciousActivity",s[s.RegulatoryCompliance=2]="RegulatoryCompliance",s[s.SecurityIncidents=3]="SecurityIncidents",s[s.AuditSummary=4]="AuditSummary",s[s.RiskAssessment=5]="RiskAssessment",s[s.GovernanceActivity=6]="GovernanceActivity",s[s.DataPrivacyCompliance=7]="DataPrivacyCompliance",s))(kc||{});});function ct(){return getStructEncoder([["sourceType",wc()],["score",getU64Encoder()],["weight",getU32Encoder()],["lastUpdated",getI64Encoder()],["dataPoints",getU64Encoder()]])}function st(){return getStructDecoder([["sourceType",Uc()],["score",getU64Decoder()],["weight",getU32Decoder()],["lastUpdated",getI64Decoder()],["dataPoints",getU64Decoder()]])}function Z3(){return combineCodec(ct(),st())}var QE=a(()=>{m();});function XE(){return getStructEncoder([["agent",getAddressEncoder()],["timestamp",getI64Encoder()]])}function ZE(){return getStructDecoder([["agent",getAddressDecoder()],["timestamp",getI64Decoder()]])}function c5(){return combineCodec(XE(),ZE())}var YE=a(()=>{});function eP(){return getStructEncoder([["agent",getAddressEncoder()],["paymentSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["amount",getU64Encoder()],["responseTimeMs",getU64Encoder()],["success",getBooleanEncoder()],["newReputationScore",getU64Encoder()],["timestamp",getI64Encoder()]])}function tP(){return getStructDecoder([["agent",getAddressDecoder()],["paymentSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["amount",getU64Decoder()],["responseTimeMs",getU64Decoder()],["success",getBooleanDecoder()],["newReputationScore",getU64Decoder()],["timestamp",getI64Decoder()]])}function h5(){return combineCodec(eP(),tP())}var nP=a(()=>{});function iP(){return getStructEncoder([["agent",getAddressEncoder()],["client",getAddressEncoder()],["rating",getU8Encoder()],["newReputationScore",getU64Encoder()],["timestamp",getI64Encoder()]])}function cP(){return getStructDecoder([["agent",getAddressDecoder()],["client",getAddressDecoder()],["rating",getU8Decoder()],["newReputationScore",getU64Decoder()],["timestamp",getI64Decoder()]])}function w5(){return combineCodec(iP(),cP())}var sP=a(()=>{});function wc(){return getEnumEncoder(_c)}function Uc(){return getEnumDecoder(_c)}function O5(){return combineCodec(wc(),Uc())}var _c,aP=a(()=>{_c=(s=>(s[s.AccountAge=0]="AccountAge",s[s.X402Transactions=1]="X402Transactions",s[s.UserReviews=2]="UserReviews",s[s.ElizaOSReputation=3]="ElizaOSReputation",s[s.CrossmintVerification=4]="CrossmintVerification",s[s.EndpointReliability=5]="EndpointReliability",s[s.JobCompletions=6]="JobCompletions",s[s.SkillEndorsements=7]="SkillEndorsements",s))(_c||{});});function dP(){return getStructEncoder([["agent",getAddressEncoder()],["totalTags",getU32Encoder()],["skillTagsCount",getU32Encoder()],["behaviorTagsCount",getU32Encoder()],["complianceTagsCount",getU32Encoder()],["tagScoresCount",getU32Encoder()],["timestamp",getI64Encoder()]])}function uP(){return getStructDecoder([["agent",getAddressDecoder()],["totalTags",getU32Decoder()],["skillTagsCount",getU32Decoder()],["behaviorTagsCount",getU32Decoder()],["complianceTagsCount",getU32Decoder()],["tagScoresCount",getU32Decoder()],["timestamp",getI64Decoder()]])}function K5(){return combineCodec(dP(),uP())}var gP=a(()=>{});function zc(){return getStructEncoder([["maxUsage",getU8Encoder()]])}function Oc(){return getStructDecoder([["maxUsage",getU8Decoder()]])}function Q5(){return combineCodec(zc(),Oc())}var AP=a(()=>{});function ji(){return getStructEncoder([["frequency",getI64Encoder()],["lastReview",getOptionEncoder(getI64Encoder())],["nextReview",getI64Encoder()],["reviewOwners",getArrayEncoder(getAddressEncoder())],["reviewCriteria",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function $i(){return getStructDecoder([["frequency",getI64Decoder()],["lastReview",getOptionDecoder(getI64Decoder())],["nextReview",getI64Decoder()],["reviewOwners",getArrayDecoder(getAddressDecoder())],["reviewCriteria",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function u9(){return combineCodec(ji(),$i())}var mP=a(()=>{});function Wc(){return getStructEncoder([["accepted",getBooleanEncoder()],["acceptingAuthority",getOptionEncoder(getAddressEncoder())],["acceptanceDate",getOptionEncoder(getI64Encoder())],["reasoning",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["reviewDate",getOptionEncoder(getI64Encoder())]])}function Nc(){return getStructDecoder([["accepted",getBooleanDecoder()],["acceptingAuthority",getOptionDecoder(getAddressDecoder())],["acceptanceDate",getOptionDecoder(getI64Decoder())],["reasoning",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["reviewDate",getOptionDecoder(getI64Decoder())]])}function P9(){return combineCodec(Wc(),Nc())}var fP=a(()=>{});function Gi(){return getStructEncoder([["riskScore",getU8Encoder()],["riskFactors",getArrayEncoder(Bc())],["mitigationMeasures",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["riskAcceptance",Wc()]])}function Wi(){return getStructDecoder([["riskScore",getU8Decoder()],["riskFactors",getArrayDecoder(Lc())],["mitigationMeasures",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["riskAcceptance",Nc()]])}function O9(){return combineCodec(Gi(),Wi())}var DP=a(()=>{m();});function Kc(){return getEnumEncoder(Vc)}function Hc(){return getEnumDecoder(Vc)}function N9(){return combineCodec(Kc(),Hc())}var Vc,hP=a(()=>{Vc=(d=>(d[d.Operational=0]="Operational",d[d.Financial=1]="Financial",d[d.Compliance=2]="Compliance",d[d.Security=3]="Security",d[d.Reputational=4]="Reputational",d[d.Technical=5]="Technical",d[d.Legal=6]="Legal",d))(Vc||{});});function Bc(){return getStructEncoder([["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["category",Kc()],["impact",getU8Encoder()],["likelihood",getU8Encoder()],["riskScore",getU8Encoder()]])}function Lc(){return getStructDecoder([["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["category",Hc()],["impact",getU8Decoder()],["likelihood",getU8Decoder()],["riskScore",getU8Decoder()]])}function Q9(){return combineCodec(Bc(),Lc())}var EP=a(()=>{m();});function Cc(){return getStructEncoder([["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["currentValue",getU64Encoder()],["thresholdValue",getU64Encoder()],["trend",jc()],["severity",qc()],["recommendedActions",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function bc(){return getStructDecoder([["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["currentValue",getU64Decoder()],["thresholdValue",getU64Decoder()],["trend",$c()],["severity",Jc()],["recommendedActions",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function nK(){return combineCodec(Cc(),bc())}var wP=a(()=>{m();});function Xc(){return getEnumEncoder(Qc)}function Zc(){return getEnumDecoder(Qc)}function cK(){return combineCodec(Xc(),Zc())}var Qc,UP=a(()=>{Qc=(r=>(r[r.Low=0]="Low",r[r.Medium=1]="Medium",r[r.High=2]="High",r[r.Critical=3]="Critical",r))(Qc||{});});function at(){return getStructEncoder([["roleId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["roleType",is()],["permissions",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["constraints",Yc()],["inheritsFrom",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["metadata",ts()],["status",rs()],["createdAt",getI64Encoder()],["modifiedAt",getI64Encoder()]])}function dt(){return getStructDecoder([["roleId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["roleType",cs()],["permissions",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["constraints",es()],["inheritsFrom",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["metadata",ns()],["status",os()],["createdAt",getI64Decoder()],["modifiedAt",getI64Decoder()]])}function uK(){return combineCodec(at(),dt())}var GP=a(()=>{m();});function Yc(){return getStructEncoder([["timeConstraints",getOptionEncoder(gs())],["locationConstraints",getOptionEncoder(No())],["resourceConstraints",getOptionEncoder(zc())],["sessionConstraints",getOptionEncoder(ss())],["sodConstraints",getArrayEncoder(ds())],["maxConcurrentSessions",getOptionEncoder(getU32Encoder())],["activationRequirements",getArrayEncoder(On())]])}function es(){return getStructDecoder([["timeConstraints",getOptionDecoder(As())],["locationConstraints",getOptionDecoder(Bo())],["resourceConstraints",getOptionDecoder(Oc())],["sessionConstraints",getOptionDecoder(as())],["sodConstraints",getArrayDecoder(us())],["maxConcurrentSessions",getOptionDecoder(getU32Decoder())],["activationRequirements",getArrayDecoder(Fn())]])}function yK(){return combineCodec(Yc(),es())}var BP=a(()=>{m();});function ts(){return getStructEncoder([["businessPurpose",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["riskLevel",Xc()],["dataAccessLevel",no()],["complianceRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["roleOwner",getOptionEncoder(getAddressEncoder())],["roleCustodian",getOptionEncoder(getAddressEncoder())],["reviewFrequency",getI64Encoder()],["lastReview",getOptionEncoder(getI64Encoder())],["nextReview",getOptionEncoder(getI64Encoder())]])}function ns(){return getStructDecoder([["businessPurpose",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["riskLevel",Zc()],["dataAccessLevel",ro()],["complianceRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["roleOwner",getOptionDecoder(getAddressDecoder())],["roleCustodian",getOptionDecoder(getAddressDecoder())],["reviewFrequency",getI64Decoder()],["lastReview",getOptionDecoder(getI64Decoder())],["nextReview",getOptionDecoder(getI64Decoder())]])}function hK(){return combineCodec(ts(),ns())}var QP=a(()=>{m();});function rs(){return getEnumEncoder(ms)}function os(){return getEnumDecoder(ms)}function bK(){return combineCodec(rs(),os())}var ms,XP=a(()=>{ms=(c=>(c[c.Active=0]="Active",c[c.Inactive=1]="Inactive",c[c.Deprecated=2]="Deprecated",c[c.UnderReview=3]="UnderReview",c[c.Suspended=4]="Suspended",c))(ms||{});});function is(){return getEnumEncoder(ys)}function cs(){return getEnumDecoder(ys)}function MK(){return combineCodec(is(),cs())}var ys,ZP=a(()=>{ys=(s=>(s[s.Administrative=0]="Administrative",s[s.Operational=1]="Operational",s[s.ReadOnly=2]="ReadOnly",s[s.Compliance=3]="Compliance",s[s.Emergency=4]="Emergency",s[s.Custom=5]="Custom",s[s.Service=6]="Service",s[s.Guest=7]="Guest",s))(ys||{});});function qi(){return getStructEncoder([["expression",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function Ji(){return getStructDecoder([["expression",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function NK(){return combineCodec(qi(),Ji())}var YP=a(()=>{});function Qi(){return getEnumEncoder(Ts)}function Xi(){return getEnumDecoder(Ts)}function KK(){return combineCodec(Qi(),Xi())}var Ts,eC=a(()=>{Ts=(i=>(i[i.Allow=0]="Allow",i[i.Deny=1]="Deny",i[i.AuditOnly=2]="AuditOnly",i[i.RequireApproval=3]="RequireApproval",i[i.RequireMfa=4]="RequireMfa",i[i.RequireJustification=5]="RequireJustification",i))(Ts||{});});function Ni(){return getStructEncoder([["includedResources",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["excludedResources",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["resourcePatterns",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["hierarchicalBoundaries",getArrayEncoder(Mo())]])}function Bi(){return getStructDecoder([["includedResources",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["excludedResources",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["resourcePatterns",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["hierarchicalBoundaries",getArrayDecoder(ko())]])}function qK(){return combineCodec(Ni(),Bi())}var tC=a(()=>{m();});function Zi(){return getEnumEncoder(xs)}function Yi(){return getEnumDecoder(xs)}function ZK(){return combineCodec(Zi(),Yi())}var xs,nC=a(()=>{xs=(r=>(r[r.None=0]="None",r[r.Hierarchical=1]="Hierarchical",r[r.Delegated=2]="Delegated",r[r.Inherited=3]="Inherited",r))(xs||{});});function Li(){return getEnumEncoder(Ds)}function Vi(){return getEnumDecoder(Ds)}function nH(){return combineCodec(Li(),Vi())}var Ds,rC=a(()=>{Ds=(i=>(i[i.Global=0]="Global",i[i.Organization=1]="Organization",i[i.Department=2]="Department",i[i.Project=3]="Project",i[i.Resource=4]="Resource",i[i.Individual=5]="Individual",i))(Ds||{});});function ii(){return getEnumEncoder(hs)}function ci(){return getEnumDecoder(hs)}function cH(){return combineCodec(ii(),ci())}var hs,oC=a(()=>{hs=(s=>(s[s.AccountLockout=0]="AccountLockout",s[s.PasswordChange=1]="PasswordChange",s[s.PrivilegeEscalation=2]="PrivilegeEscalation",s[s.SuspiciousActivity=3]="SuspiciousActivity",s[s.PolicyViolation=4]="PolicyViolation",s[s.AccessDenied=5]="AccessDenied",s[s.DataBreach=6]="DataBreach",s[s.SystemCompromise=7]="SystemCompromise",s))(hs||{});});function Es(){return getStructEncoder([["authentication",mr()],["authorization",Er()],["password",gi()],["session",Cs()],["dataProtection",oo()],["networkSecurity",$o()],["incidentResponse",wo()],["compliance",Or()]])}function Ps(){return getStructDecoder([["authentication",yr()],["authorization",Pr()],["password",Ai()],["session",bs()],["dataProtection",io()],["networkSecurity",qo()],["incidentResponse",Uo()],["compliance",Fr()]])}function uH(){return combineCodec(Es(),Ps())}var iC=a(()=>{m();});function me(){return getStructEncoder([["id",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["serviceType",Rs()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function ye(){return getStructDecoder([["id",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["serviceType",Is()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function lH(){return combineCodec(me(),ye())}var cC=a(()=>{m();});function Rs(){return getEnumEncoder(vs)}function Is(){return getEnumDecoder(vs)}function fH(){return combineCodec(Rs(),Is())}var vs,sC=a(()=>{vs=(c=>(c[c.AIAgentService=0]="AIAgentService",c[c.DIDCommMessaging=1]="DIDCommMessaging",c[c.CredentialRepository=2]="CredentialRepository",c[c.LinkedDomains=3]="LinkedDomains",c[c.Custom=4]="Custom",c))(vs||{});});function ss(){return getStructEncoder([["maxSessionDuration",getI64Encoder()],["idleTimeout",getI64Encoder()],["reauthInterval",getI64Encoder()],["mfaRequired",getBooleanEncoder()],["deviceFingerprinting",getBooleanEncoder()],["sessionEncryption",getBooleanEncoder()]])}function as(){return getStructDecoder([["maxSessionDuration",getI64Decoder()],["idleTimeout",getI64Decoder()],["reauthInterval",getI64Decoder()],["mfaRequired",getBooleanDecoder()],["deviceFingerprinting",getBooleanDecoder()],["sessionEncryption",getBooleanDecoder()]])}function hH(){return combineCodec(ss(),as())}var aC=a(()=>{});function Cs(){return getStructEncoder([["maxSessionDuration",getI64Encoder()],["idleTimeout",getI64Encoder()],["concurrentSessions",getU8Encoder()]])}function bs(){return getStructDecoder([["maxSessionDuration",getI64Decoder()],["idleTimeout",getI64Decoder()],["concurrentSessions",getU8Decoder()]])}function IH(){return combineCodec(Cs(),bs())}var gC=a(()=>{});function Qe(){return getEnumEncoder(Ms)}function Xe(){return getEnumDecoder(Ms)}function wH(){return combineCodec(Qe(),Xe())}var Ms,AC=a(()=>{Ms=(o=>(o[o.Fraud=0]="Fraud",o[o.DisputeLoss=1]="DisputeLoss",o[o.Custom=2]="Custom",o))(Ms||{});});function ds(){return getStructEncoder([["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["conflictingRoles",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["constraintType",ks()],["enforcementLevel",je()],["exceptionProcedures",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function us(){return getStructDecoder([["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["conflictingRoles",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["constraintType",ws()],["enforcementLevel",$e()],["exceptionProcedures",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function OH(){return combineCodec(ds(),us())}var mC=a(()=>{m();});function ks(){return getEnumEncoder(Us)}function ws(){return getEnumDecoder(Us)}function NH(){return combineCodec(ks(),ws())}var Us,yC=a(()=>{Us=(r=>(r[r.Static=0]="Static",r[r.Dynamic=1]="Dynamic",r[r.Temporal=2]="Temporal",r[r.Contextual=3]="Contextual",r))(Us||{});});function SC(){return getStructEncoder([["agent",getAddressEncoder()],["sourceName",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["sourceScore",getU16Encoder()],["weightedAggregateScore",getU64Encoder()],["hasConflict",getBooleanEncoder()],["totalSources",getU32Encoder()],["timestamp",getI64Encoder()]])}function xC(){return getStructDecoder([["agent",getAddressDecoder()],["sourceName",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["sourceScore",getU16Decoder()],["weightedAggregateScore",getU64Decoder()],["hasConflict",getBooleanDecoder()],["totalSources",getU32Decoder()],["timestamp",getI64Decoder()]])}function o7(){return combineCodec(SC(),xC())}var DC=a(()=>{});function _s(){return getStructEncoder([["sourceName",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["score",getU16Encoder()],["weight",getU16Encoder()],["dataPoints",getU32Encoder()],["reliability",getU16Encoder()],["lastUpdated",getI64Encoder()]])}function zs(){return getStructDecoder([["sourceName",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["score",getU16Decoder()],["weight",getU16Decoder()],["dataPoints",getU32Decoder()],["reliability",getU16Decoder()],["lastUpdated",getI64Decoder()]])}function l7(){return combineCodec(_s(),zs())}var PC=a(()=>{});function Dr(){return getEnumEncoder(Os)}function hr(){return getEnumDecoder(Os)}function f7(){return combineCodec(Dr(),hr())}var Os,CC=a(()=>{Os=(d=>(d[d.HighRiskAction=0]="HighRiskAction",d[d.SensitiveData=1]="SensitiveData",d[d.LargeTransaction=2]="LargeTransaction",d[d.NewDevice=3]="NewDevice",d[d.UnusualLocation=4]="UnusualLocation",d[d.TimeBasedRisk=5]="TimeBasedRisk",d[d.BehaviorAnomaly=6]="BehaviorAnomaly",d))(Os||{});});function Fs(){return getStructEncoder([["submittedAt",getI64Encoder()],["regulatoryBody",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["submissionReference",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["acknowledged",getBooleanEncoder()],["acknowledgedAt",getOptionEncoder(getI64Encoder())],["regulatoryResponse",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function Gs(){return getStructDecoder([["submittedAt",getI64Decoder()],["regulatoryBody",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["submissionReference",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["acknowledged",getBooleanDecoder()],["acknowledgedAt",getOptionDecoder(getI64Decoder())],["regulatoryResponse",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function P7(){return combineCodec(Fs(),Gs())}var MC=a(()=>{});function UC(){return getStructEncoder([["agent",getAddressEncoder()],["tagsRemoved",getU32Encoder()],["remainingTags",getU32Encoder()],["timestamp",getI64Encoder()]])}function _C(){return getStructDecoder([["agent",getAddressDecoder()],["tagsRemoved",getU32Decoder()],["remainingTags",getU32Decoder()],["timestamp",getI64Decoder()]])}function w7(){return combineCodec(UC(),_C())}var zC=a(()=>{});function ut(){return getStructEncoder([["tagName",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["confidence",getU16Encoder()],["evidenceCount",getU32Encoder()],["lastUpdated",getI64Encoder()]])}function gt(){return getStructDecoder([["tagName",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["confidence",getU16Decoder()],["evidenceCount",getU32Decoder()],["lastUpdated",getI64Decoder()]])}function K7(){return combineCodec(ut(),gt())}var GC=a(()=>{});function BC(){return getStructEncoder([["agent",getAddressEncoder()],["oldTier",j()],["newTier",j()],["totalStaked",getU64Encoder()],["dailyApiCalls",getU32Encoder()],["votingPower",getU64Encoder()]])}function LC(){return getStructDecoder([["agent",getAddressDecoder()],["oldTier",$()],["newTier",$()],["totalStaked",getU64Decoder()],["dailyApiCalls",getU32Decoder()],["votingPower",getU64Decoder()]])}function Z7(){return combineCodec(BC(),LC())}var VC=a(()=>{m();});function gs(){return getStructEncoder([["allowedHours",addEncoderSizePrefix(getBytesEncoder(),getU32Encoder())],["allowedDays",addEncoderSizePrefix(getBytesEncoder(),getU32Encoder())],["timezone",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["maxSessionDuration",getOptionEncoder(getI64Encoder())],["expiresAt",getOptionEncoder(getI64Encoder())],["reactivationPeriod",getOptionEncoder(getI64Encoder())]])}function As(){return getStructDecoder([["allowedHours",addDecoderSizePrefix(getBytesDecoder(),getU32Decoder())],["allowedDays",addDecoderSizePrefix(getBytesDecoder(),getU32Decoder())],["timezone",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["maxSessionDuration",getOptionDecoder(getI64Decoder())],["expiresAt",getOptionDecoder(getI64Decoder())],["reactivationPeriod",getOptionDecoder(getI64Decoder())]])}function oj(){return combineCodec(gs(),As())}var jC=a(()=>{});function mi(){return getStructEncoder([["duration",getI64Encoder()],["lockedAt",getI64Encoder()],["unlocksAt",getI64Encoder()],["earlyUnlockConditions",getArrayEncoder(ge())],["lockType",Ws()],["cancellable",getBooleanEncoder()]])}function yi(){return getStructDecoder([["duration",getI64Decoder()],["lockedAt",getI64Decoder()],["unlocksAt",getI64Decoder()],["earlyUnlockConditions",getArrayDecoder(Ae())],["lockType",Ns()],["cancellable",getBooleanDecoder()]])}function Aj(){return combineCodec(mi(),yi())}var $C=a(()=>{m();});function Ws(){return getEnumEncoder(Bs)}function Ns(){return getEnumDecoder(Bs)}function yj(){return combineCodec(Ws(),Ns())}var Bs,qC=a(()=>{Bs=(r=>(r[r.Standard=0]="Standard",r[r.Vesting=1]="Vesting",r[r.Emergency=2]="Emergency",r[r.Governance=3]="Governance",r))(Bs||{});});function Ti(){return getEnumEncoder(Ls)}function fi(){return getEnumDecoder(Ls)}function xj(){return combineCodec(Ti(),fi())}var Ls,JC=a(()=>{Ls=(c=>(c[c.Low=0]="Low",c[c.Normal=1]="Normal",c[c.High=2]="High",c[c.Critical=3]="Critical",c[c.Emergency=4]="Emergency",c))(Ls||{});});function Si(){return getEnumEncoder(Vs)}function xi(){return getEnumDecoder(Vs)}function Pj(){return combineCodec(Si(),xi())}var Vs,QC=a(()=>{Vs=(d=>(d[d.Pending=0]="Pending",d[d.PartiallyApproved=1]="PartiallyApproved",d[d.FullyApproved=2]="FullyApproved",d[d.Executed=3]="Executed",d[d.Cancelled=4]="Cancelled",d[d.Expired=5]="Expired",d[d.Failed=6]="Failed",d))(Vs||{});});function Ke(){return getEnumEncoder(Ks)}function He(){return getEnumDecoder(Ks)}function Ij(){return combineCodec(Ke(),He())}var Ks,XC=a(()=>{Ks=(R=>(R[R.Transfer=0]="Transfer",R[R.Withdrawal=1]="Withdrawal",R[R.EscrowRelease=2]="EscrowRelease",R[R.ProposalCreation=3]="ProposalCreation",R[R.VoteExecution=4]="VoteExecution",R[R.ParameterUpdate=5]="ParameterUpdate",R[R.SignerAddition=6]="SignerAddition",R[R.SignerRemoval=7]="SignerRemoval",R[R.ThresholdUpdate=8]="ThresholdUpdate",R[R.ConfigUpdate=9]="ConfigUpdate",R[R.EmergencyFreeze=10]="EmergencyFreeze",R[R.EmergencyUnfreeze=11]="EmergencyUnfreeze",R[R.SecurityPolicyUpdate=12]="SecurityPolicyUpdate",R[R.ProtocolUpgrade=13]="ProtocolUpgrade",R[R.FeatureToggle=14]="FeatureToggle",R[R.RiskParameterUpdate=15]="RiskParameterUpdate",R[R.CustomInstruction=16]="CustomInstruction",R))(Ks||{});});function jc(){return getEnumEncoder(Hs)}function $c(){return getEnumDecoder(Hs)}function wj(){return combineCodec(jc(),$c())}var Hs,ZC=a(()=>{Hs=(r=>(r[r.Increasing=0]="Increasing",r[r.Decreasing=1]="Decreasing",r[r.Stable=2]="Stable",r[r.Unknown=3]="Unknown",r))(Hs||{});});function _n(){return getEnumEncoder(js)}function zn(){return getEnumDecoder(js)}function Oj(){return combineCodec(_n(),zn())}var js,YC=a(()=>{js=(c=>(c[c.TimeBasedAutoUnlock=0]="TimeBasedAutoUnlock",c[c.AdminUnlock=1]="AdminUnlock",c[c.SelfServiceUnlock=2]="SelfServiceUnlock",c[c.MultiFactorUnlock=3]="MultiFactorUnlock",c[c.SupervisorUnlock=4]="SupervisorUnlock",c))(js||{});});function $r(){return getEnumEncoder($s)}function qr(){return getEnumDecoder($s)}function Nj(){return combineCodec($r(),qr())}var $s,eb=a(()=>{$s=(s=>(s[s.String=0]="String",s[s.Number=1]="Number",s[s.Boolean=2]="Boolean",s[s.Date=3]="Date",s[s.Time=4]="Time",s[s.Duration=5]="Duration",s[s.List=6]="List",s[s.Object=7]="Object",s))($s||{});});function Te(){return getStructEncoder([["id",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["methodType",qs()],["controller",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["publicKeyMultibase",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["relationships",getArrayEncoder(Qs())],["createdAt",getI64Encoder()],["revoked",getBooleanEncoder()]])}function fe(){return getStructDecoder([["id",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["methodType",Js()],["controller",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["publicKeyMultibase",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["relationships",getArrayDecoder(Xs())],["createdAt",getI64Decoder()],["revoked",getBooleanDecoder()]])}function Qj(){return combineCodec(Te(),fe())}var tb=a(()=>{m();});function qs(){return getEnumEncoder(Zs)}function Js(){return getEnumDecoder(Zs)}function e$(){return combineCodec(qs(),Js())}var Zs,nb=a(()=>{Zs=(o=>(o[o.Ed25519VerificationKey2020=0]="Ed25519VerificationKey2020",o[o.X25519KeyAgreementKey2020=1]="X25519KeyAgreementKey2020",o[o.EcdsaSecp256k1VerificationKey2019=2]="EcdsaSecp256k1VerificationKey2019",o))(Zs||{});});function Qs(){return getEnumEncoder(Ys)}function Xs(){return getEnumDecoder(Ys)}function o$(){return combineCodec(Qs(),Xs())}var Ys,rb=a(()=>{Ys=(c=>(c[c.Authentication=0]="Authentication",c[c.AssertionMethod=1]="AssertionMethod",c[c.KeyAgreement=2]="KeyAgreement",c[c.CapabilityInvocation=3]="CapabilityInvocation",c[c.CapabilityDelegation=4]="CapabilityDelegation",c))(Ys||{});});function qc(){return getEnumEncoder(ea)}function Jc(){return getEnumDecoder(ea)}function a$(){return combineCodec(qc(),Jc())}var ea,ob=a(()=>{ea=(r=>(r[r.Low=0]="Low",r[r.Medium=1]="Medium",r[r.High=2]="High",r[r.Critical=3]="Critical",r))(ea||{});});function ta(){return getStructEncoder([["voter",getAddressEncoder()],["choice",ra()],["votingPower",getU64Encoder()],["votedAt",getI64Encoder()],["reasoning",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["delegationInfo",getOptionEncoder(so())]])}function na(){return getStructDecoder([["voter",getAddressDecoder()],["choice",oa()],["votingPower",getU64Decoder()],["votedAt",getI64Decoder()],["reasoning",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["delegationInfo",getOptionDecoder(ao())]])}function P$(){return combineCodec(ta(),na())}var sb=a(()=>{m();});function ra(){return getEnumEncoder(ia)}function oa(){return getEnumDecoder(ia)}function I$(){return combineCodec(ra(),oa())}var ia,ab=a(()=>{ia=(o=>(o[o.For=0]="For",o[o.Against=1]="Against",o[o.Abstain=2]="Abstain",o))(ia||{});});function aa(){return getStructEncoder([["votesFor",getU64Encoder()],["votesAgainst",getU64Encoder()],["votesAbstain",getU64Encoder()],["totalVotingPower",getU64Encoder()],["participationRate",getU8Encoder()],["individualVotes",getArrayEncoder(ta())],["weightedVoting",getBooleanEncoder()],["quorumReached",getBooleanEncoder()],["approvalThresholdMet",getBooleanEncoder()]])}function da(){return getStructDecoder([["votesFor",getU64Decoder()],["votesAgainst",getU64Decoder()],["votesAbstain",getU64Decoder()],["totalVotingPower",getU64Decoder()],["participationRate",getU8Decoder()],["individualVotes",getArrayDecoder(na())],["weightedVoting",getBooleanDecoder()],["quorumReached",getBooleanDecoder()],["approvalThresholdMet",getBooleanDecoder()]])}function O$(){return combineCodec(aa(),da())}var db=a(()=>{m();});var m=a(()=>{Wf();Lf();Vf();Kf();$f();Qf();Xf();nS();sS();aS();mS();xS();DS();hS();ES();PS();CS();IS();vS();_S();FS();GS();WS();NS();VS();jS();$S();qS();XS();ZS();YS();ex();tx();nx();rx();ax();dx();fx();Sx();bx();Rx();Ix();vx();Mx();kx();wx();Ux();Ox();Fx();Nx();Vx();jx();Jx();nD();rD();aD();mD();yD();SD();PD();kD();_D();FD();LD();HD();QD();rh();oh();sh();ah();gh();Ah();Th();Ph();Ch();Ih();vh();Mh();kh();wh();Uh();_h();zh();Gh();Vh();jh();$h();qh();tE();oE();sE();aE();dE();uE();gE();AE();mE();xE();EE();PE();Jg();kE();wE();zE();NE();BE();LE();VE();KE();HE();jE();$E();QE();YE();nP();sP();aP();gP();AP();mP();fP();DP();hP();EP();wP();UP();GP();BP();QP();XP();ZP();YP();eC();tC();nC();rC();oC();iC();cC();sC();aC();gC();AC();mC();yC();DC();PC();CC();MC();zC();GC();VC();jC();$C();qC();JC();QC();XC();ZC();YC();eb();tb();nb();rb();ob();sb();ab();db();});function q$(){return fixEncoderSize(getBytesEncoder(),8).encode(ep)}function lb(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["owner",getOptionEncoder(getAddressEncoder())],["status",Ln()],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["firstTxSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["firstSeenTimestamp",getI64Encoder()],["discoverySource",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["claimedAt",getOptionEncoder(getI64Encoder())],["agentType",getU8Encoder()],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["capabilities",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["pricingModel",J()],["reputationScore",getU32Encoder()],["totalJobsCompleted",getU32Encoder()],["totalEarnings",getU64Encoder()],["isActive",getBooleanEncoder()],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["originalPrice",getU64Encoder()],["genomeHash",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["isReplicable",getBooleanEncoder()],["replicationFee",getU64Encoder()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["isVerified",getBooleanEncoder()],["verificationTimestamp",getI64Encoder()],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["frameworkOrigin",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["supportedTokens",getArrayEncoder(getAddressEncoder())],["cnftMint",getOptionEncoder(getAddressEncoder())],["merkleTree",getOptionEncoder(getAddressEncoder())],["supportsA2a",getBooleanEncoder()],["transferHook",getOptionEncoder(getAddressEncoder())],["parentAgent",getOptionEncoder(getAddressEncoder())],["generation",getU32Encoder()],["x402Enabled",getBooleanEncoder()],["x402PaymentAddress",getAddressEncoder()],["x402AcceptedTokens",getArrayEncoder(getAddressEncoder())],["x402PricePerCall",getU64Encoder()],["x402ServiceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["x402TotalPayments",getU64Encoder()],["x402TotalCalls",getU64Encoder()],["lastPaymentTimestamp",getI64Encoder()],["externalIdentifiers",getArrayEncoder(ho())],["ghostScore",getU64Encoder()],["reputationComponents",getArrayEncoder(ct())],["didAddress",getOptionEncoder(getAddressEncoder())],["credentials",getArrayEncoder(getAddressEncoder())],["apiSpecUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["apiVersion",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["bump",getU8Encoder()]]),n=>({...n,discriminator:ep}))}function tp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["owner",getOptionDecoder(getAddressDecoder())],["status",Vn()],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["firstTxSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["firstSeenTimestamp",getI64Decoder()],["discoverySource",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["claimedAt",getOptionDecoder(getI64Decoder())],["agentType",getU8Decoder()],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["capabilities",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["pricingModel",Q()],["reputationScore",getU32Decoder()],["totalJobsCompleted",getU32Decoder()],["totalEarnings",getU64Decoder()],["isActive",getBooleanDecoder()],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["originalPrice",getU64Decoder()],["genomeHash",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["isReplicable",getBooleanDecoder()],["replicationFee",getU64Decoder()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["isVerified",getBooleanDecoder()],["verificationTimestamp",getI64Decoder()],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["frameworkOrigin",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["supportedTokens",getArrayDecoder(getAddressDecoder())],["cnftMint",getOptionDecoder(getAddressDecoder())],["merkleTree",getOptionDecoder(getAddressDecoder())],["supportsA2a",getBooleanDecoder()],["transferHook",getOptionDecoder(getAddressDecoder())],["parentAgent",getOptionDecoder(getAddressDecoder())],["generation",getU32Decoder()],["x402Enabled",getBooleanDecoder()],["x402PaymentAddress",getAddressDecoder()],["x402AcceptedTokens",getArrayDecoder(getAddressDecoder())],["x402PricePerCall",getU64Decoder()],["x402ServiceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["x402TotalPayments",getU64Decoder()],["x402TotalCalls",getU64Decoder()],["lastPaymentTimestamp",getI64Decoder()],["externalIdentifiers",getArrayDecoder(Eo())],["ghostScore",getU64Decoder()],["reputationComponents",getArrayDecoder(st())],["didAddress",getOptionDecoder(getAddressDecoder())],["credentials",getArrayDecoder(getAddressDecoder())],["apiSpecUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["apiVersion",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["bump",getU8Decoder()]])}function J$(){return combineCodec(lb(),tp())}function np(n){return decodeAccount(n,tp())}async function Q$(n,e,t){let o=await mb(n,e,t);return assertAccountExists(o),o}async function mb(n,e,t){let o=await fetchEncodedAccount(n,e,t);return np(o)}async function X$(n,e,t){let o=await yb(n,e,t);return assertAccountsExist(o),o}async function yb(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>np(r))}var ep,Tb=a(()=>{m();ep=new Uint8Array([47,166,112,147,155,197,86,7]);});function mq(){return fixEncoderSize(getBytesEncoder(),8).encode(ip)}function Ib(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agent",getAddressEncoder()],["authorizedSource",getAddressEncoder()],["indexLimit",getU64Encoder()],["currentIndex",getU64Encoder()],["expiresAt",getI64Encoder()],["network",getU8Encoder()],["signature",fixEncoderSize(getBytesEncoder(),64)],["nonce",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["revoked",getBooleanEncoder()],["createdAt",getI64Encoder()],["lastUsedAt",getOptionEncoder(getI64Encoder())],["totalReputationChange",getI64Encoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:ip}))}function cp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agent",getAddressDecoder()],["authorizedSource",getAddressDecoder()],["indexLimit",getU64Decoder()],["currentIndex",getU64Decoder()],["expiresAt",getI64Decoder()],["network",getU8Decoder()],["signature",fixDecoderSize(getBytesDecoder(),64)],["nonce",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["revoked",getBooleanDecoder()],["createdAt",getI64Decoder()],["lastUsedAt",getOptionDecoder(getI64Decoder())],["totalReputationChange",getI64Decoder()],["bump",getU8Decoder()]])}function yq(){return combineCodec(Ib(),cp())}function sp(n){return decodeAccount(n,cp())}async function Tq(n,e,t){let o=await vb(n,e,t);return assertAccountExists(o),o}async function vb(n,e,t){let o=await fetchEncodedAccount(n,e,t);return sp(o)}async function fq(n,e,t){let o=await Mb(n,e,t);return assertAccountsExist(o),o}async function Mb(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>sp(r))}var ip,kb=a(()=>{ip=new Uint8Array([30,249,165,44,155,194,188,175]);});function _q(){return fixEncoderSize(getBytesEncoder(),8).encode(ap)}function Ob(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["treeCreator",getAddressEncoder()],["treeDelegate",getAddressEncoder()],["numMinted",getU64Encoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:ap}))}function dp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["treeCreator",getAddressDecoder()],["treeDelegate",getAddressDecoder()],["numMinted",getU64Decoder()],["bump",getU8Decoder()]])}function zq(){return combineCodec(Ob(),dp())}function up(n){return decodeAccount(n,dp())}async function Oq(n,e,t){let o=await Fb(n,e,t);return assertAccountExists(o),o}async function Fb(n,e,t){let o=await fetchEncodedAccount(n,e,t);return up(o)}async function Fq(n,e,t){let o=await Gb(n,e,t);return assertAccountsExist(o),o}async function Gb(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>up(r))}function Gq(){return 81}var ap,Wb=a(()=>{ap=new Uint8Array([145,145,156,0,197,232,130,245]);});function eJ(){return fixEncoderSize(getBytesEncoder(),8).encode(gp)}function jb(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agent",getAddressEncoder()],["verifier",getAddressEncoder()],["verificationData",Kn()],["createdAt",getI64Encoder()],["expiresAt",getI64Encoder()],["isActive",getBooleanEncoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:gp}))}function Ap(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agent",getAddressDecoder()],["verifier",getAddressDecoder()],["verificationData",Hn()],["createdAt",getI64Decoder()],["expiresAt",getI64Decoder()],["isActive",getBooleanDecoder()],["bump",getU8Decoder()]])}function tJ(){return combineCodec(jb(),Ap())}function pp(n){return decodeAccount(n,Ap())}async function nJ(n,e,t){let o=await $b(n,e,t);return assertAccountExists(o),o}async function $b(n,e,t){let o=await fetchEncodedAccount(n,e,t);return pp(o)}async function rJ(n,e,t){let o=await qb(n,e,t);return assertAccountsExist(o),o}async function qb(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>pp(r))}var gp,Jb=a(()=>{m();gp=new Uint8Array([128,155,95,241,66,207,166,59]);});function SJ(){return fixEncoderSize(getBytesEncoder(),8).encode(yp)}function eR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authority",getAddressEncoder()],["trailId",getU64Encoder()],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["version",getU8Encoder()],["entries",getArrayEncoder(ir())],["config",Ge()],["complianceStatus",Gr()],["hashChain",getArrayEncoder(fixEncoderSize(getBytesEncoder(),32))],["reserved",fixEncoderSize(getBytesEncoder(),128)]]),n=>({...n,discriminator:yp}))}function Tp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authority",getAddressDecoder()],["trailId",getU64Decoder()],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["version",getU8Decoder()],["entries",getArrayDecoder(cr())],["config",We()],["complianceStatus",Wr()],["hashChain",getArrayDecoder(fixDecoderSize(getBytesDecoder(),32))],["reserved",fixDecoderSize(getBytesDecoder(),128)]])}function xJ(){return combineCodec(eR(),Tp())}function fp(n){return decodeAccount(n,Tp())}async function DJ(n,e,t){let o=await tR(n,e,t);return assertAccountExists(o),o}async function tR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return fp(o)}async function hJ(n,e,t){let o=await nR(n,e,t);return assertAccountsExist(o),o}async function nR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>fp(r))}var yp,rR=a(()=>{m();yp=new Uint8Array([171,223,253,181,134,88,66,26]);});function NJ(){return fixEncoderSize(getBytesEncoder(),8).encode(Dp)}function lR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authorization",getAddressEncoder()],["agent",getAddressEncoder()],["authorizedSource",getAddressEncoder()],["usageIndex",getU64Encoder()],["reputationChange",getI64Encoder()],["usedAt",getI64Encoder()],["transactionSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["metadata",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["bump",getU8Encoder()]]),n=>({...n,discriminator:Dp}))}function hp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authorization",getAddressDecoder()],["agent",getAddressDecoder()],["authorizedSource",getAddressDecoder()],["usageIndex",getU64Decoder()],["reputationChange",getI64Decoder()],["usedAt",getI64Decoder()],["transactionSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["metadata",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["bump",getU8Decoder()]])}function BJ(){return combineCodec(lR(),hp())}function Ep(n){return decodeAccount(n,hp())}async function LJ(n,e,t){let o=await mR(n,e,t);return assertAccountExists(o),o}async function mR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Ep(o)}async function VJ(n,e,t){let o=await yR(n,e,t);return assertAccountsExist(o),o}async function yR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Ep(r))}var Dp,TR=a(()=>{Dp=new Uint8Array([109,102,102,17,210,84,85,210]);});function rQ(){return fixEncoderSize(getBytesEncoder(),8).encode(Ip)}function fR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["reportId",getU64Encoder()],["reportType",se()],["generatedAt",getI64Encoder()],["periodStart",getI64Encoder()],["periodEnd",getI64Encoder()],["reportData",Sc()],["signature",fixEncoderSize(getBytesEncoder(),64)],["status",vc()],["submissionDetails",getOptionEncoder(Fs())],["reserved",fixEncoderSize(getBytesEncoder(),64)]]),n=>({...n,discriminator:Ip}))}function vp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["reportId",getU64Decoder()],["reportType",ae()],["generatedAt",getI64Decoder()],["periodStart",getI64Decoder()],["periodEnd",getI64Decoder()],["reportData",xc()],["signature",fixDecoderSize(getBytesDecoder(),64)],["status",Mc()],["submissionDetails",getOptionDecoder(Gs())],["reserved",fixDecoderSize(getBytesDecoder(),64)]])}function oQ(){return combineCodec(fR(),vp())}function Mp(n){return decodeAccount(n,vp())}async function iQ(n,e,t){let o=await SR(n,e,t);return assertAccountExists(o),o}async function SR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Mp(o)}async function cQ(n,e,t){let o=await xR(n,e,t);return assertAccountsExist(o),o}async function xR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Mp(r))}var Ip,DR=a(()=>{m();Ip=new Uint8Array([75,146,78,26,130,240,228,35]);});function fQ(){return fixEncoderSize(getBytesEncoder(),8).encode(Bp)}function hR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["template",getAddressEncoder()],["subject",getAddressEncoder()],["issuer",getAddressEncoder()],["credentialId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["subjectDataHash",fixEncoderSize(getBytesEncoder(),32)],["subjectDataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["status",Zr()],["signature",fixEncoderSize(getBytesEncoder(),64)],["issuedAt",getI64Encoder()],["expiresAt",getOptionEncoder(getI64Encoder())],["revokedAt",getOptionEncoder(getI64Encoder())],["crossChainStatus",Le()],["crossmintCredentialId",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["sourceAccount",getOptionEncoder(getAddressEncoder())],["bump",getU8Encoder()]]),n=>({...n,discriminator:Bp}))}function Lp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["template",getAddressDecoder()],["subject",getAddressDecoder()],["issuer",getAddressDecoder()],["credentialId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["subjectDataHash",fixDecoderSize(getBytesDecoder(),32)],["subjectDataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["status",Yr()],["signature",fixDecoderSize(getBytesDecoder(),64)],["issuedAt",getI64Decoder()],["expiresAt",getOptionDecoder(getI64Decoder())],["revokedAt",getOptionDecoder(getI64Decoder())],["crossChainStatus",Ve()],["crossmintCredentialId",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["sourceAccount",getOptionDecoder(getAddressDecoder())],["bump",getU8Decoder()]])}function SQ(){return combineCodec(hR(),Lp())}function Vp(n){return decodeAccount(n,Lp())}async function xQ(n,e,t){let o=await ER(n,e,t);return assertAccountExists(o),o}async function ER(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Vp(o)}async function DQ(n,e,t){let o=await PR(n,e,t);return assertAccountsExist(o),o}async function PR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Vp(r))}var Bp,CR=a(()=>{m();Bp=new Uint8Array([145,44,68,220,67,46,100,135]);});function VQ(){return fixEncoderSize(getBytesEncoder(),8).encode(Qp)}function MR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["credentialType",getAddressEncoder()],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["imageUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["issuer",getAddressEncoder()],["isActive",getBooleanEncoder()],["totalIssued",getU64Encoder()],["createdAt",getI64Encoder()],["crossmintTemplateId",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["bump",getU8Encoder()]]),n=>({...n,discriminator:Qp}))}function Xp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["credentialType",getAddressDecoder()],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["imageUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["issuer",getAddressDecoder()],["isActive",getBooleanDecoder()],["totalIssued",getU64Decoder()],["createdAt",getI64Decoder()],["crossmintTemplateId",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["bump",getU8Decoder()]])}function KQ(){return combineCodec(MR(),Xp())}function Zp(n){return decodeAccount(n,Xp())}async function HQ(n,e,t){let o=await kR(n,e,t);return assertAccountExists(o),o}async function kR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Zp(o)}async function jQ(n,e,t){let o=await wR(n,e,t);return assertAccountsExist(o),o}async function wR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Zp(r))}var Qp,UR=a(()=>{Qp=new Uint8Array([229,129,99,91,179,207,66,75]);});function lX(){return fixEncoderSize(getBytesEncoder(),8).encode(il)}function OR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authority",getAddressEncoder()],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["kind",Ne()],["schemaUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["isActive",getBooleanEncoder()],["totalIssued",getU64Encoder()],["createdAt",getI64Encoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:il}))}function cl(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authority",getAddressDecoder()],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["kind",Be()],["schemaUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["isActive",getBooleanDecoder()],["totalIssued",getU64Decoder()],["createdAt",getI64Decoder()],["bump",getU8Decoder()]])}function mX(){return combineCodec(OR(),cl())}function sl(n){return decodeAccount(n,cl())}async function yX(n,e,t){let o=await FR(n,e,t);return assertAccountExists(o),o}async function FR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return sl(o)}async function TX(n,e,t){let o=await GR(n,e,t);return assertAccountsExist(o),o}async function GR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>sl(r))}var il,WR=a(()=>{m();il=new Uint8Array([132,171,20,181,39,219,217,112]);});function FX(){return fixEncoderSize(getBytesEncoder(),8).encode(ll)}function LR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["did",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["controller",getAddressEncoder()],["verificationMethods",getArrayEncoder(Te())],["serviceEndpoints",getArrayEncoder(me())],["context",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["alsoKnownAs",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["version",getU32Encoder()],["deactivated",getBooleanEncoder()],["deactivatedAt",getOptionEncoder(getI64Encoder())],["bump",getU8Encoder()]]),n=>({...n,discriminator:ll}))}function ml(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["did",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["controller",getAddressDecoder()],["verificationMethods",getArrayDecoder(fe())],["serviceEndpoints",getArrayDecoder(ye())],["context",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["alsoKnownAs",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["version",getU32Decoder()],["deactivated",getBooleanDecoder()],["deactivatedAt",getOptionDecoder(getI64Decoder())],["bump",getU8Decoder()]])}function GX(){return combineCodec(LR(),ml())}function yl(n){return decodeAccount(n,ml())}async function WX(n,e,t){let o=await VR(n,e,t);return assertAccountExists(o),o}async function VR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return yl(o)}async function NX(n,e,t){let o=await KR(n,e,t);return assertAccountsExist(o),o}async function KR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>yl(r))}var ll,HR=a(()=>{m();ll=new Uint8Array([109,220,168,224,33,173,192,166]);});function cZ(){return fixEncoderSize(getBytesEncoder(),8).encode(Tl)}function nI(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["ghostPubkey",getAddressEncoder()],["platform",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["externalId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["createdAt",getI64Encoder()],["verified",getBooleanEncoder()],["verifiedAt",getOptionEncoder(getI64Encoder())],["bump",getU8Encoder()]]),n=>({...n,discriminator:Tl}))}function fl(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["ghostPubkey",getAddressDecoder()],["platform",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["externalId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["createdAt",getI64Decoder()],["verified",getBooleanDecoder()],["verifiedAt",getOptionDecoder(getI64Decoder())],["bump",getU8Decoder()]])}function sZ(){return combineCodec(nI(),fl())}function Sl(n){return decodeAccount(n,fl())}async function aZ(n,e,t){let o=await rI(n,e,t);return assertAccountExists(o),o}async function rI(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Sl(o)}async function dZ(n,e,t){let o=await oI(n,e,t);return assertAccountsExist(o),o}async function oI(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Sl(r))}var Tl,iI=a(()=>{Tl=new Uint8Array([180,218,64,128,181,84,116,180]);});function EZ(){return fixEncoderSize(getBytesEncoder(),8).encode(Ml)}function uI(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["escrowId",getU64Encoder()],["client",getAddressEncoder()],["agent",getAddressEncoder()],["amount",getU64Encoder()],["tokenMint",getAddressEncoder()],["status",fo()],["jobDescription",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["deliveryProof",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["deadline",getI64Encoder()],["createdAt",getI64Encoder()],["completedAt",getOptionEncoder(getI64Encoder())],["disputeReason",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["arbitratorDecision",getOptionEncoder(ie())],["bump",getU8Encoder()]]),n=>({...n,discriminator:Ml}))}function kl(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["escrowId",getU64Decoder()],["client",getAddressDecoder()],["agent",getAddressDecoder()],["amount",getU64Decoder()],["tokenMint",getAddressDecoder()],["status",So()],["jobDescription",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["deliveryProof",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["deadline",getI64Decoder()],["createdAt",getI64Decoder()],["completedAt",getOptionDecoder(getI64Decoder())],["disputeReason",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["arbitratorDecision",getOptionDecoder(ce())],["bump",getU8Decoder()]])}function PZ(){return combineCodec(uI(),kl())}function wl(n){return decodeAccount(n,kl())}async function CZ(n,e,t){let o=await gI(n,e,t);return assertAccountExists(o),o}async function gI(n,e,t){let o=await fetchEncodedAccount(n,e,t);return wl(o)}async function bZ(n,e,t){let o=await AI(n,e,t);return assertAccountsExist(o),o}async function AI(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>wl(r))}var Ml,pI=a(()=>{m();Ml=new Uint8Array([38,0,98,160,102,4,51,160]);});function LZ(){return fixEncoderSize(getBytesEncoder(),8).encode(zl)}function hI(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["proposalId",getU64Encoder()],["proposer",getAddressEncoder()],["title",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["proposalType",de()],["createdAt",getI64Encoder()],["votingStartsAt",getI64Encoder()],["votingEndsAt",getI64Encoder()],["executionTimestamp",getOptionEncoder(getI64Encoder())],["status",dc()],["votingResults",aa()],["executionParams",qe()],["quorumRequirements",lc()],["metadata",cc()],["reserved",fixEncoderSize(getBytesEncoder(),64)]]),n=>({...n,discriminator:zl}))}function Ol(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["proposalId",getU64Decoder()],["proposer",getAddressDecoder()],["title",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["proposalType",ue()],["createdAt",getI64Decoder()],["votingStartsAt",getI64Decoder()],["votingEndsAt",getI64Decoder()],["executionTimestamp",getOptionDecoder(getI64Decoder())],["status",uc()],["votingResults",da()],["executionParams",Je()],["quorumRequirements",mc()],["metadata",sc()],["reserved",fixDecoderSize(getBytesDecoder(),64)]])}function VZ(){return combineCodec(hI(),Ol())}function Fl(n){return decodeAccount(n,Ol())}async function KZ(n,e,t){let o=await EI(n,e,t);return assertAccountExists(o),o}async function EI(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Fl(o)}async function HZ(n,e,t){let o=await PI(n,e,t);return assertAccountsExist(o),o}async function PI(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Fl(r))}var zl,CI=a(()=>{m();zl=new Uint8Array([53,107,240,190,43,73,65,143]);});function rY(){return fixEncoderSize(getBytesEncoder(),8).encode(Nl)}function OI(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["multisigId",getU64Encoder()],["multisigType",pe()],["threshold",getU8Encoder()],["signers",getArrayEncoder(getAddressEncoder())],["owner",getAddressEncoder()],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["nonce",getU64Encoder()],["pendingTransactions",getArrayEncoder(pi())],["config",Ze()],["emergencyConfig",lo()],["typeConfig",Ho()],["reserved",fixEncoderSize(getBytesEncoder(),64)]]),n=>({...n,discriminator:Nl}))}function Bl(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["multisigId",getU64Decoder()],["multisigType",le()],["threshold",getU8Decoder()],["signers",getArrayDecoder(getAddressDecoder())],["owner",getAddressDecoder()],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["nonce",getU64Decoder()],["pendingTransactions",getArrayDecoder(li())],["config",Ye()],["emergencyConfig",mo()],["typeConfig",jo()],["reserved",fixDecoderSize(getBytesDecoder(),64)]])}function oY(){return combineCodec(OI(),Bl())}function Ll(n){return decodeAccount(n,Bl())}async function iY(n,e,t){let o=await FI(n,e,t);return assertAccountExists(o),o}async function FI(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Ll(o)}async function cY(n,e,t){let o=await GI(n,e,t);return assertAccountsExist(o),o}async function GI(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Ll(r))}var Nl,WI=a(()=>{m();Nl=new Uint8Array([224,116,121,186,68,161,79,236]);});function hY(){return fixEncoderSize(getBytesEncoder(),8).encode(Hl)}function jI(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authority",getAddressEncoder()],["treasury",getAddressEncoder()],["buybackPool",getAddressEncoder()],["moderatorPool",getAddressEncoder()],["escrowFeeBps",getU16Encoder()],["agentRegistrationFee",getU64Encoder()],["listingFee",getU64Encoder()],["disputeFeeBps",getU16Encoder()],["feesEnabled",getBooleanEncoder()],["updatedAt",getI64Encoder()],["bump",getU8Encoder()],["reserved",fixEncoderSize(getBytesEncoder(),64)]]),n=>({...n,discriminator:Hl}))}function jl(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authority",getAddressDecoder()],["treasury",getAddressDecoder()],["buybackPool",getAddressDecoder()],["moderatorPool",getAddressDecoder()],["escrowFeeBps",getU16Decoder()],["agentRegistrationFee",getU64Decoder()],["listingFee",getU64Decoder()],["disputeFeeBps",getU16Decoder()],["feesEnabled",getBooleanDecoder()],["updatedAt",getI64Decoder()],["bump",getU8Decoder()],["reserved",fixDecoderSize(getBytesDecoder(),64)]])}function EY(){return combineCodec(jI(),jl())}function $l(n){return decodeAccount(n,jl())}async function PY(n,e,t){let o=await $I(n,e,t);return assertAccountExists(o),o}async function $I(n,e,t){let o=await fetchEncodedAccount(n,e,t);return $l(o)}async function CY(n,e,t){let o=await qI(n,e,t);return assertAccountsExist(o),o}async function qI(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>$l(r))}function bY(){return 230}var Hl,JI=a(()=>{Hl=new Uint8Array([207,91,250,28,152,179,215,209]);});function NY(){return fixEncoderSize(getBytesEncoder(),8).encode(Zl)}function ev(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authority",getAddressEncoder()],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["version",getU8Encoder()],["roles",getArrayEncoder(at())],["permissions",getArrayEncoder(Ri())],["accessPolicies",getArrayEncoder(Tn())],["securityPolicies",Es()],["auditConfig",mn()],["emergencyAccess",Ao()],["reserved",fixEncoderSize(getBytesEncoder(),128)]]),n=>({...n,discriminator:Zl}))}function Yl(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authority",getAddressDecoder()],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["version",getU8Decoder()],["roles",getArrayDecoder(dt())],["permissions",getArrayDecoder(Ii())],["accessPolicies",getArrayDecoder(fn())],["securityPolicies",Ps()],["auditConfig",yn()],["emergencyAccess",po()],["reserved",fixDecoderSize(getBytesDecoder(),128)]])}function BY(){return combineCodec(ev(),Yl())}function em(n){return decodeAccount(n,Yl())}async function LY(n,e,t){let o=await tv(n,e,t);return assertAccountExists(o),o}async function tv(n,e,t){let o=await fetchEncodedAccount(n,e,t);return em(o)}async function VY(n,e,t){let o=await nv(n,e,t);return assertAccountsExist(o),o}async function nv(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>em(r))}var Zl,rv=a(()=>{m();Zl=new Uint8Array([177,94,184,202,221,112,110,38]);});function dee(){return fixEncoderSize(getBytesEncoder(),8).encode(tm)}function cv(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["state",Tc()],["nonce",getU64Encoder()],["lastInteraction",getI64Encoder()],["authority",getAddressEncoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:tm}))}function nm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["state",fc()],["nonce",getU64Decoder()],["lastInteraction",getI64Decoder()],["authority",getAddressDecoder()],["bump",getU8Decoder()]])}function uee(){return combineCodec(cv(),nm())}function rm(n){return decodeAccount(n,nm())}async function gee(n,e,t){let o=await sv(n,e,t);return assertAccountExists(o),o}async function sv(n,e,t){let o=await fetchEncodedAccount(n,e,t);return rm(o)}async function Aee(n,e,t){let o=await av(n,e,t);return assertAccountsExist(o),o}async function av(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>rm(r))}function pee(){return 58}var tm,dv=a(()=>{m();tm=new Uint8Array([207,227,141,11,194,21,193,32]);});function vee(){return fixEncoderSize(getBytesEncoder(),8).encode(om)}function Av(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agent",getAddressEncoder()],["successfulPayments",getU64Encoder()],["failedPayments",getU64Encoder()],["totalResponseTime",getU64Encoder()],["responseTimeCount",getU64Encoder()],["totalDisputes",getU32Encoder()],["disputesResolved",getU32Encoder()],["totalRating",getU32Encoder()],["totalRatingsCount",getU32Encoder()],["paymentHistory7d",getArrayEncoder(getU64Encoder(),{size:7})],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["skillTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["behaviorTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["complianceTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["tagScores",getArrayEncoder(ut())],["tagUpdatedAt",getI64Encoder()],["sourceScores",getArrayEncoder(_s())],["primarySource",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["lastAggregation",getI64Encoder()],["conflictFlags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["bump",getU8Encoder()]]),n=>({...n,discriminator:om}))}function im(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agent",getAddressDecoder()],["successfulPayments",getU64Decoder()],["failedPayments",getU64Decoder()],["totalResponseTime",getU64Decoder()],["responseTimeCount",getU64Decoder()],["totalDisputes",getU32Decoder()],["disputesResolved",getU32Decoder()],["totalRating",getU32Decoder()],["totalRatingsCount",getU32Decoder()],["paymentHistory7d",getArrayDecoder(getU64Decoder(),{size:7})],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["skillTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["behaviorTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["complianceTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["tagScores",getArrayDecoder(gt())],["tagUpdatedAt",getI64Decoder()],["sourceScores",getArrayDecoder(zs())],["primarySource",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["lastAggregation",getI64Decoder()],["conflictFlags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["bump",getU8Decoder()]])}function Mee(){return combineCodec(Av(),im())}function cm(n){return decodeAccount(n,im())}async function kee(n,e,t){let o=await pv(n,e,t);return assertAccountExists(o),o}async function pv(n,e,t){let o=await fetchEncodedAccount(n,e,t);return cm(o)}async function wee(n,e,t){let o=await lv(n,e,t);return assertAccountsExist(o),o}async function lv(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>cm(r))}var om,mv=a(()=>{m();om=new Uint8Array([8,160,71,30,66,150,108,33]);});function Zee(){return fixEncoderSize(getBytesEncoder(),8).encode(dm)}function xv(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["owner",getAddressEncoder()],["amountStaked",getU64Encoder()],["stakedAt",getI64Encoder()],["lockDuration",getI64Encoder()],["unlockAt",getI64Encoder()],["reputationBoostBps",getU16Encoder()],["hasVerifiedBadge",getBooleanEncoder()],["hasPremiumBenefits",getBooleanEncoder()],["totalSlashed",getU64Encoder()],["tier",j()],["apiCallsRemaining",getU32Encoder()],["lastQuotaReset",getI64Encoder()],["votingPower",getU64Encoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:dm}))}function um(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["owner",getAddressDecoder()],["amountStaked",getU64Decoder()],["stakedAt",getI64Decoder()],["lockDuration",getI64Decoder()],["unlockAt",getI64Decoder()],["reputationBoostBps",getU16Decoder()],["hasVerifiedBadge",getBooleanDecoder()],["hasPremiumBenefits",getBooleanDecoder()],["totalSlashed",getU64Decoder()],["tier",$()],["apiCallsRemaining",getU32Decoder()],["lastQuotaReset",getI64Decoder()],["votingPower",getU64Decoder()],["bump",getU8Decoder()]])}function Yee(){return combineCodec(xv(),um())}function gm(n){return decodeAccount(n,um())}async function ete(n,e,t){let o=await Dv(n,e,t);return assertAccountExists(o),o}async function Dv(n,e,t){let o=await fetchEncodedAccount(n,e,t);return gm(o)}async function tte(n,e,t){let o=await hv(n,e,t);return assertAccountsExist(o),o}async function hv(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>gm(r))}function nte(){return 106}var dm,Ev=a(()=>{m();dm=new Uint8Array([52,178,251,157,180,186,98,234]);});function xte(){return fixEncoderSize(getBytesEncoder(),8).encode(Am)}function Mv(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authority",getAddressEncoder()],["minStake",getU64Encoder()],["minLockDuration",getI64Encoder()],["fraudSlashBps",getU16Encoder()],["disputeSlashBps",getU16Encoder()],["treasury",getAddressEncoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:Am}))}function pm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authority",getAddressDecoder()],["minStake",getU64Decoder()],["minLockDuration",getI64Decoder()],["fraudSlashBps",getU16Decoder()],["disputeSlashBps",getU16Decoder()],["treasury",getAddressDecoder()],["bump",getU8Decoder()]])}function Dte(){return combineCodec(Mv(),pm())}function lm(n){return decodeAccount(n,pm())}async function hte(n,e,t){let o=await kv(n,e,t);return assertAccountExists(o),o}async function kv(n,e,t){let o=await fetchEncodedAccount(n,e,t);return lm(o)}async function Ete(n,e,t){let o=await wv(n,e,t);return assertAccountsExist(o),o}async function wv(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>lm(r))}function Pte(){return 93}var Am,Uv=a(()=>{Am=new Uint8Array([45,134,252,82,37,57,84,25]);});function Kte(){return fixEncoderSize(getBytesEncoder(),8).encode(mm)}function Ov(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["user",getAddressEncoder()],["agentCount",getU16Encoder()],["listingCount",getU16Encoder()],["workOrderCount",getU16Encoder()],["channelCount",getU16Encoder()],["totalVolumeTraded",getU64Encoder()],["lastActivity",getI64Encoder()],["createdAt",getI64Encoder()],["isRateLimited",getBooleanEncoder()],["rateLimitExpiry",getI64Encoder()],["lastExtensionRegistration",getI64Encoder()],["lastDisputeFiling",getI64Encoder()],["lastEvidenceSubmission",getI64Encoder()],["lastBatchExecution",getI64Encoder()],["lastDashboardUpdate",getI64Encoder()],["lastBulkDealCreation",getI64Encoder()],["lastDashboardCreation",getI64Encoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:mm}))}function ym(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["user",getAddressDecoder()],["agentCount",getU16Decoder()],["listingCount",getU16Decoder()],["workOrderCount",getU16Decoder()],["channelCount",getU16Decoder()],["totalVolumeTraded",getU64Decoder()],["lastActivity",getI64Decoder()],["createdAt",getI64Decoder()],["isRateLimited",getBooleanDecoder()],["rateLimitExpiry",getI64Decoder()],["lastExtensionRegistration",getI64Decoder()],["lastDisputeFiling",getI64Decoder()],["lastEvidenceSubmission",getI64Decoder()],["lastBatchExecution",getI64Decoder()],["lastDashboardUpdate",getI64Decoder()],["lastBulkDealCreation",getI64Decoder()],["lastDashboardCreation",getI64Decoder()],["bump",getU8Decoder()]])}function Hte(){return combineCodec(Ov(),ym())}function Tm(n){return decodeAccount(n,ym())}async function jte(n,e,t){let o=await Fv(n,e,t);return assertAccountExists(o),o}async function Fv(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Tm(o)}async function $te(n,e,t){let o=await Gv(n,e,t);return assertAccountsExist(o),o}async function Gv(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Tm(r))}function qte(){return 138}var mm,Wv=a(()=>{mm=new Uint8Array([37,84,98,14,130,63,210,138]);});var Nv=a(()=>{Tb();kb();Wb();Jb();rR();TR();DR();CR();UR();WR();HR();iI();pI();CI();WI();JI();rv();dv();mv();Ev();Uv();Wv();});function Jte(n){let e="data"in n?n.data:n;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([47,166,112,147,155,197,86,7])),0))return 0;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([30,249,165,44,155,194,188,175])),0))return 1;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([145,145,156,0,197,232,130,245])),0))return 2;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([128,155,95,241,66,207,166,59])),0))return 3;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([171,223,253,181,134,88,66,26])),0))return 4;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([109,102,102,17,210,84,85,210])),0))return 5;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([75,146,78,26,130,240,228,35])),0))return 6;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([145,44,68,220,67,46,100,135])),0))return 7;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([229,129,99,91,179,207,66,75])),0))return 8;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([132,171,20,181,39,219,217,112])),0))return 9;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([109,220,168,224,33,173,192,166])),0))return 10;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([180,218,64,128,181,84,116,180])),0))return 11;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([38,0,98,160,102,4,51,160])),0))return 12;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([53,107,240,190,43,73,65,143])),0))return 13;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([224,116,121,186,68,161,79,236])),0))return 14;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([207,91,250,28,152,179,215,209])),0))return 15;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([177,94,184,202,221,112,110,38])),0))return 16;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([207,227,141,11,194,21,193,32])),0))return 17;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([8,160,71,30,66,150,108,33])),0))return 18;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([52,178,251,157,180,186,98,234])),0))return 19;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([45,134,252,82,37,57,84,25])),0))return 20;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([37,84,98,14,130,63,210,138])),0))return 21;throw new Error("The provided account could not be identified as a ghostspeakMarketplace account.")}function Qte(n){let e="data"in n?n.data:n;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([252,139,87,21,195,152,29,217])),0))return 0;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([28,233,51,115,33,220,41,28])),0))return 1;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([225,89,166,101,215,40,191,4])),0))return 2;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([50,170,232,73,238,200,180,16])),0))return 3;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([149,107,35,233,252,101,148,225])),0))return 4;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([48,219,232,202,151,97,230,20])),0))return 5;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([183,109,12,128,134,8,139,144])),0))return 6;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([211,208,67,175,20,248,8,227])),0))return 7;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([253,40,200,239,69,147,82,182])),0))return 8;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([253,215,165,116,36,108,68,80])),0))return 9;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([148,146,240,10,226,215,167,174])),0))return 10;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([205,171,239,225,82,126,96,166])),0))return 11;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([177,8,195,104,56,34,84,162])),0))return 12;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([110,174,221,244,36,206,60,237])),0))return 13;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([77,13,56,161,67,155,206,119])),0))return 14;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([9,115,79,19,158,209,221,38])),0))return 15;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([210,63,221,114,212,97,195,156])),0))return 16;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([213,97,79,234,22,228,14,32])),0))return 17;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([156,109,115,85,12,60,245,99])),0))return 18;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([145,182,236,249,212,17,175,161])),0))return 19;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([137,84,234,206,17,58,54,215])),0))return 20;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([28,50,43,233,244,98,123,118])),0))return 21;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([215,68,129,228,237,165,0,240])),0))return 22;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([228,11,207,44,52,188,169,237])),0))return 23;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([78,164,6,115,206,48,168,105])),0))return 24;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([255,193,171,224,68,171,194,87])),0))return 25;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([156,102,141,155,175,13,29,86])),0))return 26;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([164,219,91,38,45,31,33,47])),0))return 27;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([165,202,159,139,65,65,36,163])),0))return 28;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([135,157,66,195,2,113,175,30])),0))return 29;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([15,6,94,55,65,80,123,248])),0))return 30;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([34,233,111,236,212,22,26,254])),0))return 31;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([93,74,168,125,46,153,9,255])),0))return 32;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([168,180,218,211,184,19,102,12])),0))return 33;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([222,179,207,59,191,78,24,248])),0))return 34;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([38,123,95,95,223,158,169,87])),0))return 35;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([190,242,137,27,41,18,233,37])),0))return 36;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([5,196,24,54,196,56,173,191])),0))return 37;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([217,177,33,54,136,185,123,96])),0))return 38;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([23,160,228,88,168,145,129,19])),0))return 39;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([252,101,172,252,1,4,12,116])),0))return 40;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([85,2,178,9,119,139,102,164])),0))return 41;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([80,227,92,245,231,37,99,180])),0))return 42;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([87,146,181,198,252,68,243,102])),0))return 43;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([22,167,59,238,22,231,239,146])),0))return 44;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([64,216,17,91,205,94,45,57])),0))return 45;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([213,152,5,80,163,224,151,120])),0))return 46;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([197,97,123,54,221,168,11,135])),0))return 47;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([206,96,254,186,129,180,103,198])),0))return 48;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([61,236,225,167,134,43,53,93])),0))return 49;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([161,240,255,69,130,227,71,123])),0))return 50;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([206,212,108,12,105,61,100,66])),0))return 51;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([43,9,131,59,74,118,113,170])),0))return 52;throw new Error("The provided instruction could not be identified as a ghostspeakMarketplace instruction.")}var u,Bv,Lv,Vv=a(()=>{u="4wHjA2a5YC4twZb4NQpwZpixo5FgxxzuJUrCG7UnF9pB",Bv=(C=>(C[C.Agent=0]="Agent",C[C.AgentReputationAuth=1]="AgentReputationAuth",C[C.AgentTreeConfig=2]="AgentTreeConfig",C[C.AgentVerification=3]="AgentVerification",C[C.AuditTrail=4]="AuditTrail",C[C.AuthorizationUsageRecord=5]="AuthorizationUsageRecord",C[C.ComplianceReport=6]="ComplianceReport",C[C.Credential=7]="Credential",C[C.CredentialTemplate=8]="CredentialTemplate",C[C.CredentialType=9]="CredentialType",C[C.DidDocument=10]="DidDocument",C[C.ExternalIdMapping=11]="ExternalIdMapping",C[C.GhostProtectEscrow=12]="GhostProtectEscrow",C[C.GovernanceProposal=13]="GovernanceProposal",C[C.Multisig=14]="Multisig",C[C.ProtocolConfig=15]="ProtocolConfig",C[C.RbacConfig=16]="RbacConfig",C[C.ReentrancyGuard=17]="ReentrancyGuard",C[C.ReputationMetrics=18]="ReputationMetrics",C[C.StakingAccount=19]="StakingAccount",C[C.StakingConfig=20]="StakingConfig",C[C.UserRegistry=21]="UserRegistry",C))(Bv||{});Lv=(A=>(A[A.ActivateAgent=0]="ActivateAgent",A[A.ApproveDelivery=1]="ApproveDelivery",A[A.ArbitrateDispute=2]="ArbitrateDispute",A[A.AutoCreateGhost=3]="AutoCreateGhost",A[A.ClaimGhost=4]="ClaimGhost",A[A.CreateAgentAuthorization=5]="CreateAgentAuthorization",A[A.CreateCredentialTemplate=6]="CreateCredentialTemplate",A[A.CreateCredentialType=7]="CreateCredentialType",A[A.CreateDidDocument=8]="CreateDidDocument",A[A.CreateEscrow=9]="CreateEscrow",A[A.CreateMultisig=10]="CreateMultisig",A[A.DeactivateAgent=11]="DeactivateAgent",A[A.DeactivateCredentialTemplate=12]="DeactivateCredentialTemplate",A[A.DeactivateCredentialType=13]="DeactivateCredentialType",A[A.DeactivateDidDocument=14]="DeactivateDidDocument",A[A.EnableProtocolFees=15]="EnableProtocolFees",A[A.FileDispute=16]="FileDispute",A[A.GenerateComplianceReport=17]="GenerateComplianceReport",A[A.InitReentrancyGuard=18]="InitReentrancyGuard",A[A.InitializeAuditTrail=19]="InitializeAuditTrail",A[A.InitializeGovernanceProposal=20]="InitializeGovernanceProposal",A[A.InitializeProtocolConfig=21]="InitializeProtocolConfig",A[A.InitializeRbacConfig=22]="InitializeRbacConfig",A[A.InitializeReputationMetrics=23]="InitializeReputationMetrics",A[A.InitializeStakingConfig=24]="InitializeStakingConfig",A[A.IssueCredential=25]="IssueCredential",A[A.LinkExternalId=26]="LinkExternalId",A[A.ManageAgentStatus=27]="ManageAgentStatus",A[A.RecordPayaiPayment=28]="RecordPayaiPayment",A[A.RegisterAgent=29]="RegisterAgent",A[A.RegisterAgentCompressed=30]="RegisterAgentCompressed",A[A.RegisterGhostMetadata=31]="RegisterGhostMetadata",A[A.ResetReentrancyGuard=32]="ResetReentrancyGuard",A[A.ResolveDidDocument=33]="ResolveDidDocument",A[A.RevokeAuthorization=34]="RevokeAuthorization",A[A.RevokeCredential=35]="RevokeCredential",A[A.SlashStake=36]="SlashStake",A[A.StakeGhost=37]="StakeGhost",A[A.SubmitDelivery=38]="SubmitDelivery",A[A.SubmitServiceRating=39]="SubmitServiceRating",A[A.UnstakeGhost=40]="UnstakeGhost",A[A.UpdateAgent=41]="UpdateAgent",A[A.UpdateAgentReputation=42]="UpdateAgentReputation",A[A.UpdateAgentService=43]="UpdateAgentService",A[A.UpdateCrosschainStatus=44]="UpdateCrosschainStatus",A[A.UpdateDidDocument=45]="UpdateDidDocument",A[A.UpdateGhostScore=46]="UpdateGhostScore",A[A.UpdateProtocolConfig=47]="UpdateProtocolConfig",A[A.UpdateReputationTags=48]="UpdateReputationTags",A[A.UpdateReputationWithAuth=49]="UpdateReputationWithAuth",A[A.UpdateSourceReputation=50]="UpdateSourceReputation",A[A.VerifyAgent=51]="VerifyAgent",A[A.VerifyAuthorization=52]="VerifyAuthorization",A))(Lv||{});});var D=a(()=>{Vv();});function Zte(n){return process.env.NODE_ENV!=="production"?Jv[n]:"Error message not available in production bundles."}function Yte(n,e,t){return isProgramError(n,e,u,t)}var Kv,Hv,jv,$v,qv,Jv,Qv=a(()=>{D();Kv=6e3,Hv=6001,jv=6002,$v=6003,qv=6004;process.env.NODE_ENV!=="production"&&(Jv={[Hv]:"Default (null) public key cannot be used as admin",[Kv]:"System program cannot be used as admin",[$v]:"Test address cannot be used on mainnet",[jv]:"Unauthorized admin - key does not match protocol admin",[qv]:"Admin validation failed - key failed security checks or is not properly configured"});});var Xv=a(()=>{Qv();});function I(n){if(n==null)throw new Error("Expected a value but received null or undefined.");return n}function S(n){if(!n)throw new Error("Expected a Address.");return typeof n=="object"&&"address"in n?n.address:Array.isArray(n)?n[0]:n}function g(n,e){return t=>{if(!t.value)return Object.freeze({address:n,role:AccountRole.READONLY});let o=t.isWritable?AccountRole.WRITABLE:AccountRole.READONLY;return Object.freeze({address:S(t.value),role:Zv(t.value)?upgradeRoleToSigner(o):o,...Zv(t.value)?{signer:t.value}:{}})}}function Zv(n){return !!n&&typeof n=="object"&&"address"in n&&isTransactionSigner(n)}var h=a(()=>{});function mne(){return fixEncoderSize(getBytesEncoder(),8).encode(xm)}function Ga(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:xm}))}function Dm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function yne(){return combineCodec(Ga(),Dm())}async function Tne(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.signer.value)),getUtf8Encoder().encode(I(c.agentId))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Ga().encode(c),programAddress:t})}function hm(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Ga().encode(c),programAddress:t})}function fne(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),signer:t(),clock:t()},data:Dm().decode(n.data)}}var xm,tM=a(()=>{D();h();xm=new Uint8Array([252,139,87,21,195,152,29,217]);});function Cne(){return fixEncoderSize(getBytesEncoder(),8).encode(Em)}function Pm(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:Em}))}function Cm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function bne(){return combineCodec(Pm(),Cm())}function Rne(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},escrowVault:{value:n.escrowVault??null,isWritable:true},agentTokenAccount:{value:n.agentTokenAccount??null,isWritable:true},client:{value:n.client??null,isWritable:false},tokenProgram:{value:n.tokenProgram??null,isWritable:false}};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let c=g(t);return Object.freeze({accounts:[c(r.escrow),c(r.escrowVault),c(r.agentTokenAccount),c(r.client),c(r.tokenProgram)],data:Pm().encode({}),programAddress:t})}function Ine(n){if(n.accounts.length<5)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{escrow:t(),escrowVault:t(),agentTokenAccount:t(),client:t(),tokenProgram:t()},data:Cm().decode(n.data)}}var Em,oM=a(()=>{D();h();Em=new Uint8Array([28,233,51,115,33,220,41,28]);});function zne(){return fixEncoderSize(getBytesEncoder(),8).encode(bm)}function Rm(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["decision",ie()]]),n=>({...n,discriminator:bm}))}function Im(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["decision",ce()]])}function One(){return combineCodec(Rm(),Im())}function Fne(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},escrowVault:{value:n.escrowVault??null,isWritable:true},agentTokenAccount:{value:n.agentTokenAccount??null,isWritable:true},clientTokenAccount:{value:n.clientTokenAccount??null,isWritable:true},agentStaking:{value:n.agentStaking??null,isWritable:true},arbitrator:{value:n.arbitrator??null,isWritable:false},tokenProgram:{value:n.tokenProgram??null,isWritable:false}},c={...n};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let i=g(t);return Object.freeze({accounts:[i(r.escrow),i(r.escrowVault),i(r.agentTokenAccount),i(r.clientTokenAccount),i(r.agentStaking),i(r.arbitrator),i(r.tokenProgram)],data:Rm().encode(c),programAddress:t})}function Gne(n){if(n.accounts.length<7)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{escrow:t(),escrowVault:t(),agentTokenAccount:t(),clientTokenAccount:t(),agentStaking:t(),arbitrator:t(),tokenProgram:t()},data:Im().decode(n.data)}}var bm,sM=a(()=>{D();h();m();bm=new Uint8Array([225,89,166,101,215,40,191,4]);});function Xne(){return fixEncoderSize(getBytesEncoder(),8).encode(Mm)}function Wa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["paymentAddress",getAddressEncoder()],["firstTxSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["discoverySource",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["initialGhostScore",getOptionEncoder(getU64Encoder())]]),n=>({...n,discriminator:Mm}))}function km(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["paymentAddress",getAddressDecoder()],["firstTxSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["discoverySource",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["initialGhostScore",getOptionDecoder(getU64Decoder())]])}function Zne(){return combineCodec(Wa(),km())}async function Yne(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(I(c.paymentAddress))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.authority),i(r.systemProgram)],data:Wa().encode(c),programAddress:t})}function ere(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.authority),i(r.systemProgram)],data:Wa().encode(c),programAddress:t})}function tre(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),authority:t(),systemProgram:t()},data:km().decode(n.data)}}var Mm,yM=a(()=>{D();h();Mm=new Uint8Array([50,170,232,73,238,200,180,16]);});function ure(){return fixEncoderSize(getBytesEncoder(),8).encode(wm)}function Um(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["sasCredential",getAddressEncoder()],["sasSchema",getAddressEncoder()],["ipfsMetadataUri",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["network",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:wm}))}function _m(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["sasCredential",getAddressDecoder()],["sasSchema",getAddressDecoder()],["ipfsMetadataUri",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["network",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function gre(){return combineCodec(Um(),_m())}function zm(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},didDocument:{value:n.didDocument??null,isWritable:true},sasAttestation:{value:n.sasAttestation??null,isWritable:false},claimer:{value:n.claimer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.didDocument),i(r.sasAttestation),i(r.claimer),i(r.systemProgram)],data:Um().encode(c),programAddress:t})}function Are(n){if(n.accounts.length<5)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),didDocument:t(),sasAttestation:t(),claimer:t(),systemProgram:t()},data:_m().decode(n.data)}}var wm,RM=a(()=>{D();h();wm=new Uint8Array([149,107,35,233,252,101,148,225]);});var WM={};oe(WM,{CREATE_AGENT_AUTHORIZATION_DISCRIMINATOR:()=>Ba,getCreateAgentAuthorizationDiscriminatorBytes:()=>_M,getCreateAgentAuthorizationInstruction:()=>FM,getCreateAgentAuthorizationInstructionAsync:()=>OM,getCreateAgentAuthorizationInstructionDataCodec:()=>zM,getCreateAgentAuthorizationInstructionDataDecoder:()=>La,getCreateAgentAuthorizationInstructionDataEncoder:()=>Ht,parseCreateAgentAuthorizationInstruction:()=>GM});function _M(){return fixEncoderSize(getBytesEncoder(),8).encode(Ba)}function Ht(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authorizedSource",getAddressEncoder()],["indexLimit",getU64Encoder()],["expiresAt",getI64Encoder()],["network",getU8Encoder()],["signature",fixEncoderSize(getBytesEncoder(),64)],["nonce",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:Ba}))}function La(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authorizedSource",getAddressDecoder()],["indexLimit",getU64Decoder()],["expiresAt",getI64Decoder()],["network",getU8Decoder()],["signature",fixDecoderSize(getBytesDecoder(),64)],["nonce",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function zM(){return combineCodec(Ht(),La())}async function OM(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},authorization:{value:n.authorization??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.authorization.value||(r.authorization.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,97,117,116,104])),getAddressEncoder().encode(S(r.agent.value)),getAddressEncoder().encode(I(c.authorizedSource)),getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())).encode(I(c.nonce))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.authorization),i(r.authority),i(r.systemProgram)],data:Ht().encode(c),programAddress:t})}function FM(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},authorization:{value:n.authorization??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.authorization),i(r.authority),i(r.systemProgram)],data:Ht().encode(c),programAddress:t})}function GM(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),authorization:t(),authority:t(),systemProgram:t()},data:La().decode(n.data)}}var Ba,Gm=a(()=>{D();h();Ba=new Uint8Array([48,219,232,202,151,97,230,20]);});function Wre(){return fixEncoderSize(getBytesEncoder(),8).encode(Hm)}function Ka(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["imageUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["crossmintTemplateId",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:Hm}))}function jm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["imageUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["crossmintTemplateId",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function Nre(){return combineCodec(Ka(),jm())}async function Bre(n,e){let t=e?.programAddress??u,r={credentialTemplate:{value:n.credentialTemplate??null,isWritable:true},credentialType:{value:n.credentialType??null,isWritable:false},issuer:{value:n.issuer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.credentialTemplate.value||(r.credentialTemplate.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([99,114,101,100,101,110,116,105,97,108,95,116,101,109,112,108,97,116,101])),getAddressEncoder().encode(S(r.credentialType.value)),getUtf8Encoder().encode(I(c.name))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credentialTemplate),i(r.credentialType),i(r.issuer),i(r.systemProgram)],data:Ka().encode(c),programAddress:t})}function Lre(n,e){let t=e?.programAddress??u,r={credentialTemplate:{value:n.credentialTemplate??null,isWritable:true},credentialType:{value:n.credentialType??null,isWritable:false},issuer:{value:n.issuer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credentialTemplate),i(r.credentialType),i(r.issuer),i(r.systemProgram)],data:Ka().encode(c),programAddress:t})}function Vre(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credentialTemplate:t(),credentialType:t(),issuer:t(),systemProgram:t()},data:jm().decode(n.data)}}var Hm,BM=a(()=>{D();h();Hm=new Uint8Array([183,109,12,128,134,8,139,144]);});function Xre(){return fixEncoderSize(getBytesEncoder(),8).encode(Ym)}function ja(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["kind",Ne()],["schemaUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:Ym}))}function e1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["kind",Be()],["schemaUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Zre(){return combineCodec(ja(),e1())}async function Yre(n,e){let t=e?.programAddress??u,r={credentialType:{value:n.credentialType??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.credentialType.value||(r.credentialType.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([99,114,101,100,101,110,116,105,97,108,95,116,121,112,101])),getUtf8Encoder().encode(I(c.name))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credentialType),i(r.authority),i(r.systemProgram)],data:ja().encode(c),programAddress:t})}function eoe(n,e){let t=e?.programAddress??u,r={credentialType:{value:n.credentialType??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credentialType),i(r.authority),i(r.systemProgram)],data:ja().encode(c),programAddress:t})}function toe(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credentialType:t(),authority:t(),systemProgram:t()},data:e1().decode(n.data)}}var Ym,VM=a(()=>{D();h();m();Ym=new Uint8Array([211,208,67,175,20,248,8,227]);});function yoe(){return fixEncoderSize(getBytesEncoder(),8).encode(n1)}function $a(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["didString",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["verificationMethods",getArrayEncoder(Te())],["serviceEndpoints",getArrayEncoder(me())]]),n=>({...n,discriminator:n1}))}function r1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["didString",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["verificationMethods",getArrayDecoder(fe())],["serviceEndpoints",getArrayDecoder(ye())]])}function Toe(){return combineCodec($a(),r1())}async function foe(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.didDocument.value||(r.didDocument.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([100,105,100,95,100,111,99,117,109,101,110,116])),getAddressEncoder().encode(S(r.controller.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.didDocument),i(r.controller),i(r.systemProgram),i(r.clock)],data:$a().encode(c),programAddress:t})}function Soe(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.didDocument),i(r.controller),i(r.systemProgram),i(r.clock)],data:$a().encode(c),programAddress:t})}function xoe(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{didDocument:t(),controller:t(),systemProgram:t(),clock:t()},data:r1().decode(n.data)}}var n1,$M=a(()=>{D();h();m();n1=new Uint8Array([253,40,200,239,69,147,82,182]);});function Foe(){return fixEncoderSize(getBytesEncoder(),8).encode(c1)}function qa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["escrowId",getU64Encoder()],["amount",getU64Encoder()],["jobDescription",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["deadline",getI64Encoder()]]),n=>({...n,discriminator:c1}))}function s1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["escrowId",getU64Decoder()],["amount",getU64Decoder()],["jobDescription",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["deadline",getI64Decoder()]])}function Goe(){return combineCodec(qa(),s1())}async function Woe(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},clientTokenAccount:{value:n.clientTokenAccount??null,isWritable:true},escrowVault:{value:n.escrowVault??null,isWritable:true},tokenMint:{value:n.tokenMint??null,isWritable:false},client:{value:n.client??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.escrow.value||(r.escrow.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([103,104,111,115,116,95,112,114,111,116,101,99,116])),getAddressEncoder().encode(S(r.client.value)),getU64Encoder().encode(I(c.escrowId))]})),r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.escrow),i(r.agent),i(r.clientTokenAccount),i(r.escrowVault),i(r.tokenMint),i(r.client),i(r.tokenProgram),i(r.systemProgram)],data:qa().encode(c),programAddress:t})}function Noe(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},clientTokenAccount:{value:n.clientTokenAccount??null,isWritable:true},escrowVault:{value:n.escrowVault??null,isWritable:true},tokenMint:{value:n.tokenMint??null,isWritable:false},client:{value:n.client??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.escrow),i(r.agent),i(r.clientTokenAccount),i(r.escrowVault),i(r.tokenMint),i(r.client),i(r.tokenProgram),i(r.systemProgram)],data:qa().encode(c),programAddress:t})}function Boe(n){if(n.accounts.length<8)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{escrow:t(),agent:t(),clientTokenAccount:t(),escrowVault:t(),tokenMint:t(),client:t(),tokenProgram:t(),systemProgram:t()},data:s1().decode(n.data)}}var c1,QM=a(()=>{D();h();c1=new Uint8Array([253,215,165,116,36,108,68,80]);});function tie(){return fixEncoderSize(getBytesEncoder(),8).encode(d1)}function Ja(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["multisigId",getU64Encoder()],["threshold",getU8Encoder()],["signers",getArrayEncoder(getAddressEncoder())],["config",Ze()]]),n=>({...n,discriminator:d1}))}function u1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["multisigId",getU64Decoder()],["threshold",getU8Decoder()],["signers",getArrayDecoder(getAddressDecoder())],["config",Ye()]])}function nie(){return combineCodec(Ja(),u1())}async function rie(n,e){let t=e?.programAddress??u,r={multisig:{value:n.multisig??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.multisig.value||(r.multisig.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,115,105,103])),getAddressEncoder().encode(S(r.owner.value)),getU64Encoder().encode(I(c.multisigId))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.multisig),i(r.owner),i(r.systemProgram)],data:Ja().encode(c),programAddress:t})}function oie(n,e){let t=e?.programAddress??u,r={multisig:{value:n.multisig??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.multisig),i(r.owner),i(r.systemProgram)],data:Ja().encode(c),programAddress:t})}function iie(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{multisig:t(),owner:t(),systemProgram:t()},data:u1().decode(n.data)}}var d1,ek=a(()=>{D();h();m();d1=new Uint8Array([148,146,240,10,226,215,167,174]);});function Sie(){return fixEncoderSize(getBytesEncoder(),8).encode(A1)}function Qa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:A1}))}function p1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function xie(){return combineCodec(Qa(),p1())}async function Die(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.signer.value)),getUtf8Encoder().encode(I(c.agentId))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Qa().encode(c),programAddress:t})}function l1(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Qa().encode(c),programAddress:t})}function hie(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),signer:t(),clock:t()},data:p1().decode(n.data)}}var A1,rk=a(()=>{D();h();A1=new Uint8Array([205,171,239,225,82,126,96,166]);});function vie(){return fixEncoderSize(getBytesEncoder(),8).encode(m1)}function y1(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:m1}))}function T1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function Mie(){return combineCodec(y1(),T1())}function kie(n,e){let t=e?.programAddress??u,r={credentialTemplate:{value:n.credentialTemplate??null,isWritable:true},issuer:{value:n.issuer??null,isWritable:true}},c=g(t);return Object.freeze({accounts:[c(r.credentialTemplate),c(r.issuer)],data:y1().encode({}),programAddress:t})}function wie(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credentialTemplate:t(),issuer:t()},data:T1().decode(n.data)}}var m1,ck=a(()=>{D();h();m1=new Uint8Array([177,8,195,104,56,34,84,162]);});function Wie(){return fixEncoderSize(getBytesEncoder(),8).encode(f1)}function S1(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:f1}))}function x1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function Nie(){return combineCodec(S1(),x1())}function Bie(n,e){let t=e?.programAddress??u,r={credentialType:{value:n.credentialType??null,isWritable:true},authority:{value:n.authority??null,isWritable:true}},c=g(t);return Object.freeze({accounts:[c(r.credentialType),c(r.authority)],data:S1().encode({}),programAddress:t})}function Lie(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credentialType:t(),authority:t()},data:x1().decode(n.data)}}var f1,dk=a(()=>{D();h();f1=new Uint8Array([110,174,221,244,36,206,60,237]);});function Xie(){return fixEncoderSize(getBytesEncoder(),8).encode(h1)}function Xa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:h1}))}function E1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function Zie(){return combineCodec(Xa(),E1())}async function Yie(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}};r.didDocument.value||(r.didDocument.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([100,105,100,95,100,111,99,117,109,101,110,116])),getAddressEncoder().encode(S(r.controller.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.didDocument),c(r.controller),c(r.clock)],data:Xa().encode({}),programAddress:t})}function ece(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.didDocument),c(r.controller),c(r.clock)],data:Xa().encode({}),programAddress:t})}function tce(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{didDocument:t(),controller:t(),clock:t()},data:E1().decode(n.data)}}var h1,gk=a(()=>{D();h();h1=new Uint8Array([77,13,56,161,67,155,206,119]);});function dce(){return fixEncoderSize(getBytesEncoder(),8).encode(C1)}function Za(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:C1}))}function b1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function uce(){return combineCodec(Za(),b1())}async function gce(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}};r.config.value||(r.config.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([112,114,111,116,111,99,111,108,95,99,111,110,102,105,103]))]}));let c=g(t);return Object.freeze({accounts:[c(r.config),c(r.authority)],data:Za().encode({}),programAddress:t})}function Ace(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}},c=g(t);return Object.freeze({accounts:[c(r.config),c(r.authority)],data:Za().encode({}),programAddress:t})}function pce(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{config:t(),authority:t()},data:b1().decode(n.data)}}var C1,pk=a(()=>{D();h();C1=new Uint8Array([9,115,79,19,158,209,221,38]);});function bce(){return fixEncoderSize(getBytesEncoder(),8).encode(R1)}function I1(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["reason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:R1}))}function v1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["reason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Rce(){return combineCodec(I1(),v1())}function Ice(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},client:{value:n.client??null,isWritable:false}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.escrow),i(r.client)],data:I1().encode(c),programAddress:t})}function vce(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{escrow:t(),client:t()},data:v1().decode(n.data)}}var R1,yk=a(()=>{D();h();R1=new Uint8Array([210,63,221,114,212,97,195,156]);});function Gce(){return fixEncoderSize(getBytesEncoder(),8).encode(k1)}function Ya(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["reportId",getU64Encoder()],["reportType",se()],["dateRangeStart",getI64Encoder()],["dateRangeEnd",getI64Encoder()]]),n=>({...n,discriminator:k1}))}function w1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["reportId",getU64Decoder()],["reportType",ae()],["dateRangeStart",getI64Decoder()],["dateRangeEnd",getI64Decoder()]])}function Wce(){return combineCodec(Ya(),w1())}async function Nce(n,e){let t=e?.programAddress??u,r={report:{value:n.report??null,isWritable:true},auditTrail:{value:n.auditTrail??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.report.value||(r.report.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([99,111,109,112,108,105,97,110,99,101,95,114,101,112,111,114,116])),getU64Encoder().encode(I(c.reportId))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.report),i(r.auditTrail),i(r.authority),i(r.systemProgram)],data:Ya().encode(c),programAddress:t})}function Bce(n,e){let t=e?.programAddress??u,r={report:{value:n.report??null,isWritable:true},auditTrail:{value:n.auditTrail??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.report),i(r.auditTrail),i(r.authority),i(r.systemProgram)],data:Ya().encode(c),programAddress:t})}function Lce(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{report:t(),auditTrail:t(),authority:t(),systemProgram:t()},data:w1().decode(n.data)}}var k1,Dk=a(()=>{D();h();m();k1=new Uint8Array([213,97,79,234,22,228,14,32]);});function rse(){return fixEncoderSize(getBytesEncoder(),8).encode(_1)}function ed(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["entityType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["config",Ge()]]),n=>({...n,discriminator:_1}))}function z1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["entityType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["config",We()]])}function ose(){return combineCodec(ed(),z1())}async function ise(n,e){let t=e?.programAddress??u,r={auditTrail:{value:n.auditTrail??null,isWritable:true},entity:{value:n.entity??null,isWritable:false},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.auditTrail.value||(r.auditTrail.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,117,100,105,116,95,116,114,97,105,108])),getAddressEncoder().encode(S(r.entity.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.auditTrail),i(r.entity),i(r.authority),i(r.systemProgram)],data:ed().encode(c),programAddress:t})}function cse(n,e){let t=e?.programAddress??u,r={auditTrail:{value:n.auditTrail??null,isWritable:true},entity:{value:n.entity??null,isWritable:false},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.auditTrail),i(r.entity),i(r.authority),i(r.systemProgram)],data:ed().encode(c),programAddress:t})}function sse(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{auditTrail:t(),entity:t(),authority:t(),systemProgram:t()},data:z1().decode(n.data)}}var _1,Ek=a(()=>{D();h();m();_1=new Uint8Array([145,182,236,249,212,17,175,161]);});function yse(){return fixEncoderSize(getBytesEncoder(),8).encode(F1)}function td(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["proposalId",getU64Encoder()],["title",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["proposalType",de()],["executionParams",qe()]]),n=>({...n,discriminator:F1}))}function G1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["proposalId",getU64Decoder()],["title",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["proposalType",ue()],["executionParams",Je()]])}function Tse(){return combineCodec(td(),G1())}async function jt(n,e){let t=e?.programAddress??u,r={proposal:{value:n.proposal??null,isWritable:true},proposer:{value:n.proposer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.proposal.value||(r.proposal.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([103,111,118,101,114,110,97,110,99,101,95,112,114,111,112,111,115,97,108])),getU64Encoder().encode(I(c.proposalId))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.proposal),i(r.proposer),i(r.systemProgram)],data:td().encode(c),programAddress:t})}function fse(n,e){let t=e?.programAddress??u,r={proposal:{value:n.proposal??null,isWritable:true},proposer:{value:n.proposer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.proposal),i(r.proposer),i(r.systemProgram)],data:td().encode(c),programAddress:t})}function Sse(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{proposal:t(),proposer:t(),systemProgram:t()},data:G1().decode(n.data)}}var F1,wk=a(()=>{D();h();m();F1=new Uint8Array([137,84,234,206,17,58,54,215]);});function Rse(){return fixEncoderSize(getBytesEncoder(),8).encode(N1)}function nd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:N1}))}function B1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function Ise(){return combineCodec(nd(),B1())}async function vse(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},treasury:{value:n.treasury??null,isWritable:false},buybackPool:{value:n.buybackPool??null,isWritable:false},moderatorPool:{value:n.moderatorPool??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false}};r.config.value||(r.config.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([112,114,111,116,111,99,111,108,95,99,111,110,102,105,103]))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.config),c(r.authority),c(r.treasury),c(r.buybackPool),c(r.moderatorPool),c(r.systemProgram)],data:nd().encode({}),programAddress:t})}function Mse(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},treasury:{value:n.treasury??null,isWritable:false},buybackPool:{value:n.buybackPool??null,isWritable:false},moderatorPool:{value:n.moderatorPool??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false}};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.config),c(r.authority),c(r.treasury),c(r.buybackPool),c(r.moderatorPool),c(r.systemProgram)],data:nd().encode({}),programAddress:t})}function kse(n){if(n.accounts.length<6)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{config:t(),authority:t(),treasury:t(),buybackPool:t(),moderatorPool:t(),systemProgram:t()},data:B1().decode(n.data)}}var N1,_k=a(()=>{D();h();N1=new Uint8Array([28,50,43,233,244,98,123,118]);});function Lse(){return fixEncoderSize(getBytesEncoder(),8).encode(V1)}function rd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["initialRoles",getArrayEncoder(at())]]),n=>({...n,discriminator:V1}))}function K1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["initialRoles",getArrayDecoder(dt())]])}function Vse(){return combineCodec(rd(),K1())}async function Kse(n,e){let t=e?.programAddress??u,r={rbacConfig:{value:n.rbacConfig??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.rbacConfig.value||(r.rbacConfig.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,98,97,99,95,99,111,110,102,105,103])),getAddressEncoder().encode(S(r.authority.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.rbacConfig),i(r.authority),i(r.systemProgram)],data:rd().encode(c),programAddress:t})}function Hse(n,e){let t=e?.programAddress??u,r={rbacConfig:{value:n.rbacConfig??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.rbacConfig),i(r.authority),i(r.systemProgram)],data:rd().encode(c),programAddress:t})}function jse(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{rbacConfig:t(),authority:t(),systemProgram:t()},data:K1().decode(n.data)}}var V1,Ok=a(()=>{D();h();m();V1=new Uint8Array([215,68,129,228,237,165,0,240]);});function tae(){return fixEncoderSize(getBytesEncoder(),8).encode(j1)}function od(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:j1}))}function $1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function nae(){return combineCodec(od(),$1())}async function rae(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.reputationMetrics),c(r.agent),c(r.authority),c(r.systemProgram),c(r.clock)],data:od().encode({}),programAddress:t})}function oae(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.reputationMetrics),c(r.agent),c(r.authority),c(r.systemProgram),c(r.clock)],data:od().encode({}),programAddress:t})}function iae(n){if(n.accounts.length<5)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reputationMetrics:t(),agent:t(),authority:t(),systemProgram:t(),clock:t()},data:$1().decode(n.data)}}var j1,Gk=a(()=>{D();h();j1=new Uint8Array([228,11,207,44,52,188,169,237]);});function Tae(){return fixEncoderSize(getBytesEncoder(),8).encode(J1)}function id(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["minStake",getU64Encoder()],["treasury",getAddressEncoder()]]),n=>({...n,discriminator:J1}))}function Q1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["minStake",getU64Decoder()],["treasury",getAddressDecoder()]])}function fae(){return combineCodec(id(),Q1())}async function X1(n,e){let t=e?.programAddress??u,r={stakingConfig:{value:n.stakingConfig??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.stakingConfig.value||(r.stakingConfig.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,99,111,110,102,105,103]))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.stakingConfig),i(r.authority),i(r.systemProgram)],data:id().encode(c),programAddress:t})}function Sae(n,e){let t=e?.programAddress??u,r={stakingConfig:{value:n.stakingConfig??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.stakingConfig),i(r.authority),i(r.systemProgram)],data:id().encode(c),programAddress:t})}function xae(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{stakingConfig:t(),authority:t(),systemProgram:t()},data:Q1().decode(n.data)}}var J1,Nk=a(()=>{D();h();J1=new Uint8Array([78,164,6,115,206,48,168,105]);});function Iae(){return fixEncoderSize(getBytesEncoder(),8).encode(Y1)}function cd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:Y1}))}function ey(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function vae(){return combineCodec(cd(),ey())}async function Mae(n,e){let t=e?.programAddress??u,r={reentrancyGuard:{value:n.reentrancyGuard??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}};r.reentrancyGuard.value||(r.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.reentrancyGuard),c(r.authority),c(r.systemProgram)],data:cd().encode({}),programAddress:t})}function kae(n,e){let t=e?.programAddress??u,r={reentrancyGuard:{value:n.reentrancyGuard??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.reentrancyGuard),c(r.authority),c(r.systemProgram)],data:cd().encode({}),programAddress:t})}function wae(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reentrancyGuard:t(),authority:t(),systemProgram:t()},data:ey().decode(n.data)}}var Y1,Lk=a(()=>{D();h();Y1=new Uint8Array([156,109,115,85,12,60,245,99]);});function Bae(){return fixEncoderSize(getBytesEncoder(),8).encode(oy)}function ad(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["credentialId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["subjectDataHash",fixEncoderSize(getBytesEncoder(),32)],["subjectDataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["expiresAt",getOptionEncoder(getI64Encoder())],["sourceAccount",getOptionEncoder(getAddressEncoder())]]),n=>({...n,discriminator:oy}))}function iy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["credentialId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["subjectDataHash",fixDecoderSize(getBytesDecoder(),32)],["subjectDataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["expiresAt",getOptionDecoder(getI64Decoder())],["sourceAccount",getOptionDecoder(getAddressDecoder())]])}function Lae(){return combineCodec(ad(),iy())}async function Vae(n,e){let t=e?.programAddress??u,r={credential:{value:n.credential??null,isWritable:true},credentialTemplate:{value:n.credentialTemplate??null,isWritable:true},credentialType:{value:n.credentialType??null,isWritable:true},subject:{value:n.subject??null,isWritable:false},issuer:{value:n.issuer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.credential.value||(r.credential.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([99,114,101,100,101,110,116,105,97,108])),getAddressEncoder().encode(S(r.credentialTemplate.value)),getAddressEncoder().encode(S(r.subject.value)),getUtf8Encoder().encode(I(c.credentialId))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credential),i(r.credentialTemplate),i(r.credentialType),i(r.subject),i(r.issuer),i(r.systemProgram)],data:ad().encode(c),programAddress:t})}function Kae(n,e){let t=e?.programAddress??u,r={credential:{value:n.credential??null,isWritable:true},credentialTemplate:{value:n.credentialTemplate??null,isWritable:true},credentialType:{value:n.credentialType??null,isWritable:true},subject:{value:n.subject??null,isWritable:false},issuer:{value:n.issuer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credential),i(r.credentialTemplate),i(r.credentialType),i(r.subject),i(r.issuer),i(r.systemProgram)],data:ad().encode(c),programAddress:t})}function Hae(n){if(n.accounts.length<6)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credential:t(),credentialTemplate:t(),credentialType:t(),subject:t(),issuer:t(),systemProgram:t()},data:iy().decode(n.data)}}var oy,Zk=a(()=>{D();h();oy=new Uint8Array([255,193,171,224,68,171,194,87]);});function tde(){return fixEncoderSize(getBytesEncoder(),8).encode(sy)}function ud(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["platform",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["externalId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["verified",getBooleanEncoder()]]),n=>({...n,discriminator:sy}))}function ay(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["platform",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["externalId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["verified",getBooleanDecoder()]])}function nde(){return combineCodec(ud(),ay())}async function rde(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},externalIdMapping:{value:n.externalIdMapping??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.externalIdMapping.value||(r.externalIdMapping.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([101,120,116,101,114,110,97,108,95,105,100])),getUtf8Encoder().encode(I(c.platform)),getUtf8Encoder().encode(I(c.externalId))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.externalIdMapping),i(r.authority),i(r.systemProgram)],data:ud().encode(c),programAddress:t})}function ode(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},externalIdMapping:{value:n.externalIdMapping??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.externalIdMapping),i(r.authority),i(r.systemProgram)],data:ud().encode(c),programAddress:t})}function ide(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),externalIdMapping:t(),authority:t(),systemProgram:t()},data:ay().decode(n.data)}}var sy,iw=a(()=>{D();h();sy=new Uint8Array([156,102,141,155,175,13,29,86]);});function yde(){return fixEncoderSize(getBytesEncoder(),8).encode(uy)}function gd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["newStatus",getBooleanEncoder()]]),n=>({...n,discriminator:uy}))}function gy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["newStatus",getBooleanDecoder()]])}function Tde(){return combineCodec(gd(),gy())}async function fde(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:true},owner:{value:n.owner??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agent.value||(r.agent.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.owner.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.owner),i(r.clock)],data:gd().encode(c),programAddress:t})}function Sde(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:true},owner:{value:n.owner??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.owner),i(r.clock)],data:gd().encode(c),programAddress:t})}function xde(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),owner:t(),clock:t()},data:gy().decode(n.data)}}var uy,sw=a(()=>{D();h();uy=new Uint8Array([164,219,91,38,45,31,33,47]);});function Fde(){return fixEncoderSize(getBytesEncoder(),8).encode(py)}function Ad(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["paymentSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["amount",getU64Encoder()],["responseTimeMs",getU64Encoder()],["success",getBooleanEncoder()]]),n=>({...n,discriminator:py}))}function ly(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["paymentSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["amount",getU64Decoder()],["responseTimeMs",getU64Decoder()],["success",getBooleanDecoder()]])}function Gde(){return combineCodec(Ad(),ly())}async function Wde(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:Ad().encode(c),programAddress:t})}function Nde(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:Ad().encode(c),programAddress:t})}function Bde(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reputationMetrics:t(),agent:t(),authority:t(),clock:t()},data:ly().decode(n.data)}}var py,gw=a(()=>{D();h();py=new Uint8Array([165,202,159,139,65,65,36,163]);});function Qde(){return fixEncoderSize(getBytesEncoder(),8).encode(my)}function Sd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentType",getU8Encoder()],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["pricingModel",J()]]),n=>({...n,discriminator:my}))}function yy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentType",getU8Decoder()],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["pricingModel",Q()]])}function Xde(){return combineCodec(Sd(),yy())}async function Ty(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},stakingAccount:{value:n.stakingAccount??null,isWritable:false},signer:{value:n.signer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.signer.value)),getUtf8Encoder().encode(I(c.agentId))]})),r.stakingAccount.value||(r.stakingAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103])),getAddressEncoder().encode(S(r.signer.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.stakingAccount),i(r.signer),i(r.systemProgram),i(r.clock)],data:Sd().encode(c),programAddress:t})}function Zde(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},stakingAccount:{value:n.stakingAccount??null,isWritable:false},signer:{value:n.signer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.stakingAccount),i(r.signer),i(r.systemProgram),i(r.clock)],data:Sd().encode(c),programAddress:t})}function Yde(n){if(n.accounts.length<5)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),stakingAccount:t(),signer:t(),systemProgram:t(),clock:t()},data:yy().decode(n.data)}}var my,mw=a(()=>{D();h();m();my=new Uint8Array([135,157,66,195,2,113,175,30]);});function aue(){return fixEncoderSize(getBytesEncoder(),8).encode(fy)}function Rd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentType",getU8Encoder()],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["pricingModel",J()]]),n=>({...n,discriminator:fy}))}function Sy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentType",getU8Decoder()],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["pricingModel",Q()]])}function due(){return combineCodec(Rd(),Sy())}async function xy(n,e){let t=e?.programAddress??u,r={treeAuthority:{value:n.treeAuthority??null,isWritable:true},merkleTree:{value:n.merkleTree??null,isWritable:true},userRegistry:{value:n.userRegistry??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},compressionProgram:{value:n.compressionProgram??null,isWritable:false},logWrapper:{value:n.logWrapper??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.treeAuthority.value||(r.treeAuthority.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,116,114,101,101,95,99,111,110,102,105,103])),getAddressEncoder().encode(S(r.signer.value))]})),r.userRegistry.value||(r.userRegistry.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(S(r.signer.value))]})),r.compressionProgram.value||(r.compressionProgram.value="cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK"),r.logWrapper.value||(r.logWrapper.value="noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.treeAuthority),i(r.merkleTree),i(r.userRegistry),i(r.signer),i(r.compressionProgram),i(r.logWrapper),i(r.systemProgram),i(r.clock)],data:Rd().encode(c),programAddress:t})}function uue(n,e){let t=e?.programAddress??u,r={treeAuthority:{value:n.treeAuthority??null,isWritable:true},merkleTree:{value:n.merkleTree??null,isWritable:true},userRegistry:{value:n.userRegistry??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},compressionProgram:{value:n.compressionProgram??null,isWritable:false},logWrapper:{value:n.logWrapper??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.compressionProgram.value||(r.compressionProgram.value="cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK"),r.logWrapper.value||(r.logWrapper.value="noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.treeAuthority),i(r.merkleTree),i(r.userRegistry),i(r.signer),i(r.compressionProgram),i(r.logWrapper),i(r.systemProgram),i(r.clock)],data:Rd().encode(c),programAddress:t})}function gue(n){if(n.accounts.length<8)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{treeAuthority:t(),merkleTree:t(),userRegistry:t(),signer:t(),compressionProgram:t(),logWrapper:t(),systemProgram:t(),clock:t()},data:Sy().decode(n.data)}}var fy,Sw=a(()=>{D();h();m();fy=new Uint8Array([15,6,94,55,65,80,123,248]);});function hue(){return fixEncoderSize(getBytesEncoder(),8).encode(Dy)}function hy(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["capabilities",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["serviceEndpoint",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:Dy}))}function Ey(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["capabilities",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["serviceEndpoint",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function Eue(){return combineCodec(hy(),Ey())}function Pue(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},authority:{value:n.authority??null,isWritable:true}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.authority)],data:hy().encode(c),programAddress:t})}function Cue(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),authority:t()},data:Ey().decode(n.data)}}var Dy,hw=a(()=>{D();h();Dy=new Uint8Array([34,233,111,236,212,22,26,254]);});function Uue(){return fixEncoderSize(getBytesEncoder(),8).encode(Cy)}function _d(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:Cy}))}function by(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function _ue(){return combineCodec(_d(),by())}async function zue(n,e){let t=e?.programAddress??u,r={reentrancyGuard:{value:n.reentrancyGuard??null,isWritable:true},authority:{value:n.authority??null,isWritable:true}};r.reentrancyGuard.value||(r.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]}));let c=g(t);return Object.freeze({accounts:[c(r.reentrancyGuard),c(r.authority)],data:_d().encode({}),programAddress:t})}function Oue(n,e){let t=e?.programAddress??u,r={reentrancyGuard:{value:n.reentrancyGuard??null,isWritable:true},authority:{value:n.authority??null,isWritable:true}},c=g(t);return Object.freeze({accounts:[c(r.reentrancyGuard),c(r.authority)],data:_d().encode({}),programAddress:t})}function Fue(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reentrancyGuard:t(),authority:t()},data:by().decode(n.data)}}var Cy,Pw=a(()=>{D();h();Cy=new Uint8Array([93,74,168,125,46,153,9,255]);});function jue(){return fixEncoderSize(getBytesEncoder(),8).encode(Iy)}function zd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:Iy}))}function vy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function $ue(){return combineCodec(zd(),vy())}async function que(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:false},didController:{value:n.didController??null,isWritable:false}};r.didDocument.value||(r.didDocument.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([100,105,100,95,100,111,99,117,109,101,110,116])),getAddressEncoder().encode(S(r.didController.value))]}));let c=g(t);return Object.freeze({accounts:[c(r.didDocument),c(r.didController)],data:zd().encode({}),programAddress:t})}function Jue(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:false},didController:{value:n.didController??null,isWritable:false}},c=g(t);return Object.freeze({accounts:[c(r.didDocument),c(r.didController)],data:zd().encode({}),programAddress:t})}function Que(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{didDocument:t(),didController:t()},data:vy().decode(n.data)}}var Iy,bw=a(()=>{D();h();Iy=new Uint8Array([168,180,218,211,184,19,102,12]);});var Uw={};oe(Uw,{REVOKE_AUTHORIZATION_DISCRIMINATOR:()=>Od,getRevokeAuthorizationDiscriminatorBytes:()=>vw,getRevokeAuthorizationInstruction:()=>kw,getRevokeAuthorizationInstructionDataCodec:()=>Mw,getRevokeAuthorizationInstructionDataDecoder:()=>Gd,getRevokeAuthorizationInstructionDataEncoder:()=>Fd,parseRevokeAuthorizationInstruction:()=>ww});function vw(){return fixEncoderSize(getBytesEncoder(),8).encode(Od)}function Fd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["nonce",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:Od}))}function Gd(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["nonce",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function Mw(){return combineCodec(Fd(),Gd())}function kw(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},authorization:{value:n.authorization??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.authorization),i(r.authority)],data:Fd().encode(c),programAddress:t})}function ww(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),authorization:t(),authority:t()},data:Gd().decode(n.data)}}var Od,My=a(()=>{D();h();Od=new Uint8Array([222,179,207,59,191,78,24,248]);});function Tge(){return fixEncoderSize(getBytesEncoder(),8).encode(ky)}function wy(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:ky}))}function Uy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function fge(){return combineCodec(wy(),Uy())}function Sge(n,e){let t=e?.programAddress??u,r={credential:{value:n.credential??null,isWritable:true},issuer:{value:n.issuer??null,isWritable:true}},c=g(t);return Object.freeze({accounts:[c(r.credential),c(r.issuer)],data:wy().encode({}),programAddress:t})}function xge(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credential:t(),issuer:t()},data:Uy().decode(n.data)}}var ky,Ow=a(()=>{D();h();ky=new Uint8Array([38,123,95,95,223,158,169,87]);});function wge(){return fixEncoderSize(getBytesEncoder(),8).encode(Oy)}function Wd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["owner",getAddressEncoder()],["reason",Qe()],["customAmount",getOptionEncoder(getU64Encoder())]]),n=>({...n,discriminator:Oy}))}function Fy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["owner",getAddressDecoder()],["reason",Xe()],["customAmount",getOptionDecoder(getU64Decoder())]])}function Uge(){return combineCodec(Wd(),Fy())}async function _ge(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},stakingVault:{value:n.stakingVault??null,isWritable:true},treasury:{value:n.treasury??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},tokenProgram:{value:n.tokenProgram??null,isWritable:false}},c={...n};r.stakingAccount.value||(r.stakingAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103])),getAddressEncoder().encode(I(c.owner))]})),r.stakingConfig.value||(r.stakingConfig.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,99,111,110,102,105,103]))]})),r.stakingVault.value||(r.stakingVault.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,118,97,117,108,116])),getAddressEncoder().encode(S(r.stakingConfig.value))]})),r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let i=g(t);return Object.freeze({accounts:[i(r.stakingAccount),i(r.stakingConfig),i(r.stakingVault),i(r.treasury),i(r.authority),i(r.tokenProgram)],data:Wd().encode(c),programAddress:t})}function zge(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},stakingVault:{value:n.stakingVault??null,isWritable:true},treasury:{value:n.treasury??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},tokenProgram:{value:n.tokenProgram??null,isWritable:false}},c={...n};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let i=g(t);return Object.freeze({accounts:[i(r.stakingAccount),i(r.stakingConfig),i(r.stakingVault),i(r.treasury),i(r.authority),i(r.tokenProgram)],data:Wd().encode(c),programAddress:t})}function Oge(n){if(n.accounts.length<6)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{stakingAccount:t(),stakingConfig:t(),stakingVault:t(),treasury:t(),authority:t(),tokenProgram:t()},data:Fy().decode(n.data)}}var Oy,Gw=a(()=>{D();h();m();Oy=new Uint8Array([190,242,137,27,41,18,233,37]);});function $ge(){return fixEncoderSize(getBytesEncoder(),8).encode(Gy)}function Bd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["amount",getU64Encoder()],["lockDuration",getI64Encoder()]]),n=>({...n,discriminator:Gy}))}function Wy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["amount",getU64Decoder()],["lockDuration",getI64Decoder()]])}function qge(){return combineCodec(Bd(),Wy())}async function Ny(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},ownerTokenAccount:{value:n.ownerTokenAccount??null,isWritable:true},stakingVault:{value:n.stakingVault??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},ghostMint:{value:n.ghostMint??null,isWritable:false},owner:{value:n.owner??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false},rent:{value:n.rent??null,isWritable:false}},c={...n};r.stakingAccount.value||(r.stakingAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103])),getAddressEncoder().encode(S(r.owner.value))]})),r.stakingVault.value||(r.stakingVault.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,118,97,117,108,116])),getAddressEncoder().encode(S(r.stakingConfig.value))]})),r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.rent.value||(r.rent.value="SysvarRent111111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.stakingAccount),i(r.ownerTokenAccount),i(r.stakingVault),i(r.stakingConfig),i(r.ghostMint),i(r.owner),i(r.tokenProgram),i(r.systemProgram),i(r.rent)],data:Bd().encode(c),programAddress:t})}function Jge(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},ownerTokenAccount:{value:n.ownerTokenAccount??null,isWritable:true},stakingVault:{value:n.stakingVault??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},ghostMint:{value:n.ghostMint??null,isWritable:false},owner:{value:n.owner??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false},rent:{value:n.rent??null,isWritable:false}},c={...n};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.rent.value||(r.rent.value="SysvarRent111111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.stakingAccount),i(r.ownerTokenAccount),i(r.stakingVault),i(r.stakingConfig),i(r.ghostMint),i(r.owner),i(r.tokenProgram),i(r.systemProgram),i(r.rent)],data:Bd().encode(c),programAddress:t})}function Qge(n){if(n.accounts.length<9)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{stakingAccount:t(),ownerTokenAccount:t(),stakingVault:t(),stakingConfig:t(),ghostMint:t(),owner:t(),tokenProgram:t(),systemProgram:t(),rent:t()},data:Wy().decode(n.data)}}var Gy,Lw=a(()=>{D();h();Gy=new Uint8Array([5,196,24,54,196,56,173,191]);});function dAe(){return fixEncoderSize(getBytesEncoder(),8).encode(By)}function Ly(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["deliveryProof",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:By}))}function Vy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["deliveryProof",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function uAe(){return combineCodec(Ly(),Vy())}function gAe(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},agentOwner:{value:n.agentOwner??null,isWritable:false}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.escrow),i(r.agent),i(r.agentOwner)],data:Ly().encode(c),programAddress:t})}function AAe(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{escrow:t(),agent:t(),agentOwner:t()},data:Vy().decode(n.data)}}var By,Hw=a(()=>{D();h();By=new Uint8Array([217,177,33,54,136,185,123,96]);});function vAe(){return fixEncoderSize(getBytesEncoder(),8).encode(Hy)}function Ld(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["rating",getU8Encoder()],["paymentSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:Hy}))}function jy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["rating",getU8Decoder()],["paymentSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function MAe(){return combineCodec(Ld(),jy())}async function kAe(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},client:{value:n.client??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.client),i(r.clock)],data:Ld().encode(c),programAddress:t})}function wAe(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},client:{value:n.client??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.client),i(r.clock)],data:Ld().encode(c),programAddress:t})}function UAe(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reputationMetrics:t(),agent:t(),client:t(),clock:t()},data:jy().decode(n.data)}}var Hy,$w=a(()=>{D();h();Hy=new Uint8Array([23,160,228,88,168,145,129,19]);});function NAe(){return fixEncoderSize(getBytesEncoder(),8).encode(qy)}function Vd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:qy}))}function Jy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function BAe(){return combineCodec(Vd(),Jy())}async function Qy(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},stakingVault:{value:n.stakingVault??null,isWritable:true},ownerTokenAccount:{value:n.ownerTokenAccount??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false}};r.stakingAccount.value||(r.stakingAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103])),getAddressEncoder().encode(S(r.owner.value))]})),r.stakingConfig.value||(r.stakingConfig.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,99,111,110,102,105,103]))]})),r.stakingVault.value||(r.stakingVault.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,118,97,117,108,116])),getAddressEncoder().encode(S(r.stakingConfig.value))]})),r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let c=g(t);return Object.freeze({accounts:[c(r.stakingAccount),c(r.stakingConfig),c(r.stakingVault),c(r.ownerTokenAccount),c(r.owner),c(r.tokenProgram)],data:Vd().encode({}),programAddress:t})}function LAe(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},stakingVault:{value:n.stakingVault??null,isWritable:true},ownerTokenAccount:{value:n.ownerTokenAccount??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false}};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let c=g(t);return Object.freeze({accounts:[c(r.stakingAccount),c(r.stakingConfig),c(r.stakingVault),c(r.ownerTokenAccount),c(r.owner),c(r.tokenProgram)],data:Vd().encode({}),programAddress:t})}function VAe(n){if(n.accounts.length<6)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{stakingAccount:t(),stakingConfig:t(),stakingVault:t(),ownerTokenAccount:t(),owner:t(),tokenProgram:t()},data:Jy().decode(n.data)}}var qy,Qw=a(()=>{D();h();qy=new Uint8Array([252,101,172,252,1,4,12,116]);});function epe(){return fixEncoderSize(getBytesEncoder(),8).encode(eT)}function Jd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentType",getU8Encoder()],["name",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["description",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["pricingModel",getOptionEncoder(J())]]),n=>({...n,discriminator:eT}))}function tT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentType",getU8Decoder()],["name",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["description",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["pricingModel",getOptionDecoder(Q())]])}function tpe(){return combineCodec(Jd(),tT())}async function npe(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.signer.value)),getUtf8Encoder().encode(I(c.agentId))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Jd().encode(c),programAddress:t})}function nT(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Jd().encode(c),programAddress:t})}function rpe(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),signer:t(),clock:t()},data:tT().decode(n.data)}}var eT,Zw=a(()=>{D();h();m();eT=new Uint8Array([85,2,178,9,119,139,102,164]);});function Spe(){return fixEncoderSize(getBytesEncoder(),8).encode(oT)}function Qd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["reputationScore",getU64Encoder()]]),n=>({...n,discriminator:oT}))}function iT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["reputationScore",getU64Decoder()]])}function xpe(){return combineCodec(Qd(),iT())}async function Dpe(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.signer.value)),getUtf8Encoder().encode(I(c.agentId))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Qd().encode(c),programAddress:t})}function hpe(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Qd().encode(c),programAddress:t})}function Epe(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),signer:t(),clock:t()},data:iT().decode(n.data)}}var oT,tU=a(()=>{D();h();oT=new Uint8Array([80,227,92,245,231,37,99,180]);});function Npe(){return fixEncoderSize(getBytesEncoder(),8).encode(pT)}function Xd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentPubkey",getAddressEncoder()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["isActive",getBooleanEncoder()],["lastUpdated",getI64Encoder()],["metadataUri",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["capabilities",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:pT}))}function lT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentPubkey",getAddressDecoder()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["isActive",getBooleanDecoder()],["lastUpdated",getI64Decoder()],["metadataUri",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["capabilities",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function Bpe(){return combineCodec(Xd(),lT())}async function Lpe(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.agent.value||(r.agent.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.owner.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.owner),i(r.systemProgram)],data:Xd().encode(c),programAddress:t})}function Vpe(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.owner),i(r.systemProgram)],data:Xd().encode(c),programAddress:t})}function Kpe(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),owner:t(),systemProgram:t()},data:lT().decode(n.data)}}var pT,oU=a(()=>{D();h();pT=new Uint8Array([87,146,181,198,252,68,243,102]);});function rle(){return fixEncoderSize(getBytesEncoder(),8).encode(mT)}function yT(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["crossmintCredentialId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["status",Le()]]),n=>({...n,discriminator:mT}))}function TT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["crossmintCredentialId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["status",Ve()]])}function ole(){return combineCodec(yT(),TT())}function ile(n,e){let t=e?.programAddress??u,r={credential:{value:n.credential??null,isWritable:true},issuer:{value:n.issuer??null,isWritable:true}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.credential),i(r.issuer)],data:yT().encode(c),programAddress:t})}function cle(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credential:t(),issuer:t()},data:TT().decode(n.data)}}var mT,sU=a(()=>{D();h();m();mT=new Uint8Array([22,167,59,238,22,231,239,146]);});function mle(){return fixEncoderSize(getBytesEncoder(),8).encode(ST)}function eu(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["addVerificationMethod",getOptionEncoder(Te())],["removeVerificationMethodId",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["addServiceEndpoint",getOptionEncoder(me())],["removeServiceEndpointId",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:ST}))}function xT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["addVerificationMethod",getOptionDecoder(fe())],["removeVerificationMethodId",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["addServiceEndpoint",getOptionDecoder(ye())],["removeServiceEndpointId",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function yle(){return combineCodec(eu(),xT())}async function Tle(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.didDocument.value||(r.didDocument.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([100,105,100,95,100,111,99,117,109,101,110,116])),getAddressEncoder().encode(S(r.controller.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.didDocument),i(r.controller),i(r.clock)],data:eu().encode(c),programAddress:t})}function fle(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.didDocument),i(r.controller),i(r.clock)],data:eu().encode(c),programAddress:t})}function Sle(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{didDocument:t(),controller:t(),clock:t()},data:xT().decode(n.data)}}var ST,mU=a(()=>{D();h();m();ST=new Uint8Array([64,216,17,91,205,94,45,57]);});function wle(){return fixEncoderSize(getBytesEncoder(),8).encode(DT)}function hT(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["newScore",getU64Encoder()],["components",getOptionEncoder(getArrayEncoder(ct()))]]),n=>({...n,discriminator:DT}))}function ET(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["newScore",getU64Decoder()],["components",getOptionDecoder(getArrayDecoder(st()))]])}function Ule(){return combineCodec(hT(),ET())}function _le(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.authority)],data:hT().encode(c),programAddress:t})}function zle(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),authority:t()},data:ET().decode(n.data)}}var DT,fU=a(()=>{D();h();m();DT=new Uint8Array([213,152,5,80,163,224,151,120]);});function Hle(){return fixEncoderSize(getBytesEncoder(),8).encode(RT)}function tu(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["escrowFeeBps",getOptionEncoder(getU16Encoder())],["agentRegistrationFee",getOptionEncoder(getU64Encoder())],["listingFee",getOptionEncoder(getU64Encoder())],["disputeFeeBps",getOptionEncoder(getU16Encoder())],["feesEnabled",getOptionEncoder(getBooleanEncoder())],["treasury",getOptionEncoder(getAddressEncoder())],["buybackPool",getOptionEncoder(getAddressEncoder())],["moderatorPool",getOptionEncoder(getAddressEncoder())]]),n=>({...n,discriminator:RT}))}function IT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["escrowFeeBps",getOptionDecoder(getU16Decoder())],["agentRegistrationFee",getOptionDecoder(getU64Decoder())],["listingFee",getOptionDecoder(getU64Decoder())],["disputeFeeBps",getOptionDecoder(getU16Decoder())],["feesEnabled",getOptionDecoder(getBooleanDecoder())],["treasury",getOptionDecoder(getAddressDecoder())],["buybackPool",getOptionDecoder(getAddressDecoder())],["moderatorPool",getOptionDecoder(getAddressDecoder())]])}function jle(){return combineCodec(tu(),IT())}async function $le(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}},c={...n};r.config.value||(r.config.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([112,114,111,116,111,99,111,108,95,99,111,110,102,105,103]))]}));let i=g(t);return Object.freeze({accounts:[i(r.config),i(r.authority)],data:tu().encode(c),programAddress:t})}function qle(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.config),i(r.authority)],data:tu().encode(c),programAddress:t})}function Jle(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{config:t(),authority:t()},data:IT().decode(n.data)}}var RT,PU=a(()=>{D();h();RT=new Uint8Array([197,97,123,54,221,168,11,135]);});function ome(){return fixEncoderSize(getBytesEncoder(),8).encode(OT)}function ou(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["skillTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["behaviorTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["complianceTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["tagScores",getArrayEncoder(ut())]]),n=>({...n,discriminator:OT}))}function FT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["skillTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["behaviorTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["complianceTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["tagScores",getArrayDecoder(gt())]])}function ime(){return combineCodec(ou(),FT())}async function cme(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:ou().encode(c),programAddress:t})}function sme(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:ou().encode(c),programAddress:t})}function ame(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reputationMetrics:t(),agent:t(),authority:t(),clock:t()},data:FT().decode(n.data)}}var OT,bU=a(()=>{D();h();m();OT=new Uint8Array([206,96,254,186,129,180,103,198]);});var zU={};oe(zU,{UPDATE_REPUTATION_WITH_AUTH_DISCRIMINATOR:()=>du,getUpdateReputationWithAuthDiscriminatorBytes:()=>MU,getUpdateReputationWithAuthInstruction:()=>UU,getUpdateReputationWithAuthInstructionAsync:()=>wU,getUpdateReputationWithAuthInstructionDataCodec:()=>kU,getUpdateReputationWithAuthInstructionDataDecoder:()=>uu,getUpdateReputationWithAuthInstructionDataEncoder:()=>Xt,parseUpdateReputationWithAuthInstruction:()=>_U});function MU(){return fixEncoderSize(getBytesEncoder(),8).encode(du)}function Xt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["reputationChange",getI64Encoder()],["transactionSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["metadata",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["nonce",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:du}))}function uu(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["reputationChange",getI64Decoder()],["transactionSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["metadata",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["nonce",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function kU(){return combineCodec(Xt(),uu())}async function wU(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},authorization:{value:n.authorization??null,isWritable:true},usageRecord:{value:n.usageRecord??null,isWritable:true},authorizedSource:{value:n.authorizedSource??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.authorization.value||(r.authorization.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,97,117,116,104])),getAddressEncoder().encode(S(r.agent.value)),getAddressEncoder().encode(S(r.authorizedSource.value)),getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())).encode(I(c.nonce))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.reputationMetrics),i(r.authorization),i(r.usageRecord),i(r.authorizedSource),i(r.systemProgram),i(r.clock)],data:Xt().encode(c),programAddress:t})}function UU(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},authorization:{value:n.authorization??null,isWritable:true},usageRecord:{value:n.usageRecord??null,isWritable:true},authorizedSource:{value:n.authorizedSource??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.reputationMetrics),i(r.authorization),i(r.usageRecord),i(r.authorizedSource),i(r.systemProgram),i(r.clock)],data:Xt().encode(c),programAddress:t})}function _U(n){if(n.accounts.length<7)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),reputationMetrics:t(),authorization:t(),usageRecord:t(),authorizedSource:t(),systemProgram:t(),clock:t()},data:uu().decode(n.data)}}var du,VT=a(()=>{D();h();du=new Uint8Array([61,236,225,167,134,43,53,93]);});function vme(){return fixEncoderSize(getBytesEncoder(),8).encode($T)}function gu(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["sourceName",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["score",getU16Encoder()],["weight",getU16Encoder()],["dataPoints",getU32Encoder()],["reliability",getU16Encoder()]]),n=>({...n,discriminator:$T}))}function qT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["sourceName",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["score",getU16Decoder()],["weight",getU16Decoder()],["dataPoints",getU32Decoder()],["reliability",getU16Decoder()]])}function Mme(){return combineCodec(gu(),qT())}async function kme(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:gu().encode(c),programAddress:t})}function wme(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:gu().encode(c),programAddress:t})}function Ume(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reputationMetrics:t(),agent:t(),authority:t(),clock:t()},data:qT().decode(n.data)}}var $T,WU=a(()=>{D();h();$T=new Uint8Array([161,240,255,69,130,227,71,123]);});function e1e(){return fixEncoderSize(getBytesEncoder(),8).encode(XT)}function Au(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentPubkey",getAddressEncoder()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["supportedCapabilities",getArrayEncoder(getU64Encoder())],["verifiedAt",getI64Encoder()]]),n=>({...n,discriminator:XT}))}function ZT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentPubkey",getAddressDecoder()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["supportedCapabilities",getArrayDecoder(getU64Decoder())],["verifiedAt",getI64Decoder()]])}function t1e(){return combineCodec(Au(),ZT())}async function YT(n,e){let t=e?.programAddress??u,r={agentVerification:{value:n.agentVerification??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},verifier:{value:n.verifier??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentVerification.value||(r.agentVerification.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,118,101,114,105,102,105,99,97,116,105,111,110])),getAddressEncoder().encode(S(r.agent.value)),getAddressEncoder().encode(S(r.verifier.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentVerification),i(r.agent),i(r.verifier),i(r.systemProgram),i(r.clock)],data:Au().encode(c),programAddress:t})}function n1e(n,e){let t=e?.programAddress??u,r={agentVerification:{value:n.agentVerification??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},verifier:{value:n.verifier??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentVerification),i(r.agent),i(r.verifier),i(r.systemProgram),i(r.clock)],data:Au().encode(c),programAddress:t})}function r1e(n){if(n.accounts.length<5)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentVerification:t(),agent:t(),verifier:t(),systemProgram:t(),clock:t()},data:ZT().decode(n.data)}}var XT,BU=a(()=>{D();h();XT=new Uint8Array([206,212,108,12,105,61,100,66]);});function f1e(){return fixEncoderSize(getBytesEncoder(),8).encode(ef)}function tf(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["nonce",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:ef}))}function nf(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["nonce",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function S1e(){return combineCodec(tf(),nf())}function x1e(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},authorization:{value:n.authorization??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.authorization),i(r.clock)],data:tf().encode(c),programAddress:t})}function D1e(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),authorization:t(),clock:t()},data:nf().decode(n.data)}}var ef,KU=a(()=>{D();h();ef=new Uint8Array([43,9,131,59,74,118,113,170]);});var HU=a(()=>{tM();oM();sM();yM();RM();Gm();BM();VM();$M();QM();ek();rk();ck();dk();gk();pk();yk();Dk();Ek();wk();_k();Ok();Gk();Nk();Lk();Zk();iw();sw();gw();mw();Sw();hw();Pw();bw();My();Ow();Gw();Lw();Hw();$w();Qw();Zw();tU();oU();sU();mU();fU();PU();bU();VT();WU();BU();KU();});var pu={};oe(pu,{ACTIVATE_AGENT_DISCRIMINATOR:()=>xm,AGENT_DISCRIMINATOR:()=>ep,AGENT_REPUTATION_AUTH_DISCRIMINATOR:()=>ip,AGENT_TREE_CONFIG_DISCRIMINATOR:()=>ap,AGENT_VERIFICATION_DISCRIMINATOR:()=>gp,APPROVE_DELIVERY_DISCRIMINATOR:()=>Em,ARBITRATE_DISPUTE_DISCRIMINATOR:()=>bm,AUDIT_TRAIL_DISCRIMINATOR:()=>yp,AUTHORIZATION_USAGE_RECORD_DISCRIMINATOR:()=>Dp,AUTO_CREATE_GHOST_DISCRIMINATOR:()=>Mm,AccessTier:()=>vn,ActivationRequirementType:()=>Nn,AgentStatus:()=>Bn,AuditAction:()=>Zn,AuthenticationLevel:()=>dr,AuthenticationMethod:()=>Ar,BackupFrequency:()=>Cr,BiometricStorageMethod:()=>wr,BiometricType:()=>Ur,CLAIM_GHOST_DISCRIMINATOR:()=>wm,COMPLIANCE_REPORT_DISCRIMINATOR:()=>Ip,CREATE_AGENT_AUTHORIZATION_DISCRIMINATOR:()=>Ba,CREATE_CREDENTIAL_TEMPLATE_DISCRIMINATOR:()=>Hm,CREATE_CREDENTIAL_TYPE_DISCRIMINATOR:()=>Ym,CREATE_DID_DOCUMENT_DISCRIMINATOR:()=>n1,CREATE_ESCROW_DISCRIMINATOR:()=>c1,CREATE_MULTISIG_DISCRIMINATOR:()=>d1,CREDENTIAL_DISCRIMINATOR:()=>Bp,CREDENTIAL_TEMPLATE_DISCRIMINATOR:()=>Qp,CREDENTIAL_TYPE_DISCRIMINATOR:()=>il,ConditionType:()=>Nr,ConstraintOperator:()=>Jr,CredentialKind:()=>Qr,CredentialStatus:()=>Xr,CrossChainStatus:()=>eo,DEACTIVATE_AGENT_DISCRIMINATOR:()=>A1,DEACTIVATE_CREDENTIAL_TEMPLATE_DISCRIMINATOR:()=>m1,DEACTIVATE_CREDENTIAL_TYPE_DISCRIMINATOR:()=>f1,DEACTIVATE_DID_DOCUMENT_DISCRIMINATOR:()=>h1,DID_DOCUMENT_DISCRIMINATOR:()=>ll,DataAccessLevel:()=>to,DegradationHandling:()=>co,ENABLE_PROTOCOL_FEES_DISCRIMINATOR:()=>C1,EXTERNAL_ID_MAPPING_DISCRIMINATOR:()=>Tl,EnforcementLevel:()=>yo,EscrowStatus:()=>To,FILE_DISPUTE_DISCRIMINATOR:()=>R1,GENERATE_COMPLIANCE_REPORT_DISCRIMINATOR:()=>k1,GHOSTSPEAK_MARKETPLACE_ERROR__DEFAULT_KEY_AS_ADMIN:()=>Hv,GHOSTSPEAK_MARKETPLACE_ERROR__SYSTEM_PROGRAM_AS_ADMIN:()=>Kv,GHOSTSPEAK_MARKETPLACE_ERROR__TEST_ADDRESS_ON_MAINNET:()=>$v,GHOSTSPEAK_MARKETPLACE_ERROR__UNAUTHORIZED_ADMIN:()=>jv,GHOSTSPEAK_MARKETPLACE_ERROR__VALIDATION_FAILED:()=>qv,GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS:()=>u,GHOST_PROTECT_ESCROW_DISCRIMINATOR:()=>Ml,GOVERNANCE_PROPOSAL_DISCRIMINATOR:()=>zl,GhostspeakMarketplaceAccount:()=>Bv,GhostspeakMarketplaceInstruction:()=>Lv,INITIALIZE_AUDIT_TRAIL_DISCRIMINATOR:()=>_1,INITIALIZE_GOVERNANCE_PROPOSAL_DISCRIMINATOR:()=>F1,INITIALIZE_PROTOCOL_CONFIG_DISCRIMINATOR:()=>N1,INITIALIZE_RBAC_CONFIG_DISCRIMINATOR:()=>V1,INITIALIZE_REPUTATION_METRICS_DISCRIMINATOR:()=>j1,INITIALIZE_STAKING_CONFIG_DISCRIMINATOR:()=>J1,INIT_REENTRANCY_GUARD_DISCRIMINATOR:()=>Y1,ISSUE_CREDENTIAL_DISCRIMINATOR:()=>oy,LINK_EXTERNAL_ID_DISCRIMINATOR:()=>sy,MANAGE_AGENT_STATUS_DISCRIMINATOR:()=>uy,MULTISIG_DISCRIMINATOR:()=>Nl,MultisigType:()=>Ko,NotificationMethod:()=>Jo,NotificationPriority:()=>Zo,NotificationTargetType:()=>di,NotificationTiming:()=>ui,PROTOCOL_CONFIG_DISCRIMINATOR:()=>Hl,PermissionConstraintType:()=>Fi,PolicyStatus:()=>ec,PolicyType:()=>tc,PricingModel:()=>Et,ProposalStatus:()=>ac,ProposalType:()=>Pt,QuorumMethod:()=>gc,RBAC_CONFIG_DISCRIMINATOR:()=>Zl,RECORD_PAYAI_PAYMENT_DISCRIMINATOR:()=>py,REENTRANCY_GUARD_DISCRIMINATOR:()=>tm,REGISTER_AGENT_COMPRESSED_DISCRIMINATOR:()=>fy,REGISTER_AGENT_DISCRIMINATOR:()=>my,REGISTER_GHOST_METADATA_DISCRIMINATOR:()=>Dy,REPUTATION_METRICS_DISCRIMINATOR:()=>om,RESET_REENTRANCY_GUARD_DISCRIMINATOR:()=>Cy,RESOLVE_DID_DOCUMENT_DISCRIMINATOR:()=>Iy,REVOKE_AUTHORIZATION_DISCRIMINATOR:()=>Od,REVOKE_CREDENTIAL_DISCRIMINATOR:()=>ky,ReentrancyState:()=>yc,ReportStatus:()=>Ic,ReportType:()=>kc,ReportingFrequency:()=>Rc,ReputationSourceType:()=>_c,RiskCategory:()=>Vc,RiskLevel:()=>Qc,RoleStatus:()=>ms,RoleType:()=>ys,RuleEffect:()=>Ts,SLASH_STAKE_DISCRIMINATOR:()=>Oy,STAKE_GHOST_DISCRIMINATOR:()=>Gy,STAKING_ACCOUNT_DISCRIMINATOR:()=>dm,STAKING_CONFIG_DISCRIMINATOR:()=>Am,SUBMIT_DELIVERY_DISCRIMINATOR:()=>By,SUBMIT_SERVICE_RATING_DISCRIMINATOR:()=>Hy,ScopeInheritance:()=>xs,ScopeType:()=>Ds,SecurityEventType:()=>hs,ServiceEndpointType:()=>vs,SlashReason:()=>Ms,SodConstraintType:()=>Us,StepUpTrigger:()=>Os,TimeLockType:()=>Bs,TransactionPriority:()=>Ls,TransactionStatus:()=>Vs,TransactionType:()=>Ks,TrendDirection:()=>Hs,UNSTAKE_GHOST_DISCRIMINATOR:()=>qy,UPDATE_AGENT_DISCRIMINATOR:()=>eT,UPDATE_AGENT_REPUTATION_DISCRIMINATOR:()=>oT,UPDATE_AGENT_SERVICE_DISCRIMINATOR:()=>pT,UPDATE_CROSSCHAIN_STATUS_DISCRIMINATOR:()=>mT,UPDATE_DID_DOCUMENT_DISCRIMINATOR:()=>ST,UPDATE_GHOST_SCORE_DISCRIMINATOR:()=>DT,UPDATE_PROTOCOL_CONFIG_DISCRIMINATOR:()=>RT,UPDATE_REPUTATION_TAGS_DISCRIMINATOR:()=>OT,UPDATE_REPUTATION_WITH_AUTH_DISCRIMINATOR:()=>du,UPDATE_SOURCE_REPUTATION_DISCRIMINATOR:()=>$T,USER_REGISTRY_DISCRIMINATOR:()=>mm,UnlockMethod:()=>js,VERIFY_AGENT_DISCRIMINATOR:()=>XT,VERIFY_AUTHORIZATION_DISCRIMINATOR:()=>ef,ValueType:()=>$s,VerificationMethodType:()=>Zs,VerificationRelationship:()=>Ys,ViolationSeverity:()=>ea,VoteChoice:()=>ia,arbitratorDecision:()=>SO,decodeAgent:()=>np,decodeAgentReputationAuth:()=>sp,decodeAgentTreeConfig:()=>up,decodeAgentVerification:()=>pp,decodeAuditTrail:()=>fp,decodeAuthorizationUsageRecord:()=>Ep,decodeComplianceReport:()=>Mp,decodeCredential:()=>Vp,decodeCredentialTemplate:()=>Zp,decodeCredentialType:()=>sl,decodeDidDocument:()=>yl,decodeExternalIdMapping:()=>Sl,decodeGhostProtectEscrow:()=>wl,decodeGovernanceProposal:()=>Fl,decodeMultisig:()=>Ll,decodeProtocolConfig:()=>$l,decodeRbacConfig:()=>em,decodeReentrancyGuard:()=>rm,decodeReputationMetrics:()=>cm,decodeStakingAccount:()=>gm,decodeStakingConfig:()=>lm,decodeUserRegistry:()=>Tm,delegationScope:()=>d2,fetchAgent:()=>Q$,fetchAgentReputationAuth:()=>Tq,fetchAgentTreeConfig:()=>Oq,fetchAgentVerification:()=>nJ,fetchAllAgent:()=>X$,fetchAllAgentReputationAuth:()=>fq,fetchAllAgentTreeConfig:()=>Fq,fetchAllAgentVerification:()=>rJ,fetchAllAuditTrail:()=>hJ,fetchAllAuthorizationUsageRecord:()=>VJ,fetchAllComplianceReport:()=>cQ,fetchAllCredential:()=>DQ,fetchAllCredentialTemplate:()=>jQ,fetchAllCredentialType:()=>TX,fetchAllDidDocument:()=>NX,fetchAllExternalIdMapping:()=>dZ,fetchAllGhostProtectEscrow:()=>bZ,fetchAllGovernanceProposal:()=>HZ,fetchAllMaybeAgent:()=>yb,fetchAllMaybeAgentReputationAuth:()=>Mb,fetchAllMaybeAgentTreeConfig:()=>Gb,fetchAllMaybeAgentVerification:()=>qb,fetchAllMaybeAuditTrail:()=>nR,fetchAllMaybeAuthorizationUsageRecord:()=>yR,fetchAllMaybeComplianceReport:()=>xR,fetchAllMaybeCredential:()=>PR,fetchAllMaybeCredentialTemplate:()=>wR,fetchAllMaybeCredentialType:()=>GR,fetchAllMaybeDidDocument:()=>KR,fetchAllMaybeExternalIdMapping:()=>oI,fetchAllMaybeGhostProtectEscrow:()=>AI,fetchAllMaybeGovernanceProposal:()=>PI,fetchAllMaybeMultisig:()=>GI,fetchAllMaybeProtocolConfig:()=>qI,fetchAllMaybeRbacConfig:()=>nv,fetchAllMaybeReentrancyGuard:()=>av,fetchAllMaybeReputationMetrics:()=>lv,fetchAllMaybeStakingAccount:()=>hv,fetchAllMaybeStakingConfig:()=>wv,fetchAllMaybeUserRegistry:()=>Gv,fetchAllMultisig:()=>cY,fetchAllProtocolConfig:()=>CY,fetchAllRbacConfig:()=>VY,fetchAllReentrancyGuard:()=>Aee,fetchAllReputationMetrics:()=>wee,fetchAllStakingAccount:()=>tte,fetchAllStakingConfig:()=>Ete,fetchAllUserRegistry:()=>$te,fetchAuditTrail:()=>DJ,fetchAuthorizationUsageRecord:()=>LJ,fetchComplianceReport:()=>iQ,fetchCredential:()=>xQ,fetchCredentialTemplate:()=>HQ,fetchCredentialType:()=>yX,fetchDidDocument:()=>WX,fetchExternalIdMapping:()=>aZ,fetchGhostProtectEscrow:()=>CZ,fetchGovernanceProposal:()=>KZ,fetchMaybeAgent:()=>mb,fetchMaybeAgentReputationAuth:()=>vb,fetchMaybeAgentTreeConfig:()=>Fb,fetchMaybeAgentVerification:()=>$b,fetchMaybeAuditTrail:()=>tR,fetchMaybeAuthorizationUsageRecord:()=>mR,fetchMaybeComplianceReport:()=>SR,fetchMaybeCredential:()=>ER,fetchMaybeCredentialTemplate:()=>kR,fetchMaybeCredentialType:()=>FR,fetchMaybeDidDocument:()=>VR,fetchMaybeExternalIdMapping:()=>rI,fetchMaybeGhostProtectEscrow:()=>gI,fetchMaybeGovernanceProposal:()=>EI,fetchMaybeMultisig:()=>FI,fetchMaybeProtocolConfig:()=>$I,fetchMaybeRbacConfig:()=>tv,fetchMaybeReentrancyGuard:()=>sv,fetchMaybeReputationMetrics:()=>pv,fetchMaybeStakingAccount:()=>Dv,fetchMaybeStakingConfig:()=>kv,fetchMaybeUserRegistry:()=>Fv,fetchMultisig:()=>iY,fetchProtocolConfig:()=>PY,fetchRbacConfig:()=>LY,fetchReentrancyGuard:()=>gee,fetchReputationMetrics:()=>kee,fetchStakingAccount:()=>ete,fetchStakingConfig:()=>hte,fetchUserRegistry:()=>jte,getAccessAuditConfigCodec:()=>_0,getAccessAuditConfigDecoder:()=>yn,getAccessAuditConfigEncoder:()=>mn,getAccessPolicyCodec:()=>K0,getAccessPolicyDecoder:()=>fn,getAccessPolicyEncoder:()=>Tn,getAccessTierCodec:()=>q0,getAccessTierDecoder:()=>$,getAccessTierEncoder:()=>j,getAccountLockoutPoliciesCodec:()=>l_,getAccountLockoutPoliciesDecoder:()=>Un,getAccountLockoutPoliciesEncoder:()=>wn,getActionCodec:()=>o_,getActionDecoder:()=>kn,getActionEncoder:()=>Mn,getActivateAgentDiscriminatorBytes:()=>mne,getActivateAgentInstruction:()=>hm,getActivateAgentInstructionAsync:()=>Tne,getActivateAgentInstructionDataCodec:()=>yne,getActivateAgentInstructionDataDecoder:()=>Dm,getActivateAgentInstructionDataEncoder:()=>Ga,getActivationRequirementCodec:()=>M_,getActivationRequirementDecoder:()=>Fn,getActivationRequirementEncoder:()=>On,getActivationRequirementTypeCodec:()=>__,getActivationRequirementTypeDecoder:()=>Wn,getActivationRequirementTypeEncoder:()=>Gn,getAgentCodec:()=>J$,getAgentDecoder:()=>tp,getAgentDiscriminatorBytes:()=>q$,getAgentEncoder:()=>lb,getAgentRegisteredEventCodec:()=>j_,getAgentRegisteredEventDecoder:()=>tS,getAgentRegisteredEventEncoder:()=>eS,getAgentReputationAuthCodec:()=>yq,getAgentReputationAuthDecoder:()=>cp,getAgentReputationAuthDiscriminatorBytes:()=>mq,getAgentReputationAuthEncoder:()=>Ib,getAgentServiceUpdatedEventCodec:()=>cz,getAgentServiceUpdatedEventDecoder:()=>cS,getAgentServiceUpdatedEventEncoder:()=>iS,getAgentStatusChangedEventCodec:()=>yz,getAgentStatusChangedEventDecoder:()=>lS,getAgentStatusChangedEventEncoder:()=>pS,getAgentStatusCodec:()=>uz,getAgentStatusDecoder:()=>Vn,getAgentStatusEncoder:()=>Ln,getAgentTreeConfigCodec:()=>zq,getAgentTreeConfigDecoder:()=>dp,getAgentTreeConfigDiscriminatorBytes:()=>_q,getAgentTreeConfigEncoder:()=>Ob,getAgentTreeConfigSize:()=>Gq,getAgentUpdatedEventCodec:()=>hz,getAgentUpdatedEventDecoder:()=>SS,getAgentUpdatedEventEncoder:()=>fS,getAgentVerificationCodec:()=>tJ,getAgentVerificationDataCodec:()=>Nz,getAgentVerificationDataDecoder:()=>Hn,getAgentVerificationDataEncoder:()=>Kn,getAgentVerificationDecoder:()=>Ap,getAgentVerificationDiscriminatorBytes:()=>eJ,getAgentVerificationEncoder:()=>jb,getAgingPolicyCodec:()=>eO,getAgingPolicyDecoder:()=>$n,getAgingPolicyEncoder:()=>jn,getApprovalLevelCodec:()=>AO,getApprovalLevelDecoder:()=>Xn,getApprovalLevelEncoder:()=>Qn,getApproveDeliveryDiscriminatorBytes:()=>Cne,getApproveDeliveryInstruction:()=>Rne,getApproveDeliveryInstructionDataCodec:()=>bne,getApproveDeliveryInstructionDataDecoder:()=>Cm,getApproveDeliveryInstructionDataEncoder:()=>Pm,getArbitrateDisputeDiscriminatorBytes:()=>zne,getArbitrateDisputeInstruction:()=>Fne,getArbitrateDisputeInstructionDataCodec:()=>One,getArbitrateDisputeInstructionDataDecoder:()=>Im,getArbitrateDisputeInstructionDataEncoder:()=>Rm,getArbitratorDecisionCodec:()=>fO,getArbitratorDecisionDecoder:()=>ce,getArbitratorDecisionEncoder:()=>ie,getAuditActionCodec:()=>PO,getAuditActionDecoder:()=>Fe,getAuditActionEncoder:()=>Oe,getAuditConfigCodec:()=>_O,getAuditConfigDecoder:()=>We,getAuditConfigEncoder:()=>Ge,getAuditContextCodec:()=>KO,getAuditContextDecoder:()=>or,getAuditContextEncoder:()=>rr,getAuditEntryCodec:()=>ZO,getAuditEntryDecoder:()=>cr,getAuditEntryEncoder:()=>ir,getAuditTrailCodec:()=>xJ,getAuditTrailDecoder:()=>Tp,getAuditTrailDiscriminatorBytes:()=>SJ,getAuditTrailEncoder:()=>eR,getAuditTrailInitializedEventCodec:()=>A8,getAuditTrailInitializedEventDecoder:()=>OS,getAuditTrailInitializedEventEncoder:()=>zS,getAuthenticationLevelCodec:()=>y8,getAuthenticationLevelDecoder:()=>gr,getAuthenticationLevelEncoder:()=>ur,getAuthenticationMethodCodec:()=>x8,getAuthenticationMethodDecoder:()=>lr,getAuthenticationMethodEncoder:()=>pr,getAuthenticationPoliciesCodec:()=>M8,getAuthenticationPoliciesDecoder:()=>yr,getAuthenticationPoliciesEncoder:()=>mr,getAuthenticationStrengthCodec:()=>O8,getAuthenticationStrengthDecoder:()=>fr,getAuthenticationStrengthEncoder:()=>Tr,getAuthorizationPoliciesCodec:()=>N8,getAuthorizationPoliciesDecoder:()=>Pr,getAuthorizationPoliciesEncoder:()=>Er,getAuthorizationUsageRecordCodec:()=>BJ,getAuthorizationUsageRecordDecoder:()=>hp,getAuthorizationUsageRecordDiscriminatorBytes:()=>NJ,getAuthorizationUsageRecordEncoder:()=>lR,getAutoCreateGhostDiscriminatorBytes:()=>Xne,getAutoCreateGhostInstruction:()=>ere,getAutoCreateGhostInstructionAsync:()=>Yne,getAutoCreateGhostInstructionDataCodec:()=>Zne,getAutoCreateGhostInstructionDataDecoder:()=>km,getAutoCreateGhostInstructionDataEncoder:()=>Wa,getBackupFrequencyCodec:()=>K8,getBackupFrequencyDecoder:()=>er,getBackupFrequencyEncoder:()=>Yn,getBiometricPoliciesCodec:()=>Z8,getBiometricPoliciesDecoder:()=>xr,getBiometricPoliciesEncoder:()=>Sr,getBiometricProtectionCodec:()=>oF,getBiometricProtectionDecoder:()=>Rr,getBiometricProtectionEncoder:()=>br,getBiometricQualityCodec:()=>uF,getBiometricQualityDecoder:()=>vr,getBiometricQualityEncoder:()=>Ir,getBiometricStorageMethodCodec:()=>lF,getBiometricStorageMethodDecoder:()=>kr,getBiometricStorageMethodEncoder:()=>Mr,getBiometricTypeCodec:()=>fF,getBiometricTypeDecoder:()=>ze,getBiometricTypeEncoder:()=>_e,getClaimGhostDiscriminatorBytes:()=>ure,getClaimGhostInstruction:()=>zm,getClaimGhostInstructionDataCodec:()=>gre,getClaimGhostInstructionDataDecoder:()=>_m,getClaimGhostInstructionDataEncoder:()=>Um,getComplianceFlagsCodec:()=>MF,getComplianceFlagsDecoder:()=>ar,getComplianceFlagsEncoder:()=>sr,getComplianceMetricsCodec:()=>OF,getComplianceMetricsDecoder:()=>zr,getComplianceMetricsEncoder:()=>_r,getCompliancePoliciesCodec:()=>NF,getCompliancePoliciesDecoder:()=>Fr,getCompliancePoliciesEncoder:()=>Or,getComplianceReportCodec:()=>oQ,getComplianceReportDecoder:()=>vp,getComplianceReportDiscriminatorBytes:()=>rQ,getComplianceReportEncoder:()=>fR,getComplianceReportGeneratedEventCodec:()=>jF,getComplianceReportGeneratedEventDecoder:()=>sx,getComplianceReportGeneratedEventEncoder:()=>cx,getComplianceStatusCodec:()=>ZF,getComplianceStatusDecoder:()=>Wr,getComplianceStatusEncoder:()=>Gr,getCompressedAgentCreatedEventCodec:()=>uG,getCompressedAgentCreatedEventDecoder:()=>Tx,getCompressedAgentCreatedEventEncoder:()=>yx,getConditionTypeCodec:()=>lG,getConditionTypeDecoder:()=>Lr,getConditionTypeEncoder:()=>Br,getConstraintConditionCodec:()=>fG,getConstraintConditionDecoder:()=>Kr,getConstraintConditionEncoder:()=>Vr,getConstraintOperatorCodec:()=>hG,getConstraintOperatorDecoder:()=>jr,getConstraintOperatorEncoder:()=>Hr,getCreateAgentAuthorizationDiscriminatorBytes:()=>_M,getCreateAgentAuthorizationInstruction:()=>FM,getCreateAgentAuthorizationInstructionAsync:()=>OM,getCreateAgentAuthorizationInstructionDataCodec:()=>zM,getCreateAgentAuthorizationInstructionDataDecoder:()=>La,getCreateAgentAuthorizationInstructionDataEncoder:()=>Ht,getCreateCredentialTemplateDiscriminatorBytes:()=>Wre,getCreateCredentialTemplateInstruction:()=>Lre,getCreateCredentialTemplateInstructionAsync:()=>Bre,getCreateCredentialTemplateInstructionDataCodec:()=>Nre,getCreateCredentialTemplateInstructionDataDecoder:()=>jm,getCreateCredentialTemplateInstructionDataEncoder:()=>Ka,getCreateCredentialTypeDiscriminatorBytes:()=>Xre,getCreateCredentialTypeInstruction:()=>eoe,getCreateCredentialTypeInstructionAsync:()=>Yre,getCreateCredentialTypeInstructionDataCodec:()=>Zre,getCreateCredentialTypeInstructionDataDecoder:()=>e1,getCreateCredentialTypeInstructionDataEncoder:()=>ja,getCreateDidDocumentDiscriminatorBytes:()=>yoe,getCreateDidDocumentInstruction:()=>Soe,getCreateDidDocumentInstructionAsync:()=>foe,getCreateDidDocumentInstructionDataCodec:()=>Toe,getCreateDidDocumentInstructionDataDecoder:()=>r1,getCreateDidDocumentInstructionDataEncoder:()=>$a,getCreateEscrowDiscriminatorBytes:()=>Foe,getCreateEscrowInstruction:()=>Noe,getCreateEscrowInstructionAsync:()=>Woe,getCreateEscrowInstructionDataCodec:()=>Goe,getCreateEscrowInstructionDataDecoder:()=>s1,getCreateEscrowInstructionDataEncoder:()=>qa,getCreateMultisigDiscriminatorBytes:()=>tie,getCreateMultisigInstruction:()=>oie,getCreateMultisigInstructionAsync:()=>rie,getCreateMultisigInstructionDataCodec:()=>nie,getCreateMultisigInstructionDataDecoder:()=>u1,getCreateMultisigInstructionDataEncoder:()=>Ja,getCredentialCodec:()=>SQ,getCredentialDecoder:()=>Lp,getCredentialDiscriminatorBytes:()=>fQ,getCredentialEncoder:()=>hR,getCredentialKindCodec:()=>bG,getCredentialKindDecoder:()=>Be,getCredentialKindEncoder:()=>Ne,getCredentialStatusCodec:()=>MG,getCredentialStatusDecoder:()=>Yr,getCredentialStatusEncoder:()=>Zr,getCredentialTemplateCodec:()=>KQ,getCredentialTemplateDecoder:()=>Xp,getCredentialTemplateDiscriminatorBytes:()=>VQ,getCredentialTemplateEncoder:()=>MR,getCredentialTypeCodec:()=>mX,getCredentialTypeDecoder:()=>cl,getCredentialTypeDiscriminatorBytes:()=>lX,getCredentialTypeEncoder:()=>OR,getCrossChainStatusCodec:()=>_G,getCrossChainStatusDecoder:()=>Ve,getCrossChainStatusEncoder:()=>Le,getDataAccessLevelCodec:()=>GG,getDataAccessLevelDecoder:()=>ro,getDataAccessLevelEncoder:()=>no,getDataProtectionPoliciesCodec:()=>LG,getDataProtectionPoliciesDecoder:()=>io,getDataProtectionPoliciesEncoder:()=>oo,getDeactivateAgentDiscriminatorBytes:()=>Sie,getDeactivateAgentInstruction:()=>l1,getDeactivateAgentInstructionAsync:()=>Die,getDeactivateAgentInstructionDataCodec:()=>xie,getDeactivateAgentInstructionDataDecoder:()=>p1,getDeactivateAgentInstructionDataEncoder:()=>Qa,getDeactivateCredentialTemplateDiscriminatorBytes:()=>vie,getDeactivateCredentialTemplateInstruction:()=>kie,getDeactivateCredentialTemplateInstructionDataCodec:()=>Mie,getDeactivateCredentialTemplateInstructionDataDecoder:()=>T1,getDeactivateCredentialTemplateInstructionDataEncoder:()=>y1,getDeactivateCredentialTypeDiscriminatorBytes:()=>Wie,getDeactivateCredentialTypeInstruction:()=>Bie,getDeactivateCredentialTypeInstructionDataCodec:()=>Nie,getDeactivateCredentialTypeInstructionDataDecoder:()=>x1,getDeactivateCredentialTypeInstructionDataEncoder:()=>S1,getDeactivateDidDocumentDiscriminatorBytes:()=>Xie,getDeactivateDidDocumentInstruction:()=>ece,getDeactivateDidDocumentInstructionAsync:()=>Yie,getDeactivateDidDocumentInstructionDataCodec:()=>Zie,getDeactivateDidDocumentInstructionDataDecoder:()=>E1,getDeactivateDidDocumentInstructionDataEncoder:()=>Xa,getDegradationHandlingCodec:()=>jG,getDegradationHandlingDecoder:()=>Jn,getDegradationHandlingEncoder:()=>qn,getDelegationInfoCodec:()=>e2,getDelegationInfoDecoder:()=>ao,getDelegationInfoEncoder:()=>so,getDelegationScopeCodec:()=>a2,getDelegationScopeDecoder:()=>go,getDelegationScopeEncoder:()=>uo,getDeliverySubmittedEventCodec:()=>P2,getDeliverySubmittedEventDecoder:()=>Wx,getDeliverySubmittedEventEncoder:()=>Gx,getDidDocumentCodec:()=>GX,getDidDocumentDecoder:()=>ml,getDidDocumentDiscriminatorBytes:()=>FX,getDidDocumentEncoder:()=>LR,getDisputeFiledEventCodec:()=>G2,getDisputeFiledEventDecoder:()=>Lx,getDisputeFiledEventEncoder:()=>Bx,getDisputeResolvedEventCodec:()=>j2,getDisputeResolvedEventDecoder:()=>Hx,getDisputeResolvedEventEncoder:()=>Kx,getEmergencyAccessConfigCodec:()=>eW,getEmergencyAccessConfigDecoder:()=>po,getEmergencyAccessConfigEncoder:()=>Ao,getEmergencyConfigCodec:()=>aW,getEmergencyConfigDecoder:()=>mo,getEmergencyConfigEncoder:()=>lo,getEnableProtocolFeesDiscriminatorBytes:()=>dce,getEnableProtocolFeesInstruction:()=>Ace,getEnableProtocolFeesInstructionAsync:()=>gce,getEnableProtocolFeesInstructionDataCodec:()=>uce,getEnableProtocolFeesInstructionDataDecoder:()=>b1,getEnableProtocolFeesInstructionDataEncoder:()=>Za,getEnforcementLevelCodec:()=>AW,getEnforcementLevelDecoder:()=>$e,getEnforcementLevelEncoder:()=>je,getEscrowCompletedEventCodec:()=>fW,getEscrowCompletedEventDecoder:()=>sD,getEscrowCompletedEventEncoder:()=>cD,getEscrowCreatedEventCodec:()=>PW,getEscrowCreatedEventDecoder:()=>lD,getEscrowCreatedEventEncoder:()=>pD,getEscrowStatusCodec:()=>IW,getEscrowStatusDecoder:()=>So,getEscrowStatusEncoder:()=>fo,getExecutionConditionCodec:()=>NW,getExecutionConditionDecoder:()=>Ae,getExecutionConditionEncoder:()=>ge,getExecutionParamsCodec:()=>qW,getExecutionParamsDecoder:()=>Je,getExecutionParamsEncoder:()=>qe,getExternalIdMappingCodec:()=>sZ,getExternalIdMappingDecoder:()=>fl,getExternalIdMappingDiscriminatorBytes:()=>cZ,getExternalIdMappingEncoder:()=>nI,getExternalIdentifierCodec:()=>n6,getExternalIdentifierDecoder:()=>Eo,getExternalIdentifierEncoder:()=>ho,getFileDisputeDiscriminatorBytes:()=>bce,getFileDisputeInstruction:()=>Ice,getFileDisputeInstructionDataCodec:()=>Rce,getFileDisputeInstructionDataDecoder:()=>v1,getFileDisputeInstructionDataEncoder:()=>I1,getGenerateComplianceReportDiscriminatorBytes:()=>Gce,getGenerateComplianceReportInstruction:()=>Bce,getGenerateComplianceReportInstructionAsync:()=>Nce,getGenerateComplianceReportInstructionDataCodec:()=>Wce,getGenerateComplianceReportInstructionDataDecoder:()=>w1,getGenerateComplianceReportInstructionDataEncoder:()=>Ya,getGeographicRegionCodec:()=>A6,getGeographicRegionDecoder:()=>Co,getGeographicRegionEncoder:()=>Po,getGhostProtectEscrowCodec:()=>PZ,getGhostProtectEscrowDecoder:()=>kl,getGhostProtectEscrowDiscriminatorBytes:()=>EZ,getGhostProtectEscrowEncoder:()=>uI,getGhostSlashedEventCodec:()=>x6,getGhostSlashedEventDecoder:()=>OD,getGhostSlashedEventEncoder:()=>zD,getGhostStakedEventCodec:()=>w6,getGhostStakedEventDecoder:()=>BD,getGhostStakedEventEncoder:()=>ND,getGhostUnstakedEventCodec:()=>N6,getGhostUnstakedEventDecoder:()=>KD,getGhostUnstakedEventEncoder:()=>VD,getGhostspeakMarketplaceErrorMessage:()=>Zte,getGovernanceProposalCodec:()=>VZ,getGovernanceProposalCreatedEventCodec:()=>Z6,getGovernanceProposalCreatedEventDecoder:()=>JD,getGovernanceProposalCreatedEventEncoder:()=>qD,getGovernanceProposalDecoder:()=>Ol,getGovernanceProposalDiscriminatorBytes:()=>LZ,getGovernanceProposalEncoder:()=>hI,getHierarchicalBoundaryCodec:()=>oN,getHierarchicalBoundaryDecoder:()=>ko,getHierarchicalBoundaryEncoder:()=>Mo,getIncidentResponsePoliciesCodec:()=>yN,getIncidentResponsePoliciesDecoder:()=>Uo,getIncidentResponsePoliciesEncoder:()=>wo,getInitReentrancyGuardDiscriminatorBytes:()=>Iae,getInitReentrancyGuardInstruction:()=>kae,getInitReentrancyGuardInstructionAsync:()=>Mae,getInitReentrancyGuardInstructionDataCodec:()=>vae,getInitReentrancyGuardInstructionDataDecoder:()=>ey,getInitReentrancyGuardInstructionDataEncoder:()=>cd,getInitializeAuditTrailDiscriminatorBytes:()=>rse,getInitializeAuditTrailInstruction:()=>cse,getInitializeAuditTrailInstructionAsync:()=>ise,getInitializeAuditTrailInstructionDataCodec:()=>ose,getInitializeAuditTrailInstructionDataDecoder:()=>z1,getInitializeAuditTrailInstructionDataEncoder:()=>ed,getInitializeGovernanceProposalDiscriminatorBytes:()=>yse,getInitializeGovernanceProposalInstruction:()=>fse,getInitializeGovernanceProposalInstructionAsync:()=>jt,getInitializeGovernanceProposalInstructionDataCodec:()=>Tse,getInitializeGovernanceProposalInstructionDataDecoder:()=>G1,getInitializeGovernanceProposalInstructionDataEncoder:()=>td,getInitializeProtocolConfigDiscriminatorBytes:()=>Rse,getInitializeProtocolConfigInstruction:()=>Mse,getInitializeProtocolConfigInstructionAsync:()=>vse,getInitializeProtocolConfigInstructionDataCodec:()=>Ise,getInitializeProtocolConfigInstructionDataDecoder:()=>B1,getInitializeProtocolConfigInstructionDataEncoder:()=>nd,getInitializeRbacConfigDiscriminatorBytes:()=>Lse,getInitializeRbacConfigInstruction:()=>Hse,getInitializeRbacConfigInstructionAsync:()=>Kse,getInitializeRbacConfigInstructionDataCodec:()=>Vse,getInitializeRbacConfigInstructionDataDecoder:()=>K1,getInitializeRbacConfigInstructionDataEncoder:()=>rd,getInitializeReputationMetricsDiscriminatorBytes:()=>tae,getInitializeReputationMetricsInstruction:()=>oae,getInitializeReputationMetricsInstructionAsync:()=>rae,getInitializeReputationMetricsInstructionDataCodec:()=>nae,getInitializeReputationMetricsInstructionDataDecoder:()=>$1,getInitializeReputationMetricsInstructionDataEncoder:()=>od,getInitializeStakingConfigDiscriminatorBytes:()=>Tae,getInitializeStakingConfigInstruction:()=>Sae,getInitializeStakingConfigInstructionAsync:()=>X1,getInitializeStakingConfigInstructionDataCodec:()=>fae,getInitializeStakingConfigInstructionDataDecoder:()=>Q1,getInitializeStakingConfigInstructionDataEncoder:()=>id,getIssueCredentialDiscriminatorBytes:()=>Bae,getIssueCredentialInstruction:()=>Kae,getIssueCredentialInstructionAsync:()=>Vae,getIssueCredentialInstructionDataCodec:()=>Lae,getIssueCredentialInstructionDataDecoder:()=>iy,getIssueCredentialInstructionDataEncoder:()=>ad,getLatitudeRangeCodec:()=>xN,getLatitudeRangeDecoder:()=>Ro,getLatitudeRangeEncoder:()=>bo,getLinkExternalIdDiscriminatorBytes:()=>tde,getLinkExternalIdInstruction:()=>ode,getLinkExternalIdInstructionAsync:()=>rde,getLinkExternalIdInstructionDataCodec:()=>nde,getLinkExternalIdInstructionDataDecoder:()=>ay,getLinkExternalIdInstructionDataEncoder:()=>ud,getLocationConstraintsCodec:()=>bN,getLocationConstraintsDecoder:()=>Bo,getLocationConstraintsEncoder:()=>No,getLongitudeRangeCodec:()=>MN,getLongitudeRangeDecoder:()=>vo,getLongitudeRangeEncoder:()=>Io,getManageAgentStatusDiscriminatorBytes:()=>yde,getManageAgentStatusInstruction:()=>Sde,getManageAgentStatusInstructionAsync:()=>fde,getManageAgentStatusInstructionDataCodec:()=>Tde,getManageAgentStatusInstructionDataDecoder:()=>gy,getManageAgentStatusInstructionDataEncoder:()=>gd,getMultisigCodec:()=>oY,getMultisigConfigCodec:()=>ON,getMultisigConfigDecoder:()=>Ye,getMultisigConfigEncoder:()=>Ze,getMultisigCreatedEventCodec:()=>jN,getMultisigCreatedEventDecoder:()=>yh,getMultisigCreatedEventEncoder:()=>mh,getMultisigDecoder:()=>Bl,getMultisigDiscriminatorBytes:()=>rY,getMultisigEncoder:()=>OI,getMultisigSignatureCodec:()=>c4,getMultisigSignatureDecoder:()=>Vo,getMultisigSignatureEncoder:()=>Lo,getMultisigTypeCodec:()=>u4,getMultisigTypeConfigCodec:()=>h4,getMultisigTypeConfigDecoder:()=>jo,getMultisigTypeConfigEncoder:()=>Ho,getMultisigTypeDecoder:()=>le,getMultisigTypeEncoder:()=>pe,getNetworkSecurityPoliciesCodec:()=>b4,getNetworkSecurityPoliciesDecoder:()=>qo,getNetworkSecurityPoliciesEncoder:()=>$o,getNotificationMethodCodec:()=>M4,getNotificationMethodDecoder:()=>Xo,getNotificationMethodEncoder:()=>Qo,getNotificationPriorityCodec:()=>_4,getNotificationPriorityDecoder:()=>ei,getNotificationPriorityEncoder:()=>Yo,getNotificationRequirementCodec:()=>N4,getNotificationRequirementDecoder:()=>Ue,getNotificationRequirementEncoder:()=>we,getNotificationTargetCodec:()=>Q4,getNotificationTargetDecoder:()=>ni,getNotificationTargetEncoder:()=>ti,getNotificationTargetTypeCodec:()=>eB,getNotificationTargetTypeDecoder:()=>ai,getNotificationTargetTypeEncoder:()=>si,getNotificationTimingCodec:()=>oB,getNotificationTimingDecoder:()=>oi,getNotificationTimingEncoder:()=>ri,getPasswordPoliciesCodec:()=>fB,getPasswordPoliciesDecoder:()=>Ai,getPasswordPoliciesEncoder:()=>gi,getPendingTransactionCodec:()=>OB,getPendingTransactionDecoder:()=>li,getPendingTransactionEncoder:()=>pi,getPermissionCodec:()=>NB,getPermissionConstraintCodec:()=>jB,getPermissionConstraintDecoder:()=>Mi,getPermissionConstraintEncoder:()=>vi,getPermissionConstraintTypeCodec:()=>QB,getPermissionConstraintTypeDecoder:()=>Oi,getPermissionConstraintTypeEncoder:()=>zi,getPermissionDecoder:()=>Ii,getPermissionEncoder:()=>Ri,getPermissionMetadataCodec:()=>nL,getPermissionMetadataDecoder:()=>wi,getPermissionMetadataEncoder:()=>ki,getPermissionScopeCodec:()=>cL,getPermissionScopeDecoder:()=>_i,getPermissionScopeEncoder:()=>Ui,getPolicyMetadataCodec:()=>lL,getPolicyMetadataDecoder:()=>xn,getPolicyMetadataEncoder:()=>Sn,getPolicyRuleCodec:()=>ML,getPolicyRuleDecoder:()=>hn,getPolicyRuleEncoder:()=>Dn,getPolicyScopeCodec:()=>_L,getPolicyScopeDecoder:()=>Pn,getPolicyScopeEncoder:()=>En,getPolicyStatusCodec:()=>GL,getPolicyStatusDecoder:()=>bn,getPolicyStatusEncoder:()=>Cn,getPolicyTypeCodec:()=>LL,getPolicyTypeDecoder:()=>In,getPolicyTypeEncoder:()=>Rn,getPricingModelCodec:()=>jL,getPricingModelDecoder:()=>Q,getPricingModelEncoder:()=>J,getProposalAccountCodec:()=>oV,getProposalAccountDecoder:()=>rc,getProposalAccountEncoder:()=>nc,getProposalInstructionCodec:()=>yV,getProposalInstructionDecoder:()=>Do,getProposalInstructionEncoder:()=>xo,getProposalMetadataCodec:()=>xV,getProposalMetadataDecoder:()=>sc,getProposalMetadataEncoder:()=>cc,getProposalStatusCodec:()=>PV,getProposalStatusDecoder:()=>uc,getProposalStatusEncoder:()=>dc,getProposalTypeCodec:()=>IV,getProposalTypeDecoder:()=>ue,getProposalTypeEncoder:()=>de,getProtocolConfigCodec:()=>EY,getProtocolConfigDecoder:()=>jl,getProtocolConfigDiscriminatorBytes:()=>hY,getProtocolConfigEncoder:()=>jI,getProtocolConfigSize:()=>bY,getProtocolConfigUpdatedEventCodec:()=>GV,getProtocolConfigUpdatedEventDecoder:()=>ME,getProtocolConfigUpdatedEventEncoder:()=>vE,getQuorumMethodCodec:()=>LV,getQuorumMethodDecoder:()=>pc,getQuorumMethodEncoder:()=>Ac,getQuorumRequirementsCodec:()=>QV,getQuorumRequirementsDecoder:()=>mc,getQuorumRequirementsEncoder:()=>lc,getRbacConfigCodec:()=>BY,getRbacConfigDecoder:()=>Yl,getRbacConfigDiscriminatorBytes:()=>NY,getRbacConfigEncoder:()=>ev,getRbacConfigInitializedEventCodec:()=>n3,getRbacConfigInitializedEventDecoder:()=>WE,getRbacConfigInitializedEventEncoder:()=>GE,getRecordPayaiPaymentDiscriminatorBytes:()=>Fde,getRecordPayaiPaymentInstruction:()=>Nde,getRecordPayaiPaymentInstructionAsync:()=>Wde,getRecordPayaiPaymentInstructionDataCodec:()=>Gde,getRecordPayaiPaymentInstructionDataDecoder:()=>ly,getRecordPayaiPaymentInstructionDataEncoder:()=>Ad,getReentrancyGuardCodec:()=>uee,getReentrancyGuardDecoder:()=>nm,getReentrancyGuardDiscriminatorBytes:()=>dee,getReentrancyGuardEncoder:()=>cv,getReentrancyGuardSize:()=>pee,getReentrancyStateCodec:()=>c3,getReentrancyStateDecoder:()=>fc,getReentrancyStateEncoder:()=>Tc,getRegisterAgentCompressedDiscriminatorBytes:()=>aue,getRegisterAgentCompressedInstruction:()=>uue,getRegisterAgentCompressedInstructionAsync:()=>xy,getRegisterAgentCompressedInstructionDataCodec:()=>due,getRegisterAgentCompressedInstructionDataDecoder:()=>Sy,getRegisterAgentCompressedInstructionDataEncoder:()=>Rd,getRegisterAgentDiscriminatorBytes:()=>Qde,getRegisterAgentInstruction:()=>Zde,getRegisterAgentInstructionAsync:()=>Ty,getRegisterAgentInstructionDataCodec:()=>Xde,getRegisterAgentInstructionDataDecoder:()=>yy,getRegisterAgentInstructionDataEncoder:()=>Sd,getRegisterGhostMetadataDiscriminatorBytes:()=>hue,getRegisterGhostMetadataInstruction:()=>Pue,getRegisterGhostMetadataInstructionDataCodec:()=>Eue,getRegisterGhostMetadataInstructionDataDecoder:()=>Ey,getRegisterGhostMetadataInstructionDataEncoder:()=>hy,getReportDataCodec:()=>y3,getReportDataDecoder:()=>xc,getReportDataEncoder:()=>Sc,getReportEntryCodec:()=>b3,getReportEntryDecoder:()=>hc,getReportEntryEncoder:()=>Dc,getReportStatusCodec:()=>_3,getReportStatusDecoder:()=>Mc,getReportStatusEncoder:()=>vc,getReportSummaryCodec:()=>N3,getReportSummaryDecoder:()=>Pc,getReportSummaryEncoder:()=>Ec,getReportTypeCodec:()=>K3,getReportTypeDecoder:()=>ae,getReportTypeEncoder:()=>se,getReportingFrequencyCodec:()=>M3,getReportingFrequencyDecoder:()=>nr,getReportingFrequencyEncoder:()=>tr,getReputationComponentCodec:()=>Z3,getReputationComponentDecoder:()=>st,getReputationComponentEncoder:()=>ct,getReputationMetricsCodec:()=>Mee,getReputationMetricsDecoder:()=>im,getReputationMetricsDiscriminatorBytes:()=>vee,getReputationMetricsEncoder:()=>Av,getReputationMetricsInitializedEventCodec:()=>c5,getReputationMetricsInitializedEventDecoder:()=>ZE,getReputationMetricsInitializedEventEncoder:()=>XE,getReputationPaymentRecordedEventCodec:()=>h5,getReputationPaymentRecordedEventDecoder:()=>tP,getReputationPaymentRecordedEventEncoder:()=>eP,getReputationRatingSubmittedEventCodec:()=>w5,getReputationRatingSubmittedEventDecoder:()=>cP,getReputationRatingSubmittedEventEncoder:()=>iP,getReputationSourceTypeCodec:()=>O5,getReputationSourceTypeDecoder:()=>Uc,getReputationSourceTypeEncoder:()=>wc,getReputationTagsUpdatedEventCodec:()=>K5,getReputationTagsUpdatedEventDecoder:()=>uP,getReputationTagsUpdatedEventEncoder:()=>dP,getResetReentrancyGuardDiscriminatorBytes:()=>Uue,getResetReentrancyGuardInstruction:()=>Oue,getResetReentrancyGuardInstructionAsync:()=>zue,getResetReentrancyGuardInstructionDataCodec:()=>_ue,getResetReentrancyGuardInstructionDataDecoder:()=>by,getResetReentrancyGuardInstructionDataEncoder:()=>_d,getResolveDidDocumentDiscriminatorBytes:()=>jue,getResolveDidDocumentInstruction:()=>Jue,getResolveDidDocumentInstructionAsync:()=>que,getResolveDidDocumentInstructionDataCodec:()=>$ue,getResolveDidDocumentInstructionDataDecoder:()=>vy,getResolveDidDocumentInstructionDataEncoder:()=>zd,getResourceConstraintsCodec:()=>Q5,getResourceConstraintsDecoder:()=>Oc,getResourceConstraintsEncoder:()=>zc,getReviewScheduleCodec:()=>u9,getReviewScheduleDecoder:()=>$i,getReviewScheduleEncoder:()=>ji,getRevokeAuthorizationDiscriminatorBytes:()=>vw,getRevokeAuthorizationInstruction:()=>kw,getRevokeAuthorizationInstructionDataCodec:()=>Mw,getRevokeAuthorizationInstructionDataDecoder:()=>Gd,getRevokeAuthorizationInstructionDataEncoder:()=>Fd,getRevokeCredentialDiscriminatorBytes:()=>Tge,getRevokeCredentialInstruction:()=>Sge,getRevokeCredentialInstructionDataCodec:()=>fge,getRevokeCredentialInstructionDataDecoder:()=>Uy,getRevokeCredentialInstructionDataEncoder:()=>wy,getRiskAcceptanceCodec:()=>P9,getRiskAcceptanceDecoder:()=>Nc,getRiskAcceptanceEncoder:()=>Wc,getRiskAssessmentCodec:()=>O9,getRiskAssessmentDecoder:()=>Wi,getRiskAssessmentEncoder:()=>Gi,getRiskCategoryCodec:()=>N9,getRiskCategoryDecoder:()=>Hc,getRiskCategoryEncoder:()=>Kc,getRiskFactorCodec:()=>Q9,getRiskFactorDecoder:()=>Lc,getRiskFactorEncoder:()=>Bc,getRiskIndicatorCodec:()=>nK,getRiskIndicatorDecoder:()=>bc,getRiskIndicatorEncoder:()=>Cc,getRiskLevelCodec:()=>cK,getRiskLevelDecoder:()=>Zc,getRiskLevelEncoder:()=>Xc,getRoleCodec:()=>uK,getRoleConstraintsCodec:()=>yK,getRoleConstraintsDecoder:()=>es,getRoleConstraintsEncoder:()=>Yc,getRoleDecoder:()=>dt,getRoleEncoder:()=>at,getRoleMetadataCodec:()=>hK,getRoleMetadataDecoder:()=>ns,getRoleMetadataEncoder:()=>ts,getRoleStatusCodec:()=>bK,getRoleStatusDecoder:()=>os,getRoleStatusEncoder:()=>rs,getRoleTypeCodec:()=>MK,getRoleTypeDecoder:()=>cs,getRoleTypeEncoder:()=>is,getRuleConditionCodec:()=>NK,getRuleConditionDecoder:()=>Ji,getRuleConditionEncoder:()=>qi,getRuleEffectCodec:()=>KK,getRuleEffectDecoder:()=>Xi,getRuleEffectEncoder:()=>Qi,getScopeBoundariesCodec:()=>qK,getScopeBoundariesDecoder:()=>Bi,getScopeBoundariesEncoder:()=>Ni,getScopeInheritanceCodec:()=>ZK,getScopeInheritanceDecoder:()=>Yi,getScopeInheritanceEncoder:()=>Zi,getScopeTypeCodec:()=>nH,getScopeTypeDecoder:()=>Vi,getScopeTypeEncoder:()=>Li,getSecurityEventTypeCodec:()=>cH,getSecurityEventTypeDecoder:()=>ci,getSecurityEventTypeEncoder:()=>ii,getSecurityPoliciesCodec:()=>uH,getSecurityPoliciesDecoder:()=>Ps,getSecurityPoliciesEncoder:()=>Es,getServiceEndpointCodec:()=>lH,getServiceEndpointDecoder:()=>ye,getServiceEndpointEncoder:()=>me,getServiceEndpointTypeCodec:()=>fH,getServiceEndpointTypeDecoder:()=>Is,getServiceEndpointTypeEncoder:()=>Rs,getSessionConstraintsCodec:()=>hH,getSessionConstraintsDecoder:()=>as,getSessionConstraintsEncoder:()=>ss,getSessionPoliciesCodec:()=>IH,getSessionPoliciesDecoder:()=>bs,getSessionPoliciesEncoder:()=>Cs,getSlashReasonCodec:()=>wH,getSlashReasonDecoder:()=>Xe,getSlashReasonEncoder:()=>Qe,getSlashStakeDiscriminatorBytes:()=>wge,getSlashStakeInstruction:()=>zge,getSlashStakeInstructionAsync:()=>_ge,getSlashStakeInstructionDataCodec:()=>Uge,getSlashStakeInstructionDataDecoder:()=>Fy,getSlashStakeInstructionDataEncoder:()=>Wd,getSodConstraintCodec:()=>OH,getSodConstraintDecoder:()=>us,getSodConstraintEncoder:()=>ds,getSodConstraintTypeCodec:()=>NH,getSodConstraintTypeDecoder:()=>ws,getSodConstraintTypeEncoder:()=>ks,getSourceReputationUpdatedEventCodec:()=>o7,getSourceReputationUpdatedEventDecoder:()=>xC,getSourceReputationUpdatedEventEncoder:()=>SC,getSourceScoreCodec:()=>l7,getSourceScoreDecoder:()=>zs,getSourceScoreEncoder:()=>_s,getStakeGhostDiscriminatorBytes:()=>$ge,getStakeGhostInstruction:()=>Jge,getStakeGhostInstructionAsync:()=>Ny,getStakeGhostInstructionDataCodec:()=>qge,getStakeGhostInstructionDataDecoder:()=>Wy,getStakeGhostInstructionDataEncoder:()=>Bd,getStakingAccountCodec:()=>Yee,getStakingAccountDecoder:()=>um,getStakingAccountDiscriminatorBytes:()=>Zee,getStakingAccountEncoder:()=>xv,getStakingAccountSize:()=>nte,getStakingConfigCodec:()=>Dte,getStakingConfigDecoder:()=>pm,getStakingConfigDiscriminatorBytes:()=>xte,getStakingConfigEncoder:()=>Mv,getStakingConfigSize:()=>Pte,getStepUpTriggerCodec:()=>f7,getStepUpTriggerDecoder:()=>hr,getStepUpTriggerEncoder:()=>Dr,getSubmissionDetailsCodec:()=>P7,getSubmissionDetailsDecoder:()=>Gs,getSubmissionDetailsEncoder:()=>Fs,getSubmitDeliveryDiscriminatorBytes:()=>dAe,getSubmitDeliveryInstruction:()=>gAe,getSubmitDeliveryInstructionDataCodec:()=>uAe,getSubmitDeliveryInstructionDataDecoder:()=>Vy,getSubmitDeliveryInstructionDataEncoder:()=>Ly,getSubmitServiceRatingDiscriminatorBytes:()=>vAe,getSubmitServiceRatingInstruction:()=>wAe,getSubmitServiceRatingInstructionAsync:()=>kAe,getSubmitServiceRatingInstructionDataCodec:()=>MAe,getSubmitServiceRatingInstructionDataDecoder:()=>jy,getSubmitServiceRatingInstructionDataEncoder:()=>Ld,getTagDecayAppliedEventCodec:()=>w7,getTagDecayAppliedEventDecoder:()=>_C,getTagDecayAppliedEventEncoder:()=>UC,getTagScoreCodec:()=>K7,getTagScoreDecoder:()=>gt,getTagScoreEncoder:()=>ut,getTierUpdatedEventCodec:()=>Z7,getTierUpdatedEventDecoder:()=>LC,getTierUpdatedEventEncoder:()=>BC,getTimeConstraintsCodec:()=>oj,getTimeConstraintsDecoder:()=>As,getTimeConstraintsEncoder:()=>gs,getTimeLockCodec:()=>Aj,getTimeLockDecoder:()=>yi,getTimeLockEncoder:()=>mi,getTimeLockTypeCodec:()=>yj,getTimeLockTypeDecoder:()=>Ns,getTimeLockTypeEncoder:()=>Ws,getTransactionPriorityCodec:()=>xj,getTransactionPriorityDecoder:()=>fi,getTransactionPriorityEncoder:()=>Ti,getTransactionStatusCodec:()=>Pj,getTransactionStatusDecoder:()=>xi,getTransactionStatusEncoder:()=>Si,getTransactionTypeCodec:()=>Ij,getTransactionTypeDecoder:()=>He,getTransactionTypeEncoder:()=>Ke,getTrendDirectionCodec:()=>wj,getTrendDirectionDecoder:()=>$c,getTrendDirectionEncoder:()=>jc,getUnlockMethodCodec:()=>Oj,getUnlockMethodDecoder:()=>zn,getUnlockMethodEncoder:()=>_n,getUnstakeGhostDiscriminatorBytes:()=>NAe,getUnstakeGhostInstruction:()=>LAe,getUnstakeGhostInstructionAsync:()=>Qy,getUnstakeGhostInstructionDataCodec:()=>BAe,getUnstakeGhostInstructionDataDecoder:()=>Jy,getUnstakeGhostInstructionDataEncoder:()=>Vd,getUpdateAgentDiscriminatorBytes:()=>epe,getUpdateAgentInstruction:()=>nT,getUpdateAgentInstructionAsync:()=>npe,getUpdateAgentInstructionDataCodec:()=>tpe,getUpdateAgentInstructionDataDecoder:()=>tT,getUpdateAgentInstructionDataEncoder:()=>Jd,getUpdateAgentReputationDiscriminatorBytes:()=>Spe,getUpdateAgentReputationInstruction:()=>hpe,getUpdateAgentReputationInstructionAsync:()=>Dpe,getUpdateAgentReputationInstructionDataCodec:()=>xpe,getUpdateAgentReputationInstructionDataDecoder:()=>iT,getUpdateAgentReputationInstructionDataEncoder:()=>Qd,getUpdateAgentServiceDiscriminatorBytes:()=>Npe,getUpdateAgentServiceInstruction:()=>Vpe,getUpdateAgentServiceInstructionAsync:()=>Lpe,getUpdateAgentServiceInstructionDataCodec:()=>Bpe,getUpdateAgentServiceInstructionDataDecoder:()=>lT,getUpdateAgentServiceInstructionDataEncoder:()=>Xd,getUpdateCrosschainStatusDiscriminatorBytes:()=>rle,getUpdateCrosschainStatusInstruction:()=>ile,getUpdateCrosschainStatusInstructionDataCodec:()=>ole,getUpdateCrosschainStatusInstructionDataDecoder:()=>TT,getUpdateCrosschainStatusInstructionDataEncoder:()=>yT,getUpdateDidDocumentDiscriminatorBytes:()=>mle,getUpdateDidDocumentInstruction:()=>fle,getUpdateDidDocumentInstructionAsync:()=>Tle,getUpdateDidDocumentInstructionDataCodec:()=>yle,getUpdateDidDocumentInstructionDataDecoder:()=>xT,getUpdateDidDocumentInstructionDataEncoder:()=>eu,getUpdateGhostScoreDiscriminatorBytes:()=>wle,getUpdateGhostScoreInstruction:()=>_le,getUpdateGhostScoreInstructionDataCodec:()=>Ule,getUpdateGhostScoreInstructionDataDecoder:()=>ET,getUpdateGhostScoreInstructionDataEncoder:()=>hT,getUpdateProtocolConfigDiscriminatorBytes:()=>Hle,getUpdateProtocolConfigInstruction:()=>qle,getUpdateProtocolConfigInstructionAsync:()=>$le,getUpdateProtocolConfigInstructionDataCodec:()=>jle,getUpdateProtocolConfigInstructionDataDecoder:()=>IT,getUpdateProtocolConfigInstructionDataEncoder:()=>tu,getUpdateReputationTagsDiscriminatorBytes:()=>ome,getUpdateReputationTagsInstruction:()=>sme,getUpdateReputationTagsInstructionAsync:()=>cme,getUpdateReputationTagsInstructionDataCodec:()=>ime,getUpdateReputationTagsInstructionDataDecoder:()=>FT,getUpdateReputationTagsInstructionDataEncoder:()=>ou,getUpdateReputationWithAuthDiscriminatorBytes:()=>MU,getUpdateReputationWithAuthInstruction:()=>UU,getUpdateReputationWithAuthInstructionAsync:()=>wU,getUpdateReputationWithAuthInstructionDataCodec:()=>kU,getUpdateReputationWithAuthInstructionDataDecoder:()=>uu,getUpdateReputationWithAuthInstructionDataEncoder:()=>Xt,getUpdateSourceReputationDiscriminatorBytes:()=>vme,getUpdateSourceReputationInstruction:()=>wme,getUpdateSourceReputationInstructionAsync:()=>kme,getUpdateSourceReputationInstructionDataCodec:()=>Mme,getUpdateSourceReputationInstructionDataDecoder:()=>qT,getUpdateSourceReputationInstructionDataEncoder:()=>gu,getUserRegistryCodec:()=>Hte,getUserRegistryDecoder:()=>ym,getUserRegistryDiscriminatorBytes:()=>Kte,getUserRegistryEncoder:()=>Ov,getUserRegistrySize:()=>qte,getValueTypeCodec:()=>Nj,getValueTypeDecoder:()=>qr,getValueTypeEncoder:()=>$r,getVerificationMethodCodec:()=>Qj,getVerificationMethodDecoder:()=>fe,getVerificationMethodEncoder:()=>Te,getVerificationMethodTypeCodec:()=>e$,getVerificationMethodTypeDecoder:()=>Js,getVerificationMethodTypeEncoder:()=>qs,getVerificationRelationshipCodec:()=>o$,getVerificationRelationshipDecoder:()=>Xs,getVerificationRelationshipEncoder:()=>Qs,getVerifyAgentDiscriminatorBytes:()=>e1e,getVerifyAgentInstruction:()=>n1e,getVerifyAgentInstructionAsync:()=>YT,getVerifyAgentInstructionDataCodec:()=>t1e,getVerifyAgentInstructionDataDecoder:()=>ZT,getVerifyAgentInstructionDataEncoder:()=>Au,getVerifyAuthorizationDiscriminatorBytes:()=>f1e,getVerifyAuthorizationInstruction:()=>x1e,getVerifyAuthorizationInstructionDataCodec:()=>S1e,getVerifyAuthorizationInstructionDataDecoder:()=>nf,getVerifyAuthorizationInstructionDataEncoder:()=>tf,getViolationSeverityCodec:()=>a$,getViolationSeverityDecoder:()=>Jc,getViolationSeverityEncoder:()=>qc,getVoteChoiceCodec:()=>I$,getVoteChoiceDecoder:()=>oa,getVoteChoiceEncoder:()=>ra,getVoteCodec:()=>P$,getVoteDecoder:()=>na,getVoteEncoder:()=>ta,getVotingResultsCodec:()=>O$,getVotingResultsDecoder:()=>da,getVotingResultsEncoder:()=>aa,identifyGhostspeakMarketplaceAccount:()=>Jte,identifyGhostspeakMarketplaceInstruction:()=>Qte,isArbitratorDecision:()=>xO,isDelegationScope:()=>u2,isGhostspeakMarketplaceError:()=>Yte,parseActivateAgentInstruction:()=>fne,parseApproveDeliveryInstruction:()=>Ine,parseArbitrateDisputeInstruction:()=>Gne,parseAutoCreateGhostInstruction:()=>tre,parseClaimGhostInstruction:()=>Are,parseCreateAgentAuthorizationInstruction:()=>GM,parseCreateCredentialTemplateInstruction:()=>Vre,parseCreateCredentialTypeInstruction:()=>toe,parseCreateDidDocumentInstruction:()=>xoe,parseCreateEscrowInstruction:()=>Boe,parseCreateMultisigInstruction:()=>iie,parseDeactivateAgentInstruction:()=>hie,parseDeactivateCredentialTemplateInstruction:()=>wie,parseDeactivateCredentialTypeInstruction:()=>Lie,parseDeactivateDidDocumentInstruction:()=>tce,parseEnableProtocolFeesInstruction:()=>pce,parseFileDisputeInstruction:()=>vce,parseGenerateComplianceReportInstruction:()=>Lce,parseInitReentrancyGuardInstruction:()=>wae,parseInitializeAuditTrailInstruction:()=>sse,parseInitializeGovernanceProposalInstruction:()=>Sse,parseInitializeProtocolConfigInstruction:()=>kse,parseInitializeRbacConfigInstruction:()=>jse,parseInitializeReputationMetricsInstruction:()=>iae,parseInitializeStakingConfigInstruction:()=>xae,parseIssueCredentialInstruction:()=>Hae,parseLinkExternalIdInstruction:()=>ide,parseManageAgentStatusInstruction:()=>xde,parseRecordPayaiPaymentInstruction:()=>Bde,parseRegisterAgentCompressedInstruction:()=>gue,parseRegisterAgentInstruction:()=>Yde,parseRegisterGhostMetadataInstruction:()=>Cue,parseResetReentrancyGuardInstruction:()=>Fue,parseResolveDidDocumentInstruction:()=>Que,parseRevokeAuthorizationInstruction:()=>ww,parseRevokeCredentialInstruction:()=>xge,parseSlashStakeInstruction:()=>Oge,parseStakeGhostInstruction:()=>Qge,parseSubmitDeliveryInstruction:()=>AAe,parseSubmitServiceRatingInstruction:()=>UAe,parseUnstakeGhostInstruction:()=>VAe,parseUpdateAgentInstruction:()=>rpe,parseUpdateAgentReputationInstruction:()=>Epe,parseUpdateAgentServiceInstruction:()=>Kpe,parseUpdateCrosschainStatusInstruction:()=>cle,parseUpdateDidDocumentInstruction:()=>Sle,parseUpdateGhostScoreInstruction:()=>zle,parseUpdateProtocolConfigInstruction:()=>Jle,parseUpdateReputationTagsInstruction:()=>ame,parseUpdateReputationWithAuthInstruction:()=>_U,parseUpdateSourceReputationInstruction:()=>Ume,parseVerifyAgentInstruction:()=>r1e,parseVerifyAuthorizationInstruction:()=>D1e});var te=a(()=>{Nv();Xv();HU();D();m();});var lu,mu,yu,z,rf,of=a(()=>{lu=(l=>(l.CodeGeneration="code-generation",l.DataAnalysis="data-analysis",l.ContentCreation="content-creation",l.ImageGeneration="image-generation",l.AudioProcessing="audio-processing",l.VideoProcessing="video-processing",l.NaturalLanguageProcessing="nlp-specialist",l.ComputerVision="computer-vision",l.ReinforcementLearning="reinforcement-learning",l.DeFiExpert="defi-expert",l.NFTSpecialist="nft-specialist",l.SmartContractAudit="smart-contract-audit",l.BlockchainDevelopment="blockchain-dev",l.DAOGovernance="dao-governance",l.GameDevelopment="game-dev",l.WebDevelopment="web-dev",l.MobileDevelopment="mobile-dev",l.APIIntegration="api-integration",l.DatabaseManagement="database-management",l.DevOpsAutomation="devops-automation",l.FinancialAnalysis="financial-analysis",l.MarketResearch="market-research",l.LegalCompliance="legal-compliance",l.CustomerSupport="customer-support",l.TranslationServices="translation-services",l.SecurityAudit="security-audit",l.PenetrationTesting="penetration-testing",l.ThreatDetection="threat-detection",l.IncidentResponse="incident-response",l.DataEngineering="data-engineering",l.DataVisualization="data-visualization",l.PredictiveModeling="predictive-modeling",l.StatisticalAnalysis="statistical-analysis",l))(lu||{}),mu=(M=>(M.FastResponder="fast-responder",M.QuickResponder="quick-responder",M.SameDay="same-day",M.ConsistentQuality="consistent-quality",M.HighQuality="high-quality",M.TopRated="top-rated",M.PerfectRecord="perfect-record",M.HighVolume="high-volume",M.VeryHighVolume="very-high-volume",M.MegaVolume="mega-volume",M.LongTermActive="long-term-active",M.MultiYear="multi-year",M.CategorySpecialist="category-specialist",M.MultiDomain="multi-domain",M.Generalist="generalist",M.DisputeFree="dispute-free",M.LowDispute="low-dispute",M.HighResolution="high-resolution",M.PlatinumTier="platinum-tier",M.GoldTier="gold-tier",M.SilverTier="silver-tier",M.BronzeTier="bronze-tier",M.Responsive="responsive",M.Communicative="communicative",M.Proactive="proactive",M.DetailOriented="detail-oriented",M.VerifiedIdentity="verified-identity",M.LongStanding="long-standing",M.CommunityTrusted="community-trusted",M.ClientFavorite="client-favorite",M))(mu||{}),yu=(_=>(_.KYCVerified="kyc-verified",_.KYBVerified="kyb-verified",_.AccreditedInvestor="accredited-investor",_.SOC2Compliant="soc2-compliant",_.ISO27001="iso-27001",_.GDPR="gdpr-compliant",_.HIPAA="hipaa-compliant",_.PCI_DSS="pci-dss",_.AuditedCode="audited-code",_.BugBounty="bug-bounty",_.OpenSource="open-source",_.InsuredService="insured-service",_.BondedAgent="bonded-agent",_.LicensedProfessional="licensed-professional",_.RegulatedEntity="regulated-entity",_.PublicAuditTrail="public-audit-trail",_.TransparentPricing="transparent-pricing",_.VerifiedMetrics="verified-metrics",_))(yu||{}),z={MAX_SKILL_TAGS:20,MAX_BEHAVIOR_TAGS:20,MAX_COMPLIANCE_TAGS:10,MAX_TAG_SCORES:50,MAX_TAG_NAME_LENGTH:32,STALE_TAG_THRESHOLD:7776e3,MIN_TAG_CONFIDENCE:5e3,MAX_TAG_CONFIDENCE:1e4,BASIS_POINTS_MAX:1e4},rf={decayRatePerDay:10,minConfidence:2e3,maxAgeSeconds:2160*60*60};});var mf={};oe(mf,{batchGetAccounts:()=>Ru,batchGetAccountsWithRetry:()=>YU,batchGetAndMap:()=>ZU,batchGetExistingAccounts:()=>XU,createBatchFetcher:()=>F1e});function QU(n,e){let t=[];for(let o=0;o<n.length;o+=e)t.push(n.slice(o,o+e));return t}async function Ru(n,e,t={}){let o=Math.min(t.batchSize??100,100);if(e.length===0)return [];if(e.length<=o)return (await n.getMultipleAccounts(e).send()).value;let r=QU(e,o),c=[],i=0,d=r.map(async s=>{let p=await n.getMultipleAccounts(s).send();return i+=s.length,t.onProgress?.(i,e.length),p.value});return c.push(...await Promise.all(d)),c.flat()}async function XU(n,e,t={}){let o=await Ru(n,e,t),r=[];for(let c=0;c<o.length;c++){let i=o[c];i!==null&&r.push({address:e[c],account:i});}return r}async function ZU(n,e,t,o={}){return (await Ru(n,e,o)).map((c,i)=>t(c,e[i],i))}async function YU(n,e,t={},o=3){let r=Math.min(t.batchSize??100,100);if(e.length===0)return [];let c=QU(e,r),i=new Array(e.length),d=0;return await Promise.all(c.map(async(s,p)=>{let E=0,b=false;for(;!b&&E<=o;)try{(await n.getMultipleAccounts(s).send()).value.forEach((P,w)=>{i[p*r+w]=P;}),d+=s.length,t.onProgress?.(d,e.length),b=!0;}catch(x){if(E++,E>o)throw new Error(`Batch ${p} failed after ${o} retries: ${x}`);await new Promise(k=>setTimeout(k,100*Math.pow(2,E-1)));}})),i}function F1e(n,e={}){return {getAccounts:(t,o)=>Ru(n,t,{...e,...o}),getExisting:(t,o)=>XU(n,t,{...e,...o}),getAndMap:(t,o,r)=>ZU(n,t,o,{...e,...r}),getWithRetry:(t,o,r)=>YU(n,t,{...e,...o},r)}}var yf=a(()=>{});var vu={};oe(vu,{deriveA2AMessagePda:()=>L1e,deriveA2ASessionPda:()=>B1e,deriveA2ASessionPdaOriginal:()=>N1e,deriveAgentPda:()=>W1e,deriveAgentPdaOriginal:()=>G1e,deriveAgentTreeConfigPda:()=>H1e,deriveAgentVerificationPda:()=>K1e,deriveEscrowPDA:()=>q1e,deriveEscrowPDAOriginal:()=>$1e,deriveEscrowPda:()=>J1e,deriveMessagePda:()=>X1e,deriveTokenAccountPda:()=>Q1e,deriveUserRegistryPda:()=>V1e,findProgramDerivedAddress:()=>j1e});async function G1e(n,e,t){let[o]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(e),getUtf8Encoder().encode(t)]});return o}async function W1e(n){let[e,t]=await getProgramDerivedAddress({programAddress:n.programAddress,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(n.owner),getUtf8Encoder().encode(n.agentId)]});return [e,t]}async function N1e(n,e){let[t]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,50,97,95,115,101,115,115,105,111,110])),getAddressEncoder().encode(e)]});return t}async function B1e(n){let e=await getProgramDerivedAddress({programAddress:n.programAddress,seeds:[getBytesEncoder().encode(new Uint8Array([97,50,97,95,115,101,115,115,105,111,110])),getAddressEncoder().encode(n.initiator)]});return [e[0],e[1]]}async function L1e(n,e,t){let o=new Uint8Array(8);new DataView(o.buffer).setBigInt64(0,t,true);let[c]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,50,97,95,109,101,115,115,97,103,101])),getAddressEncoder().encode(e),o]});return c}async function V1e(n,e){let[t]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(e)]});return t}async function K1e(n,e,t){let[o]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,118,101,114,105,102,105,99,97,116,105,111,110])),getAddressEncoder().encode(e),getAddressEncoder().encode(t)]});return o}async function H1e(n,e){let[t]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,116,114,101,101,95,99,111,110,102,105,103])),getAddressEncoder().encode(e)]});return t}async function j1e(n,e){let t=n.map(r=>typeof r=="string"?getUtf8Encoder().encode(r):typeof r=="object"&&r.constructor===Uint8Array?r:getAddressEncoder().encode(r)),o=await getProgramDerivedAddress({programAddress:e,seeds:t});return [o[0],o[1]]}async function $1e(n,e){let t=[getBytesEncoder().encode(new Uint8Array([101,115,99,114,111,119])),getAddressEncoder().encode(n)],o=await getProgramDerivedAddress({programAddress:e,seeds:t});return [o[0],o[1]]}async function q1e(n){let e=[getBytesEncoder().encode(new Uint8Array([101,115,99,114,111,119])),getUtf8Encoder().encode(n.escrowId)],t=await getProgramDerivedAddress({programAddress:n.programAddress,seeds:e});return [t[0],t[1]]}async function J1e(n,e,t,o){let r=new Uint8Array(8);new DataView(r.buffer).setUint32(0,o,true);let[i]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([101,115,99,114,111,119])),getAddressEncoder().encode(e),getAddressEncoder().encode(t),r.slice(0,4)]});return i}async function Q1e(n,e){let t="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",o="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",[r]=await getProgramDerivedAddress({programAddress:t,seeds:[getAddressEncoder().encode(n),getAddressEncoder().encode(o),getAddressEncoder().encode(e)]});return r}async function X1e(n,e,t){let o=new Uint8Array(4);new DataView(o.buffer).setUint32(0,t,true);let[c]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([109,101,115,115,97,103,101])),getAddressEncoder().encode(e),o]});return c}var Mu=a(()=>{});var u0={};oe(u0,{ReputationTagEngine:()=>gn});var gn,xf=a(()=>{of();gn=class{tagCriteria=[];decayConfig;constructor(e=rf){this.decayConfig=e,this.initializeTagCriteria();}initializeTagCriteria(){this.tagCriteria=[{tag:"fast-responder",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.responseTimeCount===0n)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.avgResponseTime,o=Number(e.responseTimeCount);return t<6e4?{shouldAssign:true,confidence:Math.min(1e4,1e4-Math.floor(t/6e4*2e3)),evidenceCount:o,reason:`Average response time ${t}ms`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"quick-responder",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.responseTimeCount===0n)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.avgResponseTime,o=Number(e.responseTimeCount);return t<3e5?{shouldAssign:true,confidence:Math.min(1e4,1e4-Math.floor(t/3e5*3e3)),evidenceCount:o,reason:`Average response time ${t}ms`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"dispute-free",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let t=Number(e.successfulPayments+e.failedPayments);return t<10?{shouldAssign:false,confidence:0,evidenceCount:0}:e.totalDisputes===0?{shouldAssign:true,confidence:Math.min(1e4,7e3+t*10),evidenceCount:t,reason:`0 disputes over ${t} transactions`}:{shouldAssign:false,confidence:0,evidenceCount:t}}},{tag:"low-dispute",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let t=Number(e.successfulPayments+e.failedPayments);if(t<100)return {shouldAssign:false,confidence:0,evidenceCount:0};let o=e.totalDisputes/t*100;return o<1?{shouldAssign:true,confidence:Math.min(1e4,1e4-Math.floor(o*1e3)),evidenceCount:t,reason:`${o.toFixed(2)}% dispute rate`}:{shouldAssign:false,confidence:0,evidenceCount:t}}},{tag:"high-volume",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let t=Number(e.successfulPayments);return t>=1e3?{shouldAssign:true,confidence:Math.min(1e4,6e3+Math.floor(t/100)),evidenceCount:t,reason:`${t} successful transactions`}:{shouldAssign:false,confidence:0,evidenceCount:t}}},{tag:"very-high-volume",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let t=Number(e.successfulPayments);return t>=1e4?{shouldAssign:true,confidence:Math.min(1e4,8e3+Math.floor(t/1e3)),evidenceCount:t,reason:`${t} successful transactions`}:{shouldAssign:false,confidence:0,evidenceCount:t}}},{tag:"top-rated",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.totalRatingsCount<10)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.avgRating/20,o=e.totalRatingsCount;return t>4.8?{shouldAssign:true,confidence:Math.min(1e4,Math.floor((t-4.8)*5e4)+8e3),evidenceCount:o,reason:`Average rating ${t.toFixed(2)}/5.0`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"high-quality",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.totalRatingsCount<5)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.avgRating/20,o=e.totalRatingsCount;return t>4.5?{shouldAssign:true,confidence:Math.min(1e4,Math.floor((t-4.5)*2e4)+7e3),evidenceCount:o,reason:`Average rating ${t.toFixed(2)}/5.0`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"consistent-quality",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.totalRatingsCount<20)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.avgRating/20,o=e.totalRatingsCount;return t>4.3?{shouldAssign:true,confidence:Math.min(1e4,Math.floor((t-4)*1e4)+5e3),evidenceCount:o,reason:`Consistent high ratings (${t.toFixed(2)}/5.0)`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"perfect-record",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let t=Number(e.successfulPayments+e.failedPayments);return t<50?{shouldAssign:false,confidence:0,evidenceCount:0}:e.successRate/100===100&&e.failedPayments===0n?{shouldAssign:true,confidence:Math.min(1e4,8e3+Math.floor(t/10)),evidenceCount:t,reason:`100% success rate over ${t} transactions`}:{shouldAssign:false,confidence:0,evidenceCount:t}}},{tag:"high-resolution",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.totalDisputes<5)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.disputesResolved/e.totalDisputes*100,o=e.totalDisputes;return t>90?{shouldAssign:true,confidence:Math.min(1e4,Math.floor((t-90)*1e3)+8e3),evidenceCount:o,reason:`${t.toFixed(1)}% disputes resolved favorably`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"long-term-active",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let r=(Math.floor(Date.now()/1e3)-e.createdAt)/(365*24*60*60);return r>=1?{shouldAssign:true,confidence:Math.min(1e4,Math.floor(r*2e3)+6e3),evidenceCount:Math.floor(r),reason:`Active for ${r.toFixed(1)} years`}:{shouldAssign:false,confidence:0,evidenceCount:0}}},{tag:"multi-year",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let r=(Math.floor(Date.now()/1e3)-e.createdAt)/(365*24*60*60);return r>=3?{shouldAssign:true,confidence:Math.min(1e4,Math.floor(r*1e3)+7e3),evidenceCount:Math.floor(r),reason:`Active for ${r.toFixed(1)} years`}:{shouldAssign:false,confidence:0,evidenceCount:0}}}];}async calculateTags(e){let t=[],o=Math.floor(Date.now()/1e3);for(let r of this.tagCriteria){let c=r.evaluate(e);c.shouldAssign&&c.confidence>=r.minConfidence&&t.push({tagName:r.tag,confidence:c.confidence,evidenceCount:c.evidenceCount,lastUpdated:o});}return t}applyTagDecay(e,t){let o=t||Math.floor(Date.now()/1e3),r=[];for(let c of e){let i=o-c.lastUpdated,d=i/(1440*60),s=Math.floor(d*this.decayConfig.decayRatePerDay),p=Math.max(0,c.confidence-s);p>=this.decayConfig.minConfidence&&i<=this.decayConfig.maxAgeSeconds&&r.push({...c,confidence:p});}return r}mergeTags(e,t){let o=new Map;for(let r of e)o.set(r.tagName,r);for(let r of t){let c=o.get(r.tagName);c?(r.confidence>c.confidence||r.evidenceCount>c.evidenceCount)&&o.set(r.tagName,r):o.set(r.tagName,r);}return Array.from(o.values())}filterTags(e,t){let o=[...e],r=Math.floor(Date.now()/1e3);return t.category&&(o=o.filter(c=>this.getTagCategory(c.tagName)===t.category)),t.minConfidence!==void 0&&(o=o.filter(c=>c.confidence>=t.minConfidence)),t.maxAge!==void 0&&(o=o.filter(c=>r-c.lastUpdated<=t.maxAge)),t.activeOnly&&(o=o.filter(c=>r-c.lastUpdated<=z.STALE_TAG_THRESHOLD&&c.confidence>=this.decayConfig.minConfidence)),o}getTagCategory(e){return Object.values(lu).includes(e)?"skill":Object.values(mu).includes(e)?"behavior":Object.values(yu).includes(e)?"compliance":"behavior"}validateTagName(e){return e.length>0&&e.length<=z.MAX_TAG_NAME_LENGTH}validateConfidence(e){return e>=0&&e<=z.MAX_TAG_CONFIDENCE}getConfidenceLevel(e){return e>=1e4?"Absolute":e>=9500?"Very High":e>=8e3?"High":e>=6e3?"Medium":e>=4e3?"Low":"Very Low"}sortByConfidence(e){return [...e].sort((t,o)=>o.confidence-t.confidence)}sortByEvidence(e){return [...e].sort((t,o)=>o.evidenceCount-t.evidenceCount)}sortByRecent(e){return [...e].sort((t,o)=>o.lastUpdated-t.lastUpdated)}getTopTags(e,t){return this.sortByConfidence(e).slice(0,t)}categorizeTags(e){let t=[],o=[],r=[],c=[];for(let i of e)switch(c.push(i.tagName),this.getTagCategory(i.tagName)){case "skill":t.push(i.tagName);break;case "behavior":o.push(i.tagName);break;case "compliance":r.push(i.tagName);break}return {allTags:c,skillTags:t,behaviorTags:o,complianceTags:r,tagScores:e,lastUpdated:e.length>0?Math.max(...e.map(i=>i.lastUpdated)):0}}};});var E0={};oe(E0,{MultiSourceAggregator:()=>hf});var hf,P0=a(()=>{hf=class{adapters=new Map;configs=new Map;CONFLICT_THRESHOLD=300;constructor(){}addSource(e,t){t.enabled&&(this.adapters.set(e.source,e),this.configs.set(e.source,t));}removeSource(e){this.adapters.delete(e),this.configs.delete(e);}updateSourceWeight(e,t){let o=this.configs.get(e);o&&(o.weight=t);}updateSourceReliability(e,t){let o=this.configs.get(e);o&&(o.reliability=t);}async aggregateReputation(e){let t=[];for(let[s,p]of this.adapters.entries())try{let E=await p.fetchReputationData(e.toString());p.validateData(E)&&t.push(E);}catch(E){console.warn(`Failed to fetch reputation from ${s}:`,E);}let o=this.calculateWeightedScore(t),{hasConflicts:r,conflicts:c}=this.detectConflicts(t),i=this.buildSourceBreakdowns(t),d=t.reduce((s,p)=>s+p.dataPoints,0);return {agentId:e,aggregateScore:o,sourceScores:i,hasConflicts:r,conflicts:c,totalDataPoints:d,timestamp:new Date}}calculateWeightedScore(e){if(e.length===0)return 0;let t=0,o=0;for(let r of e){let c=this.configs.get(r.source);if(!c)continue;let i=c.weight/1e4,d=r.reliability,s=r.score*i*d,p=i*d;t+=s,o+=p;}return o===0?0:Math.round(t/o)}detectConflicts(e){if(e.length<2)return {hasConflicts:false,conflicts:[]};let t=e.map(d=>d.score),o=Math.max(...t),r=Math.min(...t),c=o-r,i=[];if(c>this.CONFLICT_THRESHOLD){let d=e.find(p=>p.score===o)?.source,s=e.find(p=>p.score===r)?.source;return i.push(`High variance detected: ${c} (${(c/1e3*100).toFixed(1)}%) between ${d} (${o}) and ${s} (${r})`),{hasConflicts:true,conflicts:i}}return {hasConflicts:false,conflicts:[]}}buildSourceBreakdowns(e){return e.map(t=>{let o=this.configs.get(t.source);if(!o)throw new Error(`No config found for source: ${t.source}`);let r=o.weight,c=t.reliability*1e4,i=t.score*(r/1e4)*(c/1e4)/this.calculateNormalizationFactor(e);return {source:t.source,score:t.score,weight:r,reliability:Math.round(c),dataPoints:t.dataPoints,contribution:Math.round(i),lastUpdated:t.timestamp}})}calculateNormalizationFactor(e){let t=0;for(let o of e){let r=this.configs.get(o.source);if(!r)continue;let c=r.weight/1e4,i=o.reliability;t+=c*i;}return t||1}async getSourceBreakdown(e){return (await this.aggregateReputation(e)).sourceScores}getRegisteredSources(){return Array.from(this.adapters.keys())}getSourceConfig(e){return this.configs.get(e)}enableSource(e){let t=this.configs.get(e);t&&(t.enabled=true);}disableSource(e){let t=this.configs.get(e);t&&(t.enabled=false);}isSourceEnabled(e){return this.configs.get(e)?.enabled??false}};});te();of();var cf={CONSERVATIVE:{name:"Conservative",mode:"TierOnly",metricVisibility:{showScore:"Private",showJobsCompleted:"Private",showSuccessRate:"Private",showResponseTime:"Private",showDisputes:"Private",showEarnings:"Private",showRatings:"Private",showBadges:"Public"},autoGrantClients:false},BALANCED:{name:"Balanced",mode:"Custom",metricVisibility:{showScore:"Private",showJobsCompleted:"Public",showSuccessRate:"Public",showResponseTime:"Public",showDisputes:"Private",showEarnings:"Private",showRatings:"Public",showBadges:"Public"},autoGrantClients:true},OPEN:{name:"Open",mode:"Public",metricVisibility:{showScore:"Public",showJobsCompleted:"Public",showSuccessRate:"Public",showResponseTime:"Public",showDisputes:"Public",showEarnings:"Public",showRatings:"Public",showBadges:"Public"},autoGrantClients:true}},De={SCORE_RANGES:{LOW:{min:2e3},MEDIUM:{min:5e3},HIGH:{min:7500},VERY_HIGH:{min:9e3}},TIER_THRESHOLDS:{BRONZE:2e3,SILVER:5e3,GOLD:7500,PLATINUM:9e3},MAX_AUTHORIZED_VIEWERS:100};D();function jU(n){return typeof n!="object"||n===null?false:typeof n.IpfsHash=="string"}var yt=class{rpc;rpcSubscriptions;commitment;endpoint;maxRetries;retryDelay;timeout;constructor(e){this.endpoint=e.endpoint,this.rpc=createSolanaRpc(e.endpoint),this.commitment=e.commitment??"confirmed",this.maxRetries=e.maxRetries??3,this.retryDelay=e.retryDelay??1e3,this.timeout=e.timeout??6e4,e.wsEndpoint&&(this.rpcSubscriptions=createSolanaRpcSubscriptions(e.wsEndpoint));}async getAccountInfo(e,t){return this.withRetry(async()=>{let o=await this.rpc.getAccountInfo(e,{commitment:t?.commitment??this.commitment,encoding:"base64"}).send();return o.value?this.parseAccountInfo(o.value):null})}async getMultipleAccounts(e,t){return this.withRetry(async()=>(await this.rpc.getMultipleAccounts(e,{commitment:t?.commitment??this.commitment,encoding:"base64"}).send()).value.map(r=>r?this.parseAccountInfo(r):null))}async getProgramAccounts(e,t){return this.withRetry(async()=>(await this.rpc.getProgramAccounts(e,{commitment:t?.commitment??this.commitment,encoding:"base64",filters:t?.filters}).send()).map(r=>{let c=r;return {pubkey:c.pubkey,account:this.parseAccountInfo(c.account)}}))}blockhashCache=null;async getLatestBlockhash(){let e=Date.now();if(this.blockhashCache&&e-this.blockhashCache.timestamp<1e3)return this.blockhashCache.value;let t=await this.withRetry(async()=>{let o=await this.rpc.getLatestBlockhash({commitment:this.commitment}).send();return {blockhash:o.value.blockhash,lastValidBlockHeight:BigInt(o.value.lastValidBlockHeight)}});return this.blockhashCache={value:t,timestamp:e},t}async sendTransaction(e,t){return this.withRetry(async()=>await this.rpc.sendTransaction(e,{encoding:"base64",skipPreflight:t?.skipPreflight??false,preflightCommitment:t?.preflightCommitment??this.commitment,maxRetries:t?.maxRetries?BigInt(t.maxRetries):void 0}).send())}async getSignatureStatuses(e){return this.withRetry(async()=>(await this.rpc.getSignatureStatuses(e).send()).value.map(o=>{if(!o)return null;let r=o;return {slot:r.slot,confirmations:r.confirmations,err:r.err,confirmationStatus:r.confirmationStatus}}))}async simulateTransaction(e,t){return this.withRetry(async()=>{let o=await this.rpc.simulateTransaction(e,{encoding:"base64",commitment:t?.commitment??this.commitment,replaceRecentBlockhash:t?.replaceRecentBlockhash??false}).send();return {err:o.value.err,logs:o.value.logs??[],unitsConsumed:o.value.unitsConsumed?BigInt(o.value.unitsConsumed):void 0,returnData:o.value.returnData}})}async getFeeForMessage(e){return this.withRetry(async()=>{let t=await this.rpc.getFeeForMessage(e,{commitment:this.commitment}).send();return t.value?BigInt(t.value):null})}async isHealthy(){try{return await this.rpc.getHealth().send(),!0}catch{return false}}async getVersion(){return await this.rpc.getVersion().send()}async subscribeToAccount(e,t){if(!this.rpcSubscriptions)throw new Error("WebSocket endpoint not configured");console.warn("Account subscription is not fully implemented in this version");let o=setInterval(async()=>{try{let r=await this.getAccountInfo(e);t(r);}catch(r){console.error("Subscription polling error:",r);}},5e3);return ()=>{clearInterval(o);}}async withRetry(e,t=this.maxRetries){let o;for(let r=0;r<=t;r++)try{return await e()}catch(c){o=c,r<t&&await new Promise(i=>setTimeout(i,this.retryDelay*Math.pow(2,r)));}throw o}parseAccountInfo(e){let t=e,o=t.data,r=Array.isArray(o)?o[0]:o;return {executable:t.executable,lamports:typeof t.lamports=="number"?lamports(BigInt(t.lamports)):t.lamports,owner:t.owner,rentEpoch:t.rentEpoch!==void 0?typeof t.rentEpoch=="number"?BigInt(t.rentEpoch):t.rentEpoch:BigInt(0),data:Buffer.from(r,"base64"),space:t.space?typeof t.space=="number"?BigInt(t.space):t.space:void 0}}};function v1e(n,e="mainnet-beta"){let t="https://explorer.solana.com/tx";switch(e){case "devnet":return `${t}/${n}?cluster=devnet`;case "testnet":return `${t}/${n}?cluster=testnet`;case "localnet":return `${t}/${n}?cluster=custom&customUrl=http://localhost:8899`;default:return `${t}/${n}`}}function M1e(n,e="mainnet-beta"){let t="https://solscan.io/tx";switch(e){case "devnet":return `${t}/${n}?cluster=devnet`;case "testnet":return `${t}/${n}?cluster=testnet`;case "localnet":return `Local transaction: ${n} (not viewable on Solscan)`;default:return `${t}/${n}`}}function k1e(n,e="mainnet-beta"){let t="https://solana.fm/tx";switch(e){case "devnet":return `${t}/${n}?cluster=devnet-solana`;case "testnet":return `${t}/${n}?cluster=testnet-solana`;case "localnet":return `Local transaction: ${n} (not viewable on SolanaFM)`;default:return `${t}/${n}`}}function w1e(n,e="mainnet-beta"){let t="https://xray.helius.xyz/tx";switch(e){case "devnet":return `${t}/${n}?network=devnet`;case "testnet":return `${t}/${n}?network=testnet`;case "localnet":return `Local transaction: ${n} (not viewable on XRAY)`;default:return `${t}/${n}`}}function U1e(n,e="mainnet-beta"){return {solanaExplorer:v1e(n,e),solscan:M1e(n,e),solanaFM:k1e(n,e),xray:w1e(n,e)}}function sf(n,e,t="confirmed"){return {signature:n,cluster:e,urls:U1e(n,e),commitment:t,timestamp:Date.now()}}function af(n,e){console.error("\u{1F6A8} GhostSpeak SDK Error:",n.message),e&&(e.operation&&console.error("\u{1F527} Operation:",e.operation),e.instructionName&&console.error("\u{1F4CB} Instruction:",e.instructionName),e.accounts&&(console.error("\u{1F3E6} Accounts provided:",e.accounts.length),e.accounts.forEach((t,o)=>{if(typeof t=="string")console.error(` ${o+1}. ${t}`);else if(typeof t=="object"){let r="address"in t?t.address:t,c="name"in t?t.name:void 0;console.error(` ${o+1}. ${r}${c?` (${c})`:""}`);}else console.error(` ${o+1}. ${String(t)}`);})),e.params&&console.error("\u2699\uFE0F Parameters:",e.params)),console.error(`
|
|
2
|
-
\u{1F4A1} Troubleshooting tips:`),console.error(" 1. Check that all required accounts are provided"),console.error(" 2. Verify account addresses are correct"),console.error(" 3. Ensure signers have sufficient SOL for transaction fees"),console.error(" 4. Confirm the program is deployed on the target network");}function
|
|
3
|
-
`)}exportLogs(){return [...this.logs]}clearLogs(){this.logs=[],this.timings.clear();}};function
|
|
4
|
-
`)}async estimateCost(e){try{let t=await Promise.all(e.map(async p=>{let E=await Promise.resolve(p());return xu(E),E})),o=await this.rpcClient.getLatestBlockhash(),r={blockhash:o.blockhash,lastValidBlockHeight:o.lastValidBlockHeight},c=pipe(createTransactionMessage({version:0}),p=>setTransactionMessageFeePayer(this.config.defaultFeePayer,p),p=>setTransactionMessageLifetimeUsingBlockhash(r,p),p=>appendTransactionMessageInstructions(t,p)),i=compileTransactionMessage(c),d=Buffer.from(i).toString("base64"),s=await this.rpcClient.getFeeForMessage(d);return BigInt(s??0)}catch{return 5000n+BigInt(e.length)*1000n}}async sendAndConfirm(e,t,o=30){let r=getBase64EncodedWireTransaction(e),c=await this.rpcClient.sendTransaction(r,{skipPreflight:t,preflightCommitment:this.config.commitment});console.log("\u{1F50D} Transaction sent, signature:",c),console.log("\u{1F50D} Signature length:",c.length),console.log("\u{1F50D} Signature type:",typeof c);let i=false,d=0,s=1e3,p=3e4,E=Date.now();for(;!i&&d<o&&Date.now()-E<p;)try{console.log(`\u{1F50D} Confirmation attempt ${d+1}/${o}`);let b=await this.rpcClient.getSignatureStatuses([c]);if(b[0]){if(console.log("\u{1F50D} Status found:",b[0]),b[0].err)throw new Error(`Transaction failed: ${JSON.stringify(b[0].err,(k,P)=>typeof P=="bigint"?P.toString():P)}`);let x=b[0].confirmationStatus;if(x===this.config.commitment||this.config.commitment==="confirmed"&&x==="finalized"){i=!0,console.log("\u2705 Transaction confirmed via status check");break}}else {console.log("\u{1F50D} No status found, trying transaction details...");try{let{createSolanaRpc:x}=await import('@solana/kit'),P=await x(this.config.rpcEndpoint??"https://api.devnet.solana.com").getTransaction(c,{commitment:this.config.commitment??"confirmed",encoding:"json",maxSupportedTransactionVersion:0}).send();if(P&&P.meta){if(P.meta.err)throw new Error(`Transaction failed: ${JSON.stringify(P.meta.err,(w,W)=>typeof W=="bigint"?W.toString():W)}`);i=!0,console.log("\u2705 Transaction confirmed via direct lookup");break}}catch{console.log("\u{1F50D} Transaction details not yet available");}}d++,await new Promise(x=>setTimeout(x,s)),s=Math.min(s*1.5,5e3);}catch(b){if(b instanceof Error&&b.message.includes("Transaction failed"))throw b;console.log("\u{1F50D} Confirmation attempt failed:",b.message),d++,await new Promise(x=>setTimeout(x,s*2));}if(!i){console.log("\u{1F50D} Final confirmation attempt via transaction lookup...");try{let{createSolanaRpc:b}=await import('@solana/kit'),k=await b(this.config.rpcEndpoint??"https://api.devnet.solana.com").getTransaction(c,{commitment:this.config.commitment??"confirmed",encoding:"json",maxSupportedTransactionVersion:0}).send();if(k&&k.meta){if(k.meta.err)throw new Error(`Transaction failed: ${JSON.stringify(k.meta.err,(P,w)=>typeof w=="bigint"?w.toString():w)}`);return console.log("\u2705 Transaction confirmed on final check - returning success"),c}}catch(b){console.log("\u{1F50D} Final check failed:",b.message);}return console.log("\u26A0\uFE0F Transaction confirmation timed out, but transaction was sent"),console.log(` Check status at: https://explorer.solana.com/tx/${c}?cluster=${this.config.cluster||"devnet"}`),c}return c}async simulateInstruction(e,t){let o=await this.rpcClient.getLatestBlockhash(),r={blockhash:o.blockhash,lastValidBlockHeight:o.lastValidBlockHeight},c=pipe(createTransactionMessage({version:0}),s=>setTransactionMessageFeePayerSigner(t[0],s),s=>setTransactionMessageLifetimeUsingBlockhash(r,s),s=>appendTransactionMessageInstructions([e],s)),i=await signTransactionMessageWithSigners(c),d=getBase64EncodedWireTransaction(i);return this.rpcClient.simulateTransaction(d,{commitment:this.config.commitment,replaceRecentBlockhash:true})}async simulateBatch(e,t){let o=await this.rpcClient.getLatestBlockhash(),r={blockhash:o.blockhash,lastValidBlockHeight:o.lastValidBlockHeight},c=pipe(createTransactionMessage({version:0}),s=>setTransactionMessageFeePayerSigner(t[0],s),s=>setTransactionMessageLifetimeUsingBlockhash(r,s),s=>appendTransactionMessageInstructions(e,s)),i=await signTransactionMessageWithSigners(c),d=getBase64EncodedWireTransaction(i);return this.rpcClient.simulateTransaction(d,{commitment:this.config.commitment,replaceRecentBlockhash:true})}estimateTransactionSize(e){let t=64;for(let o of e)t+=32,t+=(o.accounts?.length??0)*32,t+=o.data.length;return t}extractRawData(e){if(Buffer.isBuffer(e)||e instanceof Uint8Array)return new Uint8Array(e);if(typeof e=="object"&&e!==null&&"data"in e)return Buffer.from(e.data,"base64");if(typeof e=="string")return Buffer.from(e,"base64");throw new Error("Invalid account data format")}async createCommunicationSession(e){return {programAddress:this.config.programId,accounts:[],data:new Uint8Array(0)}}async sendCommunicationMessage(e,t){return {programAddress:this.config.programId,accounts:[],data:new Uint8Array(0)}}async updateParticipantStatus(e){return {programAddress:this.config.programId,accounts:[],data:new Uint8Array(0)}}};var hu={processed:500,confirmed:2e3,finalized:3e4},Eu=class{accountCache;pdaCache;config;ttls;constructor(e={}){this.config={enabled:e.enabled??false,maxSize:e.maxSize??1e3,ttlOverrides:e.ttlOverrides??{}},this.ttls={processed:e.ttlOverrides?.processed??hu.processed,confirmed:e.ttlOverrides?.confirmed??hu.confirmed,finalized:e.ttlOverrides?.finalized??hu.finalized},this.accountCache=new LRUCache({max:this.config.maxSize,ttl:hu.finalized}),this.pdaCache=new LRUCache({max:this.config.maxSize});}isEnabled(){return this.config.enabled}getAccount(e,t,o){if(!this.config.enabled)return;let r=`${e}:${t}`,c=this.accountCache.get(r);if(c){if(o!==void 0&&c.slot<o){this.accountCache.delete(r);return}return c.data}}setAccount(e,t,o,r){if(!this.config.enabled)return;let c=`${e}:${o}`,i={data:t,slot:r,commitment:o,timestamp:Date.now()};this.accountCache.set(c,i,{ttl:this.ttls[o]});}getPDA(e){if(this.config.enabled)return this.pdaCache.get(e)}setPDA(e,t){this.config.enabled&&this.pdaCache.set(e,t);}invalidateAccount(e,t){this.config.enabled&&(t?this.accountCache.delete(`${e}:${t}`):["processed","confirmed","finalized"].forEach(o=>{this.accountCache.delete(`${e}:${o}`);}));}clear(){this.accountCache.clear(),this.pdaCache.clear();}getStats(){return {accountCache:{size:this.accountCache.size,max:this.config.maxSize},pdaCache:{size:this.pdaCache.size,max:this.config.maxSize}}}};var U=class{builder;config;logger;cacheManager;_debugMode=false;constructor(e){this.config=e,this.builder=new Du(e),this.cacheManager=new Eu(e.cache),this.logger=e.logger;}debug(){return this._debugMode=true,this.builder.enableDebug(),this}async execute(e,t,o){return this.builder.execute(e,t,o)}async executeWithDetails(e,t,o){return this.builder.execute(e,t,o,{returnDetails:true})}async executeBatch(e,t,o){return this.builder.executeBatch(e,t.map(r=>()=>Promise.resolve(r())),o)}async simulate(e,t,o){return this.builder.execute(e,()=>Promise.resolve(t()),o,{simulate:true})}async simulateInstruction(e,t,o){return this.simulate(e,t,o)}async estimateCost(e){return this.builder.estimateCost(e)}async getCost(e,t){return this.builder.estimateCost([t])}async explain(e,t){return this.builder.explain(e,[t])}async analyze(e,t){return this.builder.debug(e,[t])}async getAccount(e,t){if(this.cacheManager.isEnabled()){let r=this.cacheManager.getAccount(e,this.commitment);if(r!==void 0)return this.logger?.info(`[Cache HIT] ${e}`),r}let o=await this.builder.getAccount(e,t);return this.cacheManager.isEnabled()&&o!==null&&(this.cacheManager.setAccount(e,o,this.commitment,0),this.logger?.info(`[Cache SET] ${e}`)),o}async getAccounts(e,t){if(!this.cacheManager.isEnabled())return this.builder.getAccounts(e,t);let o=new Array(e.length),r=[],c=[];for(let i=0;i<e.length;i++){let d=this.cacheManager.getAccount(e[i],this.commitment);d!==void 0?(o[i]=d,this.logger?.info(`[Cache HIT] ${e[i]}`)):(r.push(i),c.push(e[i]));}if(c.length>0){this.logger?.info(`[Cache MISS] Fetching ${c.length}/${e.length} accounts`);let i=await this.builder.getAccounts(c,t),d=0;for(let s=0;s<i.length;s++){let p=r[s],E=i[s];o[p]=E,E!==null&&this.cacheManager.setAccount(c[s],E,this.commitment,d);}}return o}async getProgramAccounts(e,t){return this.builder.getProgramAccounts(e,t)}get programId(){return this.config.programId}getProgramId(){return this.config.programId}get commitment(){return this.config.commitment??"confirmed"}getCommitment(){return this.config.commitment??"confirmed"}invalidateCache(e){this.cacheManager.invalidateAccount(e),this.logger?.info(`[Cache INVALIDATE] ${e}`);}clearCache(){this.cacheManager.clear(),this.logger?.info("[Cache CLEAR] All caches cleared");}getCacheStats(){return this.cacheManager.getStats()}};var qU=new Map,gf=0,Pu=class{constructor(e){this.config=e;console.log("\u{1F9EA} Initialized TestIPFSProvider for local testing (shared storage)");}storage=qU;uploadCount=0;async upload(e,t){gf++;let o=typeof e=="string"?e:new TextDecoder().decode(e),r=`Qm${this.generateHash(o)}_test_${gf}`;this.storage.set(r,{content:e,pinned:t?.pin!==false});let c=typeof e=="string"?new TextEncoder().encode(e).length:e.length;return console.log(`\u{1F4E6} Test IPFS upload: ${r} (${c} bytes)`),{hash:r,uri:`ipfs://${r}`,size:c,timestamp:Date.now(),pinned:t?.pin!==false,gateways:[`http://localhost:8080/ipfs/${r}`,`https://test.ipfs.io/ipfs/${r}`]}}async retrieve(e){let t=this.storage.get(e);if(!t)throw new Error(`Test IPFS: Content not found for hash ${e}`);return console.log(`\u{1F4E5} Test IPFS retrieve: ${e}`),await new Promise(o=>setTimeout(o,100)),t.content}async pin(e){let t=this.storage.get(e);return t?(t.pinned=true,console.log(`\u{1F4CC} Test IPFS pin: ${e}`),{hash:e,success:true,status:"pinned"}):{hash:e,success:false,status:"failed",error:`Content not found: ${e}`}}async unpin(e){let t=this.storage.get(e);return t?(t.pinned=false,console.log(`\u{1F4CC} Test IPFS unpin: ${e}`),{hash:e,success:true,status:"pinned"}):{hash:e,success:false,status:"failed",error:`Content not found: ${e}`}}generateHash(e){let t=0;for(let i=0;i<e.length;i++){let d=e.charCodeAt(i);t=(t<<5)-t+d,t=t&t;}let o="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",r="",c=Math.abs(t);for(;c>0&&r.length<40;)r=o[c%o.length]+r,c=Math.floor(c/o.length);for(;r.length<40;)r=o[Math.floor(Math.random()*o.length)]+r;return r}getStats(){let e=0,t=0;for(let o of this.storage.values()){let r=typeof o.content=="string"?new TextEncoder().encode(o.content).length:o.content.length;e+=r,o.pinned&&t++;}return {count:this.storage.size,totalSize:e,pinned:t}}clear(){this.storage.clear(),gf=0,console.log("\u{1F9F9} Test IPFS storage cleared");}static getSharedStorage(){return qU}};var Af=class{constructor(e){this.config=e;}async upload(e,t){let o=this.config.endpoint??"https://api.pinata.cloud",r=new FormData,c=new Blob([e],{type:t?.contentType??"application/octet-stream"});r.append("file",c,t?.filename??"content"),t?.metadata&&r.append("pinataMetadata",JSON.stringify({name:t.filename??"ghostspeak-content",keyvalues:t.metadata}));let i=await fetch(`${o}/pinning/pinFileToIPFS`,{method:"POST",headers:{Authorization:`Bearer ${this.config.jwt??this.config.apiKey}`,...this.config.headers},body:r});if(!i.ok){let p=await i.text();throw new Error(`Pinata upload failed: ${i.status} ${p}`)}let d=await i.json(),s=typeof e=="string"?new TextEncoder().encode(e).length:e.length;if(!jU(d))throw new Error("Invalid IPFS upload response format");return {hash:d.IpfsHash,uri:`ipfs://${d.IpfsHash}`,size:s,timestamp:Date.now(),pinned:true,gateways:[`https://gateway.pinata.cloud/ipfs/${d.IpfsHash}`,`https://ipfs.io/ipfs/${d.IpfsHash}`]}}async retrieve(e,t){let r=`${t?.gateway??"https://gateway.pinata.cloud"}/ipfs/${e}`,c=await fetch(r,{signal:t?.timeout?AbortSignal.timeout(t.timeout):void 0});if(!c.ok)throw new Error(`Failed to retrieve from IPFS: ${c.status} ${c.statusText}`);let i=c.headers.get("content-type");return i?.startsWith("text/")||i?.includes("json")?c.text():new Uint8Array(await c.arrayBuffer())}async pin(e){let t=this.config.endpoint??"https://api.pinata.cloud",o=await fetch(`${t}/pinning/pinByHash`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.config.jwt??this.config.apiKey}`,...this.config.headers},body:JSON.stringify({hashToPin:e})}),r=o.ok;return {hash:e,success:r,status:r?"pinned":"failed",error:r?void 0:`Pin failed: ${o.status}`}}async unpin(e){let t=this.config.endpoint??"https://api.pinata.cloud",o=await fetch(`${t}/pinning/unpin/${e}`,{method:"DELETE",headers:{Authorization:`Bearer ${this.config.jwt??this.config.apiKey}`,...this.config.headers}}),r=o.ok;return {hash:e,success:r,status:r?"pinned":"failed",error:r?void 0:`Unpin failed: ${o.status}`}}},pf=class{constructor(e){this.config=e;}async upload(e,t){let o=this.config.endpoint??"http://localhost:5001",r=new FormData,c=new Blob([e],{type:t?.contentType??"application/octet-stream"});r.append("file",c,t?.filename??"content");let i=await fetch(`${o}/api/v0/add`,{method:"POST",body:r});if(!i.ok)throw new Error(`IPFS HTTP upload failed: ${i.status}`);let d=await i.json(),s=typeof e=="string"?new TextEncoder().encode(e).length:e.length;if(typeof d!="object"||d===null)throw new Error("Invalid IPFS HTTP API response");let p=d;if(typeof p.Hash!="string")throw new Error("IPFS HTTP API response missing Hash field");let E=p.Hash;return {hash:E,uri:`ipfs://${E}`,size:s,timestamp:Date.now(),pinned:t?.pin!==false,gateways:[`${o}/ipfs/${E}`,`https://ipfs.io/ipfs/${E}`]}}async retrieve(e,t){let r=`${t?.gateway??this.config.endpoint?.replace("/api/v0","")??"https://ipfs.io"}/ipfs/${e}`,c=await fetch(r,{signal:t?.timeout?AbortSignal.timeout(t.timeout):void 0});if(!c.ok)throw new Error(`Failed to retrieve from IPFS: ${c.status}`);let i=c.headers.get("content-type");return i?.startsWith("text/")||i?.includes("json")?c.text():new Uint8Array(await c.arrayBuffer())}async pin(e){let t=this.config.endpoint??"http://localhost:5001",o=await fetch(`${t}/api/v0/pin/add?arg=${e}`,{method:"POST"}),r=o.ok;return {hash:e,success:r,status:r?"pinned":"failed",error:r?void 0:`Pin failed: ${o.status}`}}async unpin(e){let t=this.config.endpoint??"http://localhost:5001",o=await fetch(`${t}/api/v0/pin/rm?arg=${e}`,{method:"POST"}),r=o.ok;return {hash:e,success:r,status:r?"pinned":"failed",error:r?void 0:`Unpin failed: ${o.status}`}}},Cu=class{constructor(e){this.config=e;this.initializeProviders();}providers=[];cache=new Map;initializeProviders(){if(this.providers.push(this.createProvider(this.config.provider)),this.config.fallbackProviders)for(let e of this.config.fallbackProviders)this.providers.push(this.createProvider(e));}createProvider(e){switch(e.name){case "pinata":return new Af(e);case "ipfs-http-client":case "custom":return new pf(e);case "test":return new Pu(e);default:throw new Error(`Unsupported IPFS provider: ${e.name}`)}}async upload(e,t){let o=Date.now(),r;for(let c=0;c<this.providers.length;c++){let i=this.providers[c];try{console.log(`\u{1F4E4} Attempting IPFS upload with provider ${c+1}/${this.providers.length}`);let d=await this.withRetry(()=>i.upload(e,t),this.config.maxRetries??3,this.config.retryDelay??1e3);return console.log(`\u2705 IPFS upload successful: ${d.hash}`),{success:!0,data:d,duration:Date.now()-o,provider:this.config.provider.name}}catch(d){console.warn(`\u274C Provider ${c+1} upload failed:`,d instanceof Error?d.message:String(d)),r=d instanceof Error?d:new Error(String(d));}}return {success:false,error:"UPLOAD_FAILED",message:`All providers failed. Last error: ${r?.message}`,duration:Date.now()-o}}async retrieve(e,t){let o=Date.now();if(this.config.enableCache&&t?.cache!==false){let i=this.cache.get(e);if(i&&Date.now()-i.timestamp<(this.config.cacheTTL??3e5))return {success:true,data:{content:i.content,size:(typeof i.content=="string",i.content.length),hash:e,gateway:"cache",fromCache:true},duration:Date.now()-o}}let r,c=t?.gateway?[t.gateway]:this.config.gateways??["https://ipfs.io"];for(let i of c)for(let d of this.providers)try{let s=await this.withRetry(()=>d.retrieve(e,{...t,gateway:i}),this.config.maxRetries??3,this.config.retryDelay??1e3);return this.config.enableCache&&this.cache.set(e,{content:s,timestamp:Date.now()}),{success:!0,data:{content:s,size:s.length,hash:e,gateway:i,fromCache:!1},duration:Date.now()-o}}catch(s){r=s instanceof Error?s:new Error(String(s));}return {success:false,error:"RETRIEVAL_FAILED",message:`Failed to retrieve from all gateways. Last error: ${r?.message}`,duration:Date.now()-o}}async pin(e){let t=Date.now();for(let o of this.providers)try{let r=await o.pin(e);return {success:r.success,data:r,duration:Date.now()-t}}catch(r){console.warn("Pin attempt failed:",r);}return {success:false,error:"PIN_FAILED",message:"All pin attempts failed",duration:Date.now()-t}}async storeContent(e,t,o){let r=new TextEncoder().encode(e).length,c=this.config.sizeThreshold??800;if(!(o?.forceIpfs??r>c))return {uri:`data:application/json;base64,${btoa(e)}`,useIpfs:false,size:r};let d=await this.upload(e,o);if(!d.success||!d.data)throw new Error(`IPFS upload failed: ${d.message}`);let s={type:t,originalSize:r,ipfsHash:d.data.hash,encoding:"utf8",compression:"none",mimeType:"application/json",uploadedAt:d.data.timestamp,pinned:d.data.pinned,checksum:await this.calculateChecksum(e)};return {uri:d.data.uri,useIpfs:true,ipfsMetadata:s,size:r}}async retrieveContent(e){if(e.startsWith("data:")){let t=e.split(",")[1];if(!t)throw new Error("Invalid data URI format");return atob(t)}if(e.startsWith("ipfs://")){let t=e.replace("ipfs://",""),o=await this.retrieve(t);if(!o.success||!o.data)throw new Error(`Failed to retrieve IPFS content: ${o.message}`);return typeof o.data.content=="string"?o.data.content:new TextDecoder().decode(o.data.content)}throw new Error(`Unsupported URI format: ${e}`)}async withRetry(e,t,o){let r;for(let c=0;c<=t;c++)try{return await e()}catch(i){r=i instanceof Error?i:new Error(String(i)),c<t&&(console.log(`\u23F3 Retrying in ${o}ms... (attempt ${c+1}/${t})`),await new Promise(d=>setTimeout(d,o)));}throw r}async calculateChecksum(e){let o=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(r)).map(i=>i.toString(16).padStart(2,"0")).join("")}clearCache(){this.cache.clear();}getCacheStats(){return {size:this.cache.size,keys:Array.from(this.cache.keys())}}};var nn={provider:{name:"pinata",endpoint:"https://api.pinata.cloud"},gateways:["https://gateway.pinata.cloud","https://ipfs.io","https://cloudflare-ipfs.com","https://gateway.ipfs.io"],autoPinning:true,sizeThreshold:800,maxRetries:3,retryDelay:1e3,enableCache:true,cacheTTL:3e5},lf=class{client;constructor(e){this.client=new Cu(e);}async storeAgentMetadata(e,t){let o=JSON.stringify({...e,createdAt:new Date().toISOString(),version:"1.0.0"});return this.client.storeContent(o,"agent-metadata",{filename:`agent-${e.agentId??"metadata"}.json`,metadata:{type:"agent-metadata",agentId:e.agentId,name:e.name},contentType:"application/json",...t})}async storeChannelMessage(e,t){let o=JSON.stringify({...e,timestamp:new Date().toISOString(),version:"1.0.0"});return this.client.storeContent(o,"channel-message",{filename:`message-${Date.now()}.json`,metadata:{type:"channel-message",channelId:e.channelId,messageType:e.messageType??0},contentType:"application/json",...t})}async storeFileAttachment(e,t,o,r){let c=typeof e=="string"?e:new TextDecoder().decode(e);return this.client.storeContent(c,"file-attachment",{filename:t,contentType:o,metadata:{type:"file-attachment",originalFilename:t,mimeType:o},...r})}async retrieveAgentMetadata(e){let t=await this.client.retrieveContent(e),o=JSON.parse(t);if(typeof o!="object"||o===null)throw new Error("Retrieved agent metadata is not a valid object");return o}async retrieveChannelMessage(e){let t=await this.client.retrieveContent(e),o=JSON.parse(t);if(typeof o!="object"||o===null)throw new Error("Retrieved channel message is not a valid object");return o}async batchUpload(e){return (await Promise.allSettled(e.map(o=>this.client.storeContent(o.content,o.type,{filename:o.filename,...o.options})))).map(o=>o.status==="fulfilled"?{success:true,data:o.value}:{success:false,error:"UPLOAD_FAILED",message:o.reason instanceof Error?o.reason.message:String(o.reason)})}async pinContent(e){let t=await this.client.pin(e);return {...t,data:t.success}}isIPFSUri(e){return e.startsWith("ipfs://")}extractIPFSHash(e){return this.isIPFSUri(e)?e.replace("ipfs://",""):null}getGatewayUrls(e,t){return (t??nn.gateways??[]).map(r=>`${r}/ipfs/${e}`)}isValidIPFSHash(e){return e.length<44?false:e.startsWith("Qm")&&e.length===46?/^Qm[A-Za-z0-9]{44}$/.test(e):e.length>46?/^[A-Za-z0-9]+$/.test(e):false}shouldUseIPFS(e,t){let o=new TextEncoder().encode(e).length,r=t??nn.sizeThreshold??800;return o>r}async compressContent(e){try{if(typeof CompressionStream<"u"){let t=new CompressionStream("gzip"),o=t.writable.getWriter(),r=t.readable.getReader(),i=new TextEncoder().encode(e),d=o.write(i).then(()=>o.close()),s=[],p=async()=>{let P=await r.read(),{done:w,value:W}=P;!w&&W&&(s.push(W),await p());};await Promise.all([d,p()]);let E=s.reduce((P,w)=>P+w.length,0),b=new Uint8Array(E),x=0;for(let P of s)b.set(P,x),x+=P.length;return {compressed:Buffer.from(b).toString("base64"),algorithm:"gzip"}}else return console.warn("Compression not available in this environment, storing uncompressed"),{compressed:e,algorithm:"none"}}catch(t){return console.warn("Compression failed, falling back to uncompressed:",t),{compressed:e,algorithm:"none"}}}async decompressContent(e,t){if(t==="none")return e;try{if(t==="gzip")if(typeof DecompressionStream<"u"){let o=new DecompressionStream("gzip"),r=o.writable.getWriter(),c=o.readable.getReader(),i=Buffer.from(e,"base64"),d=r.write(i).then(()=>r.close()),s=[],p=async()=>{let P=await c.read(),{done:w,value:W}=P;!w&&W&&(s.push(W),await p());};await Promise.all([d,p()]);let E=s.reduce((P,w)=>P+w.length,0),b=new Uint8Array(E),x=0;for(let P of s)b.set(P,x),x+=P.length;return new TextDecoder().decode(b)}else return console.warn("Decompression not available in this environment, returning compressed data"),e;else return console.warn(`Unknown compression algorithm: ${t}`),e}catch(o){return console.error("Decompression failed, returning compressed data:",o),e}}getStats(){return {cacheStats:this.client.getCacheStats(),config:nn}}clearCache(){this.client.clearCache();}};function JU(n){let e={...nn,...n,provider:{...nn.provider,...n?.provider}};return new lf(e)}var bu=address("11111111111111111111111111111111");address("11111111111111111111111111111111");address("SysvarRecentB1ockHashes11111111111111111111");address("SysvarStakeHistory1111111111111111111111111");address("Sysvar1nstructions1111111111111111111111111");address("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");address("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");address("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");address("So11111111111111111111111111111111111111112");address("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");address("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");te();var rn=class extends U{ipfsUtils=null;constructor(e){super(e),e.ipfsConfig&&(this.ipfsUtils=JU(e.ipfsConfig));}async register(e,t){let o=t.pricingModel??0,r=async()=>{let i=await this.deriveAgentPda(t.agentId,e.address);return await Ty({agentAccount:i,signer:e,systemProgram:this.systemProgramId,agentType:t.agentType,name:t.name,description:t.description,metadataUri:t.metadataUri,agentId:t.agentId,pricingModel:o})},c=()=>{let i=new Uint8Array(5);return i[0]=1,new DataView(i.buffer).setUint32(1,256*1024,true),{programAddress:"ComputeBudget111111111111111111111111111111",accounts:[],data:i}};return this.debug(),t.skipSimulation?(console.log("\u{1F680} SKIPPING SIMULATION - Sending transaction directly"),this.builder.executeBatch("registerAgent",[c,r],[e],{simulate:false,skipPreflight:true})):this.builder.executeBatch("registerAgent",[c,r],[e])}async registerCompressed(e,t){let o=async()=>{let r=t.treeConfig||await this.deriveTreeConfigPda(e.address);return await xy({merkleTree:t.merkleTree,treeAuthority:r,signer:e,systemProgram:this.systemProgramId,compressionProgram:this.compressionProgramId,agentType:t.agentType,name:t.name,description:t.description,metadataUri:t.metadataUri,agentId:t.agentId,pricingModel:t.pricingModel??0,logWrapper:"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"})};return this.execute("registerAgentCompressed",o,[e])}async update(e,t){let o=()=>nT({agentAccount:t.agentAddress,signer:e,metadataUri:t.metadataUri,agentType:t.agentType,agentId:t.agentId,name:t.name??null,description:t.description??null,pricingModel:t.pricingModel??0});return this.execute("updateAgent",o,[e])}async verify(e,t){let o=async()=>await YT({agent:t.agentAddress,verifier:e,agentPubkey:t.agentPubkey,serviceEndpoint:t.serviceEndpoint,supportedCapabilities:t.supportedCapabilities,verifiedAt:t.verifiedAt});return this.execute("verifyAgent",o,[e])}async deactivate(e,t){let o=()=>l1({agentAccount:t.agentAddress,signer:e,agentId:t.agentId});return this.execute("deactivateAgent",o,[e])}async activate(e,t){let o=()=>hm({agentAccount:t.agentAddress,signer:e,agentId:t.agentId});return this.execute("activateAgent",o,[e])}async getAgentAccount(e){return super.getAccount(e,"getAgentDecoder")}async getAllAgents(){return this.getProgramAccounts("getAgentDecoder")}async getAgentsByType(e){let t=Buffer.alloc(1);t.writeUInt8(e,0);let o=[{memcmp:{offset:BigInt(8),bytes:t.toString("base64"),encoding:"base64"}}];return this.getProgramAccounts("getAgentDecoder",o)}async getUserAgents(e){let t=[{memcmp:{offset:BigInt(9),bytes:e,encoding:"base58"}}];return this.getProgramAccounts("getAgentDecoder",t)}async batchGetAgents(e,t){return super.getAccounts(e,"getAgentDecoder")}async batchGetExistingAgents(e,t){let{batchGetExistingAccounts:o}=await Promise.resolve().then(()=>(yf(),mf));return o(this.config.rpc,e,{onProgress:t})}async batchGetAndMapAgents(e,t){let{batchGetAndMap:o}=await Promise.resolve().then(()=>(yf(),mf));return o(this.config.rpc,e,t)}async deriveAgentPda(e,t){let{deriveAgentPda:o}=await Promise.resolve().then(()=>(Mu(),vu)),[r]=await o({programAddress:this.programId,owner:t,agentId:e});return r}async deriveUserRegistryPda(e){let{deriveUserRegistryPda:t}=await Promise.resolve().then(()=>(Mu(),vu));return t(this.programId,e)}async deriveTreeConfigPda(e){let{getProgramDerivedAddress:t,getAddressEncoder:o}=await import('@solana/addresses'),c=o().encode(e),[i]=await t({programAddress:this.programId,seeds:[new TextEncoder().encode("agent_tree_config"),c]});return i}get systemProgramId(){return bu}get compressionProgramId(){return "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK"}};te();var wu=address("22zoJMtdu4tQc2PzL74ZUT7FrwgB1Udec8DdW4yw4BdG"),e0="attestation",t0="credential",n0="schema",cn=class{static async deriveAttestationPda(e,t,o){let[r,c]=await getProgramDerivedAddress({programAddress:wu,seeds:[getUtf8Encoder().encode(e0),getAddressEncoder().encode(e),getAddressEncoder().encode(t),getAddressEncoder().encode(o)]});return {attestationPda:r,bump:c}}static async deriveCredentialPda(e){let[t,o]=await getProgramDerivedAddress({programAddress:wu,seeds:[getUtf8Encoder().encode(t0),getAddressEncoder().encode(e)]});return {attestationPda:t,bump:o}}static async deriveSchemaPda(e,t){let[o,r]=await getProgramDerivedAddress({programAddress:wu,seeds:[getUtf8Encoder().encode(n0),getAddressEncoder().encode(e),getUtf8Encoder().encode(t)]});return {attestationPda:o,bump:r}}static serializeAttestationData(e){let t=new TextEncoder,o=t.encode(e.network),r=e.githubUsername?t.encode(e.githubUsername):new Uint8Array,c=e.twitterHandle?t.encode(e.twitterHandle):new Uint8Array,i=36+o.length+1+(e.githubUsername?4+r.length:0)+1+(e.twitterHandle?4+c.length:0)+8,d=new Uint8Array(i),s=0,p=Buffer.from(e.x402PaymentAddress);return d.set(p.slice(0,32),s),s+=32,new DataView(d.buffer,s,4).setUint32(0,o.length,true),s+=4,d.set(o,s),s+=o.length,e.githubUsername?(d[s]=1,s+=1,new DataView(d.buffer,s,4).setUint32(0,r.length,true),s+=4,d.set(r,s),s+=r.length):(d[s]=0,s+=1),e.twitterHandle?(d[s]=1,s+=1,new DataView(d.buffer,s,4).setUint32(0,c.length,true),s+=4,d.set(c,s),s+=c.length):(d[s]=0,s+=1),new DataView(d.buffer,s,8).setBigInt64(0,e.timestamp,true),d}static getDefaultCredentialConfig(e){return {issuer:e,name:"GhostSpeak AI Agent Ownership",description:"Attestation proving ownership of an AI agent registered on the GhostSpeak protocol",schemaUri:"https://ghostspeak.ai/schemas/agent-ownership-v1.json"}}static isAttestationExpired(e,t){let o=t??BigInt(Math.floor(Date.now()/1e3));return e<o}static calculateDefaultExpiry(e){let t=e??BigInt(Math.floor(Date.now()/1e3)),o=BigInt(365*24*60*60);return t+o}static async prepareAttestation(e){let{attestationPda:t,bump:o}=await this.deriveAttestationPda(e.credentialAddress,e.schemaAddress,e.x402PaymentAddress),r=e.expiryTimestamp??this.calculateDefaultExpiry();return {attestationData:this.serializeAttestationData({x402PaymentAddress:e.x402PaymentAddress,network:e.network,githubUsername:e.githubUsername,twitterHandle:e.twitterHandle,timestamp:BigInt(Math.floor(Date.now()/1e3))}),attestationPda:t,bump:o,expiryTimestamp:r}}};var nye="did_document",Uu=class extends U{constructor(e){super(e);}async claim(e,t){let o=await this.prepareClaim(t),r=()=>zm({agentAccount:t.agentAddress,didDocument:o.didDocumentPda,sasAttestation:o.attestationPda,claimer:e,systemProgram:this.systemProgramId,sasCredential:t.sasCredential,sasSchema:t.sasSchema,ipfsMetadataUri:t.ipfsMetadataUri??null,network:t.network});return this.execute("claimGhost",r,[e])}async prepareClaim(e){let{attestationPda:t,bump:o}=await cn.deriveAttestationPda(e.sasCredential,e.sasSchema,e.x402PaymentAddress),[r,c]=await this.deriveDidDocumentPda(e.x402PaymentAddress);return {attestationPda:t,didDocumentPda:r,attestationBump:o,didDocumentBump:c}}async getGhostAgent(e){return super.getAccount(e,"getAgentDecoder")}async getAllGhosts(){return this.getGhostsByType(10)}async getGhostsByType(e=10){let t=Buffer.alloc(1);t.writeUInt8(e,0);let o=[{memcmp:{offset:BigInt(8),bytes:t.toString("base64"),encoding:"base64"}}];return this.getProgramAccounts("getAgentDecoder",o)}async getClaimedGhosts(e){let t=[{memcmp:{offset:BigInt(9),bytes:e,encoding:"base58"}}];return this.getProgramAccounts("getAgentDecoder",t)}async validateClaim(e){let t=[],o=[],r=["devnet","testnet","mainnet-beta","localnet"];r.includes(e.network)||t.push(`Invalid network: ${e.network}. Must be one of: ${r.join(", ")}`),e.ipfsMetadataUri&&!e.ipfsMetadataUri.startsWith("ipfs://")&&o.push('IPFS metadata URI should start with "ipfs://"');let c=await this.getGhostAgent(e.agentAddress);return c?(c.owner!==null&&t.push(`Agent is already claimed by: ${c.owner}`),c.agentType!==10&&o.push(`Agent type is ${c.agentType}, expected 10 (external x402 agent)`)):t.push(`Agent not found at address: ${e.agentAddress}`),{valid:t.length===0,errors:t,warnings:o}}async deriveDidDocumentPda(e){let[t,o]=await getProgramDerivedAddress({programAddress:this.programId,seeds:[getUtf8Encoder().encode(nye),getAddressEncoder().encode(e)]});return [t,o]}get systemProgramId(){return bu}};te();var sn=class extends U{getInitializeGovernanceProposalInstruction(e){return jt(e)}async createProposal(e){let t=this.deriveProposalPda(e.signer.address,e.title),o=await this.getInitializeGovernanceProposalInstruction({proposal:t,proposer:e.signer,title:e.title,description:e.description,proposalType:{kind:e.proposalType,data:{}},executionParams:{instructions:[],accounts:[],targetProgram:t,executeAfter:BigInt(e.executionDelay??0)},proposalId:BigInt(Date.now())});return this.execute("createProposal",()=>o,[e.signer])}async getProposal(e){return super.getAccount(e,"getGovernanceProposalDecoder")}async getActiveProposals(){return this.getProgramAccounts("getGovernanceProposalDecoder")}async getProposalsByProposer(e){let t=[{memcmp:{offset:BigInt(8),bytes:e,encoding:"base58"}}];return this.getProgramAccounts("getGovernanceProposalDecoder",t)}async getProposalsByStatus(e){let t=await this.getProgramAccounts("getGovernanceProposalDecoder");return t.filter(o=>t.length>0)}deriveProposalPda(e,t){return `proposal_${e}_${t}`}};te();var an=class extends U{async createMultisig(e){throw new Error("createMultisig: Instruction not available - requires IDL regeneration")}async createProposal(e){let t=await jt({proposer:e.proposer,proposalId:e.proposalId,title:e.title,description:e.description,proposalType:e.proposalType,executionParams:e.executionParams},{programAddress:this.programId});return this.execute("createProposal",()=>t,[e.proposer])}async executeProposal(e){throw new Error("executeProposal: Use protocol_config instructions for execution")}};var rye="https://staging.crossmint.com",oye="https://www.crossmint.com",ff={AGENT_IDENTITY:"GhostSpeakAgentIdentity",REPUTATION_SCORE:"GhostSpeakReputation",JOB_COMPLETION:"GhostSpeakJobCompletion"},_u=class{apiKey;baseUrl;chain;constructor(e){this.apiKey=e.apiKey,this.baseUrl=e.environment==="production"?oye:rye,this.chain=e.chain||"base-sepolia";}async createAgentIdentityType(){let e=ff.AGENT_IDENTITY,t={$schema:"https://json-schema.org/draft/2020-12/schema",title:"GhostSpeak Agent Identity",description:"Verified AI agent identity on the GhostSpeak Protocol",type:"object",properties:{credentialSubject:{type:"object",properties:{agentId:{type:"string"},owner:{type:"string"},capabilities:{type:"array",items:{type:"string"}},registeredAt:{type:"string"},reputationScore:{type:"number"},totalJobsCompleted:{type:"integer"},verified:{type:"boolean"},id:{type:"string"}},required:["agentId","owner","capabilities","registeredAt","verified"],additionalProperties:false}}};return this.createCredentialType(e,t)}async createReputationType(){let e=ff.REPUTATION_SCORE,t={$schema:"https://json-schema.org/draft/2020-12/schema",title:"GhostSpeak Reputation",description:"Verified reputation score for GhostSpeak users",type:"object",properties:{credentialSubject:{type:"object",properties:{userId:{type:"string"},walletAddress:{type:"string"},reputationScore:{type:"number"},totalTransactions:{type:"integer"},disputeRate:{type:"number"},memberSince:{type:"string"},id:{type:"string"}},required:["userId","walletAddress","reputationScore","memberSince"],additionalProperties:false}}};return this.createCredentialType(e,t)}async createJobCompletionType(){let e=ff.JOB_COMPLETION,t={$schema:"https://json-schema.org/draft/2020-12/schema",title:"GhostSpeak Job Completion",description:"Certificate of successful job completion on GhostSpeak",type:"object",properties:{credentialSubject:{type:"object",properties:{jobId:{type:"string"},agentId:{type:"string"},clientAddress:{type:"string"},completedAt:{type:"string"},amountPaid:{type:"string"},rating:{type:"integer"},review:{type:"string"},id:{type:"string"}},required:["jobId","agentId","clientAddress","completedAt","amountPaid","rating"],additionalProperties:false}}};return this.createCredentialType(e,t)}async initializeAllTypes(){let[e,t,o]=await Promise.all([this.createAgentIdentityType(),this.createReputationType(),this.createJobCompletionType()]);return {agentIdentity:e,reputation:t,jobCompletion:o}}async createAllTemplates(e){let[t,o,r]=await Promise.all([this.createTemplate(e.agentIdentity.id,{name:"GhostSpeak Agent Identity",description:"Verified AI agent identity on the GhostSpeak Protocol",imageUrl:"https://www.ghostspeak.io/assets/credential-agent.png"}),this.createTemplate(e.reputation.id,{name:"GhostSpeak Reputation",description:"Verified reputation score for GhostSpeak users",imageUrl:"https://www.ghostspeak.io/assets/credential-reputation.png"}),this.createTemplate(e.jobCompletion.id,{name:"GhostSpeak Job Completion Certificate",description:"Certificate of successful job completion on GhostSpeak",imageUrl:"https://www.ghostspeak.io/assets/credential-job.png"})]);return {agentIdentityTemplate:t,reputationTemplate:o,jobCompletionTemplate:r}}async issueAgentCredential(e,t,o,r){return this.issueCredential(e,t,o,r)}async issueReputationCredential(e,t,o,r){return this.issueCredential(e,t,o,r)}async issueJobCompletionCredential(e,t,o,r){return this.issueCredential(e,t,o,r)}async createCredentialType(e,t){let o=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/types/${e}`,{method:"PUT",headers:{"Content-Type":"application/json","X-API-KEY":this.apiKey},body:JSON.stringify(t)});if(!o.ok){let r=await o.json().catch(()=>({message:o.statusText}));throw new Error(`Failed to create credential type: ${JSON.stringify(r)}`)}return o.json()}async createTemplate(e,t){let o=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/templates/`,{method:"POST",headers:{"Content-Type":"application/json","X-API-KEY":this.apiKey},body:JSON.stringify({credentials:{type:e,encryption:"none",storage:"crossmint"},metadata:t,chain:this.chain})});if(!o.ok){let i=await o.text();try{let d=JSON.parse(i);throw new Error(`Failed to create template: ${JSON.stringify(d)}`)}catch{throw new Error(`Failed to create template (${o.status}): ${i}`)}}let r=await o.json(),c=await this.waitForAction(r.id);return c.data&&c.data.collection?c.data.collection:c.data||c}async waitForAction(e){let t=0;for(;t<60;){await new Promise(c=>setTimeout(c,2e3));let o=await fetch(`${this.baseUrl}/api/2022-06-09/actions/${e}`,{headers:{"X-API-KEY":this.apiKey}});if(!o.ok)throw new Error(`Failed to poll action: ${o.statusText}`);let r=await o.json();if(r.status==="succeeded")return r;if(r.status==="failed")throw new Error(`Action failed: ${JSON.stringify(r)}`);t++;}throw new Error("Action polling timed out")}async issueCredential(e,t,o,r){let c=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/templates/${e}/vcs`,{method:"POST",headers:{"Content-Type":"application/json","X-API-KEY":this.apiKey},body:JSON.stringify({recipient:`email:${t}:${this.chain}`,credential:{subject:o,expiresAt:r||this.getDefaultExpiry()}})});if(!c.ok){let i=await c.json().catch(()=>({message:c.statusText}));throw new Error(`Failed to issue credential: ${JSON.stringify(i)}`)}return c.json()}async getCredential(e){let t=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/${e}`,{headers:{"X-API-KEY":this.apiKey}});if(!t.ok){let o=await t.json().catch(()=>({message:t.statusText}));throw new Error(`Failed to get credential: ${JSON.stringify(o)}`)}return t.json()}async verifyCredential(e){let t=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/verification/verify`,{method:"POST",headers:{"Content-Type":"application/json","X-API-KEY":this.apiKey},body:JSON.stringify({credential:e})});if(!t.ok){let o=await t.json().catch(()=>({message:t.statusText}));throw new Error(`Failed to verify credential: ${JSON.stringify(o)}`)}return t.json()}async revokeCredential(e){let t=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/${e}`,{method:"DELETE",headers:{"X-API-KEY":this.apiKey}});if(!t.ok){let o=await t.json().catch(()=>({message:t.statusText}));throw new Error(`Failed to revoke credential: ${JSON.stringify(o)}`)}return t.json()}getDefaultExpiry(){let e=new Date;return e.setFullYear(e.getFullYear()+1),e.toISOString().split("T")[0]}};var r0="did_document";var ke=class extends Error{code;constructor(e,t){super(t||e),this.name="DidError",this.code=e;}};async function zu(n,e){let[t,o]=await getProgramDerivedAddress({programAddress:n,seeds:[new TextEncoder().encode(r0),getAddressEncoder().encode(e)]});return [t,o]}function he(n,e){return `did:sol:${n==="mainnet"?"mainnet-beta":n}:${e.toString()}`}function Ou(n){if(!n.startsWith("did:sol:"))throw new ke("InvalidDidFormat",'DID must start with "did:sol:"');let e=n.split(":");if(e.length!==4)throw new ke("InvalidDidFormat",'DID must have format "did:sol:network:identifier"');let t=["mainnet-beta","devnet","testnet","localnet"];if(!t.includes(e[2]))throw new ke("InvalidDidFormat",`Invalid network "${e[2]}". Must be one of: ${t.join(", ")}`);try{Tt.decode(e[3]);}catch{throw new ke("InvalidDidFormat","DID identifier must be a valid base58-encoded Solana public key")}}function o0(n){Ou(n);let e=n.split(":");return {method:e[1],network:e[2],identifier:e[3]}}function Sf(n){let e=n.verificationMethods.filter(s=>!s.revoked).map(s=>({id:`${n.did}#${s.id}`,type:s.methodType,controller:s.controller,publicKeyMultibase:s.publicKeyMultibase})),t=n.verificationMethods.filter(s=>!s.revoked&&s.relationships.includes("authentication")).map(s=>`${n.did}#${s.id}`),o=n.verificationMethods.filter(s=>!s.revoked&&s.relationships.includes("assertionMethod")).map(s=>`${n.did}#${s.id}`),r=n.verificationMethods.filter(s=>!s.revoked&&s.relationships.includes("keyAgreement")).map(s=>`${n.did}#${s.id}`),c=n.verificationMethods.filter(s=>!s.revoked&&s.relationships.includes("capabilityInvocation")).map(s=>`${n.did}#${s.id}`),i=n.verificationMethods.filter(s=>!s.revoked&&s.relationships.includes("capabilityDelegation")).map(s=>`${n.did}#${s.id}`),d=n.serviceEndpoints.map(s=>({id:`${n.did}#${s.id}`,type:s.serviceType,serviceEndpoint:s.serviceEndpoint,description:s.description||void 0}));return {"@context":n.context,id:n.did,controller:n.controller.toString(),verificationMethod:e,authentication:t.length>0?t:void 0,assertionMethod:o.length>0?o:void 0,keyAgreement:r.length>0?r:void 0,capabilityInvocation:c.length>0?c:void 0,capabilityDelegation:i.length>0?i:void 0,service:d.length>0?d:void 0,alsoKnownAs:n.alsoKnownAs.length>0?n.alsoKnownAs:void 0}}function i0(n,e,t,o=["authentication"]){let r=`z${t}`;return {id:n,methodType:"Ed25519VerificationKey2020",controller:e,publicKeyMultibase:r,relationships:o,createdAt:Math.floor(Date.now()/1e3),revoked:false}}function c0(n,e,t,o=""){return {id:n,serviceType:e,serviceEndpoint:t,description:o}}function s0(n){return !n.deactivated}function a0(n,e=true){let t=Sf(n);return e?JSON.stringify(t,null,2):JSON.stringify(t)}var dn=n=>Tt.encode(n),dye="GHosT3wqDfNq9bKz8dNEQ1F5mLuN7bKdNYx3Z1111111";var un=class{programId;didModule;constructor(e=dye,t){this.programId=e,this.didModule=t;}setDidModule(e){this.didModule=e;}hashSubjectData(e){let t=JSON.stringify(e,Object.keys(e).sort());return sha256(new TextEncoder().encode(t))}generateCredentialId(e,t){let o=Date.now(),r=`${e}-${t}-${o}`,c=sha256(new TextEncoder().encode(r)),i=dn(c.slice(0,8));return `${e.toLowerCase()}-${i}`}exportAsW3CCredential(e,t,o,r,c){let i=c?.network||"mainnet",d=he(i,this.programId),s=he(i,e.subject),p=`solana:${this.programId}:credential:${e.credentialId}`;return {"@context":["https://www.w3.org/ns/credentials/v2","https://w3id.org/security/data-integrity/v2","https://ghostspeak.io/ns/credentials/v1"],type:["VerifiableCredential",`GhostSpeak${o.kind}Credential`],id:`urn:ghostspeak:${e.credentialId}`,issuer:{id:d,name:"GhostSpeak Protocol"},validFrom:new Date(e.issuedAt*1e3).toISOString(),validUntil:e.expiresAt?new Date(e.expiresAt*1e3).toISOString():void 0,credentialSubject:{id:s,...r},credentialSchema:{id:o.schemaUri,type:"JsonSchema"},credentialStatus:{id:p,type:"SolanaAccountStatus2025",statusPurpose:"revocation"},relatedResource:c?.includeRelatedResource?[{id:e.subjectDataUri,digestMultibase:`mEi${dn(e.subjectDataHash)}`}]:void 0,proof:{type:"DataIntegrityProof",created:new Date(e.issuedAt*1e3).toISOString(),verificationMethod:`${d}#key-1`,cryptosuite:"eddsa-rdfc-2022",proofPurpose:"assertionMethod",proofValue:dn(e.signature)}}}async exportWithDidResolution(e,t,o,r,c){if(!this.didModule)return this.exportAsW3CCredential(e,t,o,r,c);let i=c?.network||"mainnet",d=he(i,this.programId),s=he(i,e.subject),p=await this.didModule.resolve(this.programId).catch(()=>null);await this.didModule.resolve(e.subject).catch(()=>null);let b=`solana:${this.programId}:credential:${e.credentialId}`,x=p?.verificationMethods?.[0]?`${d}#${p.verificationMethods[0].id}`:`${d}#key-1`;return {"@context":["https://www.w3.org/ns/credentials/v2","https://w3id.org/security/data-integrity/v2","https://ghostspeak.io/ns/credentials/v1"],type:["VerifiableCredential",`GhostSpeak${o.kind}Credential`],id:`urn:ghostspeak:${e.credentialId}`,issuer:{id:d,name:"GhostSpeak Protocol"},validFrom:new Date(e.issuedAt*1e3).toISOString(),validUntil:e.expiresAt?new Date(e.expiresAt*1e3).toISOString():void 0,credentialSubject:{id:s,...r},credentialSchema:{id:o.schemaUri,type:"JsonSchema"},credentialStatus:{id:b,type:"SolanaAccountStatus2025",statusPurpose:"revocation"},relatedResource:c?.includeRelatedResource?[{id:e.subjectDataUri,digestMultibase:`mEi${dn(e.subjectDataHash)}`}]:void 0,proof:{type:"DataIntegrityProof",created:new Date(e.issuedAt*1e3).toISOString(),verificationMethod:x,cryptosuite:"eddsa-rdfc-2022",proofPurpose:"assertionMethod",proofValue:dn(e.signature)}}}static buildAgentIdentitySubject(e){return e}issueX402AgentCredential(e){let t=Math.floor(Date.now()/1e3),o={agentId:e.agentId,owner:e.owner,name:e.name,capabilities:e.capabilities||[],serviceEndpoint:e.serviceEndpoint,frameworkOrigin:e.frameworkOrigin,x402Enabled:true,x402PaymentAddress:e.x402PaymentAddress,x402AcceptedTokens:e.x402AcceptedTokens,x402PricePerCall:e.x402PricePerCall,registeredAt:t,verifiedAt:t,type:"external-x402-agent",verificationResponseTimeMs:e.verificationResponseTimeMs},r=this.generateCredentialId("AgentIdentity",e.agentAddress),c=this.hashSubjectData(o),i={template:"x402-agent-identity-template",subject:e.agentAddress,issuer:this.programId,credentialId:r,subjectDataHash:c,subjectDataUri:`data:application/json;base64,${Buffer.from(JSON.stringify(o)).toString("base64")}`,status:"Active",signature:c,issuedAt:t},d={authority:this.programId,name:"x402 Agent Identity",kind:"AgentIdentity",schemaUri:"https://ghostspeak.io/schemas/x402-agent-identity-v1.json",description:"Verifiable credential for x402-compatible AI agents registered with GhostSpeak",isActive:true,totalIssued:1,createdAt:t},s={credentialType:d.authority,name:"x402 Agent Identity",imageUri:"https://ghostspeak.io/assets/credential-badge-x402.png",issuer:this.programId,isActive:true,totalIssued:1,createdAt:t},p=this.exportAsW3CCredential(i,s,d,o,{network:e.network||"devnet",includeRelatedResource:true});return {credentialId:r,credential:i,w3cCredential:p,subjectData:o}}exportCredentialToJSON(e,t,o){let r={credentialType:"x402-agent",name:e.credentialId.includes("agentidentity")?"Agent Identity":"Custom",imageUri:"https://ghostspeak.io/assets/credential-badge.png",issuer:e.issuer,isActive:true,totalIssued:1,createdAt:e.issuedAt},c={authority:e.issuer,name:"GhostSpeak Credential",kind:"AgentIdentity",schemaUri:"https://ghostspeak.io/schemas/credential-v1.json",description:"GhostSpeak verifiable credential",isActive:true,totalIssued:1,createdAt:e.issuedAt},i=this.exportAsW3CCredential(e,r,c,t,{network:o?.network||"devnet",includeRelatedResource:true});return o?.pretty?JSON.stringify(i,null,2):JSON.stringify(i)}};var Fu=class{constructor(e){this.config=e;this.credentialModule=new un(e.programId),e.crossmint&&(this.crossmintClient=new _u(e.crossmint));}credentialModule;crossmintClient;async issueAgentIdentityCredential(e){let t=un.buildAgentIdentitySubject({agentId:e.agentId,owner:e.owner,name:e.name,capabilities:e.capabilities,serviceEndpoint:e.serviceEndpoint,frameworkOrigin:e.frameworkOrigin,x402Enabled:e.x402Enabled,registeredAt:e.registeredAt,verifiedAt:e.verifiedAt}),o=this.credentialModule.generateCredentialId("AgentIdentity",e.owner),r=this.credentialModule.hashSubjectData(t),c={template:"11111111111111111111111111111111",subject:e.owner,issuer:e.owner,credentialId:o,subjectDataHash:r,subjectDataUri:`ipfs://placeholder/${o}`,status:"Active",signature:e.signature,issuedAt:Math.floor(Date.now()/1e3),expiresAt:void 0,revokedAt:void 0,crossmintCredentialId:void 0},i={authority:"11111111111111111111111111111111",name:"AgentIdentity",kind:"AgentIdentity",schemaUri:"https://ghostspeak.io/schemas/agent-identity.json",description:"Verified AI agent identity on GhostSpeak Protocol",isActive:true,totalIssued:1,createdAt:Math.floor(Date.now()/1e3)},d={credentialType:"11111111111111111111111111111111",name:"GhostSpeak Agent Identity",imageUri:"https://www.ghostspeak.io/assets/credential-agent.png",issuer:e.owner,isActive:true,totalIssued:1,createdAt:Math.floor(Date.now()/1e3),crossmintTemplateId:this.config.crossmintTemplates?.agentIdentity},s=this.credentialModule.exportAsW3CCredential(c,d,i,t),p={solanaCredential:{credentialId:o},w3cCredential:s};if(e.syncToCrossmint&&this.crossmintClient&&e.recipientEmail)if(!d.crossmintTemplateId)p.crossmintSync={status:"failed",error:"No template ID configured"};else try{let E=await this.crossmintClient.issueCredential(d.crossmintTemplateId,e.recipientEmail,t);p.crossmintSync={status:"synced",credentialId:E.credentialId,chain:this.config.crossmint?.chain};}catch(E){p.crossmintSync={status:"failed",error:E instanceof Error?E.message:"Unknown error"};}return p}};var v={MAX_REPUTATION_SCORE:1e4,MIN_REPUTATION_FOR_SLASH:1e3,REPUTATION_DECAY_RATE_BPS:10,BRONZE_TIER_THRESHOLD:2e3,SILVER_TIER_THRESHOLD:5e3,GOLD_TIER_THRESHOLD:7500,PLATINUM_TIER_THRESHOLD:9e3,MAX_REPUTATION_CATEGORIES:10};var Gu=class{fraudPatterns=[];constructor(){this.initializeFraudPatterns();}initializeFraudPatterns(){this.fraudPatterns=[{patternId:"sudden_spike",description:"Sudden spike in reputation without corresponding activity",riskScore:80,detect:e=>{if(e.performanceHistory.length<2)return false;let t=e.performanceHistory[e.performanceHistory.length-1],o=e.performanceHistory[e.performanceHistory.length-2];return t.score-o.score>2e3&&t.jobsCompleted===o.jobsCompleted}},{patternId:"perfect_scores_only",description:"All jobs have perfect scores (potential manipulation)",riskScore:60,detect:e=>{let t=e.performanceHistory.slice(-10);return t.length>=5&&t.every(o=>o.avgQuality===100)}},{patternId:"rapid_category_switching",description:"Rapid switching between unrelated categories",riskScore:40,detect:e=>{if(e.categoryReputations.length<5)return false;let t=e.categoryReputations.sort((r,c)=>c.lastActivity-r.lastActivity).slice(0,5);return (Date.now()-t[4].lastActivity)/(1e3*60*60*24)<7}},{patternId:"dispute_pattern",description:"High dispute rate with suspicious resolution pattern",riskScore:70,detect:e=>{if(e.totalJobsCompleted<10)return false;let t=e.disputesAgainst/e.totalJobsCompleted,o=e.disputesResolved/Math.max(1,e.disputesAgainst);return t>.3&&o>.9}},{patternId:"time_manipulation",description:"Completion times significantly below expected",riskScore:50,detect:(e,t)=>t.actualDuration<t.expectedDuration*.1}];}calculateReputation(e,t){let o=this.applyTimeDecay(e),r=this.calculateWeightedScore(o.factors,t),c=this.updateCategoryReputation(o.categoryReputations,t,r),i=this.calculateOverallScore(c.categories),d=this.getTierFromScore(i),s=this.checkBadgeAchievements(o,t,i),p=this.detectFraud(o,t);return {overallScore:i,jobScore:r,categoryScore:c.categoryScore,tier:d,newBadges:s,fraudDetected:p.detected,fraudRiskScore:p.riskScore}}applyTimeDecay(e){let t=Date.now()/1e3,o=(t-e.lastUpdated)/86400;if(o<=0)return e;let r=v.REPUTATION_DECAY_RATE_BPS*o,c=Math.max(0,1e4-r)/1e4,i=Math.floor(e.overallScore*c),d=e.categoryReputations.map(s=>{let p=(t-s.lastActivity)/86400,E=v.REPUTATION_DECAY_RATE_BPS*p,b=Math.max(0,1e4-E)/1e4;return {...s,score:Math.floor(s.score*b)}});return {...e,overallScore:i,categoryReputations:d}}calculateWeightedScore(e,t){if(e.completionWeight+e.qualityWeight+e.timelinessWeight+e.satisfactionWeight+e.disputeWeight!==100)throw new Error("Reputation factors must sum to 100");let r=t.completed?v.MAX_REPUTATION_SCORE:0,c=t.qualityRating*v.MAX_REPUTATION_SCORE/100,i=this.calculateTimelinessScore(t.expectedDuration,t.actualDuration),d=t.clientSatisfaction*v.MAX_REPUTATION_SCORE/100,s=this.calculateDisputeScore(t),p=(r*e.completionWeight+c*e.qualityWeight+i*e.timelinessWeight+d*e.satisfactionWeight+s*e.disputeWeight)/100;return Math.min(p,v.MAX_REPUTATION_SCORE)}calculateTimelinessScore(e,t){if(t<=e)return v.MAX_REPUTATION_SCORE;let o=(t-e)*1e4/e;return o>5e3?0:v.MAX_REPUTATION_SCORE-v.MAX_REPUTATION_SCORE*o/1e4}calculateDisputeScore(e){return e.hadDispute?e.disputeResolvedFavorably?v.MAX_REPUTATION_SCORE/2:0:v.MAX_REPUTATION_SCORE}updateCategoryReputation(e,t,o){let r=e.findIndex(c=>c.category===t.category);if(r!==-1){let c=e[r],i={...c,completedJobs:c.completedJobs+1,qualitySum:c.qualitySum+t.qualityRating,qualityCount:c.qualityCount+1,totalEarnings:c.totalEarnings+t.paymentAmount,lastActivity:Date.now()/1e3,score:Math.floor((c.score*7+o*3)/10),avgCompletionTime:Math.floor((c.avgCompletionTime*c.completedJobs+t.actualDuration)/(c.completedJobs+1))},d=[...e];return d[r]=i,{categories:d,categoryScore:i.score}}else {if(e.length>=v.MAX_REPUTATION_CATEGORIES)throw new Error("Maximum reputation categories reached");let c={category:t.category,score:o,completedJobs:1,avgCompletionTime:t.actualDuration,qualitySum:t.qualityRating,qualityCount:1,lastActivity:Date.now()/1e3,totalEarnings:t.paymentAmount};return {categories:[...e,c],categoryScore:o}}}calculateOverallScore(e){if(e.length===0)return 5e3;let t=0,o=0;for(let r of e){let c=r.completedJobs;t+=r.score*c,o+=c;}return o>0?Math.floor(t/o):5e3}getTierFromScore(e){return e>=v.PLATINUM_TIER_THRESHOLD?"Platinum":e>=v.GOLD_TIER_THRESHOLD?"Gold":e>=v.SILVER_TIER_THRESHOLD?"Silver":e>=v.BRONZE_TIER_THRESHOLD?"Bronze":"None"}checkBadgeAchievements(e,t,o){let r=[],c=new Set(e.badges.map(d=>d.badgeType)),i=e.totalJobsCompleted+(t.completed?1:0);return !c.has("FirstJob")&&i>=1&&r.push("FirstJob"),!c.has("TenJobs")&&i>=10&&r.push("TenJobs"),!c.has("HundredJobs")&&i>=100&&r.push("HundredJobs"),!c.has("ThousandJobs")&&i>=1e3&&r.push("ThousandJobs"),!c.has("PerfectRating")&&o>=9500&&r.push("PerfectRating"),!c.has("QuickResponder")&&e.avgResponseTime>0&&e.avgResponseTime<3600&&r.push("QuickResponder"),!c.has("DisputeResolver")&&e.disputesResolved>=5&&r.push("DisputeResolver"),c.has("CategoryExpert")||e.categoryReputations.some(s=>s.score>=9e3)&&r.push("CategoryExpert"),!c.has("CrossCategoryMaster")&&e.categoryReputations.length>=5&&r.push("CrossCategoryMaster"),r}detectFraud(e,t){let o=0,r=[];for(let i of this.fraudPatterns)i.detect(e,t)&&(o+=i.riskScore,r.push(i.patternId));let c=Math.min(100,o);return {detected:c>=50,riskScore:c,patterns:r}}createPerformanceSnapshot(e,t){let o=e.categoryReputations.length>0?e.categoryReputations.reduce((r,c)=>r+(c.qualityCount>0?c.qualitySum/c.qualityCount:0),0)/e.categoryReputations.length:0;return {timestamp:Date.now()/1e3,score:t,jobsCompleted:e.totalJobsCompleted,avgQuality:Math.floor(o)}}calculateSlashAmount(e,t){if(t>5e3)throw new Error("Slash percentage cannot exceed 50%");if(e<v.MIN_REPUTATION_FOR_SLASH)throw new Error("Reputation too low to slash");let o=Math.floor(e*t/1e4);return {newScore:Math.max(0,e-o),slashAmount:o}}calculateStakingBonus(e){return Math.min(500,Math.floor(e/1e3))}};xf();var Wu=class extends U{calculator;tagEngine;constructor(e){super(e),this.calculator=new Gu,this.tagEngine=new gn;}calculateReputationChange(e,t){return this.calculator.calculateReputation(e,t)}getTierName(e){switch(e){case "None":return "Unranked";case "Bronze":return "Bronze";case "Silver":return "Silver";case "Gold":return "Gold";case "Platinum":return "Platinum";default:return "Unknown"}}getTierFromScore(e){return e>=v.PLATINUM_TIER_THRESHOLD?"Platinum":e>=v.GOLD_TIER_THRESHOLD?"Gold":e>=v.SILVER_TIER_THRESHOLD?"Silver":e>=v.BRONZE_TIER_THRESHOLD?"Bronze":"None"}getBadgeName(e){switch(e){case "FirstJob":return "First Job";case "TenJobs":return "10 Jobs";case "HundredJobs":return "100 Jobs";case "ThousandJobs":return "1000 Jobs";case "PerfectRating":return "Perfect Rating";case "QuickResponder":return "Quick Responder";case "DisputeResolver":return "Dispute Resolver";case "CategoryExpert":return "Category Expert";case "CrossCategoryMaster":return "Cross-Category Master";default:return "Unknown Badge"}}calculateApyBoost(e){return Math.floor(e/1e3)*50}getTierColor(e){switch(e){case "Platinum":return "#E5E4E2";case "Gold":return "#FFD700";case "Silver":return "#C0C0C0";case "Bronze":return "#CD7F32";default:return "#808080"}}createDefaultReputationData(e){return {agent:e,overallScore:5e3,totalJobsCompleted:0,totalJobsFailed:0,avgResponseTime:0,disputesAgainst:0,disputesResolved:0,lastUpdated:Math.floor(Date.now()/1e3),categoryReputations:[],badges:[],performanceHistory:[],factors:{completionWeight:25,qualityWeight:25,timelinessWeight:20,satisfactionWeight:20,disputeWeight:10}}}qualifiesForTier(e,t){switch(t){case "Platinum":return e>=v.PLATINUM_TIER_THRESHOLD;case "Gold":return e>=v.GOLD_TIER_THRESHOLD;case "Silver":return e>=v.SILVER_TIER_THRESHOLD;case "Bronze":return e>=v.BRONZE_TIER_THRESHOLD;default:return true}}pointsToNextTier(e){switch(this.getTierFromScore(e)){case "None":return {nextTier:"Bronze",pointsNeeded:v.BRONZE_TIER_THRESHOLD-e};case "Bronze":return {nextTier:"Silver",pointsNeeded:v.SILVER_TIER_THRESHOLD-e};case "Silver":return {nextTier:"Gold",pointsNeeded:v.GOLD_TIER_THRESHOLD-e};case "Gold":return {nextTier:"Platinum",pointsNeeded:v.PLATINUM_TIER_THRESHOLD-e};case "Platinum":return null;default:return null}}recordPayAIPayment(e,t){let o=this.payAIRecordToJobPerformance(e);return this.calculateReputationChange(t,o)}payAIRecordToJobPerformance(e){let t=this.estimateQualityFromResponseTime(e.responseTimeMs),o=this.estimateExpectedDuration(e.amount);return {completed:e.success,qualityRating:t,expectedDuration:o,actualDuration:Math.ceil(e.responseTimeMs/1e3),clientSatisfaction:e.success?t:20,hadDispute:false,disputeResolvedFavorably:false,category:this.categorizeFromNetwork(e.network),paymentAmount:Number(e.amount)/1e6}}estimateQualityFromResponseTime(e){return e<=500?100:e<=2e3?Math.round(90-(e-500)/1500*20):e<=1e4?Math.round(70-(e-2e3)/8e3*30):Math.max(20,Math.round(40-(e-1e4)/5e4*20))}estimateExpectedDuration(e){let t=Number(e)/1e6;return Math.max(2,Math.ceil(2+t*10))}categorizeFromNetwork(e){switch(e){case "solana":return "ai-services-solana";case "base":return "ai-services-base";case "ethereum":return "ai-services-ethereum";default:return "ai-services"}}createPayAIPerformanceSnapshot(e,t){return {timestamp:e.timestamp.getTime(),paymentId:e.paymentSignature,network:e.network,amount:e.amount.toString(),success:e.success,responseTimeMs:e.responseTimeMs,reputationChange:t.jobScore,newScore:t.overallScore,tier:t.tier}}async calculateTagsForAgent(e){return this.tagEngine.calculateTags(e)}getTagsByCategory(e,t){return this.tagEngine.filterTags(e,{category:t})}hasTag(e,t){return e.some(o=>o.tagName===t)}getTagConfidence(e,t){return e.find(r=>r.tagName===t)?.confidence}filterTags(e,t){return this.tagEngine.filterTags(e,t)}applyTagDecay(e,t){return this.tagEngine.applyTagDecay(e,t)}mergeTags(e,t){return this.tagEngine.mergeTags(e,t)}categorizeTags(e){return this.tagEngine.categorizeTags(e)}getTopTags(e,t){return this.tagEngine.getTopTags(e,t)}sortTagsByConfidence(e){return this.tagEngine.sortByConfidence(e)}sortTagsByEvidence(e){return this.tagEngine.sortByEvidence(e)}sortTagsByRecent(e){return this.tagEngine.sortByRecent(e)}getConfidenceLevel(e){return this.tagEngine.getConfidenceLevel(e)}validateTagName(e){return this.tagEngine.validateTagName(e)}validateConfidence(e){return this.tagEngine.validateConfidence(e)}convertMetricsForTagging(e){let t=e.responseTimeCount>0n?Number(e.totalResponseTime/e.responseTimeCount):0,o=e.successfulPayments+e.failedPayments,r=o>0n?Number(e.successfulPayments*10000n/o):0,c=e.totalRatingsCount>0?Math.floor(e.totalRating*100/(e.totalRatingsCount*5)):0,i=e.totalDisputes>0?Math.floor(e.disputesResolved*1e4/e.totalDisputes):1e4;return {successfulPayments:e.successfulPayments,failedPayments:e.failedPayments,totalResponseTime:e.totalResponseTime,responseTimeCount:e.responseTimeCount,totalDisputes:e.totalDisputes,disputesResolved:e.disputesResolved,totalRating:e.totalRating,totalRatingsCount:e.totalRatingsCount,createdAt:e.createdAt,updatedAt:e.updatedAt,avgResponseTime:t,successRate:r,avgRating:c,disputeResolutionRate:i}}};var Nu=class extends U{constructor(e){super(e);}async create(e,t){let o=t.network||"devnet",r=he(o,t.controller);Ou(r);let[c]=await zu(this.programId,t.controller),i=async()=>this.buildCreateDidInstruction(c,t.controller,r,t.verificationMethods||[],t.serviceEndpoints||[]);return this.execute("createDidDocument",i,[e])}async update(e,t){let o=async()=>this.buildUpdateDidInstruction(t.didDocument,e.address,t.addVerificationMethod||null,t.removeVerificationMethodId||null,t.addServiceEndpoint||null,t.removeServiceEndpointId||null);return this.execute("updateDidDocument",o,[e])}async deactivate(e,t){let o=async()=>this.buildDeactivateDidInstruction(t.didDocument,e.address);return this.execute("deactivateDidDocument",o,[e])}async resolve(e){let t;if(typeof e=="string"&&e.startsWith("did:sol:")){let{identifier:r}=o0(e);t=address(r);}else t=typeof e=="string"?address(e):e;let[o]=await zu(this.programId,t);return this.getAccount(o,"getDidDocumentDecoder")}async exportW3C(e,t=true){let o=await this.resolve(e);return o?a0(o,t):null}async getW3CDocument(e){let t=await this.resolve(e);return t?Sf(t):null}async deriveDidPda(e){return zu(this.programId,e)}generateDid(e,t="devnet"){return he(t,e)}validateDid(e){return Ou(e),true}async isActive(e){let t=await this.resolve(e);return t?s0(t):false}buildCreateDidInstruction(e,t,o,r,c){throw new Error("DID instructions are not yet generated. Please run: bun run generate:client after adding DID instructions to the program.")}buildUpdateDidInstruction(e,t,o,r,c,i){throw new Error("DID instructions are not yet generated. Please run: bun run generate:client after adding DID instructions to the program.")}buildDeactivateDidInstruction(e,t){throw new Error("DID instructions are not yet generated. Please run: bun run generate:client after adding DID instructions to the program.")}static createVerificationMethod=i0;static createServiceEndpoint=c0};function A0(n,e,t){if(t||e==="Public")return {exactScore:n,tier:An(n),scoreRange:pn(n)};switch(e){case "TierOnly":return {tier:An(n)};case "RangeOnly":return {scoreRange:pn(n)};case "Confidential":return {};case "Custom":return {tier:An(n),scoreRange:pn(n)};default:return {}}}function An(n){return n>=De.TIER_THRESHOLDS.PLATINUM?"Platinum":n>=De.TIER_THRESHOLDS.GOLD?"Gold":n>=De.TIER_THRESHOLDS.SILVER?"Silver":n>=De.TIER_THRESHOLDS.BRONZE?"Bronze":"None"}function pn(n){let e=De.SCORE_RANGES;return n>=e.VERY_HIGH.min?"VeryHigh":n>=e.HIGH.min?"High":n>=e.MEDIUM.min?"Medium":n>=e.LOW.min?"Low":"VeryLow"}function p0(n,e,t){return n===t?true:e.authorizedViewers.includes(n)}function l0(n,e,t){let o={agent:n.agent},r=c=>t||c==="Public";if(r(e.showScore)&&(o.exactScore=n.overallScore),r(e.showJobsCompleted)&&(o.totalJobsCompleted=n.totalJobsCompleted),r(e.showSuccessRate)){let c=n.totalJobsCompleted+n.totalJobsFailed;o.successRate=c>0?n.totalJobsCompleted/c*100:0;}return r(e.showResponseTime)&&(o.avgResponseTime=n.avgResponseTime),r(e.showDisputes)&&(o.disputes={total:n.disputesAgainst,resolved:n.disputesResolved}),r(e.showEarnings)&&n.totalEarnings!==void 0&&(o.totalEarnings=n.totalEarnings),r(e.showRatings)&&n.avgRating!==void 0&&(o.avgRating=n.avgRating),r(e.showBadges)&&n.badges!==void 0&&(o.badges=n.badges),o.hasFullAccess=t,o}function ln(n){switch(n){case "Public":return {showScore:"Public",showJobsCompleted:"Public",showSuccessRate:"Public",showResponseTime:"Public",showDisputes:"Public",showEarnings:"Public",showRatings:"Public",showBadges:"Public"};case "TierOnly":case "RangeOnly":return {showScore:"Private",showJobsCompleted:"Private",showSuccessRate:"Private",showResponseTime:"Private",showDisputes:"Private",showEarnings:"Private",showRatings:"Private",showBadges:"Public"};case "Confidential":return {showScore:"ZKProof",showJobsCompleted:"ZKProof",showSuccessRate:"ZKProof",showResponseTime:"ZKProof",showDisputes:"ZKProof",showEarnings:"ZKProof",showRatings:"ZKProof",showBadges:"ZKProof"};case "Custom":default:return {showScore:"Private",showJobsCompleted:"Public",showSuccessRate:"Public",showResponseTime:"Public",showDisputes:"Private",showEarnings:"Private",showRatings:"Public",showBadges:"Public"}}}function m0(n){let e=[];return n.authorizedViewers.length>De.MAX_AUTHORIZED_VIEWERS&&e.push(`Too many authorized viewers (max: ${De.MAX_AUTHORIZED_VIEWERS})`),n.mode==="Public"&&Object.values(n.metricVisibility).some(o=>o!=="Public")&&e.push("Public mode cannot have private metrics"),{valid:e.length===0,errors:e}}var Bu=class extends U{constructor(e){super(e);}async initializePrivacy(e,t){let o=t.mode??"Public";t.metricVisibility??ln(o);let c=async()=>({programAddress:this.programId,accounts:[],data:new Uint8Array([0])});return this.execute("initializePrivacy",c,[e])}async updatePrivacyMode(e,t){let o=async()=>({programAddress:this.programId,accounts:[],data:new Uint8Array([1])});return this.execute("updatePrivacyMode",o,[e])}async setMetricVisibility(e,t){let o=async()=>({programAddress:this.programId,accounts:[],data:new Uint8Array([2])});return this.execute("setMetricVisibility",o,[e])}async grantAccess(e,t){let o=async()=>({programAddress:this.programId,accounts:[],data:new Uint8Array([3])});return this.execute("grantAccess",o,[e])}async revokeAccess(e,t){let o=async()=>({programAddress:this.programId,accounts:[],data:new Uint8Array([4])});return this.execute("revokeAccess",o,[e])}async applyPreset(e,t){let{preset:o}=t;return await this.updatePrivacyMode(e,{agentAddress:t.agentAddress,mode:o.mode}),this.setMetricVisibility(e,{agentAddress:t.agentAddress,metricVisibility:o.metricVisibility})}async getPrivacySettings(e){return {agent:e,mode:"Public",metricVisibility:ln("Public"),authorizedViewers:[],autoGrantClients:false,updatedAt:Math.floor(Date.now()/1e3)}}async getVisibleReputation(e,t){let o=await this.getPrivacySettings(e);o||(o={agent:e,mode:"Public",metricVisibility:ln("Public"),authorizedViewers:[],autoGrantClients:false,updatedAt:Math.floor(Date.now()/1e3)});let r=p0(t,o,e),c={agent:e,overallScore:7500,totalJobsCompleted:100,totalJobsFailed:5,avgResponseTime:250,disputesAgainst:2,disputesResolved:2,totalEarnings:5e4,avgRating:4.5,badges:["FirstJob","TenJobs","QuickResponder"]},i=A0(c.overallScore,o.mode,r);return {...l0(c,o.metricVisibility,r),privacyMode:o.mode,...i,hasFullAccess:r}}validateSettings(e){return m0(e)}getAvailablePresets(){return cf}getDefaultVisibility(e){return ln(e)}getTier(e){return An(e)}getRange(e){return pn(e)}async derivePrivacyPda(e){let{getProgramDerivedAddress:t,getAddressEncoder:o}=await import('@solana/addresses'),c=o().encode(e),[i]=await t({programAddress:this.programId,seeds:[new TextEncoder().encode("privacy_settings"),c]});return i}};var lye="GhostSpeak Reputation Authorization";function y0(n){let e=[];e.push(Buffer.from(lye,"utf8"));let t=Tt.decode(n.agentAddress);e.push(Buffer.from(t));let o=Tt.decode(n.authorizedSource);e.push(Buffer.from(o));let r=Buffer.allocUnsafe(8);r.writeBigUInt64BE(BigInt(n.indexLimit)),e.push(r);let c=Buffer.allocUnsafe(8);return c.writeBigUInt64BE(BigInt(n.expiresAt)),e.push(c),e.push(Buffer.from(n.network,"utf8")),n.nonce&&e.push(Buffer.from(n.nonce,"utf8")),Buffer.concat(e)}async function mye(n,e){let t=e.publicKey.toBase58();if(t!==n.agentAddress)throw new Error(`Keypair public key ${t} does not match agent address ${n.agentAddress}`);let o=y0(n);return (await import('tweetnacl')).sign.detached(o,e.secretKey)}async function T0(n){try{let e={agentAddress:n.agentAddress,authorizedSource:n.authorizedSource,indexLimit:n.indexLimit,expiresAt:n.expiresAt,network:n.network,nonce:n.nonce},t=y0(e),o=await import('tweetnacl'),r=Tt.decode(n.agentAddress);return o.sign.detached.verify(t,n.signature,r)}catch(e){return console.error("[Auth Signature] Verification failed:",e),false}}async function f0(n,e){let t=address(e.publicKey.toBase58()),o=Math.floor(Date.now()/1e3),r=n.expiresAt||o+(n.expiresIn||720*60*60),c=n.indexLimit||1e3,i=n.network||"devnet",d=n.nonce!==void 0?n.nonce:"default",s={agentAddress:t,authorizedSource:n.authorizedSource,indexLimit:c,expiresAt:r,network:i,nonce:d},p=await mye(s,e);return {agentAddress:t,authorizedSource:n.authorizedSource,indexLimit:c,expiresAt:r,network:i,signature:p,nonce:d,metadata:n.metadata}}function Df(n){return {agentAddress:n.agentAddress,authorizedSource:n.authorizedSource,indexLimit:n.indexLimit,expiresAt:n.expiresAt,network:n.network,signature:Tt.encode(n.signature),nonce:n.nonce,metadata:n.metadata}}function S0(n){return {agentAddress:n.agentAddress,authorizedSource:n.authorizedSource,indexLimit:n.indexLimit,expiresAt:n.expiresAt,network:n.network,signature:Tt.decode(n.signature),nonce:n.nonce,metadata:n.metadata}}async function x0(authorization){let serialized=Df(authorization),json=JSON.stringify(serialized),encoder=new TextEncoder,data=encoder.encode(json),crypto;if(globalThis.crypto)crypto=globalThis.crypto;else {let nodeCrypto=eval("require")("crypto");crypto=nodeCrypto.webcrypto;}let hashBuffer=await crypto.subtle.digest("SHA-256",data),hashArray=new Uint8Array(hashBuffer);return Tt.encode(hashArray)}function D0(n,e){return (e||Math.floor(Date.now()/1e3))>=n.expiresAt}function h0(n,e){return e>=n.indexLimit}var yye=2000000n,Lu=class extends U{constructor(e){super(e);}async createAuthorization(e,t){return await f0(e,t)}async storeAuthorizationOnChain(e,t,o){let r=this.calculateStorageFee(e,o),c=o?.feePayedByAgent??true;console.log(`\u{1F4B0} On-chain storage cost: ${Number(r)/1e9} SOL`),console.log(` Fee payer: ${c?"Agent":"Facilitator"}`);let{getCreateAgentAuthorizationInstructionAsync:i}=await Promise.resolve().then(()=>(Gm(),WM)),{getProgramDerivedAddress:d,getBytesEncoder:s,getAddressEncoder:p,getUtf8Encoder:E}=await import('@solana/kit'),b=e.nonce??"default",[x]=await d({programAddress:this.getProgramId(),seeds:[s().encode(new Uint8Array([97,103,101,110,116,95,97,117,116,104])),p().encode(e.agentAddress),p().encode(e.authorizedSource),E().encode(b)]});return await this.execute("createAgentAuthorization",async()=>await i({agent:e.agentAddress,authorization:x,authority:t,authorizedSource:e.authorizedSource,indexLimit:BigInt(e.indexLimit),expiresAt:BigInt(e.expiresAt),network:e.network==="mainnet-beta"?0:e.network==="devnet"?1:2,signature:e.signature,nonce:b}),[t])}async verifySignature(e){return T0(e)}getAuthorizationStatus(e,t){let o=Math.floor(Date.now()/1e3),r=t??0;return D0(e,o)?{status:"expired",isValid:false,remainingUses:0,reason:"Authorization has expired"}:h0(e,r)?{status:"exhausted",isValid:false,remainingUses:0,reason:"Index limit reached"}:{status:"active",isValid:true,remainingUses:e.indexLimit-r}}async fetchAuthorization(e,t,o){throw new Error("On-chain fetch not yet implemented - pending Codama generation")}async updateReputationWithAuth(e,t,o,r,c,i){if(!await this.verifySignature(e))throw new Error("Invalid authorization signature");let s=this.getAuthorizationStatus(e);if(!s.isValid)throw new Error(`Authorization is ${s.status}: ${s.reason}`);let{getUpdateReputationWithAuthInstructionAsync:p}=await Promise.resolve().then(()=>(VT(),zU));return await this.execute("updateReputationWithAuth",async()=>await p({agent:e.agentAddress,authorizedSource:i,usageRecord:r,reputationChange:BigInt(t),transactionSignature:o,metadata:c?JSON.stringify(c):null,nonce:e.nonce??null}),[i])}async revokeAuthorization(e,t,o,r){let{getRevokeAuthorizationInstruction:c}=await Promise.resolve().then(()=>(My(),Uw));return await this.execute("revokeAuthorization",()=>c({agent:e,authorization:t,authority:r,nonce:o??null}),[r])}async listAuthorizations(e){throw new Error("Authorization listing not yet implemented - pending Codama generation")}serializeAuthorization(e){return Df(e)}deserializeAuthorization(e){return S0(e)}async getAuthorizationId(e){return x0(e)}async createPayAIAuthorization(e,t,o){let r={authorizedSource:e,indexLimit:1e3,expiresIn:2592e3,network:"devnet",...o};return this.createAuthorization(r,t)}calculateStorageFee(e,t){if(t?.storageFee!==void 0)return t.storageFee;if(t?.customFees){let o=Math.floor(Date.now()/1e3),r=e.expiresAt-o,c=Object.keys(t.customFees).map(Number).sort((d,s)=>d-s);for(let d of c)if(r<=d)return t.customFees[d];let i=c[c.length-1];if(i&&t.customFees[i])return t.customFees[i]}return yye}async estimateStorageCost(e,t){let o=Math.floor(Date.now()/1e3),r={agentAddress:"11111111111111111111111111111111",authorizedSource:e.authorizedSource,indexLimit:e.indexLimit??1e3,expiresAt:e.expiresAt??o+(e.expiresIn??720*60*60),network:e.network??"devnet",signature:new Uint8Array(64),nonce:e.nonce},c=this.calculateStorageFee(r,t);return Number(c)/1e9}};te();var Vu=class extends U{async initializeStakingConfig(e){let t=await X1({authority:e.authority,minStake:e.minStake,treasury:e.treasury},{programAddress:this.programId});return this.execute("initializeStakingConfig",()=>t,[e.authority])}async stake(e){let t=await Ny({ownerTokenAccount:e.agentTokenAccount,stakingVault:e.stakingVault,stakingConfig:e.stakingConfig,ghostMint:e.ghostMint,owner:e.agentOwner,amount:e.amount,lockDuration:e.lockDuration},{programAddress:this.programId});return this.execute("stakeGhost",()=>t,[e.agentOwner])}async unstake(e){let t=await Qy({stakingAccount:e.stakingAccount,stakingVault:e.stakingVault,ownerTokenAccount:e.agentTokenAccount,owner:e.agentOwner},{programAddress:this.programId});return this.execute("unstakeGhost",()=>t,[e.agentOwner])}async getStakingAccount(e){try{return await this.getAccount(e,"getStakingAccountDecoder")}catch(t){return console.error("Error fetching staking account:",t),null}}async getStakingConfig(e){try{return await this.getAccount(e,"getStakingConfigDecoder")}catch(t){return console.error("Error fetching staking config:",t),null}}};Jg();var Ef=class{config;constructor(e){this.config={programId:u,commitment:"confirmed",cluster:"devnet",rpcEndpoint:e?.rpcEndpoint??this.getDefaultRpcEndpoint(e?.cluster??"devnet"),...e,rpc:e?.rpc??{}};}get agents(){return new rn(this.config)}get ghosts(){return new Uu(this.config)}get governanceModule(){return new sn(this.config)}get multisigModule(){return new an(this.config)}agent(){return new Pf(this.config)}reputation(){return new Wu(this.config)}tagEngine(){let{ReputationTagEngine:e}=(xf(),Of(u0));return new e}reputationAggregator(){let{MultiSourceAggregator:e}=(P0(),Of(E0));return new e}privacy(){return new Bu(this.config)}governance(){return new Cf(this.config)}multisig(){return new If(this.config)}credentials(){return new Fu({programId:this.config.programId,crossmint:this.config.credentials?.crossmintApiKey?{apiKey:this.config.credentials.crossmintApiKey,environment:this.config.credentials.crossmintEnvironment,chain:this.config.credentials.crossmintChain}:void 0,crossmintTemplates:this.config.credentials?.templates})}did(){return new Nu(this.config)}get authorization(){return new Lu(this.config)}get staking(){return new Vu(this.config)}enableDevMode(){return console.log("\u{1F6E0}\uFE0F Development mode enabled"),console.log(" - Transaction simulation before sending"),console.log(" - Cost estimates for all operations"),console.log(" - Enhanced error messages"),this.config={...this.config},this}useNetwork(e){return this.config.cluster=e,this.config.rpcEndpoint=this.getDefaultRpcEndpoint(e),this}useRpc(e,t){return this.config.rpcEndpoint=e,this.config.wsEndpoint=t,this}getDefaultRpcEndpoint(e){switch(e){case "mainnet-beta":return "https://api.mainnet-beta.solana.com";case "devnet":return "https://api.devnet.solana.com";case "testnet":return "https://api.testnet.solana.com";case "localnet":return "http://localhost:8899";default:return "https://api.devnet.solana.com"}}},Pf=class{module;params={};constructor(e){this.module=new rn(e);}create(e){return this.params={...this.params,agentType:0,metadataUri:JSON.stringify(e),agentId:e.name.toLowerCase().replace(/\s+/g,"-"),name:e.name,description:e.description||""},this}withDescription(e){return this.params.description=e,this}withType(e){return this.params.agentType=e,this}withIPFS(){return this.params.forceIPFS=true,this}compressed(){return this.params.compressed=true,this}debug(){return this.module.debug(),this}withSigner(e){return this.params.signer=e,this}validateParams(){if(!this.params.signer)throw new Error("Agent builder requires a signer. Call with signer first.");if(!this.params.metadataUri)throw new Error("Agent builder requires metadata. Call create() first.");if(!this.params.agentId)throw new Error("Agent builder requires agent ID. Call create() first.");this.params.agentType??=0;}async getCost(){return this.validateParams(),this.module.getCost("registerAgent",()=>({programAddress:this.module.getProgramId(),accounts:[],data:new Uint8Array}))}async simulate(){let e=()=>({programAddress:this.module.getProgramId(),accounts:[],data:new Uint8Array});return this.validateParams(),this.module.simulateInstruction("registerAgent",e,[this.params.signer])}async explain(){return this.validateParams(),this.module.explain("registerAgent",()=>({programAddress:this.module.getProgramId(),accounts:[],data:new Uint8Array}))}async execute(){this.validateParams(),this.params.compressed&&console.log("Creating compressed agent (5000x cheaper)...");let e=await this.module.register(this.params.signer,{agentType:this.params.agentType,name:this.params.name,description:this.params.description,metadataUri:this.params.metadataUri,agentId:this.params.agentId});return {address:await this.deriveAgentAddress(this.params.agentId,this.params.signer),signature:e}}async deriveAgentAddress(e,t){let{deriveAgentPda:o}=await Promise.resolve().then(()=>(Mu(),vu)),[r]=await o({programAddress:this.module.getProgramId(),owner:t.address,agentId:e});return r}},Cf=class{module;params={};constructor(e){this.module=new sn(e);}proposal(){return new bf(this.module,this.params)}query(){return new Rf(this.module)}debug(){return this.module.debug(),this}withSigner(e){return this.params.signer=e,this}},bf=class{constructor(e,t){this.module=e;this.builderParams=t;this.params.signer=t.signer;}params={};create(e){return this.params.title=e.title,this.params.description=e.description,this}type(e){return this.params.proposalType=e,this}votingDuration(e){return this.params.votingDuration=e,this}executionDelay(e){return this.params.executionDelay=e,this}validateParams(){if(!this.params.signer)throw new Error("Signer required");if(!this.params.title)throw new Error("Title required");if(!this.params.description)throw new Error("Description required");if(!this.params.proposalType)throw new Error("Proposal type required");if(!this.params.votingDuration)throw new Error("Voting duration required")}async execute(){this.validateParams();let e=await this.module.createProposal({signer:this.params.signer,title:this.params.title,description:this.params.description,proposalType:this.params.proposalType,votingDuration:this.params.votingDuration,executionDelay:this.params.executionDelay});return {address:`proposal_${this.params.signer.address}_${this.params.title}`,signature:e}}withSigner(e){return this.params.signer=e,this}},Rf=class{constructor(e){this.module=e;}async activeProposals(){return this.module.getActiveProposals()}async proposalsByProposer(e){return this.module.getProposalsByProposer(e)}async proposalsByStatus(e){return this.module.getProposalsByStatus(e)}},If=class{module;params={};constructor(e){this.module=new an(e);}create(){return new vf(this.module,this.params)}proposal(){return new Mf(this.module,this.params)}approve(){return new kf(this.module,this.params)}executeProposal(){return new wf(this.module,this.params)}withSigner(e){return this.params.signer=e,this}debug(){return this.module.debug(),this}},vf=class{constructor(e,t){this.module=e;this.builderParams=t;this.params.signer=t.signer;}params={};withId(e){return this.params.multisigId=e,this}threshold(e){return this.params.threshold=e,this}signers(e){return this.params.signers=e,this}async execute(){if(!this.params.signer)throw new Error("Signer required");if(!this.params.multisigId)throw new Error("Multisig ID required");if(!this.params.threshold)throw new Error("Threshold required");if(!this.params.signers)throw new Error("Signers required");return {signature:await this.module.createMultisig({owner:this.params.signer,multisigId:this.params.multisigId,threshold:this.params.threshold,signers:this.params.signers})}}withSigner(e){return this.params.signer=e,this}},Mf=class{constructor(e,t){this.module=e;this.builderParams=t;this.params.signer=t.signer;}params={};forMultisig(e){return this.params.multisigAddress=e,this}title(e){return this.params.title=e,this}description(e){return this.params.description=e,this}async execute(){if(!this.params.signer)throw new Error("Signer required");if(!this.params.title)throw new Error("Title required");if(!this.params.description)throw new Error("Description required");return {signature:await this.module.createProposal({multisigAddress:this.params.multisigAddress,title:this.params.title,description:this.params.description,proposalType:7,executionParams:{instructions:[],executionDelay:0n,executionConditions:[],cancellable:true,autoExecute:true,executionAuthority:this.params.signer.address},proposalId:BigInt(Date.now()),proposer:this.params.signer})}}withSigner(e){return this.params.signer=e,this}},kf=class{constructor(e,t){this.module=e;this.builderParams=t;this.params.signer=t.signer;}params={};proposal(e){return this.params.proposalAddress=e,this}vote(e){return this.params.voteChoice=e,this}reason(e){return this.params.reasoning=e,this}tokenAccount(e){return this.params.tokenAccount=e,this}async execute(){throw this.params.signer?this.params.proposalAddress?new Error("Multisig approval: Use protocol_config instructions for voting (approveProposal removed)"):new Error("Proposal address required"):new Error("Signer required")}withSigner(e){return this.params.signer=e,this}},wf=class{constructor(e,t){this.module=e;this.builderParams=t;this.params.signer=t.signer;}params={};proposal(e){return this.params.proposalAddress=e,this}target(e){return this.params.targetProgram=e,this}async execute(){if(!this.params.signer)throw new Error("Signer required");if(!this.params.proposalAddress)throw new Error("Proposal address required");if(!this.params.targetProgram)throw new Error("Target program required");return {signature:await this.module.executeProposal({proposalAddress:this.params.proposalAddress,executor:this.params.signer,targetProgram:this.params.targetProgram})}}withSigner(e){return this.params.signer=e,this}};function Tye(n){return BigInt(Math.round(n*1e9))}var ft=class extends Error{code;context;solution;instruction;constructor(e,t,o={},r,c){super(t),this.name="GhostSpeakError",this.code=e,this.context=o,this.solution=r,this.instruction=c;}toString(){let e=`${this.name} [${this.code}]: ${this.message}`;return Object.keys(this.context).length>0&&(e+=`
|
|
1
|
+
import {fixEncoderSize,getBytesEncoder,transformEncoder,getStructEncoder,getAddressEncoder,getU64Encoder,getI64Encoder,getU8Encoder,getOptionEncoder,addEncoderSizePrefix,getUtf8Encoder,getU32Encoder,getStructDecoder,fixDecoderSize,getAddressDecoder,getU64Decoder,getI64Decoder,getU8Decoder,getOptionDecoder,getBytesDecoder,addDecoderSizePrefix,getUtf8Decoder,getU32Decoder,combineCodec,getProgramDerivedAddress,AccountRole,upgradeRoleToSigner,isProgramError,containsBytes,getArrayEncoder,getBooleanEncoder,getArrayDecoder,getBooleanDecoder,getEnumEncoder,getEnumDecoder,getU16Encoder,getU16Decoder,getF64Encoder,getF64Decoder,getDiscriminatedUnionEncoder,getUnitEncoder,getTupleEncoder,getDiscriminatedUnionDecoder,getUnitDecoder,getTupleDecoder,assertAccountExists,fetchEncodedAccount,assertAccountsExist,fetchEncodedAccounts,decodeAccount,isTransactionSigner,pipe,createTransactionMessage,setTransactionMessageFeePayerSigner,setTransactionMessageLifetimeUsingBlockhash,appendTransactionMessageInstructions,signTransactionMessageWithSigners,setTransactionMessageFeePayer,compileTransactionMessage,getBase64EncodedWireTransaction,lamports}from'@solana/kit';import {createSolanaClient}from'gill';import {LRUCache}from'lru-cache';import {address}from'@solana/addresses';import'@solana/sysvars';import {sha256}from'@noble/hashes/sha256';import Tt from'bs58';var Hu=Object.defineProperty;var b0=Object.getOwnPropertyDescriptor;var R0=Object.getOwnPropertyNames;var I0=Object.prototype.hasOwnProperty;var a=(n,e)=>()=>(n&&(e=n(n=0)),e);var oe=(n,e)=>{for(var t in e)Hu(n,t,{get:e[t],enumerable:true});},v0=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of R0(e))!I0.call(n,r)&&r!==t&&Hu(n,r,{get:()=>e[r],enumerable:!(o=b0(e,r))||o.enumerable});return n};var Ff=n=>v0(Hu({},"__esModule",{value:true}),n);function yn(){return getStructEncoder([["auditEnabled",getBooleanEncoder()],["realTimeMonitoring",getBooleanEncoder()],["retentionPeriod",getI64Encoder()]])}function Tn(){return getStructDecoder([["auditEnabled",getBooleanDecoder()],["realTimeMonitoring",getBooleanDecoder()],["retentionPeriod",getI64Decoder()]])}function z0(){return combineCodec(yn(),Tn())}var Nf=a(()=>{});function fn(){return getStructEncoder([["policyId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["policyType",In()],["rules",getArrayEncoder(hn())],["scope",Pn()],["priority",getU8Encoder()],["status",bn()],["effectiveDate",getI64Encoder()],["expirationDate",getOptionEncoder(getI64Encoder())],["metadata",xn()]])}function Sn(){return getStructDecoder([["policyId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["policyType",vn()],["rules",getArrayDecoder(En())],["scope",Cn()],["priority",getU8Decoder()],["status",Rn()],["effectiveDate",getI64Decoder()],["expirationDate",getOptionDecoder(getI64Decoder())],["metadata",Dn()]])}function H0(){return combineCodec(fn(),Sn())}var Vf=a(()=>{m();});function j(){return getEnumEncoder(Mn)}function $(){return getEnumDecoder(Mn)}function J0(){return combineCodec(j(),$())}var Mn,Kf=a(()=>{Mn=(c=>(c[c.None=0]="None",c[c.Basic=1]="Basic",c[c.Verified=2]="Verified",c[c.Pro=3]="Pro",c[c.Whale=4]="Whale",c))(Mn||{});});function kn(){return getStructEncoder([["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function wn(){return getStructDecoder([["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function i_(){return combineCodec(kn(),wn())}var Hf=a(()=>{});function Un(){return getStructEncoder([["maxFailedAttempts",getU8Encoder()],["lockoutDuration",getI64Encoder()],["progressiveLockout",getBooleanEncoder()],["unlockMethods",getArrayEncoder(zn())],["notificationRequirements",getArrayEncoder(we())]])}function _n(){return getStructDecoder([["maxFailedAttempts",getU8Decoder()],["lockoutDuration",getI64Decoder()],["progressiveLockout",getBooleanDecoder()],["unlockMethods",getArrayDecoder(On())],["notificationRequirements",getArrayDecoder(Ue())]])}function m_(){return combineCodec(Un(),_n())}var qf=a(()=>{m();});function Fn(){return getStructEncoder([["requirementType",Wn()],["approvers",getArrayEncoder(getAddressEncoder())],["minApprovals",getU8Encoder()],["approvalTimeout",getI64Encoder()],["evidenceRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function Gn(){return getStructDecoder([["requirementType",Nn()],["approvers",getArrayDecoder(getAddressDecoder())],["minApprovals",getU8Decoder()],["approvalTimeout",getI64Decoder()],["evidenceRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function k_(){return combineCodec(Fn(),Gn())}var Xf=a(()=>{m();});function Wn(){return getEnumEncoder(Bn)}function Nn(){return getEnumDecoder(Bn)}function z_(){return combineCodec(Wn(),Nn())}var Bn,Zf=a(()=>{Bn=(s=>(s[s.ManagerApproval=0]="ManagerApproval",s[s.PeerReview=1]="PeerReview",s[s.SecurityClearance=2]="SecurityClearance",s[s.BackgroundCheck=3]="BackgroundCheck",s[s.TrainingCompletion=4]="TrainingCompletion",s[s.CertificationRequired=5]="CertificationRequired",s[s.BusinessJustification=6]="BusinessJustification",s[s.TechnicalAssessment=7]="TechnicalAssessment",s))(Bn||{});});function tS(){return getStructEncoder([["agent",getAddressEncoder()],["owner",getAddressEncoder()],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["timestamp",getI64Encoder()]])}function nS(){return getStructDecoder([["agent",getAddressDecoder()],["owner",getAddressDecoder()],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["timestamp",getI64Decoder()]])}function $_(){return combineCodec(tS(),nS())}var rS=a(()=>{});function cS(){return getStructEncoder([["agent",getAddressEncoder()],["owner",getAddressEncoder()],["timestamp",getI64Encoder()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["isActive",getBooleanEncoder()]])}function sS(){return getStructDecoder([["agent",getAddressDecoder()],["owner",getAddressDecoder()],["timestamp",getI64Decoder()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["isActive",getBooleanDecoder()]])}function sz(){return combineCodec(cS(),sS())}var aS=a(()=>{});function Vn(){return getEnumEncoder(Ln)}function Kn(){return getEnumDecoder(Ln)}function gz(){return combineCodec(Vn(),Kn())}var Ln,dS=a(()=>{Ln=(r=>(r[r.Unregistered=0]="Unregistered",r[r.Registered=1]="Registered",r[r.Claimed=2]="Claimed",r[r.Verified=3]="Verified",r))(Ln||{});});function lS(){return getStructEncoder([["agent",getAddressEncoder()],["previousStatus",getBooleanEncoder()],["newStatus",getBooleanEncoder()],["timestamp",getI64Encoder()],["authority",getAddressEncoder()]])}function mS(){return getStructDecoder([["agent",getAddressDecoder()],["previousStatus",getBooleanDecoder()],["newStatus",getBooleanDecoder()],["timestamp",getI64Decoder()],["authority",getAddressDecoder()]])}function Tz(){return combineCodec(lS(),mS())}var yS=a(()=>{});function SS(){return getStructEncoder([["agent",getAddressEncoder()],["owner",getAddressEncoder()],["timestamp",getI64Encoder()]])}function xS(){return getStructDecoder([["agent",getAddressDecoder()],["owner",getAddressDecoder()],["timestamp",getI64Decoder()]])}function Ez(){return combineCodec(SS(),xS())}var DS=a(()=>{});function Hn(){return getStructEncoder([["agentPubkey",getAddressEncoder()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["supportedCapabilities",getArrayEncoder(getU64Encoder())],["verifiedAt",getI64Encoder()]])}function jn(){return getStructDecoder([["agentPubkey",getAddressDecoder()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["supportedCapabilities",getArrayDecoder(getU64Decoder())],["verifiedAt",getI64Decoder()]])}function Bz(){return combineCodec(Hn(),jn())}var hS=a(()=>{});function $n(){return getStructEncoder([["biometricType",_e()],["maxAge",getI64Encoder()],["refreshRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["degradationHandling",Jn()]])}function qn(){return getStructDecoder([["biometricType",ze()],["maxAge",getI64Decoder()],["refreshRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["degradationHandling",Qn()]])}function tO(){return combineCodec($n(),qn())}var ES=a(()=>{m();});function Xn(){return getStructEncoder([["actionType",Oe()],["requiredApprovers",getArrayEncoder(getAddressEncoder())],["minApprovals",getU8Encoder()],["approvalTimeout",getI64Encoder()]])}function Zn(){return getStructDecoder([["actionType",Fe()],["requiredApprovers",getArrayDecoder(getAddressDecoder())],["minApprovals",getU8Decoder()],["approvalTimeout",getI64Decoder()]])}function pO(){return combineCodec(Xn(),Zn())}var PS=a(()=>{m();});function ie(){return getDiscriminatedUnionEncoder([["FavorClient",getStructEncoder([["reason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])],["FavorAgent",getStructEncoder([["reason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])],["Split",getStructEncoder([["clientPercentage",getU8Encoder()],["reason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])]])}function ce(){return getDiscriminatedUnionDecoder([["FavorClient",getStructDecoder([["reason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])],["FavorAgent",getStructDecoder([["reason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])],["Split",getStructDecoder([["clientPercentage",getU8Decoder()],["reason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])]])}function SO(){return combineCodec(ie(),ce())}function xO(n,e){return Array.isArray(e)?{__kind:n,fields:e}:{__kind:n,...e??{}}}function DO(n,e){return e.__kind===n}var CS=a(()=>{});function Oe(){return getEnumEncoder(Yn)}function Fe(){return getEnumDecoder(Yn)}function CO(){return combineCodec(Oe(),Fe())}var Yn,bS=a(()=>{Yn=(l=>(l[l.AgentRegistered=0]="AgentRegistered",l[l.AgentUpdated=1]="AgentUpdated",l[l.AgentDeactivated=2]="AgentDeactivated",l[l.AgentVerified=3]="AgentVerified",l[l.PaymentProcessed=4]="PaymentProcessed",l[l.EscrowCreated=5]="EscrowCreated",l[l.EscrowReleased=6]="EscrowReleased",l[l.FundsWithdrawn=7]="FundsWithdrawn",l[l.ProposalCreated=8]="ProposalCreated",l[l.VoteCast=9]="VoteCast",l[l.ProposalExecuted=10]="ProposalExecuted",l[l.GovernanceUpdated=11]="GovernanceUpdated",l[l.AccessGranted=12]="AccessGranted",l[l.AccessRevoked=13]="AccessRevoked",l[l.SecurityPolicyUpdated=14]="SecurityPolicyUpdated",l[l.SuspiciousActivity=15]="SuspiciousActivity",l[l.ComplianceReportGenerated=16]="ComplianceReportGenerated",l[l.RegulatorySubmission=17]="RegulatorySubmission",l[l.AuditRequested=18]="AuditRequested",l[l.ViolationDetected=19]="ViolationDetected",l[l.SystemConfigUpdated=20]="SystemConfigUpdated",l[l.EmergencyAction=21]="EmergencyAction",l[l.MaintenancePerformed=22]="MaintenancePerformed",l[l.WorkOrderCreated=23]="WorkOrderCreated",l[l.WorkOrderCompleted=24]="WorkOrderCompleted",l[l.DisputeRaised=25]="DisputeRaised",l[l.DisputeResolved=26]="DisputeResolved",l[l.MultisigCreated=27]="MultisigCreated",l[l.MultisigSigned=28]="MultisigSigned",l[l.MultisigExecuted=29]="MultisigExecuted",l[l.RiskAssessmentPerformed=30]="RiskAssessmentPerformed",l[l.RiskThresholdExceeded=31]="RiskThresholdExceeded",l[l.RiskMitigationApplied=32]="RiskMitigationApplied",l))(Yn||{});});function Ge(){return getStructEncoder([["maxEntries",getU32Encoder()],["retentionPeriod",getI64Encoder()],["autoArchive",getBooleanEncoder()],["reportingFrequency",nr()],["approvalLevels",getArrayEncoder(Xn())],["encryptionRequired",getBooleanEncoder()],["backupFrequency",er()]])}function We(){return getStructDecoder([["maxEntries",getU32Decoder()],["retentionPeriod",getI64Decoder()],["autoArchive",getBooleanDecoder()],["reportingFrequency",rr()],["approvalLevels",getArrayDecoder(Zn())],["encryptionRequired",getBooleanDecoder()],["backupFrequency",tr()]])}function zO(){return combineCodec(Ge(),We())}var vS=a(()=>{m();});function or(){return getStructEncoder([["metadata",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function ir(){return getStructDecoder([["metadata",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function HO(){return combineCodec(or(),ir())}var MS=a(()=>{});function cr(){return getStructEncoder([["entryId",getU64Encoder()],["timestamp",getI64Encoder()],["action",Oe()],["actor",getAddressEncoder()],["target",getOptionEncoder(getAddressEncoder())],["context",or()],["complianceFlags",ar()],["previousHash",fixEncoderSize(getBytesEncoder(),32)],["entryHash",fixEncoderSize(getBytesEncoder(),32)],["signature",getOptionEncoder(fixEncoderSize(getBytesEncoder(),64))]])}function sr(){return getStructDecoder([["entryId",getU64Decoder()],["timestamp",getI64Decoder()],["action",Fe()],["actor",getAddressDecoder()],["target",getOptionDecoder(getAddressDecoder())],["context",ir()],["complianceFlags",dr()],["previousHash",fixDecoderSize(getBytesDecoder(),32)],["entryHash",fixDecoderSize(getBytesDecoder(),32)],["signature",getOptionDecoder(fixDecoderSize(getBytesDecoder(),64))]])}function YO(){return combineCodec(cr(),sr())}var zS=a(()=>{m();});function OS(){return getStructEncoder([["entity",getAddressEncoder()],["entityType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["timestamp",getI64Encoder()]])}function FS(){return getStructDecoder([["entity",getAddressDecoder()],["entityType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["timestamp",getI64Decoder()]])}function p8(){return combineCodec(OS(),FS())}var GS=a(()=>{});function gr(){return getEnumEncoder(ur)}function Ar(){return getEnumDecoder(ur)}function T8(){return combineCodec(gr(),Ar())}var ur,WS=a(()=>{ur=(r=>(r[r.Low=0]="Low",r[r.Medium=1]="Medium",r[r.High=2]="High",r[r.VeryHigh=3]="VeryHigh",r))(ur||{});});function lr(){return getEnumEncoder(pr)}function mr(){return getEnumDecoder(pr)}function D8(){return combineCodec(lr(),mr())}var pr,NS=a(()=>{pr=(p=>(p[p.Password=0]="Password",p[p.DigitalSignature=1]="DigitalSignature",p[p.Biometric=2]="Biometric",p[p.Token=3]="Token",p[p.Certificate=4]="Certificate",p[p.Sms=5]="Sms",p[p.Email=6]="Email",p[p.App=7]="App",p[p.Hardware=8]="Hardware",p))(pr||{});});function yr(){return getStructEncoder([["mfaRequired",getBooleanEncoder()],["supportedMethods",getArrayEncoder(lr())],["strengthRequirements",fr()],["lockoutPolicies",Un()],["biometricPolicies",getOptionEncoder(xr())]])}function Tr(){return getStructDecoder([["mfaRequired",getBooleanDecoder()],["supportedMethods",getArrayDecoder(mr())],["strengthRequirements",Sr()],["lockoutPolicies",_n()],["biometricPolicies",getOptionDecoder(Dr())]])}function k8(){return combineCodec(yr(),Tr())}var BS=a(()=>{m();});function fr(){return getStructEncoder([["minimumLevel",gr()],["riskBased",getBooleanEncoder()],["adaptive",getBooleanEncoder()],["stepUpTriggers",getArrayEncoder(hr())]])}function Sr(){return getStructDecoder([["minimumLevel",Ar()],["riskBased",getBooleanDecoder()],["adaptive",getBooleanDecoder()],["stepUpTriggers",getArrayDecoder(Er())]])}function F8(){return combineCodec(fr(),Sr())}var KS=a(()=>{m();});function Pr(){return getStructEncoder([["defaultDeny",getBooleanEncoder()],["explicitPermissionsRequired",getBooleanEncoder()]])}function Cr(){return getStructDecoder([["defaultDeny",getBooleanDecoder()],["explicitPermissionsRequired",getBooleanDecoder()]])}function B8(){return combineCodec(Pr(),Cr())}var $S=a(()=>{});function er(){return getEnumEncoder(br)}function tr(){return getEnumDecoder(br)}function H8(){return combineCodec(er(),tr())}var br,qS=a(()=>{br=(r=>(r[r.Hourly=0]="Hourly",r[r.Daily=1]="Daily",r[r.Weekly=2]="Weekly",r[r.Monthly=3]="Monthly",r))(br||{});});function xr(){return getStructEncoder([["supportedTypes",getArrayEncoder(_e())],["qualityRequirements",vr()],["livenessDetection",getBooleanEncoder()],["templateProtection",Rr()]])}function Dr(){return getStructDecoder([["supportedTypes",getArrayDecoder(ze())],["qualityRequirements",Mr()],["livenessDetection",getBooleanDecoder()],["templateProtection",Ir()]])}function Y8(){return combineCodec(xr(),Dr())}var JS=a(()=>{m();});function Rr(){return getStructEncoder([["encryptionRequired",getBooleanEncoder()],["storageMethod",kr()],["revocationSupport",getBooleanEncoder()],["agingPolicies",getArrayEncoder($n())]])}function Ir(){return getStructDecoder([["encryptionRequired",getBooleanDecoder()],["storageMethod",wr()],["revocationSupport",getBooleanDecoder()],["agingPolicies",getArrayDecoder(qn())]])}function iF(){return combineCodec(Rr(),Ir())}var ZS=a(()=>{m();});function vr(){return getStructEncoder([["score",getU8Encoder()]])}function Mr(){return getStructDecoder([["score",getU8Decoder()]])}function gF(){return combineCodec(vr(),Mr())}var YS=a(()=>{});function kr(){return getEnumEncoder(Ur)}function wr(){return getEnumDecoder(Ur)}function mF(){return combineCodec(kr(),wr())}var Ur,ex=a(()=>{Ur=(c=>(c[c.OnDevice=0]="OnDevice",c[c.Encrypted=1]="Encrypted",c[c.Hashed=2]="Hashed",c[c.Distributed=3]="Distributed",c[c.None=4]="None",c))(Ur||{});});function _e(){return getEnumEncoder(_r)}function ze(){return getEnumDecoder(_r)}function SF(){return combineCodec(_e(),ze())}var _r,tx=a(()=>{_r=(d=>(d[d.Fingerprint=0]="Fingerprint",d[d.FaceRecognition=1]="FaceRecognition",d[d.IrisRecognition=2]="IrisRecognition",d[d.VoiceRecognition=3]="VoiceRecognition",d[d.Signature=4]="Signature",d[d.Gait=5]="Gait",d[d.Behavioral=6]="Behavioral",d))(_r||{});});function ar(){return getStructEncoder([["requiresReporting",getBooleanEncoder()],["highRisk",getBooleanEncoder()],["sensitiveData",getBooleanEncoder()],["crossBorder",getBooleanEncoder()],["largeAmount",getBooleanEncoder()],["suspicious",getBooleanEncoder()],["manualReview",getBooleanEncoder()],["jurisdiction",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function dr(){return getStructDecoder([["requiresReporting",getBooleanDecoder()],["highRisk",getBooleanDecoder()],["sensitiveData",getBooleanDecoder()],["crossBorder",getBooleanDecoder()],["largeAmount",getBooleanDecoder()],["suspicious",getBooleanDecoder()],["manualReview",getBooleanDecoder()],["jurisdiction",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function kF(){return combineCodec(ar(),dr())}var nx=a(()=>{});function zr(){return getStructEncoder([["complianceScore",getU8Encoder()],["policyAdherenceRate",getU8Encoder()],["avgIncidentResponseTime",getU64Encoder()],["falsePositiveRate",getU8Encoder()],["coveragePercentage",getU8Encoder()],["auditReadinessScore",getU8Encoder()]])}function Or(){return getStructDecoder([["complianceScore",getU8Decoder()],["policyAdherenceRate",getU8Decoder()],["avgIncidentResponseTime",getU64Decoder()],["falsePositiveRate",getU8Decoder()],["coveragePercentage",getU8Decoder()],["auditReadinessScore",getU8Decoder()]])}function FF(){return combineCodec(zr(),Or())}var rx=a(()=>{});function Fr(){return getStructEncoder([["frameworks",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["auditRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["reportingRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function Gr(){return getStructDecoder([["frameworks",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["auditRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["reportingRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function BF(){return combineCodec(Fr(),Gr())}var ox=a(()=>{});function sx(){return getStructEncoder([["report",getAddressEncoder()],["reportId",getU64Encoder()],["reportType",se()],["complianceRate",getU64Encoder()]])}function ax(){return getStructDecoder([["report",getAddressDecoder()],["reportId",getU64Decoder()],["reportType",ae()],["complianceRate",getU64Decoder()]])}function $F(){return combineCodec(sx(),ax())}var dx=a(()=>{m();});function Wr(){return getStructEncoder([["status",getU8Encoder()]])}function Nr(){return getStructDecoder([["status",getU8Decoder()]])}function YF(){return combineCodec(Wr(),Nr())}var ux=a(()=>{});function Tx(){return getStructEncoder([["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["owner",getAddressEncoder()],["treeAuthority",getAddressEncoder()],["merkleTree",getAddressEncoder()],["dataHash",fixEncoderSize(getBytesEncoder(),32)],["index",getU64Encoder()],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["createdAt",getI64Encoder()]])}function fx(){return getStructDecoder([["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["owner",getAddressDecoder()],["treeAuthority",getAddressDecoder()],["merkleTree",getAddressDecoder()],["dataHash",fixDecoderSize(getBytesDecoder(),32)],["index",getU64Decoder()],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["createdAt",getI64Decoder()]])}function gG(){return combineCodec(Tx(),fx())}var Sx=a(()=>{});function Lr(){return getEnumEncoder(Br)}function Vr(){return getEnumDecoder(Br)}function mG(){return combineCodec(Lr(),Vr())}var Br,xx=a(()=>{Br=(i=>(i[i.TimeDelay=0]="TimeDelay",i[i.TokenBalance=1]="TokenBalance",i[i.PriceThreshold=2]="PriceThreshold",i[i.VoteCount=3]="VoteCount",i[i.ExternalOracle=4]="ExternalOracle",i[i.CustomLogic=5]="CustomLogic",i))(Br||{});});function Kr(){return getStructEncoder([["attribute",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["operator",jr()],["value",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["valueType",qr()]])}function Hr(){return getStructDecoder([["attribute",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["operator",$r()],["value",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["valueType",Jr()]])}function SG(){return combineCodec(Kr(),Hr())}var Rx=a(()=>{m();});function jr(){return getEnumEncoder(Qr)}function $r(){return getEnumDecoder(Qr)}function EG(){return combineCodec(jr(),$r())}var Qr,Ix=a(()=>{Qr=(x=>(x[x.Equals=0]="Equals",x[x.NotEquals=1]="NotEquals",x[x.GreaterThan=2]="GreaterThan",x[x.LessThan=3]="LessThan",x[x.GreaterThanOrEqual=4]="GreaterThanOrEqual",x[x.LessThanOrEqual=5]="LessThanOrEqual",x[x.Contains=6]="Contains",x[x.NotContains=7]="NotContains",x[x.In=8]="In",x[x.NotIn=9]="NotIn",x[x.Matches=10]="Matches",x[x.NotMatches=11]="NotMatches",x))(Qr||{});});function Ne(){return getEnumEncoder(Xr)}function Be(){return getEnumDecoder(Xr)}function RG(){return combineCodec(Ne(),Be())}var Xr,vx=a(()=>{Xr=(c=>(c[c.AgentIdentity=0]="AgentIdentity",c[c.ReputationScore=1]="ReputationScore",c[c.JobCompletion=2]="JobCompletion",c[c.DelegatedSigner=3]="DelegatedSigner",c[c.Custom=4]="Custom",c))(Xr||{});});function Yr(){return getEnumEncoder(Zr)}function eo(){return getEnumDecoder(Zr)}function kG(){return combineCodec(Yr(),eo())}var Zr,Mx=a(()=>{Zr=(r=>(r[r.Pending=0]="Pending",r[r.Active=1]="Active",r[r.Revoked=2]="Revoked",r[r.Expired=3]="Expired",r))(Zr||{});});function Le(){return getEnumEncoder(to)}function Ve(){return getEnumDecoder(to)}function zG(){return combineCodec(Le(),Ve())}var to,kx=a(()=>{to=(r=>(r[r.NotSynced=0]="NotSynced",r[r.SyncPending=1]="SyncPending",r[r.SyncedToCrossmint=2]="SyncedToCrossmint",r[r.SyncFailed=3]="SyncFailed",r))(to||{});});function ro(){return getEnumEncoder(no)}function oo(){return getEnumDecoder(no)}function WG(){return combineCodec(ro(),oo())}var no,wx=a(()=>{no=(c=>(c[c.Public=0]="Public",c[c.Internal=1]="Internal",c[c.Confidential=2]="Confidential",c[c.Restricted=3]="Restricted",c[c.TopSecret=4]="TopSecret",c))(no||{});});function io(){return getStructEncoder([["encryptionRequired",getBooleanEncoder()],["classificationRequired",getBooleanEncoder()],["dlpEnabled",getBooleanEncoder()]])}function co(){return getStructDecoder([["encryptionRequired",getBooleanDecoder()],["classificationRequired",getBooleanDecoder()],["dlpEnabled",getBooleanDecoder()]])}function VG(){return combineCodec(io(),co())}var Ux=a(()=>{});function Jn(){return getEnumEncoder(so)}function Qn(){return getEnumDecoder(so)}function $G(){return combineCodec(Jn(),Qn())}var so,_x=a(()=>{so=(r=>(r[r.RequireRefresh=0]="RequireRefresh",r[r.GradualDegradation=1]="GradualDegradation",r[r.ImmediateExpiry=2]="ImmediateExpiry",r[r.AdaptiveThreshold=3]="AdaptiveThreshold",r))(so||{});});function ao(){return getStructEncoder([["delegator",getAddressEncoder()],["delegatedAt",getI64Encoder()],["scope",go()],["expiresAt",getOptionEncoder(getI64Encoder())]])}function uo(){return getStructDecoder([["delegator",getAddressDecoder()],["delegatedAt",getI64Decoder()],["scope",Ao()],["expiresAt",getOptionDecoder(getI64Decoder())]])}function t2(){return combineCodec(ao(),uo())}var Fx=a(()=>{m();});function go(){return getDiscriminatedUnionEncoder([["All",getUnitEncoder()],["ProposalType",getStructEncoder([["fields",getTupleEncoder([de()])]])],["SingleProposal",getUnitEncoder()],["Limited",getUnitEncoder()]])}function Ao(){return getDiscriminatedUnionDecoder([["All",getUnitDecoder()],["ProposalType",getStructDecoder([["fields",getTupleDecoder([ue()])]])],["SingleProposal",getUnitDecoder()],["Limited",getUnitDecoder()]])}function d2(){return combineCodec(go(),Ao())}function u2(n,e){return Array.isArray(e)?{__kind:n,fields:e}:{__kind:n,...e??{}}}function g2(n,e){return e.__kind===n}var Gx=a(()=>{m();});function Wx(){return getStructEncoder([["escrowId",getU64Encoder()],["agent",getAddressEncoder()],["deliveryProof",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function Nx(){return getStructDecoder([["escrowId",getU64Decoder()],["agent",getAddressDecoder()],["deliveryProof",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function C2(){return combineCodec(Wx(),Nx())}var Bx=a(()=>{});function Lx(){return getStructEncoder([["escrowId",getU64Encoder()],["client",getAddressEncoder()],["reason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function Vx(){return getStructDecoder([["escrowId",getU64Decoder()],["client",getAddressDecoder()],["reason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function W2(){return combineCodec(Lx(),Vx())}var Kx=a(()=>{});function Hx(){return getStructEncoder([["escrowId",getU64Encoder()],["decision",ie()],["arbitrator",getAddressEncoder()]])}function jx(){return getStructDecoder([["escrowId",getU64Decoder()],["decision",ce()],["arbitrator",getAddressDecoder()]])}function $2(){return combineCodec(Hx(),jx())}var $x=a(()=>{m();});function po(){return getStructEncoder([["breakGlassEnabled",getBooleanEncoder()],["emergencyContacts",getArrayEncoder(getAddressEncoder())],["approvalRequired",getBooleanEncoder()]])}function lo(){return getStructDecoder([["breakGlassEnabled",getBooleanDecoder()],["emergencyContacts",getArrayDecoder(getAddressDecoder())],["approvalRequired",getBooleanDecoder()]])}function tW(){return combineCodec(po(),lo())}var Qx=a(()=>{});function mo(){return getStructEncoder([["emergencyContacts",getArrayEncoder(getAddressEncoder())],["emergencyThreshold",getU8Encoder()],["emergencyTimeout",getI64Encoder()],["emergencyTransactionTypes",getArrayEncoder(Ke())],["freezeEnabled",getBooleanEncoder()],["frozen",getBooleanEncoder()],["frozenAt",getOptionEncoder(getI64Encoder())],["autoUnfreezeDuration",getOptionEncoder(getI64Encoder())]])}function yo(){return getStructDecoder([["emergencyContacts",getArrayDecoder(getAddressDecoder())],["emergencyThreshold",getU8Decoder()],["emergencyTimeout",getI64Decoder()],["emergencyTransactionTypes",getArrayDecoder(He())],["freezeEnabled",getBooleanDecoder()],["frozen",getBooleanDecoder()],["frozenAt",getOptionDecoder(getI64Decoder())],["autoUnfreezeDuration",getOptionDecoder(getI64Decoder())]])}function dW(){return combineCodec(mo(),yo())}var rD=a(()=>{m();});function je(){return getEnumEncoder(To)}function $e(){return getEnumDecoder(To)}function pW(){return combineCodec(je(),$e())}var To,oD=a(()=>{To=(r=>(r[r.Hard=0]="Hard",r[r.Soft=1]="Soft",r[r.Advisory=2]="Advisory",r[r.ExceptionBased=3]="ExceptionBased",r))(To||{});});function sD(){return getStructEncoder([["escrowId",getU64Encoder()],["agent",getAddressEncoder()],["amount",getU64Encoder()]])}function aD(){return getStructDecoder([["escrowId",getU64Decoder()],["agent",getAddressDecoder()],["amount",getU64Decoder()]])}function SW(){return combineCodec(sD(),aD())}var dD=a(()=>{});function lD(){return getStructEncoder([["escrowId",getU64Encoder()],["client",getAddressEncoder()],["agent",getAddressEncoder()],["amount",getU64Encoder()],["deadline",getI64Encoder()]])}function mD(){return getStructDecoder([["escrowId",getU64Decoder()],["client",getAddressDecoder()],["agent",getAddressDecoder()],["amount",getU64Decoder()],["deadline",getI64Decoder()]])}function CW(){return combineCodec(lD(),mD())}var yD=a(()=>{});function So(){return getEnumEncoder(fo)}function xo(){return getEnumDecoder(fo)}function vW(){return combineCodec(So(),xo())}var fo,TD=a(()=>{fo=(r=>(r[r.Active=0]="Active",r[r.Completed=1]="Completed",r[r.Disputed=2]="Disputed",r[r.Cancelled=3]="Cancelled",r))(fo||{});});function ge(){return getStructEncoder([["conditionType",Lr()],["targetValue",getU64Encoder()],["currentValue",getU64Encoder()],["met",getBooleanEncoder()],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function Ae(){return getStructDecoder([["conditionType",Vr()],["targetValue",getU64Decoder()],["currentValue",getU64Decoder()],["met",getBooleanDecoder()],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function BW(){return combineCodec(ge(),Ae())}var xD=a(()=>{m();});function qe(){return getStructEncoder([["instructions",getArrayEncoder(Do())],["executionDelay",getI64Encoder()],["executionConditions",getArrayEncoder(ge())],["cancellable",getBooleanEncoder()],["autoExecute",getBooleanEncoder()],["executionAuthority",getAddressEncoder()]])}function Je(){return getStructDecoder([["instructions",getArrayDecoder(ho())],["executionDelay",getI64Decoder()],["executionConditions",getArrayDecoder(Ae())],["cancellable",getBooleanDecoder()],["autoExecute",getBooleanDecoder()],["executionAuthority",getAddressDecoder()]])}function JW(){return combineCodec(qe(),Je())}var CD=a(()=>{m();});function Eo(){return getStructEncoder([["platform",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["externalId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["verified",getBooleanEncoder()],["verifiedAt",getI64Encoder()]])}function Po(){return getStructDecoder([["platform",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["externalId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["verified",getBooleanDecoder()],["verifiedAt",getI64Decoder()]])}function rN(){return combineCodec(Eo(),Po())}var wD=a(()=>{});function Co(){return getStructEncoder([["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["latitudeRange",Ro()],["longitudeRange",vo()],["radius",getOptionEncoder(getU32Encoder())]])}function bo(){return getStructDecoder([["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["latitudeRange",Io()],["longitudeRange",Mo()],["radius",getOptionDecoder(getU32Decoder())]])}function pN(){return combineCodec(Co(),bo())}var zD=a(()=>{m();});function OD(){return getStructEncoder([["agent",getAddressEncoder()],["amount",getU64Encoder()],["reason",Qe()],["newTier",j()]])}function FD(){return getStructDecoder([["agent",getAddressDecoder()],["amount",getU64Decoder()],["reason",Xe()],["newTier",$()]])}function DN(){return combineCodec(OD(),FD())}var GD=a(()=>{m();});function BD(){return getStructEncoder([["agent",getAddressEncoder()],["amount",getU64Encoder()],["unlockAt",getI64Encoder()],["reputationBoostBps",getU16Encoder()],["tier",j()],["dailyApiCalls",getU32Encoder()],["votingPower",getU64Encoder()]])}function LD(){return getStructDecoder([["agent",getAddressDecoder()],["amount",getU64Decoder()],["unlockAt",getI64Decoder()],["reputationBoostBps",getU16Decoder()],["tier",$()],["dailyApiCalls",getU32Decoder()],["votingPower",getU64Decoder()]])}function UN(){return combineCodec(BD(),LD())}var VD=a(()=>{m();});function KD(){return getStructEncoder([["agent",getAddressEncoder()],["amount",getU64Encoder()]])}function HD(){return getStructDecoder([["agent",getAddressDecoder()],["amount",getU64Decoder()]])}function BN(){return combineCodec(KD(),HD())}var jD=a(()=>{});function JD(){return getStructEncoder([["proposal",getAddressEncoder()],["proposalId",getU64Encoder()],["proposer",getAddressEncoder()],["title",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function QD(){return getStructDecoder([["proposal",getAddressDecoder()],["proposalId",getU64Decoder()],["proposer",getAddressDecoder()],["title",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function YN(){return combineCodec(JD(),QD())}var XD=a(()=>{});function ko(){return getStructEncoder([["level",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["value",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["includeDescendants",getBooleanEncoder()]])}function wo(){return getStructDecoder([["level",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["value",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["includeDescendants",getBooleanDecoder()]])}function i6(){return combineCodec(ko(),wo())}var oh=a(()=>{});function Uo(){return getStructEncoder([["responseTeam",getArrayEncoder(getAddressEncoder())],["escalationProcedures",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["notificationRequirements",getArrayEncoder(we())]])}function _o(){return getStructDecoder([["responseTeam",getArrayDecoder(getAddressDecoder())],["escalationProcedures",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["notificationRequirements",getArrayDecoder(Ue())]])}function T6(){return combineCodec(Uo(),_o())}var ih=a(()=>{m();});function Ro(){return getStructEncoder([["min",getF64Encoder()],["max",getF64Encoder()]])}function Io(){return getStructDecoder([["min",getF64Decoder()],["max",getF64Decoder()]])}function D6(){return combineCodec(Ro(),Io())}var ah=a(()=>{});function Bo(){return getStructEncoder([["allowedCountries",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["blockedCountries",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["allowedIpRanges",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["blockedIpRanges",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["geofencingEnabled",getBooleanEncoder()],["allowedRegions",getArrayEncoder(Co())]])}function Lo(){return getStructDecoder([["allowedCountries",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["blockedCountries",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["allowedIpRanges",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["blockedIpRanges",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["geofencingEnabled",getBooleanDecoder()],["allowedRegions",getArrayDecoder(bo())]])}function R6(){return combineCodec(Bo(),Lo())}var dh=a(()=>{m();});function vo(){return getStructEncoder([["min",getF64Encoder()],["max",getF64Encoder()]])}function Mo(){return getStructDecoder([["min",getF64Decoder()],["max",getF64Decoder()]])}function k6(){return combineCodec(vo(),Mo())}var Ah=a(()=>{});function Ze(){return getStructEncoder([["threshold",getU8Encoder()]])}function Ye(){return getStructDecoder([["threshold",getU8Decoder()]])}function F6(){return combineCodec(Ze(),Ye())}var ph=a(()=>{});function yh(){return getStructEncoder([["multisigId",getU64Encoder()],["multisigType",pe()],["owner",getAddressEncoder()],["threshold",getU8Encoder()],["signerCount",getU8Encoder()],["timestamp",getI64Encoder()]])}function Th(){return getStructDecoder([["multisigId",getU64Decoder()],["multisigType",le()],["owner",getAddressDecoder()],["threshold",getU8Decoder()],["signerCount",getU8Decoder()],["timestamp",getI64Decoder()]])}function $6(){return combineCodec(yh(),Th())}var fh=a(()=>{m();});function Vo(){return getStructEncoder([["signer",getAddressEncoder()],["signature",fixEncoderSize(getBytesEncoder(),64)],["signedAt",getI64Encoder()],["signatureMethod",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["verificationData",getOptionEncoder(addEncoderSizePrefix(getBytesEncoder(),getU32Encoder()))]])}function Ko(){return getStructDecoder([["signer",getAddressDecoder()],["signature",fixDecoderSize(getBytesDecoder(),64)],["signedAt",getI64Decoder()],["signatureMethod",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["verificationData",getOptionDecoder(addDecoderSizePrefix(getBytesDecoder(),getU32Decoder()))]])}function s4(){return combineCodec(Vo(),Ko())}var Ch=a(()=>{});function pe(){return getEnumEncoder(Ho)}function le(){return getEnumDecoder(Ho)}function g4(){return combineCodec(pe(),le())}var Ho,bh=a(()=>{Ho=(i=>(i[i.Protocol=0]="Protocol",i[i.Dao=1]="Dao",i[i.Dispute=2]="Dispute",i[i.AgentConsortium=3]="AgentConsortium",i[i.AgentTreasury=4]="AgentTreasury",i[i.Custom=5]="Custom",i))(Ho||{});});function jo(){return getStructEncoder([["multisigType",pe()],["timelockSeconds",getI64Encoder()],["minSigners",getU8Encoder()],["maxSigners",getU8Encoder()],["minReputationScore",getU16Encoder()],["requiresTokenHoldings",getBooleanEncoder()],["minTokenBalance",getU64Encoder()]])}function $o(){return getStructDecoder([["multisigType",le()],["timelockSeconds",getI64Decoder()],["minSigners",getU8Decoder()],["maxSigners",getU8Decoder()],["minReputationScore",getU16Decoder()],["requiresTokenHoldings",getBooleanDecoder()],["minTokenBalance",getU64Decoder()]])}function E4(){return combineCodec(jo(),$o())}var vh=a(()=>{m();});function qo(){return getStructEncoder([["firewallRequired",getBooleanEncoder()],["intrusionDetection",getBooleanEncoder()],["trafficMonitoring",getBooleanEncoder()]])}function Jo(){return getStructDecoder([["firewallRequired",getBooleanDecoder()],["intrusionDetection",getBooleanDecoder()],["trafficMonitoring",getBooleanDecoder()]])}function R4(){return combineCodec(qo(),Jo())}var Mh=a(()=>{});function Xo(){return getEnumEncoder(Qo)}function Zo(){return getEnumDecoder(Qo)}function k4(){return combineCodec(Xo(),Zo())}var Qo,kh=a(()=>{Qo=(i=>(i[i.OnChain=0]="OnChain",i[i.Email=1]="Email",i[i.Sms=2]="Sms",i[i.Push=3]="Push",i[i.InApp=4]="InApp",i[i.All=5]="All",i))(Qo||{});});function ei(){return getEnumEncoder(Yo)}function ti(){return getEnumDecoder(Yo)}function z4(){return combineCodec(ei(),ti())}var Yo,wh=a(()=>{Yo=(c=>(c[c.Low=0]="Low",c[c.Medium=1]="Medium",c[c.High=2]="High",c[c.Critical=3]="Critical",c[c.Emergency=4]="Emergency",c))(Yo||{});});function we(){return getStructEncoder([["eventType",ci()],["targets",getArrayEncoder(ni())],["method",Xo()],["timing",oi()]])}function Ue(){return getStructDecoder([["eventType",si()],["targets",getArrayDecoder(ri())],["method",Zo()],["timing",ii()]])}function B4(){return combineCodec(we(),Ue())}var Uh=a(()=>{m();});function ni(){return getStructEncoder([["targetType",ai()],["targetId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["priority",ei()]])}function ri(){return getStructDecoder([["targetType",di()],["targetId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["priority",ti()]])}function X4(){return combineCodec(ni(),ri())}var _h=a(()=>{m();});function ai(){return getEnumEncoder(ui)}function di(){return getEnumDecoder(ui)}function tB(){return combineCodec(ai(),di())}var ui,zh=a(()=>{ui=(d=>(d[d.User=0]="User",d[d.Administrator=1]="Administrator",d[d.SecurityTeam=2]="SecurityTeam",d[d.ComplianceTeam=3]="ComplianceTeam",d[d.Manager=4]="Manager",d[d.AuditTeam=5]="AuditTeam",d[d.ExternalSystem=6]="ExternalSystem",d))(ui||{});});function oi(){return getEnumEncoder(gi)}function ii(){return getEnumDecoder(gi)}function iB(){return combineCodec(oi(),ii())}var gi,Oh=a(()=>{gi=(r=>(r[r.Immediate=0]="Immediate",r[r.Delayed=1]="Delayed",r[r.Batched=2]="Batched",r[r.Scheduled=3]="Scheduled",r))(gi||{});});function Ai(){return getStructEncoder([["minimumLength",getU8Encoder()],["complexityRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["historyCount",getU8Encoder()],["maxAge",getI64Encoder()]])}function pi(){return getStructDecoder([["minimumLength",getU8Decoder()],["complexityRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["historyCount",getU8Decoder()],["maxAge",getI64Decoder()]])}function SB(){return combineCodec(Ai(),pi())}var Wh=a(()=>{});function li(){return getStructEncoder([["transactionId",getU64Encoder()],["transactionType",Ke()],["target",getAddressEncoder()],["data",addEncoderSizePrefix(getBytesEncoder(),getU32Encoder())],["requiredSignatures",getU8Encoder()],["signatures",getArrayEncoder(Vo())],["createdAt",getI64Encoder()],["expiresAt",getI64Encoder()],["priority",fi()],["executionConditions",getArrayEncoder(ge())],["status",xi()],["timeLock",getOptionEncoder(yi())]])}function mi(){return getStructDecoder([["transactionId",getU64Decoder()],["transactionType",He()],["target",getAddressDecoder()],["data",addDecoderSizePrefix(getBytesDecoder(),getU32Decoder())],["requiredSignatures",getU8Decoder()],["signatures",getArrayDecoder(Ko())],["createdAt",getI64Decoder()],["expiresAt",getI64Decoder()],["priority",Si()],["executionConditions",getArrayDecoder(Ae())],["status",Di()],["timeLock",getOptionDecoder(Ti())]])}function FB(){return combineCodec(li(),mi())}var Kh=a(()=>{m();});function Ii(){return getStructEncoder([["permissionId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["resourceType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["actions",getArrayEncoder(kn())],["scope",_i()],["constraints",getArrayEncoder(Mi())],["metadata",wi()]])}function vi(){return getStructDecoder([["permissionId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["resourceType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["actions",getArrayDecoder(wn())],["scope",zi()],["constraints",getArrayDecoder(ki())],["metadata",Ui()]])}function BB(){return combineCodec(Ii(),vi())}var $h=a(()=>{m();});function Mi(){return getStructEncoder([["constraintType",Oi()],["conditions",getArrayEncoder(Kr())],["enforcement",je()]])}function ki(){return getStructDecoder([["constraintType",Fi()],["conditions",getArrayDecoder(Hr())],["enforcement",$e()]])}function $B(){return combineCodec(Mi(),ki())}var qh=a(()=>{m();});function Oi(){return getEnumEncoder(Gi)}function Fi(){return getEnumDecoder(Gi)}function XB(){return combineCodec(Oi(),Fi())}var Gi,Jh=a(()=>{Gi=(i=>(i[i.Temporal=0]="Temporal",i[i.Contextual=1]="Contextual",i[i.Conditional=2]="Conditional",i[i.ResourceBased=3]="ResourceBased",i[i.AttributeBased=4]="AttributeBased",i[i.RiskBased=5]="RiskBased",i))(Gi||{});});function wi(){return getStructEncoder([["businessJustification",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["riskAssessment",Wi()],["complianceMapping",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["relatedPermissions",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["owner",getOptionEncoder(getAddressEncoder())],["lastReview",getOptionEncoder(getI64Encoder())],["reviewFrequency",getI64Encoder()]])}function Ui(){return getStructDecoder([["businessJustification",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["riskAssessment",Ni()],["complianceMapping",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["relatedPermissions",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["owner",getOptionDecoder(getAddressDecoder())],["lastReview",getOptionDecoder(getI64Decoder())],["reviewFrequency",getI64Decoder()]])}function rL(){return combineCodec(wi(),Ui())}var nE=a(()=>{m();});function _i(){return getStructEncoder([["scopeType",Vi()],["boundaries",Bi()],["hierarchical",getBooleanEncoder()],["inherited",getBooleanEncoder()]])}function zi(){return getStructDecoder([["scopeType",Ki()],["boundaries",Li()],["hierarchical",getBooleanDecoder()],["inherited",getBooleanDecoder()]])}function sL(){return combineCodec(_i(),zi())}var iE=a(()=>{m();});function xn(){return getStructEncoder([["author",getOptionEncoder(getAddressEncoder())],["approver",getOptionEncoder(getAddressEncoder())],["approvalDate",getOptionEncoder(getI64Encoder())],["businessJustification",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["complianceReferences",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["riskAssessment",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["reviewSchedule",$i()]])}function Dn(){return getStructDecoder([["author",getOptionDecoder(getAddressDecoder())],["approver",getOptionDecoder(getAddressDecoder())],["approvalDate",getOptionDecoder(getI64Decoder())],["businessJustification",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["complianceReferences",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["riskAssessment",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["reviewSchedule",qi()]])}function mL(){return combineCodec(xn(),Dn())}var aE=a(()=>{m();});function hn(){return getStructEncoder([["ruleId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["conditions",getArrayEncoder(Ji())],["effect",Xi()],["priority",getU8Encoder()],["enabled",getBooleanEncoder()]])}function En(){return getStructDecoder([["ruleId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["conditions",getArrayDecoder(Qi())],["effect",Zi()],["priority",getU8Decoder()],["enabled",getBooleanDecoder()]])}function kL(){return combineCodec(hn(),En())}var dE=a(()=>{m();});function Pn(){return getStructEncoder([["subjects",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["resources",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["actions",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["inheritance",Yi()]])}function Cn(){return getStructDecoder([["subjects",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["resources",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["actions",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["inheritance",ec()]])}function zL(){return combineCodec(Pn(),Cn())}var uE=a(()=>{m();});function bn(){return getEnumEncoder(tc)}function Rn(){return getEnumDecoder(tc)}function WL(){return combineCodec(bn(),Rn())}var tc,gE=a(()=>{tc=(i=>(i[i.Active=0]="Active",i[i.Inactive=1]="Inactive",i[i.Draft=2]="Draft",i[i.UnderReview=3]="UnderReview",i[i.Deprecated=4]="Deprecated",i[i.Suspended=5]="Suspended",i))(tc||{});});function In(){return getEnumEncoder(nc)}function vn(){return getEnumDecoder(nc)}function VL(){return combineCodec(In(),vn())}var nc,AE=a(()=>{nc=(i=>(i[i.Allow=0]="Allow",i[i.Deny=1]="Deny",i[i.Conditional=2]="Conditional",i[i.Delegated=3]="Delegated",i[i.Temporary=4]="Temporary",i[i.Emergency=5]="Emergency",i))(nc||{});});function J(){return getEnumEncoder(Et)}function Q(){return getEnumDecoder(Et)}function $L(){return combineCodec(J(),Q())}var Et,pE=a(()=>{Et=(s=>(s[s.Fixed=0]="Fixed",s[s.Hourly=1]="Hourly",s[s.PerTask=2]="PerTask",s[s.Subscription=3]="Subscription",s[s.Auction=4]="Auction",s[s.Dynamic=5]="Dynamic",s[s.RevenueShare=6]="RevenueShare",s[s.Tiered=7]="Tiered",s))(Et||{});});function rc(){return getStructEncoder([["pubkey",getAddressEncoder()],["isSigner",getBooleanEncoder()],["isWritable",getBooleanEncoder()],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function oc(){return getStructDecoder([["pubkey",getAddressDecoder()],["isSigner",getBooleanDecoder()],["isWritable",getBooleanDecoder()],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function iV(){return combineCodec(rc(),oc())}var yE=a(()=>{});function Do(){return getStructEncoder([["programId",getAddressEncoder()],["accounts",getArrayEncoder(rc())],["data",addEncoderSizePrefix(getBytesEncoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function ho(){return getStructDecoder([["programId",getAddressDecoder()],["accounts",getArrayDecoder(oc())],["data",addDecoderSizePrefix(getBytesDecoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function TV(){return combineCodec(Do(),ho())}var DE=a(()=>{m();});function sc(){return getStructEncoder([["ipfsHash",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["externalReferences",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["tags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["riskAssessment",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["impactAnalysis",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["implementationTimeline",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function ac(){return getStructDecoder([["ipfsHash",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["externalReferences",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["tags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["riskAssessment",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["impactAnalysis",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["implementationTimeline",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function DV(){return combineCodec(sc(),ac())}var PE=a(()=>{});function uc(){return getEnumEncoder(dc)}function gc(){return getEnumDecoder(dc)}function CV(){return combineCodec(uc(),gc())}var dc,CE=a(()=>{dc=(s=>(s[s.Draft=0]="Draft",s[s.Active=1]="Active",s[s.Passed=2]="Passed",s[s.Failed=3]="Failed",s[s.Executed=4]="Executed",s[s.Cancelled=5]="Cancelled",s[s.Expired=6]="Expired",s[s.Queued=7]="Queued",s))(dc||{});});function de(){return getEnumEncoder(Pt)}function ue(){return getEnumDecoder(Pt)}function vV(){return combineCodec(de(),ue())}var Pt,Qg=a(()=>{Pt=(s=>(s[s.ParameterUpdate=0]="ParameterUpdate",s[s.ProtocolUpgrade=1]="ProtocolUpgrade",s[s.TreasuryOperation=2]="TreasuryOperation",s[s.FeeUpdate=3]="FeeUpdate",s[s.SecurityUpdate=4]="SecurityUpdate",s[s.GovernanceUpdate=5]="GovernanceUpdate",s[s.EmergencyAction=6]="EmergencyAction",s[s.Custom=7]="Custom",s))(Pt||{});});function ME(){return getStructEncoder([["authority",getAddressEncoder()],["feesEnabled",getBooleanEncoder()],["escrowFeeBps",getU16Encoder()],["agentRegistrationFee",getU64Encoder()],["listingFee",getU64Encoder()],["disputeFeeBps",getU16Encoder()],["timestamp",getI64Encoder()]])}function kE(){return getStructDecoder([["authority",getAddressDecoder()],["feesEnabled",getBooleanDecoder()],["escrowFeeBps",getU16Decoder()],["agentRegistrationFee",getU64Decoder()],["listingFee",getU64Decoder()],["disputeFeeBps",getU16Decoder()],["timestamp",getI64Decoder()]])}function WV(){return combineCodec(ME(),kE())}var wE=a(()=>{});function pc(){return getEnumEncoder(Ac)}function lc(){return getEnumDecoder(Ac)}function VV(){return combineCodec(pc(),lc())}var Ac,UE=a(()=>{Ac=(r=>(r[r.Absolute=0]="Absolute",r[r.Relative=1]="Relative",r[r.Weighted=2]="Weighted",r[r.Dynamic=3]="Dynamic",r))(Ac||{});});function mc(){return getStructEncoder([["minimumParticipation",getU8Encoder()],["approvalThreshold",getU8Encoder()],["superMajorityRequired",getBooleanEncoder()],["minimumVotingPower",getU64Encoder()],["quorumMethod",pc()]])}function yc(){return getStructDecoder([["minimumParticipation",getU8Decoder()],["approvalThreshold",getU8Decoder()],["superMajorityRequired",getBooleanDecoder()],["minimumVotingPower",getU64Decoder()],["quorumMethod",lc()]])}function XV(){return combineCodec(mc(),yc())}var OE=a(()=>{m();});function WE(){return getStructEncoder([["rbacConfig",getAddressEncoder()],["authority",getAddressEncoder()],["rolesCount",getU32Encoder()]])}function NE(){return getStructDecoder([["rbacConfig",getAddressDecoder()],["authority",getAddressDecoder()],["rolesCount",getU32Decoder()]])}function r3(){return combineCodec(WE(),NE())}var BE=a(()=>{});function fc(){return getEnumEncoder(Tc)}function Sc(){return getEnumDecoder(Tc)}function s3(){return combineCodec(fc(),Sc())}var Tc,LE=a(()=>{Tc=(t=>(t[t.Unlocked=0]="Unlocked",t[t.Locked=1]="Locked",t))(Tc||{});});function xc(){return getStructEncoder([["summary",Pc()],["entries",getArrayEncoder(hc())],["complianceMetrics",zr()],["riskIndicators",getArrayEncoder(bc())],["recommendations",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function Dc(){return getStructDecoder([["summary",Cc()],["entries",getArrayDecoder(Ec())],["complianceMetrics",Or()],["riskIndicators",getArrayDecoder(Rc())],["recommendations",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function T3(){return combineCodec(xc(),Dc())}var VE=a(()=>{m();});function hc(){return getStructEncoder([["data",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function Ec(){return getStructDecoder([["data",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function R3(){return combineCodec(hc(),Ec())}var KE=a(()=>{});function nr(){return getEnumEncoder(Ic)}function rr(){return getEnumDecoder(Ic)}function k3(){return combineCodec(nr(),rr())}var Ic,HE=a(()=>{Ic=(i=>(i[i.Daily=0]="Daily",i[i.Weekly=1]="Weekly",i[i.Monthly=2]="Monthly",i[i.Quarterly=3]="Quarterly",i[i.Annually=4]="Annually",i[i.OnDemand=5]="OnDemand",i))(Ic||{});});function Mc(){return getEnumEncoder(vc)}function kc(){return getEnumDecoder(vc)}function z3(){return combineCodec(Mc(),kc())}var vc,jE=a(()=>{vc=(d=>(d[d.Draft=0]="Draft",d[d.Generated=1]="Generated",d[d.Reviewed=2]="Reviewed",d[d.Approved=3]="Approved",d[d.Submitted=4]="Submitted",d[d.Acknowledged=5]="Acknowledged",d[d.Rejected=6]="Rejected",d))(vc||{});});function Pc(){return getStructEncoder([["totalTransactions",getU64Encoder()],["totalVolume",getU64Encoder()],["highRiskTransactions",getU64Encoder()],["complianceViolations",getU64Encoder()],["securityIncidents",getU64Encoder()],["averageRiskScore",getU8Encoder()]])}function Cc(){return getStructDecoder([["totalTransactions",getU64Decoder()],["totalVolume",getU64Decoder()],["highRiskTransactions",getU64Decoder()],["complianceViolations",getU64Decoder()],["securityIncidents",getU64Decoder()],["averageRiskScore",getU8Decoder()]])}function B3(){return combineCodec(Pc(),Cc())}var $E=a(()=>{});function se(){return getEnumEncoder(wc)}function ae(){return getEnumDecoder(wc)}function H3(){return combineCodec(se(),ae())}var wc,qE=a(()=>{wc=(s=>(s[s.FinancialTransactions=0]="FinancialTransactions",s[s.SuspiciousActivity=1]="SuspiciousActivity",s[s.RegulatoryCompliance=2]="RegulatoryCompliance",s[s.SecurityIncidents=3]="SecurityIncidents",s[s.AuditSummary=4]="AuditSummary",s[s.RiskAssessment=5]="RiskAssessment",s[s.GovernanceActivity=6]="GovernanceActivity",s[s.DataPrivacyCompliance=7]="DataPrivacyCompliance",s))(wc||{});});function ct(){return getStructEncoder([["sourceType",Uc()],["score",getU64Encoder()],["weight",getU32Encoder()],["lastUpdated",getI64Encoder()],["dataPoints",getU64Encoder()]])}function st(){return getStructDecoder([["sourceType",_c()],["score",getU64Decoder()],["weight",getU32Decoder()],["lastUpdated",getI64Decoder()],["dataPoints",getU64Decoder()]])}function Y3(){return combineCodec(ct(),st())}var XE=a(()=>{m();});function ZE(){return getStructEncoder([["agent",getAddressEncoder()],["timestamp",getI64Encoder()]])}function YE(){return getStructDecoder([["agent",getAddressDecoder()],["timestamp",getI64Decoder()]])}function s5(){return combineCodec(ZE(),YE())}var eP=a(()=>{});function tP(){return getStructEncoder([["agent",getAddressEncoder()],["paymentSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["amount",getU64Encoder()],["responseTimeMs",getU64Encoder()],["success",getBooleanEncoder()],["newReputationScore",getU64Encoder()],["timestamp",getI64Encoder()]])}function nP(){return getStructDecoder([["agent",getAddressDecoder()],["paymentSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["amount",getU64Decoder()],["responseTimeMs",getU64Decoder()],["success",getBooleanDecoder()],["newReputationScore",getU64Decoder()],["timestamp",getI64Decoder()]])}function E5(){return combineCodec(tP(),nP())}var rP=a(()=>{});function cP(){return getStructEncoder([["agent",getAddressEncoder()],["client",getAddressEncoder()],["rating",getU8Encoder()],["newReputationScore",getU64Encoder()],["timestamp",getI64Encoder()]])}function sP(){return getStructDecoder([["agent",getAddressDecoder()],["client",getAddressDecoder()],["rating",getU8Decoder()],["newReputationScore",getU64Decoder()],["timestamp",getI64Decoder()]])}function U5(){return combineCodec(cP(),sP())}var aP=a(()=>{});function Uc(){return getEnumEncoder(zc)}function _c(){return getEnumDecoder(zc)}function F5(){return combineCodec(Uc(),_c())}var zc,dP=a(()=>{zc=(s=>(s[s.AccountAge=0]="AccountAge",s[s.X402Transactions=1]="X402Transactions",s[s.UserReviews=2]="UserReviews",s[s.ElizaOSReputation=3]="ElizaOSReputation",s[s.CrossmintVerification=4]="CrossmintVerification",s[s.EndpointReliability=5]="EndpointReliability",s[s.JobCompletions=6]="JobCompletions",s[s.SkillEndorsements=7]="SkillEndorsements",s))(zc||{});});function uP(){return getStructEncoder([["agent",getAddressEncoder()],["totalTags",getU32Encoder()],["skillTagsCount",getU32Encoder()],["behaviorTagsCount",getU32Encoder()],["complianceTagsCount",getU32Encoder()],["tagScoresCount",getU32Encoder()],["timestamp",getI64Encoder()]])}function gP(){return getStructDecoder([["agent",getAddressDecoder()],["totalTags",getU32Decoder()],["skillTagsCount",getU32Decoder()],["behaviorTagsCount",getU32Decoder()],["complianceTagsCount",getU32Decoder()],["tagScoresCount",getU32Decoder()],["timestamp",getI64Decoder()]])}function H5(){return combineCodec(uP(),gP())}var AP=a(()=>{});function Oc(){return getStructEncoder([["maxUsage",getU8Encoder()]])}function Fc(){return getStructDecoder([["maxUsage",getU8Decoder()]])}function X5(){return combineCodec(Oc(),Fc())}var pP=a(()=>{});function $i(){return getStructEncoder([["frequency",getI64Encoder()],["lastReview",getOptionEncoder(getI64Encoder())],["nextReview",getI64Encoder()],["reviewOwners",getArrayEncoder(getAddressEncoder())],["reviewCriteria",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function qi(){return getStructDecoder([["frequency",getI64Decoder()],["lastReview",getOptionDecoder(getI64Decoder())],["nextReview",getI64Decoder()],["reviewOwners",getArrayDecoder(getAddressDecoder())],["reviewCriteria",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function g9(){return combineCodec($i(),qi())}var yP=a(()=>{});function Nc(){return getStructEncoder([["accepted",getBooleanEncoder()],["acceptingAuthority",getOptionEncoder(getAddressEncoder())],["acceptanceDate",getOptionEncoder(getI64Encoder())],["reasoning",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["reviewDate",getOptionEncoder(getI64Encoder())]])}function Bc(){return getStructDecoder([["accepted",getBooleanDecoder()],["acceptingAuthority",getOptionDecoder(getAddressDecoder())],["acceptanceDate",getOptionDecoder(getI64Decoder())],["reasoning",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["reviewDate",getOptionDecoder(getI64Decoder())]])}function C9(){return combineCodec(Nc(),Bc())}var SP=a(()=>{});function Wi(){return getStructEncoder([["riskScore",getU8Encoder()],["riskFactors",getArrayEncoder(Lc())],["mitigationMeasures",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["riskAcceptance",Nc()]])}function Ni(){return getStructDecoder([["riskScore",getU8Decoder()],["riskFactors",getArrayDecoder(Vc())],["mitigationMeasures",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["riskAcceptance",Bc()]])}function F9(){return combineCodec(Wi(),Ni())}var hP=a(()=>{m();});function Hc(){return getEnumEncoder(Kc)}function jc(){return getEnumDecoder(Kc)}function B9(){return combineCodec(Hc(),jc())}var Kc,EP=a(()=>{Kc=(d=>(d[d.Operational=0]="Operational",d[d.Financial=1]="Financial",d[d.Compliance=2]="Compliance",d[d.Security=3]="Security",d[d.Reputational=4]="Reputational",d[d.Technical=5]="Technical",d[d.Legal=6]="Legal",d))(Kc||{});});function Lc(){return getStructEncoder([["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["category",Hc()],["impact",getU8Encoder()],["likelihood",getU8Encoder()],["riskScore",getU8Encoder()]])}function Vc(){return getStructDecoder([["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["category",jc()],["impact",getU8Decoder()],["likelihood",getU8Decoder()],["riskScore",getU8Decoder()]])}function X9(){return combineCodec(Lc(),Vc())}var PP=a(()=>{m();});function bc(){return getStructEncoder([["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["currentValue",getU64Encoder()],["thresholdValue",getU64Encoder()],["trend",$c()],["severity",Jc()],["recommendedActions",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function Rc(){return getStructDecoder([["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["currentValue",getU64Decoder()],["thresholdValue",getU64Decoder()],["trend",qc()],["severity",Qc()],["recommendedActions",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function rK(){return combineCodec(bc(),Rc())}var UP=a(()=>{m();});function Zc(){return getEnumEncoder(Xc)}function Yc(){return getEnumDecoder(Xc)}function sK(){return combineCodec(Zc(),Yc())}var Xc,_P=a(()=>{Xc=(r=>(r[r.Low=0]="Low",r[r.Medium=1]="Medium",r[r.High=2]="High",r[r.Critical=3]="Critical",r))(Xc||{});});function at(){return getStructEncoder([["roleId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["roleType",cs()],["permissions",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["constraints",es()],["inheritsFrom",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["metadata",ns()],["status",os()],["createdAt",getI64Encoder()],["modifiedAt",getI64Encoder()]])}function dt(){return getStructDecoder([["roleId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["roleType",ss()],["permissions",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["constraints",ts()],["inheritsFrom",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["metadata",rs()],["status",is()],["createdAt",getI64Decoder()],["modifiedAt",getI64Decoder()]])}function gK(){return combineCodec(at(),dt())}var WP=a(()=>{m();});function es(){return getStructEncoder([["timeConstraints",getOptionEncoder(As())],["locationConstraints",getOptionEncoder(Bo())],["resourceConstraints",getOptionEncoder(Oc())],["sessionConstraints",getOptionEncoder(as())],["sodConstraints",getArrayEncoder(us())],["maxConcurrentSessions",getOptionEncoder(getU32Encoder())],["activationRequirements",getArrayEncoder(Fn())]])}function ts(){return getStructDecoder([["timeConstraints",getOptionDecoder(ps())],["locationConstraints",getOptionDecoder(Lo())],["resourceConstraints",getOptionDecoder(Fc())],["sessionConstraints",getOptionDecoder(ds())],["sodConstraints",getArrayDecoder(gs())],["maxConcurrentSessions",getOptionDecoder(getU32Decoder())],["activationRequirements",getArrayDecoder(Gn())]])}function TK(){return combineCodec(es(),ts())}var LP=a(()=>{m();});function ns(){return getStructEncoder([["businessPurpose",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["riskLevel",Zc()],["dataAccessLevel",ro()],["complianceRequirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["roleOwner",getOptionEncoder(getAddressEncoder())],["roleCustodian",getOptionEncoder(getAddressEncoder())],["reviewFrequency",getI64Encoder()],["lastReview",getOptionEncoder(getI64Encoder())],["nextReview",getOptionEncoder(getI64Encoder())]])}function rs(){return getStructDecoder([["businessPurpose",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["riskLevel",Yc()],["dataAccessLevel",oo()],["complianceRequirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["roleOwner",getOptionDecoder(getAddressDecoder())],["roleCustodian",getOptionDecoder(getAddressDecoder())],["reviewFrequency",getI64Decoder()],["lastReview",getOptionDecoder(getI64Decoder())],["nextReview",getOptionDecoder(getI64Decoder())]])}function EK(){return combineCodec(ns(),rs())}var XP=a(()=>{m();});function os(){return getEnumEncoder(ys)}function is(){return getEnumDecoder(ys)}function RK(){return combineCodec(os(),is())}var ys,ZP=a(()=>{ys=(c=>(c[c.Active=0]="Active",c[c.Inactive=1]="Inactive",c[c.Deprecated=2]="Deprecated",c[c.UnderReview=3]="UnderReview",c[c.Suspended=4]="Suspended",c))(ys||{});});function cs(){return getEnumEncoder(Ts)}function ss(){return getEnumDecoder(Ts)}function kK(){return combineCodec(cs(),ss())}var Ts,YP=a(()=>{Ts=(s=>(s[s.Administrative=0]="Administrative",s[s.Operational=1]="Operational",s[s.ReadOnly=2]="ReadOnly",s[s.Compliance=3]="Compliance",s[s.Emergency=4]="Emergency",s[s.Custom=5]="Custom",s[s.Service=6]="Service",s[s.Guest=7]="Guest",s))(Ts||{});});function Ji(){return getStructEncoder([["expression",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function Qi(){return getStructDecoder([["expression",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function BK(){return combineCodec(Ji(),Qi())}var eC=a(()=>{});function Xi(){return getEnumEncoder(fs)}function Zi(){return getEnumDecoder(fs)}function HK(){return combineCodec(Xi(),Zi())}var fs,tC=a(()=>{fs=(i=>(i[i.Allow=0]="Allow",i[i.Deny=1]="Deny",i[i.AuditOnly=2]="AuditOnly",i[i.RequireApproval=3]="RequireApproval",i[i.RequireMfa=4]="RequireMfa",i[i.RequireJustification=5]="RequireJustification",i))(fs||{});});function Bi(){return getStructEncoder([["includedResources",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["excludedResources",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["resourcePatterns",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["hierarchicalBoundaries",getArrayEncoder(ko())]])}function Li(){return getStructDecoder([["includedResources",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["excludedResources",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["resourcePatterns",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["hierarchicalBoundaries",getArrayDecoder(wo())]])}function JK(){return combineCodec(Bi(),Li())}var nC=a(()=>{m();});function Yi(){return getEnumEncoder(Ds)}function ec(){return getEnumDecoder(Ds)}function YK(){return combineCodec(Yi(),ec())}var Ds,rC=a(()=>{Ds=(r=>(r[r.None=0]="None",r[r.Hierarchical=1]="Hierarchical",r[r.Delegated=2]="Delegated",r[r.Inherited=3]="Inherited",r))(Ds||{});});function Vi(){return getEnumEncoder(hs)}function Ki(){return getEnumDecoder(hs)}function rH(){return combineCodec(Vi(),Ki())}var hs,oC=a(()=>{hs=(i=>(i[i.Global=0]="Global",i[i.Organization=1]="Organization",i[i.Department=2]="Department",i[i.Project=3]="Project",i[i.Resource=4]="Resource",i[i.Individual=5]="Individual",i))(hs||{});});function ci(){return getEnumEncoder(Es)}function si(){return getEnumDecoder(Es)}function sH(){return combineCodec(ci(),si())}var Es,iC=a(()=>{Es=(s=>(s[s.AccountLockout=0]="AccountLockout",s[s.PasswordChange=1]="PasswordChange",s[s.PrivilegeEscalation=2]="PrivilegeEscalation",s[s.SuspiciousActivity=3]="SuspiciousActivity",s[s.PolicyViolation=4]="PolicyViolation",s[s.AccessDenied=5]="AccessDenied",s[s.DataBreach=6]="DataBreach",s[s.SystemCompromise=7]="SystemCompromise",s))(Es||{});});function Ps(){return getStructEncoder([["authentication",yr()],["authorization",Pr()],["password",Ai()],["session",bs()],["dataProtection",io()],["networkSecurity",qo()],["incidentResponse",Uo()],["compliance",Fr()]])}function Cs(){return getStructDecoder([["authentication",Tr()],["authorization",Cr()],["password",pi()],["session",Rs()],["dataProtection",co()],["networkSecurity",Jo()],["incidentResponse",_o()],["compliance",Gr()]])}function gH(){return combineCodec(Ps(),Cs())}var cC=a(()=>{m();});function me(){return getStructEncoder([["id",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["serviceType",Is()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]])}function ye(){return getStructDecoder([["id",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["serviceType",vs()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function mH(){return combineCodec(me(),ye())}var sC=a(()=>{m();});function Is(){return getEnumEncoder(Ms)}function vs(){return getEnumDecoder(Ms)}function SH(){return combineCodec(Is(),vs())}var Ms,aC=a(()=>{Ms=(c=>(c[c.AIAgentService=0]="AIAgentService",c[c.DIDCommMessaging=1]="DIDCommMessaging",c[c.CredentialRepository=2]="CredentialRepository",c[c.LinkedDomains=3]="LinkedDomains",c[c.Custom=4]="Custom",c))(Ms||{});});function as(){return getStructEncoder([["maxSessionDuration",getI64Encoder()],["idleTimeout",getI64Encoder()],["reauthInterval",getI64Encoder()],["mfaRequired",getBooleanEncoder()],["deviceFingerprinting",getBooleanEncoder()],["sessionEncryption",getBooleanEncoder()]])}function ds(){return getStructDecoder([["maxSessionDuration",getI64Decoder()],["idleTimeout",getI64Decoder()],["reauthInterval",getI64Decoder()],["mfaRequired",getBooleanDecoder()],["deviceFingerprinting",getBooleanDecoder()],["sessionEncryption",getBooleanDecoder()]])}function EH(){return combineCodec(as(),ds())}var dC=a(()=>{});function bs(){return getStructEncoder([["maxSessionDuration",getI64Encoder()],["idleTimeout",getI64Encoder()],["concurrentSessions",getU8Encoder()]])}function Rs(){return getStructDecoder([["maxSessionDuration",getI64Decoder()],["idleTimeout",getI64Decoder()],["concurrentSessions",getU8Decoder()]])}function vH(){return combineCodec(bs(),Rs())}var AC=a(()=>{});function Qe(){return getEnumEncoder(ks)}function Xe(){return getEnumDecoder(ks)}function UH(){return combineCodec(Qe(),Xe())}var ks,pC=a(()=>{ks=(o=>(o[o.Fraud=0]="Fraud",o[o.DisputeLoss=1]="DisputeLoss",o[o.Custom=2]="Custom",o))(ks||{});});function us(){return getStructEncoder([["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["conflictingRoles",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["constraintType",ws()],["enforcementLevel",je()],["exceptionProcedures",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function gs(){return getStructDecoder([["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["conflictingRoles",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["constraintType",Us()],["enforcementLevel",$e()],["exceptionProcedures",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function FH(){return combineCodec(us(),gs())}var yC=a(()=>{m();});function ws(){return getEnumEncoder(_s)}function Us(){return getEnumDecoder(_s)}function BH(){return combineCodec(ws(),Us())}var _s,TC=a(()=>{_s=(r=>(r[r.Static=0]="Static",r[r.Dynamic=1]="Dynamic",r[r.Temporal=2]="Temporal",r[r.Contextual=3]="Contextual",r))(_s||{});});function xC(){return getStructEncoder([["agent",getAddressEncoder()],["sourceName",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["sourceScore",getU16Encoder()],["weightedAggregateScore",getU64Encoder()],["hasConflict",getBooleanEncoder()],["totalSources",getU32Encoder()],["timestamp",getI64Encoder()]])}function DC(){return getStructDecoder([["agent",getAddressDecoder()],["sourceName",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["sourceScore",getU16Decoder()],["weightedAggregateScore",getU64Decoder()],["hasConflict",getBooleanDecoder()],["totalSources",getU32Decoder()],["timestamp",getI64Decoder()]])}function i7(){return combineCodec(xC(),DC())}var hC=a(()=>{});function zs(){return getStructEncoder([["sourceName",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["score",getU16Encoder()],["weight",getU16Encoder()],["dataPoints",getU32Encoder()],["reliability",getU16Encoder()],["lastUpdated",getI64Encoder()]])}function Os(){return getStructDecoder([["sourceName",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["score",getU16Decoder()],["weight",getU16Decoder()],["dataPoints",getU32Decoder()],["reliability",getU16Decoder()],["lastUpdated",getI64Decoder()]])}function m7(){return combineCodec(zs(),Os())}var CC=a(()=>{});function hr(){return getEnumEncoder(Fs)}function Er(){return getEnumDecoder(Fs)}function S7(){return combineCodec(hr(),Er())}var Fs,bC=a(()=>{Fs=(d=>(d[d.HighRiskAction=0]="HighRiskAction",d[d.SensitiveData=1]="SensitiveData",d[d.LargeTransaction=2]="LargeTransaction",d[d.NewDevice=3]="NewDevice",d[d.UnusualLocation=4]="UnusualLocation",d[d.TimeBasedRisk=5]="TimeBasedRisk",d[d.BehaviorAnomaly=6]="BehaviorAnomaly",d))(Fs||{});});function Gs(){return getStructEncoder([["submittedAt",getI64Encoder()],["regulatoryBody",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["submissionReference",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["acknowledged",getBooleanEncoder()],["acknowledgedAt",getOptionEncoder(getI64Encoder())],["regulatoryResponse",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]])}function Ws(){return getStructDecoder([["submittedAt",getI64Decoder()],["regulatoryBody",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["submissionReference",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["acknowledged",getBooleanDecoder()],["acknowledgedAt",getOptionDecoder(getI64Decoder())],["regulatoryResponse",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function C7(){return combineCodec(Gs(),Ws())}var kC=a(()=>{});function _C(){return getStructEncoder([["agent",getAddressEncoder()],["tagsRemoved",getU32Encoder()],["remainingTags",getU32Encoder()],["timestamp",getI64Encoder()]])}function zC(){return getStructDecoder([["agent",getAddressDecoder()],["tagsRemoved",getU32Decoder()],["remainingTags",getU32Decoder()],["timestamp",getI64Decoder()]])}function U7(){return combineCodec(_C(),zC())}var OC=a(()=>{});function ut(){return getStructEncoder([["tagName",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["confidence",getU16Encoder()],["evidenceCount",getU32Encoder()],["lastUpdated",getI64Encoder()]])}function gt(){return getStructDecoder([["tagName",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["confidence",getU16Decoder()],["evidenceCount",getU32Decoder()],["lastUpdated",getI64Decoder()]])}function H7(){return combineCodec(ut(),gt())}var WC=a(()=>{});function LC(){return getStructEncoder([["agent",getAddressEncoder()],["oldTier",j()],["newTier",j()],["totalStaked",getU64Encoder()],["dailyApiCalls",getU32Encoder()],["votingPower",getU64Encoder()]])}function VC(){return getStructDecoder([["agent",getAddressDecoder()],["oldTier",$()],["newTier",$()],["totalStaked",getU64Decoder()],["dailyApiCalls",getU32Decoder()],["votingPower",getU64Decoder()]])}function Y7(){return combineCodec(LC(),VC())}var KC=a(()=>{m();});function As(){return getStructEncoder([["allowedHours",addEncoderSizePrefix(getBytesEncoder(),getU32Encoder())],["allowedDays",addEncoderSizePrefix(getBytesEncoder(),getU32Encoder())],["timezone",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["maxSessionDuration",getOptionEncoder(getI64Encoder())],["expiresAt",getOptionEncoder(getI64Encoder())],["reactivationPeriod",getOptionEncoder(getI64Encoder())]])}function ps(){return getStructDecoder([["allowedHours",addDecoderSizePrefix(getBytesDecoder(),getU32Decoder())],["allowedDays",addDecoderSizePrefix(getBytesDecoder(),getU32Decoder())],["timezone",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["maxSessionDuration",getOptionDecoder(getI64Decoder())],["expiresAt",getOptionDecoder(getI64Decoder())],["reactivationPeriod",getOptionDecoder(getI64Decoder())]])}function ij(){return combineCodec(As(),ps())}var $C=a(()=>{});function yi(){return getStructEncoder([["duration",getI64Encoder()],["lockedAt",getI64Encoder()],["unlocksAt",getI64Encoder()],["earlyUnlockConditions",getArrayEncoder(ge())],["lockType",Ns()],["cancellable",getBooleanEncoder()]])}function Ti(){return getStructDecoder([["duration",getI64Decoder()],["lockedAt",getI64Decoder()],["unlocksAt",getI64Decoder()],["earlyUnlockConditions",getArrayDecoder(Ae())],["lockType",Bs()],["cancellable",getBooleanDecoder()]])}function pj(){return combineCodec(yi(),Ti())}var qC=a(()=>{m();});function Ns(){return getEnumEncoder(Ls)}function Bs(){return getEnumDecoder(Ls)}function Tj(){return combineCodec(Ns(),Bs())}var Ls,JC=a(()=>{Ls=(r=>(r[r.Standard=0]="Standard",r[r.Vesting=1]="Vesting",r[r.Emergency=2]="Emergency",r[r.Governance=3]="Governance",r))(Ls||{});});function fi(){return getEnumEncoder(Vs)}function Si(){return getEnumDecoder(Vs)}function Dj(){return combineCodec(fi(),Si())}var Vs,QC=a(()=>{Vs=(c=>(c[c.Low=0]="Low",c[c.Normal=1]="Normal",c[c.High=2]="High",c[c.Critical=3]="Critical",c[c.Emergency=4]="Emergency",c))(Vs||{});});function xi(){return getEnumEncoder(Ks)}function Di(){return getEnumDecoder(Ks)}function Cj(){return combineCodec(xi(),Di())}var Ks,XC=a(()=>{Ks=(d=>(d[d.Pending=0]="Pending",d[d.PartiallyApproved=1]="PartiallyApproved",d[d.FullyApproved=2]="FullyApproved",d[d.Executed=3]="Executed",d[d.Cancelled=4]="Cancelled",d[d.Expired=5]="Expired",d[d.Failed=6]="Failed",d))(Ks||{});});function Ke(){return getEnumEncoder(Hs)}function He(){return getEnumDecoder(Hs)}function vj(){return combineCodec(Ke(),He())}var Hs,ZC=a(()=>{Hs=(R=>(R[R.Transfer=0]="Transfer",R[R.Withdrawal=1]="Withdrawal",R[R.EscrowRelease=2]="EscrowRelease",R[R.ProposalCreation=3]="ProposalCreation",R[R.VoteExecution=4]="VoteExecution",R[R.ParameterUpdate=5]="ParameterUpdate",R[R.SignerAddition=6]="SignerAddition",R[R.SignerRemoval=7]="SignerRemoval",R[R.ThresholdUpdate=8]="ThresholdUpdate",R[R.ConfigUpdate=9]="ConfigUpdate",R[R.EmergencyFreeze=10]="EmergencyFreeze",R[R.EmergencyUnfreeze=11]="EmergencyUnfreeze",R[R.SecurityPolicyUpdate=12]="SecurityPolicyUpdate",R[R.ProtocolUpgrade=13]="ProtocolUpgrade",R[R.FeatureToggle=14]="FeatureToggle",R[R.RiskParameterUpdate=15]="RiskParameterUpdate",R[R.CustomInstruction=16]="CustomInstruction",R))(Hs||{});});function $c(){return getEnumEncoder(js)}function qc(){return getEnumDecoder(js)}function Uj(){return combineCodec($c(),qc())}var js,YC=a(()=>{js=(r=>(r[r.Increasing=0]="Increasing",r[r.Decreasing=1]="Decreasing",r[r.Stable=2]="Stable",r[r.Unknown=3]="Unknown",r))(js||{});});function zn(){return getEnumEncoder($s)}function On(){return getEnumDecoder($s)}function Fj(){return combineCodec(zn(),On())}var $s,eb=a(()=>{$s=(c=>(c[c.TimeBasedAutoUnlock=0]="TimeBasedAutoUnlock",c[c.AdminUnlock=1]="AdminUnlock",c[c.SelfServiceUnlock=2]="SelfServiceUnlock",c[c.MultiFactorUnlock=3]="MultiFactorUnlock",c[c.SupervisorUnlock=4]="SupervisorUnlock",c))($s||{});});function qr(){return getEnumEncoder(qs)}function Jr(){return getEnumDecoder(qs)}function Bj(){return combineCodec(qr(),Jr())}var qs,tb=a(()=>{qs=(s=>(s[s.String=0]="String",s[s.Number=1]="Number",s[s.Boolean=2]="Boolean",s[s.Date=3]="Date",s[s.Time=4]="Time",s[s.Duration=5]="Duration",s[s.List=6]="List",s[s.Object=7]="Object",s))(qs||{});});function Te(){return getStructEncoder([["id",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["methodType",Js()],["controller",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["publicKeyMultibase",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["relationships",getArrayEncoder(Xs())],["createdAt",getI64Encoder()],["revoked",getBooleanEncoder()]])}function fe(){return getStructDecoder([["id",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["methodType",Qs()],["controller",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["publicKeyMultibase",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["relationships",getArrayDecoder(Zs())],["createdAt",getI64Decoder()],["revoked",getBooleanDecoder()]])}function Xj(){return combineCodec(Te(),fe())}var nb=a(()=>{m();});function Js(){return getEnumEncoder(Ys)}function Qs(){return getEnumDecoder(Ys)}function t$(){return combineCodec(Js(),Qs())}var Ys,rb=a(()=>{Ys=(o=>(o[o.Ed25519VerificationKey2020=0]="Ed25519VerificationKey2020",o[o.X25519KeyAgreementKey2020=1]="X25519KeyAgreementKey2020",o[o.EcdsaSecp256k1VerificationKey2019=2]="EcdsaSecp256k1VerificationKey2019",o))(Ys||{});});function Xs(){return getEnumEncoder(ea)}function Zs(){return getEnumDecoder(ea)}function i$(){return combineCodec(Xs(),Zs())}var ea,ob=a(()=>{ea=(c=>(c[c.Authentication=0]="Authentication",c[c.AssertionMethod=1]="AssertionMethod",c[c.KeyAgreement=2]="KeyAgreement",c[c.CapabilityInvocation=3]="CapabilityInvocation",c[c.CapabilityDelegation=4]="CapabilityDelegation",c))(ea||{});});function Jc(){return getEnumEncoder(ta)}function Qc(){return getEnumDecoder(ta)}function d$(){return combineCodec(Jc(),Qc())}var ta,ib=a(()=>{ta=(r=>(r[r.Low=0]="Low",r[r.Medium=1]="Medium",r[r.High=2]="High",r[r.Critical=3]="Critical",r))(ta||{});});function na(){return getStructEncoder([["voter",getAddressEncoder()],["choice",oa()],["votingPower",getU64Encoder()],["votedAt",getI64Encoder()],["reasoning",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["delegationInfo",getOptionEncoder(ao())]])}function ra(){return getStructDecoder([["voter",getAddressDecoder()],["choice",ia()],["votingPower",getU64Decoder()],["votedAt",getI64Decoder()],["reasoning",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["delegationInfo",getOptionDecoder(uo())]])}function C$(){return combineCodec(na(),ra())}var ab=a(()=>{m();});function oa(){return getEnumEncoder(ca)}function ia(){return getEnumDecoder(ca)}function v$(){return combineCodec(oa(),ia())}var ca,db=a(()=>{ca=(o=>(o[o.For=0]="For",o[o.Against=1]="Against",o[o.Abstain=2]="Abstain",o))(ca||{});});function da(){return getStructEncoder([["votesFor",getU64Encoder()],["votesAgainst",getU64Encoder()],["votesAbstain",getU64Encoder()],["totalVotingPower",getU64Encoder()],["participationRate",getU8Encoder()],["individualVotes",getArrayEncoder(na())],["weightedVoting",getBooleanEncoder()],["quorumReached",getBooleanEncoder()],["approvalThresholdMet",getBooleanEncoder()]])}function ua(){return getStructDecoder([["votesFor",getU64Decoder()],["votesAgainst",getU64Decoder()],["votesAbstain",getU64Decoder()],["totalVotingPower",getU64Decoder()],["participationRate",getU8Decoder()],["individualVotes",getArrayDecoder(ra())],["weightedVoting",getBooleanDecoder()],["quorumReached",getBooleanDecoder()],["approvalThresholdMet",getBooleanDecoder()]])}function F$(){return combineCodec(da(),ua())}var ub=a(()=>{m();});var m=a(()=>{Nf();Vf();Kf();Hf();qf();Xf();Zf();rS();aS();dS();yS();DS();hS();ES();PS();CS();bS();vS();MS();zS();GS();WS();NS();BS();KS();$S();qS();JS();ZS();YS();ex();tx();nx();rx();ox();dx();ux();Sx();xx();Rx();Ix();vx();Mx();kx();wx();Ux();_x();Fx();Gx();Bx();Kx();$x();Qx();rD();oD();dD();yD();TD();xD();CD();wD();zD();GD();VD();jD();XD();oh();ih();ah();dh();Ah();ph();fh();Ch();bh();vh();Mh();kh();wh();Uh();_h();zh();Oh();Wh();Kh();$h();qh();Jh();nE();iE();aE();dE();uE();gE();AE();pE();yE();DE();PE();CE();Qg();wE();UE();OE();BE();LE();VE();KE();HE();jE();$E();qE();XE();eP();rP();aP();dP();AP();pP();yP();SP();hP();EP();PP();UP();_P();WP();LP();XP();ZP();YP();eC();tC();nC();rC();oC();iC();cC();sC();aC();dC();AC();pC();yC();TC();hC();CC();bC();kC();OC();WC();KC();$C();qC();JC();QC();XC();ZC();YC();eb();tb();nb();rb();ob();ib();ab();db();ub();});function J$(){return fixEncoderSize(getBytesEncoder(),8).encode(tp)}function mb(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["owner",getOptionEncoder(getAddressEncoder())],["status",Vn()],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["firstTxSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["firstSeenTimestamp",getI64Encoder()],["discoverySource",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["claimedAt",getOptionEncoder(getI64Encoder())],["agentType",getU8Encoder()],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["capabilities",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["pricingModel",J()],["reputationScore",getU32Encoder()],["totalJobsCompleted",getU32Encoder()],["totalEarnings",getU64Encoder()],["isActive",getBooleanEncoder()],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["originalPrice",getU64Encoder()],["genomeHash",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["isReplicable",getBooleanEncoder()],["replicationFee",getU64Encoder()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["isVerified",getBooleanEncoder()],["verificationTimestamp",getI64Encoder()],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["frameworkOrigin",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["supportedTokens",getArrayEncoder(getAddressEncoder())],["cnftMint",getOptionEncoder(getAddressEncoder())],["merkleTree",getOptionEncoder(getAddressEncoder())],["supportsA2a",getBooleanEncoder()],["transferHook",getOptionEncoder(getAddressEncoder())],["parentAgent",getOptionEncoder(getAddressEncoder())],["generation",getU32Encoder()],["x402Enabled",getBooleanEncoder()],["x402PaymentAddress",getAddressEncoder()],["x402AcceptedTokens",getArrayEncoder(getAddressEncoder())],["x402PricePerCall",getU64Encoder()],["x402ServiceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["x402TotalPayments",getU64Encoder()],["x402TotalCalls",getU64Encoder()],["lastPaymentTimestamp",getI64Encoder()],["externalIdentifiers",getArrayEncoder(Eo())],["ghostScore",getU64Encoder()],["reputationComponents",getArrayEncoder(ct())],["didAddress",getOptionEncoder(getAddressEncoder())],["credentials",getArrayEncoder(getAddressEncoder())],["apiSpecUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["apiVersion",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["bump",getU8Encoder()]]),n=>({...n,discriminator:tp}))}function np(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["owner",getOptionDecoder(getAddressDecoder())],["status",Kn()],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["firstTxSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["firstSeenTimestamp",getI64Decoder()],["discoverySource",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["claimedAt",getOptionDecoder(getI64Decoder())],["agentType",getU8Decoder()],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["capabilities",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["pricingModel",Q()],["reputationScore",getU32Decoder()],["totalJobsCompleted",getU32Decoder()],["totalEarnings",getU64Decoder()],["isActive",getBooleanDecoder()],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["originalPrice",getU64Decoder()],["genomeHash",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["isReplicable",getBooleanDecoder()],["replicationFee",getU64Decoder()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["isVerified",getBooleanDecoder()],["verificationTimestamp",getI64Decoder()],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["frameworkOrigin",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["supportedTokens",getArrayDecoder(getAddressDecoder())],["cnftMint",getOptionDecoder(getAddressDecoder())],["merkleTree",getOptionDecoder(getAddressDecoder())],["supportsA2a",getBooleanDecoder()],["transferHook",getOptionDecoder(getAddressDecoder())],["parentAgent",getOptionDecoder(getAddressDecoder())],["generation",getU32Decoder()],["x402Enabled",getBooleanDecoder()],["x402PaymentAddress",getAddressDecoder()],["x402AcceptedTokens",getArrayDecoder(getAddressDecoder())],["x402PricePerCall",getU64Decoder()],["x402ServiceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["x402TotalPayments",getU64Decoder()],["x402TotalCalls",getU64Decoder()],["lastPaymentTimestamp",getI64Decoder()],["externalIdentifiers",getArrayDecoder(Po())],["ghostScore",getU64Decoder()],["reputationComponents",getArrayDecoder(st())],["didAddress",getOptionDecoder(getAddressDecoder())],["credentials",getArrayDecoder(getAddressDecoder())],["apiSpecUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["apiVersion",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["bump",getU8Decoder()]])}function Q$(){return combineCodec(mb(),np())}function rp(n){return decodeAccount(n,np())}async function X$(n,e,t){let o=await yb(n,e,t);return assertAccountExists(o),o}async function yb(n,e,t){let o=await fetchEncodedAccount(n,e,t);return rp(o)}async function Z$(n,e,t){let o=await Tb(n,e,t);return assertAccountsExist(o),o}async function Tb(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>rp(r))}var tp,fb=a(()=>{m();tp=new Uint8Array([47,166,112,147,155,197,86,7]);});function yq(){return fixEncoderSize(getBytesEncoder(),8).encode(cp)}function vb(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agent",getAddressEncoder()],["authorizedSource",getAddressEncoder()],["indexLimit",getU64Encoder()],["currentIndex",getU64Encoder()],["expiresAt",getI64Encoder()],["network",getU8Encoder()],["signature",fixEncoderSize(getBytesEncoder(),64)],["nonce",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["revoked",getBooleanEncoder()],["createdAt",getI64Encoder()],["lastUsedAt",getOptionEncoder(getI64Encoder())],["totalReputationChange",getI64Encoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:cp}))}function sp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agent",getAddressDecoder()],["authorizedSource",getAddressDecoder()],["indexLimit",getU64Decoder()],["currentIndex",getU64Decoder()],["expiresAt",getI64Decoder()],["network",getU8Decoder()],["signature",fixDecoderSize(getBytesDecoder(),64)],["nonce",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["revoked",getBooleanDecoder()],["createdAt",getI64Decoder()],["lastUsedAt",getOptionDecoder(getI64Decoder())],["totalReputationChange",getI64Decoder()],["bump",getU8Decoder()]])}function Tq(){return combineCodec(vb(),sp())}function ap(n){return decodeAccount(n,sp())}async function fq(n,e,t){let o=await Mb(n,e,t);return assertAccountExists(o),o}async function Mb(n,e,t){let o=await fetchEncodedAccount(n,e,t);return ap(o)}async function Sq(n,e,t){let o=await kb(n,e,t);return assertAccountsExist(o),o}async function kb(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>ap(r))}var cp,wb=a(()=>{cp=new Uint8Array([30,249,165,44,155,194,188,175]);});function zq(){return fixEncoderSize(getBytesEncoder(),8).encode(dp)}function Fb(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["treeCreator",getAddressEncoder()],["treeDelegate",getAddressEncoder()],["numMinted",getU64Encoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:dp}))}function up(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["treeCreator",getAddressDecoder()],["treeDelegate",getAddressDecoder()],["numMinted",getU64Decoder()],["bump",getU8Decoder()]])}function Oq(){return combineCodec(Fb(),up())}function gp(n){return decodeAccount(n,up())}async function Fq(n,e,t){let o=await Gb(n,e,t);return assertAccountExists(o),o}async function Gb(n,e,t){let o=await fetchEncodedAccount(n,e,t);return gp(o)}async function Gq(n,e,t){let o=await Wb(n,e,t);return assertAccountsExist(o),o}async function Wb(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>gp(r))}function Wq(){return 81}var dp,Nb=a(()=>{dp=new Uint8Array([145,145,156,0,197,232,130,245]);});function tJ(){return fixEncoderSize(getBytesEncoder(),8).encode(Ap)}function $b(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agent",getAddressEncoder()],["verifier",getAddressEncoder()],["verificationData",Hn()],["createdAt",getI64Encoder()],["expiresAt",getI64Encoder()],["isActive",getBooleanEncoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:Ap}))}function pp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agent",getAddressDecoder()],["verifier",getAddressDecoder()],["verificationData",jn()],["createdAt",getI64Decoder()],["expiresAt",getI64Decoder()],["isActive",getBooleanDecoder()],["bump",getU8Decoder()]])}function nJ(){return combineCodec($b(),pp())}function lp(n){return decodeAccount(n,pp())}async function rJ(n,e,t){let o=await qb(n,e,t);return assertAccountExists(o),o}async function qb(n,e,t){let o=await fetchEncodedAccount(n,e,t);return lp(o)}async function oJ(n,e,t){let o=await Jb(n,e,t);return assertAccountsExist(o),o}async function Jb(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>lp(r))}var Ap,Qb=a(()=>{m();Ap=new Uint8Array([128,155,95,241,66,207,166,59]);});function xJ(){return fixEncoderSize(getBytesEncoder(),8).encode(Tp)}function tR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authority",getAddressEncoder()],["trailId",getU64Encoder()],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["version",getU8Encoder()],["entries",getArrayEncoder(cr())],["config",Ge()],["complianceStatus",Wr()],["hashChain",getArrayEncoder(fixEncoderSize(getBytesEncoder(),32))],["reserved",fixEncoderSize(getBytesEncoder(),128)]]),n=>({...n,discriminator:Tp}))}function fp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authority",getAddressDecoder()],["trailId",getU64Decoder()],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["version",getU8Decoder()],["entries",getArrayDecoder(sr())],["config",We()],["complianceStatus",Nr()],["hashChain",getArrayDecoder(fixDecoderSize(getBytesDecoder(),32))],["reserved",fixDecoderSize(getBytesDecoder(),128)]])}function DJ(){return combineCodec(tR(),fp())}function Sp(n){return decodeAccount(n,fp())}async function hJ(n,e,t){let o=await nR(n,e,t);return assertAccountExists(o),o}async function nR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Sp(o)}async function EJ(n,e,t){let o=await rR(n,e,t);return assertAccountsExist(o),o}async function rR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Sp(r))}var Tp,oR=a(()=>{m();Tp=new Uint8Array([171,223,253,181,134,88,66,26]);});function BJ(){return fixEncoderSize(getBytesEncoder(),8).encode(hp)}function mR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authorization",getAddressEncoder()],["agent",getAddressEncoder()],["authorizedSource",getAddressEncoder()],["usageIndex",getU64Encoder()],["reputationChange",getI64Encoder()],["usedAt",getI64Encoder()],["transactionSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["metadata",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["bump",getU8Encoder()]]),n=>({...n,discriminator:hp}))}function Ep(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authorization",getAddressDecoder()],["agent",getAddressDecoder()],["authorizedSource",getAddressDecoder()],["usageIndex",getU64Decoder()],["reputationChange",getI64Decoder()],["usedAt",getI64Decoder()],["transactionSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["metadata",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["bump",getU8Decoder()]])}function LJ(){return combineCodec(mR(),Ep())}function Pp(n){return decodeAccount(n,Ep())}async function VJ(n,e,t){let o=await yR(n,e,t);return assertAccountExists(o),o}async function yR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Pp(o)}async function KJ(n,e,t){let o=await TR(n,e,t);return assertAccountsExist(o),o}async function TR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Pp(r))}var hp,fR=a(()=>{hp=new Uint8Array([109,102,102,17,210,84,85,210]);});function oQ(){return fixEncoderSize(getBytesEncoder(),8).encode(vp)}function SR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["reportId",getU64Encoder()],["reportType",se()],["generatedAt",getI64Encoder()],["periodStart",getI64Encoder()],["periodEnd",getI64Encoder()],["reportData",xc()],["signature",fixEncoderSize(getBytesEncoder(),64)],["status",Mc()],["submissionDetails",getOptionEncoder(Gs())],["reserved",fixEncoderSize(getBytesEncoder(),64)]]),n=>({...n,discriminator:vp}))}function Mp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["reportId",getU64Decoder()],["reportType",ae()],["generatedAt",getI64Decoder()],["periodStart",getI64Decoder()],["periodEnd",getI64Decoder()],["reportData",Dc()],["signature",fixDecoderSize(getBytesDecoder(),64)],["status",kc()],["submissionDetails",getOptionDecoder(Ws())],["reserved",fixDecoderSize(getBytesDecoder(),64)]])}function iQ(){return combineCodec(SR(),Mp())}function kp(n){return decodeAccount(n,Mp())}async function cQ(n,e,t){let o=await xR(n,e,t);return assertAccountExists(o),o}async function xR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return kp(o)}async function sQ(n,e,t){let o=await DR(n,e,t);return assertAccountsExist(o),o}async function DR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>kp(r))}var vp,hR=a(()=>{m();vp=new Uint8Array([75,146,78,26,130,240,228,35]);});function SQ(){return fixEncoderSize(getBytesEncoder(),8).encode(Lp)}function ER(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["template",getAddressEncoder()],["subject",getAddressEncoder()],["issuer",getAddressEncoder()],["credentialId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["subjectDataHash",fixEncoderSize(getBytesEncoder(),32)],["subjectDataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["status",Yr()],["signature",fixEncoderSize(getBytesEncoder(),64)],["issuedAt",getI64Encoder()],["expiresAt",getOptionEncoder(getI64Encoder())],["revokedAt",getOptionEncoder(getI64Encoder())],["crossChainStatus",Le()],["crossmintCredentialId",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["sourceAccount",getOptionEncoder(getAddressEncoder())],["bump",getU8Encoder()]]),n=>({...n,discriminator:Lp}))}function Vp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["template",getAddressDecoder()],["subject",getAddressDecoder()],["issuer",getAddressDecoder()],["credentialId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["subjectDataHash",fixDecoderSize(getBytesDecoder(),32)],["subjectDataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["status",eo()],["signature",fixDecoderSize(getBytesDecoder(),64)],["issuedAt",getI64Decoder()],["expiresAt",getOptionDecoder(getI64Decoder())],["revokedAt",getOptionDecoder(getI64Decoder())],["crossChainStatus",Ve()],["crossmintCredentialId",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["sourceAccount",getOptionDecoder(getAddressDecoder())],["bump",getU8Decoder()]])}function xQ(){return combineCodec(ER(),Vp())}function Kp(n){return decodeAccount(n,Vp())}async function DQ(n,e,t){let o=await PR(n,e,t);return assertAccountExists(o),o}async function PR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Kp(o)}async function hQ(n,e,t){let o=await CR(n,e,t);return assertAccountsExist(o),o}async function CR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Kp(r))}var Lp,bR=a(()=>{m();Lp=new Uint8Array([145,44,68,220,67,46,100,135]);});function KQ(){return fixEncoderSize(getBytesEncoder(),8).encode(Xp)}function kR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["credentialType",getAddressEncoder()],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["imageUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["issuer",getAddressEncoder()],["isActive",getBooleanEncoder()],["totalIssued",getU64Encoder()],["createdAt",getI64Encoder()],["crossmintTemplateId",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["bump",getU8Encoder()]]),n=>({...n,discriminator:Xp}))}function Zp(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["credentialType",getAddressDecoder()],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["imageUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["issuer",getAddressDecoder()],["isActive",getBooleanDecoder()],["totalIssued",getU64Decoder()],["createdAt",getI64Decoder()],["crossmintTemplateId",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["bump",getU8Decoder()]])}function HQ(){return combineCodec(kR(),Zp())}function Yp(n){return decodeAccount(n,Zp())}async function jQ(n,e,t){let o=await wR(n,e,t);return assertAccountExists(o),o}async function wR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Yp(o)}async function $Q(n,e,t){let o=await UR(n,e,t);return assertAccountsExist(o),o}async function UR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Yp(r))}var Xp,_R=a(()=>{Xp=new Uint8Array([229,129,99,91,179,207,66,75]);});function mX(){return fixEncoderSize(getBytesEncoder(),8).encode(cl)}function FR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authority",getAddressEncoder()],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["kind",Ne()],["schemaUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["isActive",getBooleanEncoder()],["totalIssued",getU64Encoder()],["createdAt",getI64Encoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:cl}))}function sl(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authority",getAddressDecoder()],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["kind",Be()],["schemaUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["isActive",getBooleanDecoder()],["totalIssued",getU64Decoder()],["createdAt",getI64Decoder()],["bump",getU8Decoder()]])}function yX(){return combineCodec(FR(),sl())}function al(n){return decodeAccount(n,sl())}async function TX(n,e,t){let o=await GR(n,e,t);return assertAccountExists(o),o}async function GR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return al(o)}async function fX(n,e,t){let o=await WR(n,e,t);return assertAccountsExist(o),o}async function WR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>al(r))}var cl,NR=a(()=>{m();cl=new Uint8Array([132,171,20,181,39,219,217,112]);});function GX(){return fixEncoderSize(getBytesEncoder(),8).encode(ml)}function VR(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["did",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["controller",getAddressEncoder()],["verificationMethods",getArrayEncoder(Te())],["serviceEndpoints",getArrayEncoder(me())],["context",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["alsoKnownAs",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["version",getU32Encoder()],["deactivated",getBooleanEncoder()],["deactivatedAt",getOptionEncoder(getI64Encoder())],["bump",getU8Encoder()]]),n=>({...n,discriminator:ml}))}function yl(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["did",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["controller",getAddressDecoder()],["verificationMethods",getArrayDecoder(fe())],["serviceEndpoints",getArrayDecoder(ye())],["context",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["alsoKnownAs",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["version",getU32Decoder()],["deactivated",getBooleanDecoder()],["deactivatedAt",getOptionDecoder(getI64Decoder())],["bump",getU8Decoder()]])}function WX(){return combineCodec(VR(),yl())}function Tl(n){return decodeAccount(n,yl())}async function NX(n,e,t){let o=await KR(n,e,t);return assertAccountExists(o),o}async function KR(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Tl(o)}async function BX(n,e,t){let o=await HR(n,e,t);return assertAccountsExist(o),o}async function HR(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Tl(r))}var ml,jR=a(()=>{m();ml=new Uint8Array([109,220,168,224,33,173,192,166]);});function sZ(){return fixEncoderSize(getBytesEncoder(),8).encode(fl)}function rI(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["ghostPubkey",getAddressEncoder()],["platform",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["externalId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["createdAt",getI64Encoder()],["verified",getBooleanEncoder()],["verifiedAt",getOptionEncoder(getI64Encoder())],["bump",getU8Encoder()]]),n=>({...n,discriminator:fl}))}function Sl(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["ghostPubkey",getAddressDecoder()],["platform",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["externalId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["createdAt",getI64Decoder()],["verified",getBooleanDecoder()],["verifiedAt",getOptionDecoder(getI64Decoder())],["bump",getU8Decoder()]])}function aZ(){return combineCodec(rI(),Sl())}function xl(n){return decodeAccount(n,Sl())}async function dZ(n,e,t){let o=await oI(n,e,t);return assertAccountExists(o),o}async function oI(n,e,t){let o=await fetchEncodedAccount(n,e,t);return xl(o)}async function uZ(n,e,t){let o=await iI(n,e,t);return assertAccountsExist(o),o}async function iI(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>xl(r))}var fl,cI=a(()=>{fl=new Uint8Array([180,218,64,128,181,84,116,180]);});function PZ(){return fixEncoderSize(getBytesEncoder(),8).encode(kl)}function gI(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["escrowId",getU64Encoder()],["client",getAddressEncoder()],["agent",getAddressEncoder()],["amount",getU64Encoder()],["tokenMint",getAddressEncoder()],["status",So()],["jobDescription",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["deliveryProof",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["deadline",getI64Encoder()],["createdAt",getI64Encoder()],["completedAt",getOptionEncoder(getI64Encoder())],["disputeReason",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["arbitratorDecision",getOptionEncoder(ie())],["bump",getU8Encoder()]]),n=>({...n,discriminator:kl}))}function wl(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["escrowId",getU64Decoder()],["client",getAddressDecoder()],["agent",getAddressDecoder()],["amount",getU64Decoder()],["tokenMint",getAddressDecoder()],["status",xo()],["jobDescription",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["deliveryProof",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["deadline",getI64Decoder()],["createdAt",getI64Decoder()],["completedAt",getOptionDecoder(getI64Decoder())],["disputeReason",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["arbitratorDecision",getOptionDecoder(ce())],["bump",getU8Decoder()]])}function CZ(){return combineCodec(gI(),wl())}function Ul(n){return decodeAccount(n,wl())}async function bZ(n,e,t){let o=await AI(n,e,t);return assertAccountExists(o),o}async function AI(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Ul(o)}async function RZ(n,e,t){let o=await pI(n,e,t);return assertAccountsExist(o),o}async function pI(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Ul(r))}var kl,lI=a(()=>{m();kl=new Uint8Array([38,0,98,160,102,4,51,160]);});function VZ(){return fixEncoderSize(getBytesEncoder(),8).encode(Ol)}function EI(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["proposalId",getU64Encoder()],["proposer",getAddressEncoder()],["title",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["proposalType",de()],["createdAt",getI64Encoder()],["votingStartsAt",getI64Encoder()],["votingEndsAt",getI64Encoder()],["executionTimestamp",getOptionEncoder(getI64Encoder())],["status",uc()],["votingResults",da()],["executionParams",qe()],["quorumRequirements",mc()],["metadata",sc()],["reserved",fixEncoderSize(getBytesEncoder(),64)]]),n=>({...n,discriminator:Ol}))}function Fl(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["proposalId",getU64Decoder()],["proposer",getAddressDecoder()],["title",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["proposalType",ue()],["createdAt",getI64Decoder()],["votingStartsAt",getI64Decoder()],["votingEndsAt",getI64Decoder()],["executionTimestamp",getOptionDecoder(getI64Decoder())],["status",gc()],["votingResults",ua()],["executionParams",Je()],["quorumRequirements",yc()],["metadata",ac()],["reserved",fixDecoderSize(getBytesDecoder(),64)]])}function KZ(){return combineCodec(EI(),Fl())}function Gl(n){return decodeAccount(n,Fl())}async function HZ(n,e,t){let o=await PI(n,e,t);return assertAccountExists(o),o}async function PI(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Gl(o)}async function jZ(n,e,t){let o=await CI(n,e,t);return assertAccountsExist(o),o}async function CI(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Gl(r))}var Ol,bI=a(()=>{m();Ol=new Uint8Array([53,107,240,190,43,73,65,143]);});function oY(){return fixEncoderSize(getBytesEncoder(),8).encode(Bl)}function FI(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["multisigId",getU64Encoder()],["multisigType",pe()],["threshold",getU8Encoder()],["signers",getArrayEncoder(getAddressEncoder())],["owner",getAddressEncoder()],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["nonce",getU64Encoder()],["pendingTransactions",getArrayEncoder(li())],["config",Ze()],["emergencyConfig",mo()],["typeConfig",jo()],["reserved",fixEncoderSize(getBytesEncoder(),64)]]),n=>({...n,discriminator:Bl}))}function Ll(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["multisigId",getU64Decoder()],["multisigType",le()],["threshold",getU8Decoder()],["signers",getArrayDecoder(getAddressDecoder())],["owner",getAddressDecoder()],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["nonce",getU64Decoder()],["pendingTransactions",getArrayDecoder(mi())],["config",Ye()],["emergencyConfig",yo()],["typeConfig",$o()],["reserved",fixDecoderSize(getBytesDecoder(),64)]])}function iY(){return combineCodec(FI(),Ll())}function Vl(n){return decodeAccount(n,Ll())}async function cY(n,e,t){let o=await GI(n,e,t);return assertAccountExists(o),o}async function GI(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Vl(o)}async function sY(n,e,t){let o=await WI(n,e,t);return assertAccountsExist(o),o}async function WI(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Vl(r))}var Bl,NI=a(()=>{m();Bl=new Uint8Array([224,116,121,186,68,161,79,236]);});function EY(){return fixEncoderSize(getBytesEncoder(),8).encode(jl)}function $I(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authority",getAddressEncoder()],["treasury",getAddressEncoder()],["buybackPool",getAddressEncoder()],["moderatorPool",getAddressEncoder()],["escrowFeeBps",getU16Encoder()],["agentRegistrationFee",getU64Encoder()],["listingFee",getU64Encoder()],["disputeFeeBps",getU16Encoder()],["feesEnabled",getBooleanEncoder()],["updatedAt",getI64Encoder()],["bump",getU8Encoder()],["reserved",fixEncoderSize(getBytesEncoder(),64)]]),n=>({...n,discriminator:jl}))}function $l(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authority",getAddressDecoder()],["treasury",getAddressDecoder()],["buybackPool",getAddressDecoder()],["moderatorPool",getAddressDecoder()],["escrowFeeBps",getU16Decoder()],["agentRegistrationFee",getU64Decoder()],["listingFee",getU64Decoder()],["disputeFeeBps",getU16Decoder()],["feesEnabled",getBooleanDecoder()],["updatedAt",getI64Decoder()],["bump",getU8Decoder()],["reserved",fixDecoderSize(getBytesDecoder(),64)]])}function PY(){return combineCodec($I(),$l())}function ql(n){return decodeAccount(n,$l())}async function CY(n,e,t){let o=await qI(n,e,t);return assertAccountExists(o),o}async function qI(n,e,t){let o=await fetchEncodedAccount(n,e,t);return ql(o)}async function bY(n,e,t){let o=await JI(n,e,t);return assertAccountsExist(o),o}async function JI(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>ql(r))}function RY(){return 230}var jl,QI=a(()=>{jl=new Uint8Array([207,91,250,28,152,179,215,209]);});function BY(){return fixEncoderSize(getBytesEncoder(),8).encode(Yl)}function tv(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authority",getAddressEncoder()],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["version",getU8Encoder()],["roles",getArrayEncoder(at())],["permissions",getArrayEncoder(Ii())],["accessPolicies",getArrayEncoder(fn())],["securityPolicies",Ps()],["auditConfig",yn()],["emergencyAccess",po()],["reserved",fixEncoderSize(getBytesEncoder(),128)]]),n=>({...n,discriminator:Yl}))}function em(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authority",getAddressDecoder()],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["version",getU8Decoder()],["roles",getArrayDecoder(dt())],["permissions",getArrayDecoder(vi())],["accessPolicies",getArrayDecoder(Sn())],["securityPolicies",Cs()],["auditConfig",Tn()],["emergencyAccess",lo()],["reserved",fixDecoderSize(getBytesDecoder(),128)]])}function LY(){return combineCodec(tv(),em())}function tm(n){return decodeAccount(n,em())}async function VY(n,e,t){let o=await nv(n,e,t);return assertAccountExists(o),o}async function nv(n,e,t){let o=await fetchEncodedAccount(n,e,t);return tm(o)}async function KY(n,e,t){let o=await rv(n,e,t);return assertAccountsExist(o),o}async function rv(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>tm(r))}var Yl,ov=a(()=>{m();Yl=new Uint8Array([177,94,184,202,221,112,110,38]);});function uee(){return fixEncoderSize(getBytesEncoder(),8).encode(nm)}function sv(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["state",fc()],["nonce",getU64Encoder()],["lastInteraction",getI64Encoder()],["authority",getAddressEncoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:nm}))}function rm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["state",Sc()],["nonce",getU64Decoder()],["lastInteraction",getI64Decoder()],["authority",getAddressDecoder()],["bump",getU8Decoder()]])}function gee(){return combineCodec(sv(),rm())}function om(n){return decodeAccount(n,rm())}async function Aee(n,e,t){let o=await av(n,e,t);return assertAccountExists(o),o}async function av(n,e,t){let o=await fetchEncodedAccount(n,e,t);return om(o)}async function pee(n,e,t){let o=await dv(n,e,t);return assertAccountsExist(o),o}async function dv(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>om(r))}function lee(){return 58}var nm,uv=a(()=>{m();nm=new Uint8Array([207,227,141,11,194,21,193,32]);});function Mee(){return fixEncoderSize(getBytesEncoder(),8).encode(im)}function pv(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agent",getAddressEncoder()],["successfulPayments",getU64Encoder()],["failedPayments",getU64Encoder()],["totalResponseTime",getU64Encoder()],["responseTimeCount",getU64Encoder()],["totalDisputes",getU32Encoder()],["disputesResolved",getU32Encoder()],["totalRating",getU32Encoder()],["totalRatingsCount",getU32Encoder()],["paymentHistory7d",getArrayEncoder(getU64Encoder(),{size:7})],["createdAt",getI64Encoder()],["updatedAt",getI64Encoder()],["skillTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["behaviorTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["complianceTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["tagScores",getArrayEncoder(ut())],["tagUpdatedAt",getI64Encoder()],["sourceScores",getArrayEncoder(zs())],["primarySource",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["lastAggregation",getI64Encoder()],["conflictFlags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["bump",getU8Encoder()]]),n=>({...n,discriminator:im}))}function cm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agent",getAddressDecoder()],["successfulPayments",getU64Decoder()],["failedPayments",getU64Decoder()],["totalResponseTime",getU64Decoder()],["responseTimeCount",getU64Decoder()],["totalDisputes",getU32Decoder()],["disputesResolved",getU32Decoder()],["totalRating",getU32Decoder()],["totalRatingsCount",getU32Decoder()],["paymentHistory7d",getArrayDecoder(getU64Decoder(),{size:7})],["createdAt",getI64Decoder()],["updatedAt",getI64Decoder()],["skillTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["behaviorTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["complianceTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["tagScores",getArrayDecoder(gt())],["tagUpdatedAt",getI64Decoder()],["sourceScores",getArrayDecoder(Os())],["primarySource",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["lastAggregation",getI64Decoder()],["conflictFlags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["bump",getU8Decoder()]])}function kee(){return combineCodec(pv(),cm())}function sm(n){return decodeAccount(n,cm())}async function wee(n,e,t){let o=await lv(n,e,t);return assertAccountExists(o),o}async function lv(n,e,t){let o=await fetchEncodedAccount(n,e,t);return sm(o)}async function Uee(n,e,t){let o=await mv(n,e,t);return assertAccountsExist(o),o}async function mv(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>sm(r))}var im,yv=a(()=>{m();im=new Uint8Array([8,160,71,30,66,150,108,33]);});function Yee(){return fixEncoderSize(getBytesEncoder(),8).encode(um)}function Dv(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["owner",getAddressEncoder()],["amountStaked",getU64Encoder()],["stakedAt",getI64Encoder()],["lockDuration",getI64Encoder()],["unlockAt",getI64Encoder()],["reputationBoostBps",getU16Encoder()],["hasVerifiedBadge",getBooleanEncoder()],["hasPremiumBenefits",getBooleanEncoder()],["totalSlashed",getU64Encoder()],["tier",j()],["apiCallsRemaining",getU32Encoder()],["lastQuotaReset",getI64Encoder()],["votingPower",getU64Encoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:um}))}function gm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["owner",getAddressDecoder()],["amountStaked",getU64Decoder()],["stakedAt",getI64Decoder()],["lockDuration",getI64Decoder()],["unlockAt",getI64Decoder()],["reputationBoostBps",getU16Decoder()],["hasVerifiedBadge",getBooleanDecoder()],["hasPremiumBenefits",getBooleanDecoder()],["totalSlashed",getU64Decoder()],["tier",$()],["apiCallsRemaining",getU32Decoder()],["lastQuotaReset",getI64Decoder()],["votingPower",getU64Decoder()],["bump",getU8Decoder()]])}function ete(){return combineCodec(Dv(),gm())}function Am(n){return decodeAccount(n,gm())}async function tte(n,e,t){let o=await hv(n,e,t);return assertAccountExists(o),o}async function hv(n,e,t){let o=await fetchEncodedAccount(n,e,t);return Am(o)}async function nte(n,e,t){let o=await Ev(n,e,t);return assertAccountsExist(o),o}async function Ev(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>Am(r))}function rte(){return 106}var um,Pv=a(()=>{m();um=new Uint8Array([52,178,251,157,180,186,98,234]);});function Dte(){return fixEncoderSize(getBytesEncoder(),8).encode(pm)}function kv(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authority",getAddressEncoder()],["minStake",getU64Encoder()],["minLockDuration",getI64Encoder()],["fraudSlashBps",getU16Encoder()],["disputeSlashBps",getU16Encoder()],["treasury",getAddressEncoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:pm}))}function lm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authority",getAddressDecoder()],["minStake",getU64Decoder()],["minLockDuration",getI64Decoder()],["fraudSlashBps",getU16Decoder()],["disputeSlashBps",getU16Decoder()],["treasury",getAddressDecoder()],["bump",getU8Decoder()]])}function hte(){return combineCodec(kv(),lm())}function mm(n){return decodeAccount(n,lm())}async function Ete(n,e,t){let o=await wv(n,e,t);return assertAccountExists(o),o}async function wv(n,e,t){let o=await fetchEncodedAccount(n,e,t);return mm(o)}async function Pte(n,e,t){let o=await Uv(n,e,t);return assertAccountsExist(o),o}async function Uv(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>mm(r))}function Cte(){return 93}var pm,_v=a(()=>{pm=new Uint8Array([45,134,252,82,37,57,84,25]);});function Hte(){return fixEncoderSize(getBytesEncoder(),8).encode(ym)}function Fv(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["user",getAddressEncoder()],["agentCount",getU16Encoder()],["listingCount",getU16Encoder()],["workOrderCount",getU16Encoder()],["channelCount",getU16Encoder()],["totalVolumeTraded",getU64Encoder()],["lastActivity",getI64Encoder()],["createdAt",getI64Encoder()],["isRateLimited",getBooleanEncoder()],["rateLimitExpiry",getI64Encoder()],["lastExtensionRegistration",getI64Encoder()],["lastDisputeFiling",getI64Encoder()],["lastEvidenceSubmission",getI64Encoder()],["lastBatchExecution",getI64Encoder()],["lastDashboardUpdate",getI64Encoder()],["lastBulkDealCreation",getI64Encoder()],["lastDashboardCreation",getI64Encoder()],["bump",getU8Encoder()]]),n=>({...n,discriminator:ym}))}function Tm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["user",getAddressDecoder()],["agentCount",getU16Decoder()],["listingCount",getU16Decoder()],["workOrderCount",getU16Decoder()],["channelCount",getU16Decoder()],["totalVolumeTraded",getU64Decoder()],["lastActivity",getI64Decoder()],["createdAt",getI64Decoder()],["isRateLimited",getBooleanDecoder()],["rateLimitExpiry",getI64Decoder()],["lastExtensionRegistration",getI64Decoder()],["lastDisputeFiling",getI64Decoder()],["lastEvidenceSubmission",getI64Decoder()],["lastBatchExecution",getI64Decoder()],["lastDashboardUpdate",getI64Decoder()],["lastBulkDealCreation",getI64Decoder()],["lastDashboardCreation",getI64Decoder()],["bump",getU8Decoder()]])}function jte(){return combineCodec(Fv(),Tm())}function fm(n){return decodeAccount(n,Tm())}async function $te(n,e,t){let o=await Gv(n,e,t);return assertAccountExists(o),o}async function Gv(n,e,t){let o=await fetchEncodedAccount(n,e,t);return fm(o)}async function qte(n,e,t){let o=await Wv(n,e,t);return assertAccountsExist(o),o}async function Wv(n,e,t){return (await fetchEncodedAccounts(n,e,t)).map(r=>fm(r))}function Jte(){return 138}var ym,Nv=a(()=>{ym=new Uint8Array([37,84,98,14,130,63,210,138]);});var Bv=a(()=>{fb();wb();Nb();Qb();oR();fR();hR();bR();_R();NR();jR();cI();lI();bI();NI();QI();ov();uv();yv();Pv();_v();Nv();});function Qte(n){let e="data"in n?n.data:n;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([47,166,112,147,155,197,86,7])),0))return 0;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([30,249,165,44,155,194,188,175])),0))return 1;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([145,145,156,0,197,232,130,245])),0))return 2;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([128,155,95,241,66,207,166,59])),0))return 3;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([171,223,253,181,134,88,66,26])),0))return 4;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([109,102,102,17,210,84,85,210])),0))return 5;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([75,146,78,26,130,240,228,35])),0))return 6;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([145,44,68,220,67,46,100,135])),0))return 7;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([229,129,99,91,179,207,66,75])),0))return 8;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([132,171,20,181,39,219,217,112])),0))return 9;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([109,220,168,224,33,173,192,166])),0))return 10;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([180,218,64,128,181,84,116,180])),0))return 11;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([38,0,98,160,102,4,51,160])),0))return 12;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([53,107,240,190,43,73,65,143])),0))return 13;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([224,116,121,186,68,161,79,236])),0))return 14;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([207,91,250,28,152,179,215,209])),0))return 15;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([177,94,184,202,221,112,110,38])),0))return 16;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([207,227,141,11,194,21,193,32])),0))return 17;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([8,160,71,30,66,150,108,33])),0))return 18;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([52,178,251,157,180,186,98,234])),0))return 19;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([45,134,252,82,37,57,84,25])),0))return 20;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([37,84,98,14,130,63,210,138])),0))return 21;throw new Error("The provided account could not be identified as a ghostspeakMarketplace account.")}function Xte(n){let e="data"in n?n.data:n;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([252,139,87,21,195,152,29,217])),0))return 0;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([28,233,51,115,33,220,41,28])),0))return 1;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([225,89,166,101,215,40,191,4])),0))return 2;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([50,170,232,73,238,200,180,16])),0))return 3;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([149,107,35,233,252,101,148,225])),0))return 4;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([48,219,232,202,151,97,230,20])),0))return 5;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([183,109,12,128,134,8,139,144])),0))return 6;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([211,208,67,175,20,248,8,227])),0))return 7;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([253,40,200,239,69,147,82,182])),0))return 8;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([253,215,165,116,36,108,68,80])),0))return 9;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([148,146,240,10,226,215,167,174])),0))return 10;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([205,171,239,225,82,126,96,166])),0))return 11;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([177,8,195,104,56,34,84,162])),0))return 12;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([110,174,221,244,36,206,60,237])),0))return 13;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([77,13,56,161,67,155,206,119])),0))return 14;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([9,115,79,19,158,209,221,38])),0))return 15;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([210,63,221,114,212,97,195,156])),0))return 16;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([213,97,79,234,22,228,14,32])),0))return 17;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([156,109,115,85,12,60,245,99])),0))return 18;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([145,182,236,249,212,17,175,161])),0))return 19;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([137,84,234,206,17,58,54,215])),0))return 20;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([28,50,43,233,244,98,123,118])),0))return 21;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([215,68,129,228,237,165,0,240])),0))return 22;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([228,11,207,44,52,188,169,237])),0))return 23;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([78,164,6,115,206,48,168,105])),0))return 24;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([255,193,171,224,68,171,194,87])),0))return 25;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([156,102,141,155,175,13,29,86])),0))return 26;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([164,219,91,38,45,31,33,47])),0))return 27;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([165,202,159,139,65,65,36,163])),0))return 28;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([135,157,66,195,2,113,175,30])),0))return 29;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([15,6,94,55,65,80,123,248])),0))return 30;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([34,233,111,236,212,22,26,254])),0))return 31;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([93,74,168,125,46,153,9,255])),0))return 32;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([168,180,218,211,184,19,102,12])),0))return 33;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([222,179,207,59,191,78,24,248])),0))return 34;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([38,123,95,95,223,158,169,87])),0))return 35;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([190,242,137,27,41,18,233,37])),0))return 36;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([5,196,24,54,196,56,173,191])),0))return 37;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([217,177,33,54,136,185,123,96])),0))return 38;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([23,160,228,88,168,145,129,19])),0))return 39;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([252,101,172,252,1,4,12,116])),0))return 40;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([85,2,178,9,119,139,102,164])),0))return 41;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([80,227,92,245,231,37,99,180])),0))return 42;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([87,146,181,198,252,68,243,102])),0))return 43;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([22,167,59,238,22,231,239,146])),0))return 44;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([64,216,17,91,205,94,45,57])),0))return 45;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([213,152,5,80,163,224,151,120])),0))return 46;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([197,97,123,54,221,168,11,135])),0))return 47;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([206,96,254,186,129,180,103,198])),0))return 48;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([61,236,225,167,134,43,53,93])),0))return 49;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([161,240,255,69,130,227,71,123])),0))return 50;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([206,212,108,12,105,61,100,66])),0))return 51;if(containsBytes(e,fixEncoderSize(getBytesEncoder(),8).encode(new Uint8Array([43,9,131,59,74,118,113,170])),0))return 52;throw new Error("The provided instruction could not be identified as a ghostspeakMarketplace instruction.")}var u,Lv,Vv,Kv=a(()=>{u="4wHjA2a5YC4twZb4NQpwZpixo5FgxxzuJUrCG7UnF9pB",Lv=(C=>(C[C.Agent=0]="Agent",C[C.AgentReputationAuth=1]="AgentReputationAuth",C[C.AgentTreeConfig=2]="AgentTreeConfig",C[C.AgentVerification=3]="AgentVerification",C[C.AuditTrail=4]="AuditTrail",C[C.AuthorizationUsageRecord=5]="AuthorizationUsageRecord",C[C.ComplianceReport=6]="ComplianceReport",C[C.Credential=7]="Credential",C[C.CredentialTemplate=8]="CredentialTemplate",C[C.CredentialType=9]="CredentialType",C[C.DidDocument=10]="DidDocument",C[C.ExternalIdMapping=11]="ExternalIdMapping",C[C.GhostProtectEscrow=12]="GhostProtectEscrow",C[C.GovernanceProposal=13]="GovernanceProposal",C[C.Multisig=14]="Multisig",C[C.ProtocolConfig=15]="ProtocolConfig",C[C.RbacConfig=16]="RbacConfig",C[C.ReentrancyGuard=17]="ReentrancyGuard",C[C.ReputationMetrics=18]="ReputationMetrics",C[C.StakingAccount=19]="StakingAccount",C[C.StakingConfig=20]="StakingConfig",C[C.UserRegistry=21]="UserRegistry",C))(Lv||{});Vv=(A=>(A[A.ActivateAgent=0]="ActivateAgent",A[A.ApproveDelivery=1]="ApproveDelivery",A[A.ArbitrateDispute=2]="ArbitrateDispute",A[A.AutoCreateGhost=3]="AutoCreateGhost",A[A.ClaimGhost=4]="ClaimGhost",A[A.CreateAgentAuthorization=5]="CreateAgentAuthorization",A[A.CreateCredentialTemplate=6]="CreateCredentialTemplate",A[A.CreateCredentialType=7]="CreateCredentialType",A[A.CreateDidDocument=8]="CreateDidDocument",A[A.CreateEscrow=9]="CreateEscrow",A[A.CreateMultisig=10]="CreateMultisig",A[A.DeactivateAgent=11]="DeactivateAgent",A[A.DeactivateCredentialTemplate=12]="DeactivateCredentialTemplate",A[A.DeactivateCredentialType=13]="DeactivateCredentialType",A[A.DeactivateDidDocument=14]="DeactivateDidDocument",A[A.EnableProtocolFees=15]="EnableProtocolFees",A[A.FileDispute=16]="FileDispute",A[A.GenerateComplianceReport=17]="GenerateComplianceReport",A[A.InitReentrancyGuard=18]="InitReentrancyGuard",A[A.InitializeAuditTrail=19]="InitializeAuditTrail",A[A.InitializeGovernanceProposal=20]="InitializeGovernanceProposal",A[A.InitializeProtocolConfig=21]="InitializeProtocolConfig",A[A.InitializeRbacConfig=22]="InitializeRbacConfig",A[A.InitializeReputationMetrics=23]="InitializeReputationMetrics",A[A.InitializeStakingConfig=24]="InitializeStakingConfig",A[A.IssueCredential=25]="IssueCredential",A[A.LinkExternalId=26]="LinkExternalId",A[A.ManageAgentStatus=27]="ManageAgentStatus",A[A.RecordPayaiPayment=28]="RecordPayaiPayment",A[A.RegisterAgent=29]="RegisterAgent",A[A.RegisterAgentCompressed=30]="RegisterAgentCompressed",A[A.RegisterGhostMetadata=31]="RegisterGhostMetadata",A[A.ResetReentrancyGuard=32]="ResetReentrancyGuard",A[A.ResolveDidDocument=33]="ResolveDidDocument",A[A.RevokeAuthorization=34]="RevokeAuthorization",A[A.RevokeCredential=35]="RevokeCredential",A[A.SlashStake=36]="SlashStake",A[A.StakeGhost=37]="StakeGhost",A[A.SubmitDelivery=38]="SubmitDelivery",A[A.SubmitServiceRating=39]="SubmitServiceRating",A[A.UnstakeGhost=40]="UnstakeGhost",A[A.UpdateAgent=41]="UpdateAgent",A[A.UpdateAgentReputation=42]="UpdateAgentReputation",A[A.UpdateAgentService=43]="UpdateAgentService",A[A.UpdateCrosschainStatus=44]="UpdateCrosschainStatus",A[A.UpdateDidDocument=45]="UpdateDidDocument",A[A.UpdateGhostScore=46]="UpdateGhostScore",A[A.UpdateProtocolConfig=47]="UpdateProtocolConfig",A[A.UpdateReputationTags=48]="UpdateReputationTags",A[A.UpdateReputationWithAuth=49]="UpdateReputationWithAuth",A[A.UpdateSourceReputation=50]="UpdateSourceReputation",A[A.VerifyAgent=51]="VerifyAgent",A[A.VerifyAuthorization=52]="VerifyAuthorization",A))(Vv||{});});var D=a(()=>{Kv();});function Yte(n){return process.env.NODE_ENV!=="production"?Qv[n]:"Error message not available in production bundles."}function ene(n,e,t){return isProgramError(n,e,u,t)}var Hv,jv,$v,qv,Jv,Qv,Xv=a(()=>{D();Hv=6e3,jv=6001,$v=6002,qv=6003,Jv=6004;process.env.NODE_ENV!=="production"&&(Qv={[jv]:"Default (null) public key cannot be used as admin",[Hv]:"System program cannot be used as admin",[qv]:"Test address cannot be used on mainnet",[$v]:"Unauthorized admin - key does not match protocol admin",[Jv]:"Admin validation failed - key failed security checks or is not properly configured"});});var Zv=a(()=>{Xv();});function I(n){if(n==null)throw new Error("Expected a value but received null or undefined.");return n}function S(n){if(!n)throw new Error("Expected a Address.");return typeof n=="object"&&"address"in n?n.address:Array.isArray(n)?n[0]:n}function g(n,e){return t=>{if(!t.value)return Object.freeze({address:n,role:AccountRole.READONLY});let o=t.isWritable?AccountRole.WRITABLE:AccountRole.READONLY;return Object.freeze({address:S(t.value),role:Yv(t.value)?upgradeRoleToSigner(o):o,...Yv(t.value)?{signer:t.value}:{}})}}function Yv(n){return !!n&&typeof n=="object"&&"address"in n&&isTransactionSigner(n)}var h=a(()=>{});function yne(){return fixEncoderSize(getBytesEncoder(),8).encode(Dm)}function Wa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:Dm}))}function hm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Tne(){return combineCodec(Wa(),hm())}async function fne(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.signer.value)),getUtf8Encoder().encode(I(c.agentId))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Wa().encode(c),programAddress:t})}function Em(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Wa().encode(c),programAddress:t})}function Sne(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),signer:t(),clock:t()},data:hm().decode(n.data)}}var Dm,nM=a(()=>{D();h();Dm=new Uint8Array([252,139,87,21,195,152,29,217]);});function bne(){return fixEncoderSize(getBytesEncoder(),8).encode(Pm)}function Cm(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:Pm}))}function bm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function Rne(){return combineCodec(Cm(),bm())}function Ine(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},escrowVault:{value:n.escrowVault??null,isWritable:true},agentTokenAccount:{value:n.agentTokenAccount??null,isWritable:true},client:{value:n.client??null,isWritable:false},tokenProgram:{value:n.tokenProgram??null,isWritable:false}};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let c=g(t);return Object.freeze({accounts:[c(r.escrow),c(r.escrowVault),c(r.agentTokenAccount),c(r.client),c(r.tokenProgram)],data:Cm().encode({}),programAddress:t})}function vne(n){if(n.accounts.length<5)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{escrow:t(),escrowVault:t(),agentTokenAccount:t(),client:t(),tokenProgram:t()},data:bm().decode(n.data)}}var Pm,iM=a(()=>{D();h();Pm=new Uint8Array([28,233,51,115,33,220,41,28]);});function One(){return fixEncoderSize(getBytesEncoder(),8).encode(Rm)}function Im(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["decision",ie()]]),n=>({...n,discriminator:Rm}))}function vm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["decision",ce()]])}function Fne(){return combineCodec(Im(),vm())}function Gne(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},escrowVault:{value:n.escrowVault??null,isWritable:true},agentTokenAccount:{value:n.agentTokenAccount??null,isWritable:true},clientTokenAccount:{value:n.clientTokenAccount??null,isWritable:true},agentStaking:{value:n.agentStaking??null,isWritable:true},arbitrator:{value:n.arbitrator??null,isWritable:false},tokenProgram:{value:n.tokenProgram??null,isWritable:false}},c={...n};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let i=g(t);return Object.freeze({accounts:[i(r.escrow),i(r.escrowVault),i(r.agentTokenAccount),i(r.clientTokenAccount),i(r.agentStaking),i(r.arbitrator),i(r.tokenProgram)],data:Im().encode(c),programAddress:t})}function Wne(n){if(n.accounts.length<7)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{escrow:t(),escrowVault:t(),agentTokenAccount:t(),clientTokenAccount:t(),agentStaking:t(),arbitrator:t(),tokenProgram:t()},data:vm().decode(n.data)}}var Rm,aM=a(()=>{D();h();m();Rm=new Uint8Array([225,89,166,101,215,40,191,4]);});function Zne(){return fixEncoderSize(getBytesEncoder(),8).encode(km)}function Na(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["paymentAddress",getAddressEncoder()],["firstTxSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["discoverySource",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["initialGhostScore",getOptionEncoder(getU64Encoder())]]),n=>({...n,discriminator:km}))}function wm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["paymentAddress",getAddressDecoder()],["firstTxSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["discoverySource",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["initialGhostScore",getOptionDecoder(getU64Decoder())]])}function Yne(){return combineCodec(Na(),wm())}async function ere(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(I(c.paymentAddress))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.authority),i(r.systemProgram)],data:Na().encode(c),programAddress:t})}function tre(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.authority),i(r.systemProgram)],data:Na().encode(c),programAddress:t})}function nre(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),authority:t(),systemProgram:t()},data:wm().decode(n.data)}}var km,TM=a(()=>{D();h();km=new Uint8Array([50,170,232,73,238,200,180,16]);});function gre(){return fixEncoderSize(getBytesEncoder(),8).encode(Um)}function _m(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["sasCredential",getAddressEncoder()],["sasSchema",getAddressEncoder()],["ipfsMetadataUri",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["network",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:Um}))}function zm(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["sasCredential",getAddressDecoder()],["sasSchema",getAddressDecoder()],["ipfsMetadataUri",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["network",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Are(){return combineCodec(_m(),zm())}function Om(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},didDocument:{value:n.didDocument??null,isWritable:true},sasAttestation:{value:n.sasAttestation??null,isWritable:false},claimer:{value:n.claimer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.didDocument),i(r.sasAttestation),i(r.claimer),i(r.systemProgram)],data:_m().encode(c),programAddress:t})}function pre(n){if(n.accounts.length<5)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),didDocument:t(),sasAttestation:t(),claimer:t(),systemProgram:t()},data:zm().decode(n.data)}}var Um,IM=a(()=>{D();h();Um=new Uint8Array([149,107,35,233,252,101,148,225]);});var NM={};oe(NM,{CREATE_AGENT_AUTHORIZATION_DISCRIMINATOR:()=>La,getCreateAgentAuthorizationDiscriminatorBytes:()=>zM,getCreateAgentAuthorizationInstruction:()=>GM,getCreateAgentAuthorizationInstructionAsync:()=>FM,getCreateAgentAuthorizationInstructionDataCodec:()=>OM,getCreateAgentAuthorizationInstructionDataDecoder:()=>Va,getCreateAgentAuthorizationInstructionDataEncoder:()=>Ht,parseCreateAgentAuthorizationInstruction:()=>WM});function zM(){return fixEncoderSize(getBytesEncoder(),8).encode(La)}function Ht(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["authorizedSource",getAddressEncoder()],["indexLimit",getU64Encoder()],["expiresAt",getI64Encoder()],["network",getU8Encoder()],["signature",fixEncoderSize(getBytesEncoder(),64)],["nonce",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:La}))}function Va(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["authorizedSource",getAddressDecoder()],["indexLimit",getU64Decoder()],["expiresAt",getI64Decoder()],["network",getU8Decoder()],["signature",fixDecoderSize(getBytesDecoder(),64)],["nonce",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function OM(){return combineCodec(Ht(),Va())}async function FM(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},authorization:{value:n.authorization??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.authorization.value||(r.authorization.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,97,117,116,104])),getAddressEncoder().encode(S(r.agent.value)),getAddressEncoder().encode(I(c.authorizedSource)),getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())).encode(I(c.nonce))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.authorization),i(r.authority),i(r.systemProgram)],data:Ht().encode(c),programAddress:t})}function GM(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},authorization:{value:n.authorization??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.authorization),i(r.authority),i(r.systemProgram)],data:Ht().encode(c),programAddress:t})}function WM(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),authorization:t(),authority:t(),systemProgram:t()},data:Va().decode(n.data)}}var La,Wm=a(()=>{D();h();La=new Uint8Array([48,219,232,202,151,97,230,20]);});function Nre(){return fixEncoderSize(getBytesEncoder(),8).encode(jm)}function Ha(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["imageUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["crossmintTemplateId",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:jm}))}function $m(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["imageUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["crossmintTemplateId",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function Bre(){return combineCodec(Ha(),$m())}async function Lre(n,e){let t=e?.programAddress??u,r={credentialTemplate:{value:n.credentialTemplate??null,isWritable:true},credentialType:{value:n.credentialType??null,isWritable:false},issuer:{value:n.issuer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.credentialTemplate.value||(r.credentialTemplate.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([99,114,101,100,101,110,116,105,97,108,95,116,101,109,112,108,97,116,101])),getAddressEncoder().encode(S(r.credentialType.value)),getUtf8Encoder().encode(I(c.name))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credentialTemplate),i(r.credentialType),i(r.issuer),i(r.systemProgram)],data:Ha().encode(c),programAddress:t})}function Vre(n,e){let t=e?.programAddress??u,r={credentialTemplate:{value:n.credentialTemplate??null,isWritable:true},credentialType:{value:n.credentialType??null,isWritable:false},issuer:{value:n.issuer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credentialTemplate),i(r.credentialType),i(r.issuer),i(r.systemProgram)],data:Ha().encode(c),programAddress:t})}function Kre(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credentialTemplate:t(),credentialType:t(),issuer:t(),systemProgram:t()},data:$m().decode(n.data)}}var jm,LM=a(()=>{D();h();jm=new Uint8Array([183,109,12,128,134,8,139,144]);});function Zre(){return fixEncoderSize(getBytesEncoder(),8).encode(e1)}function $a(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["kind",Ne()],["schemaUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:e1}))}function t1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["kind",Be()],["schemaUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Yre(){return combineCodec($a(),t1())}async function eoe(n,e){let t=e?.programAddress??u,r={credentialType:{value:n.credentialType??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.credentialType.value||(r.credentialType.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([99,114,101,100,101,110,116,105,97,108,95,116,121,112,101])),getUtf8Encoder().encode(I(c.name))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credentialType),i(r.authority),i(r.systemProgram)],data:$a().encode(c),programAddress:t})}function toe(n,e){let t=e?.programAddress??u,r={credentialType:{value:n.credentialType??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credentialType),i(r.authority),i(r.systemProgram)],data:$a().encode(c),programAddress:t})}function noe(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credentialType:t(),authority:t(),systemProgram:t()},data:t1().decode(n.data)}}var e1,KM=a(()=>{D();h();m();e1=new Uint8Array([211,208,67,175,20,248,8,227]);});function Toe(){return fixEncoderSize(getBytesEncoder(),8).encode(r1)}function qa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["didString",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["verificationMethods",getArrayEncoder(Te())],["serviceEndpoints",getArrayEncoder(me())]]),n=>({...n,discriminator:r1}))}function o1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["didString",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["verificationMethods",getArrayDecoder(fe())],["serviceEndpoints",getArrayDecoder(ye())]])}function foe(){return combineCodec(qa(),o1())}async function Soe(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.didDocument.value||(r.didDocument.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([100,105,100,95,100,111,99,117,109,101,110,116])),getAddressEncoder().encode(S(r.controller.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.didDocument),i(r.controller),i(r.systemProgram),i(r.clock)],data:qa().encode(c),programAddress:t})}function xoe(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.didDocument),i(r.controller),i(r.systemProgram),i(r.clock)],data:qa().encode(c),programAddress:t})}function Doe(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{didDocument:t(),controller:t(),systemProgram:t(),clock:t()},data:o1().decode(n.data)}}var r1,qM=a(()=>{D();h();m();r1=new Uint8Array([253,40,200,239,69,147,82,182]);});function Goe(){return fixEncoderSize(getBytesEncoder(),8).encode(s1)}function Ja(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["escrowId",getU64Encoder()],["amount",getU64Encoder()],["jobDescription",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["deadline",getI64Encoder()]]),n=>({...n,discriminator:s1}))}function a1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["escrowId",getU64Decoder()],["amount",getU64Decoder()],["jobDescription",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["deadline",getI64Decoder()]])}function Woe(){return combineCodec(Ja(),a1())}async function Noe(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},clientTokenAccount:{value:n.clientTokenAccount??null,isWritable:true},escrowVault:{value:n.escrowVault??null,isWritable:true},tokenMint:{value:n.tokenMint??null,isWritable:false},client:{value:n.client??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.escrow.value||(r.escrow.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([103,104,111,115,116,95,112,114,111,116,101,99,116])),getAddressEncoder().encode(S(r.client.value)),getU64Encoder().encode(I(c.escrowId))]})),r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.escrow),i(r.agent),i(r.clientTokenAccount),i(r.escrowVault),i(r.tokenMint),i(r.client),i(r.tokenProgram),i(r.systemProgram)],data:Ja().encode(c),programAddress:t})}function Boe(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},clientTokenAccount:{value:n.clientTokenAccount??null,isWritable:true},escrowVault:{value:n.escrowVault??null,isWritable:true},tokenMint:{value:n.tokenMint??null,isWritable:false},client:{value:n.client??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.escrow),i(r.agent),i(r.clientTokenAccount),i(r.escrowVault),i(r.tokenMint),i(r.client),i(r.tokenProgram),i(r.systemProgram)],data:Ja().encode(c),programAddress:t})}function Loe(n){if(n.accounts.length<8)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{escrow:t(),agent:t(),clientTokenAccount:t(),escrowVault:t(),tokenMint:t(),client:t(),tokenProgram:t(),systemProgram:t()},data:a1().decode(n.data)}}var s1,XM=a(()=>{D();h();s1=new Uint8Array([253,215,165,116,36,108,68,80]);});function nie(){return fixEncoderSize(getBytesEncoder(),8).encode(u1)}function Qa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["multisigId",getU64Encoder()],["threshold",getU8Encoder()],["signers",getArrayEncoder(getAddressEncoder())],["config",Ze()]]),n=>({...n,discriminator:u1}))}function g1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["multisigId",getU64Decoder()],["threshold",getU8Decoder()],["signers",getArrayDecoder(getAddressDecoder())],["config",Ye()]])}function rie(){return combineCodec(Qa(),g1())}async function oie(n,e){let t=e?.programAddress??u,r={multisig:{value:n.multisig??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.multisig.value||(r.multisig.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,115,105,103])),getAddressEncoder().encode(S(r.owner.value)),getU64Encoder().encode(I(c.multisigId))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.multisig),i(r.owner),i(r.systemProgram)],data:Qa().encode(c),programAddress:t})}function iie(n,e){let t=e?.programAddress??u,r={multisig:{value:n.multisig??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.multisig),i(r.owner),i(r.systemProgram)],data:Qa().encode(c),programAddress:t})}function cie(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{multisig:t(),owner:t(),systemProgram:t()},data:g1().decode(n.data)}}var u1,tk=a(()=>{D();h();m();u1=new Uint8Array([148,146,240,10,226,215,167,174]);});function xie(){return fixEncoderSize(getBytesEncoder(),8).encode(p1)}function Xa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:p1}))}function l1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Die(){return combineCodec(Xa(),l1())}async function hie(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.signer.value)),getUtf8Encoder().encode(I(c.agentId))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Xa().encode(c),programAddress:t})}function m1(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Xa().encode(c),programAddress:t})}function Eie(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),signer:t(),clock:t()},data:l1().decode(n.data)}}var p1,ok=a(()=>{D();h();p1=new Uint8Array([205,171,239,225,82,126,96,166]);});function Mie(){return fixEncoderSize(getBytesEncoder(),8).encode(y1)}function T1(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:y1}))}function f1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function kie(){return combineCodec(T1(),f1())}function wie(n,e){let t=e?.programAddress??u,r={credentialTemplate:{value:n.credentialTemplate??null,isWritable:true},issuer:{value:n.issuer??null,isWritable:true}},c=g(t);return Object.freeze({accounts:[c(r.credentialTemplate),c(r.issuer)],data:T1().encode({}),programAddress:t})}function Uie(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credentialTemplate:t(),issuer:t()},data:f1().decode(n.data)}}var y1,sk=a(()=>{D();h();y1=new Uint8Array([177,8,195,104,56,34,84,162]);});function Nie(){return fixEncoderSize(getBytesEncoder(),8).encode(S1)}function x1(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:S1}))}function D1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function Bie(){return combineCodec(x1(),D1())}function Lie(n,e){let t=e?.programAddress??u,r={credentialType:{value:n.credentialType??null,isWritable:true},authority:{value:n.authority??null,isWritable:true}},c=g(t);return Object.freeze({accounts:[c(r.credentialType),c(r.authority)],data:x1().encode({}),programAddress:t})}function Vie(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credentialType:t(),authority:t()},data:D1().decode(n.data)}}var S1,uk=a(()=>{D();h();S1=new Uint8Array([110,174,221,244,36,206,60,237]);});function Zie(){return fixEncoderSize(getBytesEncoder(),8).encode(E1)}function Za(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:E1}))}function P1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function Yie(){return combineCodec(Za(),P1())}async function ece(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}};r.didDocument.value||(r.didDocument.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([100,105,100,95,100,111,99,117,109,101,110,116])),getAddressEncoder().encode(S(r.controller.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.didDocument),c(r.controller),c(r.clock)],data:Za().encode({}),programAddress:t})}function tce(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.didDocument),c(r.controller),c(r.clock)],data:Za().encode({}),programAddress:t})}function nce(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{didDocument:t(),controller:t(),clock:t()},data:P1().decode(n.data)}}var E1,Ak=a(()=>{D();h();E1=new Uint8Array([77,13,56,161,67,155,206,119]);});function uce(){return fixEncoderSize(getBytesEncoder(),8).encode(b1)}function Ya(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:b1}))}function R1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function gce(){return combineCodec(Ya(),R1())}async function Ace(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}};r.config.value||(r.config.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([112,114,111,116,111,99,111,108,95,99,111,110,102,105,103]))]}));let c=g(t);return Object.freeze({accounts:[c(r.config),c(r.authority)],data:Ya().encode({}),programAddress:t})}function pce(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}},c=g(t);return Object.freeze({accounts:[c(r.config),c(r.authority)],data:Ya().encode({}),programAddress:t})}function lce(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{config:t(),authority:t()},data:R1().decode(n.data)}}var b1,lk=a(()=>{D();h();b1=new Uint8Array([9,115,79,19,158,209,221,38]);});function Rce(){return fixEncoderSize(getBytesEncoder(),8).encode(I1)}function v1(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["reason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:I1}))}function M1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["reason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Ice(){return combineCodec(v1(),M1())}function vce(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},client:{value:n.client??null,isWritable:false}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.escrow),i(r.client)],data:v1().encode(c),programAddress:t})}function Mce(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{escrow:t(),client:t()},data:M1().decode(n.data)}}var I1,Tk=a(()=>{D();h();I1=new Uint8Array([210,63,221,114,212,97,195,156]);});function Wce(){return fixEncoderSize(getBytesEncoder(),8).encode(w1)}function ed(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["reportId",getU64Encoder()],["reportType",se()],["dateRangeStart",getI64Encoder()],["dateRangeEnd",getI64Encoder()]]),n=>({...n,discriminator:w1}))}function U1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["reportId",getU64Decoder()],["reportType",ae()],["dateRangeStart",getI64Decoder()],["dateRangeEnd",getI64Decoder()]])}function Nce(){return combineCodec(ed(),U1())}async function Bce(n,e){let t=e?.programAddress??u,r={report:{value:n.report??null,isWritable:true},auditTrail:{value:n.auditTrail??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.report.value||(r.report.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([99,111,109,112,108,105,97,110,99,101,95,114,101,112,111,114,116])),getU64Encoder().encode(I(c.reportId))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.report),i(r.auditTrail),i(r.authority),i(r.systemProgram)],data:ed().encode(c),programAddress:t})}function Lce(n,e){let t=e?.programAddress??u,r={report:{value:n.report??null,isWritable:true},auditTrail:{value:n.auditTrail??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.report),i(r.auditTrail),i(r.authority),i(r.systemProgram)],data:ed().encode(c),programAddress:t})}function Vce(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{report:t(),auditTrail:t(),authority:t(),systemProgram:t()},data:U1().decode(n.data)}}var w1,hk=a(()=>{D();h();m();w1=new Uint8Array([213,97,79,234,22,228,14,32]);});function ose(){return fixEncoderSize(getBytesEncoder(),8).encode(z1)}function td(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["entityType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["config",Ge()]]),n=>({...n,discriminator:z1}))}function O1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["entityType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["config",We()]])}function ise(){return combineCodec(td(),O1())}async function cse(n,e){let t=e?.programAddress??u,r={auditTrail:{value:n.auditTrail??null,isWritable:true},entity:{value:n.entity??null,isWritable:false},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.auditTrail.value||(r.auditTrail.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,117,100,105,116,95,116,114,97,105,108])),getAddressEncoder().encode(S(r.entity.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.auditTrail),i(r.entity),i(r.authority),i(r.systemProgram)],data:td().encode(c),programAddress:t})}function sse(n,e){let t=e?.programAddress??u,r={auditTrail:{value:n.auditTrail??null,isWritable:true},entity:{value:n.entity??null,isWritable:false},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.auditTrail),i(r.entity),i(r.authority),i(r.systemProgram)],data:td().encode(c),programAddress:t})}function ase(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{auditTrail:t(),entity:t(),authority:t(),systemProgram:t()},data:O1().decode(n.data)}}var z1,Pk=a(()=>{D();h();m();z1=new Uint8Array([145,182,236,249,212,17,175,161]);});function Tse(){return fixEncoderSize(getBytesEncoder(),8).encode(G1)}function nd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["proposalId",getU64Encoder()],["title",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["proposalType",de()],["executionParams",qe()]]),n=>({...n,discriminator:G1}))}function W1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["proposalId",getU64Decoder()],["title",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["proposalType",ue()],["executionParams",Je()]])}function fse(){return combineCodec(nd(),W1())}async function jt(n,e){let t=e?.programAddress??u,r={proposal:{value:n.proposal??null,isWritable:true},proposer:{value:n.proposer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.proposal.value||(r.proposal.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([103,111,118,101,114,110,97,110,99,101,95,112,114,111,112,111,115,97,108])),getU64Encoder().encode(I(c.proposalId))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.proposal),i(r.proposer),i(r.systemProgram)],data:nd().encode(c),programAddress:t})}function Sse(n,e){let t=e?.programAddress??u,r={proposal:{value:n.proposal??null,isWritable:true},proposer:{value:n.proposer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.proposal),i(r.proposer),i(r.systemProgram)],data:nd().encode(c),programAddress:t})}function xse(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{proposal:t(),proposer:t(),systemProgram:t()},data:W1().decode(n.data)}}var G1,Uk=a(()=>{D();h();m();G1=new Uint8Array([137,84,234,206,17,58,54,215]);});function Ise(){return fixEncoderSize(getBytesEncoder(),8).encode(B1)}function rd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:B1}))}function L1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function vse(){return combineCodec(rd(),L1())}async function Mse(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},treasury:{value:n.treasury??null,isWritable:false},buybackPool:{value:n.buybackPool??null,isWritable:false},moderatorPool:{value:n.moderatorPool??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false}};r.config.value||(r.config.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([112,114,111,116,111,99,111,108,95,99,111,110,102,105,103]))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.config),c(r.authority),c(r.treasury),c(r.buybackPool),c(r.moderatorPool),c(r.systemProgram)],data:rd().encode({}),programAddress:t})}function kse(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},treasury:{value:n.treasury??null,isWritable:false},buybackPool:{value:n.buybackPool??null,isWritable:false},moderatorPool:{value:n.moderatorPool??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false}};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.config),c(r.authority),c(r.treasury),c(r.buybackPool),c(r.moderatorPool),c(r.systemProgram)],data:rd().encode({}),programAddress:t})}function wse(n){if(n.accounts.length<6)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{config:t(),authority:t(),treasury:t(),buybackPool:t(),moderatorPool:t(),systemProgram:t()},data:L1().decode(n.data)}}var B1,zk=a(()=>{D();h();B1=new Uint8Array([28,50,43,233,244,98,123,118]);});function Vse(){return fixEncoderSize(getBytesEncoder(),8).encode(K1)}function od(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["initialRoles",getArrayEncoder(at())]]),n=>({...n,discriminator:K1}))}function H1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["initialRoles",getArrayDecoder(dt())]])}function Kse(){return combineCodec(od(),H1())}async function Hse(n,e){let t=e?.programAddress??u,r={rbacConfig:{value:n.rbacConfig??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.rbacConfig.value||(r.rbacConfig.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,98,97,99,95,99,111,110,102,105,103])),getAddressEncoder().encode(S(r.authority.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.rbacConfig),i(r.authority),i(r.systemProgram)],data:od().encode(c),programAddress:t})}function jse(n,e){let t=e?.programAddress??u,r={rbacConfig:{value:n.rbacConfig??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.rbacConfig),i(r.authority),i(r.systemProgram)],data:od().encode(c),programAddress:t})}function $se(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{rbacConfig:t(),authority:t(),systemProgram:t()},data:H1().decode(n.data)}}var K1,Fk=a(()=>{D();h();m();K1=new Uint8Array([215,68,129,228,237,165,0,240]);});function nae(){return fixEncoderSize(getBytesEncoder(),8).encode($1)}function id(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:$1}))}function q1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function rae(){return combineCodec(id(),q1())}async function oae(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.reputationMetrics),c(r.agent),c(r.authority),c(r.systemProgram),c(r.clock)],data:id().encode({}),programAddress:t})}function iae(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.reputationMetrics),c(r.agent),c(r.authority),c(r.systemProgram),c(r.clock)],data:id().encode({}),programAddress:t})}function cae(n){if(n.accounts.length<5)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reputationMetrics:t(),agent:t(),authority:t(),systemProgram:t(),clock:t()},data:q1().decode(n.data)}}var $1,Wk=a(()=>{D();h();$1=new Uint8Array([228,11,207,44,52,188,169,237]);});function fae(){return fixEncoderSize(getBytesEncoder(),8).encode(Q1)}function cd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["minStake",getU64Encoder()],["treasury",getAddressEncoder()]]),n=>({...n,discriminator:Q1}))}function X1(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["minStake",getU64Decoder()],["treasury",getAddressDecoder()]])}function Sae(){return combineCodec(cd(),X1())}async function Z1(n,e){let t=e?.programAddress??u,r={stakingConfig:{value:n.stakingConfig??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.stakingConfig.value||(r.stakingConfig.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,99,111,110,102,105,103]))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.stakingConfig),i(r.authority),i(r.systemProgram)],data:cd().encode(c),programAddress:t})}function xae(n,e){let t=e?.programAddress??u,r={stakingConfig:{value:n.stakingConfig??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.stakingConfig),i(r.authority),i(r.systemProgram)],data:cd().encode(c),programAddress:t})}function Dae(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{stakingConfig:t(),authority:t(),systemProgram:t()},data:X1().decode(n.data)}}var Q1,Bk=a(()=>{D();h();Q1=new Uint8Array([78,164,6,115,206,48,168,105]);});function vae(){return fixEncoderSize(getBytesEncoder(),8).encode(ey)}function sd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:ey}))}function ty(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function Mae(){return combineCodec(sd(),ty())}async function kae(n,e){let t=e?.programAddress??u,r={reentrancyGuard:{value:n.reentrancyGuard??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}};r.reentrancyGuard.value||(r.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.reentrancyGuard),c(r.authority),c(r.systemProgram)],data:sd().encode({}),programAddress:t})}function wae(n,e){let t=e?.programAddress??u,r={reentrancyGuard:{value:n.reentrancyGuard??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let c=g(t);return Object.freeze({accounts:[c(r.reentrancyGuard),c(r.authority),c(r.systemProgram)],data:sd().encode({}),programAddress:t})}function Uae(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reentrancyGuard:t(),authority:t(),systemProgram:t()},data:ty().decode(n.data)}}var ey,Vk=a(()=>{D();h();ey=new Uint8Array([156,109,115,85,12,60,245,99]);});function Lae(){return fixEncoderSize(getBytesEncoder(),8).encode(iy)}function dd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["credentialId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["subjectDataHash",fixEncoderSize(getBytesEncoder(),32)],["subjectDataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["expiresAt",getOptionEncoder(getI64Encoder())],["sourceAccount",getOptionEncoder(getAddressEncoder())]]),n=>({...n,discriminator:iy}))}function cy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["credentialId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["subjectDataHash",fixDecoderSize(getBytesDecoder(),32)],["subjectDataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["expiresAt",getOptionDecoder(getI64Decoder())],["sourceAccount",getOptionDecoder(getAddressDecoder())]])}function Vae(){return combineCodec(dd(),cy())}async function Kae(n,e){let t=e?.programAddress??u,r={credential:{value:n.credential??null,isWritable:true},credentialTemplate:{value:n.credentialTemplate??null,isWritable:true},credentialType:{value:n.credentialType??null,isWritable:true},subject:{value:n.subject??null,isWritable:false},issuer:{value:n.issuer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.credential.value||(r.credential.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([99,114,101,100,101,110,116,105,97,108])),getAddressEncoder().encode(S(r.credentialTemplate.value)),getAddressEncoder().encode(S(r.subject.value)),getUtf8Encoder().encode(I(c.credentialId))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credential),i(r.credentialTemplate),i(r.credentialType),i(r.subject),i(r.issuer),i(r.systemProgram)],data:dd().encode(c),programAddress:t})}function Hae(n,e){let t=e?.programAddress??u,r={credential:{value:n.credential??null,isWritable:true},credentialTemplate:{value:n.credentialTemplate??null,isWritable:true},credentialType:{value:n.credentialType??null,isWritable:true},subject:{value:n.subject??null,isWritable:false},issuer:{value:n.issuer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.credential),i(r.credentialTemplate),i(r.credentialType),i(r.subject),i(r.issuer),i(r.systemProgram)],data:dd().encode(c),programAddress:t})}function jae(n){if(n.accounts.length<6)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credential:t(),credentialTemplate:t(),credentialType:t(),subject:t(),issuer:t(),systemProgram:t()},data:cy().decode(n.data)}}var iy,Yk=a(()=>{D();h();iy=new Uint8Array([255,193,171,224,68,171,194,87]);});function nde(){return fixEncoderSize(getBytesEncoder(),8).encode(ay)}function gd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["platform",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["externalId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["verified",getBooleanEncoder()]]),n=>({...n,discriminator:ay}))}function dy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["platform",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["externalId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["verified",getBooleanDecoder()]])}function rde(){return combineCodec(gd(),dy())}async function ode(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},externalIdMapping:{value:n.externalIdMapping??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.externalIdMapping.value||(r.externalIdMapping.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([101,120,116,101,114,110,97,108,95,105,100])),getUtf8Encoder().encode(I(c.platform)),getUtf8Encoder().encode(I(c.externalId))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.externalIdMapping),i(r.authority),i(r.systemProgram)],data:gd().encode(c),programAddress:t})}function ide(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},externalIdMapping:{value:n.externalIdMapping??null,isWritable:true},authority:{value:n.authority??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.externalIdMapping),i(r.authority),i(r.systemProgram)],data:gd().encode(c),programAddress:t})}function cde(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),externalIdMapping:t(),authority:t(),systemProgram:t()},data:dy().decode(n.data)}}var ay,cw=a(()=>{D();h();ay=new Uint8Array([156,102,141,155,175,13,29,86]);});function Tde(){return fixEncoderSize(getBytesEncoder(),8).encode(gy)}function Ad(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["newStatus",getBooleanEncoder()]]),n=>({...n,discriminator:gy}))}function Ay(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["newStatus",getBooleanDecoder()]])}function fde(){return combineCodec(Ad(),Ay())}async function Sde(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:true},owner:{value:n.owner??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agent.value||(r.agent.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.owner.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.owner),i(r.clock)],data:Ad().encode(c),programAddress:t})}function xde(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:true},owner:{value:n.owner??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.owner),i(r.clock)],data:Ad().encode(c),programAddress:t})}function Dde(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),owner:t(),clock:t()},data:Ay().decode(n.data)}}var gy,aw=a(()=>{D();h();gy=new Uint8Array([164,219,91,38,45,31,33,47]);});function Gde(){return fixEncoderSize(getBytesEncoder(),8).encode(ly)}function pd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["paymentSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["amount",getU64Encoder()],["responseTimeMs",getU64Encoder()],["success",getBooleanEncoder()]]),n=>({...n,discriminator:ly}))}function my(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["paymentSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["amount",getU64Decoder()],["responseTimeMs",getU64Decoder()],["success",getBooleanDecoder()]])}function Wde(){return combineCodec(pd(),my())}async function Nde(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:pd().encode(c),programAddress:t})}function Bde(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:pd().encode(c),programAddress:t})}function Lde(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reputationMetrics:t(),agent:t(),authority:t(),clock:t()},data:my().decode(n.data)}}var ly,Aw=a(()=>{D();h();ly=new Uint8Array([165,202,159,139,65,65,36,163]);});function Xde(){return fixEncoderSize(getBytesEncoder(),8).encode(yy)}function xd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentType",getU8Encoder()],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["pricingModel",J()]]),n=>({...n,discriminator:yy}))}function Ty(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentType",getU8Decoder()],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["pricingModel",Q()]])}function Zde(){return combineCodec(xd(),Ty())}async function fy(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},stakingAccount:{value:n.stakingAccount??null,isWritable:false},signer:{value:n.signer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.signer.value)),getUtf8Encoder().encode(I(c.agentId))]})),r.stakingAccount.value||(r.stakingAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103])),getAddressEncoder().encode(S(r.signer.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.stakingAccount),i(r.signer),i(r.systemProgram),i(r.clock)],data:xd().encode(c),programAddress:t})}function Yde(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},stakingAccount:{value:n.stakingAccount??null,isWritable:false},signer:{value:n.signer??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.stakingAccount),i(r.signer),i(r.systemProgram),i(r.clock)],data:xd().encode(c),programAddress:t})}function eue(n){if(n.accounts.length<5)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),stakingAccount:t(),signer:t(),systemProgram:t(),clock:t()},data:Ty().decode(n.data)}}var yy,yw=a(()=>{D();h();m();yy=new Uint8Array([135,157,66,195,2,113,175,30]);});function due(){return fixEncoderSize(getBytesEncoder(),8).encode(Sy)}function Id(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentType",getU8Encoder()],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["pricingModel",J()]]),n=>({...n,discriminator:Sy}))}function xy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentType",getU8Decoder()],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["pricingModel",Q()]])}function uue(){return combineCodec(Id(),xy())}async function Dy(n,e){let t=e?.programAddress??u,r={treeAuthority:{value:n.treeAuthority??null,isWritable:true},merkleTree:{value:n.merkleTree??null,isWritable:true},userRegistry:{value:n.userRegistry??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},compressionProgram:{value:n.compressionProgram??null,isWritable:false},logWrapper:{value:n.logWrapper??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.treeAuthority.value||(r.treeAuthority.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,116,114,101,101,95,99,111,110,102,105,103])),getAddressEncoder().encode(S(r.signer.value))]})),r.userRegistry.value||(r.userRegistry.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(S(r.signer.value))]})),r.compressionProgram.value||(r.compressionProgram.value="cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK"),r.logWrapper.value||(r.logWrapper.value="noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.treeAuthority),i(r.merkleTree),i(r.userRegistry),i(r.signer),i(r.compressionProgram),i(r.logWrapper),i(r.systemProgram),i(r.clock)],data:Id().encode(c),programAddress:t})}function gue(n,e){let t=e?.programAddress??u,r={treeAuthority:{value:n.treeAuthority??null,isWritable:true},merkleTree:{value:n.merkleTree??null,isWritable:true},userRegistry:{value:n.userRegistry??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},compressionProgram:{value:n.compressionProgram??null,isWritable:false},logWrapper:{value:n.logWrapper??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.compressionProgram.value||(r.compressionProgram.value="cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK"),r.logWrapper.value||(r.logWrapper.value="noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.treeAuthority),i(r.merkleTree),i(r.userRegistry),i(r.signer),i(r.compressionProgram),i(r.logWrapper),i(r.systemProgram),i(r.clock)],data:Id().encode(c),programAddress:t})}function Aue(n){if(n.accounts.length<8)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{treeAuthority:t(),merkleTree:t(),userRegistry:t(),signer:t(),compressionProgram:t(),logWrapper:t(),systemProgram:t(),clock:t()},data:xy().decode(n.data)}}var Sy,xw=a(()=>{D();h();m();Sy=new Uint8Array([15,6,94,55,65,80,123,248]);});function Eue(){return fixEncoderSize(getBytesEncoder(),8).encode(hy)}function Ey(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["name",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["capabilities",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["serviceEndpoint",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:hy}))}function Py(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["name",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["capabilities",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["serviceEndpoint",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function Pue(){return combineCodec(Ey(),Py())}function Cue(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},authority:{value:n.authority??null,isWritable:true}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.authority)],data:Ey().encode(c),programAddress:t})}function bue(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),authority:t()},data:Py().decode(n.data)}}var hy,Ew=a(()=>{D();h();hy=new Uint8Array([34,233,111,236,212,22,26,254]);});function _ue(){return fixEncoderSize(getBytesEncoder(),8).encode(by)}function zd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:by}))}function Ry(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function zue(){return combineCodec(zd(),Ry())}async function Oue(n,e){let t=e?.programAddress??u,r={reentrancyGuard:{value:n.reentrancyGuard??null,isWritable:true},authority:{value:n.authority??null,isWritable:true}};r.reentrancyGuard.value||(r.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]}));let c=g(t);return Object.freeze({accounts:[c(r.reentrancyGuard),c(r.authority)],data:zd().encode({}),programAddress:t})}function Fue(n,e){let t=e?.programAddress??u,r={reentrancyGuard:{value:n.reentrancyGuard??null,isWritable:true},authority:{value:n.authority??null,isWritable:true}},c=g(t);return Object.freeze({accounts:[c(r.reentrancyGuard),c(r.authority)],data:zd().encode({}),programAddress:t})}function Gue(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reentrancyGuard:t(),authority:t()},data:Ry().decode(n.data)}}var by,Cw=a(()=>{D();h();by=new Uint8Array([93,74,168,125,46,153,9,255]);});function $ue(){return fixEncoderSize(getBytesEncoder(),8).encode(vy)}function Od(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:vy}))}function My(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function que(){return combineCodec(Od(),My())}async function Jue(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:false},didController:{value:n.didController??null,isWritable:false}};r.didDocument.value||(r.didDocument.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([100,105,100,95,100,111,99,117,109,101,110,116])),getAddressEncoder().encode(S(r.didController.value))]}));let c=g(t);return Object.freeze({accounts:[c(r.didDocument),c(r.didController)],data:Od().encode({}),programAddress:t})}function Que(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:false},didController:{value:n.didController??null,isWritable:false}},c=g(t);return Object.freeze({accounts:[c(r.didDocument),c(r.didController)],data:Od().encode({}),programAddress:t})}function Xue(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{didDocument:t(),didController:t()},data:My().decode(n.data)}}var vy,Rw=a(()=>{D();h();vy=new Uint8Array([168,180,218,211,184,19,102,12]);});var _w={};oe(_w,{REVOKE_AUTHORIZATION_DISCRIMINATOR:()=>Fd,getRevokeAuthorizationDiscriminatorBytes:()=>Mw,getRevokeAuthorizationInstruction:()=>ww,getRevokeAuthorizationInstructionDataCodec:()=>kw,getRevokeAuthorizationInstructionDataDecoder:()=>Wd,getRevokeAuthorizationInstructionDataEncoder:()=>Gd,parseRevokeAuthorizationInstruction:()=>Uw});function Mw(){return fixEncoderSize(getBytesEncoder(),8).encode(Fd)}function Gd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["nonce",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:Fd}))}function Wd(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["nonce",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function kw(){return combineCodec(Gd(),Wd())}function ww(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},authorization:{value:n.authorization??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.authorization),i(r.authority)],data:Gd().encode(c),programAddress:t})}function Uw(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),authorization:t(),authority:t()},data:Wd().decode(n.data)}}var Fd,ky=a(()=>{D();h();Fd=new Uint8Array([222,179,207,59,191,78,24,248]);});function fge(){return fixEncoderSize(getBytesEncoder(),8).encode(wy)}function Uy(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:wy}))}function _y(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function Sge(){return combineCodec(Uy(),_y())}function xge(n,e){let t=e?.programAddress??u,r={credential:{value:n.credential??null,isWritable:true},issuer:{value:n.issuer??null,isWritable:true}},c=g(t);return Object.freeze({accounts:[c(r.credential),c(r.issuer)],data:Uy().encode({}),programAddress:t})}function Dge(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credential:t(),issuer:t()},data:_y().decode(n.data)}}var wy,Fw=a(()=>{D();h();wy=new Uint8Array([38,123,95,95,223,158,169,87]);});function Uge(){return fixEncoderSize(getBytesEncoder(),8).encode(Fy)}function Nd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["owner",getAddressEncoder()],["reason",Qe()],["customAmount",getOptionEncoder(getU64Encoder())]]),n=>({...n,discriminator:Fy}))}function Gy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["owner",getAddressDecoder()],["reason",Xe()],["customAmount",getOptionDecoder(getU64Decoder())]])}function _ge(){return combineCodec(Nd(),Gy())}async function zge(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},stakingVault:{value:n.stakingVault??null,isWritable:true},treasury:{value:n.treasury??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},tokenProgram:{value:n.tokenProgram??null,isWritable:false}},c={...n};r.stakingAccount.value||(r.stakingAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103])),getAddressEncoder().encode(I(c.owner))]})),r.stakingConfig.value||(r.stakingConfig.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,99,111,110,102,105,103]))]})),r.stakingVault.value||(r.stakingVault.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,118,97,117,108,116])),getAddressEncoder().encode(S(r.stakingConfig.value))]})),r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let i=g(t);return Object.freeze({accounts:[i(r.stakingAccount),i(r.stakingConfig),i(r.stakingVault),i(r.treasury),i(r.authority),i(r.tokenProgram)],data:Nd().encode(c),programAddress:t})}function Oge(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},stakingVault:{value:n.stakingVault??null,isWritable:true},treasury:{value:n.treasury??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},tokenProgram:{value:n.tokenProgram??null,isWritable:false}},c={...n};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let i=g(t);return Object.freeze({accounts:[i(r.stakingAccount),i(r.stakingConfig),i(r.stakingVault),i(r.treasury),i(r.authority),i(r.tokenProgram)],data:Nd().encode(c),programAddress:t})}function Fge(n){if(n.accounts.length<6)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{stakingAccount:t(),stakingConfig:t(),stakingVault:t(),treasury:t(),authority:t(),tokenProgram:t()},data:Gy().decode(n.data)}}var Fy,Ww=a(()=>{D();h();m();Fy=new Uint8Array([190,242,137,27,41,18,233,37]);});function qge(){return fixEncoderSize(getBytesEncoder(),8).encode(Wy)}function Ld(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["amount",getU64Encoder()],["lockDuration",getI64Encoder()]]),n=>({...n,discriminator:Wy}))}function Ny(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["amount",getU64Decoder()],["lockDuration",getI64Decoder()]])}function Jge(){return combineCodec(Ld(),Ny())}async function By(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},ownerTokenAccount:{value:n.ownerTokenAccount??null,isWritable:true},stakingVault:{value:n.stakingVault??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},ghostMint:{value:n.ghostMint??null,isWritable:false},owner:{value:n.owner??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false},rent:{value:n.rent??null,isWritable:false}},c={...n};r.stakingAccount.value||(r.stakingAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103])),getAddressEncoder().encode(S(r.owner.value))]})),r.stakingVault.value||(r.stakingVault.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,118,97,117,108,116])),getAddressEncoder().encode(S(r.stakingConfig.value))]})),r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.rent.value||(r.rent.value="SysvarRent111111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.stakingAccount),i(r.ownerTokenAccount),i(r.stakingVault),i(r.stakingConfig),i(r.ghostMint),i(r.owner),i(r.tokenProgram),i(r.systemProgram),i(r.rent)],data:Ld().encode(c),programAddress:t})}function Qge(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},ownerTokenAccount:{value:n.ownerTokenAccount??null,isWritable:true},stakingVault:{value:n.stakingVault??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},ghostMint:{value:n.ghostMint??null,isWritable:false},owner:{value:n.owner??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false},systemProgram:{value:n.systemProgram??null,isWritable:false},rent:{value:n.rent??null,isWritable:false}},c={...n};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.rent.value||(r.rent.value="SysvarRent111111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.stakingAccount),i(r.ownerTokenAccount),i(r.stakingVault),i(r.stakingConfig),i(r.ghostMint),i(r.owner),i(r.tokenProgram),i(r.systemProgram),i(r.rent)],data:Ld().encode(c),programAddress:t})}function Xge(n){if(n.accounts.length<9)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{stakingAccount:t(),ownerTokenAccount:t(),stakingVault:t(),stakingConfig:t(),ghostMint:t(),owner:t(),tokenProgram:t(),systemProgram:t(),rent:t()},data:Ny().decode(n.data)}}var Wy,Vw=a(()=>{D();h();Wy=new Uint8Array([5,196,24,54,196,56,173,191]);});function uAe(){return fixEncoderSize(getBytesEncoder(),8).encode(Ly)}function Vy(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["deliveryProof",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:Ly}))}function Ky(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["deliveryProof",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function gAe(){return combineCodec(Vy(),Ky())}function AAe(n,e){let t=e?.programAddress??u,r={escrow:{value:n.escrow??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},agentOwner:{value:n.agentOwner??null,isWritable:false}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.escrow),i(r.agent),i(r.agentOwner)],data:Vy().encode(c),programAddress:t})}function pAe(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{escrow:t(),agent:t(),agentOwner:t()},data:Ky().decode(n.data)}}var Ly,jw=a(()=>{D();h();Ly=new Uint8Array([217,177,33,54,136,185,123,96]);});function MAe(){return fixEncoderSize(getBytesEncoder(),8).encode(jy)}function Vd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["rating",getU8Encoder()],["paymentSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),n=>({...n,discriminator:jy}))}function $y(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["rating",getU8Decoder()],["paymentSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function kAe(){return combineCodec(Vd(),$y())}async function wAe(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},client:{value:n.client??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.client),i(r.clock)],data:Vd().encode(c),programAddress:t})}function UAe(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},client:{value:n.client??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.client),i(r.clock)],data:Vd().encode(c),programAddress:t})}function _Ae(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reputationMetrics:t(),agent:t(),client:t(),clock:t()},data:$y().decode(n.data)}}var jy,qw=a(()=>{D();h();jy=new Uint8Array([23,160,228,88,168,145,129,19]);});function BAe(){return fixEncoderSize(getBytesEncoder(),8).encode(Jy)}function Kd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),n=>({...n,discriminator:Jy}))}function Qy(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function LAe(){return combineCodec(Kd(),Qy())}async function Xy(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},stakingVault:{value:n.stakingVault??null,isWritable:true},ownerTokenAccount:{value:n.ownerTokenAccount??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false}};r.stakingAccount.value||(r.stakingAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103])),getAddressEncoder().encode(S(r.owner.value))]})),r.stakingConfig.value||(r.stakingConfig.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,99,111,110,102,105,103]))]})),r.stakingVault.value||(r.stakingVault.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([115,116,97,107,105,110,103,95,118,97,117,108,116])),getAddressEncoder().encode(S(r.stakingConfig.value))]})),r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let c=g(t);return Object.freeze({accounts:[c(r.stakingAccount),c(r.stakingConfig),c(r.stakingVault),c(r.ownerTokenAccount),c(r.owner),c(r.tokenProgram)],data:Kd().encode({}),programAddress:t})}function VAe(n,e){let t=e?.programAddress??u,r={stakingAccount:{value:n.stakingAccount??null,isWritable:true},stakingConfig:{value:n.stakingConfig??null,isWritable:false},stakingVault:{value:n.stakingVault??null,isWritable:true},ownerTokenAccount:{value:n.ownerTokenAccount??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},tokenProgram:{value:n.tokenProgram??null,isWritable:false}};r.tokenProgram.value||(r.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let c=g(t);return Object.freeze({accounts:[c(r.stakingAccount),c(r.stakingConfig),c(r.stakingVault),c(r.ownerTokenAccount),c(r.owner),c(r.tokenProgram)],data:Kd().encode({}),programAddress:t})}function KAe(n){if(n.accounts.length<6)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{stakingAccount:t(),stakingConfig:t(),stakingVault:t(),ownerTokenAccount:t(),owner:t(),tokenProgram:t()},data:Qy().decode(n.data)}}var Jy,Xw=a(()=>{D();h();Jy=new Uint8Array([252,101,172,252,1,4,12,116]);});function tpe(){return fixEncoderSize(getBytesEncoder(),8).encode(tT)}function Qd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentType",getU8Encoder()],["name",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["description",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["pricingModel",getOptionEncoder(J())]]),n=>({...n,discriminator:tT}))}function nT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentType",getU8Decoder()],["name",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["description",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["pricingModel",getOptionDecoder(Q())]])}function npe(){return combineCodec(Qd(),nT())}async function rpe(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.signer.value)),getUtf8Encoder().encode(I(c.agentId))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Qd().encode(c),programAddress:t})}function rT(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Qd().encode(c),programAddress:t})}function ope(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),signer:t(),clock:t()},data:nT().decode(n.data)}}var tT,Yw=a(()=>{D();h();m();tT=new Uint8Array([85,2,178,9,119,139,102,164]);});function xpe(){return fixEncoderSize(getBytesEncoder(),8).encode(iT)}function Xd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["reputationScore",getU64Encoder()]]),n=>({...n,discriminator:iT}))}function cT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["reputationScore",getU64Decoder()]])}function Dpe(){return combineCodec(Xd(),cT())}async function hpe(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentAccount.value||(r.agentAccount.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.signer.value)),getUtf8Encoder().encode(I(c.agentId))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Xd().encode(c),programAddress:t})}function Epe(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},signer:{value:n.signer??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.signer),i(r.clock)],data:Xd().encode(c),programAddress:t})}function Ppe(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),signer:t(),clock:t()},data:cT().decode(n.data)}}var iT,nU=a(()=>{D();h();iT=new Uint8Array([80,227,92,245,231,37,99,180]);});function Bpe(){return fixEncoderSize(getBytesEncoder(),8).encode(lT)}function Zd(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentPubkey",getAddressEncoder()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["isActive",getBooleanEncoder()],["lastUpdated",getI64Encoder()],["metadataUri",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["capabilities",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:lT}))}function mT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentPubkey",getAddressDecoder()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["isActive",getBooleanDecoder()],["lastUpdated",getI64Decoder()],["metadataUri",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["capabilities",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function Lpe(){return combineCodec(Zd(),mT())}async function Vpe(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.agent.value||(r.agent.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(S(r.owner.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.owner),i(r.systemProgram)],data:Zd().encode(c),programAddress:t})}function Kpe(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:true},owner:{value:n.owner??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.owner),i(r.systemProgram)],data:Zd().encode(c),programAddress:t})}function Hpe(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),owner:t(),systemProgram:t()},data:mT().decode(n.data)}}var lT,iU=a(()=>{D();h();lT=new Uint8Array([87,146,181,198,252,68,243,102]);});function ole(){return fixEncoderSize(getBytesEncoder(),8).encode(yT)}function TT(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["crossmintCredentialId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["status",Le()]]),n=>({...n,discriminator:yT}))}function fT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["crossmintCredentialId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["status",Ve()]])}function ile(){return combineCodec(TT(),fT())}function cle(n,e){let t=e?.programAddress??u,r={credential:{value:n.credential??null,isWritable:true},issuer:{value:n.issuer??null,isWritable:true}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.credential),i(r.issuer)],data:TT().encode(c),programAddress:t})}function sle(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{credential:t(),issuer:t()},data:fT().decode(n.data)}}var yT,aU=a(()=>{D();h();m();yT=new Uint8Array([22,167,59,238,22,231,239,146]);});function yle(){return fixEncoderSize(getBytesEncoder(),8).encode(xT)}function tu(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["addVerificationMethod",getOptionEncoder(Te())],["removeVerificationMethodId",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["addServiceEndpoint",getOptionEncoder(me())],["removeServiceEndpointId",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:xT}))}function DT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["addVerificationMethod",getOptionDecoder(fe())],["removeVerificationMethodId",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["addServiceEndpoint",getOptionDecoder(ye())],["removeServiceEndpointId",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function Tle(){return combineCodec(tu(),DT())}async function fle(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.didDocument.value||(r.didDocument.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([100,105,100,95,100,111,99,117,109,101,110,116])),getAddressEncoder().encode(S(r.controller.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.didDocument),i(r.controller),i(r.clock)],data:tu().encode(c),programAddress:t})}function Sle(n,e){let t=e?.programAddress??u,r={didDocument:{value:n.didDocument??null,isWritable:true},controller:{value:n.controller??null,isWritable:true},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.didDocument),i(r.controller),i(r.clock)],data:tu().encode(c),programAddress:t})}function xle(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{didDocument:t(),controller:t(),clock:t()},data:DT().decode(n.data)}}var xT,yU=a(()=>{D();h();m();xT=new Uint8Array([64,216,17,91,205,94,45,57]);});function Ule(){return fixEncoderSize(getBytesEncoder(),8).encode(hT)}function ET(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["newScore",getU64Encoder()],["components",getOptionEncoder(getArrayEncoder(ct()))]]),n=>({...n,discriminator:hT}))}function PT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["newScore",getU64Decoder()],["components",getOptionDecoder(getArrayDecoder(st()))]])}function _le(){return combineCodec(ET(),PT())}function zle(n,e){let t=e?.programAddress??u,r={agentAccount:{value:n.agentAccount??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.agentAccount),i(r.authority)],data:ET().encode(c),programAddress:t})}function Ole(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentAccount:t(),authority:t()},data:PT().decode(n.data)}}var hT,SU=a(()=>{D();h();m();hT=new Uint8Array([213,152,5,80,163,224,151,120]);});function jle(){return fixEncoderSize(getBytesEncoder(),8).encode(IT)}function nu(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["escrowFeeBps",getOptionEncoder(getU16Encoder())],["agentRegistrationFee",getOptionEncoder(getU64Encoder())],["listingFee",getOptionEncoder(getU64Encoder())],["disputeFeeBps",getOptionEncoder(getU16Encoder())],["feesEnabled",getOptionEncoder(getBooleanEncoder())],["treasury",getOptionEncoder(getAddressEncoder())],["buybackPool",getOptionEncoder(getAddressEncoder())],["moderatorPool",getOptionEncoder(getAddressEncoder())]]),n=>({...n,discriminator:IT}))}function vT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["escrowFeeBps",getOptionDecoder(getU16Decoder())],["agentRegistrationFee",getOptionDecoder(getU64Decoder())],["listingFee",getOptionDecoder(getU64Decoder())],["disputeFeeBps",getOptionDecoder(getU16Decoder())],["feesEnabled",getOptionDecoder(getBooleanDecoder())],["treasury",getOptionDecoder(getAddressDecoder())],["buybackPool",getOptionDecoder(getAddressDecoder())],["moderatorPool",getOptionDecoder(getAddressDecoder())]])}function $le(){return combineCodec(nu(),vT())}async function qle(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}},c={...n};r.config.value||(r.config.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([112,114,111,116,111,99,111,108,95,99,111,110,102,105,103]))]}));let i=g(t);return Object.freeze({accounts:[i(r.config),i(r.authority)],data:nu().encode(c),programAddress:t})}function Jle(n,e){let t=e?.programAddress??u,r={config:{value:n.config??null,isWritable:true},authority:{value:n.authority??null,isWritable:false}},c={...n},i=g(t);return Object.freeze({accounts:[i(r.config),i(r.authority)],data:nu().encode(c),programAddress:t})}function Qle(n){if(n.accounts.length<2)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{config:t(),authority:t()},data:vT().decode(n.data)}}var IT,CU=a(()=>{D();h();IT=new Uint8Array([197,97,123,54,221,168,11,135]);});function ime(){return fixEncoderSize(getBytesEncoder(),8).encode(FT)}function iu(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["skillTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["behaviorTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["complianceTags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["tagScores",getArrayEncoder(ut())]]),n=>({...n,discriminator:FT}))}function GT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["skillTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["behaviorTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["complianceTags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["tagScores",getArrayDecoder(gt())]])}function cme(){return combineCodec(iu(),GT())}async function sme(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:iu().encode(c),programAddress:t})}function ame(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:iu().encode(c),programAddress:t})}function dme(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reputationMetrics:t(),agent:t(),authority:t(),clock:t()},data:GT().decode(n.data)}}var FT,RU=a(()=>{D();h();m();FT=new Uint8Array([206,96,254,186,129,180,103,198]);});var OU={};oe(OU,{UPDATE_REPUTATION_WITH_AUTH_DISCRIMINATOR:()=>uu,getUpdateReputationWithAuthDiscriminatorBytes:()=>kU,getUpdateReputationWithAuthInstruction:()=>_U,getUpdateReputationWithAuthInstructionAsync:()=>UU,getUpdateReputationWithAuthInstructionDataCodec:()=>wU,getUpdateReputationWithAuthInstructionDataDecoder:()=>gu,getUpdateReputationWithAuthInstructionDataEncoder:()=>Xt,parseUpdateReputationWithAuthInstruction:()=>zU});function kU(){return fixEncoderSize(getBytesEncoder(),8).encode(uu)}function Xt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["reputationChange",getI64Encoder()],["transactionSignature",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["metadata",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["nonce",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:uu}))}function gu(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["reputationChange",getI64Decoder()],["transactionSignature",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["metadata",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["nonce",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function wU(){return combineCodec(Xt(),gu())}async function UU(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},authorization:{value:n.authorization??null,isWritable:true},usageRecord:{value:n.usageRecord??null,isWritable:true},authorizedSource:{value:n.authorizedSource??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.authorization.value||(r.authorization.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,97,117,116,104])),getAddressEncoder().encode(S(r.agent.value)),getAddressEncoder().encode(S(r.authorizedSource.value)),getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())).encode(I(c.nonce))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.reputationMetrics),i(r.authorization),i(r.usageRecord),i(r.authorizedSource),i(r.systemProgram),i(r.clock)],data:Xt().encode(c),programAddress:t})}function _U(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},authorization:{value:n.authorization??null,isWritable:true},usageRecord:{value:n.usageRecord??null,isWritable:true},authorizedSource:{value:n.authorizedSource??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.reputationMetrics),i(r.authorization),i(r.usageRecord),i(r.authorizedSource),i(r.systemProgram),i(r.clock)],data:Xt().encode(c),programAddress:t})}function zU(n){if(n.accounts.length<7)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),reputationMetrics:t(),authorization:t(),usageRecord:t(),authorizedSource:t(),systemProgram:t(),clock:t()},data:gu().decode(n.data)}}var uu,KT=a(()=>{D();h();uu=new Uint8Array([61,236,225,167,134,43,53,93]);});function Mme(){return fixEncoderSize(getBytesEncoder(),8).encode(qT)}function Au(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["sourceName",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["score",getU16Encoder()],["weight",getU16Encoder()],["dataPoints",getU32Encoder()],["reliability",getU16Encoder()]]),n=>({...n,discriminator:qT}))}function JT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["sourceName",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["score",getU16Decoder()],["weight",getU16Decoder()],["dataPoints",getU32Decoder()],["reliability",getU16Decoder()]])}function kme(){return combineCodec(Au(),JT())}async function wme(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.reputationMetrics.value||(r.reputationMetrics.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,117,116,97,116,105,111,110,95,109,101,116,114,105,99,115])),getAddressEncoder().encode(S(r.agent.value))]})),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:Au().encode(c),programAddress:t})}function Ume(n,e){let t=e?.programAddress??u,r={reputationMetrics:{value:n.reputationMetrics??null,isWritable:true},agent:{value:n.agent??null,isWritable:true},authority:{value:n.authority??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.reputationMetrics),i(r.agent),i(r.authority),i(r.clock)],data:Au().encode(c),programAddress:t})}function _me(n){if(n.accounts.length<4)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{reputationMetrics:t(),agent:t(),authority:t(),clock:t()},data:JT().decode(n.data)}}var qT,NU=a(()=>{D();h();qT=new Uint8Array([161,240,255,69,130,227,71,123]);});function t1e(){return fixEncoderSize(getBytesEncoder(),8).encode(ZT)}function pu(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentPubkey",getAddressEncoder()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["supportedCapabilities",getArrayEncoder(getU64Encoder())],["verifiedAt",getI64Encoder()]]),n=>({...n,discriminator:ZT}))}function YT(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentPubkey",getAddressDecoder()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["supportedCapabilities",getArrayDecoder(getU64Decoder())],["verifiedAt",getI64Decoder()]])}function n1e(){return combineCodec(pu(),YT())}async function ef(n,e){let t=e?.programAddress??u,r={agentVerification:{value:n.agentVerification??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},verifier:{value:n.verifier??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.agentVerification.value||(r.agentVerification.value=await getProgramDerivedAddress({programAddress:t,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,118,101,114,105,102,105,99,97,116,105,111,110])),getAddressEncoder().encode(S(r.agent.value)),getAddressEncoder().encode(S(r.verifier.value))]})),r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentVerification),i(r.agent),i(r.verifier),i(r.systemProgram),i(r.clock)],data:pu().encode(c),programAddress:t})}function r1e(n,e){let t=e?.programAddress??u,r={agentVerification:{value:n.agentVerification??null,isWritable:true},agent:{value:n.agent??null,isWritable:false},verifier:{value:n.verifier??null,isWritable:true},systemProgram:{value:n.systemProgram??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.systemProgram.value||(r.systemProgram.value="11111111111111111111111111111111"),r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agentVerification),i(r.agent),i(r.verifier),i(r.systemProgram),i(r.clock)],data:pu().encode(c),programAddress:t})}function o1e(n){if(n.accounts.length<5)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agentVerification:t(),agent:t(),verifier:t(),systemProgram:t(),clock:t()},data:YT().decode(n.data)}}var ZT,LU=a(()=>{D();h();ZT=new Uint8Array([206,212,108,12,105,61,100,66]);});function S1e(){return fixEncoderSize(getBytesEncoder(),8).encode(tf)}function nf(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["nonce",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),n=>({...n,discriminator:tf}))}function rf(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["nonce",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function x1e(){return combineCodec(nf(),rf())}function D1e(n,e){let t=e?.programAddress??u,r={agent:{value:n.agent??null,isWritable:false},authorization:{value:n.authorization??null,isWritable:false},clock:{value:n.clock??null,isWritable:false}},c={...n};r.clock.value||(r.clock.value="SysvarC1ock11111111111111111111111111111111");let i=g(t);return Object.freeze({accounts:[i(r.agent),i(r.authorization),i(r.clock)],data:nf().encode(c),programAddress:t})}function h1e(n){if(n.accounts.length<3)throw new Error("Not enough accounts");let e=0,t=()=>{let o=n.accounts[e];return e+=1,o};return {programAddress:n.programAddress,accounts:{agent:t(),authorization:t(),clock:t()},data:rf().decode(n.data)}}var tf,HU=a(()=>{D();h();tf=new Uint8Array([43,9,131,59,74,118,113,170]);});var jU=a(()=>{nM();iM();aM();TM();IM();Wm();LM();KM();qM();XM();tk();ok();sk();uk();Ak();lk();Tk();hk();Pk();Uk();zk();Fk();Wk();Bk();Vk();Yk();cw();aw();Aw();yw();xw();Ew();Cw();Rw();ky();Fw();Ww();Vw();jw();qw();Xw();Yw();nU();iU();aU();yU();SU();CU();RU();KT();NU();LU();HU();});var lu={};oe(lu,{ACTIVATE_AGENT_DISCRIMINATOR:()=>Dm,AGENT_DISCRIMINATOR:()=>tp,AGENT_REPUTATION_AUTH_DISCRIMINATOR:()=>cp,AGENT_TREE_CONFIG_DISCRIMINATOR:()=>dp,AGENT_VERIFICATION_DISCRIMINATOR:()=>Ap,APPROVE_DELIVERY_DISCRIMINATOR:()=>Pm,ARBITRATE_DISPUTE_DISCRIMINATOR:()=>Rm,AUDIT_TRAIL_DISCRIMINATOR:()=>Tp,AUTHORIZATION_USAGE_RECORD_DISCRIMINATOR:()=>hp,AUTO_CREATE_GHOST_DISCRIMINATOR:()=>km,AccessTier:()=>Mn,ActivationRequirementType:()=>Bn,AgentStatus:()=>Ln,AuditAction:()=>Yn,AuthenticationLevel:()=>ur,AuthenticationMethod:()=>pr,BackupFrequency:()=>br,BiometricStorageMethod:()=>Ur,BiometricType:()=>_r,CLAIM_GHOST_DISCRIMINATOR:()=>Um,COMPLIANCE_REPORT_DISCRIMINATOR:()=>vp,CREATE_AGENT_AUTHORIZATION_DISCRIMINATOR:()=>La,CREATE_CREDENTIAL_TEMPLATE_DISCRIMINATOR:()=>jm,CREATE_CREDENTIAL_TYPE_DISCRIMINATOR:()=>e1,CREATE_DID_DOCUMENT_DISCRIMINATOR:()=>r1,CREATE_ESCROW_DISCRIMINATOR:()=>s1,CREATE_MULTISIG_DISCRIMINATOR:()=>u1,CREDENTIAL_DISCRIMINATOR:()=>Lp,CREDENTIAL_TEMPLATE_DISCRIMINATOR:()=>Xp,CREDENTIAL_TYPE_DISCRIMINATOR:()=>cl,ConditionType:()=>Br,ConstraintOperator:()=>Qr,CredentialKind:()=>Xr,CredentialStatus:()=>Zr,CrossChainStatus:()=>to,DEACTIVATE_AGENT_DISCRIMINATOR:()=>p1,DEACTIVATE_CREDENTIAL_TEMPLATE_DISCRIMINATOR:()=>y1,DEACTIVATE_CREDENTIAL_TYPE_DISCRIMINATOR:()=>S1,DEACTIVATE_DID_DOCUMENT_DISCRIMINATOR:()=>E1,DID_DOCUMENT_DISCRIMINATOR:()=>ml,DataAccessLevel:()=>no,DegradationHandling:()=>so,ENABLE_PROTOCOL_FEES_DISCRIMINATOR:()=>b1,EXTERNAL_ID_MAPPING_DISCRIMINATOR:()=>fl,EnforcementLevel:()=>To,EscrowStatus:()=>fo,FILE_DISPUTE_DISCRIMINATOR:()=>I1,GENERATE_COMPLIANCE_REPORT_DISCRIMINATOR:()=>w1,GHOSTSPEAK_MARKETPLACE_ERROR__DEFAULT_KEY_AS_ADMIN:()=>jv,GHOSTSPEAK_MARKETPLACE_ERROR__SYSTEM_PROGRAM_AS_ADMIN:()=>Hv,GHOSTSPEAK_MARKETPLACE_ERROR__TEST_ADDRESS_ON_MAINNET:()=>qv,GHOSTSPEAK_MARKETPLACE_ERROR__UNAUTHORIZED_ADMIN:()=>$v,GHOSTSPEAK_MARKETPLACE_ERROR__VALIDATION_FAILED:()=>Jv,GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS:()=>u,GHOST_PROTECT_ESCROW_DISCRIMINATOR:()=>kl,GOVERNANCE_PROPOSAL_DISCRIMINATOR:()=>Ol,GhostspeakMarketplaceAccount:()=>Lv,GhostspeakMarketplaceInstruction:()=>Vv,INITIALIZE_AUDIT_TRAIL_DISCRIMINATOR:()=>z1,INITIALIZE_GOVERNANCE_PROPOSAL_DISCRIMINATOR:()=>G1,INITIALIZE_PROTOCOL_CONFIG_DISCRIMINATOR:()=>B1,INITIALIZE_RBAC_CONFIG_DISCRIMINATOR:()=>K1,INITIALIZE_REPUTATION_METRICS_DISCRIMINATOR:()=>$1,INITIALIZE_STAKING_CONFIG_DISCRIMINATOR:()=>Q1,INIT_REENTRANCY_GUARD_DISCRIMINATOR:()=>ey,ISSUE_CREDENTIAL_DISCRIMINATOR:()=>iy,LINK_EXTERNAL_ID_DISCRIMINATOR:()=>ay,MANAGE_AGENT_STATUS_DISCRIMINATOR:()=>gy,MULTISIG_DISCRIMINATOR:()=>Bl,MultisigType:()=>Ho,NotificationMethod:()=>Qo,NotificationPriority:()=>Yo,NotificationTargetType:()=>ui,NotificationTiming:()=>gi,PROTOCOL_CONFIG_DISCRIMINATOR:()=>jl,PermissionConstraintType:()=>Gi,PolicyStatus:()=>tc,PolicyType:()=>nc,PricingModel:()=>Et,ProposalStatus:()=>dc,ProposalType:()=>Pt,QuorumMethod:()=>Ac,RBAC_CONFIG_DISCRIMINATOR:()=>Yl,RECORD_PAYAI_PAYMENT_DISCRIMINATOR:()=>ly,REENTRANCY_GUARD_DISCRIMINATOR:()=>nm,REGISTER_AGENT_COMPRESSED_DISCRIMINATOR:()=>Sy,REGISTER_AGENT_DISCRIMINATOR:()=>yy,REGISTER_GHOST_METADATA_DISCRIMINATOR:()=>hy,REPUTATION_METRICS_DISCRIMINATOR:()=>im,RESET_REENTRANCY_GUARD_DISCRIMINATOR:()=>by,RESOLVE_DID_DOCUMENT_DISCRIMINATOR:()=>vy,REVOKE_AUTHORIZATION_DISCRIMINATOR:()=>Fd,REVOKE_CREDENTIAL_DISCRIMINATOR:()=>wy,ReentrancyState:()=>Tc,ReportStatus:()=>vc,ReportType:()=>wc,ReportingFrequency:()=>Ic,ReputationSourceType:()=>zc,RiskCategory:()=>Kc,RiskLevel:()=>Xc,RoleStatus:()=>ys,RoleType:()=>Ts,RuleEffect:()=>fs,SLASH_STAKE_DISCRIMINATOR:()=>Fy,STAKE_GHOST_DISCRIMINATOR:()=>Wy,STAKING_ACCOUNT_DISCRIMINATOR:()=>um,STAKING_CONFIG_DISCRIMINATOR:()=>pm,SUBMIT_DELIVERY_DISCRIMINATOR:()=>Ly,SUBMIT_SERVICE_RATING_DISCRIMINATOR:()=>jy,ScopeInheritance:()=>Ds,ScopeType:()=>hs,SecurityEventType:()=>Es,ServiceEndpointType:()=>Ms,SlashReason:()=>ks,SodConstraintType:()=>_s,StepUpTrigger:()=>Fs,TimeLockType:()=>Ls,TransactionPriority:()=>Vs,TransactionStatus:()=>Ks,TransactionType:()=>Hs,TrendDirection:()=>js,UNSTAKE_GHOST_DISCRIMINATOR:()=>Jy,UPDATE_AGENT_DISCRIMINATOR:()=>tT,UPDATE_AGENT_REPUTATION_DISCRIMINATOR:()=>iT,UPDATE_AGENT_SERVICE_DISCRIMINATOR:()=>lT,UPDATE_CROSSCHAIN_STATUS_DISCRIMINATOR:()=>yT,UPDATE_DID_DOCUMENT_DISCRIMINATOR:()=>xT,UPDATE_GHOST_SCORE_DISCRIMINATOR:()=>hT,UPDATE_PROTOCOL_CONFIG_DISCRIMINATOR:()=>IT,UPDATE_REPUTATION_TAGS_DISCRIMINATOR:()=>FT,UPDATE_REPUTATION_WITH_AUTH_DISCRIMINATOR:()=>uu,UPDATE_SOURCE_REPUTATION_DISCRIMINATOR:()=>qT,USER_REGISTRY_DISCRIMINATOR:()=>ym,UnlockMethod:()=>$s,VERIFY_AGENT_DISCRIMINATOR:()=>ZT,VERIFY_AUTHORIZATION_DISCRIMINATOR:()=>tf,ValueType:()=>qs,VerificationMethodType:()=>Ys,VerificationRelationship:()=>ea,ViolationSeverity:()=>ta,VoteChoice:()=>ca,arbitratorDecision:()=>xO,decodeAgent:()=>rp,decodeAgentReputationAuth:()=>ap,decodeAgentTreeConfig:()=>gp,decodeAgentVerification:()=>lp,decodeAuditTrail:()=>Sp,decodeAuthorizationUsageRecord:()=>Pp,decodeComplianceReport:()=>kp,decodeCredential:()=>Kp,decodeCredentialTemplate:()=>Yp,decodeCredentialType:()=>al,decodeDidDocument:()=>Tl,decodeExternalIdMapping:()=>xl,decodeGhostProtectEscrow:()=>Ul,decodeGovernanceProposal:()=>Gl,decodeMultisig:()=>Vl,decodeProtocolConfig:()=>ql,decodeRbacConfig:()=>tm,decodeReentrancyGuard:()=>om,decodeReputationMetrics:()=>sm,decodeStakingAccount:()=>Am,decodeStakingConfig:()=>mm,decodeUserRegistry:()=>fm,delegationScope:()=>u2,fetchAgent:()=>X$,fetchAgentReputationAuth:()=>fq,fetchAgentTreeConfig:()=>Fq,fetchAgentVerification:()=>rJ,fetchAllAgent:()=>Z$,fetchAllAgentReputationAuth:()=>Sq,fetchAllAgentTreeConfig:()=>Gq,fetchAllAgentVerification:()=>oJ,fetchAllAuditTrail:()=>EJ,fetchAllAuthorizationUsageRecord:()=>KJ,fetchAllComplianceReport:()=>sQ,fetchAllCredential:()=>hQ,fetchAllCredentialTemplate:()=>$Q,fetchAllCredentialType:()=>fX,fetchAllDidDocument:()=>BX,fetchAllExternalIdMapping:()=>uZ,fetchAllGhostProtectEscrow:()=>RZ,fetchAllGovernanceProposal:()=>jZ,fetchAllMaybeAgent:()=>Tb,fetchAllMaybeAgentReputationAuth:()=>kb,fetchAllMaybeAgentTreeConfig:()=>Wb,fetchAllMaybeAgentVerification:()=>Jb,fetchAllMaybeAuditTrail:()=>rR,fetchAllMaybeAuthorizationUsageRecord:()=>TR,fetchAllMaybeComplianceReport:()=>DR,fetchAllMaybeCredential:()=>CR,fetchAllMaybeCredentialTemplate:()=>UR,fetchAllMaybeCredentialType:()=>WR,fetchAllMaybeDidDocument:()=>HR,fetchAllMaybeExternalIdMapping:()=>iI,fetchAllMaybeGhostProtectEscrow:()=>pI,fetchAllMaybeGovernanceProposal:()=>CI,fetchAllMaybeMultisig:()=>WI,fetchAllMaybeProtocolConfig:()=>JI,fetchAllMaybeRbacConfig:()=>rv,fetchAllMaybeReentrancyGuard:()=>dv,fetchAllMaybeReputationMetrics:()=>mv,fetchAllMaybeStakingAccount:()=>Ev,fetchAllMaybeStakingConfig:()=>Uv,fetchAllMaybeUserRegistry:()=>Wv,fetchAllMultisig:()=>sY,fetchAllProtocolConfig:()=>bY,fetchAllRbacConfig:()=>KY,fetchAllReentrancyGuard:()=>pee,fetchAllReputationMetrics:()=>Uee,fetchAllStakingAccount:()=>nte,fetchAllStakingConfig:()=>Pte,fetchAllUserRegistry:()=>qte,fetchAuditTrail:()=>hJ,fetchAuthorizationUsageRecord:()=>VJ,fetchComplianceReport:()=>cQ,fetchCredential:()=>DQ,fetchCredentialTemplate:()=>jQ,fetchCredentialType:()=>TX,fetchDidDocument:()=>NX,fetchExternalIdMapping:()=>dZ,fetchGhostProtectEscrow:()=>bZ,fetchGovernanceProposal:()=>HZ,fetchMaybeAgent:()=>yb,fetchMaybeAgentReputationAuth:()=>Mb,fetchMaybeAgentTreeConfig:()=>Gb,fetchMaybeAgentVerification:()=>qb,fetchMaybeAuditTrail:()=>nR,fetchMaybeAuthorizationUsageRecord:()=>yR,fetchMaybeComplianceReport:()=>xR,fetchMaybeCredential:()=>PR,fetchMaybeCredentialTemplate:()=>wR,fetchMaybeCredentialType:()=>GR,fetchMaybeDidDocument:()=>KR,fetchMaybeExternalIdMapping:()=>oI,fetchMaybeGhostProtectEscrow:()=>AI,fetchMaybeGovernanceProposal:()=>PI,fetchMaybeMultisig:()=>GI,fetchMaybeProtocolConfig:()=>qI,fetchMaybeRbacConfig:()=>nv,fetchMaybeReentrancyGuard:()=>av,fetchMaybeReputationMetrics:()=>lv,fetchMaybeStakingAccount:()=>hv,fetchMaybeStakingConfig:()=>wv,fetchMaybeUserRegistry:()=>Gv,fetchMultisig:()=>cY,fetchProtocolConfig:()=>CY,fetchRbacConfig:()=>VY,fetchReentrancyGuard:()=>Aee,fetchReputationMetrics:()=>wee,fetchStakingAccount:()=>tte,fetchStakingConfig:()=>Ete,fetchUserRegistry:()=>$te,getAccessAuditConfigCodec:()=>z0,getAccessAuditConfigDecoder:()=>Tn,getAccessAuditConfigEncoder:()=>yn,getAccessPolicyCodec:()=>H0,getAccessPolicyDecoder:()=>Sn,getAccessPolicyEncoder:()=>fn,getAccessTierCodec:()=>J0,getAccessTierDecoder:()=>$,getAccessTierEncoder:()=>j,getAccountLockoutPoliciesCodec:()=>m_,getAccountLockoutPoliciesDecoder:()=>_n,getAccountLockoutPoliciesEncoder:()=>Un,getActionCodec:()=>i_,getActionDecoder:()=>wn,getActionEncoder:()=>kn,getActivateAgentDiscriminatorBytes:()=>yne,getActivateAgentInstruction:()=>Em,getActivateAgentInstructionAsync:()=>fne,getActivateAgentInstructionDataCodec:()=>Tne,getActivateAgentInstructionDataDecoder:()=>hm,getActivateAgentInstructionDataEncoder:()=>Wa,getActivationRequirementCodec:()=>k_,getActivationRequirementDecoder:()=>Gn,getActivationRequirementEncoder:()=>Fn,getActivationRequirementTypeCodec:()=>z_,getActivationRequirementTypeDecoder:()=>Nn,getActivationRequirementTypeEncoder:()=>Wn,getAgentCodec:()=>Q$,getAgentDecoder:()=>np,getAgentDiscriminatorBytes:()=>J$,getAgentEncoder:()=>mb,getAgentRegisteredEventCodec:()=>$_,getAgentRegisteredEventDecoder:()=>nS,getAgentRegisteredEventEncoder:()=>tS,getAgentReputationAuthCodec:()=>Tq,getAgentReputationAuthDecoder:()=>sp,getAgentReputationAuthDiscriminatorBytes:()=>yq,getAgentReputationAuthEncoder:()=>vb,getAgentServiceUpdatedEventCodec:()=>sz,getAgentServiceUpdatedEventDecoder:()=>sS,getAgentServiceUpdatedEventEncoder:()=>cS,getAgentStatusChangedEventCodec:()=>Tz,getAgentStatusChangedEventDecoder:()=>mS,getAgentStatusChangedEventEncoder:()=>lS,getAgentStatusCodec:()=>gz,getAgentStatusDecoder:()=>Kn,getAgentStatusEncoder:()=>Vn,getAgentTreeConfigCodec:()=>Oq,getAgentTreeConfigDecoder:()=>up,getAgentTreeConfigDiscriminatorBytes:()=>zq,getAgentTreeConfigEncoder:()=>Fb,getAgentTreeConfigSize:()=>Wq,getAgentUpdatedEventCodec:()=>Ez,getAgentUpdatedEventDecoder:()=>xS,getAgentUpdatedEventEncoder:()=>SS,getAgentVerificationCodec:()=>nJ,getAgentVerificationDataCodec:()=>Bz,getAgentVerificationDataDecoder:()=>jn,getAgentVerificationDataEncoder:()=>Hn,getAgentVerificationDecoder:()=>pp,getAgentVerificationDiscriminatorBytes:()=>tJ,getAgentVerificationEncoder:()=>$b,getAgingPolicyCodec:()=>tO,getAgingPolicyDecoder:()=>qn,getAgingPolicyEncoder:()=>$n,getApprovalLevelCodec:()=>pO,getApprovalLevelDecoder:()=>Zn,getApprovalLevelEncoder:()=>Xn,getApproveDeliveryDiscriminatorBytes:()=>bne,getApproveDeliveryInstruction:()=>Ine,getApproveDeliveryInstructionDataCodec:()=>Rne,getApproveDeliveryInstructionDataDecoder:()=>bm,getApproveDeliveryInstructionDataEncoder:()=>Cm,getArbitrateDisputeDiscriminatorBytes:()=>One,getArbitrateDisputeInstruction:()=>Gne,getArbitrateDisputeInstructionDataCodec:()=>Fne,getArbitrateDisputeInstructionDataDecoder:()=>vm,getArbitrateDisputeInstructionDataEncoder:()=>Im,getArbitratorDecisionCodec:()=>SO,getArbitratorDecisionDecoder:()=>ce,getArbitratorDecisionEncoder:()=>ie,getAuditActionCodec:()=>CO,getAuditActionDecoder:()=>Fe,getAuditActionEncoder:()=>Oe,getAuditConfigCodec:()=>zO,getAuditConfigDecoder:()=>We,getAuditConfigEncoder:()=>Ge,getAuditContextCodec:()=>HO,getAuditContextDecoder:()=>ir,getAuditContextEncoder:()=>or,getAuditEntryCodec:()=>YO,getAuditEntryDecoder:()=>sr,getAuditEntryEncoder:()=>cr,getAuditTrailCodec:()=>DJ,getAuditTrailDecoder:()=>fp,getAuditTrailDiscriminatorBytes:()=>xJ,getAuditTrailEncoder:()=>tR,getAuditTrailInitializedEventCodec:()=>p8,getAuditTrailInitializedEventDecoder:()=>FS,getAuditTrailInitializedEventEncoder:()=>OS,getAuthenticationLevelCodec:()=>T8,getAuthenticationLevelDecoder:()=>Ar,getAuthenticationLevelEncoder:()=>gr,getAuthenticationMethodCodec:()=>D8,getAuthenticationMethodDecoder:()=>mr,getAuthenticationMethodEncoder:()=>lr,getAuthenticationPoliciesCodec:()=>k8,getAuthenticationPoliciesDecoder:()=>Tr,getAuthenticationPoliciesEncoder:()=>yr,getAuthenticationStrengthCodec:()=>F8,getAuthenticationStrengthDecoder:()=>Sr,getAuthenticationStrengthEncoder:()=>fr,getAuthorizationPoliciesCodec:()=>B8,getAuthorizationPoliciesDecoder:()=>Cr,getAuthorizationPoliciesEncoder:()=>Pr,getAuthorizationUsageRecordCodec:()=>LJ,getAuthorizationUsageRecordDecoder:()=>Ep,getAuthorizationUsageRecordDiscriminatorBytes:()=>BJ,getAuthorizationUsageRecordEncoder:()=>mR,getAutoCreateGhostDiscriminatorBytes:()=>Zne,getAutoCreateGhostInstruction:()=>tre,getAutoCreateGhostInstructionAsync:()=>ere,getAutoCreateGhostInstructionDataCodec:()=>Yne,getAutoCreateGhostInstructionDataDecoder:()=>wm,getAutoCreateGhostInstructionDataEncoder:()=>Na,getBackupFrequencyCodec:()=>H8,getBackupFrequencyDecoder:()=>tr,getBackupFrequencyEncoder:()=>er,getBiometricPoliciesCodec:()=>Y8,getBiometricPoliciesDecoder:()=>Dr,getBiometricPoliciesEncoder:()=>xr,getBiometricProtectionCodec:()=>iF,getBiometricProtectionDecoder:()=>Ir,getBiometricProtectionEncoder:()=>Rr,getBiometricQualityCodec:()=>gF,getBiometricQualityDecoder:()=>Mr,getBiometricQualityEncoder:()=>vr,getBiometricStorageMethodCodec:()=>mF,getBiometricStorageMethodDecoder:()=>wr,getBiometricStorageMethodEncoder:()=>kr,getBiometricTypeCodec:()=>SF,getBiometricTypeDecoder:()=>ze,getBiometricTypeEncoder:()=>_e,getClaimGhostDiscriminatorBytes:()=>gre,getClaimGhostInstruction:()=>Om,getClaimGhostInstructionDataCodec:()=>Are,getClaimGhostInstructionDataDecoder:()=>zm,getClaimGhostInstructionDataEncoder:()=>_m,getComplianceFlagsCodec:()=>kF,getComplianceFlagsDecoder:()=>dr,getComplianceFlagsEncoder:()=>ar,getComplianceMetricsCodec:()=>FF,getComplianceMetricsDecoder:()=>Or,getComplianceMetricsEncoder:()=>zr,getCompliancePoliciesCodec:()=>BF,getCompliancePoliciesDecoder:()=>Gr,getCompliancePoliciesEncoder:()=>Fr,getComplianceReportCodec:()=>iQ,getComplianceReportDecoder:()=>Mp,getComplianceReportDiscriminatorBytes:()=>oQ,getComplianceReportEncoder:()=>SR,getComplianceReportGeneratedEventCodec:()=>$F,getComplianceReportGeneratedEventDecoder:()=>ax,getComplianceReportGeneratedEventEncoder:()=>sx,getComplianceStatusCodec:()=>YF,getComplianceStatusDecoder:()=>Nr,getComplianceStatusEncoder:()=>Wr,getCompressedAgentCreatedEventCodec:()=>gG,getCompressedAgentCreatedEventDecoder:()=>fx,getCompressedAgentCreatedEventEncoder:()=>Tx,getConditionTypeCodec:()=>mG,getConditionTypeDecoder:()=>Vr,getConditionTypeEncoder:()=>Lr,getConstraintConditionCodec:()=>SG,getConstraintConditionDecoder:()=>Hr,getConstraintConditionEncoder:()=>Kr,getConstraintOperatorCodec:()=>EG,getConstraintOperatorDecoder:()=>$r,getConstraintOperatorEncoder:()=>jr,getCreateAgentAuthorizationDiscriminatorBytes:()=>zM,getCreateAgentAuthorizationInstruction:()=>GM,getCreateAgentAuthorizationInstructionAsync:()=>FM,getCreateAgentAuthorizationInstructionDataCodec:()=>OM,getCreateAgentAuthorizationInstructionDataDecoder:()=>Va,getCreateAgentAuthorizationInstructionDataEncoder:()=>Ht,getCreateCredentialTemplateDiscriminatorBytes:()=>Nre,getCreateCredentialTemplateInstruction:()=>Vre,getCreateCredentialTemplateInstructionAsync:()=>Lre,getCreateCredentialTemplateInstructionDataCodec:()=>Bre,getCreateCredentialTemplateInstructionDataDecoder:()=>$m,getCreateCredentialTemplateInstructionDataEncoder:()=>Ha,getCreateCredentialTypeDiscriminatorBytes:()=>Zre,getCreateCredentialTypeInstruction:()=>toe,getCreateCredentialTypeInstructionAsync:()=>eoe,getCreateCredentialTypeInstructionDataCodec:()=>Yre,getCreateCredentialTypeInstructionDataDecoder:()=>t1,getCreateCredentialTypeInstructionDataEncoder:()=>$a,getCreateDidDocumentDiscriminatorBytes:()=>Toe,getCreateDidDocumentInstruction:()=>xoe,getCreateDidDocumentInstructionAsync:()=>Soe,getCreateDidDocumentInstructionDataCodec:()=>foe,getCreateDidDocumentInstructionDataDecoder:()=>o1,getCreateDidDocumentInstructionDataEncoder:()=>qa,getCreateEscrowDiscriminatorBytes:()=>Goe,getCreateEscrowInstruction:()=>Boe,getCreateEscrowInstructionAsync:()=>Noe,getCreateEscrowInstructionDataCodec:()=>Woe,getCreateEscrowInstructionDataDecoder:()=>a1,getCreateEscrowInstructionDataEncoder:()=>Ja,getCreateMultisigDiscriminatorBytes:()=>nie,getCreateMultisigInstruction:()=>iie,getCreateMultisigInstructionAsync:()=>oie,getCreateMultisigInstructionDataCodec:()=>rie,getCreateMultisigInstructionDataDecoder:()=>g1,getCreateMultisigInstructionDataEncoder:()=>Qa,getCredentialCodec:()=>xQ,getCredentialDecoder:()=>Vp,getCredentialDiscriminatorBytes:()=>SQ,getCredentialEncoder:()=>ER,getCredentialKindCodec:()=>RG,getCredentialKindDecoder:()=>Be,getCredentialKindEncoder:()=>Ne,getCredentialStatusCodec:()=>kG,getCredentialStatusDecoder:()=>eo,getCredentialStatusEncoder:()=>Yr,getCredentialTemplateCodec:()=>HQ,getCredentialTemplateDecoder:()=>Zp,getCredentialTemplateDiscriminatorBytes:()=>KQ,getCredentialTemplateEncoder:()=>kR,getCredentialTypeCodec:()=>yX,getCredentialTypeDecoder:()=>sl,getCredentialTypeDiscriminatorBytes:()=>mX,getCredentialTypeEncoder:()=>FR,getCrossChainStatusCodec:()=>zG,getCrossChainStatusDecoder:()=>Ve,getCrossChainStatusEncoder:()=>Le,getDataAccessLevelCodec:()=>WG,getDataAccessLevelDecoder:()=>oo,getDataAccessLevelEncoder:()=>ro,getDataProtectionPoliciesCodec:()=>VG,getDataProtectionPoliciesDecoder:()=>co,getDataProtectionPoliciesEncoder:()=>io,getDeactivateAgentDiscriminatorBytes:()=>xie,getDeactivateAgentInstruction:()=>m1,getDeactivateAgentInstructionAsync:()=>hie,getDeactivateAgentInstructionDataCodec:()=>Die,getDeactivateAgentInstructionDataDecoder:()=>l1,getDeactivateAgentInstructionDataEncoder:()=>Xa,getDeactivateCredentialTemplateDiscriminatorBytes:()=>Mie,getDeactivateCredentialTemplateInstruction:()=>wie,getDeactivateCredentialTemplateInstructionDataCodec:()=>kie,getDeactivateCredentialTemplateInstructionDataDecoder:()=>f1,getDeactivateCredentialTemplateInstructionDataEncoder:()=>T1,getDeactivateCredentialTypeDiscriminatorBytes:()=>Nie,getDeactivateCredentialTypeInstruction:()=>Lie,getDeactivateCredentialTypeInstructionDataCodec:()=>Bie,getDeactivateCredentialTypeInstructionDataDecoder:()=>D1,getDeactivateCredentialTypeInstructionDataEncoder:()=>x1,getDeactivateDidDocumentDiscriminatorBytes:()=>Zie,getDeactivateDidDocumentInstruction:()=>tce,getDeactivateDidDocumentInstructionAsync:()=>ece,getDeactivateDidDocumentInstructionDataCodec:()=>Yie,getDeactivateDidDocumentInstructionDataDecoder:()=>P1,getDeactivateDidDocumentInstructionDataEncoder:()=>Za,getDegradationHandlingCodec:()=>$G,getDegradationHandlingDecoder:()=>Qn,getDegradationHandlingEncoder:()=>Jn,getDelegationInfoCodec:()=>t2,getDelegationInfoDecoder:()=>uo,getDelegationInfoEncoder:()=>ao,getDelegationScopeCodec:()=>d2,getDelegationScopeDecoder:()=>Ao,getDelegationScopeEncoder:()=>go,getDeliverySubmittedEventCodec:()=>C2,getDeliverySubmittedEventDecoder:()=>Nx,getDeliverySubmittedEventEncoder:()=>Wx,getDidDocumentCodec:()=>WX,getDidDocumentDecoder:()=>yl,getDidDocumentDiscriminatorBytes:()=>GX,getDidDocumentEncoder:()=>VR,getDisputeFiledEventCodec:()=>W2,getDisputeFiledEventDecoder:()=>Vx,getDisputeFiledEventEncoder:()=>Lx,getDisputeResolvedEventCodec:()=>$2,getDisputeResolvedEventDecoder:()=>jx,getDisputeResolvedEventEncoder:()=>Hx,getEmergencyAccessConfigCodec:()=>tW,getEmergencyAccessConfigDecoder:()=>lo,getEmergencyAccessConfigEncoder:()=>po,getEmergencyConfigCodec:()=>dW,getEmergencyConfigDecoder:()=>yo,getEmergencyConfigEncoder:()=>mo,getEnableProtocolFeesDiscriminatorBytes:()=>uce,getEnableProtocolFeesInstruction:()=>pce,getEnableProtocolFeesInstructionAsync:()=>Ace,getEnableProtocolFeesInstructionDataCodec:()=>gce,getEnableProtocolFeesInstructionDataDecoder:()=>R1,getEnableProtocolFeesInstructionDataEncoder:()=>Ya,getEnforcementLevelCodec:()=>pW,getEnforcementLevelDecoder:()=>$e,getEnforcementLevelEncoder:()=>je,getEscrowCompletedEventCodec:()=>SW,getEscrowCompletedEventDecoder:()=>aD,getEscrowCompletedEventEncoder:()=>sD,getEscrowCreatedEventCodec:()=>CW,getEscrowCreatedEventDecoder:()=>mD,getEscrowCreatedEventEncoder:()=>lD,getEscrowStatusCodec:()=>vW,getEscrowStatusDecoder:()=>xo,getEscrowStatusEncoder:()=>So,getExecutionConditionCodec:()=>BW,getExecutionConditionDecoder:()=>Ae,getExecutionConditionEncoder:()=>ge,getExecutionParamsCodec:()=>JW,getExecutionParamsDecoder:()=>Je,getExecutionParamsEncoder:()=>qe,getExternalIdMappingCodec:()=>aZ,getExternalIdMappingDecoder:()=>Sl,getExternalIdMappingDiscriminatorBytes:()=>sZ,getExternalIdMappingEncoder:()=>rI,getExternalIdentifierCodec:()=>rN,getExternalIdentifierDecoder:()=>Po,getExternalIdentifierEncoder:()=>Eo,getFileDisputeDiscriminatorBytes:()=>Rce,getFileDisputeInstruction:()=>vce,getFileDisputeInstructionDataCodec:()=>Ice,getFileDisputeInstructionDataDecoder:()=>M1,getFileDisputeInstructionDataEncoder:()=>v1,getGenerateComplianceReportDiscriminatorBytes:()=>Wce,getGenerateComplianceReportInstruction:()=>Lce,getGenerateComplianceReportInstructionAsync:()=>Bce,getGenerateComplianceReportInstructionDataCodec:()=>Nce,getGenerateComplianceReportInstructionDataDecoder:()=>U1,getGenerateComplianceReportInstructionDataEncoder:()=>ed,getGeographicRegionCodec:()=>pN,getGeographicRegionDecoder:()=>bo,getGeographicRegionEncoder:()=>Co,getGhostProtectEscrowCodec:()=>CZ,getGhostProtectEscrowDecoder:()=>wl,getGhostProtectEscrowDiscriminatorBytes:()=>PZ,getGhostProtectEscrowEncoder:()=>gI,getGhostSlashedEventCodec:()=>DN,getGhostSlashedEventDecoder:()=>FD,getGhostSlashedEventEncoder:()=>OD,getGhostStakedEventCodec:()=>UN,getGhostStakedEventDecoder:()=>LD,getGhostStakedEventEncoder:()=>BD,getGhostUnstakedEventCodec:()=>BN,getGhostUnstakedEventDecoder:()=>HD,getGhostUnstakedEventEncoder:()=>KD,getGhostspeakMarketplaceErrorMessage:()=>Yte,getGovernanceProposalCodec:()=>KZ,getGovernanceProposalCreatedEventCodec:()=>YN,getGovernanceProposalCreatedEventDecoder:()=>QD,getGovernanceProposalCreatedEventEncoder:()=>JD,getGovernanceProposalDecoder:()=>Fl,getGovernanceProposalDiscriminatorBytes:()=>VZ,getGovernanceProposalEncoder:()=>EI,getHierarchicalBoundaryCodec:()=>i6,getHierarchicalBoundaryDecoder:()=>wo,getHierarchicalBoundaryEncoder:()=>ko,getIncidentResponsePoliciesCodec:()=>T6,getIncidentResponsePoliciesDecoder:()=>_o,getIncidentResponsePoliciesEncoder:()=>Uo,getInitReentrancyGuardDiscriminatorBytes:()=>vae,getInitReentrancyGuardInstruction:()=>wae,getInitReentrancyGuardInstructionAsync:()=>kae,getInitReentrancyGuardInstructionDataCodec:()=>Mae,getInitReentrancyGuardInstructionDataDecoder:()=>ty,getInitReentrancyGuardInstructionDataEncoder:()=>sd,getInitializeAuditTrailDiscriminatorBytes:()=>ose,getInitializeAuditTrailInstruction:()=>sse,getInitializeAuditTrailInstructionAsync:()=>cse,getInitializeAuditTrailInstructionDataCodec:()=>ise,getInitializeAuditTrailInstructionDataDecoder:()=>O1,getInitializeAuditTrailInstructionDataEncoder:()=>td,getInitializeGovernanceProposalDiscriminatorBytes:()=>Tse,getInitializeGovernanceProposalInstruction:()=>Sse,getInitializeGovernanceProposalInstructionAsync:()=>jt,getInitializeGovernanceProposalInstructionDataCodec:()=>fse,getInitializeGovernanceProposalInstructionDataDecoder:()=>W1,getInitializeGovernanceProposalInstructionDataEncoder:()=>nd,getInitializeProtocolConfigDiscriminatorBytes:()=>Ise,getInitializeProtocolConfigInstruction:()=>kse,getInitializeProtocolConfigInstructionAsync:()=>Mse,getInitializeProtocolConfigInstructionDataCodec:()=>vse,getInitializeProtocolConfigInstructionDataDecoder:()=>L1,getInitializeProtocolConfigInstructionDataEncoder:()=>rd,getInitializeRbacConfigDiscriminatorBytes:()=>Vse,getInitializeRbacConfigInstruction:()=>jse,getInitializeRbacConfigInstructionAsync:()=>Hse,getInitializeRbacConfigInstructionDataCodec:()=>Kse,getInitializeRbacConfigInstructionDataDecoder:()=>H1,getInitializeRbacConfigInstructionDataEncoder:()=>od,getInitializeReputationMetricsDiscriminatorBytes:()=>nae,getInitializeReputationMetricsInstruction:()=>iae,getInitializeReputationMetricsInstructionAsync:()=>oae,getInitializeReputationMetricsInstructionDataCodec:()=>rae,getInitializeReputationMetricsInstructionDataDecoder:()=>q1,getInitializeReputationMetricsInstructionDataEncoder:()=>id,getInitializeStakingConfigDiscriminatorBytes:()=>fae,getInitializeStakingConfigInstruction:()=>xae,getInitializeStakingConfigInstructionAsync:()=>Z1,getInitializeStakingConfigInstructionDataCodec:()=>Sae,getInitializeStakingConfigInstructionDataDecoder:()=>X1,getInitializeStakingConfigInstructionDataEncoder:()=>cd,getIssueCredentialDiscriminatorBytes:()=>Lae,getIssueCredentialInstruction:()=>Hae,getIssueCredentialInstructionAsync:()=>Kae,getIssueCredentialInstructionDataCodec:()=>Vae,getIssueCredentialInstructionDataDecoder:()=>cy,getIssueCredentialInstructionDataEncoder:()=>dd,getLatitudeRangeCodec:()=>D6,getLatitudeRangeDecoder:()=>Io,getLatitudeRangeEncoder:()=>Ro,getLinkExternalIdDiscriminatorBytes:()=>nde,getLinkExternalIdInstruction:()=>ide,getLinkExternalIdInstructionAsync:()=>ode,getLinkExternalIdInstructionDataCodec:()=>rde,getLinkExternalIdInstructionDataDecoder:()=>dy,getLinkExternalIdInstructionDataEncoder:()=>gd,getLocationConstraintsCodec:()=>R6,getLocationConstraintsDecoder:()=>Lo,getLocationConstraintsEncoder:()=>Bo,getLongitudeRangeCodec:()=>k6,getLongitudeRangeDecoder:()=>Mo,getLongitudeRangeEncoder:()=>vo,getManageAgentStatusDiscriminatorBytes:()=>Tde,getManageAgentStatusInstruction:()=>xde,getManageAgentStatusInstructionAsync:()=>Sde,getManageAgentStatusInstructionDataCodec:()=>fde,getManageAgentStatusInstructionDataDecoder:()=>Ay,getManageAgentStatusInstructionDataEncoder:()=>Ad,getMultisigCodec:()=>iY,getMultisigConfigCodec:()=>F6,getMultisigConfigDecoder:()=>Ye,getMultisigConfigEncoder:()=>Ze,getMultisigCreatedEventCodec:()=>$6,getMultisigCreatedEventDecoder:()=>Th,getMultisigCreatedEventEncoder:()=>yh,getMultisigDecoder:()=>Ll,getMultisigDiscriminatorBytes:()=>oY,getMultisigEncoder:()=>FI,getMultisigSignatureCodec:()=>s4,getMultisigSignatureDecoder:()=>Ko,getMultisigSignatureEncoder:()=>Vo,getMultisigTypeCodec:()=>g4,getMultisigTypeConfigCodec:()=>E4,getMultisigTypeConfigDecoder:()=>$o,getMultisigTypeConfigEncoder:()=>jo,getMultisigTypeDecoder:()=>le,getMultisigTypeEncoder:()=>pe,getNetworkSecurityPoliciesCodec:()=>R4,getNetworkSecurityPoliciesDecoder:()=>Jo,getNetworkSecurityPoliciesEncoder:()=>qo,getNotificationMethodCodec:()=>k4,getNotificationMethodDecoder:()=>Zo,getNotificationMethodEncoder:()=>Xo,getNotificationPriorityCodec:()=>z4,getNotificationPriorityDecoder:()=>ti,getNotificationPriorityEncoder:()=>ei,getNotificationRequirementCodec:()=>B4,getNotificationRequirementDecoder:()=>Ue,getNotificationRequirementEncoder:()=>we,getNotificationTargetCodec:()=>X4,getNotificationTargetDecoder:()=>ri,getNotificationTargetEncoder:()=>ni,getNotificationTargetTypeCodec:()=>tB,getNotificationTargetTypeDecoder:()=>di,getNotificationTargetTypeEncoder:()=>ai,getNotificationTimingCodec:()=>iB,getNotificationTimingDecoder:()=>ii,getNotificationTimingEncoder:()=>oi,getPasswordPoliciesCodec:()=>SB,getPasswordPoliciesDecoder:()=>pi,getPasswordPoliciesEncoder:()=>Ai,getPendingTransactionCodec:()=>FB,getPendingTransactionDecoder:()=>mi,getPendingTransactionEncoder:()=>li,getPermissionCodec:()=>BB,getPermissionConstraintCodec:()=>$B,getPermissionConstraintDecoder:()=>ki,getPermissionConstraintEncoder:()=>Mi,getPermissionConstraintTypeCodec:()=>XB,getPermissionConstraintTypeDecoder:()=>Fi,getPermissionConstraintTypeEncoder:()=>Oi,getPermissionDecoder:()=>vi,getPermissionEncoder:()=>Ii,getPermissionMetadataCodec:()=>rL,getPermissionMetadataDecoder:()=>Ui,getPermissionMetadataEncoder:()=>wi,getPermissionScopeCodec:()=>sL,getPermissionScopeDecoder:()=>zi,getPermissionScopeEncoder:()=>_i,getPolicyMetadataCodec:()=>mL,getPolicyMetadataDecoder:()=>Dn,getPolicyMetadataEncoder:()=>xn,getPolicyRuleCodec:()=>kL,getPolicyRuleDecoder:()=>En,getPolicyRuleEncoder:()=>hn,getPolicyScopeCodec:()=>zL,getPolicyScopeDecoder:()=>Cn,getPolicyScopeEncoder:()=>Pn,getPolicyStatusCodec:()=>WL,getPolicyStatusDecoder:()=>Rn,getPolicyStatusEncoder:()=>bn,getPolicyTypeCodec:()=>VL,getPolicyTypeDecoder:()=>vn,getPolicyTypeEncoder:()=>In,getPricingModelCodec:()=>$L,getPricingModelDecoder:()=>Q,getPricingModelEncoder:()=>J,getProposalAccountCodec:()=>iV,getProposalAccountDecoder:()=>oc,getProposalAccountEncoder:()=>rc,getProposalInstructionCodec:()=>TV,getProposalInstructionDecoder:()=>ho,getProposalInstructionEncoder:()=>Do,getProposalMetadataCodec:()=>DV,getProposalMetadataDecoder:()=>ac,getProposalMetadataEncoder:()=>sc,getProposalStatusCodec:()=>CV,getProposalStatusDecoder:()=>gc,getProposalStatusEncoder:()=>uc,getProposalTypeCodec:()=>vV,getProposalTypeDecoder:()=>ue,getProposalTypeEncoder:()=>de,getProtocolConfigCodec:()=>PY,getProtocolConfigDecoder:()=>$l,getProtocolConfigDiscriminatorBytes:()=>EY,getProtocolConfigEncoder:()=>$I,getProtocolConfigSize:()=>RY,getProtocolConfigUpdatedEventCodec:()=>WV,getProtocolConfigUpdatedEventDecoder:()=>kE,getProtocolConfigUpdatedEventEncoder:()=>ME,getQuorumMethodCodec:()=>VV,getQuorumMethodDecoder:()=>lc,getQuorumMethodEncoder:()=>pc,getQuorumRequirementsCodec:()=>XV,getQuorumRequirementsDecoder:()=>yc,getQuorumRequirementsEncoder:()=>mc,getRbacConfigCodec:()=>LY,getRbacConfigDecoder:()=>em,getRbacConfigDiscriminatorBytes:()=>BY,getRbacConfigEncoder:()=>tv,getRbacConfigInitializedEventCodec:()=>r3,getRbacConfigInitializedEventDecoder:()=>NE,getRbacConfigInitializedEventEncoder:()=>WE,getRecordPayaiPaymentDiscriminatorBytes:()=>Gde,getRecordPayaiPaymentInstruction:()=>Bde,getRecordPayaiPaymentInstructionAsync:()=>Nde,getRecordPayaiPaymentInstructionDataCodec:()=>Wde,getRecordPayaiPaymentInstructionDataDecoder:()=>my,getRecordPayaiPaymentInstructionDataEncoder:()=>pd,getReentrancyGuardCodec:()=>gee,getReentrancyGuardDecoder:()=>rm,getReentrancyGuardDiscriminatorBytes:()=>uee,getReentrancyGuardEncoder:()=>sv,getReentrancyGuardSize:()=>lee,getReentrancyStateCodec:()=>s3,getReentrancyStateDecoder:()=>Sc,getReentrancyStateEncoder:()=>fc,getRegisterAgentCompressedDiscriminatorBytes:()=>due,getRegisterAgentCompressedInstruction:()=>gue,getRegisterAgentCompressedInstructionAsync:()=>Dy,getRegisterAgentCompressedInstructionDataCodec:()=>uue,getRegisterAgentCompressedInstructionDataDecoder:()=>xy,getRegisterAgentCompressedInstructionDataEncoder:()=>Id,getRegisterAgentDiscriminatorBytes:()=>Xde,getRegisterAgentInstruction:()=>Yde,getRegisterAgentInstructionAsync:()=>fy,getRegisterAgentInstructionDataCodec:()=>Zde,getRegisterAgentInstructionDataDecoder:()=>Ty,getRegisterAgentInstructionDataEncoder:()=>xd,getRegisterGhostMetadataDiscriminatorBytes:()=>Eue,getRegisterGhostMetadataInstruction:()=>Cue,getRegisterGhostMetadataInstructionDataCodec:()=>Pue,getRegisterGhostMetadataInstructionDataDecoder:()=>Py,getRegisterGhostMetadataInstructionDataEncoder:()=>Ey,getReportDataCodec:()=>T3,getReportDataDecoder:()=>Dc,getReportDataEncoder:()=>xc,getReportEntryCodec:()=>R3,getReportEntryDecoder:()=>Ec,getReportEntryEncoder:()=>hc,getReportStatusCodec:()=>z3,getReportStatusDecoder:()=>kc,getReportStatusEncoder:()=>Mc,getReportSummaryCodec:()=>B3,getReportSummaryDecoder:()=>Cc,getReportSummaryEncoder:()=>Pc,getReportTypeCodec:()=>H3,getReportTypeDecoder:()=>ae,getReportTypeEncoder:()=>se,getReportingFrequencyCodec:()=>k3,getReportingFrequencyDecoder:()=>rr,getReportingFrequencyEncoder:()=>nr,getReputationComponentCodec:()=>Y3,getReputationComponentDecoder:()=>st,getReputationComponentEncoder:()=>ct,getReputationMetricsCodec:()=>kee,getReputationMetricsDecoder:()=>cm,getReputationMetricsDiscriminatorBytes:()=>Mee,getReputationMetricsEncoder:()=>pv,getReputationMetricsInitializedEventCodec:()=>s5,getReputationMetricsInitializedEventDecoder:()=>YE,getReputationMetricsInitializedEventEncoder:()=>ZE,getReputationPaymentRecordedEventCodec:()=>E5,getReputationPaymentRecordedEventDecoder:()=>nP,getReputationPaymentRecordedEventEncoder:()=>tP,getReputationRatingSubmittedEventCodec:()=>U5,getReputationRatingSubmittedEventDecoder:()=>sP,getReputationRatingSubmittedEventEncoder:()=>cP,getReputationSourceTypeCodec:()=>F5,getReputationSourceTypeDecoder:()=>_c,getReputationSourceTypeEncoder:()=>Uc,getReputationTagsUpdatedEventCodec:()=>H5,getReputationTagsUpdatedEventDecoder:()=>gP,getReputationTagsUpdatedEventEncoder:()=>uP,getResetReentrancyGuardDiscriminatorBytes:()=>_ue,getResetReentrancyGuardInstruction:()=>Fue,getResetReentrancyGuardInstructionAsync:()=>Oue,getResetReentrancyGuardInstructionDataCodec:()=>zue,getResetReentrancyGuardInstructionDataDecoder:()=>Ry,getResetReentrancyGuardInstructionDataEncoder:()=>zd,getResolveDidDocumentDiscriminatorBytes:()=>$ue,getResolveDidDocumentInstruction:()=>Que,getResolveDidDocumentInstructionAsync:()=>Jue,getResolveDidDocumentInstructionDataCodec:()=>que,getResolveDidDocumentInstructionDataDecoder:()=>My,getResolveDidDocumentInstructionDataEncoder:()=>Od,getResourceConstraintsCodec:()=>X5,getResourceConstraintsDecoder:()=>Fc,getResourceConstraintsEncoder:()=>Oc,getReviewScheduleCodec:()=>g9,getReviewScheduleDecoder:()=>qi,getReviewScheduleEncoder:()=>$i,getRevokeAuthorizationDiscriminatorBytes:()=>Mw,getRevokeAuthorizationInstruction:()=>ww,getRevokeAuthorizationInstructionDataCodec:()=>kw,getRevokeAuthorizationInstructionDataDecoder:()=>Wd,getRevokeAuthorizationInstructionDataEncoder:()=>Gd,getRevokeCredentialDiscriminatorBytes:()=>fge,getRevokeCredentialInstruction:()=>xge,getRevokeCredentialInstructionDataCodec:()=>Sge,getRevokeCredentialInstructionDataDecoder:()=>_y,getRevokeCredentialInstructionDataEncoder:()=>Uy,getRiskAcceptanceCodec:()=>C9,getRiskAcceptanceDecoder:()=>Bc,getRiskAcceptanceEncoder:()=>Nc,getRiskAssessmentCodec:()=>F9,getRiskAssessmentDecoder:()=>Ni,getRiskAssessmentEncoder:()=>Wi,getRiskCategoryCodec:()=>B9,getRiskCategoryDecoder:()=>jc,getRiskCategoryEncoder:()=>Hc,getRiskFactorCodec:()=>X9,getRiskFactorDecoder:()=>Vc,getRiskFactorEncoder:()=>Lc,getRiskIndicatorCodec:()=>rK,getRiskIndicatorDecoder:()=>Rc,getRiskIndicatorEncoder:()=>bc,getRiskLevelCodec:()=>sK,getRiskLevelDecoder:()=>Yc,getRiskLevelEncoder:()=>Zc,getRoleCodec:()=>gK,getRoleConstraintsCodec:()=>TK,getRoleConstraintsDecoder:()=>ts,getRoleConstraintsEncoder:()=>es,getRoleDecoder:()=>dt,getRoleEncoder:()=>at,getRoleMetadataCodec:()=>EK,getRoleMetadataDecoder:()=>rs,getRoleMetadataEncoder:()=>ns,getRoleStatusCodec:()=>RK,getRoleStatusDecoder:()=>is,getRoleStatusEncoder:()=>os,getRoleTypeCodec:()=>kK,getRoleTypeDecoder:()=>ss,getRoleTypeEncoder:()=>cs,getRuleConditionCodec:()=>BK,getRuleConditionDecoder:()=>Qi,getRuleConditionEncoder:()=>Ji,getRuleEffectCodec:()=>HK,getRuleEffectDecoder:()=>Zi,getRuleEffectEncoder:()=>Xi,getScopeBoundariesCodec:()=>JK,getScopeBoundariesDecoder:()=>Li,getScopeBoundariesEncoder:()=>Bi,getScopeInheritanceCodec:()=>YK,getScopeInheritanceDecoder:()=>ec,getScopeInheritanceEncoder:()=>Yi,getScopeTypeCodec:()=>rH,getScopeTypeDecoder:()=>Ki,getScopeTypeEncoder:()=>Vi,getSecurityEventTypeCodec:()=>sH,getSecurityEventTypeDecoder:()=>si,getSecurityEventTypeEncoder:()=>ci,getSecurityPoliciesCodec:()=>gH,getSecurityPoliciesDecoder:()=>Cs,getSecurityPoliciesEncoder:()=>Ps,getServiceEndpointCodec:()=>mH,getServiceEndpointDecoder:()=>ye,getServiceEndpointEncoder:()=>me,getServiceEndpointTypeCodec:()=>SH,getServiceEndpointTypeDecoder:()=>vs,getServiceEndpointTypeEncoder:()=>Is,getSessionConstraintsCodec:()=>EH,getSessionConstraintsDecoder:()=>ds,getSessionConstraintsEncoder:()=>as,getSessionPoliciesCodec:()=>vH,getSessionPoliciesDecoder:()=>Rs,getSessionPoliciesEncoder:()=>bs,getSlashReasonCodec:()=>UH,getSlashReasonDecoder:()=>Xe,getSlashReasonEncoder:()=>Qe,getSlashStakeDiscriminatorBytes:()=>Uge,getSlashStakeInstruction:()=>Oge,getSlashStakeInstructionAsync:()=>zge,getSlashStakeInstructionDataCodec:()=>_ge,getSlashStakeInstructionDataDecoder:()=>Gy,getSlashStakeInstructionDataEncoder:()=>Nd,getSodConstraintCodec:()=>FH,getSodConstraintDecoder:()=>gs,getSodConstraintEncoder:()=>us,getSodConstraintTypeCodec:()=>BH,getSodConstraintTypeDecoder:()=>Us,getSodConstraintTypeEncoder:()=>ws,getSourceReputationUpdatedEventCodec:()=>i7,getSourceReputationUpdatedEventDecoder:()=>DC,getSourceReputationUpdatedEventEncoder:()=>xC,getSourceScoreCodec:()=>m7,getSourceScoreDecoder:()=>Os,getSourceScoreEncoder:()=>zs,getStakeGhostDiscriminatorBytes:()=>qge,getStakeGhostInstruction:()=>Qge,getStakeGhostInstructionAsync:()=>By,getStakeGhostInstructionDataCodec:()=>Jge,getStakeGhostInstructionDataDecoder:()=>Ny,getStakeGhostInstructionDataEncoder:()=>Ld,getStakingAccountCodec:()=>ete,getStakingAccountDecoder:()=>gm,getStakingAccountDiscriminatorBytes:()=>Yee,getStakingAccountEncoder:()=>Dv,getStakingAccountSize:()=>rte,getStakingConfigCodec:()=>hte,getStakingConfigDecoder:()=>lm,getStakingConfigDiscriminatorBytes:()=>Dte,getStakingConfigEncoder:()=>kv,getStakingConfigSize:()=>Cte,getStepUpTriggerCodec:()=>S7,getStepUpTriggerDecoder:()=>Er,getStepUpTriggerEncoder:()=>hr,getSubmissionDetailsCodec:()=>C7,getSubmissionDetailsDecoder:()=>Ws,getSubmissionDetailsEncoder:()=>Gs,getSubmitDeliveryDiscriminatorBytes:()=>uAe,getSubmitDeliveryInstruction:()=>AAe,getSubmitDeliveryInstructionDataCodec:()=>gAe,getSubmitDeliveryInstructionDataDecoder:()=>Ky,getSubmitDeliveryInstructionDataEncoder:()=>Vy,getSubmitServiceRatingDiscriminatorBytes:()=>MAe,getSubmitServiceRatingInstruction:()=>UAe,getSubmitServiceRatingInstructionAsync:()=>wAe,getSubmitServiceRatingInstructionDataCodec:()=>kAe,getSubmitServiceRatingInstructionDataDecoder:()=>$y,getSubmitServiceRatingInstructionDataEncoder:()=>Vd,getTagDecayAppliedEventCodec:()=>U7,getTagDecayAppliedEventDecoder:()=>zC,getTagDecayAppliedEventEncoder:()=>_C,getTagScoreCodec:()=>H7,getTagScoreDecoder:()=>gt,getTagScoreEncoder:()=>ut,getTierUpdatedEventCodec:()=>Y7,getTierUpdatedEventDecoder:()=>VC,getTierUpdatedEventEncoder:()=>LC,getTimeConstraintsCodec:()=>ij,getTimeConstraintsDecoder:()=>ps,getTimeConstraintsEncoder:()=>As,getTimeLockCodec:()=>pj,getTimeLockDecoder:()=>Ti,getTimeLockEncoder:()=>yi,getTimeLockTypeCodec:()=>Tj,getTimeLockTypeDecoder:()=>Bs,getTimeLockTypeEncoder:()=>Ns,getTransactionPriorityCodec:()=>Dj,getTransactionPriorityDecoder:()=>Si,getTransactionPriorityEncoder:()=>fi,getTransactionStatusCodec:()=>Cj,getTransactionStatusDecoder:()=>Di,getTransactionStatusEncoder:()=>xi,getTransactionTypeCodec:()=>vj,getTransactionTypeDecoder:()=>He,getTransactionTypeEncoder:()=>Ke,getTrendDirectionCodec:()=>Uj,getTrendDirectionDecoder:()=>qc,getTrendDirectionEncoder:()=>$c,getUnlockMethodCodec:()=>Fj,getUnlockMethodDecoder:()=>On,getUnlockMethodEncoder:()=>zn,getUnstakeGhostDiscriminatorBytes:()=>BAe,getUnstakeGhostInstruction:()=>VAe,getUnstakeGhostInstructionAsync:()=>Xy,getUnstakeGhostInstructionDataCodec:()=>LAe,getUnstakeGhostInstructionDataDecoder:()=>Qy,getUnstakeGhostInstructionDataEncoder:()=>Kd,getUpdateAgentDiscriminatorBytes:()=>tpe,getUpdateAgentInstruction:()=>rT,getUpdateAgentInstructionAsync:()=>rpe,getUpdateAgentInstructionDataCodec:()=>npe,getUpdateAgentInstructionDataDecoder:()=>nT,getUpdateAgentInstructionDataEncoder:()=>Qd,getUpdateAgentReputationDiscriminatorBytes:()=>xpe,getUpdateAgentReputationInstruction:()=>Epe,getUpdateAgentReputationInstructionAsync:()=>hpe,getUpdateAgentReputationInstructionDataCodec:()=>Dpe,getUpdateAgentReputationInstructionDataDecoder:()=>cT,getUpdateAgentReputationInstructionDataEncoder:()=>Xd,getUpdateAgentServiceDiscriminatorBytes:()=>Bpe,getUpdateAgentServiceInstruction:()=>Kpe,getUpdateAgentServiceInstructionAsync:()=>Vpe,getUpdateAgentServiceInstructionDataCodec:()=>Lpe,getUpdateAgentServiceInstructionDataDecoder:()=>mT,getUpdateAgentServiceInstructionDataEncoder:()=>Zd,getUpdateCrosschainStatusDiscriminatorBytes:()=>ole,getUpdateCrosschainStatusInstruction:()=>cle,getUpdateCrosschainStatusInstructionDataCodec:()=>ile,getUpdateCrosschainStatusInstructionDataDecoder:()=>fT,getUpdateCrosschainStatusInstructionDataEncoder:()=>TT,getUpdateDidDocumentDiscriminatorBytes:()=>yle,getUpdateDidDocumentInstruction:()=>Sle,getUpdateDidDocumentInstructionAsync:()=>fle,getUpdateDidDocumentInstructionDataCodec:()=>Tle,getUpdateDidDocumentInstructionDataDecoder:()=>DT,getUpdateDidDocumentInstructionDataEncoder:()=>tu,getUpdateGhostScoreDiscriminatorBytes:()=>Ule,getUpdateGhostScoreInstruction:()=>zle,getUpdateGhostScoreInstructionDataCodec:()=>_le,getUpdateGhostScoreInstructionDataDecoder:()=>PT,getUpdateGhostScoreInstructionDataEncoder:()=>ET,getUpdateProtocolConfigDiscriminatorBytes:()=>jle,getUpdateProtocolConfigInstruction:()=>Jle,getUpdateProtocolConfigInstructionAsync:()=>qle,getUpdateProtocolConfigInstructionDataCodec:()=>$le,getUpdateProtocolConfigInstructionDataDecoder:()=>vT,getUpdateProtocolConfigInstructionDataEncoder:()=>nu,getUpdateReputationTagsDiscriminatorBytes:()=>ime,getUpdateReputationTagsInstruction:()=>ame,getUpdateReputationTagsInstructionAsync:()=>sme,getUpdateReputationTagsInstructionDataCodec:()=>cme,getUpdateReputationTagsInstructionDataDecoder:()=>GT,getUpdateReputationTagsInstructionDataEncoder:()=>iu,getUpdateReputationWithAuthDiscriminatorBytes:()=>kU,getUpdateReputationWithAuthInstruction:()=>_U,getUpdateReputationWithAuthInstructionAsync:()=>UU,getUpdateReputationWithAuthInstructionDataCodec:()=>wU,getUpdateReputationWithAuthInstructionDataDecoder:()=>gu,getUpdateReputationWithAuthInstructionDataEncoder:()=>Xt,getUpdateSourceReputationDiscriminatorBytes:()=>Mme,getUpdateSourceReputationInstruction:()=>Ume,getUpdateSourceReputationInstructionAsync:()=>wme,getUpdateSourceReputationInstructionDataCodec:()=>kme,getUpdateSourceReputationInstructionDataDecoder:()=>JT,getUpdateSourceReputationInstructionDataEncoder:()=>Au,getUserRegistryCodec:()=>jte,getUserRegistryDecoder:()=>Tm,getUserRegistryDiscriminatorBytes:()=>Hte,getUserRegistryEncoder:()=>Fv,getUserRegistrySize:()=>Jte,getValueTypeCodec:()=>Bj,getValueTypeDecoder:()=>Jr,getValueTypeEncoder:()=>qr,getVerificationMethodCodec:()=>Xj,getVerificationMethodDecoder:()=>fe,getVerificationMethodEncoder:()=>Te,getVerificationMethodTypeCodec:()=>t$,getVerificationMethodTypeDecoder:()=>Qs,getVerificationMethodTypeEncoder:()=>Js,getVerificationRelationshipCodec:()=>i$,getVerificationRelationshipDecoder:()=>Zs,getVerificationRelationshipEncoder:()=>Xs,getVerifyAgentDiscriminatorBytes:()=>t1e,getVerifyAgentInstruction:()=>r1e,getVerifyAgentInstructionAsync:()=>ef,getVerifyAgentInstructionDataCodec:()=>n1e,getVerifyAgentInstructionDataDecoder:()=>YT,getVerifyAgentInstructionDataEncoder:()=>pu,getVerifyAuthorizationDiscriminatorBytes:()=>S1e,getVerifyAuthorizationInstruction:()=>D1e,getVerifyAuthorizationInstructionDataCodec:()=>x1e,getVerifyAuthorizationInstructionDataDecoder:()=>rf,getVerifyAuthorizationInstructionDataEncoder:()=>nf,getViolationSeverityCodec:()=>d$,getViolationSeverityDecoder:()=>Qc,getViolationSeverityEncoder:()=>Jc,getVoteChoiceCodec:()=>v$,getVoteChoiceDecoder:()=>ia,getVoteChoiceEncoder:()=>oa,getVoteCodec:()=>C$,getVoteDecoder:()=>ra,getVoteEncoder:()=>na,getVotingResultsCodec:()=>F$,getVotingResultsDecoder:()=>ua,getVotingResultsEncoder:()=>da,identifyGhostspeakMarketplaceAccount:()=>Qte,identifyGhostspeakMarketplaceInstruction:()=>Xte,isArbitratorDecision:()=>DO,isDelegationScope:()=>g2,isGhostspeakMarketplaceError:()=>ene,parseActivateAgentInstruction:()=>Sne,parseApproveDeliveryInstruction:()=>vne,parseArbitrateDisputeInstruction:()=>Wne,parseAutoCreateGhostInstruction:()=>nre,parseClaimGhostInstruction:()=>pre,parseCreateAgentAuthorizationInstruction:()=>WM,parseCreateCredentialTemplateInstruction:()=>Kre,parseCreateCredentialTypeInstruction:()=>noe,parseCreateDidDocumentInstruction:()=>Doe,parseCreateEscrowInstruction:()=>Loe,parseCreateMultisigInstruction:()=>cie,parseDeactivateAgentInstruction:()=>Eie,parseDeactivateCredentialTemplateInstruction:()=>Uie,parseDeactivateCredentialTypeInstruction:()=>Vie,parseDeactivateDidDocumentInstruction:()=>nce,parseEnableProtocolFeesInstruction:()=>lce,parseFileDisputeInstruction:()=>Mce,parseGenerateComplianceReportInstruction:()=>Vce,parseInitReentrancyGuardInstruction:()=>Uae,parseInitializeAuditTrailInstruction:()=>ase,parseInitializeGovernanceProposalInstruction:()=>xse,parseInitializeProtocolConfigInstruction:()=>wse,parseInitializeRbacConfigInstruction:()=>$se,parseInitializeReputationMetricsInstruction:()=>cae,parseInitializeStakingConfigInstruction:()=>Dae,parseIssueCredentialInstruction:()=>jae,parseLinkExternalIdInstruction:()=>cde,parseManageAgentStatusInstruction:()=>Dde,parseRecordPayaiPaymentInstruction:()=>Lde,parseRegisterAgentCompressedInstruction:()=>Aue,parseRegisterAgentInstruction:()=>eue,parseRegisterGhostMetadataInstruction:()=>bue,parseResetReentrancyGuardInstruction:()=>Gue,parseResolveDidDocumentInstruction:()=>Xue,parseRevokeAuthorizationInstruction:()=>Uw,parseRevokeCredentialInstruction:()=>Dge,parseSlashStakeInstruction:()=>Fge,parseStakeGhostInstruction:()=>Xge,parseSubmitDeliveryInstruction:()=>pAe,parseSubmitServiceRatingInstruction:()=>_Ae,parseUnstakeGhostInstruction:()=>KAe,parseUpdateAgentInstruction:()=>ope,parseUpdateAgentReputationInstruction:()=>Ppe,parseUpdateAgentServiceInstruction:()=>Hpe,parseUpdateCrosschainStatusInstruction:()=>sle,parseUpdateDidDocumentInstruction:()=>xle,parseUpdateGhostScoreInstruction:()=>Ole,parseUpdateProtocolConfigInstruction:()=>Qle,parseUpdateReputationTagsInstruction:()=>dme,parseUpdateReputationWithAuthInstruction:()=>zU,parseUpdateSourceReputationInstruction:()=>_me,parseVerifyAgentInstruction:()=>o1e,parseVerifyAuthorizationInstruction:()=>h1e});var te=a(()=>{Bv();Zv();jU();D();m();});var mu,yu,Tu,z,of,cf=a(()=>{mu=(l=>(l.CodeGeneration="code-generation",l.DataAnalysis="data-analysis",l.ContentCreation="content-creation",l.ImageGeneration="image-generation",l.AudioProcessing="audio-processing",l.VideoProcessing="video-processing",l.NaturalLanguageProcessing="nlp-specialist",l.ComputerVision="computer-vision",l.ReinforcementLearning="reinforcement-learning",l.DeFiExpert="defi-expert",l.NFTSpecialist="nft-specialist",l.SmartContractAudit="smart-contract-audit",l.BlockchainDevelopment="blockchain-dev",l.DAOGovernance="dao-governance",l.GameDevelopment="game-dev",l.WebDevelopment="web-dev",l.MobileDevelopment="mobile-dev",l.APIIntegration="api-integration",l.DatabaseManagement="database-management",l.DevOpsAutomation="devops-automation",l.FinancialAnalysis="financial-analysis",l.MarketResearch="market-research",l.LegalCompliance="legal-compliance",l.CustomerSupport="customer-support",l.TranslationServices="translation-services",l.SecurityAudit="security-audit",l.PenetrationTesting="penetration-testing",l.ThreatDetection="threat-detection",l.IncidentResponse="incident-response",l.DataEngineering="data-engineering",l.DataVisualization="data-visualization",l.PredictiveModeling="predictive-modeling",l.StatisticalAnalysis="statistical-analysis",l))(mu||{}),yu=(M=>(M.FastResponder="fast-responder",M.QuickResponder="quick-responder",M.SameDay="same-day",M.ConsistentQuality="consistent-quality",M.HighQuality="high-quality",M.TopRated="top-rated",M.PerfectRecord="perfect-record",M.HighVolume="high-volume",M.VeryHighVolume="very-high-volume",M.MegaVolume="mega-volume",M.LongTermActive="long-term-active",M.MultiYear="multi-year",M.CategorySpecialist="category-specialist",M.MultiDomain="multi-domain",M.Generalist="generalist",M.DisputeFree="dispute-free",M.LowDispute="low-dispute",M.HighResolution="high-resolution",M.PlatinumTier="platinum-tier",M.GoldTier="gold-tier",M.SilverTier="silver-tier",M.BronzeTier="bronze-tier",M.Responsive="responsive",M.Communicative="communicative",M.Proactive="proactive",M.DetailOriented="detail-oriented",M.VerifiedIdentity="verified-identity",M.LongStanding="long-standing",M.CommunityTrusted="community-trusted",M.ClientFavorite="client-favorite",M))(yu||{}),Tu=(_=>(_.KYCVerified="kyc-verified",_.KYBVerified="kyb-verified",_.AccreditedInvestor="accredited-investor",_.SOC2Compliant="soc2-compliant",_.ISO27001="iso-27001",_.GDPR="gdpr-compliant",_.HIPAA="hipaa-compliant",_.PCI_DSS="pci-dss",_.AuditedCode="audited-code",_.BugBounty="bug-bounty",_.OpenSource="open-source",_.InsuredService="insured-service",_.BondedAgent="bonded-agent",_.LicensedProfessional="licensed-professional",_.RegulatedEntity="regulated-entity",_.PublicAuditTrail="public-audit-trail",_.TransparentPricing="transparent-pricing",_.VerifiedMetrics="verified-metrics",_))(Tu||{}),z={MAX_SKILL_TAGS:20,MAX_BEHAVIOR_TAGS:20,MAX_COMPLIANCE_TAGS:10,MAX_TAG_SCORES:50,MAX_TAG_NAME_LENGTH:32,STALE_TAG_THRESHOLD:7776e3,MIN_TAG_CONFIDENCE:5e3,MAX_TAG_CONFIDENCE:1e4,BASIS_POINTS_MAX:1e4},of={decayRatePerDay:10,minConfidence:2e3,maxAgeSeconds:2160*60*60};});var yf={};oe(yf,{batchGetAccounts:()=>Iu,batchGetAccountsWithRetry:()=>e0,batchGetAndMap:()=>YU,batchGetExistingAccounts:()=>ZU,createBatchFetcher:()=>F1e});function XU(n,e){let t=[];for(let o=0;o<n.length;o+=e)t.push(n.slice(o,o+e));return t}async function Iu(n,e,t={}){let o=Math.min(t.batchSize??100,100);if(e.length===0)return [];if(e.length<=o)return (await n.getMultipleAccounts(e).send()).value;let r=XU(e,o),c=[],i=0,d=r.map(async s=>{let p=await n.getMultipleAccounts(s).send();return i+=s.length,t.onProgress?.(i,e.length),p.value});return c.push(...await Promise.all(d)),c.flat()}async function ZU(n,e,t={}){let o=await Iu(n,e,t),r=[];for(let c=0;c<o.length;c++){let i=o[c];i!==null&&r.push({address:e[c],account:i});}return r}async function YU(n,e,t,o={}){return (await Iu(n,e,o)).map((c,i)=>t(c,e[i],i))}async function e0(n,e,t={},o=3){let r=Math.min(t.batchSize??100,100);if(e.length===0)return [];let c=XU(e,r),i=new Array(e.length),d=0;return await Promise.all(c.map(async(s,p)=>{let E=0,b=false;for(;!b&&E<=o;)try{(await n.getMultipleAccounts(s).send()).value.forEach((P,w)=>{i[p*r+w]=P;}),d+=s.length,t.onProgress?.(d,e.length),b=!0;}catch(x){if(E++,E>o)throw new Error(`Batch ${p} failed after ${o} retries: ${x}`);await new Promise(k=>setTimeout(k,100*Math.pow(2,E-1)));}})),i}function F1e(n,e={}){return {getAccounts:(t,o)=>Iu(n,t,{...e,...o}),getExisting:(t,o)=>ZU(n,t,{...e,...o}),getAndMap:(t,o,r)=>YU(n,t,o,{...e,...r}),getWithRetry:(t,o,r)=>e0(n,t,{...e,...o},r)}}var Tf=a(()=>{});var Mu={};oe(Mu,{deriveA2AMessagePda:()=>L1e,deriveA2ASessionPda:()=>B1e,deriveA2ASessionPdaOriginal:()=>N1e,deriveAgentPda:()=>W1e,deriveAgentPdaOriginal:()=>G1e,deriveAgentTreeConfigPda:()=>H1e,deriveAgentVerificationPda:()=>K1e,deriveEscrowPDA:()=>q1e,deriveEscrowPDAOriginal:()=>$1e,deriveEscrowPda:()=>J1e,deriveMessagePda:()=>X1e,deriveTokenAccountPda:()=>Q1e,deriveUserRegistryPda:()=>V1e,findProgramDerivedAddress:()=>j1e});async function G1e(n,e,t){let[o]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(e),getUtf8Encoder().encode(t)]});return o}async function W1e(n){let[e,t]=await getProgramDerivedAddress({programAddress:n.programAddress,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(n.owner),getUtf8Encoder().encode(n.agentId)]});return [e,t]}async function N1e(n,e){let[t]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,50,97,95,115,101,115,115,105,111,110])),getAddressEncoder().encode(e)]});return t}async function B1e(n){let e=await getProgramDerivedAddress({programAddress:n.programAddress,seeds:[getBytesEncoder().encode(new Uint8Array([97,50,97,95,115,101,115,115,105,111,110])),getAddressEncoder().encode(n.initiator)]});return [e[0],e[1]]}async function L1e(n,e,t){let o=new Uint8Array(8);new DataView(o.buffer).setBigInt64(0,t,true);let[c]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,50,97,95,109,101,115,115,97,103,101])),getAddressEncoder().encode(e),o]});return c}async function V1e(n,e){let[t]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(e)]});return t}async function K1e(n,e,t){let[o]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,118,101,114,105,102,105,99,97,116,105,111,110])),getAddressEncoder().encode(e),getAddressEncoder().encode(t)]});return o}async function H1e(n,e){let[t]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116,95,116,114,101,101,95,99,111,110,102,105,103])),getAddressEncoder().encode(e)]});return t}async function j1e(n,e){let t=n.map(r=>typeof r=="string"?getUtf8Encoder().encode(r):typeof r=="object"&&r.constructor===Uint8Array?r:getAddressEncoder().encode(r)),o=await getProgramDerivedAddress({programAddress:e,seeds:t});return [o[0],o[1]]}async function $1e(n,e){let t=[getBytesEncoder().encode(new Uint8Array([101,115,99,114,111,119])),getAddressEncoder().encode(n)],o=await getProgramDerivedAddress({programAddress:e,seeds:t});return [o[0],o[1]]}async function q1e(n){let e=[getBytesEncoder().encode(new Uint8Array([101,115,99,114,111,119])),getUtf8Encoder().encode(n.escrowId)],t=await getProgramDerivedAddress({programAddress:n.programAddress,seeds:e});return [t[0],t[1]]}async function J1e(n,e,t,o){let r=new Uint8Array(8);new DataView(r.buffer).setUint32(0,o,true);let[i]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([101,115,99,114,111,119])),getAddressEncoder().encode(e),getAddressEncoder().encode(t),r.slice(0,4)]});return i}async function Q1e(n,e){let t="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",o="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",[r]=await getProgramDerivedAddress({programAddress:t,seeds:[getAddressEncoder().encode(n),getAddressEncoder().encode(o),getAddressEncoder().encode(e)]});return r}async function X1e(n,e,t){let o=new Uint8Array(4);new DataView(o.buffer).setUint32(0,t,true);let[c]=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([109,101,115,115,97,103,101])),getAddressEncoder().encode(e),o]});return c}var ku=a(()=>{});var g0={};oe(g0,{ReputationTagEngine:()=>An});var An,Df=a(()=>{cf();An=class{tagCriteria=[];decayConfig;constructor(e=of){this.decayConfig=e,this.initializeTagCriteria();}initializeTagCriteria(){this.tagCriteria=[{tag:"fast-responder",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.responseTimeCount===0n)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.avgResponseTime,o=Number(e.responseTimeCount);return t<6e4?{shouldAssign:true,confidence:Math.min(1e4,1e4-Math.floor(t/6e4*2e3)),evidenceCount:o,reason:`Average response time ${t}ms`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"quick-responder",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.responseTimeCount===0n)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.avgResponseTime,o=Number(e.responseTimeCount);return t<3e5?{shouldAssign:true,confidence:Math.min(1e4,1e4-Math.floor(t/3e5*3e3)),evidenceCount:o,reason:`Average response time ${t}ms`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"dispute-free",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let t=Number(e.successfulPayments+e.failedPayments);return t<10?{shouldAssign:false,confidence:0,evidenceCount:0}:e.totalDisputes===0?{shouldAssign:true,confidence:Math.min(1e4,7e3+t*10),evidenceCount:t,reason:`0 disputes over ${t} transactions`}:{shouldAssign:false,confidence:0,evidenceCount:t}}},{tag:"low-dispute",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let t=Number(e.successfulPayments+e.failedPayments);if(t<100)return {shouldAssign:false,confidence:0,evidenceCount:0};let o=e.totalDisputes/t*100;return o<1?{shouldAssign:true,confidence:Math.min(1e4,1e4-Math.floor(o*1e3)),evidenceCount:t,reason:`${o.toFixed(2)}% dispute rate`}:{shouldAssign:false,confidence:0,evidenceCount:t}}},{tag:"high-volume",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let t=Number(e.successfulPayments);return t>=1e3?{shouldAssign:true,confidence:Math.min(1e4,6e3+Math.floor(t/100)),evidenceCount:t,reason:`${t} successful transactions`}:{shouldAssign:false,confidence:0,evidenceCount:t}}},{tag:"very-high-volume",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let t=Number(e.successfulPayments);return t>=1e4?{shouldAssign:true,confidence:Math.min(1e4,8e3+Math.floor(t/1e3)),evidenceCount:t,reason:`${t} successful transactions`}:{shouldAssign:false,confidence:0,evidenceCount:t}}},{tag:"top-rated",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.totalRatingsCount<10)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.avgRating/20,o=e.totalRatingsCount;return t>4.8?{shouldAssign:true,confidence:Math.min(1e4,Math.floor((t-4.8)*5e4)+8e3),evidenceCount:o,reason:`Average rating ${t.toFixed(2)}/5.0`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"high-quality",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.totalRatingsCount<5)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.avgRating/20,o=e.totalRatingsCount;return t>4.5?{shouldAssign:true,confidence:Math.min(1e4,Math.floor((t-4.5)*2e4)+7e3),evidenceCount:o,reason:`Average rating ${t.toFixed(2)}/5.0`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"consistent-quality",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.totalRatingsCount<20)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.avgRating/20,o=e.totalRatingsCount;return t>4.3?{shouldAssign:true,confidence:Math.min(1e4,Math.floor((t-4)*1e4)+5e3),evidenceCount:o,reason:`Consistent high ratings (${t.toFixed(2)}/5.0)`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"perfect-record",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let t=Number(e.successfulPayments+e.failedPayments);return t<50?{shouldAssign:false,confidence:0,evidenceCount:0}:e.successRate/100===100&&e.failedPayments===0n?{shouldAssign:true,confidence:Math.min(1e4,8e3+Math.floor(t/10)),evidenceCount:t,reason:`100% success rate over ${t} transactions`}:{shouldAssign:false,confidence:0,evidenceCount:t}}},{tag:"high-resolution",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{if(e.totalDisputes<5)return {shouldAssign:false,confidence:0,evidenceCount:0};let t=e.disputesResolved/e.totalDisputes*100,o=e.totalDisputes;return t>90?{shouldAssign:true,confidence:Math.min(1e4,Math.floor((t-90)*1e3)+8e3),evidenceCount:o,reason:`${t.toFixed(1)}% disputes resolved favorably`}:{shouldAssign:false,confidence:0,evidenceCount:o}}},{tag:"long-term-active",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let r=(Math.floor(Date.now()/1e3)-e.createdAt)/(365*24*60*60);return r>=1?{shouldAssign:true,confidence:Math.min(1e4,Math.floor(r*2e3)+6e3),evidenceCount:Math.floor(r),reason:`Active for ${r.toFixed(1)} years`}:{shouldAssign:false,confidence:0,evidenceCount:0}}},{tag:"multi-year",category:"behavior",minConfidence:z.MIN_TAG_CONFIDENCE,evaluate:e=>{let r=(Math.floor(Date.now()/1e3)-e.createdAt)/(365*24*60*60);return r>=3?{shouldAssign:true,confidence:Math.min(1e4,Math.floor(r*1e3)+7e3),evidenceCount:Math.floor(r),reason:`Active for ${r.toFixed(1)} years`}:{shouldAssign:false,confidence:0,evidenceCount:0}}}];}async calculateTags(e){let t=[],o=Math.floor(Date.now()/1e3);for(let r of this.tagCriteria){let c=r.evaluate(e);c.shouldAssign&&c.confidence>=r.minConfidence&&t.push({tagName:r.tag,confidence:c.confidence,evidenceCount:c.evidenceCount,lastUpdated:o});}return t}applyTagDecay(e,t){let o=t||Math.floor(Date.now()/1e3),r=[];for(let c of e){let i=o-c.lastUpdated,d=i/(1440*60),s=Math.floor(d*this.decayConfig.decayRatePerDay),p=Math.max(0,c.confidence-s);p>=this.decayConfig.minConfidence&&i<=this.decayConfig.maxAgeSeconds&&r.push({...c,confidence:p});}return r}mergeTags(e,t){let o=new Map;for(let r of e)o.set(r.tagName,r);for(let r of t){let c=o.get(r.tagName);c?(r.confidence>c.confidence||r.evidenceCount>c.evidenceCount)&&o.set(r.tagName,r):o.set(r.tagName,r);}return Array.from(o.values())}filterTags(e,t){let o=[...e],r=Math.floor(Date.now()/1e3);return t.category&&(o=o.filter(c=>this.getTagCategory(c.tagName)===t.category)),t.minConfidence!==void 0&&(o=o.filter(c=>c.confidence>=t.minConfidence)),t.maxAge!==void 0&&(o=o.filter(c=>r-c.lastUpdated<=t.maxAge)),t.activeOnly&&(o=o.filter(c=>r-c.lastUpdated<=z.STALE_TAG_THRESHOLD&&c.confidence>=this.decayConfig.minConfidence)),o}getTagCategory(e){return Object.values(mu).includes(e)?"skill":Object.values(yu).includes(e)?"behavior":Object.values(Tu).includes(e)?"compliance":"behavior"}validateTagName(e){return e.length>0&&e.length<=z.MAX_TAG_NAME_LENGTH}validateConfidence(e){return e>=0&&e<=z.MAX_TAG_CONFIDENCE}getConfidenceLevel(e){return e>=1e4?"Absolute":e>=9500?"Very High":e>=8e3?"High":e>=6e3?"Medium":e>=4e3?"Low":"Very Low"}sortByConfidence(e){return [...e].sort((t,o)=>o.confidence-t.confidence)}sortByEvidence(e){return [...e].sort((t,o)=>o.evidenceCount-t.evidenceCount)}sortByRecent(e){return [...e].sort((t,o)=>o.lastUpdated-t.lastUpdated)}getTopTags(e,t){return this.sortByConfidence(e).slice(0,t)}categorizeTags(e){let t=[],o=[],r=[],c=[];for(let i of e)switch(c.push(i.tagName),this.getTagCategory(i.tagName)){case "skill":t.push(i.tagName);break;case "behavior":o.push(i.tagName);break;case "compliance":r.push(i.tagName);break}return {allTags:c,skillTags:t,behaviorTags:o,complianceTags:r,tagScores:e,lastUpdated:e.length>0?Math.max(...e.map(i=>i.lastUpdated)):0}}};});var P0={};oe(P0,{MultiSourceAggregator:()=>Ef});var Ef,C0=a(()=>{Ef=class{adapters=new Map;configs=new Map;CONFLICT_THRESHOLD=300;constructor(){}addSource(e,t){t.enabled&&(this.adapters.set(e.source,e),this.configs.set(e.source,t));}removeSource(e){this.adapters.delete(e),this.configs.delete(e);}updateSourceWeight(e,t){let o=this.configs.get(e);o&&(o.weight=t);}updateSourceReliability(e,t){let o=this.configs.get(e);o&&(o.reliability=t);}async aggregateReputation(e){let t=[];for(let[s,p]of this.adapters.entries())try{let E=await p.fetchReputationData(e.toString());p.validateData(E)&&t.push(E);}catch(E){console.warn(`Failed to fetch reputation from ${s}:`,E);}let o=this.calculateWeightedScore(t),{hasConflicts:r,conflicts:c}=this.detectConflicts(t),i=this.buildSourceBreakdowns(t),d=t.reduce((s,p)=>s+p.dataPoints,0);return {agentId:e,aggregateScore:o,sourceScores:i,hasConflicts:r,conflicts:c,totalDataPoints:d,timestamp:new Date}}calculateWeightedScore(e){if(e.length===0)return 0;let t=0,o=0;for(let r of e){let c=this.configs.get(r.source);if(!c)continue;let i=c.weight/1e4,d=r.reliability,s=r.score*i*d,p=i*d;t+=s,o+=p;}return o===0?0:Math.round(t/o)}detectConflicts(e){if(e.length<2)return {hasConflicts:false,conflicts:[]};let t=e.map(d=>d.score),o=Math.max(...t),r=Math.min(...t),c=o-r,i=[];if(c>this.CONFLICT_THRESHOLD){let d=e.find(p=>p.score===o)?.source,s=e.find(p=>p.score===r)?.source;return i.push(`High variance detected: ${c} (${(c/1e3*100).toFixed(1)}%) between ${d} (${o}) and ${s} (${r})`),{hasConflicts:true,conflicts:i}}return {hasConflicts:false,conflicts:[]}}buildSourceBreakdowns(e){return e.map(t=>{let o=this.configs.get(t.source);if(!o)throw new Error(`No config found for source: ${t.source}`);let r=o.weight,c=t.reliability*1e4,i=t.score*(r/1e4)*(c/1e4)/this.calculateNormalizationFactor(e);return {source:t.source,score:t.score,weight:r,reliability:Math.round(c),dataPoints:t.dataPoints,contribution:Math.round(i),lastUpdated:t.timestamp}})}calculateNormalizationFactor(e){let t=0;for(let o of e){let r=this.configs.get(o.source);if(!r)continue;let c=r.weight/1e4,i=o.reliability;t+=c*i;}return t||1}async getSourceBreakdown(e){return (await this.aggregateReputation(e)).sourceScores}getRegisteredSources(){return Array.from(this.adapters.keys())}getSourceConfig(e){return this.configs.get(e)}enableSource(e){let t=this.configs.get(e);t&&(t.enabled=true);}disableSource(e){let t=this.configs.get(e);t&&(t.enabled=false);}isSourceEnabled(e){return this.configs.get(e)?.enabled??false}};});te();cf();var sf={CONSERVATIVE:{name:"Conservative",mode:"TierOnly",metricVisibility:{showScore:"Private",showJobsCompleted:"Private",showSuccessRate:"Private",showResponseTime:"Private",showDisputes:"Private",showEarnings:"Private",showRatings:"Private",showBadges:"Public"},autoGrantClients:false},BALANCED:{name:"Balanced",mode:"Custom",metricVisibility:{showScore:"Private",showJobsCompleted:"Public",showSuccessRate:"Public",showResponseTime:"Public",showDisputes:"Private",showEarnings:"Private",showRatings:"Public",showBadges:"Public"},autoGrantClients:true},OPEN:{name:"Open",mode:"Public",metricVisibility:{showScore:"Public",showJobsCompleted:"Public",showSuccessRate:"Public",showResponseTime:"Public",showDisputes:"Public",showEarnings:"Public",showRatings:"Public",showBadges:"Public"},autoGrantClients:true}},De={SCORE_RANGES:{LOW:{min:2e3},MEDIUM:{min:5e3},HIGH:{min:7500},VERY_HIGH:{min:9e3}},TIER_THRESHOLDS:{BRONZE:2e3,SILVER:5e3,GOLD:7500,PLATINUM:9e3},MAX_AUTHORIZED_VIEWERS:100};D();function $U(n){return typeof n!="object"||n===null?false:typeof n.IpfsHash=="string"}function Zt(n){return createSolanaClient({urlOrMoniker:n.urlOrMoniker})}var yt=class{client;commitment;endpoint;maxRetries;retryDelay;timeout;constructor(e){this.endpoint=e.endpoint,this.client=Zt({urlOrMoniker:e.endpoint}),this.commitment=e.commitment??"confirmed",this.maxRetries=e.maxRetries??3,this.retryDelay=e.retryDelay??1e3,this.timeout=e.timeout??6e4;}get rpc(){return this.client.rpc}async getAccountInfo(e,t){return this.withRetry(async()=>{let o=await this.client.rpc.getAccountInfo(e,{commitment:t?.commitment??this.commitment,encoding:"base64"}).send();return o.value?this.parseAccountInfo(o.value):null})}async getMultipleAccounts(e,t){return this.withRetry(async()=>(await this.client.rpc.getMultipleAccounts(e,{commitment:t?.commitment??this.commitment,encoding:"base64"}).send()).value.map(r=>r?this.parseAccountInfo(r):null))}async getProgramAccounts(e,t){return this.withRetry(async()=>(await this.client.rpc.getProgramAccounts(e,{commitment:t?.commitment??this.commitment,encoding:"base64",filters:t?.filters}).send()).map(r=>{let c=r;return {pubkey:c.pubkey,account:this.parseAccountInfo(c.account)}}))}blockhashCache=null;async getLatestBlockhash(){let e=Date.now();if(this.blockhashCache&&e-this.blockhashCache.timestamp<1e3)return this.blockhashCache.value;let t=await this.withRetry(async()=>{let o=await this.client.rpc.getLatestBlockhash({commitment:this.commitment}).send();return {blockhash:o.value.blockhash,lastValidBlockHeight:BigInt(o.value.lastValidBlockHeight)}});return this.blockhashCache={value:t,timestamp:e},t}async sendTransaction(e,t){return this.withRetry(async()=>await this.client.rpc.sendTransaction(e,{encoding:"base64",skipPreflight:t?.skipPreflight??false,preflightCommitment:t?.preflightCommitment??this.commitment,maxRetries:t?.maxRetries?BigInt(t.maxRetries):void 0}).send())}async getSignatureStatuses(e){return this.withRetry(async()=>(await this.client.rpc.getSignatureStatuses(e).send()).value.map(o=>{if(!o)return null;let r=o;return {slot:r.slot,confirmations:r.confirmations,err:r.err,confirmationStatus:r.confirmationStatus}}))}async simulateTransaction(e,t){return this.withRetry(async()=>{let o=await this.client.rpc.simulateTransaction(e,{encoding:"base64",commitment:t?.commitment??this.commitment,replaceRecentBlockhash:t?.replaceRecentBlockhash??false}).send();return {err:o.value.err,logs:o.value.logs??[],unitsConsumed:o.value.unitsConsumed?BigInt(o.value.unitsConsumed):void 0,returnData:o.value.returnData}})}async getFeeForMessage(e){return this.withRetry(async()=>{let t=await this.client.rpc.getFeeForMessage(e,{commitment:this.commitment}).send();return t.value?BigInt(t.value):null})}async isHealthy(){try{return await this.client.rpc.getHealth().send(),!0}catch{return false}}async getVersion(){return await this.client.rpc.getVersion().send()}async subscribeToAccount(e,t){console.warn("Account subscription using polling fallback. For real-time subscriptions, use client.rpcSubscriptions directly.");let o=setInterval(async()=>{try{let r=await this.getAccountInfo(e);t(r);}catch(r){console.error("Subscription polling error:",r);}},5e3);return ()=>{clearInterval(o);}}getGillClient(){return this.client}async withRetry(e,t=this.maxRetries){let o;for(let r=0;r<=t;r++)try{return await e()}catch(c){o=c,r<t&&await new Promise(i=>setTimeout(i,this.retryDelay*Math.pow(2,r)));}throw o}parseAccountInfo(e){let t=e,o=t.data,r=Array.isArray(o)?o[0]:o;return {executable:t.executable,lamports:typeof t.lamports=="number"?lamports(BigInt(t.lamports)):t.lamports,owner:t.owner,rentEpoch:t.rentEpoch!==void 0?typeof t.rentEpoch=="number"?BigInt(t.rentEpoch):t.rentEpoch:BigInt(0),data:Buffer.from(r,"base64"),space:t.space?typeof t.space=="number"?BigInt(t.space):t.space:void 0}}};function v1e(n,e="mainnet-beta"){let t="https://explorer.solana.com/tx";switch(e){case "devnet":return `${t}/${n}?cluster=devnet`;case "testnet":return `${t}/${n}?cluster=testnet`;case "localnet":return `${t}/${n}?cluster=custom&customUrl=http://localhost:8899`;default:return `${t}/${n}`}}function M1e(n,e="mainnet-beta"){let t="https://solscan.io/tx";switch(e){case "devnet":return `${t}/${n}?cluster=devnet`;case "testnet":return `${t}/${n}?cluster=testnet`;case "localnet":return `Local transaction: ${n} (not viewable on Solscan)`;default:return `${t}/${n}`}}function k1e(n,e="mainnet-beta"){let t="https://solana.fm/tx";switch(e){case "devnet":return `${t}/${n}?cluster=devnet-solana`;case "testnet":return `${t}/${n}?cluster=testnet-solana`;case "localnet":return `Local transaction: ${n} (not viewable on SolanaFM)`;default:return `${t}/${n}`}}function w1e(n,e="mainnet-beta"){let t="https://xray.helius.xyz/tx";switch(e){case "devnet":return `${t}/${n}?network=devnet`;case "testnet":return `${t}/${n}?network=testnet`;case "localnet":return `Local transaction: ${n} (not viewable on XRAY)`;default:return `${t}/${n}`}}function U1e(n,e="mainnet-beta"){return {solanaExplorer:v1e(n,e),solscan:M1e(n,e),solanaFM:k1e(n,e),xray:w1e(n,e)}}function af(n,e,t="confirmed"){return {signature:n,cluster:e,urls:U1e(n,e),commitment:t,timestamp:Date.now()}}function df(n,e){console.error("\u{1F6A8} GhostSpeak SDK Error:",n.message),e&&(e.operation&&console.error("\u{1F527} Operation:",e.operation),e.instructionName&&console.error("\u{1F4CB} Instruction:",e.instructionName),e.accounts&&(console.error("\u{1F3E6} Accounts provided:",e.accounts.length),e.accounts.forEach((t,o)=>{if(typeof t=="string")console.error(` ${o+1}. ${t}`);else if(typeof t=="object"){let r="address"in t?t.address:t,c="name"in t?t.name:void 0;console.error(` ${o+1}. ${r}${c?` (${c})`:""}`);}else console.error(` ${o+1}. ${String(t)}`);})),e.params&&console.error("\u2699\uFE0F Parameters:",e.params)),console.error(`
|
|
2
|
+
\u{1F4A1} Troubleshooting tips:`),console.error(" 1. Check that all required accounts are provided"),console.error(" 2. Verify account addresses are correct"),console.error(" 3. Ensure signers have sufficient SOL for transaction fees"),console.error(" 4. Confirm the program is deployed on the target network");}function uf(n,e,t,o){return {operation:n,instructionName:e,accounts:t,params:o}}var fu=class n{static instance=null;rpcClient;config;isDevelopment;logs=[];timings=new Map;constructor(e){this.config=e,this.rpcClient=new yt({endpoint:e.rpcEndpoint??"https://api.devnet.solana.com",commitment:e.commitment}),this.isDevelopment=process.env.NODE_ENV==="development"||e.cluster==="localnet"||false;}static getInstance(e){if(!n.instance&&e&&(n.instance=new n(e)),!n.instance)throw new Error("DevTools not initialized. Call with config first.");return n.instance}enableDevMode(){this.isDevelopment=true,console.log("\u{1F6E0}\uFE0F GhostSpeak Development Mode Enabled"),console.log(" - Transaction simulation before sending"),console.log(" - Cost estimates for all operations"),console.log(" - Enhanced error messages"),console.log(" - Performance timing");}isDevMode(){return this.isDevelopment}analyzeTransaction(e){let t=new Set,o=new Set,r=new Set,c=[],i=64,d=e.map((E,b)=>{i+=32,i+=(E.accounts?.length??0)*32,i+=E.data?.length??0;let x=(E.accounts??[]).map(P=>{let w=P.role.toString().includes("writable")||P.role.toString().includes("WRITABLE")||P.role===1||P.role===3,H=P.role.toString().includes("signer")||P.role.toString().includes("SIGNER")||typeof P=="object"&&"signer"in P||P.role===3;return w?t.add(P.address):o.add(P.address),H&&r.add(P.address),{address:P.address,isWritable:w,isSigner:H,role:P.role}}),k=this.getInstructionDescription(E,b);return {index:b,programId:E.programAddress,accountCount:x.length,dataSize:E.data?.length??0,humanReadable:k,accounts:x}}),s=this.estimateComputeUnits(e),p=this.estimateFee(s,e.length);return i>1232&&c.push(`Transaction size (${i} bytes) exceeds limit (1232 bytes)`),r.size===0&&c.push("No signers found in transaction"),s>BigInt(14e5)&&c.push(`High compute usage: ${s} units`),{instructions:d,totalAccounts:t.size+o.size,signerCount:r.size,writableAccounts:Array.from(t),readonlyAccounts:Array.from(o),estimatedSize:i,estimatedComputeUnits:s,estimatedFee:p,warnings:c}}getInstructionDescription(e,t){let o=e.programAddress;return o===this.config.programId?this.decodeGhostSpeakInstruction(e):o==="11111111111111111111111111111111"?"System Program: Transfer or Create Account":o==="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"?"Token Program: Token Operation":o==="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"?"Token-2022 Program: Advanced Token Operation":"Unknown Instruction"}decodeGhostSpeakInstruction(e){if(!e.data||e.data.length<8)return "GhostSpeak: Unknown Instruction";let t=Array.from(e.data.slice(0,8)).map(r=>r.toString(16).padStart(2,"0")).join("");return `GhostSpeak: ${{a8c5e109d3d1b8d5:"Register Agent",b7f3c8e0a2d4e9f1:"Create Escrow",c4d2f7a9b8e1c3f5:"Send Message",d9e8f2b5c1a7e4f8:"Create Channel"}[t]??"Custom Instruction"}`}estimateComputeUnits(e){let t=BigInt(0);for(let o of e)t+=BigInt(200),t+=BigInt((o.accounts?.length??0)*150),t+=BigInt((o.data?.length??0)*10),o.programAddress===this.config.programId&&(t+=BigInt(5e3));return t}estimateFee(e,t){let o=BigInt(5e3),r=e*BigInt(5)/BigInt(1e6),c=BigInt(t*1e3);return o+r+c}log(e,t){if(!this.isDevelopment)return;let r=`[${new Date().toISOString()}] ${e}`;this.logs.push(r),console.log(`\u{1F50D} ${r}`),t&&console.log(" Data:",t);}startTiming(e){if(!this.isDevelopment)return;let t=typeof performance<"u"?performance.now():Date.now();this.timings.set(e,t);}endTiming(e){if(!this.isDevelopment)return;let t=this.timings.get(e);if(!t)return;let r=(typeof performance<"u"?performance.now():Date.now())-t;this.log(`${e} took ${r.toFixed(2)}ms`),this.timings.delete(e);}formatTransaction(e){let t=["\u{1F4CB} Transaction Analysis","\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550",`Instructions: ${e.instructions.length}`,`Total Accounts: ${e.totalAccounts}`,`Signers: ${e.signerCount}`,`Estimated Size: ${e.estimatedSize} bytes`,`Estimated Compute Units: ${e.estimatedComputeUnits.toLocaleString()}`,`Estimated Fee: ${(Number(e.estimatedFee)/1e9).toFixed(6)} SOL`,""];t.push("Instructions:");for(let o of e.instructions)t.push(` ${o.index+1}. ${o.humanReadable}`),t.push(` Program: ${o.programId.slice(0,8)}...`),t.push(` Accounts: ${o.accountCount}, Data: ${o.dataSize} bytes`);if(e.warnings.length>0){t.push(""),t.push("\u26A0\uFE0F Warnings:");for(let o of e.warnings)t.push(` - ${o}`);}return t.push("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550"),t.join(`
|
|
3
|
+
`)}exportLogs(){return [...this.logs]}clearLogs(){this.logs=[],this.timings.clear();}};function Du(n){if(!n.programAddress)throw new Error("Invalid instruction format")}var hu=class{rpcClient;config;devTools;debugMode=false;constructor(e){this.config=e,this.rpcClient=new yt({endpoint:e.rpcEndpoint??"https://api.devnet.solana.com",wsEndpoint:e.wsEndpoint,commitment:e.commitment??"confirmed"}),this.devTools=fu.getInstance(e);}async execute(e,t,o,r){let c=uf("execute",e,o.map(i=>({address:i.address,name:"signer"})),{programId:this.config.programId});try{this.devTools.isDevMode()&&this.devTools.startTiming(e);let i=await Promise.resolve(t());if(Du(i),this.debugMode||this.devTools.isDevMode()){let k=this.devTools.analyzeTransaction([i]);console.log(this.devTools.formatTransaction(k)),this.debugMode=!1;}if(r?.simulate)return await this.simulateInstruction(i,o);let d=await this.rpcClient.getLatestBlockhash(),s={blockhash:d.blockhash,lastValidBlockHeight:d.lastValidBlockHeight},p=pipe(createTransactionMessage({version:0}),k=>setTransactionMessageFeePayerSigner(o[0],k),k=>setTransactionMessageLifetimeUsingBlockhash(s,k),k=>appendTransactionMessageInstructions([i],k)),E=await signTransactionMessageWithSigners(p),b=await this.sendAndConfirm(E,r?.skipPreflight??!1,r?.maxRetries??30);if(typeof b!="string")throw new Error("Transaction signature is not a string");let x=b;if(r?.returnDetails){let k=this.config.cluster??"devnet",P=af(x,k,this.config.commitment??"confirmed");return this.devTools.isDevMode()&&this.devTools.endTiming(e),P}return this.devTools.isDevMode()&&this.devTools.endTiming(e),x}catch(i){throw df(i,c),i}}async executeBatch(e,t,o,r){let c=uf("executeBatch",e,o.map(i=>({address:i.address,name:"signer"})),{programId:this.config.programId,instructionCount:t.length});try{let i=await Promise.all(t.map(async(P,w)=>{let H=await Promise.resolve(P());try{return Du(H),H}catch(R){throw new Error(`Instruction ${w} in ${e}: ${R.message}`)}})),d=this.estimateTransactionSize(i);if(d>1232)throw new Error(`Transaction too large: ${d} bytes (max: 1232)`);if(r?.simulate)return await this.simulateBatch(i,o);let s=await this.rpcClient.getLatestBlockhash(),p={blockhash:s.blockhash,lastValidBlockHeight:s.lastValidBlockHeight},E=pipe(createTransactionMessage({version:0}),P=>setTransactionMessageFeePayerSigner(o[0],P),P=>setTransactionMessageLifetimeUsingBlockhash(p,P),P=>appendTransactionMessageInstructions(i,P)),b=await signTransactionMessageWithSigners(E),x=await this.sendAndConfirm(b,r?.skipPreflight??!1);if(typeof x!="string")throw new Error("Transaction signature is not a string");let k=x;if(r?.returnDetails){let P=this.config.cluster??"devnet",w=af(k,P,this.config.commitment??"confirmed");return this.devTools.isDevMode()&&this.devTools.endTiming(e),w}return this.devTools.isDevMode()&&this.devTools.endTiming(e),k}catch(i){throw df(i,c),i}}async getAccount(e,t){try{let o=await this.rpcClient.getAccountInfo(e,{commitment:this.config.commitment});if(!o)return null;let c=(await Promise.resolve().then(()=>(te(),lu)))[t],i=c(),d=this.extractRawData(o.data);return i.decode(d)}catch(o){return console.warn(`Failed to fetch account ${e}:`,o),null}}async getAccounts(e,t){try{let o=await this.rpcClient.getMultipleAccounts(e,{commitment:this.config.commitment}),c=(await Promise.resolve().then(()=>(te(),lu)))[t],i=c();return o.map(d=>{if(!d)return null;try{let s=this.extractRawData(d.data);return i.decode(s)}catch{return null}})}catch(o){return console.warn("Failed to fetch multiple accounts:",o),e.map(()=>null)}}async getProgramAccounts(e,t){try{let o=t?.map(p=>"dataSize"in p?{dataSize:p.dataSize}:(p.memcmp.encoding??"base58")==="base64"?{memcmp:{offset:p.memcmp.offset,bytes:p.memcmp.bytes,encoding:"base64"}}:{memcmp:{offset:p.memcmp.offset,bytes:p.memcmp.bytes,encoding:"base58"}}),r=await this.rpcClient.getProgramAccounts(this.config.programId,{commitment:this.config.commitment,filters:o??[]}),i=(await Promise.resolve().then(()=>(te(),lu)))[e],d=i(),s=[];for(let{pubkey:p,account:E}of r)try{let b=this.extractRawData(E.data),x=d.decode(b);s.push({address:p,data:x});}catch{}return s}catch(o){return console.error("Failed to get program accounts:",o),[]}}enableDebug(){return this.debugMode=true,this}async debug(e,t){this.devTools.log(`Debugging ${e}`);let o=await Promise.all(t.map(async c=>{let i=await Promise.resolve(c());return Du(i),i})),r=this.devTools.analyzeTransaction(o);return console.log(this.devTools.formatTransaction(r)),r}async explain(e,t){let o=await this.debug(e,t),r=[`\u{1F50D} Transaction: ${e}`,"","This transaction will:",...o.instructions.map((c,i)=>` ${i+1}. ${c.humanReadable}`),"",`Cost: ~${(Number(o.estimatedFee)/1e9).toFixed(6)} SOL`,`Size: ${o.estimatedSize} bytes`,`Compute: ${o.estimatedComputeUnits.toLocaleString()} units`];return o.warnings.length>0&&(r.push("","\u26A0\uFE0F Warnings:"),r.push(...o.warnings.map(c=>` - ${c}`))),r.join(`
|
|
4
|
+
`)}async estimateCost(e){try{let t=await Promise.all(e.map(async p=>{let E=await Promise.resolve(p());return Du(E),E})),o=await this.rpcClient.getLatestBlockhash(),r={blockhash:o.blockhash,lastValidBlockHeight:o.lastValidBlockHeight},c=pipe(createTransactionMessage({version:0}),p=>setTransactionMessageFeePayer(this.config.defaultFeePayer,p),p=>setTransactionMessageLifetimeUsingBlockhash(r,p),p=>appendTransactionMessageInstructions(t,p)),i=compileTransactionMessage(c),d=Buffer.from(i).toString("base64"),s=await this.rpcClient.getFeeForMessage(d);return BigInt(s??0)}catch{return 5000n+BigInt(e.length)*1000n}}async sendAndConfirm(e,t,o=30){let r=getBase64EncodedWireTransaction(e),c=await this.rpcClient.sendTransaction(r,{skipPreflight:t,preflightCommitment:this.config.commitment});console.log("\u{1F50D} Transaction sent, signature:",c),console.log("\u{1F50D} Signature length:",c.length),console.log("\u{1F50D} Signature type:",typeof c);let i=false,d=0,s=1e3,p=3e4,E=Date.now();for(;!i&&d<o&&Date.now()-E<p;)try{console.log(`\u{1F50D} Confirmation attempt ${d+1}/${o}`);let b=await this.rpcClient.getSignatureStatuses([c]);if(b[0]){if(console.log("\u{1F50D} Status found:",b[0]),b[0].err)throw new Error(`Transaction failed: ${JSON.stringify(b[0].err,(k,P)=>typeof P=="bigint"?P.toString():P)}`);let x=b[0].confirmationStatus;if(x===this.config.commitment||this.config.commitment==="confirmed"&&x==="finalized"){i=!0,console.log("\u2705 Transaction confirmed via status check");break}}else {console.log("\u{1F50D} No status found, trying transaction details...");try{let k=await Zt({urlOrMoniker:this.config.rpcEndpoint??"https://api.devnet.solana.com"}).rpc.getTransaction(c,{commitment:this.config.commitment??"confirmed",encoding:"json",maxSupportedTransactionVersion:0}).send();if(k&&k.meta){if(k.meta.err)throw new Error(`Transaction failed: ${JSON.stringify(k.meta.err,(P,w)=>typeof w=="bigint"?w.toString():w)}`);i=!0,console.log("\u2705 Transaction confirmed via direct lookup");break}}catch{console.log("\u{1F50D} Transaction details not yet available");}}d++,await new Promise(x=>setTimeout(x,s)),s=Math.min(s*1.5,5e3);}catch(b){if(b instanceof Error&&b.message.includes("Transaction failed"))throw b;console.log("\u{1F50D} Confirmation attempt failed:",b.message),d++,await new Promise(x=>setTimeout(x,s*2));}if(!i){console.log("\u{1F50D} Final confirmation attempt via transaction lookup...");try{let x=await Zt({urlOrMoniker:this.config.rpcEndpoint??"https://api.devnet.solana.com"}).rpc.getTransaction(c,{commitment:this.config.commitment??"confirmed",encoding:"json",maxSupportedTransactionVersion:0}).send();if(x&&x.meta){if(x.meta.err)throw new Error(`Transaction failed: ${JSON.stringify(x.meta.err,(k,P)=>typeof P=="bigint"?P.toString():P)}`);return console.log("\u2705 Transaction confirmed on final check - returning success"),c}}catch(b){console.log("\u{1F50D} Final check failed:",b.message);}return console.log("\u26A0\uFE0F Transaction confirmation timed out, but transaction was sent"),console.log(` Check status at: https://explorer.solana.com/tx/${c}?cluster=${this.config.cluster||"devnet"}`),c}return c}async simulateInstruction(e,t){let o=await this.rpcClient.getLatestBlockhash(),r={blockhash:o.blockhash,lastValidBlockHeight:o.lastValidBlockHeight},c=pipe(createTransactionMessage({version:0}),s=>setTransactionMessageFeePayerSigner(t[0],s),s=>setTransactionMessageLifetimeUsingBlockhash(r,s),s=>appendTransactionMessageInstructions([e],s)),i=await signTransactionMessageWithSigners(c),d=getBase64EncodedWireTransaction(i);return this.rpcClient.simulateTransaction(d,{commitment:this.config.commitment,replaceRecentBlockhash:true})}async simulateBatch(e,t){let o=await this.rpcClient.getLatestBlockhash(),r={blockhash:o.blockhash,lastValidBlockHeight:o.lastValidBlockHeight},c=pipe(createTransactionMessage({version:0}),s=>setTransactionMessageFeePayerSigner(t[0],s),s=>setTransactionMessageLifetimeUsingBlockhash(r,s),s=>appendTransactionMessageInstructions(e,s)),i=await signTransactionMessageWithSigners(c),d=getBase64EncodedWireTransaction(i);return this.rpcClient.simulateTransaction(d,{commitment:this.config.commitment,replaceRecentBlockhash:true})}estimateTransactionSize(e){let t=64;for(let o of e)t+=32,t+=(o.accounts?.length??0)*32,t+=o.data.length;return t}extractRawData(e){if(Buffer.isBuffer(e)||e instanceof Uint8Array)return new Uint8Array(e);if(typeof e=="object"&&e!==null&&"data"in e)return Buffer.from(e.data,"base64");if(typeof e=="string")return Buffer.from(e,"base64");throw new Error("Invalid account data format")}async createCommunicationSession(e){return {programAddress:this.config.programId,accounts:[],data:new Uint8Array(0)}}async sendCommunicationMessage(e,t){return {programAddress:this.config.programId,accounts:[],data:new Uint8Array(0)}}async updateParticipantStatus(e){return {programAddress:this.config.programId,accounts:[],data:new Uint8Array(0)}}};var Eu={processed:500,confirmed:2e3,finalized:3e4},Pu=class{accountCache;pdaCache;config;ttls;constructor(e={}){this.config={enabled:e.enabled??false,maxSize:e.maxSize??1e3,ttlOverrides:e.ttlOverrides??{}},this.ttls={processed:e.ttlOverrides?.processed??Eu.processed,confirmed:e.ttlOverrides?.confirmed??Eu.confirmed,finalized:e.ttlOverrides?.finalized??Eu.finalized},this.accountCache=new LRUCache({max:this.config.maxSize,ttl:Eu.finalized}),this.pdaCache=new LRUCache({max:this.config.maxSize});}isEnabled(){return this.config.enabled}getAccount(e,t,o){if(!this.config.enabled)return;let r=`${e}:${t}`,c=this.accountCache.get(r);if(c){if(o!==void 0&&c.slot<o){this.accountCache.delete(r);return}return c.data}}setAccount(e,t,o,r){if(!this.config.enabled)return;let c=`${e}:${o}`,i={data:t,slot:r,commitment:o,timestamp:Date.now()};this.accountCache.set(c,i,{ttl:this.ttls[o]});}getPDA(e){if(this.config.enabled)return this.pdaCache.get(e)}setPDA(e,t){this.config.enabled&&this.pdaCache.set(e,t);}invalidateAccount(e,t){this.config.enabled&&(t?this.accountCache.delete(`${e}:${t}`):["processed","confirmed","finalized"].forEach(o=>{this.accountCache.delete(`${e}:${o}`);}));}clear(){this.accountCache.clear(),this.pdaCache.clear();}getStats(){return {accountCache:{size:this.accountCache.size,max:this.config.maxSize},pdaCache:{size:this.pdaCache.size,max:this.config.maxSize}}}};var U=class{builder;config;logger;cacheManager;_debugMode=false;constructor(e){this.config=e,this.builder=new hu(e),this.cacheManager=new Pu(e.cache),this.logger=e.logger;}debug(){return this._debugMode=true,this.builder.enableDebug(),this}async execute(e,t,o){return this.builder.execute(e,t,o)}async executeWithDetails(e,t,o){return this.builder.execute(e,t,o,{returnDetails:true})}async executeBatch(e,t,o){return this.builder.executeBatch(e,t.map(r=>()=>Promise.resolve(r())),o)}async simulate(e,t,o){return this.builder.execute(e,()=>Promise.resolve(t()),o,{simulate:true})}async simulateInstruction(e,t,o){return this.simulate(e,t,o)}async estimateCost(e){return this.builder.estimateCost(e)}async getCost(e,t){return this.builder.estimateCost([t])}async explain(e,t){return this.builder.explain(e,[t])}async analyze(e,t){return this.builder.debug(e,[t])}async getAccount(e,t){if(this.cacheManager.isEnabled()){let r=this.cacheManager.getAccount(e,this.commitment);if(r!==void 0)return this.logger?.info(`[Cache HIT] ${e}`),r}let o=await this.builder.getAccount(e,t);return this.cacheManager.isEnabled()&&o!==null&&(this.cacheManager.setAccount(e,o,this.commitment,0),this.logger?.info(`[Cache SET] ${e}`)),o}async getAccounts(e,t){if(!this.cacheManager.isEnabled())return this.builder.getAccounts(e,t);let o=new Array(e.length),r=[],c=[];for(let i=0;i<e.length;i++){let d=this.cacheManager.getAccount(e[i],this.commitment);d!==void 0?(o[i]=d,this.logger?.info(`[Cache HIT] ${e[i]}`)):(r.push(i),c.push(e[i]));}if(c.length>0){this.logger?.info(`[Cache MISS] Fetching ${c.length}/${e.length} accounts`);let i=await this.builder.getAccounts(c,t),d=0;for(let s=0;s<i.length;s++){let p=r[s],E=i[s];o[p]=E,E!==null&&this.cacheManager.setAccount(c[s],E,this.commitment,d);}}return o}async getProgramAccounts(e,t){return this.builder.getProgramAccounts(e,t)}get programId(){return this.config.programId}getProgramId(){return this.config.programId}get commitment(){return this.config.commitment??"confirmed"}getCommitment(){return this.config.commitment??"confirmed"}invalidateCache(e){this.cacheManager.invalidateAccount(e),this.logger?.info(`[Cache INVALIDATE] ${e}`);}clearCache(){this.cacheManager.clear(),this.logger?.info("[Cache CLEAR] All caches cleared");}getCacheStats(){return this.cacheManager.getStats()}};var JU=new Map,Af=0,Cu=class{constructor(e){this.config=e;console.log("\u{1F9EA} Initialized TestIPFSProvider for local testing (shared storage)");}storage=JU;uploadCount=0;async upload(e,t){Af++;let o=typeof e=="string"?e:new TextDecoder().decode(e),r=`Qm${this.generateHash(o)}_test_${Af}`;this.storage.set(r,{content:e,pinned:t?.pin!==false});let c=typeof e=="string"?new TextEncoder().encode(e).length:e.length;return console.log(`\u{1F4E6} Test IPFS upload: ${r} (${c} bytes)`),{hash:r,uri:`ipfs://${r}`,size:c,timestamp:Date.now(),pinned:t?.pin!==false,gateways:[`http://localhost:8080/ipfs/${r}`,`https://test.ipfs.io/ipfs/${r}`]}}async retrieve(e){let t=this.storage.get(e);if(!t)throw new Error(`Test IPFS: Content not found for hash ${e}`);return console.log(`\u{1F4E5} Test IPFS retrieve: ${e}`),await new Promise(o=>setTimeout(o,100)),t.content}async pin(e){let t=this.storage.get(e);return t?(t.pinned=true,console.log(`\u{1F4CC} Test IPFS pin: ${e}`),{hash:e,success:true,status:"pinned"}):{hash:e,success:false,status:"failed",error:`Content not found: ${e}`}}async unpin(e){let t=this.storage.get(e);return t?(t.pinned=false,console.log(`\u{1F4CC} Test IPFS unpin: ${e}`),{hash:e,success:true,status:"pinned"}):{hash:e,success:false,status:"failed",error:`Content not found: ${e}`}}generateHash(e){let t=0;for(let i=0;i<e.length;i++){let d=e.charCodeAt(i);t=(t<<5)-t+d,t=t&t;}let o="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",r="",c=Math.abs(t);for(;c>0&&r.length<40;)r=o[c%o.length]+r,c=Math.floor(c/o.length);for(;r.length<40;)r=o[Math.floor(Math.random()*o.length)]+r;return r}getStats(){let e=0,t=0;for(let o of this.storage.values()){let r=typeof o.content=="string"?new TextEncoder().encode(o.content).length:o.content.length;e+=r,o.pinned&&t++;}return {count:this.storage.size,totalSize:e,pinned:t}}clear(){this.storage.clear(),Af=0,console.log("\u{1F9F9} Test IPFS storage cleared");}static getSharedStorage(){return JU}};var pf=class{constructor(e){this.config=e;}async upload(e,t){let o=this.config.endpoint??"https://api.pinata.cloud",r=new FormData,c=new Blob([e],{type:t?.contentType??"application/octet-stream"});r.append("file",c,t?.filename??"content"),t?.metadata&&r.append("pinataMetadata",JSON.stringify({name:t.filename??"ghostspeak-content",keyvalues:t.metadata}));let i=await fetch(`${o}/pinning/pinFileToIPFS`,{method:"POST",headers:{Authorization:`Bearer ${this.config.jwt??this.config.apiKey}`,...this.config.headers},body:r});if(!i.ok){let p=await i.text();throw new Error(`Pinata upload failed: ${i.status} ${p}`)}let d=await i.json(),s=typeof e=="string"?new TextEncoder().encode(e).length:e.length;if(!$U(d))throw new Error("Invalid IPFS upload response format");return {hash:d.IpfsHash,uri:`ipfs://${d.IpfsHash}`,size:s,timestamp:Date.now(),pinned:true,gateways:[`https://gateway.pinata.cloud/ipfs/${d.IpfsHash}`,`https://ipfs.io/ipfs/${d.IpfsHash}`]}}async retrieve(e,t){let r=`${t?.gateway??"https://gateway.pinata.cloud"}/ipfs/${e}`,c=await fetch(r,{signal:t?.timeout?AbortSignal.timeout(t.timeout):void 0});if(!c.ok)throw new Error(`Failed to retrieve from IPFS: ${c.status} ${c.statusText}`);let i=c.headers.get("content-type");return i?.startsWith("text/")||i?.includes("json")?c.text():new Uint8Array(await c.arrayBuffer())}async pin(e){let t=this.config.endpoint??"https://api.pinata.cloud",o=await fetch(`${t}/pinning/pinByHash`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.config.jwt??this.config.apiKey}`,...this.config.headers},body:JSON.stringify({hashToPin:e})}),r=o.ok;return {hash:e,success:r,status:r?"pinned":"failed",error:r?void 0:`Pin failed: ${o.status}`}}async unpin(e){let t=this.config.endpoint??"https://api.pinata.cloud",o=await fetch(`${t}/pinning/unpin/${e}`,{method:"DELETE",headers:{Authorization:`Bearer ${this.config.jwt??this.config.apiKey}`,...this.config.headers}}),r=o.ok;return {hash:e,success:r,status:r?"pinned":"failed",error:r?void 0:`Unpin failed: ${o.status}`}}},lf=class{constructor(e){this.config=e;}async upload(e,t){let o=this.config.endpoint??"http://localhost:5001",r=new FormData,c=new Blob([e],{type:t?.contentType??"application/octet-stream"});r.append("file",c,t?.filename??"content");let i=await fetch(`${o}/api/v0/add`,{method:"POST",body:r});if(!i.ok)throw new Error(`IPFS HTTP upload failed: ${i.status}`);let d=await i.json(),s=typeof e=="string"?new TextEncoder().encode(e).length:e.length;if(typeof d!="object"||d===null)throw new Error("Invalid IPFS HTTP API response");let p=d;if(typeof p.Hash!="string")throw new Error("IPFS HTTP API response missing Hash field");let E=p.Hash;return {hash:E,uri:`ipfs://${E}`,size:s,timestamp:Date.now(),pinned:t?.pin!==false,gateways:[`${o}/ipfs/${E}`,`https://ipfs.io/ipfs/${E}`]}}async retrieve(e,t){let r=`${t?.gateway??this.config.endpoint?.replace("/api/v0","")??"https://ipfs.io"}/ipfs/${e}`,c=await fetch(r,{signal:t?.timeout?AbortSignal.timeout(t.timeout):void 0});if(!c.ok)throw new Error(`Failed to retrieve from IPFS: ${c.status}`);let i=c.headers.get("content-type");return i?.startsWith("text/")||i?.includes("json")?c.text():new Uint8Array(await c.arrayBuffer())}async pin(e){let t=this.config.endpoint??"http://localhost:5001",o=await fetch(`${t}/api/v0/pin/add?arg=${e}`,{method:"POST"}),r=o.ok;return {hash:e,success:r,status:r?"pinned":"failed",error:r?void 0:`Pin failed: ${o.status}`}}async unpin(e){let t=this.config.endpoint??"http://localhost:5001",o=await fetch(`${t}/api/v0/pin/rm?arg=${e}`,{method:"POST"}),r=o.ok;return {hash:e,success:r,status:r?"pinned":"failed",error:r?void 0:`Unpin failed: ${o.status}`}}},bu=class{constructor(e){this.config=e;this.initializeProviders();}providers=[];cache=new Map;initializeProviders(){if(this.providers.push(this.createProvider(this.config.provider)),this.config.fallbackProviders)for(let e of this.config.fallbackProviders)this.providers.push(this.createProvider(e));}createProvider(e){switch(e.name){case "pinata":return new pf(e);case "ipfs-http-client":case "custom":return new lf(e);case "test":return new Cu(e);default:throw new Error(`Unsupported IPFS provider: ${e.name}`)}}async upload(e,t){let o=Date.now(),r;for(let c=0;c<this.providers.length;c++){let i=this.providers[c];try{console.log(`\u{1F4E4} Attempting IPFS upload with provider ${c+1}/${this.providers.length}`);let d=await this.withRetry(()=>i.upload(e,t),this.config.maxRetries??3,this.config.retryDelay??1e3);return console.log(`\u2705 IPFS upload successful: ${d.hash}`),{success:!0,data:d,duration:Date.now()-o,provider:this.config.provider.name}}catch(d){console.warn(`\u274C Provider ${c+1} upload failed:`,d instanceof Error?d.message:String(d)),r=d instanceof Error?d:new Error(String(d));}}return {success:false,error:"UPLOAD_FAILED",message:`All providers failed. Last error: ${r?.message}`,duration:Date.now()-o}}async retrieve(e,t){let o=Date.now();if(this.config.enableCache&&t?.cache!==false){let i=this.cache.get(e);if(i&&Date.now()-i.timestamp<(this.config.cacheTTL??3e5))return {success:true,data:{content:i.content,size:(typeof i.content=="string",i.content.length),hash:e,gateway:"cache",fromCache:true},duration:Date.now()-o}}let r,c=t?.gateway?[t.gateway]:this.config.gateways??["https://ipfs.io"];for(let i of c)for(let d of this.providers)try{let s=await this.withRetry(()=>d.retrieve(e,{...t,gateway:i}),this.config.maxRetries??3,this.config.retryDelay??1e3);return this.config.enableCache&&this.cache.set(e,{content:s,timestamp:Date.now()}),{success:!0,data:{content:s,size:s.length,hash:e,gateway:i,fromCache:!1},duration:Date.now()-o}}catch(s){r=s instanceof Error?s:new Error(String(s));}return {success:false,error:"RETRIEVAL_FAILED",message:`Failed to retrieve from all gateways. Last error: ${r?.message}`,duration:Date.now()-o}}async pin(e){let t=Date.now();for(let o of this.providers)try{let r=await o.pin(e);return {success:r.success,data:r,duration:Date.now()-t}}catch(r){console.warn("Pin attempt failed:",r);}return {success:false,error:"PIN_FAILED",message:"All pin attempts failed",duration:Date.now()-t}}async storeContent(e,t,o){let r=new TextEncoder().encode(e).length,c=this.config.sizeThreshold??800;if(!(o?.forceIpfs??r>c))return {uri:`data:application/json;base64,${btoa(e)}`,useIpfs:false,size:r};let d=await this.upload(e,o);if(!d.success||!d.data)throw new Error(`IPFS upload failed: ${d.message}`);let s={type:t,originalSize:r,ipfsHash:d.data.hash,encoding:"utf8",compression:"none",mimeType:"application/json",uploadedAt:d.data.timestamp,pinned:d.data.pinned,checksum:await this.calculateChecksum(e)};return {uri:d.data.uri,useIpfs:true,ipfsMetadata:s,size:r}}async retrieveContent(e){if(e.startsWith("data:")){let t=e.split(",")[1];if(!t)throw new Error("Invalid data URI format");return atob(t)}if(e.startsWith("ipfs://")){let t=e.replace("ipfs://",""),o=await this.retrieve(t);if(!o.success||!o.data)throw new Error(`Failed to retrieve IPFS content: ${o.message}`);return typeof o.data.content=="string"?o.data.content:new TextDecoder().decode(o.data.content)}throw new Error(`Unsupported URI format: ${e}`)}async withRetry(e,t,o){let r;for(let c=0;c<=t;c++)try{return await e()}catch(i){r=i instanceof Error?i:new Error(String(i)),c<t&&(console.log(`\u23F3 Retrying in ${o}ms... (attempt ${c+1}/${t})`),await new Promise(d=>setTimeout(d,o)));}throw r}async calculateChecksum(e){let o=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(r)).map(i=>i.toString(16).padStart(2,"0")).join("")}clearCache(){this.cache.clear();}getCacheStats(){return {size:this.cache.size,keys:Array.from(this.cache.keys())}}};var rn={provider:{name:"pinata",endpoint:"https://api.pinata.cloud"},gateways:["https://gateway.pinata.cloud","https://ipfs.io","https://cloudflare-ipfs.com","https://gateway.ipfs.io"],autoPinning:true,sizeThreshold:800,maxRetries:3,retryDelay:1e3,enableCache:true,cacheTTL:3e5},mf=class{client;constructor(e){this.client=new bu(e);}async storeAgentMetadata(e,t){let o=JSON.stringify({...e,createdAt:new Date().toISOString(),version:"1.0.0"});return this.client.storeContent(o,"agent-metadata",{filename:`agent-${e.agentId??"metadata"}.json`,metadata:{type:"agent-metadata",agentId:e.agentId,name:e.name},contentType:"application/json",...t})}async storeChannelMessage(e,t){let o=JSON.stringify({...e,timestamp:new Date().toISOString(),version:"1.0.0"});return this.client.storeContent(o,"channel-message",{filename:`message-${Date.now()}.json`,metadata:{type:"channel-message",channelId:e.channelId,messageType:e.messageType??0},contentType:"application/json",...t})}async storeFileAttachment(e,t,o,r){let c=typeof e=="string"?e:new TextDecoder().decode(e);return this.client.storeContent(c,"file-attachment",{filename:t,contentType:o,metadata:{type:"file-attachment",originalFilename:t,mimeType:o},...r})}async retrieveAgentMetadata(e){let t=await this.client.retrieveContent(e),o=JSON.parse(t);if(typeof o!="object"||o===null)throw new Error("Retrieved agent metadata is not a valid object");return o}async retrieveChannelMessage(e){let t=await this.client.retrieveContent(e),o=JSON.parse(t);if(typeof o!="object"||o===null)throw new Error("Retrieved channel message is not a valid object");return o}async batchUpload(e){return (await Promise.allSettled(e.map(o=>this.client.storeContent(o.content,o.type,{filename:o.filename,...o.options})))).map(o=>o.status==="fulfilled"?{success:true,data:o.value}:{success:false,error:"UPLOAD_FAILED",message:o.reason instanceof Error?o.reason.message:String(o.reason)})}async pinContent(e){let t=await this.client.pin(e);return {...t,data:t.success}}isIPFSUri(e){return e.startsWith("ipfs://")}extractIPFSHash(e){return this.isIPFSUri(e)?e.replace("ipfs://",""):null}getGatewayUrls(e,t){return (t??rn.gateways??[]).map(r=>`${r}/ipfs/${e}`)}isValidIPFSHash(e){return e.length<44?false:e.startsWith("Qm")&&e.length===46?/^Qm[A-Za-z0-9]{44}$/.test(e):e.length>46?/^[A-Za-z0-9]+$/.test(e):false}shouldUseIPFS(e,t){let o=new TextEncoder().encode(e).length,r=t??rn.sizeThreshold??800;return o>r}async compressContent(e){try{if(typeof CompressionStream<"u"){let t=new CompressionStream("gzip"),o=t.writable.getWriter(),r=t.readable.getReader(),i=new TextEncoder().encode(e),d=o.write(i).then(()=>o.close()),s=[],p=async()=>{let P=await r.read(),{done:w,value:H}=P;!w&&H&&(s.push(H),await p());};await Promise.all([d,p()]);let E=s.reduce((P,w)=>P+w.length,0),b=new Uint8Array(E),x=0;for(let P of s)b.set(P,x),x+=P.length;return {compressed:Buffer.from(b).toString("base64"),algorithm:"gzip"}}else return console.warn("Compression not available in this environment, storing uncompressed"),{compressed:e,algorithm:"none"}}catch(t){return console.warn("Compression failed, falling back to uncompressed:",t),{compressed:e,algorithm:"none"}}}async decompressContent(e,t){if(t==="none")return e;try{if(t==="gzip")if(typeof DecompressionStream<"u"){let o=new DecompressionStream("gzip"),r=o.writable.getWriter(),c=o.readable.getReader(),i=Buffer.from(e,"base64"),d=r.write(i).then(()=>r.close()),s=[],p=async()=>{let P=await c.read(),{done:w,value:H}=P;!w&&H&&(s.push(H),await p());};await Promise.all([d,p()]);let E=s.reduce((P,w)=>P+w.length,0),b=new Uint8Array(E),x=0;for(let P of s)b.set(P,x),x+=P.length;return new TextDecoder().decode(b)}else return console.warn("Decompression not available in this environment, returning compressed data"),e;else return console.warn(`Unknown compression algorithm: ${t}`),e}catch(o){return console.error("Decompression failed, returning compressed data:",o),e}}getStats(){return {cacheStats:this.client.getCacheStats(),config:rn}}clearCache(){this.client.clearCache();}};function QU(n){let e={...rn,...n,provider:{...rn.provider,...n?.provider}};return new mf(e)}var Ru=address("11111111111111111111111111111111");address("11111111111111111111111111111111");address("SysvarRecentB1ockHashes11111111111111111111");address("SysvarStakeHistory1111111111111111111111111");address("Sysvar1nstructions1111111111111111111111111");address("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");address("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");address("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");address("So11111111111111111111111111111111111111112");address("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");address("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");te();var on=class extends U{ipfsUtils=null;constructor(e){super(e),e.ipfsConfig&&(this.ipfsUtils=QU(e.ipfsConfig));}async register(e,t){let o=t.pricingModel??0,r=async()=>{let i=await this.deriveAgentPda(t.agentId,e.address);return await fy({agentAccount:i,signer:e,systemProgram:this.systemProgramId,agentType:t.agentType,name:t.name,description:t.description,metadataUri:t.metadataUri,agentId:t.agentId,pricingModel:o})},c=()=>{let i=new Uint8Array(5);return i[0]=1,new DataView(i.buffer).setUint32(1,256*1024,true),{programAddress:"ComputeBudget111111111111111111111111111111",accounts:[],data:i}};return this.debug(),t.skipSimulation?(console.log("\u{1F680} SKIPPING SIMULATION - Sending transaction directly"),this.builder.executeBatch("registerAgent",[c,r],[e],{simulate:false,skipPreflight:true})):this.builder.executeBatch("registerAgent",[c,r],[e])}async registerCompressed(e,t){let o=async()=>{let r=t.treeConfig||await this.deriveTreeConfigPda(e.address);return await Dy({merkleTree:t.merkleTree,treeAuthority:r,signer:e,systemProgram:this.systemProgramId,compressionProgram:this.compressionProgramId,agentType:t.agentType,name:t.name,description:t.description,metadataUri:t.metadataUri,agentId:t.agentId,pricingModel:t.pricingModel??0,logWrapper:"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"})};return this.execute("registerAgentCompressed",o,[e])}async update(e,t){let o=()=>rT({agentAccount:t.agentAddress,signer:e,metadataUri:t.metadataUri,agentType:t.agentType,agentId:t.agentId,name:t.name??null,description:t.description??null,pricingModel:t.pricingModel??0});return this.execute("updateAgent",o,[e])}async verify(e,t){let o=async()=>await ef({agent:t.agentAddress,verifier:e,agentPubkey:t.agentPubkey,serviceEndpoint:t.serviceEndpoint,supportedCapabilities:t.supportedCapabilities,verifiedAt:t.verifiedAt});return this.execute("verifyAgent",o,[e])}async deactivate(e,t){let o=()=>m1({agentAccount:t.agentAddress,signer:e,agentId:t.agentId});return this.execute("deactivateAgent",o,[e])}async activate(e,t){let o=()=>Em({agentAccount:t.agentAddress,signer:e,agentId:t.agentId});return this.execute("activateAgent",o,[e])}async getAgentAccount(e){return super.getAccount(e,"getAgentDecoder")}async getAllAgents(){return this.getProgramAccounts("getAgentDecoder")}async getAgentsByType(e){let t=Buffer.alloc(1);t.writeUInt8(e,0);let o=[{memcmp:{offset:BigInt(8),bytes:t.toString("base64"),encoding:"base64"}}];return this.getProgramAccounts("getAgentDecoder",o)}async getUserAgents(e){let t=[{memcmp:{offset:BigInt(9),bytes:e,encoding:"base58"}}];return this.getProgramAccounts("getAgentDecoder",t)}async batchGetAgents(e,t){return super.getAccounts(e,"getAgentDecoder")}async batchGetExistingAgents(e,t){let{batchGetExistingAccounts:o}=await Promise.resolve().then(()=>(Tf(),yf));return o(this.config.rpc,e,{onProgress:t})}async batchGetAndMapAgents(e,t){let{batchGetAndMap:o}=await Promise.resolve().then(()=>(Tf(),yf));return o(this.config.rpc,e,t)}async deriveAgentPda(e,t){let{deriveAgentPda:o}=await Promise.resolve().then(()=>(ku(),Mu)),[r]=await o({programAddress:this.programId,owner:t,agentId:e});return r}async deriveUserRegistryPda(e){let{deriveUserRegistryPda:t}=await Promise.resolve().then(()=>(ku(),Mu));return t(this.programId,e)}async deriveTreeConfigPda(e){let{getProgramDerivedAddress:t,getAddressEncoder:o}=await import('@solana/addresses'),c=o().encode(e),[i]=await t({programAddress:this.programId,seeds:[new TextEncoder().encode("agent_tree_config"),c]});return i}get systemProgramId(){return Ru}get compressionProgramId(){return "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK"}};te();var Uu=address("22zoJMtdu4tQc2PzL74ZUT7FrwgB1Udec8DdW4yw4BdG"),t0="attestation",n0="credential",r0="schema",sn=class{static async deriveAttestationPda(e,t,o){let[r,c]=await getProgramDerivedAddress({programAddress:Uu,seeds:[getUtf8Encoder().encode(t0),getAddressEncoder().encode(e),getAddressEncoder().encode(t),getAddressEncoder().encode(o)]});return {attestationPda:r,bump:c}}static async deriveCredentialPda(e){let[t,o]=await getProgramDerivedAddress({programAddress:Uu,seeds:[getUtf8Encoder().encode(n0),getAddressEncoder().encode(e)]});return {attestationPda:t,bump:o}}static async deriveSchemaPda(e,t){let[o,r]=await getProgramDerivedAddress({programAddress:Uu,seeds:[getUtf8Encoder().encode(r0),getAddressEncoder().encode(e),getUtf8Encoder().encode(t)]});return {attestationPda:o,bump:r}}static serializeAttestationData(e){let t=new TextEncoder,o=t.encode(e.network),r=e.githubUsername?t.encode(e.githubUsername):new Uint8Array,c=e.twitterHandle?t.encode(e.twitterHandle):new Uint8Array,i=36+o.length+1+(e.githubUsername?4+r.length:0)+1+(e.twitterHandle?4+c.length:0)+8,d=new Uint8Array(i),s=0,p=Buffer.from(e.x402PaymentAddress);return d.set(p.slice(0,32),s),s+=32,new DataView(d.buffer,s,4).setUint32(0,o.length,true),s+=4,d.set(o,s),s+=o.length,e.githubUsername?(d[s]=1,s+=1,new DataView(d.buffer,s,4).setUint32(0,r.length,true),s+=4,d.set(r,s),s+=r.length):(d[s]=0,s+=1),e.twitterHandle?(d[s]=1,s+=1,new DataView(d.buffer,s,4).setUint32(0,c.length,true),s+=4,d.set(c,s),s+=c.length):(d[s]=0,s+=1),new DataView(d.buffer,s,8).setBigInt64(0,e.timestamp,true),d}static getDefaultCredentialConfig(e){return {issuer:e,name:"GhostSpeak AI Agent Ownership",description:"Attestation proving ownership of an AI agent registered on the GhostSpeak protocol",schemaUri:"https://ghostspeak.ai/schemas/agent-ownership-v1.json"}}static isAttestationExpired(e,t){let o=t??BigInt(Math.floor(Date.now()/1e3));return e<o}static calculateDefaultExpiry(e){let t=e??BigInt(Math.floor(Date.now()/1e3)),o=BigInt(365*24*60*60);return t+o}static async prepareAttestation(e){let{attestationPda:t,bump:o}=await this.deriveAttestationPda(e.credentialAddress,e.schemaAddress,e.x402PaymentAddress),r=e.expiryTimestamp??this.calculateDefaultExpiry();return {attestationData:this.serializeAttestationData({x402PaymentAddress:e.x402PaymentAddress,network:e.network,githubUsername:e.githubUsername,twitterHandle:e.twitterHandle,timestamp:BigInt(Math.floor(Date.now()/1e3))}),attestationPda:t,bump:o,expiryTimestamp:r}}};var nye="did_document",_u=class extends U{constructor(e){super(e);}async claim(e,t){let o=await this.prepareClaim(t),r=()=>Om({agentAccount:t.agentAddress,didDocument:o.didDocumentPda,sasAttestation:o.attestationPda,claimer:e,systemProgram:this.systemProgramId,sasCredential:t.sasCredential,sasSchema:t.sasSchema,ipfsMetadataUri:t.ipfsMetadataUri??null,network:t.network});return this.execute("claimGhost",r,[e])}async prepareClaim(e){let{attestationPda:t,bump:o}=await sn.deriveAttestationPda(e.sasCredential,e.sasSchema,e.x402PaymentAddress),[r,c]=await this.deriveDidDocumentPda(e.x402PaymentAddress);return {attestationPda:t,didDocumentPda:r,attestationBump:o,didDocumentBump:c}}async getGhostAgent(e){return super.getAccount(e,"getAgentDecoder")}async getAllGhosts(){return this.getGhostsByType(10)}async getGhostsByType(e=10){let t=Buffer.alloc(1);t.writeUInt8(e,0);let o=[{memcmp:{offset:BigInt(8),bytes:t.toString("base64"),encoding:"base64"}}];return this.getProgramAccounts("getAgentDecoder",o)}async getClaimedGhosts(e){let t=[{memcmp:{offset:BigInt(9),bytes:e,encoding:"base58"}}];return this.getProgramAccounts("getAgentDecoder",t)}async validateClaim(e){let t=[],o=[],r=["devnet","testnet","mainnet-beta","localnet"];r.includes(e.network)||t.push(`Invalid network: ${e.network}. Must be one of: ${r.join(", ")}`),e.ipfsMetadataUri&&!e.ipfsMetadataUri.startsWith("ipfs://")&&o.push('IPFS metadata URI should start with "ipfs://"');let c=await this.getGhostAgent(e.agentAddress);return c?(c.owner!==null&&t.push(`Agent is already claimed by: ${c.owner}`),c.agentType!==10&&o.push(`Agent type is ${c.agentType}, expected 10 (external x402 agent)`)):t.push(`Agent not found at address: ${e.agentAddress}`),{valid:t.length===0,errors:t,warnings:o}}async deriveDidDocumentPda(e){let[t,o]=await getProgramDerivedAddress({programAddress:this.programId,seeds:[getUtf8Encoder().encode(nye),getAddressEncoder().encode(e)]});return [t,o]}get systemProgramId(){return Ru}};te();var an=class extends U{getInitializeGovernanceProposalInstruction(e){return jt(e)}async createProposal(e){let t=this.deriveProposalPda(e.signer.address,e.title),o=await this.getInitializeGovernanceProposalInstruction({proposal:t,proposer:e.signer,title:e.title,description:e.description,proposalType:{kind:e.proposalType,data:{}},executionParams:{instructions:[],accounts:[],targetProgram:t,executeAfter:BigInt(e.executionDelay??0)},proposalId:BigInt(Date.now())});return this.execute("createProposal",()=>o,[e.signer])}async getProposal(e){return super.getAccount(e,"getGovernanceProposalDecoder")}async getActiveProposals(){return this.getProgramAccounts("getGovernanceProposalDecoder")}async getProposalsByProposer(e){let t=[{memcmp:{offset:BigInt(8),bytes:e,encoding:"base58"}}];return this.getProgramAccounts("getGovernanceProposalDecoder",t)}async getProposalsByStatus(e){let t=await this.getProgramAccounts("getGovernanceProposalDecoder");return t.filter(o=>t.length>0)}deriveProposalPda(e,t){return `proposal_${e}_${t}`}};te();var dn=class extends U{async createMultisig(e){throw new Error("createMultisig: Instruction not available - requires IDL regeneration")}async createProposal(e){let t=await jt({proposer:e.proposer,proposalId:e.proposalId,title:e.title,description:e.description,proposalType:e.proposalType,executionParams:e.executionParams},{programAddress:this.programId});return this.execute("createProposal",()=>t,[e.proposer])}async executeProposal(e){throw new Error("executeProposal: Use protocol_config instructions for execution")}};var rye="https://staging.crossmint.com",oye="https://www.crossmint.com",Sf={AGENT_IDENTITY:"GhostSpeakAgentIdentity",REPUTATION_SCORE:"GhostSpeakReputation",JOB_COMPLETION:"GhostSpeakJobCompletion"},zu=class{apiKey;baseUrl;chain;constructor(e){this.apiKey=e.apiKey,this.baseUrl=e.environment==="production"?oye:rye,this.chain=e.chain||"base-sepolia";}async createAgentIdentityType(){let e=Sf.AGENT_IDENTITY,t={$schema:"https://json-schema.org/draft/2020-12/schema",title:"GhostSpeak Agent Identity",description:"Verified AI agent identity on the GhostSpeak Protocol",type:"object",properties:{credentialSubject:{type:"object",properties:{agentId:{type:"string"},owner:{type:"string"},capabilities:{type:"array",items:{type:"string"}},registeredAt:{type:"string"},reputationScore:{type:"number"},totalJobsCompleted:{type:"integer"},verified:{type:"boolean"},id:{type:"string"}},required:["agentId","owner","capabilities","registeredAt","verified"],additionalProperties:false}}};return this.createCredentialType(e,t)}async createReputationType(){let e=Sf.REPUTATION_SCORE,t={$schema:"https://json-schema.org/draft/2020-12/schema",title:"GhostSpeak Reputation",description:"Verified reputation score for GhostSpeak users",type:"object",properties:{credentialSubject:{type:"object",properties:{userId:{type:"string"},walletAddress:{type:"string"},reputationScore:{type:"number"},totalTransactions:{type:"integer"},disputeRate:{type:"number"},memberSince:{type:"string"},id:{type:"string"}},required:["userId","walletAddress","reputationScore","memberSince"],additionalProperties:false}}};return this.createCredentialType(e,t)}async createJobCompletionType(){let e=Sf.JOB_COMPLETION,t={$schema:"https://json-schema.org/draft/2020-12/schema",title:"GhostSpeak Job Completion",description:"Certificate of successful job completion on GhostSpeak",type:"object",properties:{credentialSubject:{type:"object",properties:{jobId:{type:"string"},agentId:{type:"string"},clientAddress:{type:"string"},completedAt:{type:"string"},amountPaid:{type:"string"},rating:{type:"integer"},review:{type:"string"},id:{type:"string"}},required:["jobId","agentId","clientAddress","completedAt","amountPaid","rating"],additionalProperties:false}}};return this.createCredentialType(e,t)}async initializeAllTypes(){let[e,t,o]=await Promise.all([this.createAgentIdentityType(),this.createReputationType(),this.createJobCompletionType()]);return {agentIdentity:e,reputation:t,jobCompletion:o}}async createAllTemplates(e){let[t,o,r]=await Promise.all([this.createTemplate(e.agentIdentity.id,{name:"GhostSpeak Agent Identity",description:"Verified AI agent identity on the GhostSpeak Protocol",imageUrl:"https://www.ghostspeak.io/assets/credential-agent.png"}),this.createTemplate(e.reputation.id,{name:"GhostSpeak Reputation",description:"Verified reputation score for GhostSpeak users",imageUrl:"https://www.ghostspeak.io/assets/credential-reputation.png"}),this.createTemplate(e.jobCompletion.id,{name:"GhostSpeak Job Completion Certificate",description:"Certificate of successful job completion on GhostSpeak",imageUrl:"https://www.ghostspeak.io/assets/credential-job.png"})]);return {agentIdentityTemplate:t,reputationTemplate:o,jobCompletionTemplate:r}}async issueAgentCredential(e,t,o,r){return this.issueCredential(e,t,o,r)}async issueReputationCredential(e,t,o,r){return this.issueCredential(e,t,o,r)}async issueJobCompletionCredential(e,t,o,r){return this.issueCredential(e,t,o,r)}async createCredentialType(e,t){let o=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/types/${e}`,{method:"PUT",headers:{"Content-Type":"application/json","X-API-KEY":this.apiKey},body:JSON.stringify(t)});if(!o.ok){let r=await o.json().catch(()=>({message:o.statusText}));throw new Error(`Failed to create credential type: ${JSON.stringify(r)}`)}return o.json()}async createTemplate(e,t){let o=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/templates/`,{method:"POST",headers:{"Content-Type":"application/json","X-API-KEY":this.apiKey},body:JSON.stringify({credentials:{type:e,encryption:"none",storage:"crossmint"},metadata:t,chain:this.chain})});if(!o.ok){let i=await o.text();try{let d=JSON.parse(i);throw new Error(`Failed to create template: ${JSON.stringify(d)}`)}catch{throw new Error(`Failed to create template (${o.status}): ${i}`)}}let r=await o.json(),c=await this.waitForAction(r.id);return c.data&&c.data.collection?c.data.collection:c.data||c}async waitForAction(e){let t=0;for(;t<60;){await new Promise(c=>setTimeout(c,2e3));let o=await fetch(`${this.baseUrl}/api/2022-06-09/actions/${e}`,{headers:{"X-API-KEY":this.apiKey}});if(!o.ok)throw new Error(`Failed to poll action: ${o.statusText}`);let r=await o.json();if(r.status==="succeeded")return r;if(r.status==="failed")throw new Error(`Action failed: ${JSON.stringify(r)}`);t++;}throw new Error("Action polling timed out")}async issueCredential(e,t,o,r){let c=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/templates/${e}/vcs`,{method:"POST",headers:{"Content-Type":"application/json","X-API-KEY":this.apiKey},body:JSON.stringify({recipient:`email:${t}:${this.chain}`,credential:{subject:o,expiresAt:r||this.getDefaultExpiry()}})});if(!c.ok){let i=await c.json().catch(()=>({message:c.statusText}));throw new Error(`Failed to issue credential: ${JSON.stringify(i)}`)}return c.json()}async getCredential(e){let t=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/${e}`,{headers:{"X-API-KEY":this.apiKey}});if(!t.ok){let o=await t.json().catch(()=>({message:t.statusText}));throw new Error(`Failed to get credential: ${JSON.stringify(o)}`)}return t.json()}async verifyCredential(e){let t=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/verification/verify`,{method:"POST",headers:{"Content-Type":"application/json","X-API-KEY":this.apiKey},body:JSON.stringify({credential:e})});if(!t.ok){let o=await t.json().catch(()=>({message:t.statusText}));throw new Error(`Failed to verify credential: ${JSON.stringify(o)}`)}return t.json()}async revokeCredential(e){let t=await fetch(`${this.baseUrl}/api/v1-alpha1/credentials/${e}`,{method:"DELETE",headers:{"X-API-KEY":this.apiKey}});if(!t.ok){let o=await t.json().catch(()=>({message:t.statusText}));throw new Error(`Failed to revoke credential: ${JSON.stringify(o)}`)}return t.json()}getDefaultExpiry(){let e=new Date;return e.setFullYear(e.getFullYear()+1),e.toISOString().split("T")[0]}};var o0="did_document";var ke=class extends Error{code;constructor(e,t){super(t||e),this.name="DidError",this.code=e;}};async function Ou(n,e){let[t,o]=await getProgramDerivedAddress({programAddress:n,seeds:[new TextEncoder().encode(o0),getAddressEncoder().encode(e)]});return [t,o]}function he(n,e){return `did:sol:${n==="mainnet"?"mainnet-beta":n}:${e.toString()}`}function Fu(n){if(!n.startsWith("did:sol:"))throw new ke("InvalidDidFormat",'DID must start with "did:sol:"');let e=n.split(":");if(e.length!==4)throw new ke("InvalidDidFormat",'DID must have format "did:sol:network:identifier"');let t=["mainnet-beta","devnet","testnet","localnet"];if(!t.includes(e[2]))throw new ke("InvalidDidFormat",`Invalid network "${e[2]}". Must be one of: ${t.join(", ")}`);try{Tt.decode(e[3]);}catch{throw new ke("InvalidDidFormat","DID identifier must be a valid base58-encoded Solana public key")}}function i0(n){Fu(n);let e=n.split(":");return {method:e[1],network:e[2],identifier:e[3]}}function xf(n){let e=n.verificationMethods.filter(s=>!s.revoked).map(s=>({id:`${n.did}#${s.id}`,type:s.methodType,controller:s.controller,publicKeyMultibase:s.publicKeyMultibase})),t=n.verificationMethods.filter(s=>!s.revoked&&s.relationships.includes("authentication")).map(s=>`${n.did}#${s.id}`),o=n.verificationMethods.filter(s=>!s.revoked&&s.relationships.includes("assertionMethod")).map(s=>`${n.did}#${s.id}`),r=n.verificationMethods.filter(s=>!s.revoked&&s.relationships.includes("keyAgreement")).map(s=>`${n.did}#${s.id}`),c=n.verificationMethods.filter(s=>!s.revoked&&s.relationships.includes("capabilityInvocation")).map(s=>`${n.did}#${s.id}`),i=n.verificationMethods.filter(s=>!s.revoked&&s.relationships.includes("capabilityDelegation")).map(s=>`${n.did}#${s.id}`),d=n.serviceEndpoints.map(s=>({id:`${n.did}#${s.id}`,type:s.serviceType,serviceEndpoint:s.serviceEndpoint,description:s.description||void 0}));return {"@context":n.context,id:n.did,controller:n.controller.toString(),verificationMethod:e,authentication:t.length>0?t:void 0,assertionMethod:o.length>0?o:void 0,keyAgreement:r.length>0?r:void 0,capabilityInvocation:c.length>0?c:void 0,capabilityDelegation:i.length>0?i:void 0,service:d.length>0?d:void 0,alsoKnownAs:n.alsoKnownAs.length>0?n.alsoKnownAs:void 0}}function c0(n,e,t,o=["authentication"]){let r=`z${t}`;return {id:n,methodType:"Ed25519VerificationKey2020",controller:e,publicKeyMultibase:r,relationships:o,createdAt:Math.floor(Date.now()/1e3),revoked:false}}function s0(n,e,t,o=""){return {id:n,serviceType:e,serviceEndpoint:t,description:o}}function a0(n){return !n.deactivated}function d0(n,e=true){let t=xf(n);return e?JSON.stringify(t,null,2):JSON.stringify(t)}var un=n=>Tt.encode(n),dye="GHosT3wqDfNq9bKz8dNEQ1F5mLuN7bKdNYx3Z1111111";var gn=class{programId;didModule;constructor(e=dye,t){this.programId=e,this.didModule=t;}setDidModule(e){this.didModule=e;}hashSubjectData(e){let t=JSON.stringify(e,Object.keys(e).sort());return sha256(new TextEncoder().encode(t))}generateCredentialId(e,t){let o=Date.now(),r=`${e}-${t}-${o}`,c=sha256(new TextEncoder().encode(r)),i=un(c.slice(0,8));return `${e.toLowerCase()}-${i}`}exportAsW3CCredential(e,t,o,r,c){let i=c?.network||"mainnet",d=he(i,this.programId),s=he(i,e.subject),p=`solana:${this.programId}:credential:${e.credentialId}`;return {"@context":["https://www.w3.org/ns/credentials/v2","https://w3id.org/security/data-integrity/v2","https://ghostspeak.io/ns/credentials/v1"],type:["VerifiableCredential",`GhostSpeak${o.kind}Credential`],id:`urn:ghostspeak:${e.credentialId}`,issuer:{id:d,name:"GhostSpeak Protocol"},validFrom:new Date(e.issuedAt*1e3).toISOString(),validUntil:e.expiresAt?new Date(e.expiresAt*1e3).toISOString():void 0,credentialSubject:{id:s,...r},credentialSchema:{id:o.schemaUri,type:"JsonSchema"},credentialStatus:{id:p,type:"SolanaAccountStatus2025",statusPurpose:"revocation"},relatedResource:c?.includeRelatedResource?[{id:e.subjectDataUri,digestMultibase:`mEi${un(e.subjectDataHash)}`}]:void 0,proof:{type:"DataIntegrityProof",created:new Date(e.issuedAt*1e3).toISOString(),verificationMethod:`${d}#key-1`,cryptosuite:"eddsa-rdfc-2022",proofPurpose:"assertionMethod",proofValue:un(e.signature)}}}async exportWithDidResolution(e,t,o,r,c){if(!this.didModule)return this.exportAsW3CCredential(e,t,o,r,c);let i=c?.network||"mainnet",d=he(i,this.programId),s=he(i,e.subject),p=await this.didModule.resolve(this.programId).catch(()=>null);await this.didModule.resolve(e.subject).catch(()=>null);let b=`solana:${this.programId}:credential:${e.credentialId}`,x=p?.verificationMethods?.[0]?`${d}#${p.verificationMethods[0].id}`:`${d}#key-1`;return {"@context":["https://www.w3.org/ns/credentials/v2","https://w3id.org/security/data-integrity/v2","https://ghostspeak.io/ns/credentials/v1"],type:["VerifiableCredential",`GhostSpeak${o.kind}Credential`],id:`urn:ghostspeak:${e.credentialId}`,issuer:{id:d,name:"GhostSpeak Protocol"},validFrom:new Date(e.issuedAt*1e3).toISOString(),validUntil:e.expiresAt?new Date(e.expiresAt*1e3).toISOString():void 0,credentialSubject:{id:s,...r},credentialSchema:{id:o.schemaUri,type:"JsonSchema"},credentialStatus:{id:b,type:"SolanaAccountStatus2025",statusPurpose:"revocation"},relatedResource:c?.includeRelatedResource?[{id:e.subjectDataUri,digestMultibase:`mEi${un(e.subjectDataHash)}`}]:void 0,proof:{type:"DataIntegrityProof",created:new Date(e.issuedAt*1e3).toISOString(),verificationMethod:x,cryptosuite:"eddsa-rdfc-2022",proofPurpose:"assertionMethod",proofValue:un(e.signature)}}}static buildAgentIdentitySubject(e){return e}issueX402AgentCredential(e){let t=Math.floor(Date.now()/1e3),o={agentId:e.agentId,owner:e.owner,name:e.name,capabilities:e.capabilities||[],serviceEndpoint:e.serviceEndpoint,frameworkOrigin:e.frameworkOrigin,x402Enabled:true,x402PaymentAddress:e.x402PaymentAddress,x402AcceptedTokens:e.x402AcceptedTokens,x402PricePerCall:e.x402PricePerCall,registeredAt:t,verifiedAt:t,type:"external-x402-agent",verificationResponseTimeMs:e.verificationResponseTimeMs},r=this.generateCredentialId("AgentIdentity",e.agentAddress),c=this.hashSubjectData(o),i={template:"x402-agent-identity-template",subject:e.agentAddress,issuer:this.programId,credentialId:r,subjectDataHash:c,subjectDataUri:`data:application/json;base64,${Buffer.from(JSON.stringify(o)).toString("base64")}`,status:"Active",signature:c,issuedAt:t},d={authority:this.programId,name:"x402 Agent Identity",kind:"AgentIdentity",schemaUri:"https://ghostspeak.io/schemas/x402-agent-identity-v1.json",description:"Verifiable credential for x402-compatible AI agents registered with GhostSpeak",isActive:true,totalIssued:1,createdAt:t},s={credentialType:d.authority,name:"x402 Agent Identity",imageUri:"https://ghostspeak.io/assets/credential-badge-x402.png",issuer:this.programId,isActive:true,totalIssued:1,createdAt:t},p=this.exportAsW3CCredential(i,s,d,o,{network:e.network||"devnet",includeRelatedResource:true});return {credentialId:r,credential:i,w3cCredential:p,subjectData:o}}exportCredentialToJSON(e,t,o){let r={credentialType:"x402-agent",name:e.credentialId.includes("agentidentity")?"Agent Identity":"Custom",imageUri:"https://ghostspeak.io/assets/credential-badge.png",issuer:e.issuer,isActive:true,totalIssued:1,createdAt:e.issuedAt},c={authority:e.issuer,name:"GhostSpeak Credential",kind:"AgentIdentity",schemaUri:"https://ghostspeak.io/schemas/credential-v1.json",description:"GhostSpeak verifiable credential",isActive:true,totalIssued:1,createdAt:e.issuedAt},i=this.exportAsW3CCredential(e,r,c,t,{network:o?.network||"devnet",includeRelatedResource:true});return o?.pretty?JSON.stringify(i,null,2):JSON.stringify(i)}};var Gu=class{constructor(e){this.config=e;this.credentialModule=new gn(e.programId),e.crossmint&&(this.crossmintClient=new zu(e.crossmint));}credentialModule;crossmintClient;async issueAgentIdentityCredential(e){let t=gn.buildAgentIdentitySubject({agentId:e.agentId,owner:e.owner,name:e.name,capabilities:e.capabilities,serviceEndpoint:e.serviceEndpoint,frameworkOrigin:e.frameworkOrigin,x402Enabled:e.x402Enabled,registeredAt:e.registeredAt,verifiedAt:e.verifiedAt}),o=this.credentialModule.generateCredentialId("AgentIdentity",e.owner),r=this.credentialModule.hashSubjectData(t),c={template:"11111111111111111111111111111111",subject:e.owner,issuer:e.owner,credentialId:o,subjectDataHash:r,subjectDataUri:`ipfs://placeholder/${o}`,status:"Active",signature:e.signature,issuedAt:Math.floor(Date.now()/1e3),expiresAt:void 0,revokedAt:void 0,crossmintCredentialId:void 0},i={authority:"11111111111111111111111111111111",name:"AgentIdentity",kind:"AgentIdentity",schemaUri:"https://ghostspeak.io/schemas/agent-identity.json",description:"Verified AI agent identity on GhostSpeak Protocol",isActive:true,totalIssued:1,createdAt:Math.floor(Date.now()/1e3)},d={credentialType:"11111111111111111111111111111111",name:"GhostSpeak Agent Identity",imageUri:"https://www.ghostspeak.io/assets/credential-agent.png",issuer:e.owner,isActive:true,totalIssued:1,createdAt:Math.floor(Date.now()/1e3),crossmintTemplateId:this.config.crossmintTemplates?.agentIdentity},s=this.credentialModule.exportAsW3CCredential(c,d,i,t),p={solanaCredential:{credentialId:o},w3cCredential:s};if(e.syncToCrossmint&&this.crossmintClient&&e.recipientEmail)if(!d.crossmintTemplateId)p.crossmintSync={status:"failed",error:"No template ID configured"};else try{let E=await this.crossmintClient.issueCredential(d.crossmintTemplateId,e.recipientEmail,t);p.crossmintSync={status:"synced",credentialId:E.credentialId,chain:this.config.crossmint?.chain};}catch(E){p.crossmintSync={status:"failed",error:E instanceof Error?E.message:"Unknown error"};}return p}};var v={MAX_REPUTATION_SCORE:1e4,MIN_REPUTATION_FOR_SLASH:1e3,REPUTATION_DECAY_RATE_BPS:10,BRONZE_TIER_THRESHOLD:2e3,SILVER_TIER_THRESHOLD:5e3,GOLD_TIER_THRESHOLD:7500,PLATINUM_TIER_THRESHOLD:9e3,MAX_REPUTATION_CATEGORIES:10};var Wu=class{fraudPatterns=[];constructor(){this.initializeFraudPatterns();}initializeFraudPatterns(){this.fraudPatterns=[{patternId:"sudden_spike",description:"Sudden spike in reputation without corresponding activity",riskScore:80,detect:e=>{if(e.performanceHistory.length<2)return false;let t=e.performanceHistory[e.performanceHistory.length-1],o=e.performanceHistory[e.performanceHistory.length-2];return t.score-o.score>2e3&&t.jobsCompleted===o.jobsCompleted}},{patternId:"perfect_scores_only",description:"All jobs have perfect scores (potential manipulation)",riskScore:60,detect:e=>{let t=e.performanceHistory.slice(-10);return t.length>=5&&t.every(o=>o.avgQuality===100)}},{patternId:"rapid_category_switching",description:"Rapid switching between unrelated categories",riskScore:40,detect:e=>{if(e.categoryReputations.length<5)return false;let t=e.categoryReputations.sort((r,c)=>c.lastActivity-r.lastActivity).slice(0,5);return (Date.now()/1e3-t[4].lastActivity)/86400<7}},{patternId:"dispute_pattern",description:"High dispute rate with suspicious resolution pattern",riskScore:70,detect:e=>{if(e.totalJobsCompleted<10)return false;let t=e.disputesAgainst/e.totalJobsCompleted,o=e.disputesResolved/Math.max(1,e.disputesAgainst);return t>.3&&o>.9}},{patternId:"time_manipulation",description:"Completion times significantly below expected",riskScore:50,detect:(e,t)=>t.actualDuration<t.expectedDuration*.1}];}calculateReputation(e,t){let o=this.applyTimeDecay(e),r=this.calculateWeightedScore(o.factors,t),c=this.updateCategoryReputation(o.categoryReputations,t,r),i=this.calculateOverallScore(c.categories),d=this.getTierFromScore(i),s=this.checkBadgeAchievements(o,t,i),p=this.detectFraud(o,t);return {overallScore:i,jobScore:r,categoryScore:c.categoryScore,tier:d,newBadges:s,fraudDetected:p.detected,fraudRiskScore:p.riskScore}}applyTimeDecay(e){let t=Date.now()/1e3,o=(t-e.lastUpdated)/86400;if(o<=0)return e;let r=v.REPUTATION_DECAY_RATE_BPS*o,c=Math.max(0,1e4-r)/1e4,i=Math.floor(e.overallScore*c),d=e.categoryReputations.map(s=>{let p=(t-s.lastActivity)/86400,E=v.REPUTATION_DECAY_RATE_BPS*p,b=Math.max(0,1e4-E)/1e4;return {...s,score:Math.floor(s.score*b)}});return {...e,overallScore:i,categoryReputations:d}}calculateWeightedScore(e,t){if(e.completionWeight+e.qualityWeight+e.timelinessWeight+e.satisfactionWeight+e.disputeWeight!==100)throw new Error("Reputation factors must sum to 100");let r=t.completed?v.MAX_REPUTATION_SCORE:0,c=t.qualityRating*v.MAX_REPUTATION_SCORE/100,i=this.calculateTimelinessScore(t.expectedDuration,t.actualDuration),d=t.clientSatisfaction*v.MAX_REPUTATION_SCORE/100,s=this.calculateDisputeScore(t),p=(r*e.completionWeight+c*e.qualityWeight+i*e.timelinessWeight+d*e.satisfactionWeight+s*e.disputeWeight)/100;return Math.min(p,v.MAX_REPUTATION_SCORE)}calculateTimelinessScore(e,t){if(t<=e)return v.MAX_REPUTATION_SCORE;let o=(t-e)*1e4/e;return o>5e3?0:v.MAX_REPUTATION_SCORE-v.MAX_REPUTATION_SCORE*o/1e4}calculateDisputeScore(e){return e.hadDispute?e.disputeResolvedFavorably?v.MAX_REPUTATION_SCORE/2:0:v.MAX_REPUTATION_SCORE}updateCategoryReputation(e,t,o){let r=e.findIndex(c=>c.category===t.category);if(r!==-1){let c=e[r],i={...c,completedJobs:c.completedJobs+1,qualitySum:c.qualitySum+t.qualityRating,qualityCount:c.qualityCount+1,totalEarnings:c.totalEarnings+t.paymentAmount,lastActivity:Date.now()/1e3,score:Math.floor((c.score*7+o*3)/10),avgCompletionTime:Math.floor((c.avgCompletionTime*c.completedJobs+t.actualDuration)/(c.completedJobs+1))},d=[...e];return d[r]=i,{categories:d,categoryScore:i.score}}else {if(e.length>=v.MAX_REPUTATION_CATEGORIES)throw new Error("Maximum reputation categories reached");let c={category:t.category,score:o,completedJobs:1,avgCompletionTime:t.actualDuration,qualitySum:t.qualityRating,qualityCount:1,lastActivity:Date.now()/1e3,totalEarnings:t.paymentAmount};return {categories:[...e,c],categoryScore:o}}}calculateOverallScore(e){if(e.length===0)return 5e3;let t=0,o=0;for(let r of e){let c=r.completedJobs;t+=r.score*c,o+=c;}return o>0?Math.floor(t/o):5e3}getTierFromScore(e){return e>=v.PLATINUM_TIER_THRESHOLD?"Platinum":e>=v.GOLD_TIER_THRESHOLD?"Gold":e>=v.SILVER_TIER_THRESHOLD?"Silver":e>=v.BRONZE_TIER_THRESHOLD?"Bronze":"None"}checkBadgeAchievements(e,t,o){let r=[],c=new Set(e.badges.map(d=>d.badgeType)),i=e.totalJobsCompleted+(t.completed?1:0);return !c.has("FirstJob")&&i>=1&&r.push("FirstJob"),!c.has("TenJobs")&&i>=10&&r.push("TenJobs"),!c.has("HundredJobs")&&i>=100&&r.push("HundredJobs"),!c.has("ThousandJobs")&&i>=1e3&&r.push("ThousandJobs"),!c.has("PerfectRating")&&o>=9500&&r.push("PerfectRating"),!c.has("QuickResponder")&&e.avgResponseTime>0&&e.avgResponseTime<3600&&r.push("QuickResponder"),!c.has("DisputeResolver")&&e.disputesResolved>=5&&r.push("DisputeResolver"),c.has("CategoryExpert")||e.categoryReputations.some(s=>s.score>=9e3)&&r.push("CategoryExpert"),!c.has("CrossCategoryMaster")&&e.categoryReputations.length>=5&&r.push("CrossCategoryMaster"),r}detectFraud(e,t){let o=0,r=[];for(let i of this.fraudPatterns)i.detect(e,t)&&(o+=i.riskScore,r.push(i.patternId));let c=Math.min(100,o);return {detected:c>=50,riskScore:c,patterns:r}}createPerformanceSnapshot(e,t){let o=e.categoryReputations.length>0?e.categoryReputations.reduce((r,c)=>r+(c.qualityCount>0?c.qualitySum/c.qualityCount:0),0)/e.categoryReputations.length:0;return {timestamp:Date.now()/1e3,score:t,jobsCompleted:e.totalJobsCompleted,avgQuality:Math.floor(o)}}calculateSlashAmount(e,t){if(t>5e3)throw new Error("Slash percentage cannot exceed 50%");if(e<v.MIN_REPUTATION_FOR_SLASH)throw new Error("Reputation too low to slash");let o=Math.floor(e*t/1e4);return {newScore:Math.max(0,e-o),slashAmount:o}}calculateStakingBonus(e){return Math.min(500,Math.floor(e/1e3))}};Df();var Nu=class extends U{calculator;tagEngine;constructor(e){super(e),this.calculator=new Wu,this.tagEngine=new An;}calculateReputationChange(e,t){return this.calculator.calculateReputation(e,t)}getTierName(e){switch(e){case "None":return "Unranked";case "Bronze":return "Bronze";case "Silver":return "Silver";case "Gold":return "Gold";case "Platinum":return "Platinum";default:return "Unknown"}}getTierFromScore(e){return e>=v.PLATINUM_TIER_THRESHOLD?"Platinum":e>=v.GOLD_TIER_THRESHOLD?"Gold":e>=v.SILVER_TIER_THRESHOLD?"Silver":e>=v.BRONZE_TIER_THRESHOLD?"Bronze":"None"}getBadgeName(e){switch(e){case "FirstJob":return "First Job";case "TenJobs":return "10 Jobs";case "HundredJobs":return "100 Jobs";case "ThousandJobs":return "1000 Jobs";case "PerfectRating":return "Perfect Rating";case "QuickResponder":return "Quick Responder";case "DisputeResolver":return "Dispute Resolver";case "CategoryExpert":return "Category Expert";case "CrossCategoryMaster":return "Cross-Category Master";default:return "Unknown Badge"}}calculateApyBoost(e){return Math.floor(e/1e3)*50}getTierColor(e){switch(e){case "Platinum":return "#E5E4E2";case "Gold":return "#FFD700";case "Silver":return "#C0C0C0";case "Bronze":return "#CD7F32";default:return "#808080"}}createDefaultReputationData(e){return {agent:e,overallScore:5e3,totalJobsCompleted:0,totalJobsFailed:0,avgResponseTime:0,disputesAgainst:0,disputesResolved:0,lastUpdated:Math.floor(Date.now()/1e3),categoryReputations:[],badges:[],performanceHistory:[],factors:{completionWeight:25,qualityWeight:25,timelinessWeight:20,satisfactionWeight:20,disputeWeight:10}}}qualifiesForTier(e,t){switch(t){case "Platinum":return e>=v.PLATINUM_TIER_THRESHOLD;case "Gold":return e>=v.GOLD_TIER_THRESHOLD;case "Silver":return e>=v.SILVER_TIER_THRESHOLD;case "Bronze":return e>=v.BRONZE_TIER_THRESHOLD;default:return true}}pointsToNextTier(e){switch(this.getTierFromScore(e)){case "None":return {nextTier:"Bronze",pointsNeeded:v.BRONZE_TIER_THRESHOLD-e};case "Bronze":return {nextTier:"Silver",pointsNeeded:v.SILVER_TIER_THRESHOLD-e};case "Silver":return {nextTier:"Gold",pointsNeeded:v.GOLD_TIER_THRESHOLD-e};case "Gold":return {nextTier:"Platinum",pointsNeeded:v.PLATINUM_TIER_THRESHOLD-e};case "Platinum":return null;default:return null}}recordPayAIPayment(e,t){let o=this.payAIRecordToJobPerformance(e);return this.calculateReputationChange(t,o)}payAIRecordToJobPerformance(e){let t=this.estimateQualityFromResponseTime(e.responseTimeMs),o=this.estimateExpectedDuration(e.amount);return {completed:e.success,qualityRating:t,expectedDuration:o,actualDuration:Math.ceil(e.responseTimeMs/1e3),clientSatisfaction:e.success?t:20,hadDispute:false,disputeResolvedFavorably:false,category:this.categorizeFromNetwork(e.network),paymentAmount:Number(e.amount)/1e6}}estimateQualityFromResponseTime(e){return e<=500?100:e<=2e3?Math.round(90-(e-500)/1500*20):e<=1e4?Math.round(70-(e-2e3)/8e3*30):Math.max(20,Math.round(40-(e-1e4)/5e4*20))}estimateExpectedDuration(e){let t=Number(e)/1e6;return Math.max(2,Math.ceil(2+t*10))}categorizeFromNetwork(e){switch(e){case "solana":return "ai-services-solana";case "base":return "ai-services-base";case "ethereum":return "ai-services-ethereum";default:return "ai-services"}}createPayAIPerformanceSnapshot(e,t){return {timestamp:e.timestamp.getTime(),paymentId:e.paymentSignature,network:e.network,amount:e.amount.toString(),success:e.success,responseTimeMs:e.responseTimeMs,reputationChange:t.jobScore,newScore:t.overallScore,tier:t.tier}}async calculateTagsForAgent(e){return this.tagEngine.calculateTags(e)}getTagsByCategory(e,t){return this.tagEngine.filterTags(e,{category:t})}hasTag(e,t){return e.some(o=>o.tagName===t)}getTagConfidence(e,t){return e.find(r=>r.tagName===t)?.confidence}filterTags(e,t){return this.tagEngine.filterTags(e,t)}applyTagDecay(e,t){return this.tagEngine.applyTagDecay(e,t)}mergeTags(e,t){return this.tagEngine.mergeTags(e,t)}categorizeTags(e){return this.tagEngine.categorizeTags(e)}getTopTags(e,t){return this.tagEngine.getTopTags(e,t)}sortTagsByConfidence(e){return this.tagEngine.sortByConfidence(e)}sortTagsByEvidence(e){return this.tagEngine.sortByEvidence(e)}sortTagsByRecent(e){return this.tagEngine.sortByRecent(e)}getConfidenceLevel(e){return this.tagEngine.getConfidenceLevel(e)}validateTagName(e){return this.tagEngine.validateTagName(e)}validateConfidence(e){return this.tagEngine.validateConfidence(e)}convertMetricsForTagging(e){let t=e.responseTimeCount>0n?Number(e.totalResponseTime/e.responseTimeCount):0,o=e.successfulPayments+e.failedPayments,r=o>0n?Number(e.successfulPayments*10000n/o):0,c=e.totalRatingsCount>0?Math.floor(e.totalRating*100/(e.totalRatingsCount*5)):0,i=e.totalDisputes>0?Math.floor(e.disputesResolved*1e4/e.totalDisputes):1e4;return {successfulPayments:e.successfulPayments,failedPayments:e.failedPayments,totalResponseTime:e.totalResponseTime,responseTimeCount:e.responseTimeCount,totalDisputes:e.totalDisputes,disputesResolved:e.disputesResolved,totalRating:e.totalRating,totalRatingsCount:e.totalRatingsCount,createdAt:e.createdAt,updatedAt:e.updatedAt,avgResponseTime:t,successRate:r,avgRating:c,disputeResolutionRate:i}}};var Bu=class extends U{constructor(e){super(e);}async create(e,t){let o=t.network||"devnet",r=he(o,t.controller);Fu(r);let[c]=await Ou(this.programId,t.controller),i=async()=>this.buildCreateDidInstruction(c,t.controller,r,t.verificationMethods||[],t.serviceEndpoints||[]);return this.execute("createDidDocument",i,[e])}async update(e,t){let o=async()=>this.buildUpdateDidInstruction(t.didDocument,e.address,t.addVerificationMethod||null,t.removeVerificationMethodId||null,t.addServiceEndpoint||null,t.removeServiceEndpointId||null);return this.execute("updateDidDocument",o,[e])}async deactivate(e,t){let o=async()=>this.buildDeactivateDidInstruction(t.didDocument,e.address);return this.execute("deactivateDidDocument",o,[e])}async resolve(e){let t;if(typeof e=="string"&&e.startsWith("did:sol:")){let{identifier:r}=i0(e);t=address(r);}else t=typeof e=="string"?address(e):e;let[o]=await Ou(this.programId,t);return this.getAccount(o,"getDidDocumentDecoder")}async exportW3C(e,t=true){let o=await this.resolve(e);return o?d0(o,t):null}async getW3CDocument(e){let t=await this.resolve(e);return t?xf(t):null}async deriveDidPda(e){return Ou(this.programId,e)}generateDid(e,t="devnet"){return he(t,e)}validateDid(e){return Fu(e),true}async isActive(e){let t=await this.resolve(e);return t?a0(t):false}buildCreateDidInstruction(e,t,o,r,c){throw new Error("DID instructions are not yet generated. Please run: bun run generate:client after adding DID instructions to the program.")}buildUpdateDidInstruction(e,t,o,r,c,i){throw new Error("DID instructions are not yet generated. Please run: bun run generate:client after adding DID instructions to the program.")}buildDeactivateDidInstruction(e,t){throw new Error("DID instructions are not yet generated. Please run: bun run generate:client after adding DID instructions to the program.")}static createVerificationMethod=c0;static createServiceEndpoint=s0};function p0(n,e,t){if(t||e==="Public")return {exactScore:n,tier:pn(n),scoreRange:ln(n)};switch(e){case "TierOnly":return {tier:pn(n)};case "RangeOnly":return {scoreRange:ln(n)};case "Confidential":return {};case "Custom":return {tier:pn(n),scoreRange:ln(n)};default:return {}}}function pn(n){return n>=De.TIER_THRESHOLDS.PLATINUM?"Platinum":n>=De.TIER_THRESHOLDS.GOLD?"Gold":n>=De.TIER_THRESHOLDS.SILVER?"Silver":n>=De.TIER_THRESHOLDS.BRONZE?"Bronze":"None"}function ln(n){let e=De.SCORE_RANGES;return n>=e.VERY_HIGH.min?"VeryHigh":n>=e.HIGH.min?"High":n>=e.MEDIUM.min?"Medium":n>=e.LOW.min?"Low":"VeryLow"}function l0(n,e,t){return n===t?true:e.authorizedViewers.includes(n)}function m0(n,e,t){let o={agent:n.agent},r=c=>t||c==="Public";if(r(e.showScore)&&(o.exactScore=n.overallScore),r(e.showJobsCompleted)&&(o.totalJobsCompleted=n.totalJobsCompleted),r(e.showSuccessRate)){let c=n.totalJobsCompleted+n.totalJobsFailed;o.successRate=c>0?n.totalJobsCompleted/c*100:0;}return r(e.showResponseTime)&&(o.avgResponseTime=n.avgResponseTime),r(e.showDisputes)&&(o.disputes={total:n.disputesAgainst,resolved:n.disputesResolved}),r(e.showEarnings)&&n.totalEarnings!==void 0&&(o.totalEarnings=n.totalEarnings),r(e.showRatings)&&n.avgRating!==void 0&&(o.avgRating=n.avgRating),r(e.showBadges)&&n.badges!==void 0&&(o.badges=n.badges),o.hasFullAccess=t,o}function mn(n){switch(n){case "Public":return {showScore:"Public",showJobsCompleted:"Public",showSuccessRate:"Public",showResponseTime:"Public",showDisputes:"Public",showEarnings:"Public",showRatings:"Public",showBadges:"Public"};case "TierOnly":case "RangeOnly":return {showScore:"Private",showJobsCompleted:"Private",showSuccessRate:"Private",showResponseTime:"Private",showDisputes:"Private",showEarnings:"Private",showRatings:"Private",showBadges:"Public"};case "Confidential":return {showScore:"ZKProof",showJobsCompleted:"ZKProof",showSuccessRate:"ZKProof",showResponseTime:"ZKProof",showDisputes:"ZKProof",showEarnings:"ZKProof",showRatings:"ZKProof",showBadges:"ZKProof"};case "Custom":default:return {showScore:"Private",showJobsCompleted:"Public",showSuccessRate:"Public",showResponseTime:"Public",showDisputes:"Private",showEarnings:"Private",showRatings:"Public",showBadges:"Public"}}}function y0(n){let e=[];return n.authorizedViewers.length>De.MAX_AUTHORIZED_VIEWERS&&e.push(`Too many authorized viewers (max: ${De.MAX_AUTHORIZED_VIEWERS})`),n.mode==="Public"&&Object.values(n.metricVisibility).some(o=>o!=="Public")&&e.push("Public mode cannot have private metrics"),{valid:e.length===0,errors:e}}var Lu=class extends U{constructor(e){super(e);}async initializePrivacy(e,t){let o=t.mode??"Public";t.metricVisibility??mn(o);let c=async()=>({programAddress:this.programId,accounts:[],data:new Uint8Array([0])});return this.execute("initializePrivacy",c,[e])}async updatePrivacyMode(e,t){let o=async()=>({programAddress:this.programId,accounts:[],data:new Uint8Array([1])});return this.execute("updatePrivacyMode",o,[e])}async setMetricVisibility(e,t){let o=async()=>({programAddress:this.programId,accounts:[],data:new Uint8Array([2])});return this.execute("setMetricVisibility",o,[e])}async grantAccess(e,t){let o=async()=>({programAddress:this.programId,accounts:[],data:new Uint8Array([3])});return this.execute("grantAccess",o,[e])}async revokeAccess(e,t){let o=async()=>({programAddress:this.programId,accounts:[],data:new Uint8Array([4])});return this.execute("revokeAccess",o,[e])}async applyPreset(e,t){let{preset:o}=t;return await this.updatePrivacyMode(e,{agentAddress:t.agentAddress,mode:o.mode}),this.setMetricVisibility(e,{agentAddress:t.agentAddress,metricVisibility:o.metricVisibility})}async getPrivacySettings(e){return {agent:e,mode:"Public",metricVisibility:mn("Public"),authorizedViewers:[],autoGrantClients:false,updatedAt:Math.floor(Date.now()/1e3)}}async getVisibleReputation(e,t){let o=await this.getPrivacySettings(e);o||(o={agent:e,mode:"Public",metricVisibility:mn("Public"),authorizedViewers:[],autoGrantClients:false,updatedAt:Math.floor(Date.now()/1e3)});let r=l0(t,o,e),c={agent:e,overallScore:7500,totalJobsCompleted:100,totalJobsFailed:5,avgResponseTime:250,disputesAgainst:2,disputesResolved:2,totalEarnings:5e4,avgRating:4.5,badges:["FirstJob","TenJobs","QuickResponder"]},i=p0(c.overallScore,o.mode,r);return {...m0(c,o.metricVisibility,r),privacyMode:o.mode,...i,hasFullAccess:r}}validateSettings(e){return y0(e)}getAvailablePresets(){return sf}getDefaultVisibility(e){return mn(e)}getTier(e){return pn(e)}getRange(e){return ln(e)}async derivePrivacyPda(e){let{getProgramDerivedAddress:t,getAddressEncoder:o}=await import('@solana/addresses'),c=o().encode(e),[i]=await t({programAddress:this.programId,seeds:[new TextEncoder().encode("privacy_settings"),c]});return i}};var lye="GhostSpeak Reputation Authorization";function T0(n){let e=[];e.push(Buffer.from(lye,"utf8"));let t=Tt.decode(n.agentAddress);e.push(Buffer.from(t));let o=Tt.decode(n.authorizedSource);e.push(Buffer.from(o));let r=Buffer.allocUnsafe(8);r.writeBigUInt64BE(BigInt(n.indexLimit)),e.push(r);let c=Buffer.allocUnsafe(8);return c.writeBigUInt64BE(BigInt(n.expiresAt)),e.push(c),e.push(Buffer.from(n.network,"utf8")),n.nonce&&e.push(Buffer.from(n.nonce,"utf8")),Buffer.concat(e)}async function mye(n,e){let t=e.publicKey.toBase58();if(t!==n.agentAddress)throw new Error(`Keypair public key ${t} does not match agent address ${n.agentAddress}`);let o=T0(n);return (await import('tweetnacl')).sign.detached(o,e.secretKey)}async function f0(n){try{let e={agentAddress:n.agentAddress,authorizedSource:n.authorizedSource,indexLimit:n.indexLimit,expiresAt:n.expiresAt,network:n.network,nonce:n.nonce},t=T0(e),o=await import('tweetnacl'),r=Tt.decode(n.agentAddress);return o.sign.detached.verify(t,n.signature,r)}catch(e){return console.error("[Auth Signature] Verification failed:",e),false}}async function S0(n,e){let t=address(e.publicKey.toBase58()),o=Math.floor(Date.now()/1e3),r=n.expiresAt||o+(n.expiresIn||720*60*60),c=n.indexLimit||1e3,i=n.network||"devnet",d=n.nonce!==void 0?n.nonce:"default",s={agentAddress:t,authorizedSource:n.authorizedSource,indexLimit:c,expiresAt:r,network:i,nonce:d},p=await mye(s,e);return {agentAddress:t,authorizedSource:n.authorizedSource,indexLimit:c,expiresAt:r,network:i,signature:p,nonce:d,metadata:n.metadata}}function hf(n){return {agentAddress:n.agentAddress,authorizedSource:n.authorizedSource,indexLimit:n.indexLimit,expiresAt:n.expiresAt,network:n.network,signature:Tt.encode(n.signature),nonce:n.nonce,metadata:n.metadata}}function x0(n){return {agentAddress:n.agentAddress,authorizedSource:n.authorizedSource,indexLimit:n.indexLimit,expiresAt:n.expiresAt,network:n.network,signature:Tt.decode(n.signature),nonce:n.nonce,metadata:n.metadata}}async function D0(n){let e=hf(n),t=JSON.stringify(e),r=new TextEncoder().encode(t),i=await globalThis.crypto.subtle.digest("SHA-256",r),d=new Uint8Array(i);return Tt.encode(d)}function h0(n,e){return (e||Math.floor(Date.now()/1e3))>=n.expiresAt}function E0(n,e){return e>=n.indexLimit}var yye=2000000n,Vu=class extends U{constructor(e){super(e);}async createAuthorization(e,t){return await S0(e,t)}async storeAuthorizationOnChain(e,t,o){let r=this.calculateStorageFee(e,o),c=o?.feePayedByAgent??true;console.log(`\u{1F4B0} On-chain storage cost: ${Number(r)/1e9} SOL`),console.log(` Fee payer: ${c?"Agent":"Facilitator"}`);let{getCreateAgentAuthorizationInstructionAsync:i}=await Promise.resolve().then(()=>(Wm(),NM)),{getProgramDerivedAddress:d,getBytesEncoder:s,getAddressEncoder:p,getUtf8Encoder:E}=await import('@solana/kit'),b=e.nonce??"default",[x]=await d({programAddress:this.getProgramId(),seeds:[s().encode(new Uint8Array([97,103,101,110,116,95,97,117,116,104])),p().encode(e.agentAddress),p().encode(e.authorizedSource),E().encode(b)]});return await this.execute("createAgentAuthorization",async()=>await i({agent:e.agentAddress,authorization:x,authority:t,authorizedSource:e.authorizedSource,indexLimit:BigInt(e.indexLimit),expiresAt:BigInt(e.expiresAt),network:e.network==="mainnet-beta"?0:e.network==="devnet"?1:2,signature:e.signature,nonce:b}),[t])}async verifySignature(e){return f0(e)}getAuthorizationStatus(e,t){let o=Math.floor(Date.now()/1e3),r=t??0;return h0(e,o)?{status:"expired",isValid:false,remainingUses:0,reason:"Authorization has expired"}:E0(e,r)?{status:"exhausted",isValid:false,remainingUses:0,reason:"Index limit reached"}:{status:"active",isValid:true,remainingUses:e.indexLimit-r}}async fetchAuthorization(e,t,o){throw new Error("On-chain fetch not yet implemented - pending Codama generation")}async updateReputationWithAuth(e,t,o,r,c,i){if(!await this.verifySignature(e))throw new Error("Invalid authorization signature");let s=this.getAuthorizationStatus(e);if(!s.isValid)throw new Error(`Authorization is ${s.status}: ${s.reason}`);let{getUpdateReputationWithAuthInstructionAsync:p}=await Promise.resolve().then(()=>(KT(),OU));return await this.execute("updateReputationWithAuth",async()=>await p({agent:e.agentAddress,authorizedSource:i,usageRecord:r,reputationChange:BigInt(t),transactionSignature:o,metadata:c?JSON.stringify(c):null,nonce:e.nonce??null}),[i])}async revokeAuthorization(e,t,o,r){let{getRevokeAuthorizationInstruction:c}=await Promise.resolve().then(()=>(ky(),_w));return await this.execute("revokeAuthorization",()=>c({agent:e,authorization:t,authority:r,nonce:o??null}),[r])}async listAuthorizations(e){throw new Error("Authorization listing not yet implemented - pending Codama generation")}serializeAuthorization(e){return hf(e)}deserializeAuthorization(e){return x0(e)}async getAuthorizationId(e){return D0(e)}async createPayAIAuthorization(e,t,o){let r={authorizedSource:e,indexLimit:1e3,expiresIn:2592e3,network:"devnet",...o};return this.createAuthorization(r,t)}calculateStorageFee(e,t){if(t?.storageFee!==void 0)return t.storageFee;if(t?.customFees){let o=Math.floor(Date.now()/1e3),r=e.expiresAt-o,c=Object.keys(t.customFees).map(Number).sort((d,s)=>d-s);for(let d of c)if(r<=d)return t.customFees[d];let i=c[c.length-1];if(i&&t.customFees[i])return t.customFees[i]}return yye}async estimateStorageCost(e,t){let o=Math.floor(Date.now()/1e3),r={agentAddress:"11111111111111111111111111111111",authorizedSource:e.authorizedSource,indexLimit:e.indexLimit??1e3,expiresAt:e.expiresAt??o+(e.expiresIn??720*60*60),network:e.network??"devnet",signature:new Uint8Array(64),nonce:e.nonce},c=this.calculateStorageFee(r,t);return Number(c)/1e9}};te();var Ku=class extends U{async initializeStakingConfig(e){let t=await Z1({authority:e.authority,minStake:e.minStake,treasury:e.treasury},{programAddress:this.programId});return this.execute("initializeStakingConfig",()=>t,[e.authority])}async stake(e){let t=await By({ownerTokenAccount:e.agentTokenAccount,stakingVault:e.stakingVault,stakingConfig:e.stakingConfig,ghostMint:e.ghostMint,owner:e.agentOwner,amount:e.amount,lockDuration:e.lockDuration},{programAddress:this.programId});return this.execute("stakeGhost",()=>t,[e.agentOwner])}async unstake(e){let t=await Xy({stakingAccount:e.stakingAccount,stakingVault:e.stakingVault,ownerTokenAccount:e.agentTokenAccount,owner:e.agentOwner},{programAddress:this.programId});return this.execute("unstakeGhost",()=>t,[e.agentOwner])}async getStakingAccount(e){try{return await this.getAccount(e,"getStakingAccountDecoder")}catch(t){return console.error("Error fetching staking account:",t),null}}async getStakingConfig(e){try{return await this.getAccount(e,"getStakingConfigDecoder")}catch(t){return console.error("Error fetching staking config:",t),null}}};Qg();var Pf=class{config;constructor(e){this.config={programId:u,commitment:"confirmed",cluster:"devnet",rpcEndpoint:e?.rpcEndpoint??this.getDefaultRpcEndpoint(e?.cluster??"devnet"),...e,rpc:e?.rpc??{}};}get agents(){return new on(this.config)}get ghosts(){return new _u(this.config)}get governanceModule(){return new an(this.config)}get multisigModule(){return new dn(this.config)}agent(){return new Cf(this.config)}reputation(){return new Nu(this.config)}tagEngine(){let{ReputationTagEngine:e}=(Df(),Ff(g0));return new e}reputationAggregator(){let{MultiSourceAggregator:e}=(C0(),Ff(P0));return new e}privacy(){return new Lu(this.config)}governance(){return new bf(this.config)}multisig(){return new vf(this.config)}credentials(){return new Gu({programId:this.config.programId,crossmint:this.config.credentials?.crossmintApiKey?{apiKey:this.config.credentials.crossmintApiKey,environment:this.config.credentials.crossmintEnvironment,chain:this.config.credentials.crossmintChain}:void 0,crossmintTemplates:this.config.credentials?.templates})}did(){return new Bu(this.config)}get authorization(){return new Vu(this.config)}get staking(){return new Ku(this.config)}enableDevMode(){return console.log("\u{1F6E0}\uFE0F Development mode enabled"),console.log(" - Transaction simulation before sending"),console.log(" - Cost estimates for all operations"),console.log(" - Enhanced error messages"),this.config={...this.config},this}useNetwork(e){return this.config.cluster=e,this.config.rpcEndpoint=this.getDefaultRpcEndpoint(e),this}useRpc(e,t){return this.config.rpcEndpoint=e,this.config.wsEndpoint=t,this}getDefaultRpcEndpoint(e){switch(e){case "mainnet-beta":return "https://api.mainnet-beta.solana.com";case "devnet":return "https://api.devnet.solana.com";case "testnet":return "https://api.testnet.solana.com";case "localnet":return "http://localhost:8899";default:return "https://api.devnet.solana.com"}}},Cf=class{module;params={};constructor(e){this.module=new on(e);}create(e){return this.params={...this.params,agentType:0,metadataUri:JSON.stringify(e),agentId:e.name.toLowerCase().replace(/\s+/g,"-"),name:e.name,description:e.description||""},this}withDescription(e){return this.params.description=e,this}withType(e){return this.params.agentType=e,this}withIPFS(){return this.params.forceIPFS=true,this}compressed(){return this.params.compressed=true,this}debug(){return this.module.debug(),this}withSigner(e){return this.params.signer=e,this}validateParams(){if(!this.params.signer)throw new Error("Agent builder requires a signer. Call with signer first.");if(!this.params.metadataUri)throw new Error("Agent builder requires metadata. Call create() first.");if(!this.params.agentId)throw new Error("Agent builder requires agent ID. Call create() first.");this.params.agentType??=0;}async getCost(){return this.validateParams(),this.module.getCost("registerAgent",()=>({programAddress:this.module.getProgramId(),accounts:[],data:new Uint8Array}))}async simulate(){let e=()=>({programAddress:this.module.getProgramId(),accounts:[],data:new Uint8Array});return this.validateParams(),this.module.simulateInstruction("registerAgent",e,[this.params.signer])}async explain(){return this.validateParams(),this.module.explain("registerAgent",()=>({programAddress:this.module.getProgramId(),accounts:[],data:new Uint8Array}))}async execute(){this.validateParams(),this.params.compressed&&console.log("Creating compressed agent (5000x cheaper)...");let e=await this.module.register(this.params.signer,{agentType:this.params.agentType,name:this.params.name,description:this.params.description,metadataUri:this.params.metadataUri,agentId:this.params.agentId});return {address:await this.deriveAgentAddress(this.params.agentId,this.params.signer),signature:e}}async deriveAgentAddress(e,t){let{deriveAgentPda:o}=await Promise.resolve().then(()=>(ku(),Mu)),[r]=await o({programAddress:this.module.getProgramId(),owner:t.address,agentId:e});return r}},bf=class{module;params={};constructor(e){this.module=new an(e);}proposal(){return new Rf(this.module,this.params)}query(){return new If(this.module)}debug(){return this.module.debug(),this}withSigner(e){return this.params.signer=e,this}},Rf=class{constructor(e,t){this.module=e;this.builderParams=t;this.params.signer=t.signer;}params={};create(e){return this.params.title=e.title,this.params.description=e.description,this}type(e){return this.params.proposalType=e,this}votingDuration(e){return this.params.votingDuration=e,this}executionDelay(e){return this.params.executionDelay=e,this}validateParams(){if(!this.params.signer)throw new Error("Signer required");if(!this.params.title)throw new Error("Title required");if(!this.params.description)throw new Error("Description required");if(!this.params.proposalType)throw new Error("Proposal type required");if(!this.params.votingDuration)throw new Error("Voting duration required")}async execute(){this.validateParams();let e=await this.module.createProposal({signer:this.params.signer,title:this.params.title,description:this.params.description,proposalType:this.params.proposalType,votingDuration:this.params.votingDuration,executionDelay:this.params.executionDelay});return {address:`proposal_${this.params.signer.address}_${this.params.title}`,signature:e}}withSigner(e){return this.params.signer=e,this}},If=class{constructor(e){this.module=e;}async activeProposals(){return this.module.getActiveProposals()}async proposalsByProposer(e){return this.module.getProposalsByProposer(e)}async proposalsByStatus(e){return this.module.getProposalsByStatus(e)}},vf=class{module;params={};constructor(e){this.module=new dn(e);}create(){return new Mf(this.module,this.params)}proposal(){return new kf(this.module,this.params)}approve(){return new wf(this.module,this.params)}executeProposal(){return new Uf(this.module,this.params)}withSigner(e){return this.params.signer=e,this}debug(){return this.module.debug(),this}},Mf=class{constructor(e,t){this.module=e;this.builderParams=t;this.params.signer=t.signer;}params={};withId(e){return this.params.multisigId=e,this}threshold(e){return this.params.threshold=e,this}signers(e){return this.params.signers=e,this}async execute(){if(!this.params.signer)throw new Error("Signer required");if(!this.params.multisigId)throw new Error("Multisig ID required");if(!this.params.threshold)throw new Error("Threshold required");if(!this.params.signers)throw new Error("Signers required");return {signature:await this.module.createMultisig({owner:this.params.signer,multisigId:this.params.multisigId,threshold:this.params.threshold,signers:this.params.signers})}}withSigner(e){return this.params.signer=e,this}},kf=class{constructor(e,t){this.module=e;this.builderParams=t;this.params.signer=t.signer;}params={};forMultisig(e){return this.params.multisigAddress=e,this}title(e){return this.params.title=e,this}description(e){return this.params.description=e,this}async execute(){if(!this.params.signer)throw new Error("Signer required");if(!this.params.title)throw new Error("Title required");if(!this.params.description)throw new Error("Description required");return {signature:await this.module.createProposal({multisigAddress:this.params.multisigAddress,title:this.params.title,description:this.params.description,proposalType:7,executionParams:{instructions:[],executionDelay:0n,executionConditions:[],cancellable:true,autoExecute:true,executionAuthority:this.params.signer.address},proposalId:BigInt(Date.now()),proposer:this.params.signer})}}withSigner(e){return this.params.signer=e,this}},wf=class{constructor(e,t){this.module=e;this.builderParams=t;this.params.signer=t.signer;}params={};proposal(e){return this.params.proposalAddress=e,this}vote(e){return this.params.voteChoice=e,this}reason(e){return this.params.reasoning=e,this}tokenAccount(e){return this.params.tokenAccount=e,this}async execute(){throw this.params.signer?this.params.proposalAddress?new Error("Multisig approval: Use protocol_config instructions for voting (approveProposal removed)"):new Error("Proposal address required"):new Error("Signer required")}withSigner(e){return this.params.signer=e,this}},Uf=class{constructor(e,t){this.module=e;this.builderParams=t;this.params.signer=t.signer;}params={};proposal(e){return this.params.proposalAddress=e,this}target(e){return this.params.targetProgram=e,this}async execute(){if(!this.params.signer)throw new Error("Signer required");if(!this.params.proposalAddress)throw new Error("Proposal address required");if(!this.params.targetProgram)throw new Error("Target program required");return {signature:await this.module.executeProposal({proposalAddress:this.params.proposalAddress,executor:this.params.signer,targetProgram:this.params.targetProgram})}}withSigner(e){return this.params.signer=e,this}};function Tye(n){return BigInt(Math.round(n*1e9))}var ft=class extends Error{code;context;solution;instruction;constructor(e,t,o={},r,c){super(t),this.name="GhostSpeakError",this.code=e,this.context=o,this.solution=r,this.instruction=c;}toString(){let e=`${this.name} [${this.code}]: ${this.message}`;return Object.keys(this.context).length>0&&(e+=`
|
|
5
5
|
Context: ${JSON.stringify(this.context,null,2)}`),this.solution&&(e+=`
|
|
6
6
|
|
|
7
7
|
\u{1F4A1} Solution: ${this.solution}`),this.instruction&&(e+=`
|
|
8
8
|
|
|
9
|
-
\u{1F4D6} Learn more: ${this.instruction}`),e}toSDKError(){return {code:this.code,message:this.message,context:this.context,solution:this.solution,instruction:this.instruction}}},
|
|
9
|
+
\u{1F4D6} Learn more: ${this.instruction}`),e}toSDKError(){return {code:this.code,message:this.message,context:this.context,solution:this.solution,instruction:this.instruction}}},_f=class extends ft{constructor(e,t){super("NETWORK_ERROR",`Failed to connect to RPC endpoint: ${e}`,{endpoint:e,originalError:t?.message},"Check your internet connection and verify the RPC endpoint is correct. Try using a different RPC provider.");}},zf=class extends ft{constructor(e,t,o){let r=Number(e)/1e9,c=Number(t)/1e9,i=r-c;super("INSUFFICIENT_BALANCE",`Insufficient balance: need ${r} SOL but only have ${c} SOL`,{required:e.toString(),available:t.toString(),address:o,requiredSOL:r,availableSOL:c,neededSOL:i},`You need ${i.toFixed(4)} more SOL. Try:
|
|
10
10
|
1. Request devnet SOL: solana airdrop ${Math.ceil(i)} ${o}
|
|
11
|
-
2. Or use: await ghostspeak.fund("${o}", ${Math.ceil(i)})`);}};var
|
|
11
|
+
2. Or use: await ghostspeak.fund("${o}", ${Math.ceil(i)})`);}};var Of=class extends ft{constructor(e,t={}){super("INVALID_INPUT",e,t,"Check input parameters and ensure they meet the required format and constraints"),this.name="ValidationError";}};export{ft as GhostSpeakError,zf as InsufficientBalanceError,_f as NetworkError,Of as ValidationError,Pf as default,Tye as sol};//# sourceMappingURL=core-minimal.js.map
|
|
12
12
|
//# sourceMappingURL=core-minimal.js.map
|