UNPKG

@bagsfm/bags-sdk

Version:

TypeScript SDK for Bags

1,385 lines (1,384 loc) 278 kB
{ "address": "FEE2tBhCKAt7shrod19QttSVREUYPiyMzoku1mL1gqVK", "metadata": { "name": "bags_fee_share", "version": "2.4.0", "spec": "0.1.0", "description": "Bags Fee Share V2 Program" }, "instructions": [ { "name": "claim_damm_v2", "docs": [ "Claim DAMM v2 fees" ], "discriminator": [ 232, 175, 106, 19, 168, 54, 186, 108 ], "accounts": [ { "name": "payer", "docs": [ "Payer (covers any runtime init costs)" ], "writable": true, "signer": true }, { "name": "fee_share_config", "docs": [ "Fee share config (PDA; seeds by base/quote mints)" ], "pda": { "seeds": [ { "kind": "const", "value": [ 102, 101, 101, 95, 115, 104, 97, 114, 101, 95, 99, 111, 110, 102, 105, 103 ] }, { "kind": "account", "path": "base_mint" }, { "kind": "account", "path": "quote_mint" } ] } }, { "name": "fee_share_authority", "docs": [ "Fee ledger (PDA); signer for CPIs and fee distribution" ], "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 102, 101, 101, 95, 115, 104, 97, 114, 101, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "base_mint" }, { "kind": "account", "path": "quote_mint" } ] } }, { "name": "fee_share_authority_quote_ata", "docs": [ "Authority's WSOL ATA (receives quote fees)" ], "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "fee_share_authority" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "quote_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": "fee_share_authority_base_ata", "docs": [ "Authority's base mint ATA" ], "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "fee_share_authority" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "base_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": "program_config", "docs": [ "Singleton program config PDA (holds admin pubkey)" ], "writable": true, "address": "8SrW8DjZcAPAWYSdSu468LKLQ7WDRaEUsswNvHCiAYs" }, { "name": "platform_vault", "docs": [ "Platform vault (receives bags fees)" ], "writable": true, "address": "ERH2UUYzUULwKy7sLHxeEGcN4B2QjDoQS8Z8GMhuL8cE" }, { "name": "partner_config", "docs": [ "Optional partner config (PDA) used to compute/transfer partner share" ], "writable": true, "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 97, 114, 116, 110, 101, 114, 95, 99, 111, 110, 102, 105, 103 ] }, { "kind": "account", "path": "partner" } ] } }, { "name": "partner", "docs": [ "Optional partner wallet (seed and key validation)" ], "optional": true }, { "name": "partner_config_quote_ata", "docs": [ "Optional partner's WSOL ATA (destination for partner share)" ], "writable": true, "optional": true, "pda": { "seeds": [ { "kind": "account", "path": "partner_config" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "quote_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": "base_mint" }, { "name": "quote_mint", "docs": [ "Quote mint (WSOL; seed)" ], "address": "So11111111111111111111111111111111111111112" }, { "name": "token_program", "docs": [ "Programs" ], "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "damm_program", "docs": [ "----------- EXTRA ACCOUNTS FOR DAMM v2 -----------" ], "address": "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG" }, { "name": "pool_authority", "address": "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC" }, { "name": "pool" }, { "name": "position", "writable": true }, { "name": "base_vault", "writable": true }, { "name": "quote_vault", "writable": true }, { "name": "position_nft_account" }, { "name": "damm_event_authority", "address": "3rmHSu74h1ZcmAisVcWerTCiRDQbUrBKmcwptYGjHfet" }, { "name": "token_base_program", "docs": [ "SPL Token programs for both legs" ], "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "token_quote_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "event_authority", "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": "claim_dbc", "docs": [ "Claim DBC fees" ], "discriminator": [ 229, 142, 38, 65, 198, 50, 110, 58 ], "accounts": [ { "name": "payer", "docs": [ "Payer funding any init_if_needed ATAs" ], "writable": true, "signer": true }, { "name": "fee_share_config", "docs": [ "Fee share config (PDA; seeds by base/quote mints)" ], "pda": { "seeds": [ { "kind": "const", "value": [ 102, 101, 101, 95, 115, 104, 97, 114, 101, 95, 99, 111, 110, 102, 105, 103 ] }, { "kind": "account", "path": "base_mint" }, { "kind": "account", "path": "quote_mint" } ] } }, { "name": "fee_share_authority", "docs": [ "Fee ledger (PDA); signer for CPIs and fee distribution" ], "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 102, 101, 101, 95, 115, 104, 97, 114, 101, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] }, { "kind": "account", "path": "base_mint" }, { "kind": "account", "path": "quote_mint" } ] } }, { "name": "fee_share_authority_quote_ata", "docs": [ "Authority's WSOL ATA (receives quote fees)" ], "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "fee_share_authority" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "quote_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": "fee_share_authority_base_ata", "docs": [ "Authority's base mint ATA (DBC CPI interface)" ], "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "fee_share_authority" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "base_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": "partner_config", "docs": [ "Optional partner config (PDA) used to compute/transfer partner share" ], "writable": true, "optional": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 97, 114, 116, 110, 101, 114, 95, 99, 111, 110, 102, 105, 103 ] }, { "kind": "account", "path": "partner" } ] } }, { "name": "partner", "docs": [ "Optional partner wallet (seed and key validation)" ], "optional": true }, { "name": "partner_config_quote_ata", "docs": [ "Optional partner's WSOL ATA (destination for partner share)" ], "writable": true, "optional": true, "pda": { "seeds": [ { "kind": "account", "path": "partner_config" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "quote_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": "program_config", "docs": [ "Singleton program config PDA (holds admin pubkey)" ], "writable": true, "address": "8SrW8DjZcAPAWYSdSu468LKLQ7WDRaEUsswNvHCiAYs" }, { "name": "platform_vault", "docs": [ "Platform vault (receives bags fees)" ], "writable": true, "address": "ERH2UUYzUULwKy7sLHxeEGcN4B2QjDoQS8Z8GMhuL8cE" }, { "name": "base_mint" }, { "name": "quote_mint", "docs": [ "Quote mint (WSOL; seed)" ], "address": "So11111111111111111111111111111111111111112" }, { "name": "token_program", "docs": [ "Programs" ], "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "dbc_program", "address": "dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN" }, { "name": "pool_authority", "docs": [ "----------- EXTRA ACCOUNTS FOR METEORA -----------" ], "address": "FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM" }, { "name": "config" }, { "name": "pool", "writable": true }, { "name": "base_vault", "writable": true }, { "name": "quote_vault", "writable": true }, { "name": "dbc_event_authority", "pda": { "seeds": [ { "kind": "const", "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ], "program": { "kind": "const", "value": [ 9, 96, 12, 165, 36, 247, 177, 183, 214, 204, 177, 195, 151, 58, 160, 51, 13, 25, 3, 218, 96, 28, 201, 181, 222, 227, 198, 98, 180, 202, 209, 73 ] } } }, { "name": "token_base_program", "docs": [ "SPL Token programs for both legs (DBC interface)" ], "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "token_quote_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "event_authority", "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": "claim_partner", "docs": [ "Claim partner fees" ], "discriminator": [ 181, 78, 148, 221, 100, 54, 21, 114 ], "accounts": [ { "name": "payer", "docs": [ "Payer funding init_if_needed of partner's ATA" ], "writable": true, "signer": true }, { "name": "partner", "docs": [ "Partner signer receiving funds" ], "writable": true, "signer": true, "relations": [ "partner_config" ] }, { "name": "partner_config", "docs": [ "Partner config (PDA), also PDA authority for its ATA" ], "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 97, 114, 116, 110, 101, 114, 95, 99, 111, 110, 102, 105, 103 ] }, { "kind": "account", "path": "partner" } ] } }, { "name": "partner_quote_ata", "docs": [ "Partner's WSOL ATA (destination; init-if-needed)" ], "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "partner" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "quote_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": "partner_config_quote_ata", "docs": [ "PartnerConfig's WSOL ATA (source; PDA-owned)" ], "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "partner_config" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "quote_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": "quote_mint", "docs": [ "Quote mint (WSOL)" ], "address": "So11111111111111111111111111111111111111112" }, { "name": "system_program", "docs": [ "Programs" ], "address": "11111111111111111111111111111111" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "associated_token_program", "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "event_authority", "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": "claim_platform_fees", "docs": [ "Claim platform fees to the receiver" ], "discriminator": [ 159, 129, 37, 35, 170, 99, 163, 16 ], "accounts": [ { "name": "admin", "docs": [ "Admin signer authorizing the claim" ], "writable": true, "signer": true }, { "name": "receiver", "docs": [ "Receiver of the platform fees (could be admin itself)" ] }, { "name": "program_config", "docs": [ "Singleton program config PDA (holds admin pubkey)" ], "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 112, 114, 111, 103, 114, 97, 109, 95, 99, 111, 110, 102, 105, 103 ] } ] } }, { "name": "platform_vault", "docs": [ "Platform vault (receives bags fees)" ], "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "program_config" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "quote_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": "receiver_quote_ata", "docs": [ "Receiver's WSOL ATA (destination; init-if-needed)" ], "writable": true, "pda": { "seeds": [ { "kind": "account", "path": "receiver" }, { "kind": "account", "path": "token_program" }, { "kind": "account", "path": "quote_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,