@reflectmoney/junior 1.0.0 → 1.1.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.
@@ -19,7 +19,7 @@ export declare class JuniorTranche {
19
19
  getCooldownsByUser(user: Address): Promise<AccountWithAddress<Cooldown>[]>;
20
20
  getUserPermissions(): Promise<AccountWithAddress<UserPermissions>[]>;
21
21
  getUserPermissionsFromAddress(address: Address): Promise<AccountWithAddress<UserPermissions>[]>;
22
- initializeRlp(signer: TransactionSigner, swapFeeBps: number): Promise<import("../generated").InitializeRlpInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
22
+ initializeRlp(signer: TransactionSigner, swapFeeBps: number): Promise<import("../generated").InitializeRlpInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
23
23
  initializeLiquidityPool(signer: TransactionSigner, args: {
24
24
  lpTokenMint: Address;
25
25
  cooldownDuration: number | bigint;
@@ -33,22 +33,22 @@ export declare class JuniorTranche {
33
33
  * vault_value). Pools with `None` are un-slashable by design.
34
34
  */
35
35
  protectedVault?: Address | null;
36
- }): Promise<import("../generated").InitializeLpInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
36
+ }): Promise<import("../generated").InitializeLpInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
37
37
  /**
38
38
  * Create the canonical pool reserve ATA for a single asset. Required after
39
39
  * `initialize_lp` before any deposit/withdraw/swap against that asset can
40
40
  * succeed (audit-E02). Idempotent: safe to call again on an already-
41
41
  * initialized reserve.
42
42
  */
43
- initializePoolReserve(signer: TransactionSigner, liquidityPoolId: number, assetMint: Address): Promise<import("../generated").InitializePoolReserveInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, string, string, string, string, string, []>>;
43
+ initializePoolReserve(signer: TransactionSigner, liquidityPoolId: number, assetMint: Address): Promise<import("../generated").InitializePoolReserveInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, string, string, string, string, string, []>>;
44
44
  /**
45
45
  * Admin recovery for a permanently-frozen pool asset (audit-M02). Drops the
46
46
  * asset from the pool's reserve list. Requires the asset's pool reserve ATA
47
47
  * to actually be in the SPL `Frozen` state.
48
48
  */
49
- forceRemoveAsset(signer: TransactionSigner, liquidityPoolId: number, assetMint: Address): Promise<import("../generated").ForceRemoveAssetInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
50
- addAsset(signer: TransactionSigner, assetMint: Address, oracle: Address, accessLevel: AccessLevel): Promise<import("../generated").AddAssetInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
51
- updateOracle(signer: TransactionSigner, assetMint: Address, oracle: Address): Promise<import("../generated").UpdateOracleInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
49
+ forceRemoveAsset(signer: TransactionSigner, liquidityPoolId: number, assetMint: Address): Promise<import("../generated").ForceRemoveAssetInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
50
+ addAsset(signer: TransactionSigner, assetMint: Address, oracle: Address, accessLevel: AccessLevel): Promise<import("../generated").AddAssetInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
51
+ updateOracle(signer: TransactionSigner, assetMint: Address, oracle: Address): Promise<import("../generated").UpdateOracleInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
52
52
  /**
53
53
  * NAV-based junior-tranche slash (audit-M06 redesign). Pulls from this
54
54
  * pool's reserve of the proxy's `stablecoinMint` directly into the proxy's
@@ -68,7 +68,7 @@ export declare class JuniorTranche {
68
68
  * Capped at the current gap; pass any positive
69
69
  * value up to that cap.
70
70
  */
71
- slash(signer: TransactionSigner, liquidityPoolId: number, stablecoinMint: Address, proxyState: Address, amount: number | bigint): Promise<import("../generated").SlashInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, string, string, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
71
+ slash(signer: TransactionSigner, liquidityPoolId: number, stablecoinMint: Address, proxyState: Address, amount: number | bigint): Promise<import("../generated").SlashInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, string, string, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
72
72
  /**
73
73
  * Inject pre-fetched state (useful for testing without an RPC connection).
74
74
  */
