@whetstone-research/doppler-sdk 1.0.34 → 1.0.36
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.
- package/README.md +6 -0
- package/dist/{chunk-PSLY7M7C.js → chunk-4N5U2MXE.js} +305 -4
- package/dist/chunk-4N5U2MXE.js.map +1 -0
- package/dist/{chunk-7PXLEMBJ.cjs → chunk-AANZBN5X.cjs} +345 -36
- package/dist/chunk-AANZBN5X.cjs.map +1 -0
- package/dist/{chunk-4CI2M2F6.cjs → chunk-O2Z5ORGF.cjs} +39 -2
- package/dist/chunk-O2Z5ORGF.cjs.map +1 -0
- package/dist/{chunk-AFXFT3BD.js → chunk-PWBQLC5V.js} +39 -3
- package/dist/chunk-PWBQLC5V.js.map +1 -0
- package/dist/evm/index.cjs +438 -415
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.d.cts +118 -5
- package/dist/evm/index.d.ts +118 -5
- package/dist/evm/index.js +436 -417
- package/dist/evm/index.js.map +1 -1
- package/dist/{pda-44IHEORD.cjs → pda-4VCQGO3F.cjs} +22 -18
- package/dist/{pda-44IHEORD.cjs.map → pda-4VCQGO3F.cjs.map} +1 -1
- package/dist/pda-IRVGRDQX.js +4 -0
- package/dist/pda-IRVGRDQX.js.map +1 -0
- package/dist/solana/index.cjs +10732 -3883
- package/dist/solana/index.cjs.map +1 -1
- package/dist/solana/index.d.cts +5635 -2108
- package/dist/solana/index.d.ts +5635 -2108
- package/dist/solana/index.js +10314 -3471
- package/dist/solana/index.js.map +1 -1
- package/dist/solana/react/index.cjs +45 -45
- package/dist/solana/react/index.js +3 -3
- package/package.json +2 -1
- package/dist/chunk-4CI2M2F6.cjs.map +0 -1
- package/dist/chunk-7PXLEMBJ.cjs.map +0 -1
- package/dist/chunk-AFXFT3BD.js.map +0 -1
- package/dist/chunk-PSLY7M7C.js.map +0 -1
- package/dist/pda-WJVDXQPW.js +0 -4
- package/dist/pda-WJVDXQPW.js.map +0 -1
package/README.md
CHANGED
|
@@ -103,6 +103,12 @@ For runnable Solana flows, configure `examples/.env` and run with `pnpm tsx`, fo
|
|
|
103
103
|
- [examples/solana-usdc-cosigner-gated-buy.ts](./examples/solana-usdc-cosigner-gated-buy.ts)
|
|
104
104
|
- [examples/solana-prediction-market.ts](./examples/solana-prediction-market.ts)
|
|
105
105
|
- [examples/solana-swap.ts](./examples/solana-swap.ts)
|
|
106
|
+
- [examples/solana-vesting-launch.ts](./examples/solana-vesting-launch.ts)
|
|
107
|
+
- [examples/solana-vesting-claim.ts](./examples/solana-vesting-claim.ts)
|
|
108
|
+
|
|
109
|
+
To implement an independently deployed callback program, see
|
|
110
|
+
[Building a custom Solana hook](./docs/solana-custom-hooks.md) and the
|
|
111
|
+
[minimal Anchor example](./examples/solana-custom-hook/).
|
|
106
112
|
|
|
107
113
|
Resolve managed swap cosigning before constructing a launch:
|
|
108
114
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MAX_HOOK_ALLOWLIST, MAX_ORACLE_OBSERVATIONS, ACCOUNT_DISCRIMINATORS, CPMM_PROGRAM_ID, Q64_ONE, BPS_DENOM, getPoolAddress, sortMints, getPositionAddress, getOracleAddress } from './chunk-
|
|
1
|
+
import { MAX_HOOK_ALLOWLIST, MAX_ORACLE_OBSERVATIONS, ACCOUNT_DISCRIMINATORS, CPMM_PROGRAM_ID, Q64_ONE, BPS_DENOM, getPoolAddress, sortMints, getPositionAddress, getOracleAddress } from './chunk-PWBQLC5V.js';
|
|
2
2
|
import { getAddressCodec, getBooleanCodec, getU8Codec, getU16Codec, getU32Codec, getU64Codec, getU128Codec, transformCodec, getArrayCodec, fixCodecSize, getBytesCodec, getStructCodec, getHiddenPrefixDecoder, getConstantDecoder, mergeBytes, AccountRole, fixEncoderSize, getBytesEncoder, transformEncoder, getStructEncoder, getStructDecoder, fixDecoderSize, getBytesDecoder, combineCodec, SolanaError, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, getU64Encoder, getU64Decoder, getProgramDerivedAddress, getAddressEncoder, getU16Encoder, getBooleanEncoder, getArrayEncoder, getAddressDecoder, getU16Decoder, getBooleanDecoder, getArrayDecoder, getU128Encoder, getU32Encoder, getU128Decoder, getU32Decoder, getU8Encoder, getU8Decoder } from '@solana/kit';
|
|
3
3
|
import { getAccountMetaFactory, getAddressFromResolvedInstructionAccount, getNonNullResolvedInstructionInput } from '@solana/program-client-core';
|
|
4
4
|
|
|
@@ -1989,6 +1989,307 @@ function parseInitializeSpotPoolInstruction(instruction) {
|
|
|
1989
1989
|
)
|
|
1990
1990
|
};
|
|
1991
1991
|
}
|
|
1992
|
+
var INITIALIZE_SPOT_POOL_WITH_HOOK_DISCRIMINATOR = new Uint8Array([
|
|
1993
|
+
98,
|
|
1994
|
+
227,
|
|
1995
|
+
206,
|
|
1996
|
+
159,
|
|
1997
|
+
252,
|
|
1998
|
+
134,
|
|
1999
|
+
77,
|
|
2000
|
+
21
|
|
2001
|
+
]);
|
|
2002
|
+
function getInitializeSpotPoolWithHookDiscriminatorBytes() {
|
|
2003
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
2004
|
+
INITIALIZE_SPOT_POOL_WITH_HOOK_DISCRIMINATOR
|
|
2005
|
+
);
|
|
2006
|
+
}
|
|
2007
|
+
function getInitializeSpotPoolWithHookInstructionDataEncoder() {
|
|
2008
|
+
return transformEncoder(
|
|
2009
|
+
getStructEncoder([
|
|
2010
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
2011
|
+
["mintA", getAddressEncoder()],
|
|
2012
|
+
["mintB", getAddressEncoder()],
|
|
2013
|
+
["swapFeeBps", getU16Encoder()],
|
|
2014
|
+
["hookProgram", getAddressEncoder()],
|
|
2015
|
+
["hookFlags", getU32Encoder()]
|
|
2016
|
+
]),
|
|
2017
|
+
(value) => ({
|
|
2018
|
+
...value,
|
|
2019
|
+
discriminator: INITIALIZE_SPOT_POOL_WITH_HOOK_DISCRIMINATOR
|
|
2020
|
+
})
|
|
2021
|
+
);
|
|
2022
|
+
}
|
|
2023
|
+
function getInitializeSpotPoolWithHookInstructionDataDecoder() {
|
|
2024
|
+
return getStructDecoder([
|
|
2025
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
2026
|
+
["mintA", getAddressDecoder()],
|
|
2027
|
+
["mintB", getAddressDecoder()],
|
|
2028
|
+
["swapFeeBps", getU16Decoder()],
|
|
2029
|
+
["hookProgram", getAddressDecoder()],
|
|
2030
|
+
["hookFlags", getU32Decoder()]
|
|
2031
|
+
]);
|
|
2032
|
+
}
|
|
2033
|
+
function getInitializeSpotPoolWithHookInstructionDataCodec() {
|
|
2034
|
+
return combineCodec(
|
|
2035
|
+
getInitializeSpotPoolWithHookInstructionDataEncoder(),
|
|
2036
|
+
getInitializeSpotPoolWithHookInstructionDataDecoder()
|
|
2037
|
+
);
|
|
2038
|
+
}
|
|
2039
|
+
async function getInitializeSpotPoolWithHookInstructionAsync(input, config) {
|
|
2040
|
+
const programAddress = config?.programAddress ?? CPMM_PROGRAM_ADDRESS;
|
|
2041
|
+
const originalAccounts = {
|
|
2042
|
+
config: { value: input.config ?? null, isWritable: false },
|
|
2043
|
+
pool: { value: input.pool ?? null, isWritable: true },
|
|
2044
|
+
protocolFeePosition: {
|
|
2045
|
+
value: input.protocolFeePosition ?? null,
|
|
2046
|
+
isWritable: true
|
|
2047
|
+
},
|
|
2048
|
+
protocolFeeOwner: {
|
|
2049
|
+
value: input.protocolFeeOwner ?? null,
|
|
2050
|
+
isWritable: false
|
|
2051
|
+
},
|
|
2052
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
2053
|
+
vault0: { value: input.vault0 ?? null, isWritable: true },
|
|
2054
|
+
vault1: { value: input.vault1 ?? null, isWritable: true },
|
|
2055
|
+
token0Mint: { value: input.token0Mint ?? null, isWritable: false },
|
|
2056
|
+
token1Mint: { value: input.token1Mint ?? null, isWritable: false },
|
|
2057
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
2058
|
+
token0Program: { value: input.token0Program ?? null, isWritable: false },
|
|
2059
|
+
token1Program: { value: input.token1Program ?? null, isWritable: false },
|
|
2060
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
2061
|
+
rent: { value: input.rent ?? null, isWritable: false },
|
|
2062
|
+
migrationAuthority: {
|
|
2063
|
+
value: input.migrationAuthority ?? null,
|
|
2064
|
+
isWritable: false
|
|
2065
|
+
},
|
|
2066
|
+
hookProgram: { value: input.hookProgram ?? null, isWritable: false }
|
|
2067
|
+
};
|
|
2068
|
+
const accounts = originalAccounts;
|
|
2069
|
+
const args = { ...input, hookProgram: input.hookProgramArg };
|
|
2070
|
+
if (!accounts.protocolFeeOwner.value) {
|
|
2071
|
+
accounts.protocolFeeOwner.value = await getProgramDerivedAddress({
|
|
2072
|
+
programAddress,
|
|
2073
|
+
seeds: [
|
|
2074
|
+
getBytesEncoder().encode(
|
|
2075
|
+
new Uint8Array([
|
|
2076
|
+
112,
|
|
2077
|
+
114,
|
|
2078
|
+
111,
|
|
2079
|
+
116,
|
|
2080
|
+
111,
|
|
2081
|
+
99,
|
|
2082
|
+
111,
|
|
2083
|
+
108,
|
|
2084
|
+
95,
|
|
2085
|
+
102,
|
|
2086
|
+
101,
|
|
2087
|
+
101,
|
|
2088
|
+
95,
|
|
2089
|
+
111,
|
|
2090
|
+
119,
|
|
2091
|
+
110,
|
|
2092
|
+
101,
|
|
2093
|
+
114
|
|
2094
|
+
])
|
|
2095
|
+
),
|
|
2096
|
+
getAddressEncoder().encode(
|
|
2097
|
+
getAddressFromResolvedInstructionAccount("pool", accounts.pool.value)
|
|
2098
|
+
)
|
|
2099
|
+
]
|
|
2100
|
+
});
|
|
2101
|
+
}
|
|
2102
|
+
if (!accounts.protocolFeePosition.value) {
|
|
2103
|
+
accounts.protocolFeePosition.value = await getProgramDerivedAddress({
|
|
2104
|
+
programAddress,
|
|
2105
|
+
seeds: [
|
|
2106
|
+
getBytesEncoder().encode(
|
|
2107
|
+
new Uint8Array([112, 111, 115, 105, 116, 105, 111, 110])
|
|
2108
|
+
),
|
|
2109
|
+
getAddressEncoder().encode(
|
|
2110
|
+
getAddressFromResolvedInstructionAccount("pool", accounts.pool.value)
|
|
2111
|
+
),
|
|
2112
|
+
getAddressEncoder().encode(
|
|
2113
|
+
getAddressFromResolvedInstructionAccount(
|
|
2114
|
+
"protocolFeeOwner",
|
|
2115
|
+
accounts.protocolFeeOwner.value
|
|
2116
|
+
)
|
|
2117
|
+
),
|
|
2118
|
+
getBytesEncoder().encode(new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]))
|
|
2119
|
+
]
|
|
2120
|
+
});
|
|
2121
|
+
}
|
|
2122
|
+
if (!accounts.authority.value) {
|
|
2123
|
+
accounts.authority.value = await getProgramDerivedAddress({
|
|
2124
|
+
programAddress,
|
|
2125
|
+
seeds: [
|
|
2126
|
+
getBytesEncoder().encode(
|
|
2127
|
+
new Uint8Array([97, 117, 116, 104, 111, 114, 105, 116, 121])
|
|
2128
|
+
),
|
|
2129
|
+
getAddressEncoder().encode(
|
|
2130
|
+
getAddressFromResolvedInstructionAccount("pool", accounts.pool.value)
|
|
2131
|
+
)
|
|
2132
|
+
]
|
|
2133
|
+
});
|
|
2134
|
+
}
|
|
2135
|
+
if (!accounts.vault0.value) {
|
|
2136
|
+
accounts.vault0.value = await getProgramDerivedAddress({
|
|
2137
|
+
programAddress,
|
|
2138
|
+
seeds: [
|
|
2139
|
+
getBytesEncoder().encode(new Uint8Array([118, 97, 117, 108, 116, 48])),
|
|
2140
|
+
getAddressEncoder().encode(
|
|
2141
|
+
getAddressFromResolvedInstructionAccount("pool", accounts.pool.value)
|
|
2142
|
+
)
|
|
2143
|
+
]
|
|
2144
|
+
});
|
|
2145
|
+
}
|
|
2146
|
+
if (!accounts.vault1.value) {
|
|
2147
|
+
accounts.vault1.value = await getProgramDerivedAddress({
|
|
2148
|
+
programAddress,
|
|
2149
|
+
seeds: [
|
|
2150
|
+
getBytesEncoder().encode(new Uint8Array([118, 97, 117, 108, 116, 49])),
|
|
2151
|
+
getAddressEncoder().encode(
|
|
2152
|
+
getAddressFromResolvedInstructionAccount("pool", accounts.pool.value)
|
|
2153
|
+
)
|
|
2154
|
+
]
|
|
2155
|
+
});
|
|
2156
|
+
}
|
|
2157
|
+
if (!accounts.systemProgram.value) {
|
|
2158
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
2159
|
+
}
|
|
2160
|
+
if (!accounts.rent.value) {
|
|
2161
|
+
accounts.rent.value = "SysvarRent111111111111111111111111111111111";
|
|
2162
|
+
}
|
|
2163
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
2164
|
+
return Object.freeze({
|
|
2165
|
+
accounts: [
|
|
2166
|
+
getAccountMeta("config", accounts.config),
|
|
2167
|
+
getAccountMeta("pool", accounts.pool),
|
|
2168
|
+
getAccountMeta("protocolFeePosition", accounts.protocolFeePosition),
|
|
2169
|
+
getAccountMeta("protocolFeeOwner", accounts.protocolFeeOwner),
|
|
2170
|
+
getAccountMeta("authority", accounts.authority),
|
|
2171
|
+
getAccountMeta("vault0", accounts.vault0),
|
|
2172
|
+
getAccountMeta("vault1", accounts.vault1),
|
|
2173
|
+
getAccountMeta("token0Mint", accounts.token0Mint),
|
|
2174
|
+
getAccountMeta("token1Mint", accounts.token1Mint),
|
|
2175
|
+
getAccountMeta("payer", accounts.payer),
|
|
2176
|
+
getAccountMeta("token0Program", accounts.token0Program),
|
|
2177
|
+
getAccountMeta("token1Program", accounts.token1Program),
|
|
2178
|
+
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
2179
|
+
getAccountMeta("rent", accounts.rent),
|
|
2180
|
+
getAccountMeta("migrationAuthority", accounts.migrationAuthority),
|
|
2181
|
+
getAccountMeta("hookProgram", accounts.hookProgram)
|
|
2182
|
+
],
|
|
2183
|
+
data: getInitializeSpotPoolWithHookInstructionDataEncoder().encode(
|
|
2184
|
+
args
|
|
2185
|
+
),
|
|
2186
|
+
programAddress
|
|
2187
|
+
});
|
|
2188
|
+
}
|
|
2189
|
+
function getInitializeSpotPoolWithHookInstruction(input, config) {
|
|
2190
|
+
const programAddress = config?.programAddress ?? CPMM_PROGRAM_ADDRESS;
|
|
2191
|
+
const originalAccounts = {
|
|
2192
|
+
config: { value: input.config ?? null, isWritable: false },
|
|
2193
|
+
pool: { value: input.pool ?? null, isWritable: true },
|
|
2194
|
+
protocolFeePosition: {
|
|
2195
|
+
value: input.protocolFeePosition ?? null,
|
|
2196
|
+
isWritable: true
|
|
2197
|
+
},
|
|
2198
|
+
protocolFeeOwner: {
|
|
2199
|
+
value: input.protocolFeeOwner ?? null,
|
|
2200
|
+
isWritable: false
|
|
2201
|
+
},
|
|
2202
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
2203
|
+
vault0: { value: input.vault0 ?? null, isWritable: true },
|
|
2204
|
+
vault1: { value: input.vault1 ?? null, isWritable: true },
|
|
2205
|
+
token0Mint: { value: input.token0Mint ?? null, isWritable: false },
|
|
2206
|
+
token1Mint: { value: input.token1Mint ?? null, isWritable: false },
|
|
2207
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
2208
|
+
token0Program: { value: input.token0Program ?? null, isWritable: false },
|
|
2209
|
+
token1Program: { value: input.token1Program ?? null, isWritable: false },
|
|
2210
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
2211
|
+
rent: { value: input.rent ?? null, isWritable: false },
|
|
2212
|
+
migrationAuthority: {
|
|
2213
|
+
value: input.migrationAuthority ?? null,
|
|
2214
|
+
isWritable: false
|
|
2215
|
+
},
|
|
2216
|
+
hookProgram: { value: input.hookProgram ?? null, isWritable: false }
|
|
2217
|
+
};
|
|
2218
|
+
const accounts = originalAccounts;
|
|
2219
|
+
const args = { ...input, hookProgram: input.hookProgramArg };
|
|
2220
|
+
if (!accounts.systemProgram.value) {
|
|
2221
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
2222
|
+
}
|
|
2223
|
+
if (!accounts.rent.value) {
|
|
2224
|
+
accounts.rent.value = "SysvarRent111111111111111111111111111111111";
|
|
2225
|
+
}
|
|
2226
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
2227
|
+
return Object.freeze({
|
|
2228
|
+
accounts: [
|
|
2229
|
+
getAccountMeta("config", accounts.config),
|
|
2230
|
+
getAccountMeta("pool", accounts.pool),
|
|
2231
|
+
getAccountMeta("protocolFeePosition", accounts.protocolFeePosition),
|
|
2232
|
+
getAccountMeta("protocolFeeOwner", accounts.protocolFeeOwner),
|
|
2233
|
+
getAccountMeta("authority", accounts.authority),
|
|
2234
|
+
getAccountMeta("vault0", accounts.vault0),
|
|
2235
|
+
getAccountMeta("vault1", accounts.vault1),
|
|
2236
|
+
getAccountMeta("token0Mint", accounts.token0Mint),
|
|
2237
|
+
getAccountMeta("token1Mint", accounts.token1Mint),
|
|
2238
|
+
getAccountMeta("payer", accounts.payer),
|
|
2239
|
+
getAccountMeta("token0Program", accounts.token0Program),
|
|
2240
|
+
getAccountMeta("token1Program", accounts.token1Program),
|
|
2241
|
+
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
2242
|
+
getAccountMeta("rent", accounts.rent),
|
|
2243
|
+
getAccountMeta("migrationAuthority", accounts.migrationAuthority),
|
|
2244
|
+
getAccountMeta("hookProgram", accounts.hookProgram)
|
|
2245
|
+
],
|
|
2246
|
+
data: getInitializeSpotPoolWithHookInstructionDataEncoder().encode(
|
|
2247
|
+
args
|
|
2248
|
+
),
|
|
2249
|
+
programAddress
|
|
2250
|
+
});
|
|
2251
|
+
}
|
|
2252
|
+
function parseInitializeSpotPoolWithHookInstruction(instruction) {
|
|
2253
|
+
if (instruction.accounts.length < 16) {
|
|
2254
|
+
throw new SolanaError(
|
|
2255
|
+
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
2256
|
+
{
|
|
2257
|
+
actualAccountMetas: instruction.accounts.length,
|
|
2258
|
+
expectedAccountMetas: 16
|
|
2259
|
+
}
|
|
2260
|
+
);
|
|
2261
|
+
}
|
|
2262
|
+
let accountIndex = 0;
|
|
2263
|
+
const getNextAccount = () => {
|
|
2264
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
2265
|
+
accountIndex += 1;
|
|
2266
|
+
return accountMeta;
|
|
2267
|
+
};
|
|
2268
|
+
return {
|
|
2269
|
+
programAddress: instruction.programAddress,
|
|
2270
|
+
accounts: {
|
|
2271
|
+
config: getNextAccount(),
|
|
2272
|
+
pool: getNextAccount(),
|
|
2273
|
+
protocolFeePosition: getNextAccount(),
|
|
2274
|
+
protocolFeeOwner: getNextAccount(),
|
|
2275
|
+
authority: getNextAccount(),
|
|
2276
|
+
vault0: getNextAccount(),
|
|
2277
|
+
vault1: getNextAccount(),
|
|
2278
|
+
token0Mint: getNextAccount(),
|
|
2279
|
+
token1Mint: getNextAccount(),
|
|
2280
|
+
payer: getNextAccount(),
|
|
2281
|
+
token0Program: getNextAccount(),
|
|
2282
|
+
token1Program: getNextAccount(),
|
|
2283
|
+
systemProgram: getNextAccount(),
|
|
2284
|
+
rent: getNextAccount(),
|
|
2285
|
+
migrationAuthority: getNextAccount(),
|
|
2286
|
+
hookProgram: getNextAccount()
|
|
2287
|
+
},
|
|
2288
|
+
data: getInitializeSpotPoolWithHookInstructionDataDecoder().decode(
|
|
2289
|
+
instruction.data
|
|
2290
|
+
)
|
|
2291
|
+
};
|
|
2292
|
+
}
|
|
1992
2293
|
var ORACLE_CONSULT_DISCRIMINATOR = new Uint8Array([
|
|
1993
2294
|
239,
|
|
1994
2295
|
237,
|
|
@@ -4164,6 +4465,6 @@ function comparePoolAndOraclePrices(pool, oracle) {
|
|
|
4164
4465
|
};
|
|
4165
4466
|
}
|
|
4166
4467
|
|
|
4167
|
-
export { ADD_LIQUIDITY_DISCRIMINATOR, CLOSE_POSITION_DISCRIMINATOR, COLLECT_FEES_DISCRIMINATOR, COLLECT_PROTOCOL_FEES_DISCRIMINATOR, CPMM_PROGRAM_ADDRESS, CREATE_POSITION_DISCRIMINATOR, INITIALIZE_CONFIG_DISCRIMINATOR, INITIALIZE_ORACLE_DISCRIMINATOR, INITIALIZE_POOL_DISCRIMINATOR, INITIALIZE_SPOT_POOL_DISCRIMINATOR, ORACLE_CONSULT_DISCRIMINATOR, ORACLE_UPDATE_DISCRIMINATOR, PAUSE_DISCRIMINATOR, PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR, REDEEM_PROTOCOL_SHARES_DISCRIMINATOR, REMOVE_LIQUIDITY_DISCRIMINATOR, SET_FEES_DISCRIMINATOR, SET_HOOK_DISCRIMINATOR, SWAP_EXACT_IN_DISCRIMINATOR, TRANSFER_ADMIN_DISCRIMINATOR, UNPAUSE_DISCRIMINATOR, UPDATE_CONFIG_DISCRIMINATOR, WITHDRAW_VAULT_EXCESS_DISCRIMINATOR, addLiquidityArgsCodec, addressToBase58EncodedBytes, ammConfigDataCodec, base64ToBytes, bytesToBase64, bytesToBase64EncodedBytes, calculateAccruedFees, calculateTwap, calculateTwapNumber, ceilDiv, collectFeesArgsCodec, collectProtocolFeesArgsCodec, comparePoolAndOraclePrices, computePrice0Q64, computePrice1Q64, consultTwap, createAccountMeta, createPositionArgsCodec, createReadonlyRemainingAccountMeta, decodeAmmConfig, decodeOracleState, decodePool, decodePosition, encodeAddLiquidityArgs, encodeCollectFeesArgs, encodeCollectProtocolFeesArgs, encodeCreatePositionArgs, encodeInitializeConfigArgs, encodeInitializeOracleArgs, encodeInitializePoolArgs, encodeInstructionData, encodeOracleConsultArgs, encodeRemoveLiquidityArgs, encodeSetFeesArgs, encodeSetHookArgs, encodeSwapExactInArgs, encodeTransferAdminArgs, fetchAllPools, fetchOracle, fetchOraclesBatch, fetchPool, fetchPoolPositions, fetchPoolsBatch, fetchPosition, fetchPositionByParams, fetchPositionsBatch, fetchUserPositions, filterActivePositions, filterPoolsByMint, getAddLiquidityDiscriminatorBytes, getAddLiquidityInstruction, getAddLiquidityInstructionAsync, getAddLiquidityInstructionDataCodec, getAddLiquidityInstructionDataDecoder, getAddLiquidityInstructionDataEncoder, getAddLiquidityQuote, getAddressFromAddressOrSigner, getAddressFromRemainingAccount, getClosePositionDiscriminatorBytes, getClosePositionInstruction, getClosePositionInstructionDataCodec, getClosePositionInstructionDataDecoder, getClosePositionInstructionDataEncoder, getCollectFeesDiscriminatorBytes, getCollectFeesInstruction, getCollectFeesInstructionAsync, getCollectFeesInstructionDataCodec, getCollectFeesInstructionDataDecoder, getCollectFeesInstructionDataEncoder, getCollectProtocolFeesDiscriminatorBytes, getCollectProtocolFeesInstruction, getCollectProtocolFeesInstructionAsync, getCollectProtocolFeesInstructionDataCodec, getCollectProtocolFeesInstructionDataDecoder, getCollectProtocolFeesInstructionDataEncoder, getCreatePositionDiscriminatorBytes, getCreatePositionInstruction, getCreatePositionInstructionAsync, getCreatePositionInstructionDataCodec, getCreatePositionInstructionDataDecoder, getCreatePositionInstructionDataEncoder, getInitializeConfigDiscriminatorBytes, getInitializeConfigInstruction, getInitializeConfigInstructionAsync, getInitializeConfigInstructionDataCodec, getInitializeConfigInstructionDataDecoder, getInitializeConfigInstructionDataEncoder, getInitializeOracleDiscriminatorBytes, getInitializeOracleInstruction, getInitializeOracleInstructionAsync, getInitializeOracleInstructionDataCodec, getInitializeOracleInstructionDataDecoder, getInitializeOracleInstructionDataEncoder, getInitializePoolDiscriminatorBytes, getInitializePoolInstruction, getInitializePoolInstructionAsync, getInitializePoolInstructionDataCodec, getInitializePoolInstructionDataDecoder, getInitializePoolInstructionDataEncoder, getInitializeSpotPoolDiscriminatorBytes, getInitializeSpotPoolInstruction, getInitializeSpotPoolInstructionAsync, getInitializeSpotPoolInstructionDataCodec, getInitializeSpotPoolInstructionDataDecoder, getInitializeSpotPoolInstructionDataEncoder, getK, getOracleAddressFromPool, getOracleAge, getOracleBufferStats, getOracleConsultDiscriminatorBytes, getOracleConsultInstruction, getOracleConsultInstructionAsync, getOracleConsultInstructionDataCodec, getOracleConsultInstructionDataDecoder, getOracleConsultInstructionDataEncoder, getOracleDeviation, getOracleForPool, getOracleSpotPrices, getOracleUpdateDiscriminatorBytes, getOracleUpdateInstruction, getOracleUpdateInstructionAsync, getOracleUpdateInstructionDataCodec, getOracleUpdateInstructionDataDecoder, getOracleUpdateInstructionDataEncoder, getPauseDiscriminatorBytes, getPauseInstruction, getPauseInstructionDataCodec, getPauseInstructionDataDecoder, getPauseInstructionDataEncoder, getPendingFees, getPoolAddressFromMints, getPoolByMints, getPositionAddressFromParams, getPositionValue, getPreviewSwapExactInDiscriminatorBytes, getPreviewSwapExactInInstruction, getPreviewSwapExactInInstructionDataCodec, getPreviewSwapExactInInstructionDataDecoder, getPreviewSwapExactInInstructionDataEncoder, getRedeemProtocolSharesDiscriminatorBytes, getRedeemProtocolSharesInstruction, getRedeemProtocolSharesInstructionAsync, getRedeemProtocolSharesInstructionDataCodec, getRedeemProtocolSharesInstructionDataDecoder, getRedeemProtocolSharesInstructionDataEncoder, getRemoveLiquidityDiscriminatorBytes, getRemoveLiquidityInstruction, getRemoveLiquidityInstructionAsync, getRemoveLiquidityInstructionDataCodec, getRemoveLiquidityInstructionDataDecoder, getRemoveLiquidityInstructionDataEncoder, getRemoveLiquidityQuote, getSetFeesDiscriminatorBytes, getSetFeesInstruction, getSetFeesInstructionDataCodec, getSetFeesInstructionDataDecoder, getSetFeesInstructionDataEncoder, getSetHookDiscriminatorBytes, getSetHookInstruction, getSetHookInstructionDataCodec, getSetHookInstructionDataDecoder, getSetHookInstructionDataEncoder, getSpotPrice0, getSpotPrice1, getSwapExactInDiscriminatorBytes, getSwapExactInInstruction, getSwapExactInInstructionAsync, getSwapExactInInstructionDataCodec, getSwapExactInInstructionDataDecoder, getSwapExactInInstructionDataEncoder, getSwapQuote, getSwapQuoteExactOut, getTransferAdminDiscriminatorBytes, getTransferAdminInstruction, getTransferAdminInstructionDataCodec, getTransferAdminInstructionDataDecoder, getTransferAdminInstructionDataEncoder, getTvl, getUnpauseDiscriminatorBytes, getUnpauseInstruction, getUnpauseInstructionDataCodec, getUnpauseInstructionDataDecoder, getUnpauseInstructionDataEncoder, getUpdateConfigDiscriminatorBytes, getUpdateConfigInstruction, getUpdateConfigInstructionDataCodec, getUpdateConfigInstructionDataDecoder, getUpdateConfigInstructionDataEncoder, getWithdrawVaultExcessDiscriminatorBytes, getWithdrawVaultExcessInstruction, getWithdrawVaultExcessInstructionAsync, getWithdrawVaultExcessInstructionDataCodec, getWithdrawVaultExcessInstructionDataDecoder, getWithdrawVaultExcessInstructionDataEncoder, initializeConfigArgsCodec, initializeOracleArgsCodec, initializePoolArgsCodec, isOracleStale, isTransactionSigner, isqrt, maxBigInt, minBigInt, normalizeProgramAccountsResponse, numberToQ64, observationCodec, oracleConsultArgsCodec, oracleStateDataCodec, parseAddLiquidityInstruction, parseClosePositionInstruction, parseCollectFeesInstruction, parseCollectProtocolFeesInstruction, parseCreatePositionInstruction, parseInitializeConfigInstruction, parseInitializeOracleInstruction, parseInitializePoolInstruction, parseInitializeSpotPoolInstruction, parseOracleConsultInstruction, parseOracleUpdateInstruction, parsePauseInstruction, parsePreviewSwapExactInInstruction, parseRedeemProtocolSharesInstruction, parseRemoveLiquidityInstruction, parseSetFeesInstruction, parseSetHookInstruction, parseSwapExactInInstruction, parseTransferAdminInstruction, parseUnpauseInstruction, parseUpdateConfigInstruction, parseWithdrawVaultExcessInstruction, poolDataCodec, poolExists, positionDataCodec, q64Div, q64Mul, q64ToNumber, ratioToNumber, removeLiquidityArgsCodec, setFeesArgsCodec, setHookArgsCodec, sortPoolsByReserves, sortPositionsByShares, swapExactInArgsCodec, transferAdminArgsCodec, warnAccountDecodeFailure };
|
|
4168
|
-
//# sourceMappingURL=chunk-
|
|
4169
|
-
//# sourceMappingURL=chunk-
|
|
4468
|
+
export { ADD_LIQUIDITY_DISCRIMINATOR, CLOSE_POSITION_DISCRIMINATOR, COLLECT_FEES_DISCRIMINATOR, COLLECT_PROTOCOL_FEES_DISCRIMINATOR, CPMM_PROGRAM_ADDRESS, CREATE_POSITION_DISCRIMINATOR, INITIALIZE_CONFIG_DISCRIMINATOR, INITIALIZE_ORACLE_DISCRIMINATOR, INITIALIZE_POOL_DISCRIMINATOR, INITIALIZE_SPOT_POOL_DISCRIMINATOR, INITIALIZE_SPOT_POOL_WITH_HOOK_DISCRIMINATOR, ORACLE_CONSULT_DISCRIMINATOR, ORACLE_UPDATE_DISCRIMINATOR, PAUSE_DISCRIMINATOR, PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR, REDEEM_PROTOCOL_SHARES_DISCRIMINATOR, REMOVE_LIQUIDITY_DISCRIMINATOR, SET_FEES_DISCRIMINATOR, SET_HOOK_DISCRIMINATOR, SWAP_EXACT_IN_DISCRIMINATOR, TRANSFER_ADMIN_DISCRIMINATOR, UNPAUSE_DISCRIMINATOR, UPDATE_CONFIG_DISCRIMINATOR, WITHDRAW_VAULT_EXCESS_DISCRIMINATOR, addLiquidityArgsCodec, addressToBase58EncodedBytes, ammConfigDataCodec, base64ToBytes, bytesToBase64, bytesToBase64EncodedBytes, calculateAccruedFees, calculateTwap, calculateTwapNumber, ceilDiv, collectFeesArgsCodec, collectProtocolFeesArgsCodec, comparePoolAndOraclePrices, computePrice0Q64, computePrice1Q64, consultTwap, createAccountMeta, createPositionArgsCodec, createReadonlyRemainingAccountMeta, decodeAmmConfig, decodeOracleState, decodePool, decodePosition, encodeAddLiquidityArgs, encodeCollectFeesArgs, encodeCollectProtocolFeesArgs, encodeCreatePositionArgs, encodeInitializeConfigArgs, encodeInitializeOracleArgs, encodeInitializePoolArgs, encodeInstructionData, encodeOracleConsultArgs, encodeRemoveLiquidityArgs, encodeSetFeesArgs, encodeSetHookArgs, encodeSwapExactInArgs, encodeTransferAdminArgs, fetchAllPools, fetchOracle, fetchOraclesBatch, fetchPool, fetchPoolPositions, fetchPoolsBatch, fetchPosition, fetchPositionByParams, fetchPositionsBatch, fetchUserPositions, filterActivePositions, filterPoolsByMint, getAddLiquidityDiscriminatorBytes, getAddLiquidityInstruction, getAddLiquidityInstructionAsync, getAddLiquidityInstructionDataCodec, getAddLiquidityInstructionDataDecoder, getAddLiquidityInstructionDataEncoder, getAddLiquidityQuote, getAddressFromAddressOrSigner, getAddressFromRemainingAccount, getClosePositionDiscriminatorBytes, getClosePositionInstruction, getClosePositionInstructionDataCodec, getClosePositionInstructionDataDecoder, getClosePositionInstructionDataEncoder, getCollectFeesDiscriminatorBytes, getCollectFeesInstruction, getCollectFeesInstructionAsync, getCollectFeesInstructionDataCodec, getCollectFeesInstructionDataDecoder, getCollectFeesInstructionDataEncoder, getCollectProtocolFeesDiscriminatorBytes, getCollectProtocolFeesInstruction, getCollectProtocolFeesInstructionAsync, getCollectProtocolFeesInstructionDataCodec, getCollectProtocolFeesInstructionDataDecoder, getCollectProtocolFeesInstructionDataEncoder, getCreatePositionDiscriminatorBytes, getCreatePositionInstruction, getCreatePositionInstructionAsync, getCreatePositionInstructionDataCodec, getCreatePositionInstructionDataDecoder, getCreatePositionInstructionDataEncoder, getInitializeConfigDiscriminatorBytes, getInitializeConfigInstruction, getInitializeConfigInstructionAsync, getInitializeConfigInstructionDataCodec, getInitializeConfigInstructionDataDecoder, getInitializeConfigInstructionDataEncoder, getInitializeOracleDiscriminatorBytes, getInitializeOracleInstruction, getInitializeOracleInstructionAsync, getInitializeOracleInstructionDataCodec, getInitializeOracleInstructionDataDecoder, getInitializeOracleInstructionDataEncoder, getInitializePoolDiscriminatorBytes, getInitializePoolInstruction, getInitializePoolInstructionAsync, getInitializePoolInstructionDataCodec, getInitializePoolInstructionDataDecoder, getInitializePoolInstructionDataEncoder, getInitializeSpotPoolDiscriminatorBytes, getInitializeSpotPoolInstruction, getInitializeSpotPoolInstructionAsync, getInitializeSpotPoolInstructionDataCodec, getInitializeSpotPoolInstructionDataDecoder, getInitializeSpotPoolInstructionDataEncoder, getInitializeSpotPoolWithHookDiscriminatorBytes, getInitializeSpotPoolWithHookInstruction, getInitializeSpotPoolWithHookInstructionAsync, getInitializeSpotPoolWithHookInstructionDataCodec, getInitializeSpotPoolWithHookInstructionDataDecoder, getInitializeSpotPoolWithHookInstructionDataEncoder, getK, getOracleAddressFromPool, getOracleAge, getOracleBufferStats, getOracleConsultDiscriminatorBytes, getOracleConsultInstruction, getOracleConsultInstructionAsync, getOracleConsultInstructionDataCodec, getOracleConsultInstructionDataDecoder, getOracleConsultInstructionDataEncoder, getOracleDeviation, getOracleForPool, getOracleSpotPrices, getOracleUpdateDiscriminatorBytes, getOracleUpdateInstruction, getOracleUpdateInstructionAsync, getOracleUpdateInstructionDataCodec, getOracleUpdateInstructionDataDecoder, getOracleUpdateInstructionDataEncoder, getPauseDiscriminatorBytes, getPauseInstruction, getPauseInstructionDataCodec, getPauseInstructionDataDecoder, getPauseInstructionDataEncoder, getPendingFees, getPoolAddressFromMints, getPoolByMints, getPositionAddressFromParams, getPositionValue, getPreviewSwapExactInDiscriminatorBytes, getPreviewSwapExactInInstruction, getPreviewSwapExactInInstructionDataCodec, getPreviewSwapExactInInstructionDataDecoder, getPreviewSwapExactInInstructionDataEncoder, getRedeemProtocolSharesDiscriminatorBytes, getRedeemProtocolSharesInstruction, getRedeemProtocolSharesInstructionAsync, getRedeemProtocolSharesInstructionDataCodec, getRedeemProtocolSharesInstructionDataDecoder, getRedeemProtocolSharesInstructionDataEncoder, getRemoveLiquidityDiscriminatorBytes, getRemoveLiquidityInstruction, getRemoveLiquidityInstructionAsync, getRemoveLiquidityInstructionDataCodec, getRemoveLiquidityInstructionDataDecoder, getRemoveLiquidityInstructionDataEncoder, getRemoveLiquidityQuote, getSetFeesDiscriminatorBytes, getSetFeesInstruction, getSetFeesInstructionDataCodec, getSetFeesInstructionDataDecoder, getSetFeesInstructionDataEncoder, getSetHookDiscriminatorBytes, getSetHookInstruction, getSetHookInstructionDataCodec, getSetHookInstructionDataDecoder, getSetHookInstructionDataEncoder, getSpotPrice0, getSpotPrice1, getSwapExactInDiscriminatorBytes, getSwapExactInInstruction, getSwapExactInInstructionAsync, getSwapExactInInstructionDataCodec, getSwapExactInInstructionDataDecoder, getSwapExactInInstructionDataEncoder, getSwapQuote, getSwapQuoteExactOut, getTransferAdminDiscriminatorBytes, getTransferAdminInstruction, getTransferAdminInstructionDataCodec, getTransferAdminInstructionDataDecoder, getTransferAdminInstructionDataEncoder, getTvl, getUnpauseDiscriminatorBytes, getUnpauseInstruction, getUnpauseInstructionDataCodec, getUnpauseInstructionDataDecoder, getUnpauseInstructionDataEncoder, getUpdateConfigDiscriminatorBytes, getUpdateConfigInstruction, getUpdateConfigInstructionDataCodec, getUpdateConfigInstructionDataDecoder, getUpdateConfigInstructionDataEncoder, getWithdrawVaultExcessDiscriminatorBytes, getWithdrawVaultExcessInstruction, getWithdrawVaultExcessInstructionAsync, getWithdrawVaultExcessInstructionDataCodec, getWithdrawVaultExcessInstructionDataDecoder, getWithdrawVaultExcessInstructionDataEncoder, initializeConfigArgsCodec, initializeOracleArgsCodec, initializePoolArgsCodec, isOracleStale, isTransactionSigner, isqrt, maxBigInt, minBigInt, normalizeProgramAccountsResponse, numberToQ64, observationCodec, oracleConsultArgsCodec, oracleStateDataCodec, parseAddLiquidityInstruction, parseClosePositionInstruction, parseCollectFeesInstruction, parseCollectProtocolFeesInstruction, parseCreatePositionInstruction, parseInitializeConfigInstruction, parseInitializeOracleInstruction, parseInitializePoolInstruction, parseInitializeSpotPoolInstruction, parseInitializeSpotPoolWithHookInstruction, parseOracleConsultInstruction, parseOracleUpdateInstruction, parsePauseInstruction, parsePreviewSwapExactInInstruction, parseRedeemProtocolSharesInstruction, parseRemoveLiquidityInstruction, parseSetFeesInstruction, parseSetHookInstruction, parseSwapExactInInstruction, parseTransferAdminInstruction, parseUnpauseInstruction, parseUpdateConfigInstruction, parseWithdrawVaultExcessInstruction, poolDataCodec, poolExists, positionDataCodec, q64Div, q64Mul, q64ToNumber, ratioToNumber, removeLiquidityArgsCodec, setFeesArgsCodec, setHookArgsCodec, sortPoolsByReserves, sortPositionsByShares, swapExactInArgsCodec, transferAdminArgsCodec, warnAccountDecodeFailure };
|
|
4469
|
+
//# sourceMappingURL=chunk-4N5U2MXE.js.map
|
|
4470
|
+
//# sourceMappingURL=chunk-4N5U2MXE.js.map
|