@flipflop-sdk/node
Version:
FlipFlop Node.js SDK for programmatic token operations
1,497 lines • 143 kB
TypeScript
/**
* 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/fair_mint_token.json`.
*/
export type FairMintToken = {
"address": "FLipzZfErPUtDQPj9YrC6wp4nRRiVxRkFm3jdFmiPHJV";
"metadata": {
"name": "fairMintToken";
"version": "0.2.0";
"spec": "0.1.0";
"description": "Created with Anchor";
};
"instructions": [
{
"name": "burnMintTokenVault";
"discriminator": [
255,
254,
39,
14,
229,
37,
89,
240
];
"accounts": [
{
"name": "mint";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
102,
97,
105,
114,
95,
109,
105,
110,
116
];
},
{
"kind": "arg";
"path": "tokenName";
},
{
"kind": "arg";
"path": "tokenSymbol";
}
];
};
},
{
"name": "configAccount";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
99,
111,
110,
102,
105,
103,
95,
100,
97,
116,
97
];
},
{
"kind": "account";
"path": "mint";
}
];
};
},
{
"name": "payer";
"writable": true;
"signer": true;
},
{
"name": "mintTokenVault";
"writable": true;
},
{
"name": "tokenProgram";
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
},
{
"name": "systemProgram";
"address": "11111111111111111111111111111111";
}
];
"args": [
{
"name": "tokenName";
"type": "string";
},
{
"name": "tokenSymbol";
"type": "string";
},
{
"name": "amount";
"type": "u64";
}
];
},
{
"name": "closeToken";
"docs": [
"Close token"
];
"discriminator": [
26,
74,
236,
151,
104,
64,
183,
249
];
"accounts": [
{
"name": "mint";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
102,
97,
105,
114,
95,
109,
105,
110,
116
];
},
{
"kind": "arg";
"path": "tokenName";
},
{
"kind": "arg";
"path": "tokenSymbol";
}
];
};
},
{
"name": "payer";
"writable": true;
"signer": true;
},
{
"name": "tokenVault";
"writable": true;
},
{
"name": "wsolVault";
"writable": true;
},
{
"name": "mintTokenVault";
"writable": true;
},
{
"name": "configAccount";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
99,
111,
110,
102,
105,
103,
95,
100,
97,
116,
97
];
},
{
"kind": "account";
"path": "mint";
}
];
};
},
{
"name": "tokenProgram";
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
},
{
"name": "systemProgram";
"address": "11111111111111111111111111111111";
},
{
"name": "associatedTokenProgram";
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
},
{
"name": "rent";
"address": "SysvarRent111111111111111111111111111111111";
}
];
"args": [
{
"name": "tokenName";
"type": "string";
},
{
"name": "tokenSymbol";
"type": "string";
}
];
},
{
"name": "delegateValueManager";
"docs": [
"Delegate value manager"
];
"discriminator": [
65,
71,
81,
199,
83,
64,
181,
167
];
"accounts": [
{
"name": "admin";
"writable": true;
"signer": true;
},
{
"name": "mint";
"pda": {
"seeds": [
{
"kind": "const";
"value": [
102,
97,
105,
114,
95,
109,
105,
110,
116
];
},
{
"kind": "arg";
"path": "tokenName";
},
{
"kind": "arg";
"path": "tokenSymbol";
}
];
};
},
{
"name": "configAccount";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
99,
111,
110,
102,
105,
103,
95,
100,
97,
116,
97
];
},
{
"kind": "account";
"path": "mint";
}
];
};
},
{
"name": "systemProgram";
"address": "11111111111111111111111111111111";
}
];
"args": [
{
"name": "tokenName";
"type": "string";
},
{
"name": "tokenSymbol";
"type": "string";
},
{
"name": "newValueManager";
"type": "pubkey";
}
];
},
{
"name": "initializeLaunchRule";
"docs": [
"Initialize launch rule"
];
"discriminator": [
61,
250,
188,
110,
91,
75,
249,
62
];
"accounts": [
{
"name": "admin";
"writable": true;
"signer": true;
},
{
"name": "launchRuleData";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
108,
97,
117,
110,
99,
104,
95,
114,
117,
108,
101
];
},
{
"kind": "account";
"path": "admin";
}
];
};
},
{
"name": "systemProgram";
"address": "11111111111111111111111111111111";
}
];
"args": [
{
"name": "startSlot";
"type": "u64";
},
{
"name": "slotsPerPeriod";
"type": "u64";
},
{
"name": "baseLaunchLimit";
"type": "u64";
},
{
"name": "increasementLaunchLimit";
"type": "u64";
},
{
"name": "maxPeriod";
"type": "u64";
}
];
},
{
"name": "initializeSystem";
"docs": [
"Initialize system"
];
"discriminator": [
50,
173,
248,
140,
202,
35,
141,
150
];
"accounts": [
{
"name": "admin";
"writable": true;
"signer": true;
},
{
"name": "systemConfigAccount";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
115,
121,
115,
116,
101,
109,
95,
99,
111,
110,
102,
105,
103,
95,
118,
49,
46,
49
];
},
{
"kind": "account";
"path": "admin";
}
];
};
},
{
"name": "systemProgram";
"address": "11111111111111111111111111111111";
}
];
"args": [];
},
{
"name": "initializeToken";
"docs": [
"Initialize token"
];
"discriminator": [
38,
209,
150,
50,
190,
117,
16,
54
];
"accounts": [
{
"name": "metadata";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
109,
101,
116,
97,
100,
97,
116,
97
];
},
{
"kind": "account";
"path": "tokenMetadataProgram";
},
{
"kind": "account";
"path": "mint";
}
];
"program": {
"kind": "account";
"path": "tokenMetadataProgram";
};
};
},
{
"name": "payer";
"writable": true;
"signer": true;
},
{
"name": "mint";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
102,
97,
105,
114,
95,
109,
105,
110,
116
];
},
{
"kind": "arg";
"path": "metadata_params.name";
},
{
"kind": "arg";
"path": "metadata_params.symbol";
}
];
};
},
{
"name": "configAccount";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
99,
111,
110,
102,
105,
103,
95,
100,
97,
116,
97
];
},
{
"kind": "account";
"path": "mint";
}
];
};
},
{
"name": "launchRuleAccount";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
108,
97,
117,
110,
99,
104,
95,
114,
117,
108,
101
];
},
{
"kind": "account";
"path": "systemConfigAccount";
}
];
};
},
{
"name": "mintTokenVault";
"writable": true;
},
{
"name": "tokenVault";
"writable": true;
},
{
"name": "wsolMint";
},
{
"name": "wsolVault";
"writable": true;
},
{
"name": "systemConfigAccount";
"writable": true;
},
{
"name": "protocolFeeAccount";
"writable": true;
},
{
"name": "rent";
"address": "SysvarRent111111111111111111111111111111111";
},
{
"name": "systemProgram";
"address": "11111111111111111111111111111111";
},
{
"name": "tokenProgram";
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
},
{
"name": "tokenMetadataProgram";
"address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s";
},
{
"name": "associatedTokenProgram";
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
}
];
"args": [
{
"name": "metadata";
"type": {
"defined": {
"name": "tokenMetadata";
};
};
},
{
"name": "initConfigData";
"type": {
"defined": {
"name": "initializeTokenConfigData";
};
};
}
];
},
{
"name": "mintTokens";
"docs": [
"Mint tokens"
];
"discriminator": [
59,
132,
24,
246,
122,
39,
8,
243
];
"accounts": [
{
"name": "mint";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
102,
97,
105,
114,
95,
109,
105,
110,
116
];
},
{
"kind": "arg";
"path": "tokenName";
},
{
"kind": "arg";
"path": "tokenSymbol";
}
];
};
},
{
"name": "destination";
"writable": true;
},
{
"name": "destinationWsolAta";
"writable": true;
},
{
"name": "refundAccount";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
114,
101,
102,
117,
110,
100
];
},
{
"kind": "account";
"path": "mint";
},
{
"kind": "account";
"path": "user";
}
];
};
},
{
"name": "user";
"writable": true;
"signer": true;
},
{
"name": "configAccount";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
99,
111,
110,
102,
105,
103,
95,
100,
97,
116,
97
];
},
{
"kind": "account";
"path": "mint";
}
];
};
},
{
"name": "systemConfigAccount";
},
{
"name": "mintTokenVault";
"writable": true;
},
{
"name": "tokenVault";
"writable": true;
},
{
"name": "wsolVault";
"writable": true;
},
{
"name": "wsolMint";
},
{
"name": "referrerAta";
},
{
"name": "referrerMain";
"writable": true;
},
{
"name": "referralAccount";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
114,
101,
102,
101,
114,
114,
97,
108
];
},
{
"kind": "account";
"path": "mint";
},
{
"kind": "account";
"path": "referrerMain";
}
];
};
},
{
"name": "protocolFeeAccount";
},
{
"name": "protocolWsolVault";
"writable": true;
},
{
"name": "poolState";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
112,
111,
111,
108
];
},
{
"kind": "account";
"path": "ammConfig";
},
{
"kind": "account";
"path": "token0Mint";
},
{
"kind": "account";
"path": "token1Mint";
}
];
"program": {
"kind": "account";
"path": "cpSwapProgram";
};
};
},
{
"name": "ammConfig";
},
{
"name": "cpSwapProgram";
"address": "CPMDWBwJDtYax9qW7AyRuVC19Cc4L4Vcy4n2BHAbHkCW";
},
{
"name": "token0Mint";
},
{
"name": "token1Mint";
},
{
"name": "rent";
"address": "SysvarRent111111111111111111111111111111111";
},
{
"name": "tokenProgram";
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
},
{
"name": "systemProgram";
"address": "11111111111111111111111111111111";
},
{
"name": "associatedTokenProgram";
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
}
];
"args": [
{
"name": "tokenName";
"type": "string";
},
{
"name": "tokenSymbol";
"type": "string";
},
{
"name": "codeHash";
"type": "bytes";
}
];
},
{
"name": "proxyBurnLpTokens";
"docs": [
"Burn lp tokens"
];
"discriminator": [
215,
41,
48,
70,
81,
221,
246,
105
];
"accounts": [
{
"name": "admin";
"writable": true;
"signer": true;
},
{
"name": "mint";
"docs": [
"token mint"
];
"pda": {
"seeds": [
{
"kind": "const";
"value": [
102,
97,
105,
114,
95,
109,
105,
110,
116
];
},
{
"kind": "arg";
"path": "tokenName";
},
{
"kind": "arg";
"path": "tokenSymbol";
}
];
};
},
{
"name": "configAccount";
"writable": true;
"pda": {
"seeds": [
{
"kind": "const";
"value": [
99,
111,
110,
102,
105,
103,
95,
100,
97,
116,
97
];
},
{
"kind": "account";
"path": "mint";
}
];
};
},
{
"name": "ownerLpToken";
"docs": [
"Owner lp tokan account - config account"
];
"writable": true;
},
{
"name": "lpMint";
"writable": true;
},
{
"name": "tokenProgram";
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
}
];
"args": [
{
"name": "tokenName";
"type": "string";
},
{
"name": "tokenSymbol";
"type": "string";
},
{
"name": "amount";
"type": "u64";
}
];
},
{
"name": "proxyDeposit";
"docs": [
"Initiazlize a swap pool (Deprated)",
"deposit instruction"
];
"discriminator": [
99,
49,
91,
137,
172,
25,
207,
21
];
"accounts": [
{
"name": "cpSwapProgram";
"address": "CPMDWBwJDtYax9qW7AyRuVC19Cc4L4Vcy4n2BHAbHkCW";
},
{
"name": "owner";
"docs": [
"Pays to mint the position"
];
"writable": true;
"signer": true;
},
{
"name": "mint";
"docs": [
"Token mint"
];
"pda": {
"seeds": [
{
"kind": "const";
"value": [
102,
97,
105,
114,
95,
109,
105,
110,
116
];
},
{
"kind": "arg";
"path": "tokenName";
},
{
"kind": "arg";
"path": "tokenSymbol";
}
];
};
},
{
"name": "configAccount";
"docs": [
"Config account"
];
"pda": {
"seeds": [
{
"kind": "const";
"value": [
99,
111,
110,
102,
105,
103,
95,
100,
97,
116,
97
];
},
{
"kind": "account";
"path": "mint";
}
];
};
},
{
"name": "authority";
"pda": {
"seeds": [
{
"kind": "const";
"value": [
118,
97,
117,
108,
116,
95,
97,
110,
100,
95,
108,
112,
95,
109,
105,
110,
116,
95,
97,
117,
116,
104,
95,
115,
101,
101,
100
];
}
];
"program": {
"kind": "const";
"value": [
169,
42,
49,
26,
136,
152,
134,
77,
32,
99,
200,
252,
203,
83,
110,
30,
138,
48,
77,
141,
83,
152,
76,
10,
78,
179,
193,
68,
7,
214,
116,
231
];
};
};
},
{
"name": "poolState";
"docs": [
"pool state"
];
"writable": true;
},
{
"name": "ownerLpToken";
"docs": [
"Owner lp tokan account"
];
"writable": true;
},
{
"name": "token0Account";
"docs": [
"The payer's token account for token_0"
];
"writable": true;
},
{
"name": "token1Account";
"docs": [
"The payer's token account for token_1"
];
"writable": true;
},
{
"name": "token0Vault";
"docs": [
"The address that holds pool tokens for token_0"
];
"writable": true;
},
{
"name": "token1Vault";
"docs": [
"The address that holds pool tokens for token_1"
];
"writable": true;
},
{
"name": "tokenProgram";
"docs": [
"token Program"
];
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
},
{
"name": "tokenProgram2022";
"docs": [
"Token program 2022"
];
"address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
},
{
"name": "vault0Mint";
"docs": [
"The mint of token_0 vault"
];
},
{
"name": "vault1Mint";
"docs": [
"The mint of token_1 vault"
];
},
{
"name": "lpMint";
"writable": true;
}
];
"args": [
{
"name": "tokenName";
"type": "string";
},
{
"name": "tokenSymbol";
"type": "string";
},
{
"name": "lpTokenAmount";
"type": "u64";
},
{
"name": "maximumToken0Amount";
"type": "u64";
},
{
"name": "maximumToken1Amount";
"type": "u64";
}
];
},
{
"name": "proxySwapBaseIn";
"docs": [
"swap_base_in instruction"
];
"discriminator": [
250,
174,
212,
217,
47,
84,
212,
231
];
"accounts": [
{
"name": "cpSwapProgram";
"address": "CPMDWBwJDtYax9qW7AyRuVC19Cc4L4Vcy4n2BHAbHkCW";
},
{
"name": "payer";
"docs": [
"The user performing the swap"
];
"writable": true;
"signer": true;
},
{
"name": "mint";
"docs": [
"Token mint"
];
"pda": {
"seeds": [
{
"kind": "const";
"value": [
102,
97,
105,
114,
95,
109,
105,
110,
116
];
},
{
"kind": "arg";
"path": "tokenName";
},
{
"kind": "arg";
"path": "tokenSymbol";
}
];
};
},
{
"name": "configAccount";
"docs": [
"Config account"
];
"pda": {
"seeds": [
{
"kind": "const";
"value": [
99,
111,
110,
102,
105,
103,
95,
100,
97,
116,
97
];
},
{
"kind": "account";
"path": "mint";
}
];
};
},
{
"name": "authority";
"pda": {
"seeds": [
{
"kind": "const";
"value": [
118,
97,
117,
108,
116,
95,
97,
110,
100,
95,
108,
112,
95,
109,
105,
110,
116,
95,
97,
117,
116,
104,
95,
115,
101,
101,
100
];
}
];
"program": {
"kind": "const";
"value": [
169,
42,
49,
26,
136,
152,
134,
77,
32,
99,
200,
252,
203,
83,
110,
30,
138,
48,
77,
141,
83,
152,
76,
10,
78,
179,
193,
68,
7,
214,
116,
231
];
};
};
},
{
"name": "ammConfig";
"docs": [
"The factory state to read protocol fees"
];
},
{
"name": "poolState";
"docs": [
"pool state"
];
"writable": true;
},
{
"name": "inputTokenAccount";
"docs": [
"The user token account for input token"
];
"writable": true;
},
{
"name": "outputTokenAccount";
"docs": [
"The user