@@ -98,15 +98,15 @@ export declare class JuniorTranche {
98
98
  * returning a new instruction with the extra accounts.
99
99
  */
100
100
  private appendRemainingAccounts;
101
- deposit(signer: TransactionSigner, amount: number | bigint, mint: Address, liquidityPoolId: number, minLpTokens?: number | bigint | null): Promise<import("../generated").DepositInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", string, string, string, string, string, string, string, any, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
102
- requestWithdrawal(signer: TransactionSigner, liquidityPoolId: number, amount: number | bigint): Promise<import("../generated").RequestWithdrawalInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", string, string, string, string, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
103
- withdraw(signer: TransactionSigner, liquidityPoolId: number, cooldownId: number | bigint): Promise<import("../generated").WithdrawInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, string, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
104
- swap(signer: TransactionSigner, liquidityPoolId: number, tokenFromMint: Address, tokenToMint: Address, amountIn: number | bigint, minOut?: number | bigint | null): Promise<import("../generated").SwapInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
105
- createPermissionAccount(caller: TransactionSigner, newAdmin: Address): Promise<import("../generated").CreatePermissionAccountInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
106
- updateRoleHolder(admin: TransactionSigner, targetAddress: Address, role: Role, update: Update): Promise<import("../generated").UpdateRoleHolderInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
107
- updateActionRole(admin: TransactionSigner, action: Action, role: Role, update: Update): Promise<import("../generated").UpdateActionRoleInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
108
- updateDepositCap(signer: TransactionSigner, liquidityPoolId: number, newCap: number | bigint | null): Promise<import("../generated").UpdateDepositCapInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
109
- freezeFunctionality(admin: TransactionSigner, action: Action, freeze: boolean): Promise<import("../generated").FreezeFunctionalityInstruction<Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">, string, string, string, string, string, "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz", []>>;
101
+ deposit(signer: TransactionSigner, amount: number | bigint, mint: Address, liquidityPoolId: number, minLpTokens?: number | bigint | null): Promise<import("../generated").DepositInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", string, string, string, string, string, string, string, any, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
102
+ requestWithdrawal(signer: TransactionSigner, liquidityPoolId: number, amount: number | bigint): Promise<import("../generated").RequestWithdrawalInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", string, string, string, string, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
103
+ withdraw(signer: TransactionSigner, liquidityPoolId: number, cooldownId: number | bigint): Promise<import("../generated").WithdrawInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, string, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
104
+ swap(signer: TransactionSigner, liquidityPoolId: number, tokenFromMint: Address, tokenToMint: Address, amountIn: number | bigint, minOut?: number | bigint | null): Promise<import("../generated").SwapInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
105
+ createPermissionAccount(caller: TransactionSigner, newAdmin: Address): Promise<import("../generated").CreatePermissionAccountInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
106
+ updateRoleHolder(admin: TransactionSigner, targetAddress: Address, role: Role, update: Update): Promise<import("../generated").UpdateRoleHolderInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
107
+ updateActionRole(admin: TransactionSigner, action: Action, role: Role, update: Update): Promise<import("../generated").UpdateActionRoleInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
108
+ updateDepositCap(signer: TransactionSigner, liquidityPoolId: number, newCap: number | bigint | null): Promise<import("../generated").UpdateDepositCapInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
109
+ freezeFunctionality(admin: TransactionSigner, action: Action, freeze: boolean): Promise<import("../generated").FreezeFunctionalityInstruction<Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">, string, string, string, string, string, "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av", []>>;
110
110
  findAssetFromMint(mint: Address): Promise<Address>;
111
111
  getSettings(): Settings;
112
112
  getCachedLiquidityPools(): AccountWithAddress<LiquidityPool>[];
@@ -58,14 +58,19 @@ class JuniorTranche {
58
58
  if (this.assets?.length > 0) {
59
59
  return this.assets;
60
60
  }
61
- const encoder = (0, generated_1.getAssetEncoder)();
62
61
  const decoder = (0, generated_1.getAssetDecoder)();
63
62
  const programAccounts = await this.connection
64
63
  .getProgramAccounts(generated_1.RLP_PROGRAM_ADDRESS, {
65
64
  encoding: "base64",
66
65
  withContext: false,
67
66
  filters: [
68
- { dataSize: BigInt(encoder.fixedSize) },
67
+ {
68
+ memcmp: {
69
+ encoding: "base64",
70
+ offset: BigInt(0),
71
+ bytes: Buffer.from(generated_1.ASSET_DISCRIMINATOR).toString("base64"),
72
+ },
73
+ },
69
74
  ],
70
75
  })
71
76
  .send();
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { type Address, type Instruction, type InstructionWithData, type ReadonlyUint8Array } from "@solana/kit";
9
9
  import { type ParsedAddAssetInstruction, type ParsedCreatePermissionAccountInstruction, type ParsedDepositInstruction, type ParsedForceRemoveAssetInstruction, type ParsedFreezeFunctionalityInstruction, type ParsedInitializeLpInstruction, type ParsedInitializePoolReserveInstruction, type ParsedInitializeRlpInstruction, type ParsedRequestWithdrawalInstruction, type ParsedSlashInstruction, type ParsedSwapInstruction, type ParsedUpdateActionRoleInstruction, type ParsedUpdateDepositCapInstruction, type ParsedUpdateOracleInstruction, type ParsedUpdateRoleHolderInstruction, type ParsedWithdrawInstruction } from "../instructions";
10
- export declare const RLP_PROGRAM_ADDRESS: Address<"RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz">;
10
+ export declare const RLP_PROGRAM_ADDRESS: Address<"JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av">;
11
11
  export declare enum RlpAccount {
12
12
  Asset = 0,
13
13
  Cooldown = 1,
@@ -39,7 +39,7 @@ export declare enum RlpInstruction {
39
39
  export declare function identifyRlpInstruction(instruction: {
40
40
  data: ReadonlyUint8Array;
41
41
  } | ReadonlyUint8Array): RlpInstruction;
42
- export type ParsedRlpInstruction<TProgram extends string = "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz"> = ({
42
+ export type ParsedRlpInstruction<TProgram extends string = "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av"> = ({
43
43
  instructionType: RlpInstruction.AddAsset;
44
44
  } & ParsedAddAssetInstruction<TProgram>) | ({
45
45
  instructionType: RlpInstruction.CreatePermissionAccount;
@@ -13,7 +13,7 @@ exports.identifyRlpInstruction = identifyRlpInstruction;
13
13
  exports.parseRlpInstruction = parseRlpInstruction;
14
14
  const kit_1 = require("@solana/kit");
15
15
  const instructions_1 = require("../instructions");
16
- exports.RLP_PROGRAM_ADDRESS = "RLptfFmhKtGLrJ9fD4o8VCHGWZZLSRrpaTKzJXdCCWz";
16
+ exports.RLP_PROGRAM_ADDRESS = "JrXLmS6aYJNJDVxdAfjNJE5wikT8ubf3TA9iL2JA9Av";
17
17
  var RlpAccount;
18
18
  (function (RlpAccount) {
19
19
  RlpAccount[RlpAccount["Asset"] = 0] = "Asset";
@@ -30,3 +30,5 @@ export * from "./updateActionRoleEvent";
30
30
  export * from "./updateDepositCapEvent";
31
31
  export * from "./updateOracleEvent";
32
32
  export * from "./updateRoleHolderEvent";
33
+ export * from "./withdrawAssetAmount";
34
+ export * from "./withdrawEvent";
@@ -46,3 +46,5 @@ __exportStar(require("./updateActionRoleEvent"), exports);
46
46
  __exportStar(require("./updateDepositCapEvent"), exports);
47
47
  __exportStar(require("./updateOracleEvent"), exports);
48
48
  __exportStar(require("./updateRoleHolderEvent"), exports);
49
+ __exportStar(require("./withdrawAssetAmount"), exports);
50
+ __exportStar(require("./withdrawEvent"), exports);
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
9
+ /**
10
+ * Per-asset entry in `WithdrawEvent::amounts_out`. Borsh-equivalent to
11
+ * the previous `(Pubkey, u64)` tuple, but the named struct is required so
12
+ * Anchor's IDL emitter can describe it (the spec has no tuple type, so a
13
+ * `Vec<(Pubkey, u64)>` field is silently omitted from the IDL).
14
+ */
15
+ export type WithdrawAssetAmount = {
16
+ mint: Address;
17
+ amount: bigint;
18
+ };
19
+ export type WithdrawAssetAmountArgs = {
20
+ mint: Address;
21
+ amount: number | bigint;
22
+ };
23
+ export declare function getWithdrawAssetAmountEncoder(): FixedSizeEncoder<WithdrawAssetAmountArgs>;
24
+ export declare function getWithdrawAssetAmountDecoder(): FixedSizeDecoder<WithdrawAssetAmount>;
25
+ export declare function getWithdrawAssetAmountCodec(): FixedSizeCodec<WithdrawAssetAmountArgs, WithdrawAssetAmount>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getWithdrawAssetAmountEncoder = getWithdrawAssetAmountEncoder;
11
+ exports.getWithdrawAssetAmountDecoder = getWithdrawAssetAmountDecoder;
12
+ exports.getWithdrawAssetAmountCodec = getWithdrawAssetAmountCodec;
13
+ const kit_1 = require("@solana/kit");
14
+ function getWithdrawAssetAmountEncoder() {
15
+ return (0, kit_1.getStructEncoder)([
16
+ ["mint", (0, kit_1.getAddressEncoder)()],
17
+ ["amount", (0, kit_1.getU64Encoder)()],
18
+ ]);
19
+ }
20
+ function getWithdrawAssetAmountDecoder() {
21
+ return (0, kit_1.getStructDecoder)([
22
+ ["mint", (0, kit_1.getAddressDecoder)()],
23
+ ["amount", (0, kit_1.getU64Decoder)()],
24
+ ]);
25
+ }
26
+ function getWithdrawAssetAmountCodec() {
27
+ return (0, kit_1.combineCodec)(getWithdrawAssetAmountEncoder(), getWithdrawAssetAmountDecoder());
28
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type Address, type Codec, type Decoder, type Encoder } from "@solana/kit";
9
+ import { type WithdrawAssetAmount, type WithdrawAssetAmountArgs } from ".";
10
+ export type WithdrawEvent = {
11
+ from: Address;
12
+ liquidityPoolId: number;
13
+ amountIn: bigint;
14
+ amountsOut: Array<WithdrawAssetAmount>;
15
+ };
16
+ export type WithdrawEventArgs = {
17
+ from: Address;
18
+ liquidityPoolId: number;
19
+ amountIn: number | bigint;
20
+ amountsOut: Array<WithdrawAssetAmountArgs>;
21
+ };
22
+ export declare function getWithdrawEventEncoder(): Encoder<WithdrawEventArgs>;
23
+ export declare function getWithdrawEventDecoder(): Decoder<WithdrawEvent>;
24
+ export declare function getWithdrawEventCodec(): Codec<WithdrawEventArgs, WithdrawEvent>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getWithdrawEventEncoder = getWithdrawEventEncoder;
11
+ exports.getWithdrawEventDecoder = getWithdrawEventDecoder;
12
+ exports.getWithdrawEventCodec = getWithdrawEventCodec;
13
+ const kit_1 = require("@solana/kit");
14
+ const _1 = require(".");
15
+ function getWithdrawEventEncoder() {
16
+ return (0, kit_1.getStructEncoder)([
17
+ ["from", (0, kit_1.getAddressEncoder)()],
18
+ ["liquidityPoolId", (0, kit_1.getU8Encoder)()],
19
+ ["amountIn", (0, kit_1.getU64Encoder)()],
20
+ ["amountsOut", (0, kit_1.getArrayEncoder)((0, _1.getWithdrawAssetAmountEncoder)())],
21
+ ]);
22
+ }
23
+ function getWithdrawEventDecoder() {
24
+ return (0, kit_1.getStructDecoder)([
25
+ ["from", (0, kit_1.getAddressDecoder)()],
26
+ ["liquidityPoolId", (0, kit_1.getU8Decoder)()],
27
+ ["amountIn", (0, kit_1.getU64Decoder)()],
28
+ ["amountsOut", (0, kit_1.getArrayDecoder)((0, _1.getWithdrawAssetAmountDecoder)())],
29
+ ]);
30
+ }
31
+ function getWithdrawEventCodec() {
32
+ return (0, kit_1.combineCodec)(getWithdrawEventEncoder(), getWithdrawEventDecoder());
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reflectmoney/junior",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "TypeScript SDK for the Reflect Liquid Protection (RLP) program, powering junior tranche of Reflect's two-tranche protection system.",
5
5
  "type": "commonjs",
6
6
  "author": "stablecoinjesus @ Palindrome Engineering",