Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

28.5 KB
Raw Blame
// agent-payments-sdk
// Copyright (c) 2026 nirholas | x.com/nichxbt | github.com/nirholas
// All rights reserved.

/**
 * Program IDL in camelCase format in order to be used in JS/TS.
 *
 * Note that this is only a type helper and is not the actual IDL. The original
 * IDL can be found at `target/idl/pump_agent_payments.json`.
 */
export type PumpAgentPayments = {
  address: "AgenTMiC2hvxGebTsgmsD4HHBa8WEcqGFf87iwRRxLo7";
  metadata: {
    name: "pumpAgentPayments";
    version: "0.1.0";
    spec: "0.1.0";
    description: "Created with Anchor";
  };
  instructions: [
    {
      name: "agentAcceptPayment";
      discriminator: [34, 157, 64, 220, 74, 32, 48, 225];
      accounts: [
        { name: "user"; writable: true; signer: true },
        { name: "userTokenAccount"; writable: true },
        { name: "tokenAgentPayments" },
        {
          name: "tokenAgentAssociatedAccount";
          writable: true;
          pda: {
            seeds: [
              { kind: "account"; path: "tokenAgentPayments" },
              {
                kind: "const";
                value: [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];
              },
              { kind: "account"; path: "currencyMint" },
            ];
            program: {
              kind: "const";
              value: [140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89];
            };
          };
        },
        {
          name: "tokenAgentPaymentInCurrency";
          writable: true;
          pda: {
            seeds: [
              { kind: "const"; value: [112,97,121,109,101,110,116,45,105,110,45,99,117,114,114,101,110,99,121] },
              { kind: "account"; path: "tokenAgentPayments.mint"; account: "TokenAgentPayments" },
              { kind: "account"; path: "currencyMint" },
            ];
          };
        },
        {
          name: "globalConfig";
          pda: { seeds: [{ kind: "const"; value: [103,108,111,98,97,108,45,99,111,110,102,105,103] }] };
        },
        { name: "invoiceId" },
        { name: "currencyMint" },
        { name: "tokenProgram" },
        { name: "associatedTokenProgram"; address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" },
        { name: "systemProgram"; address: "11111111111111111111111111111111" },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [
        { name: "amount"; type: "u64" },
        { name: "memo"; type: "u64" },
        { name: "startTime"; type: "i64" },
        { name: "endTime"; type: "i64" },
      ];
    },
    {
      name: "agentBuybackTrigger";
      discriminator: [95, 231, 193, 2, 245, 75, 125, 155];
      accounts: [
        { name: "globalBuybackAuthority"; writable: true; signer: true },
        { name: "mint"; writable: true },
        {
          name: "tokenAgentPayments";
          pda: {
            seeds: [
              { kind: "const"; value: [116,111,107,101,110,45,97,103,101,110,116,45,112,97,121,109,101,110,116,115] },
              { kind: "account"; path: "mint" },
            ];
          };
        },
        {
          name: "tokenAgentPaymentInCurrency";
          writable: true;
          pda: {
            seeds: [
              { kind: "const"; value: [112,97,121,109,101,110,116,45,105,110,45,99,117,114,114,101,110,99,121] },
              { kind: "account"; path: "tokenAgentPayments.mint"; account: "TokenAgentPayments" },
              { kind: "account"; path: "currencyMint" },
            ];
          };
        },
        { name: "currencyMint" },
        {
          name: "globalConfig";
          pda: { seeds: [{ kind: "const"; value: [103,108,111,98,97,108,45,99,111,110,102,105,103] }] };
        },
        { name: "swapProgramToInvoke" },
        {
          name: "burnAuthority";
          docs: ["Intentionally called burn_authority", "TO avoid any confusion with the global buyback authority."];
          writable: true;
          pda: {
            seeds: [
              { kind: "const"; value: [98,117,121,98,97,99,107,45,97,117,116,104,111,114,105,116,121] },
              { kind: "account"; path: "tokenAgentPayments.mint"; account: "TokenAgentPayments" },
            ];
          };
        },
        {
          name: "burnMintVault";
          writable: true;
          pda: {
            seeds: [
              { kind: "account"; path: "burnAuthority" },
              { kind: "account"; path: "tokenProgram" },
              { kind: "account"; path: "mint" },
            ];
            program: {
              kind: "const";
              value: [140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89];
            };
          };
        },
        {
          name: "burnCurrencyMintVault";
          writable: true;
          pda: {
            seeds: [
              { kind: "account"; path: "burnAuthority" },
              { kind: "account"; path: "tokenProgramCurrency" },
              { kind: "account"; path: "currencyMint" },
            ];
            program: {
              kind: "const";
              value: [140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89];
            };
          };
        },
        { name: "tokenProgram" },
        { name: "tokenProgramCurrency" },
        { name: "associatedTokenProgram"; address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" },
        { name: "systemProgram"; address: "11111111111111111111111111111111" },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [{ name: "swapInstructionData"; type: "bytes" }];
    },
    {
      name: "agentDistributePayments";
      discriminator: [145, 44, 246, 47, 192, 204, 95, 32];
      accounts: [
        { name: "user"; writable: true; signer: true },
        {
          name: "globalConfig";
          pda: { seeds: [{ kind: "const"; value: [103,108,111,98,97,108,45,99,111,110,102,105,103] }] };
        },
        { name: "currencyMint" },
        { name: "tokenAgentPayments"; writable: true },
        {
          name: "tokenAgentPaymentInCurrency";
          writable: true;
          pda: {
            seeds: [
              { kind: "const"; value: [112,97,121,109,101,110,116,45,105,110,45,99,117,114,114,101,110,99,121] },
              { kind: "account"; path: "tokenAgentPayments.mint"; account: "TokenAgentPayments" },
              { kind: "account"; path: "currencyMint" },
            ];
          };
        },
        {
          name: "tokenAgentAssociatedAccount";
          writable: true;
          pda: {
            seeds: [
              { kind: "account"; path: "tokenAgentPayments" },
              {
                kind: "const";
                value: [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];
              },
              { kind: "account"; path: "currencyMint" },
            ];
            program: {
              kind: "const";
              value: [140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89];
            };
          };
        },
        {
          name: "buybackAuthority";
          pda: {
            seeds: [
              { kind: "const"; value: [98,117,121,98,97,99,107,45,97,117,116,104,111,114,105,116,121] },
              { kind: "account"; path: "tokenAgentPayments.mint"; account: "TokenAgentPayments" },
            ];
          };
        },
        {
          name: "withdrawAuthority";
          pda: {
            seeds: [
              { kind: "const"; value: [119,105,116,104,100,114,97,119,45,97,117,116,104,111,114,105,116,121] },
              { kind: "account"; path: "tokenAgentPayments.mint"; account: "TokenAgentPayments" },
            ];
          };
        },
        {
          name: "buybackVault";
          writable: true;
          pda: {
            seeds: [
              { kind: "account"; path: "buybackAuthority" },
              {
                kind: "const";
                value: [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];
              },
              { kind: "account"; path: "currencyMint" },
            ];
            program: {
              kind: "const";
              value: [140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89];
            };
          };
        },
        {
          name: "withdrawVault";
          writable: true;
          pda: {
            seeds: [
              { kind: "account"; path: "withdrawAuthority" },
              {
                kind: "const";
                value: [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];
              },
              { kind: "account"; path: "currencyMint" },
            ];
            program: {
              kind: "const";
              value: [140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89];
            };
          };
        },
        { name: "tokenProgram" },
        { name: "associatedTokenProgram"; address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" },
        { name: "systemProgram"; address: "11111111111111111111111111111111" },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [];
    },
    {
      name: "agentInitialize";
      discriminator: [180, 248, 163, 8, 49, 94, 126, 96];
      accounts: [
        { name: "authority"; writable: true; signer: true },
        {
          name: "bondingCurve";
          pda: {
            seeds: [
              { kind: "const"; value: [98,111,110,100,105,110,103,45,99,117,114,118,101] },
              { kind: "account"; path: "mint" },
            ];
            program: {
              kind: "const";
              value: [1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176];
            };
          };
        },
        {
          name: "globalConfig";
          writable: true;
          pda: { seeds: [{ kind: "const"; value: [103,108,111,98,97,108,45,99,111,110,102,105,103] }] };
        },
        { name: "mint" },
        {
          name: "tokenAgentPayments";
          writable: true;
          pda: {
            seeds: [
              { kind: "const"; value: [116,111,107,101,110,45,97,103,101,110,116,45,112,97,121,109,101,110,116,115] },
              { kind: "account"; path: "mint" },
            ];
          };
        },
        { name: "systemProgram"; address: "11111111111111111111111111111111" },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [
        { name: "authority"; type: "pubkey" },
        { name: "buybackBps"; type: "u16" },
      ];
    },
    {
      name: "agentTransferExtraLamports";
      discriminator: [39, 206, 214, 167, 55, 44, 221, 81];
      accounts: [
        {
          name: "tokenAgentPayments";
          writable: true;
          pda: {
            seeds: [
              { kind: "const"; value: [116,111,107,101,110,45,97,103,101,110,116,45,112,97,121,109,101,110,116,115] },
              { kind: "account"; path: "tokenAgentPayments.mint"; account: "TokenAgentPayments" },
            ];
          };
        },
        {
          name: "tokenAgentAssociatedAccount";
          writable: true;
          pda: {
            seeds: [
              { kind: "account"; path: "tokenAgentPayments" },
              {
                kind: "const";
                value: [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];
              },
              {
                kind: "const";
                value: [6,155,136,87,254,171,129,132,251,104,127,99,70,24,192,53,218,196,57,220,26,235,59,85,152,160,240,0,0,0,0,1];
              },
            ];
            program: {
              kind: "const";
              value: [140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89];
            };
          };
        },
      ];
      args: [];
    },
    {
      name: "agentUpdateAuthority";
      discriminator: [237, 228, 227, 224, 226, 198, 167, 83];
      accounts: [
        { name: "authority"; writable: true; signer: true },
        {
          name: "globalConfig";
          pda: { seeds: [{ kind: "const"; value: [103,108,111,98,97,108,45,99,111,110,102,105,103] }] };
        },
        { name: "tokenAgentPayments"; writable: true },
        { name: "systemProgram"; address: "11111111111111111111111111111111" },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [{ name: "newAuthority"; type: "pubkey" }];
    },
    {
      name: "agentUpdateBuybackBps";
      discriminator: [41, 28, 118, 90, 53, 24, 63, 160];
      accounts: [
        { name: "authority"; writable: true; signer: true },
        { name: "tokenAgentPayments"; writable: true },
        {
          name: "globalConfig";
          pda: { seeds: [{ kind: "const"; value: [103,108,111,98,97,108,45,99,111,110,102,105,103] }] };
        },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [{ name: "buybackBps"; type: "u16" }];
    },
    {
      name: "agentWithdraw";
      discriminator: [13, 149, 99, 245, 171, 171, 185, 53];
      accounts: [
        { name: "authority"; writable: true; signer: true },
        { name: "tokenAgentPayments" },
        { name: "currencyMint" },
        {
          name: "withdrawAuthority";
          pda: {
            seeds: [
              { kind: "const"; value: [119,105,116,104,100,114,97,119,45,97,117,116,104,111,114,105,116,121] },
              { kind: "account"; path: "tokenAgentPayments.mint"; account: "TokenAgentPayments" },
            ];
          };
        },
        {
          name: "withdrawVault";
          writable: true;
          pda: {
            seeds: [
              { kind: "account"; path: "withdrawAuthority" },
              {
                kind: "const";
                value: [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];
              },
              { kind: "account"; path: "currencyMint" },
            ];
            program: {
              kind: "const";
              value: [140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89];
            };
          };
        },
        { name: "receiverAta"; writable: true },
        { name: "tokenProgram" },
        { name: "associatedTokenProgram"; address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" },
        { name: "systemProgram"; address: "11111111111111111111111111111111" },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [];
    },
    {
      name: "closeAccount";
      discriminator: [125, 255, 149, 14, 110, 34, 72, 24];
      accounts: [
        { name: "account"; writable: true },
        { name: "user"; writable: true; signer: true },
        {
          name: "globalConfig";
          pda: { seeds: [{ kind: "const"; value: [103,108,111,98,97,108,45,99,111,110,102,105,103] }] };
        },
        { name: "systemProgram"; address: "11111111111111111111111111111111" },
      ];
      args: [];
    },
    {
      name: "extendAccount";
      discriminator: [234, 102, 194, 203, 150, 72, 62, 229];
      accounts: [
        { name: "account"; writable: true },
        { name: "user"; writable: true; signer: true },
        { name: "systemProgram"; address: "11111111111111111111111111111111" },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [];
    },
    {
      name: "globalAddNewCurrency";
      discriminator: [46, 135, 47, 120, 118, 204, 177, 224];
      accounts: [
        { name: "authority"; writable: true; signer: true },
        {
          name: "globalConfig";
          writable: true;
          pda: { seeds: [{ kind: "const"; value: [103,108,111,98,97,108,45,99,111,110,102,105,103] }] };
        },
        { name: "mint" },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [];
    },
    {
      name: "globalConfigInitialize";
      discriminator: [61, 23, 208, 192, 232, 52, 8, 66];
      accounts: [
        { name: "authority"; writable: true; signer: true },
        {
          name: "globalConfig";
          writable: true;
          pda: { seeds: [{ kind: "const"; value: [103,108,111,98,97,108,45,99,111,110,102,105,103] }] };
        },
        { name: "systemProgram"; address: "11111111111111111111111111111111" },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [
        { name: "protocolAuthority"; type: "pubkey" },
        { name: "buybackAuthority"; type: "pubkey" },
      ];
    },
    {
      name: "globalRemoveCurrency";
      discriminator: [57, 226, 180, 140, 91, 14, 231, 196];
      accounts: [
        { name: "authority"; writable: true; signer: true },
        {
          name: "globalConfig";
          writable: true;
          pda: { seeds: [{ kind: "const"; value: [103,108,111,98,97,108,45,99,111,110,102,105,103] }] };
        },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [{ name: "index"; type: "u8" }];
    },
    {
      name: "globalUpdateAuthorities";
      discriminator: [91, 137, 72, 77, 183, 184, 168, 125];
      accounts: [
        { name: "authority"; writable: true; signer: true },
        {
          name: "globalConfig";
          writable: true;
          pda: { seeds: [{ kind: "const"; value: [103,108,111,98,97,108,45,99,111,110,102,105,103] }] };
        },
        {
          name: "eventAuthority";
          pda: { seeds: [{ kind: "const"; value: [95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121] }] };
        },
        { name: "program" },
      ];
      args: [
        { name: "protocolAuthority"; type: { option: "pubkey" } },
        { name: "buybackAuthority"; type: { option: "pubkey" } },
      ];
    },
  ];
  accounts: [
    { name: "BondingCurve"; discriminator: [23, 183, 248, 55, 96, 216, 172, 96] },
    { name: "GlobalConfig"; discriminator: [149, 8, 156, 202, 160, 252, 176, 217] },
    { name: "TokenAgentPaymentInCurrency"; discriminator: [225, 195, 81, 227, 115, 43, 25, 177] },
    { name: "TokenAgentPayments"; discriminator: [136, 241, 242, 217, 173, 77, 112, 186] },
  ];
  events: [
    { name: "AgentAcceptPaymentEvent"; discriminator: [114, 190, 188, 192, 105, 79, 41, 147] },
    { name: "AgentBuybackTriggerEvent"; discriminator: [139, 240, 9, 225, 214, 63, 232, 165] },
    { name: "AgentDistributePaymentsEvent"; discriminator: [137, 116, 114, 140, 54, 111, 230, 26] },
    { name: "AgentInitializeEvent"; discriminator: [192, 5, 183, 151, 0, 64, 100, 207] },
    { name: "AgentUpdateAuthorityEvent"; discriminator: [36, 212, 117, 235, 74, 166, 60, 16] },
    { name: "AgentUpdateBuybackBpsEvent"; discriminator: [165, 251, 40, 19, 114, 26, 128, 232] },
    { name: "AgentWithdrawEvent"; discriminator: [174, 231, 201, 69, 254, 183, 49, 85] },
    { name: "ExtendAccountEvent"; discriminator: [97, 97, 215, 144, 93, 146, 22, 124] },
    { name: "GlobalAddNewCurrencyEvent"; discriminator: [130, 202, 37, 248, 241, 182, 233, 35] },
    { name: "GlobalConfigInitializeEvent"; discriminator: [241, 51, 222, 190, 142, 245, 176, 53] },
    { name: "GlobalUpdateAuthoritiesEvent"; discriminator: [82, 27, 22, 232, 53, 66, 35, 207] },
  ];
  errors: [
    { code: 6000; name: "UnauthorizedSigner"; msg: "The given account is not authorized to execute this instruction." },
    { code: 6001; name: "CurrencyAlreadySupported"; msg: "The given currency is already supported." },
    { code: 6002; name: "MaxCurrenciesReached"; msg: "The maximum number of currencies has been reached." },
    { code: 6003; name: "InvalidBuybackBps"; msg: "The buyback basis points is greater than 10000." },
    { code: 6004; name: "CurrencyNotSupported"; msg: "The given currency is not supported." },
    { code: 6005; name: "MathOverflow"; msg: "Math overflow." },
    { code: 6006; name: "InvalidRemainingAccountAddress"; msg: "The given remaining account address is invalid." },
    { code: 6007; name: "PaymentVaultNotEmpty"; msg: "The payment vault is not empty. Distribute the payments first." },
    { code: 6008; name: "InvalidInvoiceAccount"; msg: "The invoice account does not match the expected PDA seeds" },
    { code: 6009; name: "InvalidProgramToInvoke"; msg: "The program to invoke is not allowed." },
    { code: 6010; name: "InvalidCallbackProgram"; msg: "The callback program is invalid." },
    { code: 6011; name: "SwapFailedAmountDidNotIncrease"; msg: "The swap failed and the amount did not increase." },
    { code: 6012; name: "AccountTypeNotSupported"; msg: "The account type is not supported for extension." },
    { code: 6013; name: "InvalidIndex"; msg: "The index is invalid." },
  ];
  types: [
    {
      name: "AgentAcceptPaymentEvent";
      type: {
        kind: "struct";
        fields: [
          { name: "user"; type: "pubkey" },
          { name: "tokenizedAgentMint"; type: "pubkey" },
          { name: "tokenAgentPayments"; type: "pubkey" },
          { name: "currencyMint"; type: "pubkey" },
          { name: "amount"; type: "u64" },
          { name: "memo"; type: "u64" },
          { name: "startTime"; type: "i64" },
          { name: "endTime"; type: "i64" },
          { name: "invoiceId"; type: "pubkey" },
          { name: "agentPostBalance"; type: "u64" },
          { name: "timestamp"; type: "i64" },
        ];
      };
    },
    {
      name: "AgentBuybackTriggerEvent";
      type: {
        kind: "struct";
        fields: [
          { name: "tokenizedAgentMint"; type: "pubkey" },
          { name: "currencyMint"; type: "pubkey" },
          { name: "amountBurned"; type: "u64" },
          { name: "swapProgram"; type: "pubkey" },
          { name: "newTokensBoughtAndBurnedForCurrency"; type: "u64" },
          { name: "agentPostBalance"; type: "u64" },
          { name: "timestamp"; type: "i64" },
          { name: "currencyMintAmountForBuyback"; type: "u64" },
        ];
      };
    },
    {
      name: "AgentDistributePaymentsEvent";
      type: {
        kind: "struct";
        fields: [
          { name: "tokenAgentPayments"; type: "pubkey" },
          { name: "currencyMint"; type: "pubkey" },
          { name: "buybackBps"; type: "u16" },
          { name: "buybackAmount"; type: "u64" },
          { name: "withdrawAmount"; type: "u64" },
          { name: "timestamp"; type: "i64" },
        ];
      };
    },
    {
      name: "AgentInitializeEvent";
      type: {
        kind: "struct";
        fields: [
          { name: "tokenAgentPayments"; type: "pubkey" },
          { name: "mint"; type: "pubkey" },
          { name: "authority"; type: "pubkey" },
          { name: "buybackBps"; type: "u16" },
          { name: "timestamp"; type: "i64" },
          { name: "tokenizedAgentSequence"; type: "u64" },
        ];
      };
    },
    {
      name: "AgentUpdateAuthorityEvent";
      type: {
        kind: "struct";
        fields: [
          { name: "tokenAgentPayments"; type: "pubkey" },
          { name: "oldAuthority"; type: "pubkey" },
          { name: "newAuthority"; type: "pubkey" },
          { name: "timestamp"; type: "i64" },
        ];
      };
    },
    {
      name: "AgentUpdateBuybackBpsEvent";
      type: {
        kind: "struct";
        fields: [
          { name: "tokenAgentPayments"; type: "pubkey" },
          { name: "mint"; type: "pubkey" },
          { name: "oldBuybackBps"; type: "u16" },
          { name: "newBuybackBps"; type: "u16" },
          { name: "timestamp"; type: "i64" },
        ];
      };
    },
    {
      name: "AgentWithdrawEvent";
      type: {
        kind: "struct";
        fields: [
          { name: "tokenizedAgentMint"; type: "pubkey" },
          { name: "currencyMint"; type: "pubkey" },
          { name: "amount"; type: "u64" },
          { name: "receiver"; type: "pubkey" },
          { name: "timestamp"; type: "i64" },
        ];
      };
    },
    {
      name: "BondingCurve";
      type: {
        kind: "struct";
        fields: [
          { name: "virtualTokenReserves"; type: "u64" },
          { name: "virtualSolReserves"; type: "u64" },
          { name: "realTokenReserves"; type: "u64" },
          { name: "realSolReserves"; type: "u64" },
          { name: "tokenTotalSupply"; type: "u64" },
          { name: "complete"; type: "bool" },
          { name: "creator"; type: "pubkey" },
          { name: "isMayhemMode"; type: "bool" },
        ];
      };
    },
    {
      name: "ExtendAccountEvent";
      type: {
        kind: "struct";
        fields: [
          { name: "account"; type: "pubkey" },
          { name: "user"; type: "pubkey" },
          { name: "currentSize"; type: "u64" },
          { name: "newSize"; type: "u64" },
          { name: "timestamp"; type: "i64" },
        ];
      };
    },
    {
      name: "GlobalAddNewCurrencyEvent";
      type: {
        kind: "struct";
        fields: [
          { name: "globalConfig"; type: "pubkey" },
          { name: "currencyMint"; type: "pubkey" },
          { name: "timestamp"; type: "i64" },
        ];
      };
    },
    {
      name: "GlobalConfig";
      type: {
        kind: "struct";
        fields: [
          { name: "bump"; type: "u8" },
          { name: "protocolAuthority"; type: "pubkey" },
          { name: "buybackAuthority"; type: "pubkey" },
          { name: "supportedCurrenciesMint"; type: { array: ["pubkey", 10] } },
          { name: "tokenizedAgentSequence"; type: "u64" },
        ];
      };
    },
    {
      name: "GlobalConfigInitializeEvent";
      type: {
        kind: "struct";
        fields: [
          { name: "globalConfig"; type: "pubkey" },
          { name: "protocolAuthority"; type: "pubkey" },
          { name: "buybackAuthority"; type: "pubkey" },
          { name: "timestamp"; type: "i64" },
        ];
      };
    },
    {
      name: "GlobalUpdateAuthoritiesEvent";
      type: {
        kind: "struct";
        fields: [
          { name: "globalConfig"; type: "pubkey" },
          { name: "protocolAuthority"; type: { option: "pubkey" } },
          { name: "buybackAuthority"; type: { option: "pubkey" } },
          { name: "timestamp"; type: "i64" },
        ];
      };
    },
    {
      name: "TokenAgentPaymentInCurrency";
      type: {
        kind: "struct";
        fields: [
          { name: "mint"; type: "pubkey" },
          { name: "currencyMint"; type: "pubkey" },
          { name: "totalInvoicePaymentsMade"; type: "u64" },
          { name: "totalBuyback"; type: "u64" },
          { name: "totalWithdrawals"; type: "u64" },
          { name: "tokensBoughtBackAndBurned"; type: "u64" },
        ];
      };
    },
    {
      name: "TokenAgentPayments";
      type: {
        kind: "struct";
        fields: [
          { name: "bump"; type: "u8" },
          { name: "mint"; type: "pubkey" },
          { name: "authority"; type: "pubkey" },
          { name: "buybackBps"; type: "u16" },
        ];
      };
    },
  ];
};