@liquid-af/sdk 0.9.1 → 0.10.1
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/dist/accounts/liquid-fees.d.ts +2 -0
- package/dist/accounts/liquid-fees.d.ts.map +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/events/index.d.ts +2 -2
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +1 -1
- package/dist/events/index.js.map +1 -1
- package/dist/events/parser.d.ts +30 -19
- package/dist/events/parser.d.ts.map +1 -1
- package/dist/events/parser.js +115 -91
- package/dist/events/parser.js.map +1 -1
- package/dist/idl/liquid.d.ts +66 -1
- package/dist/idl/liquid.d.ts.map +1 -1
- package/dist/idl/liquid.json +66 -1
- package/dist/idl/liquid_events.d.ts +434 -882
- package/dist/idl/liquid_events.d.ts.map +1 -1
- package/dist/idl/liquid_events.json +456 -904
- package/dist/idl/liquid_fees.d.ts +5 -1
- package/dist/idl/liquid_fees.d.ts.map +1 -1
- package/dist/idl/liquid_fees.json +5 -1
- package/dist/idl/liquid_swap.d.ts +23 -1
- package/dist/idl/liquid_swap.d.ts.map +1 -1
- package/dist/idl/liquid_swap.json +29 -7
- package/dist/instructions/liquid-swap.js +2 -2
- package/dist/instructions/liquid-swap.js.map +1 -1
- package/package.json +8 -8
- package/src/events/index.ts +2 -6
- package/src/events/parser.ts +148 -107
- package/src/idl/liquid.json +66 -1
- package/src/idl/liquid.ts +66 -1
- package/src/idl/liquid_events.json +456 -904
- package/src/idl/liquid_events.ts +433 -881
- package/src/idl/liquid_fees.json +5 -1
- package/src/idl/liquid_fees.ts +5 -1
- package/src/idl/liquid_swap.json +29 -7
- package/src/idl/liquid_swap.ts +29 -7
- package/src/instructions/liquid-swap.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liquid-af/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "TypeScript SDK for the Liquid DeFi protocol on Solana",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -79,16 +79,16 @@
|
|
|
79
79
|
"src"
|
|
80
80
|
],
|
|
81
81
|
"scripts": {
|
|
82
|
-
"build": "
|
|
82
|
+
"build": "bun run copy-idl && tsc",
|
|
83
83
|
"copy-idl": "cp ../../target/idl/*.json src/idl/ && cp ../../target/types/*.ts src/idl/",
|
|
84
84
|
"clean": "rm -rf dist",
|
|
85
|
-
"prebuild": "
|
|
86
|
-
"prepack": "
|
|
87
|
-
"prepublishOnly": "
|
|
85
|
+
"prebuild": "bun run clean",
|
|
86
|
+
"prepack": "bun run build",
|
|
87
|
+
"prepublishOnly": "bun run test:build",
|
|
88
88
|
"test:build": "tsc --noEmit",
|
|
89
|
-
"version:patch": "
|
|
90
|
-
"version:minor": "
|
|
91
|
-
"version:major": "
|
|
89
|
+
"version:patch": "bun run version --patch --no-git-tag-version",
|
|
90
|
+
"version:minor": "bun run version --minor --no-git-tag-version",
|
|
91
|
+
"version:major": "bun run version --major --no-git-tag-version",
|
|
92
92
|
"docs": "typedoc",
|
|
93
93
|
"publish:test": "npm publish --dry-run",
|
|
94
94
|
"publish:prod": "npm publish"
|
package/src/events/index.ts
CHANGED
|
@@ -40,9 +40,5 @@ export type {
|
|
|
40
40
|
LiquidEventName,
|
|
41
41
|
} from "./types.js";
|
|
42
42
|
|
|
43
|
-
export {
|
|
44
|
-
|
|
45
|
-
addEventListener,
|
|
46
|
-
waitForEvent,
|
|
47
|
-
} from "./parser.js";
|
|
48
|
-
export type { ParsedEvent } from "./parser.js";
|
|
43
|
+
export { parseTransactionEvents, waitForEvent } from "./parser.js";
|
|
44
|
+
export type { ParsedEvent, TransactionForEventParsing } from "./parser.js";
|
package/src/events/parser.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BorshCoder, type Program } from "@coral-xyz/anchor";
|
|
1
|
+
import { BorshCoder, type Idl, type Program, utils } from "@coral-xyz/anchor";
|
|
2
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
3
|
import type { LiquidEvents } from "../idl/liquid_events.js";
|
|
3
4
|
import type { LiquidEventMap, LiquidEventName } from "./types.js";
|
|
4
5
|
|
|
@@ -8,59 +9,126 @@ export interface ParsedEvent<T = unknown> {
|
|
|
8
9
|
data: T;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
/** Minimal transaction shape needed for event parsing. */
|
|
13
|
+
export interface TransactionForEventParsing {
|
|
14
|
+
meta: {
|
|
15
|
+
innerInstructions?:
|
|
16
|
+
| Array<{
|
|
17
|
+
instructions: Array<{
|
|
18
|
+
programIdIndex: number;
|
|
19
|
+
data: string;
|
|
20
|
+
}>;
|
|
21
|
+
}>
|
|
22
|
+
| null;
|
|
23
|
+
} | null;
|
|
24
|
+
transaction: {
|
|
25
|
+
message:
|
|
26
|
+
| { staticAccountKeys: PublicKey[] }
|
|
27
|
+
| { accountKeys: PublicKey[] };
|
|
28
|
+
};
|
|
29
|
+
}
|
|
15
30
|
|
|
16
31
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* @param logs - Transaction log messages
|
|
22
|
-
* @param program - The liquid-events program instance
|
|
23
|
-
* @returns Array of parsed events
|
|
32
|
+
* Maps IDL instruction names (snake_case) to LiquidEventMap keys (camelCase).
|
|
33
|
+
* Anchor's BorshCoder.instruction.decode() returns camelCase names, so this
|
|
34
|
+
* maps those decoded names to our event type keys.
|
|
24
35
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
const INSTRUCTION_TO_EVENT: Record<string, LiquidEventName> = {
|
|
37
|
+
logTokenCreated: "tokenCreated",
|
|
38
|
+
logTrade: "tradeEvent",
|
|
39
|
+
logMigrationCompleted: "migrationCompleted",
|
|
40
|
+
logCurveCompleted: "curveCompleted",
|
|
41
|
+
logCurveBuyback: "curveBuybackExecuted",
|
|
42
|
+
logReferralWithdrawn: "referralRewardsWithdrawn",
|
|
43
|
+
logCurvePaused: "curveProtocolPaused",
|
|
44
|
+
logCurveUnpaused: "curveProtocolUnpaused",
|
|
45
|
+
logPoolCreated: "poolCreated",
|
|
46
|
+
logSwap: "swapEvent",
|
|
47
|
+
logLpChange: "lpChangeEvent",
|
|
48
|
+
logAmmBuyback: "ammBuybackExecuted",
|
|
49
|
+
logAmmPaused: "ammProtocolPaused",
|
|
50
|
+
logAmmUnpaused: "ammProtocolUnpaused",
|
|
51
|
+
logFeesDistributed: "feesDistributed",
|
|
52
|
+
logFeesClaimed: "feesClaimed",
|
|
53
|
+
logFeeConfigRevoked: "feeConfigRevoked",
|
|
54
|
+
logFeeConfigUpdated: "feeConfigUpdated",
|
|
55
|
+
logFeeConfigAuthorityOverridden: "feeConfigAuthorityOverridden",
|
|
56
|
+
logDealCreated: "dealCreated",
|
|
57
|
+
logDealUpdated: "dealUpdated",
|
|
58
|
+
logDealClosed: "dealClosed",
|
|
59
|
+
logDealRedeemed: "dealRedeemed",
|
|
60
|
+
logSnapshotTaken: "snapshotTaken",
|
|
61
|
+
logUserUpdated: "userUpdatedByAdmin",
|
|
62
|
+
logReferrerSet: "referrerSet",
|
|
63
|
+
logCashbackMode: "cashbackModeActivated",
|
|
64
|
+
logCashbackEarned: "cashbackEarned",
|
|
65
|
+
logCashbackSpent: "cashbackSpent",
|
|
34
66
|
};
|
|
35
67
|
|
|
36
68
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
69
|
+
* Parses events from a transaction by inspecting inner instructions
|
|
70
|
+
* (CPI calls to the liquid-events program) instead of transaction logs.
|
|
71
|
+
*
|
|
72
|
+
* This approach is immune to log bleaching attacks since event data is
|
|
73
|
+
* encoded in the instruction data of CPI calls, not in transaction logs.
|
|
39
74
|
*
|
|
75
|
+
* @param transaction - Full transaction response (from getTransaction)
|
|
40
76
|
* @param program - The liquid-events program instance
|
|
41
|
-
* @
|
|
42
|
-
* @param callback - Handler called when event is received
|
|
43
|
-
* @returns Listener ID for removal
|
|
77
|
+
* @returns Array of parsed events
|
|
44
78
|
*/
|
|
45
|
-
export const
|
|
79
|
+
export const parseTransactionEvents = (
|
|
80
|
+
transaction: TransactionForEventParsing | null | undefined,
|
|
46
81
|
program: Program<LiquidEvents>,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
82
|
+
): ParsedEvent[] => {
|
|
83
|
+
if (!transaction?.meta?.innerInstructions) return [];
|
|
84
|
+
|
|
85
|
+
const coder = new BorshCoder(program.idl as Idl);
|
|
86
|
+
const programId = program.programId;
|
|
87
|
+
const events: ParsedEvent[] = [];
|
|
88
|
+
|
|
89
|
+
// Get account keys from the transaction message
|
|
90
|
+
const message = transaction.transaction.message;
|
|
91
|
+
const accountKeys: PublicKey[] =
|
|
92
|
+
"staticAccountKeys" in message
|
|
93
|
+
? (message.staticAccountKeys as PublicKey[])
|
|
94
|
+
: (message as unknown as { accountKeys: PublicKey[] }).accountKeys;
|
|
95
|
+
|
|
96
|
+
for (const innerIxGroup of transaction.meta.innerInstructions) {
|
|
97
|
+
for (const innerIx of innerIxGroup.instructions) {
|
|
98
|
+
// Check if this inner instruction targets the events program
|
|
99
|
+
const ixProgramKey = accountKeys[innerIx.programIdIndex];
|
|
100
|
+
if (!ixProgramKey || !programId.equals(new PublicKey(ixProgramKey)))
|
|
101
|
+
continue;
|
|
102
|
+
|
|
103
|
+
// Decode the instruction data (base58-encoded in RPC responses)
|
|
104
|
+
const rawData = utils.bytes.bs58.decode(innerIx.data);
|
|
105
|
+
if (rawData.length < 8) continue;
|
|
106
|
+
|
|
107
|
+
// Use Anchor's instruction coder to decode
|
|
108
|
+
const decoded = coder.instruction.decode(Buffer.from(rawData));
|
|
109
|
+
if (!decoded) continue;
|
|
110
|
+
|
|
111
|
+
// Map instruction name to event name
|
|
112
|
+
const eventName = INSTRUCTION_TO_EVENT[decoded.name];
|
|
113
|
+
if (!eventName) continue;
|
|
114
|
+
|
|
115
|
+
// The instruction has a single "data" argument containing the event struct
|
|
116
|
+
events.push({
|
|
117
|
+
name: eventName,
|
|
118
|
+
data: (decoded.data as Record<string, unknown>).data,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return events;
|
|
56
124
|
};
|
|
57
125
|
|
|
58
126
|
/**
|
|
59
|
-
* Subscribes to logs
|
|
60
|
-
*
|
|
127
|
+
* Subscribes to logs to capture the transaction signature, fires a trigger,
|
|
128
|
+
* then fetches the full transaction to parse events from inner instructions.
|
|
61
129
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
130
|
+
* Immune to log bleaching: event data is decoded from CPI instruction data,
|
|
131
|
+
* not from transaction logs.
|
|
64
132
|
*
|
|
65
133
|
* @param program - The liquid-events program instance
|
|
66
134
|
* @param eventName - Name of the event to wait for
|
|
@@ -69,95 +137,68 @@ export const addEventListener = <N extends LiquidEventName>(
|
|
|
69
137
|
* @returns Object containing the trigger result and the captured event data
|
|
70
138
|
* @throws If the event is not received within the timeout period
|
|
71
139
|
*/
|
|
72
|
-
export async function waitForEvent<
|
|
140
|
+
export async function waitForEvent<
|
|
141
|
+
N extends LiquidEventName,
|
|
142
|
+
TResult = string,
|
|
143
|
+
>(
|
|
73
144
|
program: Program<LiquidEvents>,
|
|
74
145
|
eventName: N,
|
|
75
146
|
trigger: () => Promise<TResult>,
|
|
76
147
|
timeoutMs = 5000,
|
|
77
148
|
): Promise<{ result: TResult; event: LiquidEventMap[N] }> {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const coder = new BorshCoder(program.idl);
|
|
149
|
+
const connection = program.provider.connection;
|
|
150
|
+
let capturedSignature: string | null = null;
|
|
81
151
|
|
|
82
|
-
// Subscribe to logs
|
|
83
|
-
|
|
152
|
+
// Subscribe to logs to capture the transaction signature
|
|
153
|
+
// (invoke/exit logs are always present even without emit!)
|
|
154
|
+
const subscriptionId = connection.onLogs(
|
|
84
155
|
program.programId,
|
|
85
|
-
(
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
for (const event of events) {
|
|
89
|
-
if (event.name === eventName) {
|
|
90
|
-
eventData = event.data as LiquidEventMap[N];
|
|
91
|
-
}
|
|
92
|
-
}
|
|
156
|
+
(logInfo) => {
|
|
157
|
+
if (logInfo.err) return;
|
|
158
|
+
capturedSignature = logInfo.signature;
|
|
93
159
|
},
|
|
94
160
|
);
|
|
95
161
|
|
|
96
162
|
try {
|
|
97
163
|
const result = await trigger();
|
|
164
|
+
|
|
165
|
+
// If the trigger returned a string, use it as the signature directly
|
|
166
|
+
if (typeof result === "string") {
|
|
167
|
+
capturedSignature = result;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Wait for the signature to be captured
|
|
98
171
|
const start = Date.now();
|
|
99
|
-
while (!
|
|
172
|
+
while (!capturedSignature && Date.now() - start < timeoutMs) {
|
|
100
173
|
await new Promise((r) => setTimeout(r, 200));
|
|
101
174
|
}
|
|
102
|
-
if (!
|
|
175
|
+
if (!capturedSignature) {
|
|
103
176
|
throw new Error(
|
|
104
|
-
`
|
|
177
|
+
`No transaction signature captured within ${timeoutMs}ms`,
|
|
105
178
|
);
|
|
106
179
|
}
|
|
107
|
-
return { result, event: eventData };
|
|
108
|
-
} finally {
|
|
109
|
-
await program.provider.connection.removeOnLogsListener(subscriptionId);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
180
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
* to programs at any CPI depth.
|
|
121
|
-
*/
|
|
122
|
-
function parseCpiLogs(
|
|
123
|
-
logs: string[],
|
|
124
|
-
programId: string,
|
|
125
|
-
coder: BorshCoder,
|
|
126
|
-
): ParsedEvent[] {
|
|
127
|
-
const events: ParsedEvent[] = [];
|
|
128
|
-
const stack: string[] = [];
|
|
129
|
-
|
|
130
|
-
for (const log of logs) {
|
|
131
|
-
if (!log.startsWith("Program ")) continue;
|
|
132
|
-
|
|
133
|
-
const invokeMatch = INVOKE_RE.exec(log);
|
|
134
|
-
if (invokeMatch) {
|
|
135
|
-
stack.push(invokeMatch[1]);
|
|
136
|
-
continue;
|
|
181
|
+
// Fetch the full transaction to get inner instructions
|
|
182
|
+
const tx = await connection.getTransaction(capturedSignature, {
|
|
183
|
+
commitment: "confirmed",
|
|
184
|
+
maxSupportedTransactionVersion: 0,
|
|
185
|
+
});
|
|
186
|
+
if (!tx) {
|
|
187
|
+
throw new Error(`Transaction not found: ${capturedSignature}`);
|
|
137
188
|
}
|
|
138
189
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
190
|
+
// Parse events from inner instructions
|
|
191
|
+
const events = parseTransactionEvents(tx, program);
|
|
192
|
+
const event = events.find((e) => e.name === eventName);
|
|
193
|
+
if (!event) {
|
|
194
|
+
throw new Error(
|
|
195
|
+
`Event '${eventName}' not found in transaction ${capturedSignature}. ` +
|
|
196
|
+
`Found events: [${events.map((e) => e.name).join(", ")}]`,
|
|
197
|
+
);
|
|
143
198
|
}
|
|
144
199
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
if (log.startsWith(PROGRAM_DATA)) {
|
|
149
|
-
logStr = log.slice(PROGRAM_DATA.length);
|
|
150
|
-
} else if (log.startsWith(PROGRAM_LOG)) {
|
|
151
|
-
logStr = log.slice(PROGRAM_LOG.length);
|
|
152
|
-
}
|
|
153
|
-
if (logStr) {
|
|
154
|
-
const event = coder.events.decode(logStr);
|
|
155
|
-
if (event) {
|
|
156
|
-
events.push({ name: event.name, data: event.data });
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
200
|
+
return { result, event: event.data as LiquidEventMap[N] };
|
|
201
|
+
} finally {
|
|
202
|
+
await connection.removeOnLogsListener(subscriptionId);
|
|
160
203
|
}
|
|
161
|
-
|
|
162
|
-
return events;
|
|
163
204
|
}
|
package/src/idl/liquid.json
CHANGED
|
@@ -1097,6 +1097,13 @@
|
|
|
1097
1097
|
"Liquid events program for centralized event emission."
|
|
1098
1098
|
],
|
|
1099
1099
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"name": "instructions",
|
|
1103
|
+
"docs": [
|
|
1104
|
+
"Instructions sysvar for CPI caller detection."
|
|
1105
|
+
],
|
|
1106
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
1100
1107
|
}
|
|
1101
1108
|
],
|
|
1102
1109
|
"args": [
|
|
@@ -2108,6 +2115,13 @@
|
|
|
2108
2115
|
"Liquid events program for centralized event emission."
|
|
2109
2116
|
],
|
|
2110
2117
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
"name": "instructions",
|
|
2121
|
+
"docs": [
|
|
2122
|
+
"Instructions sysvar for CPI caller detection."
|
|
2123
|
+
],
|
|
2124
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
2111
2125
|
}
|
|
2112
2126
|
],
|
|
2113
2127
|
"args": [
|
|
@@ -3027,6 +3041,13 @@
|
|
|
3027
3041
|
"Liquid events program for centralized event emission."
|
|
3028
3042
|
],
|
|
3029
3043
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
3044
|
+
},
|
|
3045
|
+
{
|
|
3046
|
+
"name": "instructions",
|
|
3047
|
+
"docs": [
|
|
3048
|
+
"Instructions sysvar for CPI caller detection."
|
|
3049
|
+
],
|
|
3050
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
3030
3051
|
}
|
|
3031
3052
|
],
|
|
3032
3053
|
"args": [
|
|
@@ -4038,6 +4059,13 @@
|
|
|
4038
4059
|
"Liquid events program for centralized event emission."
|
|
4039
4060
|
],
|
|
4040
4061
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
4062
|
+
},
|
|
4063
|
+
{
|
|
4064
|
+
"name": "instructions",
|
|
4065
|
+
"docs": [
|
|
4066
|
+
"Instructions sysvar for CPI caller detection."
|
|
4067
|
+
],
|
|
4068
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
4041
4069
|
}
|
|
4042
4070
|
],
|
|
4043
4071
|
"args": [
|
|
@@ -9244,6 +9272,13 @@
|
|
|
9244
9272
|
"Liquid events program for centralized event emission."
|
|
9245
9273
|
],
|
|
9246
9274
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
9275
|
+
},
|
|
9276
|
+
{
|
|
9277
|
+
"name": "instructions",
|
|
9278
|
+
"docs": [
|
|
9279
|
+
"Instructions sysvar for CPI caller detection."
|
|
9280
|
+
],
|
|
9281
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
9247
9282
|
}
|
|
9248
9283
|
],
|
|
9249
9284
|
"args": [
|
|
@@ -10255,6 +10290,13 @@
|
|
|
10255
10290
|
"Liquid events program for centralized event emission."
|
|
10256
10291
|
],
|
|
10257
10292
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
10293
|
+
},
|
|
10294
|
+
{
|
|
10295
|
+
"name": "instructions",
|
|
10296
|
+
"docs": [
|
|
10297
|
+
"Instructions sysvar for CPI caller detection."
|
|
10298
|
+
],
|
|
10299
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
10258
10300
|
}
|
|
10259
10301
|
],
|
|
10260
10302
|
"args": [
|
|
@@ -11174,6 +11216,13 @@
|
|
|
11174
11216
|
"Liquid events program for centralized event emission."
|
|
11175
11217
|
],
|
|
11176
11218
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
11219
|
+
},
|
|
11220
|
+
{
|
|
11221
|
+
"name": "instructions",
|
|
11222
|
+
"docs": [
|
|
11223
|
+
"Instructions sysvar for CPI caller detection."
|
|
11224
|
+
],
|
|
11225
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
11177
11226
|
}
|
|
11178
11227
|
],
|
|
11179
11228
|
"args": [
|
|
@@ -12185,6 +12234,13 @@
|
|
|
12185
12234
|
"Liquid events program for centralized event emission."
|
|
12186
12235
|
],
|
|
12187
12236
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
12237
|
+
},
|
|
12238
|
+
{
|
|
12239
|
+
"name": "instructions",
|
|
12240
|
+
"docs": [
|
|
12241
|
+
"Instructions sysvar for CPI caller detection."
|
|
12242
|
+
],
|
|
12243
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
12188
12244
|
}
|
|
12189
12245
|
],
|
|
12190
12246
|
"args": [
|
|
@@ -13135,6 +13191,11 @@
|
|
|
13135
13191
|
"code": 6045,
|
|
13136
13192
|
"name": "BuybackVaultNotDrained",
|
|
13137
13193
|
"msg": "Buyback vault must be drained before migration"
|
|
13194
|
+
},
|
|
13195
|
+
{
|
|
13196
|
+
"code": 6046,
|
|
13197
|
+
"name": "ExclusivityPeriod",
|
|
13198
|
+
"msg": "This action cannot be performed during the exclusivity period"
|
|
13138
13199
|
}
|
|
13139
13200
|
],
|
|
13140
13201
|
"types": [
|
|
@@ -13342,12 +13403,16 @@
|
|
|
13342
13403
|
"name": "basis_points",
|
|
13343
13404
|
"type": "u16"
|
|
13344
13405
|
},
|
|
13406
|
+
{
|
|
13407
|
+
"name": "vault_bump",
|
|
13408
|
+
"type": "u8"
|
|
13409
|
+
},
|
|
13345
13410
|
{
|
|
13346
13411
|
"name": "_padding",
|
|
13347
13412
|
"type": {
|
|
13348
13413
|
"array": [
|
|
13349
13414
|
"u8",
|
|
13350
|
-
|
|
13415
|
+
5
|
|
13351
13416
|
]
|
|
13352
13417
|
}
|
|
13353
13418
|
}
|
package/src/idl/liquid.ts
CHANGED
|
@@ -1103,6 +1103,13 @@ export type Liquid = {
|
|
|
1103
1103
|
"Liquid events program for centralized event emission."
|
|
1104
1104
|
],
|
|
1105
1105
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
"name": "instructions",
|
|
1109
|
+
"docs": [
|
|
1110
|
+
"Instructions sysvar for CPI caller detection."
|
|
1111
|
+
],
|
|
1112
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
1106
1113
|
}
|
|
1107
1114
|
],
|
|
1108
1115
|
"args": [
|
|
@@ -2114,6 +2121,13 @@ export type Liquid = {
|
|
|
2114
2121
|
"Liquid events program for centralized event emission."
|
|
2115
2122
|
],
|
|
2116
2123
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
2124
|
+
},
|
|
2125
|
+
{
|
|
2126
|
+
"name": "instructions",
|
|
2127
|
+
"docs": [
|
|
2128
|
+
"Instructions sysvar for CPI caller detection."
|
|
2129
|
+
],
|
|
2130
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
2117
2131
|
}
|
|
2118
2132
|
],
|
|
2119
2133
|
"args": [
|
|
@@ -3033,6 +3047,13 @@ export type Liquid = {
|
|
|
3033
3047
|
"Liquid events program for centralized event emission."
|
|
3034
3048
|
],
|
|
3035
3049
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
3050
|
+
},
|
|
3051
|
+
{
|
|
3052
|
+
"name": "instructions",
|
|
3053
|
+
"docs": [
|
|
3054
|
+
"Instructions sysvar for CPI caller detection."
|
|
3055
|
+
],
|
|
3056
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
3036
3057
|
}
|
|
3037
3058
|
],
|
|
3038
3059
|
"args": [
|
|
@@ -4044,6 +4065,13 @@ export type Liquid = {
|
|
|
4044
4065
|
"Liquid events program for centralized event emission."
|
|
4045
4066
|
],
|
|
4046
4067
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
4068
|
+
},
|
|
4069
|
+
{
|
|
4070
|
+
"name": "instructions",
|
|
4071
|
+
"docs": [
|
|
4072
|
+
"Instructions sysvar for CPI caller detection."
|
|
4073
|
+
],
|
|
4074
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
4047
4075
|
}
|
|
4048
4076
|
],
|
|
4049
4077
|
"args": [
|
|
@@ -9250,6 +9278,13 @@ export type Liquid = {
|
|
|
9250
9278
|
"Liquid events program for centralized event emission."
|
|
9251
9279
|
],
|
|
9252
9280
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
9281
|
+
},
|
|
9282
|
+
{
|
|
9283
|
+
"name": "instructions",
|
|
9284
|
+
"docs": [
|
|
9285
|
+
"Instructions sysvar for CPI caller detection."
|
|
9286
|
+
],
|
|
9287
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
9253
9288
|
}
|
|
9254
9289
|
],
|
|
9255
9290
|
"args": [
|
|
@@ -10261,6 +10296,13 @@ export type Liquid = {
|
|
|
10261
10296
|
"Liquid events program for centralized event emission."
|
|
10262
10297
|
],
|
|
10263
10298
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
10299
|
+
},
|
|
10300
|
+
{
|
|
10301
|
+
"name": "instructions",
|
|
10302
|
+
"docs": [
|
|
10303
|
+
"Instructions sysvar for CPI caller detection."
|
|
10304
|
+
],
|
|
10305
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
10264
10306
|
}
|
|
10265
10307
|
],
|
|
10266
10308
|
"args": [
|
|
@@ -11180,6 +11222,13 @@ export type Liquid = {
|
|
|
11180
11222
|
"Liquid events program for centralized event emission."
|
|
11181
11223
|
],
|
|
11182
11224
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
11225
|
+
},
|
|
11226
|
+
{
|
|
11227
|
+
"name": "instructions",
|
|
11228
|
+
"docs": [
|
|
11229
|
+
"Instructions sysvar for CPI caller detection."
|
|
11230
|
+
],
|
|
11231
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
11183
11232
|
}
|
|
11184
11233
|
],
|
|
11185
11234
|
"args": [
|
|
@@ -12191,6 +12240,13 @@ export type Liquid = {
|
|
|
12191
12240
|
"Liquid events program for centralized event emission."
|
|
12192
12241
|
],
|
|
12193
12242
|
"address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
|
|
12243
|
+
},
|
|
12244
|
+
{
|
|
12245
|
+
"name": "instructions",
|
|
12246
|
+
"docs": [
|
|
12247
|
+
"Instructions sysvar for CPI caller detection."
|
|
12248
|
+
],
|
|
12249
|
+
"address": "Sysvar1nstructions1111111111111111111111111"
|
|
12194
12250
|
}
|
|
12195
12251
|
],
|
|
12196
12252
|
"args": [
|
|
@@ -13141,6 +13197,11 @@ export type Liquid = {
|
|
|
13141
13197
|
"code": 6045,
|
|
13142
13198
|
"name": "buybackVaultNotDrained",
|
|
13143
13199
|
"msg": "Buyback vault must be drained before migration"
|
|
13200
|
+
},
|
|
13201
|
+
{
|
|
13202
|
+
"code": 6046,
|
|
13203
|
+
"name": "exclusivityPeriod",
|
|
13204
|
+
"msg": "This action cannot be performed during the exclusivity period"
|
|
13144
13205
|
}
|
|
13145
13206
|
],
|
|
13146
13207
|
"types": [
|
|
@@ -13348,12 +13409,16 @@ export type Liquid = {
|
|
|
13348
13409
|
"name": "basisPoints",
|
|
13349
13410
|
"type": "u16"
|
|
13350
13411
|
},
|
|
13412
|
+
{
|
|
13413
|
+
"name": "vaultBump",
|
|
13414
|
+
"type": "u8"
|
|
13415
|
+
},
|
|
13351
13416
|
{
|
|
13352
13417
|
"name": "padding",
|
|
13353
13418
|
"type": {
|
|
13354
13419
|
"array": [
|
|
13355
13420
|
"u8",
|
|
13356
|
-
|
|
13421
|
+
5
|
|
13357
13422
|
]
|
|
13358
13423
|
}
|
|
13359
13424
|
}
|