UNPKG

pumpdotfun-sdk-sp

Version:

A simple SDK for interacting with pumpdotfun

1,417 lines 136 kB
/** * 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.json`. */ export type Pump = { address: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"; metadata: { name: "pump"; version: "0.1.0"; spec: "0.1.0"; description: "Created with Anchor"; }; instructions: [ { name: "adminSetCreator"; docs: [ "Allows Global::admin_set_creator_authority to override the bonding curve creator" ]; discriminator: [69, 25, 171, 142, 57, 239, 13, 4]; accounts: [ { name: "adminSetCreatorAuthority"; signer: true; relations: ["global"]; }, { name: "global"; pda: { seeds: [ { kind: "const"; value: [103, 108, 111, 98, 97, 108]; } ]; }; }, { name: "mint"; }, { name: "bondingCurve"; writable: true; pda: { seeds: [ { kind: "const"; value: [ 98, 111, 110, 100, 105, 110, 103, 45, 99, 117, 114, 118, 101 ]; }, { kind: "account"; path: "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: "creator"; type: "pubkey"; } ]; }, { name: "adminSetIdlAuthority"; discriminator: [8, 217, 96, 231, 144, 104, 192, 5]; accounts: [ { name: "authority"; signer: true; relations: ["global"]; }, { name: "global"; pda: { seeds: [ { kind: "const"; value: [103, 108, 111, 98, 97, 108]; } ]; }; }, { name: "idlAccount"; writable: true; }, { name: "systemProgram"; address: "11111111111111111111111111111111"; }, { name: "programSigner"; pda: { seeds: []; }; }, { 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: "idlAuthority"; type: "pubkey"; } ]; }, { name: "adminUpdateTokenIncentives"; discriminator: [209, 11, 115, 87, 213, 23, 124, 204]; accounts: [ { name: "authority"; writable: true; signer: true; relations: ["global"]; }, { name: "global"; pda: { seeds: [ { kind: "const"; value: [103, 108, 111, 98, 97, 108]; } ]; }; }, { name: "globalVolumeAccumulator"; writable: true; pda: { seeds: [ { kind: "const"; value: [ 103, 108, 111, 98, 97, 108, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ]; } ]; }; }, { name: "mint"; }, { name: "globalIncentiveTokenAccount"; writable: true; pda: { seeds: [ { kind: "account"; path: "globalVolumeAccumulator"; }, { 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: "associatedTokenProgram"; address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"; }, { name: "systemProgram"; address: "11111111111111111111111111111111"; }, { name: "tokenProgram"; }, { 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: "startTime"; type: "i64"; }, { name: "endTime"; type: "i64"; }, { name: "secondsInADay"; type: "i64"; }, { name: "dayNumber"; type: "u64"; }, { name: "pumpTokenSupplyPerDay"; type: "u64"; } ]; }, { name: "buy"; docs: ["Buys tokens from a bonding curve."]; discriminator: [102, 6, 61, 18, 1, 218, 235, 234]; accounts: [ { name: "global"; pda: { seeds: [ { kind: "const"; value: [103, 108, 111, 98, 97, 108]; } ]; }; }, { name: "feeRecipient"; writable: true; }, { name: "mint"; }, { name: "bondingCurve"; writable: true; pda: { seeds: [ { kind: "const"; value: [ 98, 111, 110, 100, 105, 110, 103, 45, 99, 117, 114, 118, 101 ]; }, { kind: "account"; path: "mint"; } ]; }; }, { name: "associatedBondingCurve"; writable: true; pda: { seeds: [ { kind: "account"; path: "bondingCurve"; }, { 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: "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: "associatedUser"; writable: true; }, { name: "user"; writable: true; signer: true; }, { name: "systemProgram"; address: "11111111111111111111111111111111"; }, { name: "tokenProgram"; address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { name: "creatorVault"; writable: true; pda: { seeds: [ { kind: "const"; value: [ 99, 114, 101, 97, 116, 111, 114, 45, 118, 97, 117, 108, 116 ]; }, { kind: "account"; path: "bonding_curve.creator"; account: "bondingCurve"; } ]; }; }, { 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"; }, { name: "globalVolumeAccumulator"; writable: true; pda: { seeds: [ { kind: "const"; value: [ 103, 108, 111, 98, 97, 108, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ]; } ]; }; }, { name: "userVolumeAccumulator"; writable: true; pda: { seeds: [ { kind: "const"; value: [ 117, 115, 101, 114, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ]; }, { kind: "account"; path: "user"; } ]; }; } ]; args: [ { name: "amount"; type: "u64"; }, { name: "maxSolCost"; type: "u64"; }, { name: "trackVolume"; type: { defined: { name: "optionBool"; }; }; } ]; }, { name: "claimTokenIncentives"; discriminator: [16, 4, 71, 28, 204, 1, 40, 27]; accounts: [ { name: "user"; }, { name: "userAta"; writable: true; pda: { seeds: [ { kind: "account"; path: "user"; }, { 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: "globalVolumeAccumulator"; pda: { seeds: [ { kind: "const"; value: [ 103, 108, 111, 98, 97, 108, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ]; } ]; }; }, { name: "globalIncentiveTokenAccount"; writable: true; pda: { seeds: [ { kind: "account"; path: "globalVolumeAccumulator"; }, { 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: "userVolumeAccumulator"; writable: true; pda: { seeds: [ { kind: "const"; value: [ 117, 115, 101, 114, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ]; }, { kind: "account"; path: "user"; } ]; }; }, { name: "mint"; relations: ["globalVolumeAccumulator"]; }, { name: "tokenProgram"; }, { name: "systemProgram"; address: "11111111111111111111111111111111"; }, { name: "associatedTokenProgram"; address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"; }, { 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"; }, { name: "payer"; writable: true; signer: true; } ]; args: []; }, { name: "closeUserVolumeAccumulator"; discriminator: [249, 69, 164, 218, 150, 103, 84, 138]; accounts: [ { name: "user"; writable: true; signer: true; }, { name: "userVolumeAccumulator"; writable: true; pda: { seeds: [ { kind: "const"; value: [ 117, 115, 101, 114, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ]; }, { kind: "account"; path: "user"; } ]; }; }, { 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: "collectCreatorFee"; docs: [ "Collects creator_fee from creator_vault to the coin creator account" ]; discriminator: [20, 22, 86, 123, 198, 28, 219, 132]; accounts: [ { name: "creator"; writable: true; }, { name: "creatorVault"; writable: true; pda: { seeds: [ { kind: "const"; value: [ 99, 114, 101, 97, 116, 111, 114, 45, 118, 97, 117, 108, 116 ]; }, { kind: "account"; path: "creator"; } ]; }; }, { 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: "create"; docs: ["Creates a new coin and bonding curve."]; discriminator: [24, 30, 200, 40, 5, 28, 7, 119]; accounts: [ { name: "mint"; writable: true; signer: true; }, { name: "mintAuthority"; pda: { seeds: [ { kind: "const"; value: [ 109, 105, 110, 116, 45, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { name: "bondingCurve"; writable: true; pda: { seeds: [ { kind: "const"; value: [ 98, 111, 110, 100, 105, 110, 103, 45, 99, 117, 114, 118, 101 ]; }, { kind: "account"; path: "mint"; } ]; }; }, { name: "associatedBondingCurve"; writable: true; pda: { seeds: [ { kind: "account"; path: "bondingCurve"; }, { 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: "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: "global"; pda: { seeds: [ { kind: "const"; value: [103, 108, 111, 98, 97, 108]; } ]; }; }, { name: "mplTokenMetadata"; address: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"; }, { name: "metadata"; writable: true; pda: { seeds: [ { kind: "const"; value: [109, 101, 116, 97, 100, 97, 116, 97]; }, { kind: "const"; value: [ 11, 112, 101, 177, 227, 209, 124, 69, 56, 157, 82, 127, 107, 4, 195, 205, 88, 184, 108, 115, 26, 160, 253, 181, 73, 182, 209, 188, 3, 248, 41, 70 ]; }, { kind: "account"; path: "mint"; } ]; program: { kind: "account"; path: "mplTokenMetadata"; }; }; }, { name: "user"; writable: true; signer: true; }, { name: "systemProgram"; address: "11111111111111111111111111111111"; }, { name: "tokenProgram"; address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { name: "associatedTokenProgram"; address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"; }, { name: "rent"; address: "SysvarRent111111111111111111111111111111111"; }, { 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: "name"; type: "string"; }, { name: "symbol"; type: "string"; }, { name: "uri"; type: "string"; }, { name: "creator"; type: "pubkey"; } ]; }, { name: "extendAccount"; docs: ["Extends the size of program-owned accounts"]; discriminator: [234, 102, 194, 203, 150, 72, 62, 229]; accounts: [ { name: "ac