@ghostspeak/sdk 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/LICENSE +21 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/GhostSpeakClient-CyeZ6Tyb.d.ts +2061 -0
  4. package/dist/client.d.ts +4 -3
  5. package/dist/crypto.d.ts +2 -2
  6. package/dist/{feature-flags-CEaxXgQQ.d.ts → feature-flags-3POmoO_Z.d.ts} +833 -1190
  7. package/dist/index.d.ts +206 -4543
  8. package/dist/ipfs-types-KJcvy9Qk.d.ts +553 -0
  9. package/dist/minimal/core-minimal.d.ts +2037 -82
  10. package/dist/utils.d.ts +4 -4
  11. package/package.json +5 -29
  12. package/dist/EscrowInstructions-4P3H6ETO.js +0 -2
  13. package/dist/EscrowInstructions-4P3H6ETO.js.map +0 -1
  14. package/dist/GhostSpeakClient-4SROinEf.d.ts +0 -503
  15. package/dist/accounts-IUZMPYVE.js +0 -2
  16. package/dist/accounts-IUZMPYVE.js.map +0 -1
  17. package/dist/agent-GZ2OES75.js +0 -2
  18. package/dist/agent-GZ2OES75.js.map +0 -1
  19. package/dist/auctionMarketplace-W4YM7HKU.js +0 -2
  20. package/dist/auctionMarketplace-W4YM7HKU.js.map +0 -1
  21. package/dist/chunk-2KOOI5BX.js +0 -2
  22. package/dist/chunk-2KOOI5BX.js.map +0 -1
  23. package/dist/chunk-32GWTXRJ.js +0 -3
  24. package/dist/chunk-32GWTXRJ.js.map +0 -1
  25. package/dist/chunk-B4WUFVLE.js +0 -2
  26. package/dist/chunk-B4WUFVLE.js.map +0 -1
  27. package/dist/chunk-C2OTQ5YS.js +0 -2
  28. package/dist/chunk-C2OTQ5YS.js.map +0 -1
  29. package/dist/chunk-CTC4ZJ26.js +0 -5
  30. package/dist/chunk-CTC4ZJ26.js.map +0 -1
  31. package/dist/chunk-DF7LLAMH.js +0 -2
  32. package/dist/chunk-DF7LLAMH.js.map +0 -1
  33. package/dist/chunk-DJ356OUX.js +0 -2
  34. package/dist/chunk-DJ356OUX.js.map +0 -1
  35. package/dist/chunk-DK5YDBXR.js +0 -2
  36. package/dist/chunk-DK5YDBXR.js.map +0 -1
  37. package/dist/chunk-DOTF5ECA.js +0 -4
  38. package/dist/chunk-DOTF5ECA.js.map +0 -1
  39. package/dist/chunk-FKEUXXZS.js +0 -30
  40. package/dist/chunk-FKEUXXZS.js.map +0 -1
  41. package/dist/chunk-GSHXEKBW.js +0 -2
  42. package/dist/chunk-GSHXEKBW.js.map +0 -1
  43. package/dist/chunk-IZDAEOLH.js +0 -2
  44. package/dist/chunk-IZDAEOLH.js.map +0 -1
  45. package/dist/chunk-JY554RGE.js +0 -3
  46. package/dist/chunk-JY554RGE.js.map +0 -1
  47. package/dist/chunk-KK3HV2RD.js +0 -3
  48. package/dist/chunk-KK3HV2RD.js.map +0 -1
  49. package/dist/chunk-PPOCDM6G.js +0 -2
  50. package/dist/chunk-PPOCDM6G.js.map +0 -1
  51. package/dist/chunk-PUI35LBF.js +0 -2
  52. package/dist/chunk-PUI35LBF.js.map +0 -1
  53. package/dist/chunk-Q34J6YDA.js +0 -11
  54. package/dist/chunk-Q34J6YDA.js.map +0 -1
  55. package/dist/chunk-QATBFZMM.js +0 -3
  56. package/dist/chunk-QATBFZMM.js.map +0 -1
  57. package/dist/chunk-QTKN3VZV.js +0 -2
  58. package/dist/chunk-QTKN3VZV.js.map +0 -1
  59. package/dist/chunk-RFBYMTTN.js +0 -2
  60. package/dist/chunk-RFBYMTTN.js.map +0 -1
  61. package/dist/chunk-RJJPOLCK.js +0 -22
  62. package/dist/chunk-RJJPOLCK.js.map +0 -1
  63. package/dist/chunk-RTWJTEND.js +0 -2
  64. package/dist/chunk-RTWJTEND.js.map +0 -1
  65. package/dist/chunk-SR3ZJCME.js +0 -2
  66. package/dist/chunk-SR3ZJCME.js.map +0 -1
  67. package/dist/chunk-TAWXH7KX.js +0 -2
  68. package/dist/chunk-TAWXH7KX.js.map +0 -1
  69. package/dist/client.js +0 -2
  70. package/dist/client.js.map +0 -1
  71. package/dist/confidential-transfer-manager-CGS3T5DG.js +0 -2
  72. package/dist/confidential-transfer-manager-CGS3T5DG.js.map +0 -1
  73. package/dist/crypto.js +0 -2
  74. package/dist/crypto.js.map +0 -1
  75. package/dist/elgamal-3ABOJSHC.js +0 -2
  76. package/dist/elgamal-3ABOJSHC.js.map +0 -1
  77. package/dist/enhanced-client-errors-W22U3LNH.js +0 -2
  78. package/dist/enhanced-client-errors-W22U3LNH.js.map +0 -1
  79. package/dist/errors.js +0 -2
  80. package/dist/errors.js.map +0 -1
  81. package/dist/generated-U3L4KUE4.js +0 -2
  82. package/dist/generated-U3L4KUE4.js.map +0 -1
  83. package/dist/ghostspeak_wasm-3KPNJTSS.js +0 -2
  84. package/dist/ghostspeak_wasm-3KPNJTSS.js.map +0 -1
  85. package/dist/index.js +0 -97
  86. package/dist/index.js.map +0 -1
  87. package/dist/ipfs-types-BlxtJ3q2.d.ts +0 -194
  88. package/dist/metafile-esm.json +0 -1
  89. package/dist/minimal/core-minimal.js +0 -12
  90. package/dist/minimal/core-minimal.js.map +0 -1
  91. package/dist/pda-2GUWRQ5G.js +0 -2
  92. package/dist/pda-2GUWRQ5G.js.map +0 -1
  93. package/dist/registerAgentCompressed-L6ACXD2Z.js +0 -2
  94. package/dist/registerAgentCompressed-L6ACXD2Z.js.map +0 -1
  95. package/dist/token-2022-rpc-SRHRFN5Y.js +0 -2
  96. package/dist/token-2022-rpc-SRHRFN5Y.js.map +0 -1
  97. package/dist/types.js +0 -2
  98. package/dist/types.js.map +0 -1
  99. package/dist/utils.js +0 -2
  100. package/dist/utils.js.map +0 -1
  101. package/dist/zk-proof-builder-GXZ42QZA.js +0 -2
  102. package/dist/zk-proof-builder-GXZ42QZA.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import {w}from'./chunk-FKEUXXZS.js';import {a,g,h,f}from'./chunk-TAWXH7KX.js';import {L,M,no as no$1,oo,Qd,do as _do,Rd as Rd$1,eo as eo$1,Rc as Rc$1,Sc as Sc$1,Ne as Ne$1,Oe,Hc,Ic,vg as vg$1,wg,Oh,Ph,Jl,Kl,kb as kb$1,De as De$1,lb,Ee,be,ce as ce$1,w as w$1,x,ub as ub$1,vb,lc,mc as mc$1,fd,gd,yk as yk$1,zk,Sk as Sk$1,Tk as Tk$1,Pl,Ql,Pk,Qk as Qk$1,rb,sb,t,u,Zj,Uf,_j,Vf,sl,tl,_f,$f,Fh as Fh$1,sh as sh$1,Gh as Gh$1,th,Of,Pf,he as he$1,ie}from'./chunk-B4WUFVLE.js';import {isProgramError,fixEncoderSize,getBytesEncoder,transformEncoder,getStructEncoder,getStructDecoder,fixDecoderSize,getBytesDecoder,combineCodec,getProgramDerivedAddress,getAddressEncoder,addEncoderSizePrefix,getUtf8Encoder,getU32Encoder,addDecoderSizePrefix,getUtf8Decoder,getU32Decoder,getAddressDecoder,getU64Encoder,getI64Encoder,getArrayEncoder,getU64Decoder,getI64Decoder,getArrayDecoder,getOptionEncoder,getOptionDecoder,getF64Encoder,getF64Decoder,getBooleanEncoder,getBooleanDecoder,getU8Encoder,getU8Decoder,getI16Encoder,getI16Decoder,getU16Encoder,getU16Decoder,getI32Encoder,getI32Decoder}from'@solana/kit';var fg=6e3,kg=6001,Og=6002,vg=6003,hg=6004,bg=6005,Ug=6006,Gg=6007,Ng=6008,Kg=6009,Br;process.env.NODE_ENV!=="production"&&(Br={[kg]:"Default (null) public key cannot be used as admin",[fg]:"System program cannot be used as admin",[vg]:"Test address cannot be used on mainnet",[Og]:"Unauthorized admin - key does not match protocol admin",[hg]:"Admin validation failed",[bg]:"Insufficient Accounts",[Ug]:"Invalid Instruction Data",[Gg]:"Missing Required Account",[Ng]:"Invalid Account",[Kg]:"Instruction Parsing Failed"});function jf(t){return process.env.NODE_ENV!=="production"?Br[t]:"Error message not available in production bundles."}function Xf(t,o,n){return isProgramError(t,o,a,n)}var Jr=new Uint8Array([191,161,93,207,225,58,71,16]);function rk(){return fixEncoderSize(getBytesEncoder(),8).encode(Jr)}function rt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),t=>({...t,discriminator:Jr}))}function Qr(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function ok(){return combineCodec(rt(),Qr())}async function ck(t,o){let n=o?.programAddress??a,e={jobContract:{value:t.jobContract??null,isWritable:true},jobPosting:{value:t.jobPosting??null,isWritable:true},jobApplication:{value:t.jobApplication??null,isWritable:true},employer:{value:t.employer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}};e.jobContract.value||(e.jobContract.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([106,111,98,95,99,111,110,116,114,97,99,116])),getAddressEncoder().encode(g(e.jobPosting.value)),getAddressEncoder().encode(g(e.jobApplication.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let c=h(n,"programId");return {accounts:[c(e.jobContract),c(e.jobPosting),c(e.jobApplication),c(e.employer),c(e.systemProgram)],programAddress:n,data:rt().encode({})}}function sk(t,o){let n=o?.programAddress??a,e={jobContract:{value:t.jobContract??null,isWritable:true},jobPosting:{value:t.jobPosting??null,isWritable:true},jobApplication:{value:t.jobApplication??null,isWritable:true},employer:{value:t.employer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let c=h(n,"programId");return {accounts:[c(e.jobContract),c(e.jobPosting),c(e.jobApplication),c(e.employer),c(e.systemProgram)],programAddress:n,data:rt().encode({})}}function ak(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{jobContract:n(),jobPosting:n(),jobApplication:n(),employer:n(),systemProgram:n()},data:Qr().decode(t.data)}}var Yr=new Uint8Array([252,139,87,21,195,152,29,217]);function gk(){return fixEncoderSize(getBytesEncoder(),8).encode(Yr)}function ct(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:Yr}))}function $r(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Tk(){return combineCodec(ct(),$r())}async function lk(t,o){let n=o?.programAddress??a,e={agentAccount:{value:t.agentAccount??null,isWritable:true},signer:{value:t.signer??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.agentAccount.value||(e.agentAccount.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.signer.value)),addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()).encode(f(c.agentId))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentAccount),r(e.signer),r(e.clock)],programAddress:n,data:ct().encode(c)}}function yk(t,o){let n=o?.programAddress??a,e={agentAccount:{value:t.agentAccount??null,isWritable:true},signer:{value:t.signer??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentAccount),r(e.signer),r(e.clock)],programAddress:n,data:ct().encode(c)}}function mk(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{agentAccount:n(),signer:n(),clock:n()},data:$r().decode(t.data)}}var eo=new Uint8Array([82,29,134,149,255,74,248,210]);function Sk(){return fixEncoderSize(getBytesEncoder(),8).encode(eo)}function at(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["reaction",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:eo}))}function no(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["reaction",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Ik(){return combineCodec(at(),no())}async function xk(t,o){let n=o?.programAddress??a,e={channel:{value:t.channel??null,isWritable:true},message:{value:t.message??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},user:{value:t.user??null,isWritable:false}},c={...t};e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]}));let r=h(n,"programId");return {accounts:[r(e.channel),r(e.message),r(e.reentrancyGuard),r(e.user)],programAddress:n,data:at().encode(c)}}function Ck(t,o){let n=o?.programAddress??a,e={channel:{value:t.channel??null,isWritable:true},message:{value:t.message??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},user:{value:t.user??null,isWritable:false}},c={...t},r=h(n,"programId");return {accounts:[r(e.channel),r(e.message),r(e.reentrancyGuard),r(e.user)],programAddress:n,data:at().encode(c)}}function Dk(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{channel:n(),message:n(),reentrancyGuard:n(),user:n()},data:no().decode(t.data)}}var co=new Uint8Array([9,96,62,59,180,205,102,11]);function Ok(){return fixEncoderSize(getBytesEncoder(),8).encode(co)}function so(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agent",getAddressEncoder()]]),t=>({...t,discriminator:co}))}function ao(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agent",getAddressDecoder()]])}function vk(){return combineCodec(so(),ao())}function hk(t,o){let n=o?.programAddress??a,e={marketAnalytics:{value:t.marketAnalytics??null,isWritable:true},authority:{value:t.authority??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.marketAnalytics),r(e.authority),r(e.clock)],programAddress:n,data:so().encode(c)}}function bk(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{marketAnalytics:n(),authority:n(),clock:n()},data:ao().decode(t.data)}}var po=new Uint8Array([0,252,167,244,145,90,227,29]);function Wk(){return fixEncoderSize(getBytesEncoder(),8).encode(po)}function dt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["coverLetter",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["proposedPrice",getU64Encoder()],["estimatedDuration",getU32Encoder()],["proposedRate",getU64Encoder()],["estimatedDelivery",getI64Encoder()],["portfolioItems",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),t=>({...t,discriminator:po}))}function Ro(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["coverLetter",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["proposedPrice",getU64Decoder()],["estimatedDuration",getU32Decoder()],["proposedRate",getU64Decoder()],["estimatedDelivery",getI64Decoder()],["portfolioItems",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function Lk(){return combineCodec(dt(),Ro())}async function wk(t,o){let n=o?.programAddress??a,e={jobApplication:{value:t.jobApplication??null,isWritable:true},jobPosting:{value:t.jobPosting??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},agentOwner:{value:t.agentOwner??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.jobApplication.value||(e.jobApplication.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([106,111,98,95,97,112,112,108,105,99,97,116,105,111,110])),getAddressEncoder().encode(g(e.jobPosting.value)),getAddressEncoder().encode(g(e.agent.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.jobApplication),r(e.jobPosting),r(e.agent),r(e.agentOwner),r(e.systemProgram)],programAddress:n,data:dt().encode(c)}}function Hk(t,o){let n=o?.programAddress??a,e={jobApplication:{value:t.jobApplication??null,isWritable:true},jobPosting:{value:t.jobPosting??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},agentOwner:{value:t.agentOwner??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.jobApplication),r(e.jobPosting),r(e.agent),r(e.agentOwner),r(e.systemProgram)],programAddress:n,data:dt().encode(c)}}function Fk(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{jobApplication:n(),jobPosting:n(),agent:n(),agentOwner:n(),systemProgram:n()},data:Ro().decode(t.data)}}var So=new Uint8Array([202,138,100,241,89,154,3,53]);function Qk(){return fixEncoderSize(getBytesEncoder(),8).encode(So)}function Io(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),t=>({...t,discriminator:So}))}function xo(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function qk(){return combineCodec(Io(),xo())}function jk(t,o){let n=o?.programAddress??a,e={extension:{value:t.extension??null,isWritable:true},authority:{value:t.authority??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let c=h(n,"programId");return {accounts:[c(e.extension),c(e.authority),c(e.clock)],programAddress:n,data:Io().encode({})}}function Xk(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{extension:n(),authority:n(),clock:n()},data:xo().decode(t.data)}}var Do=new Uint8Array([227,183,153,251,4,55,13,56]);function eO(){return fixEncoderSize(getBytesEncoder(),8).encode(Do)}function Tt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["arbitrator",getAddressEncoder()]]),t=>({...t,discriminator:Do}))}function _o(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["arbitrator",getAddressDecoder()]])}function nO(){return combineCodec(Tt(),_o())}async function rO(t,o){let n=o?.programAddress??a,e={dispute:{value:t.dispute??null,isWritable:true},arbitratorRegistry:{value:t.arbitratorRegistry??null,isWritable:false},authority:{value:t.authority??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.arbitratorRegistry.value||(e.arbitratorRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,114,98,105,116,114,97,116,111,114,95,114,101,103,105,115,116,114,121]))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dispute),r(e.arbitratorRegistry),r(e.authority),r(e.clock)],programAddress:n,data:Tt().encode(c)}}function oO(t,o){let n=o?.programAddress??a,e={dispute:{value:t.dispute??null,isWritable:true},arbitratorRegistry:{value:t.arbitratorRegistry??null,isWritable:false},authority:{value:t.authority??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dispute),r(e.arbitratorRegistry),r(e.authority),r(e.clock)],programAddress:n,data:Tt().encode(c)}}function cO(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{dispute:n(),arbitratorRegistry:n(),authority:n(),clock:n()},data:_o().decode(t.data)}}var ko=new Uint8Array([224,241,221,158,57,55,110,180]);function dO(){return fixEncoderSize(getBytesEncoder(),8).encode(ko)}function Oo(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["customizations",getArrayEncoder(L())],["royaltyPercentage",getU32Encoder()]]),t=>({...t,discriminator:ko}))}function vo(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["customizations",getArrayDecoder(M())],["royaltyPercentage",getU32Decoder()]])}function gO(){return combineCodec(Oo(),vo())}function TO(t,o){let n=o?.programAddress??a,e={replicationTemplate:{value:t.replicationTemplate??null,isWritable:true},buyer:{value:t.buyer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.tokenProgram.value||(e.tokenProgram.value="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");let r=h(n,"programId");return {accounts:[r(e.replicationTemplate),r(e.buyer),r(e.systemProgram),r(e.tokenProgram)],programAddress:n,data:Oo().encode(c)}}function lO(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{replicationTemplate:n(),buyer:n(),systemProgram:n(),tokenProgram:n()},data:vo().decode(t.data)}}var bo=new Uint8Array([156,203,54,179,38,72,33,21]);function PO(){return fixEncoderSize(getBytesEncoder(),8).encode(bo)}function yt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["cancellationReason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:bo}))}function Uo(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["cancellationReason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function EO(){return combineCodec(yt(),Uo())}async function SO(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},clientRefundAccount:{value:t.clientRefundAccount??null,isWritable:true},paymentToken:{value:t.paymentToken??null,isWritable:false},authority:{value:t.authority??null,isWritable:true},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.escrow),r(e.reentrancyGuard),r(e.escrowTokenAccount),r(e.clientRefundAccount),r(e.paymentToken),r(e.authority),r(e.tokenProgram)],programAddress:n,data:yt().encode(c)}}function IO(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},clientRefundAccount:{value:t.clientRefundAccount??null,isWritable:true},paymentToken:{value:t.paymentToken??null,isWritable:false},authority:{value:t.authority??null,isWritable:true},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.escrow),r(e.reentrancyGuard),r(e.escrowTokenAccount),r(e.clientRefundAccount),r(e.paymentToken),r(e.authority),r(e.tokenProgram)],programAddress:n,data:yt().encode(c)}}function xO(t){if(t.accounts.length<7)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{escrow:n(),reentrancyGuard:n(),escrowTokenAccount:n(),clientRefundAccount:n(),paymentToken:n(),authority:n(),tokenProgram:n()},data:Uo().decode(t.data)}}var Ko=new Uint8Array([20,212,15,189,69,180,69,151]);function kO(){return fixEncoderSize(getBytesEncoder(),8).encode(Ko)}function Wo(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["voteChoice",no$1()],["reasoning",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),t=>({...t,discriminator:Ko}))}function Lo(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["voteChoice",oo()],["reasoning",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function OO(){return combineCodec(Wo(),Lo())}function vO(t,o){let n=o?.programAddress??a,e={proposal:{value:t.proposal??null,isWritable:true},voter:{value:t.voter??null,isWritable:true},voterTokenAccount:{value:t.voterTokenAccount??null,isWritable:false},delegateTokenAccount:{value:t.delegateTokenAccount??null,isWritable:false}},c={...t},r=h(n,"programId");return {accounts:[r(e.proposal),r(e.voter),r(e.voterTokenAccount),r(e.delegateTokenAccount)],programAddress:n,data:Wo().encode(c)}}function hO(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let e=t.accounts[o];return o+=1,e},s=()=>{let e=n();return e.address===a?void 0:e};return {programAddress:t.programAddress,accounts:{proposal:n(),voter:n(),voterTokenAccount:n(),delegateTokenAccount:s()},data:Lo().decode(t.data)}}var Ho=new Uint8Array([158,211,102,36,244,24,103,163]);function KO(){return fixEncoderSize(getBytesEncoder(),8).encode(Ho)}function pt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["resolutionNotes",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),t=>({...t,discriminator:Ho}))}function Fo(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["resolutionNotes",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function WO(){return combineCodec(pt(),Fo())}async function LO(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},agent:{value:t.agent??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},agentTokenAccount:{value:t.agentTokenAccount??null,isWritable:true},authority:{value:t.authority??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.escrow),r(e.reentrancyGuard),r(e.agent),r(e.escrowTokenAccount),r(e.agentTokenAccount),r(e.authority),r(e.tokenProgram)],programAddress:n,data:pt().encode(c)}}function wO(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},agent:{value:t.agent??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},agentTokenAccount:{value:t.agentTokenAccount??null,isWritable:true},authority:{value:t.authority??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.escrow),r(e.reentrancyGuard),r(e.agent),r(e.escrowTokenAccount),r(e.agentTokenAccount),r(e.authority),r(e.tokenProgram)],programAddress:n,data:pt().encode(c)}}function HO(t){if(t.accounts.length<7)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{escrow:n(),reentrancyGuard:n(),agent:n(),escrowTokenAccount:n(),agentTokenAccount:n(),authority:n(),tokenProgram:n()},data:Fo().decode(t.data)}}var Zo=new Uint8Array([22,57,77,239,115,215,61,131]);function JO(){return fixEncoderSize(getBytesEncoder(),8).encode(Zo)}function Et(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["sessionId",getU64Encoder()],["initiator",getAddressEncoder()],["responder",getAddressEncoder()],["sessionType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["metadata",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["expiresAt",getI64Encoder()]]),t=>({...t,discriminator:Zo}))}function Yo(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["sessionId",getU64Decoder()],["initiator",getAddressDecoder()],["responder",getAddressDecoder()],["sessionType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["metadata",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["expiresAt",getI64Decoder()]])}function QO(){return combineCodec(Et(),Yo())}async function qO(t,o){let n=o?.programAddress??a,e={session:{value:t.session??null,isWritable:true},creator:{value:t.creator??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.session.value||(e.session.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,50,97,95,115,101,115,115,105,111,110])),getAddressEncoder().encode(g(e.creator.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.session),r(e.creator),r(e.systemProgram)],programAddress:n,data:Et().encode(c)}}function jO(t,o){let n=o?.programAddress??a,e={session:{value:t.session??null,isWritable:true},creator:{value:t.creator??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.session),r(e.creator),r(e.systemProgram)],programAddress:n,data:Et().encode(c)}}function XO(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{session:n(),creator:n(),systemProgram:n()},data:Yo().decode(t.data)}}var rc=new Uint8Array([160,237,52,23,118,243,100,75]);function ev(){return fixEncoderSize(getBytesEncoder(),8).encode(rc)}function St(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["dashboardId",getU64Encoder()],["metrics",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:rc}))}function oc(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["dashboardId",getU64Decoder()],["metrics",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function nv(){return combineCodec(St(),oc())}async function rv(t,o){let n=o?.programAddress??a,e={dashboard:{value:t.dashboard??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},owner:{value:t.owner??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.dashboard.value||(e.dashboard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,110,97,108,121,116,105,99,115])),getAddressEncoder().encode(g(e.owner.value)),getU64Encoder().encode(f(c.dashboardId))]})),e.userRegistry.value||(e.userRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(g(e.owner.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dashboard),r(e.userRegistry),r(e.owner),r(e.systemProgram),r(e.clock)],programAddress:n,data:St().encode(c)}}function ov(t,o){let n=o?.programAddress??a,e={dashboard:{value:t.dashboard??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},owner:{value:t.owner??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dashboard),r(e.userRegistry),r(e.owner),r(e.systemProgram),r(e.clock)],programAddress:n,data:St().encode(c)}}function cv(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{dashboard:n(),userRegistry:n(),owner:n(),systemProgram:n(),clock:n()},data:oc().decode(t.data)}}var gc=new Uint8Array([133,143,169,255,188,189,104,216]);function dv(){return fixEncoderSize(getBytesEncoder(),8).encode(gc)}function xt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["dealId",getU64Encoder()],["dealType",Qd()],["totalVolume",getU32Encoder()],["totalValue",getU64Encoder()],["discountPercentage",getF64Encoder()],["volumeTiers",getArrayEncoder(_do())],["slaTerms",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["contractDuration",getI64Encoder()],["endDate",getI64Encoder()]]),t=>({...t,discriminator:gc}))}function Tc(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["dealId",getU64Decoder()],["dealType",Rd$1()],["totalVolume",getU32Decoder()],["totalValue",getU64Decoder()],["discountPercentage",getF64Decoder()],["volumeTiers",getArrayDecoder(eo$1())],["slaTerms",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["contractDuration",getI64Decoder()],["endDate",getI64Decoder()]])}function gv(){return combineCodec(xt(),Tc())}async function Tv(t,o){let n=o?.programAddress??a,e={deal:{value:t.deal??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},userRegistry:{value:t.userRegistry??null,isWritable:true},customer:{value:t.customer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.userRegistry.value||(e.userRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(g(e.customer.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.deal),r(e.agent),r(e.userRegistry),r(e.customer),r(e.systemProgram),r(e.clock)],programAddress:n,data:xt().encode(c)}}function lv(t,o){let n=o?.programAddress??a,e={deal:{value:t.deal??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},userRegistry:{value:t.userRegistry??null,isWritable:true},customer:{value:t.customer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.deal),r(e.agent),r(e.userRegistry),r(e.customer),r(e.systemProgram),r(e.clock)],programAddress:n,data:xt().encode(c)}}function yv(t){if(t.accounts.length<6)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{deal:n(),agent:n(),userRegistry:n(),customer:n(),systemProgram:n(),clock:n()},data:Tc().decode(t.data)}}var mc=new Uint8Array([37,105,253,99,87,46,223,20]);function Sv(){return fixEncoderSize(getBytesEncoder(),8).encode(mc)}function pc(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["channelId",getU64Encoder()],["participants",getArrayEncoder(getAddressEncoder())],["channelType",Rc$1()],["isPrivate",getBooleanEncoder()]]),t=>({...t,discriminator:mc}))}function Rc(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["channelId",getU64Decoder()],["participants",getArrayDecoder(getAddressDecoder())],["channelType",Sc$1()],["isPrivate",getBooleanDecoder()]])}function Iv(){return combineCodec(pc(),Rc())}function xv(t,o){let n=o?.programAddress??a,e={channel:{value:t.channel??null,isWritable:true},creator:{value:t.creator??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.channel),r(e.creator),r(e.systemProgram)],programAddress:n,data:pc().encode(c)}}function Cv(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{channel:n(),creator:n(),systemProgram:n()},data:Rc().decode(t.data)}}var Ec=new Uint8Array([251,20,25,4,140,172,5,167]);function Ov(){return fixEncoderSize(getBytesEncoder(),8).encode(Ec)}function Dt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["config",Ne$1()]]),t=>({...t,discriminator:Ec}))}function Sc(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["config",Oe()]])}function vv(){return combineCodec(Dt(),Sc())}async function hv(t,o){let n=o?.programAddress??a,e={engine:{value:t.engine??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},owner:{value:t.owner??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.engine.value||(e.engine.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([100,121,110,97,109,105,99,95,112,114,105,99,105,110,103])),getAddressEncoder().encode(g(e.agent.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.engine),r(e.agent),r(e.owner),r(e.systemProgram)],programAddress:n,data:Dt().encode(c)}}function bv(t,o){let n=o?.programAddress??a,e={engine:{value:t.engine??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},owner:{value:t.owner??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.engine),r(e.agent),r(e.owner),r(e.systemProgram)],programAddress:n,data:Dt().encode(c)}}function Uv(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{engine:n(),agent:n(),owner:n(),systemProgram:n()},data:Sc().decode(t.data)}}var Mc=new Uint8Array([28,188,236,214,244,184,198,219]);function wv(){return fixEncoderSize(getBytesEncoder(),8).encode(Mc)}function _t(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["channelId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["participants",getArrayEncoder(getAddressEncoder())],["channelType",Rc$1()],["metadata",Hc()]]),t=>({...t,discriminator:Mc}))}function fc(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["channelId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["participants",getArrayDecoder(getAddressDecoder())],["channelType",Sc$1()],["metadata",Ic()]])}function Hv(){return combineCodec(_t(),fc())}async function Fv(t,o){let n=o?.programAddress??a,e={channel:{value:t.channel??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},creator:{value:t.creator??null,isWritable:true},creatorAgent:{value:t.creatorAgent??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.channel.value||(e.channel.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([99,104,97,110,110,101,108])),addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()).encode(f(c.channelId))]})),e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.channel),r(e.reentrancyGuard),r(e.creator),r(e.creatorAgent),r(e.systemProgram)],programAddress:n,data:_t().encode(c)}}function Bv(t,o){let n=o?.programAddress??a,e={channel:{value:t.channel??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},creator:{value:t.creator??null,isWritable:true},creatorAgent:{value:t.creatorAgent??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.channel),r(e.reentrancyGuard),r(e.creator),r(e.creatorAgent),r(e.systemProgram)],programAddress:n,data:_t().encode(c)}}function zv(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{channel:n(),reentrancyGuard:n(),creator:n(),creatorAgent:n(),systemProgram:n()},data:fc().decode(t.data)}}var bc=new Uint8Array([253,215,165,116,36,108,68,80]);function jv(){return fixEncoderSize(getBytesEncoder(),8).encode(bc)}function Mt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["taskId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["amount",getU64Encoder()],["expiresAt",getI64Encoder()],["transferHook",getOptionEncoder(getAddressEncoder())],["isConfidential",getBooleanEncoder()]]),t=>({...t,discriminator:bc}))}function Uc(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["taskId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["amount",getU64Decoder()],["expiresAt",getI64Decoder()],["transferHook",getOptionDecoder(getAddressDecoder())],["isConfidential",getBooleanDecoder()]])}function Xv(){return combineCodec(Mt(),Uc())}async function Zv(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},client:{value:t.client??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},clientTokenAccount:{value:t.clientTokenAccount??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},paymentToken:{value:t.paymentToken??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false},associatedTokenProgram:{value:t.associatedTokenProgram??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.escrow.value||(e.escrow.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([101,115,99,114,111,119])),addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()).encode(f(c.taskId))]})),e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]})),e.clientTokenAccount.value||(e.clientTokenAccount.value=await getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[getAddressEncoder().encode(g(e.client.value)),getBytesEncoder().encode(new Uint8Array([6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169])),getAddressEncoder().encode(g(e.paymentToken.value))]})),e.escrowTokenAccount.value||(e.escrowTokenAccount.value=await getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[getAddressEncoder().encode(g(e.escrow.value)),getBytesEncoder().encode(new Uint8Array([6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169])),getAddressEncoder().encode(g(e.paymentToken.value))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),e.associatedTokenProgram.value||(e.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.escrow),r(e.reentrancyGuard),r(e.client),r(e.agent),r(e.clientTokenAccount),r(e.escrowTokenAccount),r(e.paymentToken),r(e.tokenProgram),r(e.associatedTokenProgram),r(e.systemProgram)],programAddress:n,data:Mt().encode(c)}}function Yv(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},client:{value:t.client??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},clientTokenAccount:{value:t.clientTokenAccount??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},paymentToken:{value:t.paymentToken??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false},associatedTokenProgram:{value:t.associatedTokenProgram??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),e.associatedTokenProgram.value||(e.associatedTokenProgram.value="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.escrow),r(e.reentrancyGuard),r(e.client),r(e.agent),r(e.clientTokenAccount),r(e.escrowTokenAccount),r(e.paymentToken),r(e.tokenProgram),r(e.associatedTokenProgram),r(e.systemProgram)],programAddress:n,data:Mt().encode(c)}}function $v(t){if(t.accounts.length<10)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{escrow:n(),reentrancyGuard:n(),client:n(),agent:n(),clientTokenAccount:n(),escrowTokenAccount:n(),paymentToken:n(),tokenProgram:n(),associatedTokenProgram:n(),systemProgram:n()},data:Uc().decode(t.data)}}var Nc=new Uint8Array([115,222,207,231,169,56,125,153]);function ch(){return fixEncoderSize(getBytesEncoder(),8).encode(Nc)}function kt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["config",vg$1()]]),t=>({...t,discriminator:Nc}))}function Kc(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["config",wg()]])}function sh(){return combineCodec(kt(),Kc())}async function ah(t,o){let n=o?.programAddress??a,e={program:{value:t.program??null,isWritable:true},creator:{value:t.creator??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.program.value||(e.program.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([105,110,99,101,110,116,105,118,101,95,112,114,111,103,114,97,109])),getAddressEncoder().encode(g(e.creator.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.program),r(e.creator),r(e.systemProgram)],programAddress:n,data:kt().encode(c)}}function ih(t,o){let n=o?.programAddress??a,e={program:{value:t.program??null,isWritable:true},creator:{value:t.creator??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.program),r(e.creator),r(e.systemProgram)],programAddress:n,data:kt().encode(c)}}function Ah(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{program:n(),creator:n(),systemProgram:n()},data:Kc().decode(t.data)}}var Fc=new Uint8Array([71,93,23,166,103,210,218,105]);function lh(){return fixEncoderSize(getBytesEncoder(),8).encode(Fc)}function bt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["title",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["requirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["budget",getU64Encoder()],["deadline",getI64Encoder()],["skillsNeeded",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["budgetMin",getU64Encoder()],["budgetMax",getU64Encoder()],["paymentToken",getAddressEncoder()],["jobType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["experienceLevel",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:Fc}))}function Bc(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["title",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["requirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["budget",getU64Decoder()],["deadline",getI64Decoder()],["skillsNeeded",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["budgetMin",getU64Decoder()],["budgetMax",getU64Decoder()],["paymentToken",getAddressDecoder()],["jobType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["experienceLevel",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function yh(){return combineCodec(bt(),Bc())}async function mh(t,o){let n=o?.programAddress??a,e={jobPosting:{value:t.jobPosting??null,isWritable:true},employer:{value:t.employer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.jobPosting.value||(e.jobPosting.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([106,111,98,95,112,111,115,116,105,110,103])),getAddressEncoder().encode(g(e.employer.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.jobPosting),r(e.employer),r(e.systemProgram)],programAddress:n,data:bt().encode(c)}}function ph(t,o){let n=o?.programAddress??a,e={jobPosting:{value:t.jobPosting??null,isWritable:true},employer:{value:t.employer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.jobPosting),r(e.employer),r(e.systemProgram)],programAddress:n,data:bt().encode(c)}}function Rh(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{jobPosting:n(),employer:n(),systemProgram:n()},data:Bc().decode(t.data)}}var Jc=new Uint8Array([72,76,122,193,232,239,106,81]);function xh(){return fixEncoderSize(getBytesEncoder(),8).encode(Jc)}function Gt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["periodStart",getI64Encoder()],["periodEnd",getI64Encoder()]]),t=>({...t,discriminator:Jc}))}function Qc(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["periodStart",getI64Decoder()],["periodEnd",getI64Decoder()]])}function Ch(){return combineCodec(Gt(),Qc())}async function Dh(t,o){let n=o?.programAddress??a,e={marketAnalytics:{value:t.marketAnalytics??null,isWritable:true},authority:{value:t.authority??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.marketAnalytics.value||(e.marketAnalytics.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([109,97,114,107,101,116,95,97,110,97,108,121,116,105,99,115])),getI64Encoder().encode(f(c.periodStart)),getI64Encoder().encode(f(c.periodEnd))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.marketAnalytics),r(e.authority),r(e.systemProgram),r(e.clock)],programAddress:n,data:Gt().encode(c)}}function _h(t,o){let n=o?.programAddress??a,e={marketAnalytics:{value:t.marketAnalytics??null,isWritable:true},authority:{value:t.authority??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.marketAnalytics),r(e.authority),r(e.systemProgram),r(e.clock)],programAddress:n,data:Gt().encode(c)}}function Mh(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{marketAnalytics:n(),authority:n(),systemProgram:n(),clock:n()},data:Qc().decode(t.data)}}var Zc=new Uint8Array([148,146,240,10,226,215,167,174]);function bh(){return fixEncoderSize(getBytesEncoder(),8).encode(Zc)}function Kt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["multisigId",getU64Encoder()],["threshold",getU8Encoder()],["signers",getArrayEncoder(getAddressEncoder())],["config",Oh()]]),t=>({...t,discriminator:Zc}))}function Yc(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["multisigId",getU64Decoder()],["threshold",getU8Decoder()],["signers",getArrayDecoder(getAddressDecoder())],["config",Ph()]])}function Uh(){return combineCodec(Kt(),Yc())}async function Gh(t,o){let n=o?.programAddress??a,e={multisig:{value:t.multisig??null,isWritable:true},owner:{value:t.owner??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.multisig.value||(e.multisig.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([109,117,108,116,105,115,105,103])),getAddressEncoder().encode(g(e.owner.value)),getU64Encoder().encode(f(c.multisigId))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.multisig),r(e.owner),r(e.systemProgram)],programAddress:n,data:Kt().encode(c)}}function Nh(t,o){let n=o?.programAddress??a,e={multisig:{value:t.multisig??null,isWritable:true},owner:{value:t.owner??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.multisig),r(e.owner),r(e.systemProgram)],programAddress:n,data:Kt().encode(c)}}function Kh(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{multisig:n(),owner:n(),systemProgram:n()},data:Yc().decode(t.data)}}var os=new Uint8Array([58,37,131,238,116,165,200,193]);function Fh(){return fixEncoderSize(getBytesEncoder(),8).encode(os)}function Ht(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["genomeHash",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["baseCapabilities",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["replicationFee",getU64Encoder()],["maxReplications",getU32Encoder()]]),t=>({...t,discriminator:os}))}function cs(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["genomeHash",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["baseCapabilities",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["replicationFee",getU64Decoder()],["maxReplications",getU32Decoder()]])}function Bh(){return combineCodec(Ht(),cs())}async function zh(t,o){let n=o?.programAddress??a,e={replicationTemplate:{value:t.replicationTemplate??null,isWritable:true},sourceAgent:{value:t.sourceAgent??null,isWritable:false},creator:{value:t.creator??null,isWritable:true},clock:{value:t.clock??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.replicationTemplate.value||(e.replicationTemplate.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,108,105,99,97,116,105,111,110,95,116,101,109,112,108,97,116,101])),getAddressEncoder().encode(g(e.sourceAgent.value))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.replicationTemplate),r(e.sourceAgent),r(e.creator),r(e.clock),r(e.systemProgram)],programAddress:n,data:Ht().encode(c)}}function Vh(t,o){let n=o?.programAddress??a,e={replicationTemplate:{value:t.replicationTemplate??null,isWritable:true},sourceAgent:{value:t.sourceAgent??null,isWritable:false},creator:{value:t.creator??null,isWritable:true},clock:{value:t.clock??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.replicationTemplate),r(e.sourceAgent),r(e.creator),r(e.clock),r(e.systemProgram)],programAddress:n,data:Ht().encode(c)}}function Jh(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{replicationTemplate:n(),sourceAgent:n(),creator:n(),clock:n(),systemProgram:n()},data:cs().decode(t.data)}}var as=new Uint8Array([139,213,158,201,140,251,236,89]);function Yh(){return fixEncoderSize(getBytesEncoder(),8).encode(as)}function Bt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["config",Jl()]]),t=>({...t,discriminator:as}))}function is(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["config",Kl()]])}function $h(){return combineCodec(Bt(),is())}async function tb(t,o){let n=o?.programAddress??a,e={stream:{value:t.stream??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},creator:{value:t.creator??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.stream.value||(e.stream.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,111,121,97,108,116,121,95,115,116,114,101,97,109])),getAddressEncoder().encode(g(e.agent.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.stream),r(e.agent),r(e.creator),r(e.systemProgram)],programAddress:n,data:Bt().encode(c)}}function eb(t,o){let n=o?.programAddress??a,e={stream:{value:t.stream??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},creator:{value:t.creator??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.stream),r(e.agent),r(e.creator),r(e.systemProgram)],programAddress:n,data:Bt().encode(c)}}function nb(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{stream:n(),agent:n(),creator:n(),systemProgram:n()},data:is().decode(t.data)}}var gs=new Uint8Array([236,178,59,67,226,82,27,209]);function ib(){return fixEncoderSize(getBytesEncoder(),8).encode(gs)}function Jt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["auctionType",kb$1()],["startingPrice",getU64Encoder()],["reservePrice",getU64Encoder()],["isReserveHidden",getBooleanEncoder()],["currentBid",getU64Encoder()],["currentBidder",getOptionEncoder(getAddressEncoder())],["auctionEndTime",getI64Encoder()],["minimumBidIncrement",getU64Encoder()],["totalBids",getU32Encoder()],["dutchConfig",getOptionEncoder(De$1())]]),t=>({...t,discriminator:gs}))}function Ts(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["auctionType",lb()],["startingPrice",getU64Decoder()],["reservePrice",getU64Decoder()],["isReserveHidden",getBooleanDecoder()],["currentBid",getU64Decoder()],["currentBidder",getOptionDecoder(getAddressDecoder())],["auctionEndTime",getI64Decoder()],["minimumBidIncrement",getU64Decoder()],["totalBids",getU32Decoder()],["dutchConfig",getOptionDecoder(Ee())]])}function Ab(){return combineCodec(Jt(),Ts())}async function ub(t,o){let n=o?.programAddress??a,e={auction:{value:t.auction??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},userRegistry:{value:t.userRegistry??null,isWritable:false},creator:{value:t.creator??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.auction.value||(e.auction.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,117,99,116,105,111,110])),getAddressEncoder().encode(g(e.agent.value)),getAddressEncoder().encode(g(e.creator.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.auction),r(e.agent),r(e.userRegistry),r(e.creator),r(e.systemProgram),r(e.clock)],programAddress:n,data:Jt().encode(c)}}function db(t,o){let n=o?.programAddress??a,e={auction:{value:t.auction??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},userRegistry:{value:t.userRegistry??null,isWritable:false},creator:{value:t.creator??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.auction),r(e.agent),r(e.userRegistry),r(e.creator),r(e.systemProgram),r(e.clock)],programAddress:n,data:Jt().encode(c)}}function gb(t){if(t.accounts.length<6)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{auction:n(),agent:n(),userRegistry:n(),creator:n(),systemProgram:n(),clock:n()},data:Ts().decode(t.data)}}var ps=new Uint8Array([91,37,216,26,93,146,13,182]);function pb(){return fixEncoderSize(getBytesEncoder(),8).encode(ps)}function Qt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["title",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["price",getU64Encoder()],["tokenMint",getAddressEncoder()],["serviceType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["paymentToken",getAddressEncoder()],["estimatedDelivery",getI64Encoder()],["tags",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["listingId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:ps}))}function Rs(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["title",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["price",getU64Decoder()],["tokenMint",getAddressDecoder()],["serviceType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["paymentToken",getAddressDecoder()],["estimatedDelivery",getI64Decoder()],["tags",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["listingId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Rb(){return combineCodec(Qt(),Rs())}async function Pb(t,o){let n=o?.programAddress??a,e={serviceListing:{value:t.serviceListing??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},userRegistry:{value:t.userRegistry??null,isWritable:true},creator:{value:t.creator??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.serviceListing.value||(e.serviceListing.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([115,101,114,118,105,99,101,95,108,105,115,116,105,110,103])),getAddressEncoder().encode(g(e.creator.value)),addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()).encode(f(c.listingId))]})),e.userRegistry.value||(e.userRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(g(e.creator.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.serviceListing),r(e.agent),r(e.userRegistry),r(e.creator),r(e.systemProgram),r(e.clock)],programAddress:n,data:Qt().encode(c)}}function Eb(t,o){let n=o?.programAddress??a,e={serviceListing:{value:t.serviceListing??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},userRegistry:{value:t.userRegistry??null,isWritable:true},creator:{value:t.creator??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.serviceListing),r(e.agent),r(e.userRegistry),r(e.creator),r(e.systemProgram),r(e.clock)],programAddress:n,data:Qt().encode(c)}}function Sb(t){if(t.accounts.length<6)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{serviceListing:n(),agent:n(),userRegistry:n(),creator:n(),systemProgram:n(),clock:n()},data:Rs().decode(t.data)}}var Ss=new Uint8Array([4,45,127,74,240,104,83,178]);function _b(){return fixEncoderSize(getBytesEncoder(),8).encode(Ss)}function Zt(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["decimals",getU8Encoder()],["freezeAuthority",getOptionEncoder(getAddressEncoder())],["enableTransferFee",getBooleanEncoder()],["enableConfidentialTransfers",getBooleanEncoder()],["enableInterestBearing",getBooleanEncoder()]]),t=>({...t,discriminator:Ss}))}function Is(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["decimals",getU8Decoder()],["freezeAuthority",getOptionDecoder(getAddressDecoder())],["enableTransferFee",getBooleanDecoder()],["enableConfidentialTransfers",getBooleanDecoder()],["enableInterestBearing",getBooleanDecoder()]])}function Mb(){return combineCodec(Zt(),Is())}async function fb(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},mint:{value:t.mint??null,isWritable:true},tokenProgram:{value:t.tokenProgram??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false},rent:{value:t.rent??null,isWritable:false}},c={...t};e.agent.value||(e.agent.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.authority.value))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.rent.value||(e.rent.value="SysvarRent111111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.authority),r(e.agent),r(e.mint),r(e.tokenProgram),r(e.systemProgram),r(e.rent)],programAddress:n,data:Zt().encode(c)}}function kb(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},mint:{value:t.mint??null,isWritable:true},tokenProgram:{value:t.tokenProgram??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false},rent:{value:t.rent??null,isWritable:false}},c={...t};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.rent.value||(e.rent.value="SysvarRent111111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.authority),r(e.agent),r(e.mint),r(e.tokenProgram),r(e.systemProgram),r(e.rent)],programAddress:n,data:Zt().encode(c)}}function Ob(t){if(t.accounts.length<6)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{authority:n(),agent:n(),mint:n(),tokenProgram:n(),systemProgram:n(),rent:n()},data:Is().decode(t.data)}}var ks=new Uint8Array([143,17,248,200,217,85,10,175]);function Nb(){return fixEncoderSize(getBytesEncoder(),8).encode(ks)}function Os(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["orderId",getU64Encoder()],["provider",getAddressEncoder()],["title",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["requirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["paymentAmount",getU64Encoder()],["paymentToken",getAddressEncoder()],["deadline",getI64Encoder()]]),t=>({...t,discriminator:ks}))}function vs(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["orderId",getU64Decoder()],["provider",getAddressDecoder()],["title",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["requirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["paymentAmount",getU64Decoder()],["paymentToken",getAddressDecoder()],["deadline",getI64Decoder()]])}function Kb(){return combineCodec(Os(),vs())}function Wb(t,o){let n=o?.programAddress??a,e={workOrder:{value:t.workOrder??null,isWritable:true},client:{value:t.client??null,isWritable:true},clock:{value:t.clock??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.workOrder),r(e.client),r(e.clock),r(e.systemProgram)],programAddress:n,data:Os().encode(c)}}function Lb(t){if(t.accounts.length<3)throw new Error(w("create_work_order",t.accounts.length));let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{workOrder:n(),client:n(),clock:n(),systemProgram:n()},data:vs().decode(t.data)}}var Ns=new Uint8Array([205,171,239,225,82,126,96,166]);function zb(){return fixEncoderSize(getBytesEncoder(),8).encode(Ns)}function ce(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:Ns}))}function Ks(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function Vb(){return combineCodec(ce(),Ks())}async function Jb(t,o){let n=o?.programAddress??a,e={agentAccount:{value:t.agentAccount??null,isWritable:true},signer:{value:t.signer??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.agentAccount.value||(e.agentAccount.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.signer.value)),addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()).encode(f(c.agentId))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentAccount),r(e.signer),r(e.clock)],programAddress:n,data:ce().encode(c)}}function Qb(t,o){let n=o?.programAddress??a,e={agentAccount:{value:t.agentAccount??null,isWritable:true},signer:{value:t.signer??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentAccount),r(e.signer),r(e.clock)],programAddress:n,data:ce().encode(c)}}function qb(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{agentAccount:n(),signer:n(),clock:n()},data:Ks().decode(t.data)}}var ws=new Uint8Array([12,116,204,68,87,205,40,205]);function tU(){return fixEncoderSize(getBytesEncoder(),8).encode(ws)}function ae(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["proposalId",getU64Encoder()],["scope",be()],["expiresAt",getOptionEncoder(getI64Encoder())]]),t=>({...t,discriminator:ws}))}function Hs(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["proposalId",getU64Decoder()],["scope",ce$1()],["expiresAt",getOptionDecoder(getI64Decoder())]])}function eU(){return combineCodec(ae(),Hs())}async function nU(t,o){let n=o?.programAddress??a,e={proposal:{value:t.proposal??null,isWritable:true},delegator:{value:t.delegator??null,isWritable:true},delegate:{value:t.delegate??null,isWritable:false},delegatorTokenAccount:{value:t.delegatorTokenAccount??null,isWritable:false}},c={...t};e.proposal.value||(e.proposal.value=await getProgramDerivedAddress({programAddress:n,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(f(c.proposalId))]}));let r=h(n,"programId");return {accounts:[r(e.proposal),r(e.delegator),r(e.delegate),r(e.delegatorTokenAccount)],programAddress:n,data:ae().encode(c)}}function rU(t,o){let n=o?.programAddress??a,e={proposal:{value:t.proposal??null,isWritable:true},delegator:{value:t.delegator??null,isWritable:true},delegate:{value:t.delegate??null,isWritable:false},delegatorTokenAccount:{value:t.delegatorTokenAccount??null,isWritable:false}},c={...t},r=h(n,"programId");return {accounts:[r(e.proposal),r(e.delegator),r(e.delegate),r(e.delegatorTokenAccount)],programAddress:n,data:ae().encode(c)}}function oU(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let e=t.accounts[o];return o+=1,e},s=()=>{let e=n();return e.address===a?void 0:e};return {programAddress:t.programAddress,accounts:{proposal:s(),delegator:n(),delegate:n(),delegatorTokenAccount:n()},data:Hs().decode(t.data)}}var Bs=new Uint8Array([198,174,139,70,87,79,181,139]);function AU(){return fixEncoderSize(getBytesEncoder(),8).encode(Bs)}function Ae(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["disputeReason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:Bs}))}function zs(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["disputeReason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function uU(){return combineCodec(Ae(),zs())}async function dU(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},authority:{value:t.authority??null,isWritable:false}},c={...t};e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]}));let r=h(n,"programId");return {accounts:[r(e.escrow),r(e.reentrancyGuard),r(e.authority)],programAddress:n,data:Ae().encode(c)}}function gU(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},authority:{value:t.authority??null,isWritable:false}},c={...t},r=h(n,"programId");return {accounts:[r(e.escrow),r(e.reentrancyGuard),r(e.authority)],programAddress:n,data:Ae().encode(c)}}function TU(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{escrow:n(),reentrancyGuard:n(),authority:n()},data:zs().decode(t.data)}}var Qs=new Uint8Array([172,97,184,220,51,131,45,160]);function RU(){return fixEncoderSize(getBytesEncoder(),8).encode(Qs)}function qs(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agent",getAddressEncoder()],["incentiveType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["amount",getU64Encoder()]]),t=>({...t,discriminator:Qs}))}function js(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agent",getAddressDecoder()],["incentiveType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["amount",getU64Decoder()]])}function PU(){return combineCodec(qs(),js())}function EU(t,o){let n=o?.programAddress??a,e={program:{value:t.program??null,isWritable:true},incentives:{value:t.incentives??null,isWritable:true},distributor:{value:t.distributor??null,isWritable:false}},c={...t},r=h(n,"programId");return {accounts:[r(e.program),r(e.incentives),r(e.distributor)],programAddress:n,data:qs().encode(c)}}function SU(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{program:n(),incentives:n(),distributor:n()},data:js().decode(t.data)}}var Zs=new Uint8Array([236,222,159,76,52,79,235,109]);function _U(){return fixEncoderSize(getBytesEncoder(),8).encode(Zs)}function de(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["batchSize",getU32Encoder()]]),t=>({...t,discriminator:Zs}))}function Ys(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["batchSize",getU32Decoder()]])}function MU(){return combineCodec(de(),Ys())}async function fU(t,o){let n=o?.programAddress??a,e={deal:{value:t.deal??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},authority:{value:t.authority??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.userRegistry.value||(e.userRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(g(e.authority.value))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.deal),r(e.userRegistry),r(e.authority),r(e.clock)],programAddress:n,data:de().encode(c)}}function kU(t,o){let n=o?.programAddress??a,e={deal:{value:t.deal??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},authority:{value:t.authority??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.deal),r(e.userRegistry),r(e.authority),r(e.clock)],programAddress:n,data:de().encode(c)}}function OU(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{deal:n(),userRegistry:n(),authority:n(),clock:n()},data:Ys().decode(t.data)}}var ea=new Uint8Array([186,60,116,133,108,128,111,28]);function GU(){return fixEncoderSize(getBytesEncoder(),8).encode(ea)}function na(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),t=>({...t,discriminator:ea}))}function ra(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function NU(){return combineCodec(na(),ra())}function KU(t,o){let n=o?.programAddress??a,e={proposal:{value:t.proposal??null,isWritable:true},executor:{value:t.executor??null,isWritable:true},targetProgram:{value:t.targetProgram??null,isWritable:false}},c=h(n,"programId");return {accounts:[c(e.proposal),c(e.executor),c(e.targetProgram)],programAddress:n,data:na().encode({})}}function WU(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{proposal:n(),executor:n(),targetProgram:n()},data:ra().decode(t.data)}}var sa=new Uint8Array([206,39,235,232,29,98,124,4]);function zU(){return fixEncoderSize(getBytesEncoder(),8).encode(sa)}function aa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["data",w$1()]]),t=>({...t,discriminator:sa}))}function ia(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["data",x()]])}function VU(){return combineCodec(aa(),ia())}function JU(t,o){let n=o?.programAddress??a,e={systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};return e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),{accounts:[h(n,"programId")(e.systemProgram)],programAddress:n,data:aa().encode(c)}}function QU(t){if(t.accounts.length<1)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{systemProgram:n()},data:ia().decode(t.data)}}var da=new Uint8Array([146,64,145,33,190,17,82,70]);function $U(){return fixEncoderSize(getBytesEncoder(),8).encode(da)}function ga(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["data",ub$1()]]),t=>({...t,discriminator:da}))}function Ta(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["data",vb()]])}function tG(){return combineCodec(ga(),Ta())}function eG(t,o){let n=o?.programAddress??a,e={systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};return e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),{accounts:[h(n,"programId")(e.systemProgram)],programAddress:n,data:ga().encode(c)}}function nG(t){if(t.accounts.length<1)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{systemProgram:n()},data:Ta().decode(t.data)}}var ma=new Uint8Array([30,229,117,69,175,246,7,143]);function iG(){return fixEncoderSize(getBytesEncoder(),8).encode(ma)}function pa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["data",lc()]]),t=>({...t,discriminator:ma}))}function Ra(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["data",mc$1()]])}function AG(){return combineCodec(pa(),Ra())}function uG(t,o){let n=o?.programAddress??a,e={systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};return e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),{accounts:[h(n,"programId")(e.systemProgram)],programAddress:n,data:pa().encode(c)}}function dG(t){if(t.accounts.length<1)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{systemProgram:n()},data:Ra().decode(t.data)}}var Sa=new Uint8Array([25,78,239,255,21,9,170,98]);function pG(){return fixEncoderSize(getBytesEncoder(),8).encode(Sa)}function Ia(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["data",fd()]]),t=>({...t,discriminator:Sa}))}function xa(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["data",gd()]])}function RG(){return combineCodec(Ia(),xa())}function PG(t,o){let n=o?.programAddress??a,e={systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};return e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),{accounts:[h(n,"programId")(e.systemProgram)],programAddress:n,data:Ia().encode(c)}}function EG(t){if(t.accounts.length<1)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{systemProgram:n()},data:xa().decode(t.data)}}var _a=new Uint8Array([212,219,242,67,179,18,238,104]);function _G(){return fixEncoderSize(getBytesEncoder(),8).encode(_a)}function Ma(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["data",Ne$1()]]),t=>({...t,discriminator:_a}))}function fa(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["data",Oe()]])}function MG(){return combineCodec(Ma(),fa())}function fG(t,o){let n=o?.programAddress??a,e={systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};return e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),{accounts:[h(n,"programId")(e.systemProgram)],programAddress:n,data:Ma().encode(c)}}function kG(t){if(t.accounts.length<1)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{systemProgram:n()},data:fa().decode(t.data)}}var va=new Uint8Array([100,100,216,86,42,163,37,64]);function GG(){return fixEncoderSize(getBytesEncoder(),8).encode(va)}function ha(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["data",Oh()]]),t=>({...t,discriminator:va}))}function ba(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["data",Ph()]])}function NG(){return combineCodec(ha(),ba())}function KG(t,o){let n=o?.programAddress??a,e={systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};return e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),{accounts:[h(n,"programId")(e.systemProgram)],programAddress:n,data:ha().encode(c)}}function WG(t){if(t.accounts.length<1)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{systemProgram:n()},data:ba().decode(t.data)}}var Na=new Uint8Array([34,42,234,113,80,201,15,95]);function zG(){return fixEncoderSize(getBytesEncoder(),8).encode(Na)}function Ka(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["data",yk$1()]]),t=>({...t,discriminator:Na}))}function Wa(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["data",zk()]])}function VG(){return combineCodec(Ka(),Wa())}function JG(t,o){let n=o?.programAddress??a,e={systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};return e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),{accounts:[h(n,"programId")(e.systemProgram)],programAddress:n,data:Ka().encode(c)}}function QG(t){if(t.accounts.length<1)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{systemProgram:n()},data:Wa().decode(t.data)}}var Ha=new Uint8Array([250,43,164,121,205,210,124,127]);function $G(){return fixEncoderSize(getBytesEncoder(),8).encode(Ha)}function Fa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["data",Sk$1()]]),t=>({...t,discriminator:Ha}))}function Ba(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["data",Tk$1()]])}function tN(){return combineCodec(Fa(),Ba())}function eN(t,o){let n=o?.programAddress??a,e={systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};return e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),{accounts:[h(n,"programId")(e.systemProgram)],programAddress:n,data:Fa().encode(c)}}function nN(t){if(t.accounts.length<1)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{systemProgram:n()},data:Ba().decode(t.data)}}var Ja=new Uint8Array([87,78,249,236,50,103,49,173]);function iN(){return fixEncoderSize(getBytesEncoder(),8).encode(Ja)}function Qa(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["data",Pl()]]),t=>({...t,discriminator:Ja}))}function qa(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["data",Ql()]])}function AN(){return combineCodec(Qa(),qa())}function uN(t,o){let n=o?.programAddress??a,e={systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};return e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),{accounts:[h(n,"programId")(e.systemProgram)],programAddress:n,data:Qa().encode(c)}}function dN(t){if(t.accounts.length<1)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{systemProgram:n()},data:qa().decode(t.data)}}var Za=new Uint8Array([99,201,28,182,134,0,55,181]);function mN(){return fixEncoderSize(getBytesEncoder(),8).encode(Za)}function Ya(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),t=>({...t,discriminator:Za}))}function $a(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function pN(){return combineCodec(Ya(),$a())}function RN(t,o){let n=o?.programAddress??a,e={auction:{value:t.auction??null,isWritable:true},authority:{value:t.authority??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let c=h(n,"programId");return {accounts:[c(e.auction),c(e.authority),c(e.clock)],programAddress:n,data:Ya().encode({})}}function PN(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{auction:n(),authority:n(),clock:n()},data:$a().decode(t.data)}}var ci=new Uint8Array([210,63,221,114,212,97,195,156]);function CN(){return fixEncoderSize(getBytesEncoder(),8).encode(ci)}function Te(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["reason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:ci}))}function si(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["reason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function DN(){return combineCodec(Te(),si())}async function _N(t,o){let n=o?.programAddress??a,e={dispute:{value:t.dispute??null,isWritable:true},transaction:{value:t.transaction??null,isWritable:false},userRegistry:{value:t.userRegistry??null,isWritable:true},complainant:{value:t.complainant??null,isWritable:true},respondent:{value:t.respondent??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.dispute.value||(e.dispute.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([100,105,115,112,117,116,101])),getAddressEncoder().encode(g(e.transaction.value)),getAddressEncoder().encode(g(e.complainant.value)),addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()).encode(f(c.reason))]})),e.userRegistry.value||(e.userRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(g(e.complainant.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dispute),r(e.transaction),r(e.userRegistry),r(e.complainant),r(e.respondent),r(e.systemProgram),r(e.clock)],programAddress:n,data:Te().encode(c)}}function MN(t,o){let n=o?.programAddress??a,e={dispute:{value:t.dispute??null,isWritable:true},transaction:{value:t.transaction??null,isWritable:false},userRegistry:{value:t.userRegistry??null,isWritable:true},complainant:{value:t.complainant??null,isWritable:true},respondent:{value:t.respondent??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dispute),r(e.transaction),r(e.userRegistry),r(e.complainant),r(e.respondent),r(e.systemProgram),r(e.clock)],programAddress:n,data:Te().encode(c)}}function fN(t){if(t.accounts.length<7)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{dispute:n(),transaction:n(),userRegistry:n(),complainant:n(),respondent:n(),systemProgram:n(),clock:n()},data:si().decode(t.data)}}var Ai=new Uint8Array([220,209,175,193,57,132,241,168]);function bN(){return fixEncoderSize(getBytesEncoder(),8).encode(Ai)}function ui(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),t=>({...t,discriminator:Ai}))}function di(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function UN(){return combineCodec(ui(),di())}function GN(t,o){let n=o?.programAddress??a,e={auction:{value:t.auction??null,isWritable:true},authority:{value:t.authority??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let c=h(n,"programId");return {accounts:[c(e.auction),c(e.authority),c(e.clock)],programAddress:n,data:ui().encode({})}}function NN(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{auction:n(),authority:n(),clock:n()},data:di().decode(t.data)}}var mi=new Uint8Array([213,97,79,234,22,228,14,32]);function FN(){return fixEncoderSize(getBytesEncoder(),8).encode(mi)}function ye(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["reportId",getU64Encoder()],["reportType",Pk()],["dateRangeStart",getI64Encoder()],["dateRangeEnd",getI64Encoder()]]),t=>({...t,discriminator:mi}))}function pi(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["reportId",getU64Decoder()],["reportType",Qk$1()],["dateRangeStart",getI64Decoder()],["dateRangeEnd",getI64Decoder()]])}function BN(){return combineCodec(ye(),pi())}async function zN(t,o){let n=o?.programAddress??a,e={report:{value:t.report??null,isWritable:true},auditTrail:{value:t.auditTrail??null,isWritable:true},authority:{value:t.authority??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.report.value||(e.report.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([99,111,109,112,108,105,97,110,99,101,95,114,101,112,111,114,116])),getU64Encoder().encode(f(c.reportId))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.report),r(e.auditTrail),r(e.authority),r(e.systemProgram)],programAddress:n,data:ye().encode(c)}}function VN(t,o){let n=o?.programAddress??a,e={report:{value:t.report??null,isWritable:true},auditTrail:{value:t.auditTrail??null,isWritable:true},authority:{value:t.authority??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.report),r(e.auditTrail),r(e.authority),r(e.systemProgram)],programAddress:n,data:ye().encode(c)}}function JN(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{report:n(),auditTrail:n(),authority:n(),systemProgram:n()},data:pi().decode(t.data)}}var Pi=new Uint8Array([145,182,236,249,212,17,175,161]);function YN(){return fixEncoderSize(getBytesEncoder(),8).encode(Pi)}function pe(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["entityType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["config",rb()]]),t=>({...t,discriminator:Pi}))}function Ei(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["entityType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["config",sb()]])}function $N(){return combineCodec(pe(),Ei())}async function tK(t,o){let n=o?.programAddress??a,e={auditTrail:{value:t.auditTrail??null,isWritable:true},entity:{value:t.entity??null,isWritable:false},authority:{value:t.authority??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.auditTrail.value||(e.auditTrail.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,117,100,105,116,95,116,114,97,105,108])),getAddressEncoder().encode(g(e.entity.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.auditTrail),r(e.entity),r(e.authority),r(e.systemProgram)],programAddress:n,data:pe().encode(c)}}function eK(t,o){let n=o?.programAddress??a,e={auditTrail:{value:t.auditTrail??null,isWritable:true},entity:{value:t.entity??null,isWritable:false},authority:{value:t.authority??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.auditTrail),r(e.entity),r(e.authority),r(e.systemProgram)],programAddress:n,data:pe().encode(c)}}function nK(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{auditTrail:n(),entity:n(),authority:n(),systemProgram:n()},data:Ei().decode(t.data)}}var xi=new Uint8Array([154,47,116,20,167,57,114,41]);function aK(){return fixEncoderSize(getBytesEncoder(),8).encode(xi)}function Pe(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["autoApproveNewAccounts",getBooleanEncoder()],["auditorElgamalPubkey",getOptionEncoder(fixEncoderSize(getBytesEncoder(),32))]]),t=>({...t,discriminator:xi}))}function Ci(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["autoApproveNewAccounts",getBooleanDecoder()],["auditorElgamalPubkey",getOptionDecoder(fixDecoderSize(getBytesDecoder(),32))]])}function iK(){return combineCodec(Pe(),Ci())}async function AK(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},mint:{value:t.mint??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.agent.value||(e.agent.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.authority.value))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.authority),r(e.mint),r(e.agent),r(e.tokenProgram)],programAddress:n,data:Pe().encode(c)}}function uK(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},mint:{value:t.mint??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.authority),r(e.mint),r(e.agent),r(e.tokenProgram)],programAddress:n,data:Pe().encode(c)}}function dK(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{authority:n(),mint:n(),agent:n(),tokenProgram:n()},data:Ci().decode(t.data)}}var _i=new Uint8Array([175,89,119,112,150,203,202,198]);function pK(){return fixEncoderSize(getBytesEncoder(),8).encode(_i)}function Se(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["state",t()]]),t=>({...t,discriminator:_i}))}function Mi(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["state",u()]])}function RK(){return combineCodec(Se(),Mi())}async function PK(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},mint:{value:t.mint??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.agent.value||(e.agent.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.authority.value))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.authority),r(e.mint),r(e.agent),r(e.tokenProgram)],programAddress:n,data:Se().encode(c)}}function EK(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},mint:{value:t.mint??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.authority),r(e.mint),r(e.agent),r(e.tokenProgram)],programAddress:n,data:Se().encode(c)}}function SK(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{authority:n(),mint:n(),agent:n(),tokenProgram:n()},data:Mi().decode(t.data)}}var Ni=new Uint8Array([137,84,234,206,17,58,54,215]);function MK(){return fixEncoderSize(getBytesEncoder(),8).encode(Ni)}function xe(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["proposalId",getU64Encoder()],["title",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["description",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["proposalType",Zj()],["executionParams",Uf()]]),t=>({...t,discriminator:Ni}))}function Ki(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["proposalId",getU64Decoder()],["title",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["description",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["proposalType",_j()],["executionParams",Vf()]])}function fK(){return combineCodec(xe(),Ki())}async function kK(t,o){let n=o?.programAddress??a,e={proposal:{value:t.proposal??null,isWritable:true},proposer:{value:t.proposer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.proposal.value||(e.proposal.value=await getProgramDerivedAddress({programAddress:n,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(f(c.proposalId))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.proposal),r(e.proposer),r(e.systemProgram)],programAddress:n,data:xe().encode(c)}}function OK(t,o){let n=o?.programAddress??a,e={proposal:{value:t.proposal??null,isWritable:true},proposer:{value:t.proposer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.proposal),r(e.proposer),r(e.systemProgram)],programAddress:n,data:xe().encode(c)}}function vK(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{proposal:n(),proposer:n(),systemProgram:n()},data:Ki().decode(t.data)}}var Li=new Uint8Array([59,39,17,210,123,130,101,67]);function NK(){return fixEncoderSize(getBytesEncoder(),8).encode(Li)}function De(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["rate",getI16Encoder()]]),t=>({...t,discriminator:Li}))}function wi(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["rate",getI16Decoder()]])}function KK(){return combineCodec(De(),wi())}async function WK(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},mint:{value:t.mint??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},rateAuthority:{value:t.rateAuthority??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.agent.value||(e.agent.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.authority.value))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.authority),r(e.mint),r(e.agent),r(e.rateAuthority),r(e.tokenProgram)],programAddress:n,data:De().encode(c)}}function LK(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},mint:{value:t.mint??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},rateAuthority:{value:t.rateAuthority??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.authority),r(e.mint),r(e.agent),r(e.rateAuthority),r(e.tokenProgram)],programAddress:n,data:De().encode(c)}}function wK(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{authority:n(),mint:n(),agent:n(),rateAuthority:n(),tokenProgram:n()},data:wi().decode(t.data)}}var Fi=new Uint8Array([117,167,56,158,201,160,209,109]);function VK(){return fixEncoderSize(getBytesEncoder(),8).encode(Fi)}function Me(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),t=>({...t,discriminator:Fi}))}function Bi(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function JK(){return combineCodec(Me(),Bi())}async function QK(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},mint:{value:t.mint??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},closeAuthority:{value:t.closeAuthority??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}};e.agent.value||(e.agent.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.authority.value))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let c=h(n,"programId");return {accounts:[c(e.authority),c(e.mint),c(e.agent),c(e.closeAuthority),c(e.tokenProgram)],programAddress:n,data:Me().encode({})}}function qK(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},mint:{value:t.mint??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},closeAuthority:{value:t.closeAuthority??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let c=h(n,"programId");return {accounts:[c(e.authority),c(e.mint),c(e.agent),c(e.closeAuthority),c(e.tokenProgram)],programAddress:n,data:Me().encode({})}}function jK(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{authority:n(),mint:n(),agent:n(),closeAuthority:n(),tokenProgram:n()},data:Bi().decode(t.data)}}var Vi=new Uint8Array([215,68,129,228,237,165,0,240]);function eW(){return fixEncoderSize(getBytesEncoder(),8).encode(Vi)}function ke(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["initialRoles",getArrayEncoder(sl())]]),t=>({...t,discriminator:Vi}))}function Ji(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["initialRoles",getArrayDecoder(tl())]])}function nW(){return combineCodec(ke(),Ji())}async function rW(t,o){let n=o?.programAddress??a,e={rbacConfig:{value:t.rbacConfig??null,isWritable:true},authority:{value:t.authority??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.rbacConfig.value||(e.rbacConfig.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,98,97,99,95,99,111,110,102,105,103])),getAddressEncoder().encode(g(e.authority.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.rbacConfig),r(e.authority),r(e.systemProgram)],programAddress:n,data:ke().encode(c)}}function oW(t,o){let n=o?.programAddress??a,e={rbacConfig:{value:t.rbacConfig??null,isWritable:true},authority:{value:t.authority??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.rbacConfig),r(e.authority),r(e.systemProgram)],programAddress:n,data:ke().encode(c)}}function cW(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{rbacConfig:n(),authority:n(),systemProgram:n()},data:Ji().decode(t.data)}}var Zi=new Uint8Array([189,189,171,33,115,17,231,2]);function uW(){return fixEncoderSize(getBytesEncoder(),8).encode(Zi)}function he(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["transferFeeBasisPoints",getU16Encoder()],["maximumFee",getU64Encoder()],["transferFeeAuthority",getOptionEncoder(getAddressEncoder())],["withdrawWithheldAuthority",getOptionEncoder(getAddressEncoder())]]),t=>({...t,discriminator:Zi}))}function Yi(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["transferFeeBasisPoints",getU16Decoder()],["maximumFee",getU64Decoder()],["transferFeeAuthority",getOptionDecoder(getAddressDecoder())],["withdrawWithheldAuthority",getOptionDecoder(getAddressDecoder())]])}function dW(){return combineCodec(he(),Yi())}async function gW(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},mint:{value:t.mint??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.agent.value||(e.agent.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.authority.value))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.authority),r(e.mint),r(e.agent),r(e.tokenProgram)],programAddress:n,data:he().encode(c)}}function TW(t,o){let n=o?.programAddress??a,e={authority:{value:t.authority??null,isWritable:true},mint:{value:t.mint??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.authority),r(e.mint),r(e.agent),r(e.tokenProgram)],programAddress:n,data:he().encode(c)}}function lW(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{authority:n(),mint:n(),agent:n(),tokenProgram:n()},data:Yi().decode(t.data)}}var rA=new Uint8Array([170,46,176,41,191,255,104,205]);function PW(){return fixEncoderSize(getBytesEncoder(),8).encode(rA)}function Ue(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["initialOffer",getU64Encoder()],["autoAcceptThreshold",getU64Encoder()],["negotiationDeadline",getI64Encoder()]]),t=>({...t,discriminator:rA}))}function oA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["initialOffer",getU64Decoder()],["autoAcceptThreshold",getU64Decoder()],["negotiationDeadline",getI64Decoder()]])}function EW(){return combineCodec(Ue(),oA())}async function SW(t,o){let n=o?.programAddress??a,e={negotiation:{value:t.negotiation??null,isWritable:true},initiator:{value:t.initiator??null,isWritable:true},counterparty:{value:t.counterparty??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.negotiation.value||(e.negotiation.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([110,101,103,111,116,105,97,116,105,111,110])),getAddressEncoder().encode(g(e.initiator.value)),getAddressEncoder().encode(g(e.counterparty.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.negotiation),r(e.initiator),r(e.counterparty),r(e.systemProgram)],programAddress:n,data:Ue().encode(c)}}function IW(t,o){let n=o?.programAddress??a,e={negotiation:{value:t.negotiation??null,isWritable:true},initiator:{value:t.initiator??null,isWritable:true},counterparty:{value:t.counterparty??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.negotiation),r(e.initiator),r(e.counterparty),r(e.systemProgram)],programAddress:n,data:Ue().encode(c)}}function xW(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{negotiation:n(),initiator:n(),counterparty:n(),systemProgram:n()},data:oA().decode(t.data)}}var sA=new Uint8Array([124,39,115,89,217,26,38,29]);function fW(){return fixEncoderSize(getBytesEncoder(),8).encode(sA)}function Ne(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),t=>({...t,discriminator:sA}))}function aA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function kW(){return combineCodec(Ne(),aA())}async function OW(t,o){let n=o?.programAddress??a,e={channel:{value:t.channel??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},user:{value:t.user??null,isWritable:true},userAgent:{value:t.userAgent??null,isWritable:false}};e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]}));let c=h(n,"programId");return {accounts:[c(e.channel),c(e.reentrancyGuard),c(e.user),c(e.userAgent)],programAddress:n,data:Ne().encode({})}}function vW(t,o){let n=o?.programAddress??a,e={channel:{value:t.channel??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},user:{value:t.user??null,isWritable:true},userAgent:{value:t.userAgent??null,isWritable:false}},c=h(n,"programId");return {accounts:[c(e.channel),c(e.reentrancyGuard),c(e.user),c(e.userAgent)],programAddress:n,data:Ne().encode({})}}function hW(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{channel:n(),reentrancyGuard:n(),user:n(),userAgent:n()},data:aA().decode(t.data)}}var AA=new Uint8Array([104,0,75,134,95,80,68,186]);function KW(){return fixEncoderSize(getBytesEncoder(),8).encode(AA)}function We(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),t=>({...t,discriminator:AA}))}function uA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function WW(){return combineCodec(We(),uA())}async function LW(t,o){let n=o?.programAddress??a,e={channel:{value:t.channel??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},user:{value:t.user??null,isWritable:true}};e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]}));let c=h(n,"programId");return {accounts:[c(e.channel),c(e.reentrancyGuard),c(e.user)],programAddress:n,data:We().encode({})}}function wW(t,o){let n=o?.programAddress??a,e={channel:{value:t.channel??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},user:{value:t.user??null,isWritable:true}},c=h(n,"programId");return {accounts:[c(e.channel),c(e.reentrancyGuard),c(e.user)],programAddress:n,data:We().encode({})}}function HW(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{channel:n(),reentrancyGuard:n(),user:n()},data:uA().decode(t.data)}}var TA=new Uint8Array([3,233,3,123,241,61,231,238]);function JW(){return fixEncoderSize(getBytesEncoder(),8).encode(TA)}function we(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["listingPrice",getU64Encoder()]]),t=>({...t,discriminator:TA}))}function lA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["listingPrice",getU64Decoder()]])}function QW(){return combineCodec(we(),lA())}async function qW(t,o){let n=o?.programAddress??a,e={resale:{value:t.resale??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},seller:{value:t.seller??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.resale.value||(e.resale.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,115,97,108,101])),getAddressEncoder().encode(g(e.agent.value)),getAddressEncoder().encode(g(e.seller.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.resale),r(e.agent),r(e.seller),r(e.systemProgram)],programAddress:n,data:we().encode(c)}}function jW(t,o){let n=o?.programAddress??a,e={resale:{value:t.resale??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},seller:{value:t.seller??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.resale),r(e.agent),r(e.seller),r(e.systemProgram)],programAddress:n,data:we().encode(c)}}function XW(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{resale:n(),agent:n(),seller:n(),systemProgram:n()},data:lA().decode(t.data)}}var pA=new Uint8Array([74,8,96,55,146,85,200,152]);function eL(){return fixEncoderSize(getBytesEncoder(),8).encode(pA)}function RA(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["counterOffer",getU64Encoder()],["message",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:pA}))}function PA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["counterOffer",getU64Decoder()],["message",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function nL(){return combineCodec(RA(),PA())}function rL(t,o){let n=o?.programAddress??a,e={negotiation:{value:t.negotiation??null,isWritable:true},sender:{value:t.sender??null,isWritable:false}},c={...t},r=h(n,"programId");return {accounts:[r(e.negotiation),r(e.sender)],programAddress:n,data:RA().encode(c)}}function oL(t){if(t.accounts.length<2)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{negotiation:n(),sender:n()},data:PA().decode(t.data)}}var SA=new Uint8Array([164,219,91,38,45,31,33,47]);function AL(){return fixEncoderSize(getBytesEncoder(),8).encode(SA)}function Fe(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["newStatus",getBooleanEncoder()]]),t=>({...t,discriminator:SA}))}function IA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["newStatus",getBooleanDecoder()]])}function uL(){return combineCodec(Fe(),IA())}async function dL(t,o){let n=o?.programAddress??a,e={agent:{value:t.agent??null,isWritable:true},owner:{value:t.owner??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.agent.value||(e.agent.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.owner.value))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agent),r(e.owner),r(e.clock)],programAddress:n,data:Fe().encode(c)}}function gL(t,o){let n=o?.programAddress??a,e={agent:{value:t.agent??null,isWritable:true},owner:{value:t.owner??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agent),r(e.owner),r(e.clock)],programAddress:n,data:Fe().encode(c)}}function TL(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{agent:n(),owner:n(),clock:n()},data:IA().decode(t.data)}}var DA=new Uint8Array([38,170,233,87,52,65,23,128]);function RL(){return fixEncoderSize(getBytesEncoder(),8).encode(DA)}function _A(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["bidAmount",getU64Encoder()]]),t=>({...t,discriminator:DA}))}function MA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["bidAmount",getU64Decoder()]])}function PL(){return combineCodec(_A(),MA())}function EL(t,o){let n=o?.programAddress??a,e={auction:{value:t.auction??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:false},bidder:{value:t.bidder??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.auction),r(e.userRegistry),r(e.bidder),r(e.systemProgram),r(e.clock)],programAddress:n,data:_A().encode(c)}}function SL(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{auction:n(),userRegistry:n(),bidder:n(),systemProgram:n(),clock:n()},data:MA().decode(t.data)}}var OA=new Uint8Array([209,244,155,47,62,54,119,34]);function _L(){return fixEncoderSize(getBytesEncoder(),8).encode(OA)}function vA(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),t=>({...t,discriminator:OA}))}function hA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function ML(){return combineCodec(vA(),hA())}function fL(t,o){let n=o?.programAddress??a,e={auction:{value:t.auction??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:false},bidder:{value:t.bidder??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let c=h(n,"programId");return {accounts:[c(e.auction),c(e.userRegistry),c(e.bidder),c(e.systemProgram),c(e.clock)],programAddress:n,data:vA().encode({})}}function kL(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{auction:n(),userRegistry:n(),bidder:n(),systemProgram:n(),clock:n()},data:hA().decode(t.data)}}var UA=new Uint8Array([99,206,125,26,181,158,189,238]);function UL(){return fixEncoderSize(getBytesEncoder(),8).encode(UA)}function Be(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["workOrder",getAddressEncoder()]]),t=>({...t,discriminator:UA}))}function GA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["workOrder",getAddressDecoder()]])}function GL(){return combineCodec(Be(),GA())}async function NL(t,o){let n=o?.programAddress??a,e={payment:{value:t.payment??null,isWritable:true},escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},recipientTokenAccount:{value:t.recipientTokenAccount??null,isWritable:true},recipient:{value:t.recipient??null,isWritable:false},paymentToken:{value:t.paymentToken??null,isWritable:false},authority:{value:t.authority??null,isWritable:true},tokenProgram:{value:t.tokenProgram??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.payment.value||(e.payment.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([112,97,121,109,101,110,116])),getAddressEncoder().encode(g(e.escrow.value))]})),e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]})),e.escrowTokenAccount.value||(e.escrowTokenAccount.value=await getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[getAddressEncoder().encode(g(e.escrow.value)),getBytesEncoder().encode(new Uint8Array([6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169])),getAddressEncoder().encode(g(e.paymentToken.value))]})),e.recipientTokenAccount.value||(e.recipientTokenAccount.value=await getProgramDerivedAddress({programAddress:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",seeds:[getAddressEncoder().encode(g(e.recipient.value)),getBytesEncoder().encode(new Uint8Array([6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169])),getAddressEncoder().encode(g(e.paymentToken.value))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.payment),r(e.escrow),r(e.reentrancyGuard),r(e.escrowTokenAccount),r(e.recipientTokenAccount),r(e.recipient),r(e.paymentToken),r(e.authority),r(e.tokenProgram),r(e.systemProgram)],programAddress:n,data:Be().encode(c)}}function KL(t,o){let n=o?.programAddress??a,e={payment:{value:t.payment??null,isWritable:true},escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},recipientTokenAccount:{value:t.recipientTokenAccount??null,isWritable:true},recipient:{value:t.recipient??null,isWritable:false},paymentToken:{value:t.paymentToken??null,isWritable:false},authority:{value:t.authority??null,isWritable:true},tokenProgram:{value:t.tokenProgram??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.payment),r(e.escrow),r(e.reentrancyGuard),r(e.escrowTokenAccount),r(e.recipientTokenAccount),r(e.recipient),r(e.paymentToken),r(e.authority),r(e.tokenProgram),r(e.systemProgram)],programAddress:n,data:Be().encode(c)}}function WL(t){if(t.accounts.length<10)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{payment:n(),escrow:n(),reentrancyGuard:n(),escrowTokenAccount:n(),recipientTokenAccount:n(),recipient:n(),paymentToken:n(),authority:n(),tokenProgram:n(),systemProgram:n()},data:GA().decode(t.data)}}var KA=new Uint8Array([91,2,45,239,179,132,197,213]);function BL(){return fixEncoderSize(getBytesEncoder(),8).encode(KA)}function Ve(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["clientRefundPercentage",getU8Encoder()]]),t=>({...t,discriminator:KA}))}function WA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["clientRefundPercentage",getU8Decoder()]])}function zL(){return combineCodec(Ve(),WA())}async function VL(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},clientRefundAccount:{value:t.clientRefundAccount??null,isWritable:true},agentPaymentAccount:{value:t.agentPaymentAccount??null,isWritable:true},paymentToken:{value:t.paymentToken??null,isWritable:false},authority:{value:t.authority??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.escrow),r(e.reentrancyGuard),r(e.escrowTokenAccount),r(e.clientRefundAccount),r(e.agentPaymentAccount),r(e.paymentToken),r(e.authority),r(e.tokenProgram)],programAddress:n,data:Ve().encode(c)}}function JL(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},clientRefundAccount:{value:t.clientRefundAccount??null,isWritable:true},agentPaymentAccount:{value:t.agentPaymentAccount??null,isWritable:true},paymentToken:{value:t.paymentToken??null,isWritable:false},authority:{value:t.authority??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false}},c={...t};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let r=h(n,"programId");return {accounts:[r(e.escrow),r(e.reentrancyGuard),r(e.escrowTokenAccount),r(e.clientRefundAccount),r(e.agentPaymentAccount),r(e.paymentToken),r(e.authority),r(e.tokenProgram)],programAddress:n,data:Ve().encode(c)}}function QL(t){if(t.accounts.length<8)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{escrow:n(),reentrancyGuard:n(),escrowTokenAccount:n(),clientRefundAccount:n(),agentPaymentAccount:n(),paymentToken:n(),authority:n(),tokenProgram:n()},data:WA().decode(t.data)}}var wA=new Uint8Array([189,81,30,198,139,186,115,23]);function YL(){return fixEncoderSize(getBytesEncoder(),8).encode(wA)}function Qe(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["amount",getU64Encoder()],["useConfidentialTransfer",getBooleanEncoder()]]),t=>({...t,discriminator:wA}))}function HA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["amount",getU64Decoder()],["useConfidentialTransfer",getBooleanDecoder()]])}function $L(){return combineCodec(Qe(),HA())}async function tw(t,o){let n=o?.programAddress??a,e={payment:{value:t.payment??null,isWritable:true},workOrder:{value:t.workOrder??null,isWritable:true},providerAgent:{value:t.providerAgent??null,isWritable:true},payer:{value:t.payer??null,isWritable:true},payerTokenAccount:{value:t.payerTokenAccount??null,isWritable:true},providerTokenAccount:{value:t.providerTokenAccount??null,isWritable:true},tokenMint:{value:t.tokenMint??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.payment.value||(e.payment.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([112,97,121,109,101,110,116])),getAddressEncoder().encode(g(e.workOrder.value))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.payment),r(e.workOrder),r(e.providerAgent),r(e.payer),r(e.payerTokenAccount),r(e.providerTokenAccount),r(e.tokenMint),r(e.tokenProgram),r(e.systemProgram)],programAddress:n,data:Qe().encode(c)}}function ew(t,o){let n=o?.programAddress??a,e={payment:{value:t.payment??null,isWritable:true},workOrder:{value:t.workOrder??null,isWritable:true},providerAgent:{value:t.providerAgent??null,isWritable:true},payer:{value:t.payer??null,isWritable:true},payerTokenAccount:{value:t.payerTokenAccount??null,isWritable:true},providerTokenAccount:{value:t.providerTokenAccount??null,isWritable:true},tokenMint:{value:t.tokenMint??null,isWritable:false},tokenProgram:{value:t.tokenProgram??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.payment),r(e.workOrder),r(e.providerAgent),r(e.payer),r(e.payerTokenAccount),r(e.providerTokenAccount),r(e.tokenMint),r(e.tokenProgram),r(e.systemProgram)],programAddress:n,data:Qe().encode(c)}}function nw(t){if(t.accounts.length<9)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{payment:n(),workOrder:n(),providerAgent:n(),payer:n(),payerTokenAccount:n(),providerTokenAccount:n(),tokenMint:n(),tokenProgram:n(),systemProgram:n()},data:HA().decode(t.data)}}var qA=new Uint8Array([197,43,201,158,119,134,66,7]);function aw(){return fixEncoderSize(getBytesEncoder(),8).encode(qA)}function Ze(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["listingId",getU64Encoder()],["quantity",getU32Encoder()],["requirements",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["customInstructions",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["deadline",getI64Encoder()]]),t=>({...t,discriminator:qA}))}function jA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["listingId",getU64Decoder()],["quantity",getU32Decoder()],["requirements",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["customInstructions",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["deadline",getI64Decoder()]])}function iw(){return combineCodec(Ze(),jA())}async function Aw(t,o){let n=o?.programAddress??a,e={servicePurchase:{value:t.servicePurchase??null,isWritable:true},serviceListing:{value:t.serviceListing??null,isWritable:true},buyer:{value:t.buyer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.servicePurchase.value||(e.servicePurchase.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([115,101,114,118,105,99,101,95,112,117,114,99,104,97,115,101])),getAddressEncoder().encode(g(e.buyer.value)),getAddressEncoder().encode(g(e.serviceListing.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.servicePurchase),r(e.serviceListing),r(e.buyer),r(e.systemProgram)],programAddress:n,data:Ze().encode(c)}}function uw(t,o){let n=o?.programAddress??a,e={servicePurchase:{value:t.servicePurchase??null,isWritable:true},serviceListing:{value:t.serviceListing??null,isWritable:true},buyer:{value:t.buyer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.servicePurchase),r(e.serviceListing),r(e.buyer),r(e.systemProgram)],programAddress:n,data:Ze().encode(c)}}function dw(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{servicePurchase:n(),serviceListing:n(),buyer:n(),systemProgram:n()},data:jA().decode(t.data)}}var ZA=new Uint8Array([40,9,115,148,140,7,157,160]);function mw(){return fixEncoderSize(getBytesEncoder(),8).encode(ZA)}function $e(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),t=>({...t,discriminator:ZA}))}function YA(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function pw(){return combineCodec($e(),YA())}async function Rw(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},clientRefundAccount:{value:t.clientRefundAccount??null,isWritable:true},paymentToken:{value:t.paymentToken??null,isWritable:false},caller:{value:t.caller??null,isWritable:true},tokenProgram:{value:t.tokenProgram??null,isWritable:false}};e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]})),e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let c=h(n,"programId");return {accounts:[c(e.escrow),c(e.reentrancyGuard),c(e.escrowTokenAccount),c(e.clientRefundAccount),c(e.paymentToken),c(e.caller),c(e.tokenProgram)],programAddress:n,data:$e().encode({})}}function Pw(t,o){let n=o?.programAddress??a,e={escrow:{value:t.escrow??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},escrowTokenAccount:{value:t.escrowTokenAccount??null,isWritable:true},clientRefundAccount:{value:t.clientRefundAccount??null,isWritable:true},paymentToken:{value:t.paymentToken??null,isWritable:false},caller:{value:t.caller??null,isWritable:true},tokenProgram:{value:t.tokenProgram??null,isWritable:false}};e.tokenProgram.value||(e.tokenProgram.value="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let c=h(n,"programId");return {accounts:[c(e.escrow),c(e.reentrancyGuard),c(e.escrowTokenAccount),c(e.clientRefundAccount),c(e.paymentToken),c(e.caller),c(e.tokenProgram)],programAddress:n,data:$e().encode({})}}function Ew(t){if(t.accounts.length<7)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{escrow:n(),reentrancyGuard:n(),escrowTokenAccount:n(),clientRefundAccount:n(),paymentToken:n(),caller:n(),tokenProgram:n()},data:YA().decode(t.data)}}var cu=new Uint8Array([135,157,66,195,2,113,175,30]);function Dw(){return fixEncoderSize(getBytesEncoder(),8).encode(cu)}function rn(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentType",getU8Encoder()],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:cu}))}function su(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentType",getU8Decoder()],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function _w(){return combineCodec(rn(),su())}async function Mw(t,o){let n=o?.programAddress??a,e={agentAccount:{value:t.agentAccount??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},signer:{value:t.signer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.agentAccount.value||(e.agentAccount.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.signer.value)),addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()).encode(f(c.agentId))]})),e.userRegistry.value||(e.userRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(g(e.signer.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentAccount),r(e.userRegistry),r(e.signer),r(e.systemProgram),r(e.clock)],programAddress:n,data:rn().encode(c)}}function fw(t,o){let n=o?.programAddress??a,e={agentAccount:{value:t.agentAccount??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},signer:{value:t.signer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentAccount),r(e.userRegistry),r(e.signer),r(e.systemProgram),r(e.clock)],programAddress:n,data:rn().encode(c)}}function kw(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{agentAccount:n(),userRegistry:n(),signer:n(),systemProgram:n(),clock:n()},data:su().decode(t.data)}}var iu=new Uint8Array([158,205,4,17,6,106,172,148]);function Gw(){return fixEncoderSize(getBytesEncoder(),8).encode(iu)}function cn(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["metadata",_f()],["codeHash",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["revenueShare",getF64Encoder()]]),t=>({...t,discriminator:iu}))}function Au(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["metadata",$f()],["codeHash",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["revenueShare",getF64Decoder()]])}function Nw(){return combineCodec(cn(),Au())}async function Kw(t,o){let n=o?.programAddress??a,e={extension:{value:t.extension??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},developer:{value:t.developer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.userRegistry.value||(e.userRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(g(e.developer.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.extension),r(e.userRegistry),r(e.developer),r(e.systemProgram),r(e.clock)],programAddress:n,data:cn().encode(c)}}function Ww(t,o){let n=o?.programAddress??a,e={extension:{value:t.extension??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},developer:{value:t.developer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.extension),r(e.userRegistry),r(e.developer),r(e.systemProgram),r(e.clock)],programAddress:n,data:cn().encode(c)}}function Lw(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{extension:n(),userRegistry:n(),developer:n(),systemProgram:n(),clock:n()},data:Au().decode(t.data)}}var Ru=new Uint8Array([123,7,32,171,41,109,58,250]);function Vw(){return fixEncoderSize(getBytesEncoder(),8).encode(Ru)}function Pu(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["rejectionReason",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["requestedChanges",getOptionEncoder(getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())))]]),t=>({...t,discriminator:Ru}))}function Eu(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["rejectionReason",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["requestedChanges",getOptionDecoder(getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())))]])}function Jw(){return combineCodec(Pu(),Eu())}function Qw(t,o){let n=o?.programAddress??a,e={workOrder:{value:t.workOrder??null,isWritable:true},workDelivery:{value:t.workDelivery??null,isWritable:false},client:{value:t.client??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.workOrder),r(e.workDelivery),r(e.client),r(e.clock)],programAddress:n,data:Pu().encode(c)}}function qw(t){if(t.accounts.length<4)throw new Error(w("reject_work_delivery",t.accounts.length));let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{workOrder:n(),workDelivery:n(),client:n(),clock:n()},data:Eu().decode(t.data)}}var Iu=new Uint8Array([252,210,89,130,31,43,39,50]);function tH(){return fixEncoderSize(getBytesEncoder(),8).encode(Iu)}function an(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["customization",L()],["royaltyPercentage",getU32Encoder()]]),t=>({...t,discriminator:Iu}))}function xu(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["customization",M()],["royaltyPercentage",getU32Decoder()]])}function eH(){return combineCodec(an(),xu())}async function nH(t,o){let n=o?.programAddress??a,e={replicationTemplate:{value:t.replicationTemplate??null,isWritable:true},newAgent:{value:t.newAgent??null,isWritable:true},replicationRecord:{value:t.replicationRecord??null,isWritable:true},royaltyStream:{value:t.royaltyStream??null,isWritable:true},buyer:{value:t.buyer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.newAgent.value||(e.newAgent.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.buyer.value))]})),e.replicationRecord.value||(e.replicationRecord.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,112,108,105,99,97,116,105,111,110,95,114,101,99,111,114,100])),getAddressEncoder().encode(g(e.replicationTemplate.value)),getAddressEncoder().encode(g(e.buyer.value))]})),e.royaltyStream.value||(e.royaltyStream.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,111,121,97,108,116,121,95,115,116,114,101,97,109])),getAddressEncoder().encode(g(e.newAgent.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.replicationTemplate),r(e.newAgent),r(e.replicationRecord),r(e.royaltyStream),r(e.buyer),r(e.systemProgram)],programAddress:n,data:an().encode(c)}}function rH(t,o){let n=o?.programAddress??a,e={replicationTemplate:{value:t.replicationTemplate??null,isWritable:true},newAgent:{value:t.newAgent??null,isWritable:true},replicationRecord:{value:t.replicationRecord??null,isWritable:true},royaltyStream:{value:t.royaltyStream??null,isWritable:true},buyer:{value:t.buyer??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.replicationTemplate),r(e.newAgent),r(e.replicationRecord),r(e.royaltyStream),r(e.buyer),r(e.systemProgram)],programAddress:n,data:an().encode(c)}}function oH(t){if(t.accounts.length<6)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{replicationTemplate:n(),newAgent:n(),replicationRecord:n(),royaltyStream:n(),buyer:n(),systemProgram:n()},data:xu().decode(t.data)}}var Du=new Uint8Array([231,6,202,6,96,103,12,230]);function AH(){return fixEncoderSize(getBytesEncoder(),8).encode(Du)}function un(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["resolution",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["awardToComplainant",getBooleanEncoder()]]),t=>({...t,discriminator:Du}))}function _u(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["resolution",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["awardToComplainant",getBooleanDecoder()]])}function uH(){return combineCodec(un(),_u())}async function dH(t,o){let n=o?.programAddress??a,e={dispute:{value:t.dispute??null,isWritable:true},arbitratorRegistry:{value:t.arbitratorRegistry??null,isWritable:false},arbitrator:{value:t.arbitrator??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.arbitratorRegistry.value||(e.arbitratorRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,114,98,105,116,114,97,116,111,114,95,114,101,103,105,115,116,114,121]))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dispute),r(e.arbitratorRegistry),r(e.arbitrator),r(e.clock)],programAddress:n,data:un().encode(c)}}function gH(t,o){let n=o?.programAddress??a,e={dispute:{value:t.dispute??null,isWritable:true},arbitratorRegistry:{value:t.arbitratorRegistry??null,isWritable:false},arbitrator:{value:t.arbitrator??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dispute),r(e.arbitratorRegistry),r(e.arbitrator),r(e.clock)],programAddress:n,data:un().encode(c)}}function TH(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{dispute:n(),arbitratorRegistry:n(),arbitrator:n(),clock:n()},data:_u().decode(t.data)}}var Ku=new Uint8Array([84,12,203,77,36,199,15,83]);function RH(){return fixEncoderSize(getBytesEncoder(),8).encode(Ku)}function Wu(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["messageId",getU64Encoder()],["sessionId",getU64Encoder()],["sender",getAddressEncoder()],["content",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["messageType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["timestamp",getI64Encoder()]]),t=>({...t,discriminator:Ku}))}function Lu(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["messageId",getU64Decoder()],["sessionId",getU64Decoder()],["sender",getAddressDecoder()],["content",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["messageType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["timestamp",getI64Decoder()]])}function PH(){return combineCodec(Wu(),Lu())}function EH(t,o){let n=o?.programAddress??a,e={message:{value:t.message??null,isWritable:true},session:{value:t.session??null,isWritable:true},sender:{value:t.sender??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t,sender:t.senderArg};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.message),r(e.session),r(e.sender),r(e.systemProgram)],programAddress:n,data:Wu().encode(c)}}function SH(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{message:n(),session:n(),sender:n(),systemProgram:n()},data:Lu().decode(t.data)}}var Vu=new Uint8Array([157,174,222,205,233,240,244,136]);function MH(){return fixEncoderSize(getBytesEncoder(),8).encode(Vu)}function ln(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["messageId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["content",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["messageType",Fh$1()],["metadata",sh$1()],["isEncrypted",getBooleanEncoder()]]),t=>({...t,discriminator:Vu}))}function Ju(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["messageId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["content",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["messageType",Gh$1()],["metadata",th()],["isEncrypted",getBooleanDecoder()]])}function fH(){return combineCodec(ln(),Ju())}async function kH(t,o){let n=o?.programAddress??a,e={message:{value:t.message??null,isWritable:true},channel:{value:t.channel??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},sender:{value:t.sender??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.message.value||(e.message.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([109,101,115,115,97,103,101])),getAddressEncoder().encode(g(e.channel.value)),addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()).encode(f(c.messageId))]})),e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.message),r(e.channel),r(e.reentrancyGuard),r(e.sender),r(e.systemProgram)],programAddress:n,data:ln().encode(c)}}function OH(t,o){let n=o?.programAddress??a,e={message:{value:t.message??null,isWritable:true},channel:{value:t.channel??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},sender:{value:t.sender??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.message),r(e.channel),r(e.reentrancyGuard),r(e.sender),r(e.systemProgram)],programAddress:n,data:ln().encode(c)}}function vH(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{message:n(),channel:n(),reentrancyGuard:n(),sender:n(),systemProgram:n()},data:Ju().decode(t.data)}}var ju=new Uint8Array([57,40,34,178,189,10,65,26]);function KH(){return fixEncoderSize(getBytesEncoder(),8).encode(ju)}function Xu(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["content",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["messageType",Fh$1()],["isEncrypted",getBooleanEncoder()]]),t=>({...t,discriminator:ju}))}function Zu(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["content",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["messageType",Gh$1()],["isEncrypted",getBooleanDecoder()]])}function WH(){return combineCodec(Xu(),Zu())}function LH(t,o){let n=o?.programAddress??a,e={message:{value:t.message??null,isWritable:true},channel:{value:t.channel??null,isWritable:true},sender:{value:t.sender??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.message),r(e.channel),r(e.sender),r(e.systemProgram)],programAddress:n,data:Xu().encode(c)}}function wH(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{message:n(),channel:n(),sender:n(),systemProgram:n()},data:Zu().decode(t.data)}}var cd=new Uint8Array([177,174,100,125,106,213,241,22]);function VH(){return fixEncoderSize(getBytesEncoder(),8).encode(cd)}function mn(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["evidenceType",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["evidenceData",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:cd}))}function sd(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["evidenceType",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["evidenceData",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function JH(){return combineCodec(mn(),sd())}async function QH(t,o){let n=o?.programAddress??a,e={dispute:{value:t.dispute??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},submitter:{value:t.submitter??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.userRegistry.value||(e.userRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(g(e.submitter.value))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dispute),r(e.userRegistry),r(e.submitter),r(e.clock)],programAddress:n,data:mn().encode(c)}}function qH(t,o){let n=o?.programAddress??a,e={dispute:{value:t.dispute??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},submitter:{value:t.submitter??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dispute),r(e.userRegistry),r(e.submitter),r(e.clock)],programAddress:n,data:mn().encode(c)}}function jH(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{dispute:n(),userRegistry:n(),submitter:n(),clock:n()},data:sd().decode(t.data)}}var id=new Uint8Array([168,150,145,75,38,203,43,9]);function e8(){return fixEncoderSize(getBytesEncoder(),8).encode(id)}function Rn(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["evidenceBatch",getArrayEncoder(Of())]]),t=>({...t,discriminator:id}))}function Ad(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["evidenceBatch",getArrayDecoder(Pf())]])}function n8(){return combineCodec(Rn(),Ad())}async function r8(t,o){let n=o?.programAddress??a,e={dispute:{value:t.dispute??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},submitter:{value:t.submitter??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.userRegistry.value||(e.userRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(g(e.submitter.value))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dispute),r(e.userRegistry),r(e.submitter),r(e.clock)],programAddress:n,data:Rn().encode(c)}}function o8(t,o){let n=o?.programAddress??a,e={dispute:{value:t.dispute??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},submitter:{value:t.submitter??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dispute),r(e.userRegistry),r(e.submitter),r(e.clock)],programAddress:n,data:Rn().encode(c)}}function c8(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{dispute:n(),userRegistry:n(),submitter:n(),clock:n()},data:Ad().decode(t.data)}}var pd=new Uint8Array([151,198,209,252,41,69,106,93]);function g8(){return fixEncoderSize(getBytesEncoder(),8).encode(pd)}function En(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["deliverables",getArrayEncoder(he$1())],["ipfsHash",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:pd}))}function Rd(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["deliverables",getArrayDecoder(ie())],["ipfsHash",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function T8(){return combineCodec(En(),Rd())}async function l8(t,o){let n=o?.programAddress??a,e={workDelivery:{value:t.workDelivery??null,isWritable:true},workOrder:{value:t.workOrder??null,isWritable:true},provider:{value:t.provider??null,isWritable:true},clock:{value:t.clock??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.workDelivery.value||(e.workDelivery.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([119,111,114,107,95,100,101,108,105,118,101,114,121])),getAddressEncoder().encode(g(e.workOrder.value))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.workDelivery),r(e.workOrder),r(e.provider),r(e.clock),r(e.systemProgram)],programAddress:n,data:En().encode(c)}}function y8(t,o){let n=o?.programAddress??a,e={workDelivery:{value:t.workDelivery??null,isWritable:true},workOrder:{value:t.workOrder??null,isWritable:true},provider:{value:t.provider??null,isWritable:true},clock:{value:t.clock??null,isWritable:false},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111"),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.workDelivery),r(e.workOrder),r(e.provider),r(e.clock),r(e.systemProgram)],programAddress:n,data:En().encode(c)}}function m8(t){if(t.accounts.length<5)throw new Error(w("submit_work_delivery",t.accounts.length));let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{workDelivery:n(),workOrder:n(),provider:n(),clock:n(),systemProgram:n()},data:Rd().decode(t.data)}}var Sd=new Uint8Array([144,82,0,72,160,132,35,121]);function S8(){return fixEncoderSize(getBytesEncoder(),8).encode(Sd)}function Id(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)]]),t=>({...t,discriminator:Sd}))}function xd(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)]])}function I8(){return combineCodec(Id(),xd())}function x8(t,o){let n=o?.programAddress??a,e={proposal:{value:t.proposal??null,isWritable:true},authority:{value:t.authority??null,isWritable:true}},c=h(n,"programId");return {accounts:[c(e.proposal),c(e.authority)],programAddress:n,data:Id().encode({})}}function C8(t){if(t.accounts.length<2)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{proposal:n(),authority:n()},data:xd().decode(t.data)}}var hd=new Uint8Array([10,122,84,103,225,186,125,183]);function k8(){return fixEncoderSize(getBytesEncoder(),8).encode(hd)}function In(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["statusId",getU64Encoder()],["agent",getAddressEncoder()],["status",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["capabilities",getArrayEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))],["availability",getBooleanEncoder()],["lastUpdated",getI64Encoder()]]),t=>({...t,discriminator:hd}))}function bd(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["statusId",getU64Decoder()],["agent",getAddressDecoder()],["status",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["capabilities",getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))],["availability",getBooleanDecoder()],["lastUpdated",getI64Decoder()]])}function O8(){return combineCodec(In(),bd())}async function v8(t,o){let n=o?.programAddress??a,e={status:{value:t.status??null,isWritable:true},session:{value:t.session??null,isWritable:false},updater:{value:t.updater??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t,status:t.statusArg};e.status.value||(e.status.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,50,97,95,115,116,97,116,117,115])),getAddressEncoder().encode(g(e.session.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.status),r(e.session),r(e.updater),r(e.systemProgram)],programAddress:n,data:In().encode(c)}}function h8(t,o){let n=o?.programAddress??a,e={status:{value:t.status??null,isWritable:true},session:{value:t.session??null,isWritable:false},updater:{value:t.updater??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t,status:t.statusArg};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.status),r(e.session),r(e.updater),r(e.systemProgram)],programAddress:n,data:In().encode(c)}}function b8(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{status:n(),session:n(),updater:n(),systemProgram:n()},data:bd().decode(t.data)}}var Wd=new Uint8Array([85,2,178,9,119,139,102,164]);function W8(){return fixEncoderSize(getBytesEncoder(),8).encode(Wd)}function Mn(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentType",getU8Encoder()],["metadataUri",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:Wd}))}function Ld(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentType",getU8Decoder()],["metadataUri",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function L8(){return combineCodec(Mn(),Ld())}async function w8(t,o){let n=o?.programAddress??a,e={agentAccount:{value:t.agentAccount??null,isWritable:true},signer:{value:t.signer??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.agentAccount.value||(e.agentAccount.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.signer.value)),addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()).encode(f(c.agentId))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentAccount),r(e.signer),r(e.clock)],programAddress:n,data:Mn().encode(c)}}function H8(t,o){let n=o?.programAddress??a,e={agentAccount:{value:t.agentAccount??null,isWritable:true},signer:{value:t.signer??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentAccount),r(e.signer),r(e.clock)],programAddress:n,data:Mn().encode(c)}}function F8(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{agentAccount:n(),signer:n(),clock:n()},data:Ld().decode(t.data)}}var zd=new Uint8Array([80,227,92,245,231,37,99,180]);function Q8(){return fixEncoderSize(getBytesEncoder(),8).encode(zd)}function kn(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentId",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["reputationScore",getU64Encoder()]]),t=>({...t,discriminator:zd}))}function Vd(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentId",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["reputationScore",getU64Decoder()]])}function q8(){return combineCodec(kn(),Vd())}async function j8(t,o){let n=o?.programAddress??a,e={agentAccount:{value:t.agentAccount??null,isWritable:true},signer:{value:t.signer??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.agentAccount.value||(e.agentAccount.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.signer.value)),addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()).encode(f(c.agentId))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentAccount),r(e.signer),r(e.clock)],programAddress:n,data:kn().encode(c)}}function X8(t,o){let n=o?.programAddress??a,e={agentAccount:{value:t.agentAccount??null,isWritable:true},signer:{value:t.signer??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentAccount),r(e.signer),r(e.clock)],programAddress:n,data:kn().encode(c)}}function Z8(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{agentAccount:n(),signer:n(),clock:n()},data:Vd().decode(t.data)}}var qd=new Uint8Array([87,146,181,198,252,68,243,102]);function nF(){return fixEncoderSize(getBytesEncoder(),8).encode(qd)}function Kn(){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()))]]),t=>({...t,discriminator:qd}))}function jd(){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 rF(){return combineCodec(Kn(),jd())}async function oF(t,o){let n=o?.programAddress??a,e={agent:{value:t.agent??null,isWritable:true},owner:{value:t.owner??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.agent.value||(e.agent.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([97,103,101,110,116])),getAddressEncoder().encode(g(e.owner.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agent),r(e.owner),r(e.systemProgram)],programAddress:n,data:Kn().encode(c)}}function cF(t,o){let n=o?.programAddress??a,e={agent:{value:t.agent??null,isWritable:true},owner:{value:t.owner??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agent),r(e.owner),r(e.systemProgram)],programAddress:n,data:Kn().encode(c)}}function sF(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{agent:n(),owner:n(),systemProgram:n()},data:jd().decode(t.data)}}var Zd=new Uint8Array([184,35,106,114,27,86,233,32]);function dF(){return fixEncoderSize(getBytesEncoder(),8).encode(Zd)}function Ln(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["newMetrics",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())]]),t=>({...t,discriminator:Zd}))}function Yd(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["newMetrics",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())]])}function gF(){return combineCodec(Ln(),Yd())}async function TF(t,o){let n=o?.programAddress??a,e={dashboard:{value:t.dashboard??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},owner:{value:t.owner??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.userRegistry.value||(e.userRegistry.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([117,115,101,114,95,114,101,103,105,115,116,114,121])),getAddressEncoder().encode(g(e.owner.value))]})),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dashboard),r(e.userRegistry),r(e.owner),r(e.clock)],programAddress:n,data:Ln().encode(c)}}function lF(t,o){let n=o?.programAddress??a,e={dashboard:{value:t.dashboard??null,isWritable:true},userRegistry:{value:t.userRegistry??null,isWritable:true},owner:{value:t.owner??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.dashboard),r(e.userRegistry),r(e.owner),r(e.clock)],programAddress:n,data:Ln().encode(c)}}function yF(t){if(t.accounts.length<4)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{dashboard:n(),userRegistry:n(),owner:n(),clock:n()},data:Yd().decode(t.data)}}var eg=new Uint8Array([97,2,209,24,27,236,50,174]);function EF(){return fixEncoderSize(getBytesEncoder(),8).encode(eg)}function ng(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["newReservePrice",getU64Encoder()],["revealHidden",getBooleanEncoder()]]),t=>({...t,discriminator:eg}))}function rg(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["newReservePrice",getU64Decoder()],["revealHidden",getBooleanDecoder()]])}function SF(){return combineCodec(ng(),rg())}function IF(t,o){let n=o?.programAddress??a,e={auction:{value:t.auction??null,isWritable:true},authority:{value:t.authority??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.auction),r(e.authority),r(e.clock)],programAddress:n,data:ng().encode(c)}}function xF(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{auction:n(),authority:n(),clock:n()},data:rg().decode(t.data)}}var cg=new Uint8Array([149,67,63,108,132,122,95,128]);function kF(){return fixEncoderSize(getBytesEncoder(),8).encode(cg)}function Hn(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["newMetadata",Hc()]]),t=>({...t,discriminator:cg}))}function sg(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["newMetadata",Ic()]])}function OF(){return combineCodec(Hn(),sg())}async function vF(t,o){let n=o?.programAddress??a,e={channel:{value:t.channel??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},authority:{value:t.authority??null,isWritable:false}},c={...t};e.reentrancyGuard.value||(e.reentrancyGuard.value=await getProgramDerivedAddress({programAddress:n,seeds:[getBytesEncoder().encode(new Uint8Array([114,101,101,110,116,114,97,110,99,121,95,103,117,97,114,100]))]}));let r=h(n,"programId");return {accounts:[r(e.channel),r(e.reentrancyGuard),r(e.authority)],programAddress:n,data:Hn().encode(c)}}function hF(t,o){let n=o?.programAddress??a,e={channel:{value:t.channel??null,isWritable:true},reentrancyGuard:{value:t.reentrancyGuard??null,isWritable:true},authority:{value:t.authority??null,isWritable:false}},c={...t},r=h(n,"programId");return {accounts:[r(e.channel),r(e.reentrancyGuard),r(e.authority)],programAddress:n,data:Hn().encode(c)}}function bF(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{channel:n(),reentrancyGuard:n(),authority:n()},data:sg().decode(t.data)}}var Ag=new Uint8Array([22,97,198,34,14,133,83,168]);function WF(){return fixEncoderSize(getBytesEncoder(),8).encode(Ag)}function ug(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["currentDemand",getU64Encoder()],["peakDemand",getU64Encoder()],["averageDemand",getU64Encoder()],["demandTrend",getI32Encoder()],["demandVolatility",getU32Encoder()],["lastUpdated",getI64Encoder()]]),t=>({...t,discriminator:Ag}))}function dg(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["currentDemand",getU64Decoder()],["peakDemand",getU64Decoder()],["averageDemand",getU64Decoder()],["demandTrend",getI32Decoder()],["demandVolatility",getU32Decoder()],["lastUpdated",getI64Decoder()]])}function LF(){return combineCodec(ug(),dg())}function wF(t,o){let n=o?.programAddress??a,e={engine:{value:t.engine??null,isWritable:true},updater:{value:t.updater??null,isWritable:false}},c={...t},r=h(n,"programId");return {accounts:[r(e.engine),r(e.updater)],programAddress:n,data:ug().encode(c)}}function HF(t){if(t.accounts.length<2)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{engine:n(),updater:n()},data:dg().decode(t.data)}}var mg=new Uint8Array([156,13,81,78,11,3,54,178]);function JF(){return fixEncoderSize(getBytesEncoder(),8).encode(mg)}function pg(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["volume",getU64Encoder()],["price",getU64Encoder()]]),t=>({...t,discriminator:mg}))}function Rg(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["volume",getU64Decoder()],["price",getU64Decoder()]])}function QF(){return combineCodec(pg(),Rg())}function qF(t,o){let n=o?.programAddress??a,e={marketAnalytics:{value:t.marketAnalytics??null,isWritable:true},authority:{value:t.authority??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.marketAnalytics),r(e.authority),r(e.clock)],programAddress:n,data:pg().encode(c)}}function jF(t){if(t.accounts.length<3)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{marketAnalytics:n(),authority:n(),clock:n()},data:Rg().decode(t.data)}}var Eg=new Uint8Array([206,212,108,12,105,61,100,66]);function t2(){return fixEncoderSize(getBytesEncoder(),8).encode(Eg)}function Jn(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["agentPubkey",getAddressEncoder()],["serviceEndpoint",addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder())],["supportedCapabilities",getArrayEncoder(getU64Encoder())],["verifiedAt",getI64Encoder()]]),t=>({...t,discriminator:Eg}))}function Sg(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["agentPubkey",getAddressDecoder()],["serviceEndpoint",addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder())],["supportedCapabilities",getArrayDecoder(getU64Decoder())],["verifiedAt",getI64Decoder()]])}function e2(){return combineCodec(Jn(),Sg())}async function n2(t,o){let n=o?.programAddress??a,e={agentVerification:{value:t.agentVerification??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},verifier:{value:t.verifier??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.agentVerification.value||(e.agentVerification.value=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(g(e.agent.value)),getAddressEncoder().encode(g(e.verifier.value))]})),e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentVerification),r(e.agent),r(e.verifier),r(e.systemProgram),r(e.clock)],programAddress:n,data:Jn().encode(c)}}function r2(t,o){let n=o?.programAddress??a,e={agentVerification:{value:t.agentVerification??null,isWritable:true},agent:{value:t.agent??null,isWritable:false},verifier:{value:t.verifier??null,isWritable:true},systemProgram:{value:t.systemProgram??null,isWritable:false},clock:{value:t.clock??null,isWritable:false}},c={...t};e.systemProgram.value||(e.systemProgram.value="11111111111111111111111111111111"),e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.agentVerification),r(e.agent),r(e.verifier),r(e.systemProgram),r(e.clock)],programAddress:n,data:Jn().encode(c)}}function o2(t){if(t.accounts.length<5)throw new Error("[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts");let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{agentVerification:n(),agent:n(),verifier:n(),systemProgram:n(),clock:n()},data:Sg().decode(t.data)}}var Cg=new Uint8Array([51,21,40,11,225,15,184,230]);function u2(){return fixEncoderSize(getBytesEncoder(),8).encode(Cg)}function Dg(){return transformEncoder(getStructEncoder([["discriminator",fixEncoderSize(getBytesEncoder(),8)],["verificationNotes",getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(),getU32Encoder()))]]),t=>({...t,discriminator:Cg}))}function _g(){return getStructDecoder([["discriminator",fixDecoderSize(getBytesDecoder(),8)],["verificationNotes",getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(),getU32Decoder()))]])}function d2(){return combineCodec(Dg(),_g())}function g2(t,o){let n=o?.programAddress??a,e={workOrder:{value:t.workOrder??null,isWritable:true},workDelivery:{value:t.workDelivery??null,isWritable:false},client:{value:t.client??null,isWritable:true},clock:{value:t.clock??null,isWritable:false}},c={...t};e.clock.value||(e.clock.value="SysvarC1ock11111111111111111111111111111111");let r=h(n,"programId");return {accounts:[r(e.workOrder),r(e.workDelivery),r(e.client),r(e.clock)],programAddress:n,data:Dg().encode(c)}}function T2(t){if(t.accounts.length<4)throw new Error(w("verify_work_delivery",t.accounts.length));let o=0,n=()=>{let s=t.accounts[o];return o+=1,s};return {programAddress:t.programAddress,accounts:{workOrder:n(),workDelivery:n(),client:n(),clock:n()},data:_g().decode(t.data)}}export{Io as $,oc as $a,bt as $b,Ss as $c,ea as $d,JG as $e,xi as $f,TW as $g,EL as $h,Mw as $i,LH as $j,j8 as $k,r2 as $l,yk as A,xO as Aa,Uv as Ab,zh as Ac,eU as Ad,dG as Ae,DN as Af,wi as Ag,JW as Ah,Qe as Ai,AH as Aj,S8 as Ak,kF as Al,mk as B,Ko as Ba,Mc as Bb,Vh as Bc,nU as Bd,Sa as Be,_N as Bf,KK as Bg,we as Bh,HA as Bi,un as Bj,Id as Bk,Hn as Bl,eo as C,kO as Ca,wv as Cb,Jh as Cc,rU as Cd,pG as Ce,MN as Cf,WK as Cg,lA as Ch,$L as Ci,_u as Cj,xd as Ck,sg as Cl,Sk as D,Wo as Da,_t as Db,as as Dc,oU as Dd,Ia as De,fN as Df,LK as Dg,QW as Dh,tw as Di,uH as Dj,I8 as Dk,OF as Dl,at as E,Lo as Ea,fc as Eb,Yh as Ec,Bs as Ed,xa as Ee,Ai as Ef,wK as Eg,qW as Eh,ew as Ei,dH as Ej,x8 as Ek,vF as El,no as F,OO as Fa,Hv as Fb,Bt as Fc,AU as Fd,RG as Fe,bN as Ff,Fi as Fg,jW as Fh,nw as Fi,gH as Fj,C8 as Fk,hF as Fl,Ik as G,vO as Ga,Fv as Gb,is as Gc,Ae as Gd,PG as Ge,ui as Gf,VK as Gg,XW as Gh,qA as Gi,TH as Gj,hd as Gk,bF as Gl,xk as H,hO as Ha,Bv as Hb,$h as Hc,zs as Hd,EG as He,di as Hf,Me as Hg,pA as Hh,aw as Hi,Ku as Hj,k8 as Hk,Ag as Hl,Ck as I,Ho as Ia,zv as Ib,tb as Ic,uU as Id,_a as Ie,UN as If,Bi as Ig,eL as Ih,Ze as Ii,RH as Ij,In as Ik,WF as Il,Dk as J,KO as Ja,bc as Jb,eb as Jc,dU as Jd,_G as Je,GN as Jf,JK as Jg,RA as Jh,jA as Ji,Wu as Jj,bd as Jk,ug as Jl,co as K,pt as Ka,jv as Kb,nb as Kc,gU as Kd,Ma as Ke,NN as Kf,QK as Kg,PA as Kh,iw as Ki,Lu as Kj,O8 as Kk,dg as Kl,Ok as L,Fo as La,Mt as Lb,gs as Lc,TU as Ld,fa as Le,mi as Lf,qK as Lg,nL as Lh,Aw as Li,PH as Lj,v8 as Lk,LF as Ll,so as M,WO as Ma,Uc as Mb,ib as Mc,Qs as Md,MG as Me,FN as Mf,jK as Mg,rL as Mh,uw as Mi,EH as Mj,h8 as Mk,wF as Ml,ao as N,LO as Na,Xv as Nb,Jt as Nc,RU as Nd,fG as Ne,ye as Nf,Vi as Ng,oL as Nh,dw as Ni,SH as Nj,b8 as Nk,HF as Nl,vk as O,wO as Oa,Zv as Ob,Ts as Oc,qs as Od,kG as Oe,pi as Of,eW as Og,SA as Oh,ZA as Oi,Vu as Oj,Wd as Ok,mg as Ol,hk as P,HO as Pa,Yv as Pb,Ab as Pc,js as Pd,va as Pe,BN as Pf,ke as Pg,AL as Ph,mw as Pi,MH as Pj,W8 as Pk,JF as Pl,bk as Q,Zo as Qa,$v as Qb,ub as Qc,PU as Qd,GG as Qe,zN as Qf,Ji as Qg,Fe as Qh,$e as Qi,ln as Qj,Mn as Qk,pg as Ql,po as R,JO as Ra,Nc as Rb,db as Rc,EU as Rd,ha as Re,VN as Rf,nW as Rg,IA as Rh,YA as Ri,Ju as Rj,Ld as Rk,Rg as Rl,Wk as S,Et as Sa,ch as Sb,gb as Sc,SU as Sd,ba as Se,JN as Sf,rW as Sg,uL as Sh,pw as Si,fH as Sj,L8 as Sk,QF as Sl,dt as T,Yo as Ta,kt as Tb,ps as Tc,Zs as Td,NG as Te,Pi as Tf,oW as Tg,dL as Th,Rw as Ti,kH as Tj,w8 as Tk,qF as Tl,Ro as U,QO as Ua,Kc as Ub,pb as Uc,_U as Ud,KG as Ue,YN as Uf,cW as Ug,gL as Uh,Pw as Ui,OH as Uj,H8 as Uk,jF as Ul,Lk as V,qO as Va,sh as Vb,Qt as Vc,de as Vd,WG as Ve,pe as Vf,Zi as Vg,TL as Vh,Ew as Vi,vH as Vj,F8 as Vk,Eg as Vl,wk as W,jO as Wa,ah as Wb,Rs as Wc,Ys as Wd,Na as We,Ei as Wf,uW as Wg,DA as Wh,cu as Wi,ju as Wj,zd as Wk,t2 as Wl,Hk as X,XO as Xa,ih as Xb,Rb as Xc,MU as Xd,zG as Xe,$N as Xf,he as Xg,RL as Xh,Dw as Xi,KH as Xj,Q8 as Xk,Jn as Xl,Fk as Y,rc as Ya,Ah as Yb,Pb as Yc,fU as Yd,Ka as Ye,tK as Yf,Yi as Yg,_A as Yh,rn as Yi,Xu as Yj,kn as Yk,Sg as Yl,So as Z,ev as Za,Fc as Zb,Eb as Zc,kU as Zd,Wa as Ze,eK as Zf,dW as Zg,MA as Zh,su as Zi,Zu as Zj,Vd as Zk,e2 as Zl,Qk as _,St as _a,lh as _b,Sb as _c,OU as _d,VG as _e,nK as _f,gW as _g,PL as _h,_w as _i,WH as _j,q8 as _k,n2 as _l,fg as a,xo as aa,nv as ab,Bc as ac,_b as ad,GU as ae,QG as af,aK as ag,lW as ah,SL as ai,fw as aj,wH as ak,X8 as al,o2 as am,kg as b,qk as ba,rv as bb,yh as bc,Zt as bd,na as be,Ha as bf,Pe as bg,rA as bh,OA as bi,kw as bj,cd as bk,Z8 as bl,Cg as bm,Og as c,jk as ca,ov as cb,mh as cc,Is as cd,ra as ce,$G as cf,Ci as cg,PW as ch,_L as ci,iu as cj,VH as ck,qd as cl,u2 as cm,vg as d,Xk as da,cv as db,ph as dc,Mb as dd,NU as de,Fa as df,iK as dg,Ue as dh,vA as di,Gw as dj,mn as dk,nF as dl,Dg as dm,hg as e,Do as ea,gc as eb,Rh as ec,fb as ed,KU as ee,Ba as ef,AK as eg,oA as eh,hA as ei,cn as ej,sd as ek,Kn as el,_g as em,bg as f,eO as fa,dv as fb,Jc as fc,kb as fd,WU as fe,tN as ff,uK as fg,EW as fh,ML as fi,Au as fj,JH as fk,jd as fl,d2 as fm,Ug as g,Tt as ga,xt as gb,xh as gc,Ob as gd,sa as ge,eN as gf,dK as gg,SW as gh,fL as gi,Nw as gj,QH as gk,rF as gl,g2 as gm,Gg as h,_o as ha,Tc as hb,Gt as hc,ks as hd,zU as he,nN as hf,_i as hg,IW as hh,kL as hi,Kw as hj,qH as hk,oF as hl,T2 as hm,Ng as i,nO as ia,gv as ib,Qc as ic,Nb as id,aa as ie,Ja as if,pK as ig,xW as ih,UA as ii,Ww as ij,jH as ik,cF as il,Kg as j,rO as ja,Tv as jb,Ch as jc,Os as jd,ia as je,iN as jf,Se as jg,sA as jh,UL as ji,Lw as jj,id as jk,sF as jl,jf as k,oO as ka,lv as kb,Dh as kc,vs as kd,VU as ke,Qa as kf,Mi as kg,fW as kh,Be as ki,Ru as kj,e8 as kk,Zd as kl,Xf as l,cO as la,yv as lb,_h as lc,Kb as ld,JU as le,qa as lf,RK as lg,Ne as lh,GA as li,Vw as lj,Rn as lk,dF as ll,Jr as m,ko as ma,mc as mb,Mh as mc,Wb as md,QU as me,AN as mf,PK as mg,aA as mh,GL as mi,Pu as mj,Ad as mk,Ln as ml,rk as n,dO as na,Sv as nb,Zc as nc,Lb as nd,da as ne,uN as nf,EK as ng,kW as nh,NL as ni,Eu as nj,n8 as nk,Yd as nl,rt as o,Oo as oa,pc as ob,bh as oc,Ns as od,$U as oe,dN as of,SK as og,OW as oh,KL as oi,Jw as oj,r8 as ok,gF as ol,Qr as p,vo as pa,Rc as pb,Kt as pc,zb as pd,ga as pe,Za as pf,Ni as pg,vW as ph,WL as pi,Qw as pj,o8 as pk,TF as pl,ok as q,gO as qa,Iv as qb,Yc as qc,ce as qd,Ta as qe,mN as qf,MK as qg,hW as qh,KA as qi,qw as qj,c8 as qk,lF as ql,ck as r,TO as ra,xv as rb,Uh as rc,Ks as rd,tG as re,Ya as rf,xe as rg,AA as rh,BL as ri,Iu as rj,pd as rk,yF as rl,sk as s,lO as sa,Cv as sb,Gh as sc,Vb as sd,eG as se,$a as sf,Ki as sg,KW as sh,Ve as si,tH as sj,g8 as sk,eg as sl,ak as t,bo as ta,Ec as tb,Nh as tc,Jb as td,nG as te,pN as tf,fK as tg,We as th,WA as ti,an as tj,En as tk,EF as tl,Yr as u,PO as ua,Ov as ub,Kh as uc,Qb as ud,ma as ue,RN as uf,kK as ug,uA as uh,zL as ui,xu as uj,Rd as uk,ng as ul,gk as v,yt as va,Dt as vb,os as vc,qb as vd,iG as ve,PN as vf,OK as vg,WW as vh,VL as vi,eH as vj,T8 as vk,rg as vl,ct as w,Uo as wa,Sc as wb,Fh as wc,ws as wd,pa as we,ci as wf,vK as wg,LW as wh,JL as wi,nH as wj,l8 as wk,SF as wl,$r as x,EO as xa,vv as xb,Ht as xc,tU as xd,Ra as xe,CN as xf,Li as xg,wW as xh,QL as xi,rH as xj,y8 as xk,IF as xl,Tk as y,SO as ya,hv as yb,cs as yc,ae as yd,AG as ye,Te as yf,NK as yg,HW as yh,wA as yi,oH as yj,m8 as yk,xF as yl,lk as z,IO as za,bv as zb,Bh as zc,Hs as zd,uG as ze,si as zf,De as zg,TA as zh,YL as zi,Du as zj,Sd as zk,cg as zl};//# sourceMappingURL=chunk-QTKN3VZV.js.map
2
- //# sourceMappingURL=chunk-QTKN3VZV.js.map