@haven-fi/solauto-sdk 1.0.134 → 1.0.136

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/dist/clients/solautoClient.d.ts.map +1 -1
  2. package/dist/clients/solautoClient.js +49 -39
  3. package/dist/clients/solautoMarginfiClient.d.ts.map +1 -1
  4. package/dist/clients/solautoMarginfiClient.js +2 -4
  5. package/dist/generated/accounts/solautoPosition.d.ts +1 -7
  6. package/dist/generated/accounts/solautoPosition.d.ts.map +1 -1
  7. package/dist/generated/accounts/solautoPosition.js +2 -6
  8. package/dist/generated/instructions/cancelDCA.d.ts +3 -3
  9. package/dist/generated/instructions/cancelDCA.d.ts.map +1 -1
  10. package/dist/generated/instructions/cancelDCA.js +6 -6
  11. package/dist/generated/instructions/closePosition.d.ts +1 -2
  12. package/dist/generated/instructions/closePosition.d.ts.map +1 -1
  13. package/dist/generated/instructions/closePosition.js +6 -11
  14. package/dist/generated/instructions/marginfiRebalance.d.ts +2 -2
  15. package/dist/generated/instructions/marginfiRebalance.d.ts.map +1 -1
  16. package/dist/generated/instructions/marginfiRebalance.js +4 -4
  17. package/dist/generated/instructions/updatePosition.d.ts +3 -3
  18. package/dist/generated/instructions/updatePosition.d.ts.map +1 -1
  19. package/dist/generated/instructions/updatePosition.js +6 -6
  20. package/dist/generated/types/dCASettings.d.ts +7 -5
  21. package/dist/generated/types/dCASettings.d.ts.map +1 -1
  22. package/dist/generated/types/dCASettings.js +3 -2
  23. package/dist/generated/types/dCASettingsInp.d.ts +5 -3
  24. package/dist/generated/types/dCASettingsInp.d.ts.map +1 -1
  25. package/dist/generated/types/dCASettingsInp.js +2 -1
  26. package/dist/generated/types/index.d.ts +1 -1
  27. package/dist/generated/types/index.d.ts.map +1 -1
  28. package/dist/generated/types/index.js +1 -1
  29. package/dist/generated/types/{feeType.d.ts → tokenType.d.ts} +6 -6
  30. package/dist/generated/types/tokenType.d.ts.map +1 -0
  31. package/dist/generated/types/tokenType.js +22 -0
  32. package/dist/transactions/transactionUtils.d.ts.map +1 -1
  33. package/dist/transactions/transactionUtils.js +15 -15
  34. package/dist/utils/marginfiUtils.d.ts.map +1 -1
  35. package/dist/utils/solauto/generalUtils.d.ts +15 -5
  36. package/dist/utils/solauto/generalUtils.d.ts.map +1 -1
  37. package/dist/utils/solauto/generalUtils.js +16 -9
  38. package/dist/utils/solauto/rebalanceUtils.d.ts +2 -1
  39. package/dist/utils/solauto/rebalanceUtils.d.ts.map +1 -1
  40. package/dist/utils/solauto/rebalanceUtils.js +7 -5
  41. package/package.json +1 -1
  42. package/src/clients/solautoClient.ts +50 -45
  43. package/src/clients/solautoMarginfiClient.ts +2 -4
  44. package/src/generated/accounts/solautoPosition.ts +2 -15
  45. package/src/generated/instructions/cancelDCA.ts +9 -9
  46. package/src/generated/instructions/closePosition.ts +7 -13
  47. package/src/generated/instructions/marginfiRebalance.ts +6 -6
  48. package/src/generated/instructions/updatePosition.ts +9 -9
  49. package/src/generated/types/dCASettings.ts +14 -7
  50. package/src/generated/types/dCASettingsInp.ts +9 -3
  51. package/src/generated/types/index.ts +1 -1
  52. package/src/generated/types/{feeType.ts → tokenType.ts} +8 -9
  53. package/src/transactions/transactionUtils.ts +35 -25
  54. package/src/utils/marginfiUtils.ts +2 -2
  55. package/src/utils/solauto/generalUtils.ts +21 -13
  56. package/src/utils/solauto/rebalanceUtils.ts +9 -8
  57. package/tests/unit/rebalanceCalculations.ts +14 -14
  58. package/dist/generated/types/feeType.d.ts.map +0 -1
  59. package/dist/generated/types/feeType.js +0 -20
@@ -1 +1 @@
1
- {"version":3,"file":"solautoClient.d.ts","sourceRoot":"","sources":["../../src/clients/solautoClient.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AACxC,OAAO,EAA6B,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EACL,MAAM,EACN,kBAAkB,EAOnB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,aAAa,EAEd,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,WA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AAS,EAAE;IAiBzB,iCAAiC,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAUzD,iBAAiB,IAAI,OAAO,CAChC;QAAE,WAAW,EAAE,kBAAkB,CAAC;QAAC,iBAAiB,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAC5E;IAyDD,uBAAuB,IAAI,yBAAyB,GAAG,SAAS;IAOhE,wBAAwB,IAAI,WAAW,GAAG,SAAS;IAOnD,YAAY,CACV,aAAa,CAAC,EAAE,gCAAgC,EAChD,GAAG,CAAC,EAAE,kBAAkB,GACvB,kBAAkB;IA0BrB,gBAAgB,CAAC,IAAI,EAAE,sBAAsB,GAAG,kBAAkB;IAwDlE,eAAe,IAAI,kBAAkB;IAYrC,WAAW,IAAI,kBAAkB;IAgCjC,QAAQ,CAAC,OAAO,IAAI,kBAAkB;IAEtC,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,kBAAkB;IAuFhE,QAAQ,CAAC,WAAW,CAClB,gBAAgB,EAAE,gBAAgB,EAClC,uBAAuB,EAAE,SAAS,GACjC,kBAAkB;IAErB,QAAQ,CAAC,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,kBAAkB;IAE3E,QAAQ,CAAC,SAAS,CAChB,aAAa,EAAE,GAAG,GAAG,GAAG,EACxB,WAAW,EAAE,cAAc,EAC3B,aAAa,EAAE,wBAAwB,EACvC,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,gBAAgB,EAC5B,2BAA2B,CAAC,EAAE,MAAM,EACpC,WAAW,CAAC,EAAE,MAAM,GACnB,kBAAkB;IAEf,qBAAqB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CAalE"}
@@ -190,10 +190,13 @@ class SolautoClient extends txHandler_1.TxHandler {
190
190
  this.solautoPositionData?.position.dca);
191
191
  }
192
192
  openPosition(settingParams, dca) {
193
- if (dca && dca.debtToAddBaseUnit > 0) {
193
+ if (dca && dca.dcaInBaseUnit > 0) {
194
194
  this.livePositionUpdates.new({
195
- type: "debtDcaIn",
196
- value: BigInt(dca.debtToAddBaseUnit),
195
+ type: "dcaInBalance",
196
+ value: {
197
+ amount: BigInt(dca.dcaInBaseUnit),
198
+ tokenType: dca.tokenType
199
+ },
197
200
  });
198
201
  }
199
202
  if (settingParams) {
@@ -211,31 +214,33 @@ class SolautoClient extends txHandler_1.TxHandler {
211
214
  return (0, umi_1.transactionBuilder)();
212
215
  }
213
216
  updatePositionIx(args) {
214
- let debtMint = undefined;
215
- let positionDebtTa = undefined;
216
- let signerDebtTa = undefined;
217
+ let dcaMint = undefined;
218
+ let positionDcaTa = undefined;
219
+ let signerDcaTa = undefined;
217
220
  if ((0, umi_1.isOption)(args.dca) && (0, umi_1.isSome)(args.dca)) {
218
- debtMint = (0, umi_1.publicKey)(this.debtMint);
219
- positionDebtTa = (0, umi_1.publicKey)(this.positionDebtTa);
220
- signerDebtTa = (0, umi_1.publicKey)(this.signerDebtTa);
221
+ if (args.dca.value.tokenType === generated_1.TokenType.Supply) {
222
+ dcaMint = (0, umi_1.publicKey)(this.supplyMint);
223
+ positionDcaTa = (0, umi_1.publicKey)(this.positionSupplyTa);
224
+ signerDcaTa = (0, umi_1.publicKey)(this.signerSupplyTa);
225
+ }
226
+ else {
227
+ dcaMint = (0, umi_1.publicKey)(this.debtMint);
228
+ positionDcaTa = (0, umi_1.publicKey)(this.positionDebtTa);
229
+ signerDcaTa = (0, umi_1.publicKey)(this.signerDebtTa);
230
+ }
221
231
  let addingToPos = false;
222
232
  if ((0, umi_1.isOption)(args.dca) &&
223
233
  (0, umi_1.isSome)(args.dca) &&
224
- args.dca.value.debtToAddBaseUnit > 0) {
234
+ args.dca.value.dcaInBaseUnit > 0) {
225
235
  this.livePositionUpdates.new({
226
- type: "debtDcaIn",
227
- value: BigInt(args.dca.value.debtToAddBaseUnit),
236
+ type: "dcaInBalance",
237
+ value: {
238
+ amount: BigInt(args.dca.value.dcaInBaseUnit),
239
+ tokenType: args.dca.value.tokenType
240
+ },
228
241
  });
229
242
  addingToPos = true;
230
243
  }
231
- if (this.solautoPositionData?.position.dca.debtToAddBaseUnit &&
232
- !addingToPos) {
233
- this.livePositionUpdates.new({
234
- type: "debtDcaIn",
235
- value: this.solautoPositionData.position.dca.debtToAddBaseUnit *
236
- BigInt(-1),
237
- });
238
- }
239
244
  }
240
245
  if ((0, umi_1.isOption)(args.settingParams) && (0, umi_1.isSome)(args.settingParams)) {
241
246
  this.livePositionUpdates.new({
@@ -252,9 +257,9 @@ class SolautoClient extends txHandler_1.TxHandler {
252
257
  return (0, generated_1.updatePosition)(this.umi, {
253
258
  signer: this.signer,
254
259
  solautoPosition: (0, umi_1.publicKey)(this.solautoPosition),
255
- debtMint,
256
- positionDebtTa,
257
- signerDebtTa,
260
+ dcaMint,
261
+ positionDcaTa,
262
+ signerDcaTa,
258
263
  updatePositionData: args,
259
264
  });
260
265
  }
@@ -270,27 +275,32 @@ class SolautoClient extends txHandler_1.TxHandler {
270
275
  });
271
276
  }
272
277
  cancelDCAIx() {
273
- let debtMint = undefined;
274
- let positionDebtTa = undefined;
275
- let signerDebtTa = undefined;
276
- if (this.solautoPositionData !== null && !this.selfManaged) {
277
- const positionData = this.solautoPositionData.position;
278
- if (positionData.dca.debtToAddBaseUnit) {
279
- debtMint = (0, umi_1.publicKey)(this.debtMint);
280
- positionDebtTa = (0, umi_1.publicKey)(this.positionDebtTa);
281
- signerDebtTa = (0, umi_1.publicKey)(this.signerDebtTa);
282
- this.livePositionUpdates.new({
283
- type: "debtDcaIn",
284
- value: positionData.dca.debtToAddBaseUnit * BigInt(-1),
285
- });
278
+ let dcaMint = undefined;
279
+ let positionDcaTa = undefined;
280
+ let signerDcaTa = undefined;
281
+ const currDca = this.solautoPositionActiveDca();
282
+ if (currDca.dcaInBaseUnit > 0) {
283
+ if (currDca.tokenType === generated_1.TokenType.Supply) {
284
+ dcaMint = (0, umi_1.publicKey)(this.supplyMint);
285
+ positionDcaTa = (0, umi_1.publicKey)(this.positionSupplyTa);
286
+ signerDcaTa = (0, umi_1.publicKey)(this.signerSupplyTa);
287
+ }
288
+ else {
289
+ dcaMint = (0, umi_1.publicKey)(this.debtMint);
290
+ positionDcaTa = (0, umi_1.publicKey)(this.positionDebtTa);
291
+ signerDcaTa = (0, umi_1.publicKey)(this.signerDebtTa);
286
292
  }
293
+ this.livePositionUpdates.new({
294
+ type: "cancellingDca",
295
+ value: this.solautoPositionData.position.dca.tokenType,
296
+ });
287
297
  }
288
298
  return (0, generated_1.cancelDCA)(this.umi, {
289
299
  signer: this.signer,
290
300
  solautoPosition: (0, umi_1.publicKey)(this.solautoPosition),
291
- debtMint,
292
- positionDebtTa,
293
- signerDebtTa,
301
+ dcaMint,
302
+ positionDcaTa,
303
+ signerDcaTa,
294
304
  });
295
305
  }
296
306
  protocolInteraction(args) {
@@ -1 +1 @@
1
- {"version":3,"file":"solautoMarginfiClient.d.ts","sourceRoot":"","sources":["../../src/clients/solautoMarginfiClient.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,MAAM,EACN,kBAAkB,EAMnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,SAAS,EAA8B,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAM1D,OAAO,EACL,kBAAkB,EAElB,aAAa,EACb,iBAAiB,EACjB,wBAAwB,EACxB,gCAAgC,EAKjC,MAAM,cAAc,CAAC;AAGtB,OAAO,EAEL,eAAe,EAUhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAWnE,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAClE,eAAe,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IACrC,sBAAsB,CAAC,EAAE,MAA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publicKey)(this.marginfiSupplyAccounts.bank),
294
294
  supplyPriceOracle: (0, umi_1.publicKey)(this.supplyPriceOracle),
295
295
  positionSupplyTa: (0, umi_1.publicKey)(this.positionSupplyTa),
296
- signerSupplyTa: this.selfManaged
297
- ? (0, umi_1.publicKey)(this.signerSupplyTa)
298
- : undefined,
296
+ authoritySupplyTa: (0, umi_1.publicKey)((0, accountUtils_1.getTokenAccount)(this.authority, this.supplyMint)),
299
297
  vaultSupplyTa: needSupplyAccounts
300
298
  ? (0, umi_1.publicKey)(this.marginfiSupplyAccounts.liquidityVault)
301
299
  : undefined,
@@ -305,7 +303,7 @@ class SolautoMarginfiClient extends solautoClient_1.SolautoClient {
305
303
  debtBank: (0, umi_1.publicKey)(this.marginfiDebtAccounts.bank),
306
304
  debtPriceOracle: (0, umi_1.publicKey)(this.debtPriceOracle),
307
305
  positionDebtTa: (0, umi_1.publicKey)(this.positionDebtTa),
308
- signerDebtTa: this.selfManaged ? (0, umi_1.publicKey)(this.signerDebtTa) : undefined,
306
+ authorityDebtTa: (0, umi_1.publicKey)((0, accountUtils_1.getTokenAccount)(this.authority, this.debtMint)),
309
307
  vaultDebtTa: needDebtAccounts
310
308
  ? (0, umi_1.publicKey)(this.marginfiDebtAccounts.liquidityVault)
311
309
  : undefined,
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { Account, Context, Pda, PublicKey, RpcAccount, RpcGetAccountOptions, RpcGetAccountsOptions } from '@metaplex-foundation/umi';
9
9
  import { Serializer } from '@metaplex-foundation/umi/serializers';
10
- import { FeeType, FeeTypeArgs, PodBool, PodBoolArgs, PositionData, PositionDataArgs, PositionState, PositionStateArgs, RebalanceData, RebalanceDataArgs } from '../types';
10
+ import { PodBool, PodBoolArgs, PositionData, PositionDataArgs, PositionState, PositionStateArgs, RebalanceData, RebalanceDataArgs } from '../types';
11
11
  export type SolautoPosition = Account<SolautoPositionAccountData>;
12
12
  export type SolautoPositionAccountData = {
13
13
  bump: Array<number>;
@@ -18,8 +18,6 @@ export type SolautoPositionAccountData = {
18
18
  position: PositionData;
19
19
  state: PositionState;
20
20
  rebalance: RebalanceData;
21
- feeType: FeeType;
22
- padding2: Array<number>;
23
21
  padding: Array<number>;
24
22
  };
25
23
  export type SolautoPositionAccountDataArgs = {
@@ -31,8 +29,6 @@ export type SolautoPositionAccountDataArgs = {
31
29
  position: PositionDataArgs;
32
30
  state: PositionStateArgs;
33
31
  rebalance: RebalanceDataArgs;
34
- feeType: FeeTypeArgs;
35
- padding2: Array<number>;
36
32
  padding: Array<number>;
37
33
  };
38
34
  export declare function getSolautoPositionAccountDataSerializer(): Serializer<SolautoPositionAccountDataArgs, SolautoPositionAccountData>;
@@ -50,8 +46,6 @@ export declare function getSolautoPositionGpaBuilder(context: Pick<Context, 'rpc
50
46
  position: PositionDataArgs;
51
47
  state: PositionStateArgs;
52
48
  rebalance: RebalanceDataArgs;
53
- feeType: FeeTypeArgs;
54
- padding2: Array<number>;
55
49
  padding: Array<number>;
56
50
  }>;
57
51
  export declare function getSolautoPositionSize(): number;
@@ -1 +1 @@
1
- {"version":3,"file":"solautoPosition.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/solautoPosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,OAAO,EACP,GAAG,EACH,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EAKtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAMX,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,OAAO,EACP,WAAW,EACX,OAAO,EACP,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EAMlB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAElE,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CA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AAS,GAAG,GAAG,EAC1B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAO1B;AAED,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAC7B,SAAS,EAAE,SAAS,GAAG,GAAG,EAC1B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAMjC;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAC7B,UAAU,EAAE,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,EAClC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,eAAe,EAAE,CAAC,CAS5B;AAED,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAC7B,UAAU,EAAE,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,EAClC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,eAAe,EAAE,CAAC,CAU5B;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,GAAG,UAAU,CAAC;UAQhC,KAAK,CAAC,MAAM,CAAC;gBACP,KAAK,CAAC,MAAM,CAAC;iBACZ,WAAW;cACd,KAAK,CAAC,MAAM,CAAC;eACZ,SAAS;cACV,gBAAgB;WACnB,iBAAiB;eACb,iBAAiB;aACnB,KAAK,CAAC,MAAM,CAAC;GAe3B;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C"}
@@ -28,9 +28,7 @@ function getSolautoPositionAccountDataSerializer() {
28
28
  ['position', (0, types_1.getPositionDataSerializer)()],
29
29
  ['state', (0, types_1.getPositionStateSerializer)()],
30
30
  ['rebalance', (0, types_1.getRebalanceDataSerializer)()],
31
- ['feeType', (0, types_1.getFeeTypeSerializer)()],
32
- ['padding2', (0, serializers_1.array)((0, serializers_1.u8)(), { size: 7 })],
33
- ['padding', (0, serializers_1.array)((0, serializers_1.u32)(), { size: 30 })],
31
+ ['padding', (0, serializers_1.array)((0, serializers_1.u32)(), { size: 32 })],
34
32
  ], { description: 'SolautoPositionAccountData' });
35
33
  }
36
34
  function deserializeSolautoPosition(rawAccount) {
@@ -70,9 +68,7 @@ function getSolautoPositionGpaBuilder(context) {
70
68
  position: [40, (0, types_1.getPositionDataSerializer)()],
71
69
  state: [360, (0, types_1.getPositionStateSerializer)()],
72
70
  rebalance: [648, (0, types_1.getRebalanceDataSerializer)()],
73
- feeType: [704, (0, types_1.getFeeTypeSerializer)()],
74
- padding2: [705, (0, serializers_1.array)((0, serializers_1.u8)(), { size: 7 })],
75
- padding: [712, (0, serializers_1.array)((0, serializers_1.u32)(), { size: 30 })],
71
+ padding: [704, (0, serializers_1.array)((0, serializers_1.u32)(), { size: 32 })],
76
72
  })
77
73
  .deserializeUsing((account) => deserializeSolautoPosition(account));
78
74
  }
@@ -13,9 +13,9 @@ export type CancelDCAInstructionAccounts = {
13
13
  tokenProgram?: PublicKey | Pda;
14
14
  ataProgram?: PublicKey | Pda;
15
15
  solautoPosition: PublicKey | Pda;
16
- debtMint?: PublicKey | Pda;
17
- positionDebtTa?: PublicKey | Pda;
18
- signerDebtTa?: PublicKey | Pda;
16
+ dcaMint?: PublicKey | Pda;
17
+ positionDcaTa?: PublicKey | Pda;
18
+ signerDcaTa?: PublicKey | Pda;
19
19
  };
20
20
  export type CancelDCAInstructionData = {
21
21
  discriminator: number;
@@ -1 +1 @@
1
- {"version":3,"file":"cancelDCA.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/cancelDCA.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,GAAG,EACH,SAAS,EACT,MAAM,EACN,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAIX,MAAM,sCAAsC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AG,GAAG,CAAC;IACjC,OAAO,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC1B,aAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,WAAW,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;CAC/B,CAAC;AAGF,MAAM,MAAM,wBAAwB,GAAG;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjE,MAAM,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAE9C,wBAAgB,qCAAqC,IAAI,UAAU,CACjE,4BAA4B,EAC5B,wBAAwB,CACzB,CAWA;AAGD,wBAAgB,SAAS,CACvB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,KAAK,EAAE,4BAA4B,GAClC,kBAAkB,CA+FpB"}
@@ -48,20 +48,20 @@ function cancelDCA(context, input) {
48
48
  isWritable: true,
49
49
  value: input.solautoPosition ?? null,
50
50
  },
51
- debtMint: {
51
+ dcaMint: {
52
52
  index: 5,
53
53
  isWritable: false,
54
- value: input.debtMint ?? null,
54
+ value: input.dcaMint ?? null,
55
55
  },
56
- positionDebtTa: {
56
+ positionDcaTa: {
57
57
  index: 6,
58
58
  isWritable: true,
59
- value: input.positionDebtTa ?? null,
59
+ value: input.positionDcaTa ?? null,
60
60
  },
61
- signerDebtTa: {
61
+ signerDcaTa: {
62
62
  index: 7,
63
63
  isWritable: true,
64
- value: input.signerDebtTa ?? null,
64
+ value: input.signerDcaTa ?? null,
65
65
  },
66
66
  };
67
67
  // Default values.
@@ -14,9 +14,8 @@ export type ClosePositionInstructionAccounts = {
14
14
  ataProgram?: PublicKey | Pda;
15
15
  solautoPosition: PublicKey | Pda;
16
16
  protocolAccount: PublicKey | Pda;
17
- signerSupplyTa: PublicKey | Pda;
18
17
  positionSupplyTa: PublicKey | Pda;
19
- positionSupplyCollateralTa?: PublicKey | Pda;
18
+ signerSupplyTa: PublicKey | Pda;
20
19
  positionDebtTa: PublicKey | Pda;
21
20
  signerDebtTa: PublicKey | Pda;
22
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"closePosition.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/closePosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,GAAG,EACH,SAAS,EACT,MAAM,EACN,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAIX,MAAM,sCAAsC,CAAC;AAQ9C,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,UAAU,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC7B,eAAe,EAAE,SAAS,GAAG,GAAG,CAAC;IACjC,eAAe,EAAE,SAAS,GAAG,GAAG,CAAC;IACjC,cAAc,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,gBAAgB,EAAE,SAAS,GAAG,GAAG,CAAC;IAClC,0BAA0B,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC7C,cAAc,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,EAAE,SAAS,GAAG,GAAG,CAAC;CAC/B,CAAC;AAGF,MAAM,MAAM,4BAA4B,GAAG;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE,MAAM,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAElD,wBAAgB,yCAAyC,IAAI,UAAU,CACrE,gCAAgC,EAChC,4BAA4B,CAC7B,CAcA;AAGD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,KAAK,EAAE,gCAAgC,GACtC,kBAAkB,CA8GpB"}
1
+ {"version":3,"file":"closePosition.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/closePosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,GAAG,EACH,SAAS,EACT,MAAM,EACN,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAIX,MAAM,sCAAsC,CAAC;AAQ9C,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,UAAU,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC7B,eAAe,EAAE,SAAS,GAAG,GAAG,CAAC;IACjC,eAAe,EAAE,SAAS,GAAG,GAAG,CAAC;IACjC,gBAAgB,EAAE,SAAS,GAAG,GAAG,CAAC;IAClC,cAAc,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,cAAc,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,EAAE,SAAS,GAAG,GAAG,CAAC;CAC/B,CAAC;AAGF,MAAM,MAAM,4BAA4B,GAAG;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE,MAAM,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAElD,wBAAgB,yCAAyC,IAAI,UAAU,CACrE,gCAAgC,EAChC,4BAA4B,CAC7B,CAcA;AAGD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,KAAK,EAAE,gCAAgC,GACtC,kBAAkB,CAyGpB"}
@@ -53,28 +53,23 @@ function closePosition(context, input) {
53
53
  isWritable: true,
54
54
  value: input.protocolAccount ?? null,
55
55
  },
56
- signerSupplyTa: {
57
- index: 6,
58
- isWritable: true,
59
- value: input.signerSupplyTa ?? null,
60
- },
61
56
  positionSupplyTa: {
62
- index: 7,
57
+ index: 6,
63
58
  isWritable: true,
64
59
  value: input.positionSupplyTa ?? null,
65
60
  },
66
- positionSupplyCollateralTa: {
67
- index: 8,
61
+ signerSupplyTa: {
62
+ index: 7,
68
63
  isWritable: true,
69
- value: input.positionSupplyCollateralTa ?? null,
64
+ value: input.signerSupplyTa ?? null,
70
65
  },
71
66
  positionDebtTa: {
72
- index: 9,
67
+ index: 8,
73
68
  isWritable: true,
74
69
  value: input.positionDebtTa ?? null,
75
70
  },
76
71
  signerDebtTa: {
77
- index: 10,
72
+ index: 9,
78
73
  isWritable: true,
79
74
  value: input.signerDebtTa ?? null,
80
75
  },
@@ -24,13 +24,13 @@ export type MarginfiRebalanceInstructionAccounts = {
24
24
  supplyBank: PublicKey | Pda;
25
25
  supplyPriceOracle?: PublicKey | Pda;
26
26
  positionSupplyTa: PublicKey | Pda;
27
- signerSupplyTa?: PublicKey | Pda;
27
+ authoritySupplyTa?: PublicKey | Pda;
28
28
  vaultSupplyTa?: PublicKey | Pda;
29
29
  supplyVaultAuthority?: PublicKey | Pda;
30
30
  debtBank: PublicKey | Pda;
31
31
  debtPriceOracle?: PublicKey | Pda;
32
32
  positionDebtTa: PublicKey | Pda;
33
- signerDebtTa?: PublicKey | Pda;
33
+ authorityDebtTa?: PublicKey | Pda;
34
34
  vaultDebtTa?: PublicKey | Pda;
35
35
  debtVaultAuthority?: PublicKey | Pda;
36
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"marginfiRebalance.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/marginfiRebalance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,GAAG,EACH,SAAS,EACT,MAAM,EACN,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAMX,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EAEzB,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,oCAAoC,GAAG;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,SAAS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,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,wBAAwB,CAAC;IACxC,2BAA2B,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACtD,WAAW,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,6CAA6C,IAAI,UAAU,CACzE,oCAAoC,EACpC,gCAAgC,CACjC,CAqBA;AAGD,MAAM,MAAM,gCAAgC,GAC1C,oCAAoC,CAAC;AAGvC,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,KAAK,EAAE,oCAAoC,GAAG,gCAAgC,GAC7E,kBAAkB,CA6KpB"}
1
+ {"version":3,"file":"marginfiRebalance.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/marginfiRebalance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,GAAG,EACH,SAAS,EACT,MAAM,EACN,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAMX,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EAEzB,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,oCAAoC,GAAG;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,SAAS,GAAG,GAAG,CAAC;IACjC,aAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC;IAC3B,mBAAmB,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IACtC,sBAAsB,EAAE,SAAS,GAAG,GAA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AAC,MAAM,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,6CAA6C,IAAI,UAAU,CACzE,oCAAoC,EACpC,gCAAgC,CACjC,CAqBA;AAGD,MAAM,MAAM,gCAAgC,GAC1C,oCAAoC,CAAC;AAGvC,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,KAAK,EAAE,oCAAoC,GAAG,gCAAgC,GAC7E,kBAAkB,CA6KpB"}
@@ -103,10 +103,10 @@ function marginfiRebalance(context, input) {
103
103
  isWritable: true,
104
104
  value: input.positionSupplyTa ?? null,
105
105
  },
106
- signerSupplyTa: {
106
+ authoritySupplyTa: {
107
107
  index: 15,
108
108
  isWritable: true,
109
- value: input.signerSupplyTa ?? null,
109
+ value: input.authoritySupplyTa ?? null,
110
110
  },
111
111
  vaultSupplyTa: {
112
112
  index: 16,
@@ -133,10 +133,10 @@ function marginfiRebalance(context, input) {
133
133
  isWritable: true,
134
134
  value: input.positionDebtTa ?? null,
135
135
  },
136
- signerDebtTa: {
136
+ authorityDebtTa: {
137
137
  index: 21,
138
138
  isWritable: true,
139
- value: input.signerDebtTa ?? null,
139
+ value: input.authorityDebtTa ?? null,
140
140
  },
141
141
  vaultDebtTa: {
142
142
  index: 22,
@@ -13,9 +13,9 @@ export type UpdatePositionInstructionAccounts = {
13
13
  systemProgram?: PublicKey | Pda;
14
14
  tokenProgram?: PublicKey | Pda;
15
15
  solautoPosition: PublicKey | Pda;
16
- debtMint?: PublicKey | Pda;
17
- positionDebtTa?: PublicKey | Pda;
18
- signerDebtTa?: PublicKey | Pda;
16
+ dcaMint?: PublicKey | Pda;
17
+ positionDcaTa?: PublicKey | Pda;
18
+ signerDcaTa?: PublicKey | Pda;
19
19
  };
20
20
  export type UpdatePositionInstructionData = {
21
21
  discriminator: number;
@@ -1 +1 @@
1
- {"version":3,"file":"updatePosition.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/updatePosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,GAAG,EACH,SAAS,EACT,MAAM,EACN,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAIX,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EAEvB,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,iCAAiC,GAAG;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,eAAe,EAAE,SAAS,GAAG,GAAG,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC3B,cAAc,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IACjC,YAAY,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;CAChC,CAAC;AAGF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,kBAAkB,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,kBAAkB,EAAE,sBAAsB,CAAC;CAC5C,CAAC;AAEF,wBAAgB,0CAA0C,IAAI,UAAU,CACtE,iCAAiC,EACjC,6BAA6B,CAC9B,CAkBA;AAGD,MAAM,MAAM,6BAA6B,GAAG,iCAAiC,CAAC;AAG9E,wBAAgB,cAAc,CAC5B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,KAAK,EAAE,iCAAiC,GAAG,6BAA6B,GACvE,kBAAkB,CAwFpB"}
1
+ {"version":3,"file":"updatePosition.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/updatePosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,OAAO,EACP,GAAG,EACH,SAAS,EACT,MAAM,EACN,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAIX,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EAEvB,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,iCAAiC,GAAG;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC/B,eAAe,EAAE,SAAS,GAAG,GAAG,CAAC;IACjC,OAAO,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAC1B,aAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;IAChC,WAAW,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;CAC/B,CAAC;AAGF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,kBAAkB,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,kBAAkB,EAAE,sBAAsB,CAAC;CAC5C,CAAC;AAEF,wBAAgB,0CAA0C,IAAI,UAAU,CACtE,iCAAiC,EACjC,6BAA6B,CAC9B,CAkBA;AAGD,MAAM,MAAM,6BAA6B,GAAG,iCAAiC,CAAC;AAG9E,wBAAgB,cAAc,CAC5B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAClC,KAAK,EAAE,iCAAiC,GAAG,6BAA6B,GACvE,kBAAkB,CAwFpB"}
@@ -45,20 +45,20 @@ function updatePosition(context, input) {
45
45
  isWritable: true,
46
46
  value: input.solautoPosition ?? null,
47
47
  },
48
- debtMint: {
48
+ dcaMint: {
49
49
  index: 4,
50
50
  isWritable: false,
51
- value: input.debtMint ?? null,
51
+ value: input.dcaMint ?? null,
52
52
  },
53
- positionDebtTa: {
53
+ positionDcaTa: {
54
54
  index: 5,
55
55
  isWritable: true,
56
- value: input.positionDebtTa ?? null,
56
+ value: input.positionDcaTa ?? null,
57
57
  },
58
- signerDebtTa: {
58
+ signerDcaTa: {
59
59
  index: 6,
60
60
  isWritable: true,
61
- value: input.signerDebtTa ?? null,
61
+ value: input.signerDcaTa ?? null,
62
62
  },
63
63
  };
64
64
  // Arguments.
@@ -6,16 +6,18 @@
6
6
  * @see https://github.com/metaplex-foundation/kinobi
7
7
  */
8
8
  import { Serializer } from '@metaplex-foundation/umi/serializers';
9
- import { AutomationSettings, AutomationSettingsArgs } from '.';
9
+ import { AutomationSettings, AutomationSettingsArgs, TokenType, TokenTypeArgs } from '.';
10
10
  export type DCASettings = {
11
11
  automation: AutomationSettings;
12
- debtToAddBaseUnit: bigint;
13
- padding: Uint8Array;
12
+ dcaInBaseUnit: bigint;
13
+ tokenType: TokenType;
14
+ padding: Array<number>;
14
15
  };
15
16
  export type DCASettingsArgs = {
16
17
  automation: AutomationSettingsArgs;
17
- debtToAddBaseUnit: number | bigint;
18
- padding: Uint8Array;
18
+ dcaInBaseUnit: number | bigint;
19
+ tokenType: TokenTypeArgs;
20
+ padding: Array<number>;
19
21
  };
20
22
  export declare function getDCASettingsSerializer(): Serializer<DCASettingsArgs, DCASettings>;
21
23
  //# sourceMappingURL=dCASettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dCASettings.d.ts","sourceRoot":"","sources":["../../../src/generated/types/dCASettings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,UAAU,EAIX,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EAEvB,MAAM,GAAG,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,sBAAsB,CAAC;IACnC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,UAAU,CACpD,eAAe,EACf,WAAW,CACZ,CASA"}
1
+ {"version":3,"file":"dCASettings.d.ts","sourceRoot":"","sources":["../../../src/generated/types/dCASettings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,UAAU,EAKX,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,SAAS,EACT,aAAa,EAGd,MAAM,GAAG,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,sBAAsB,CAAC;IACnC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,SAAS,EAAE,aAAa,CAAC;IACzB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,UAAU,CACpD,eAAe,EACf,WAAW,CACZ,CAUA"}
@@ -13,7 +13,8 @@ const _1 = require(".");
13
13
  function getDCASettingsSerializer() {
14
14
  return (0, serializers_1.struct)([
15
15
  ['automation', (0, _1.getAutomationSettingsSerializer)()],
16
- ['debtToAddBaseUnit', (0, serializers_1.u64)()],
17
- ['padding', (0, serializers_1.bytes)({ size: 32 })],
16
+ ['dcaInBaseUnit', (0, serializers_1.u64)()],
17
+ ['tokenType', (0, _1.getTokenTypeSerializer)()],
18
+ ['padding', (0, serializers_1.array)((0, serializers_1.u8)(), { size: 31 })],
18
19
  ], { description: 'DCASettings' });
19
20
  }
@@ -6,14 +6,16 @@
6
6
  * @see https://github.com/metaplex-foundation/kinobi
7
7
  */
8
8
  import { Serializer } from '@metaplex-foundation/umi/serializers';
9
- import { AutomationSettingsInp, AutomationSettingsInpArgs } from '.';
9
+ import { AutomationSettingsInp, AutomationSettingsInpArgs, TokenType, TokenTypeArgs } from '.';
10
10
  export type DCASettingsInp = {
11
11
  automation: AutomationSettingsInp;
12
- debtToAddBaseUnit: bigint;
12
+ dcaInBaseUnit: bigint;
13
+ tokenType: TokenType;
13
14
  };
14
15
  export type DCASettingsInpArgs = {
15
16
  automation: AutomationSettingsInpArgs;
16
- debtToAddBaseUnit: number | bigint;
17
+ dcaInBaseUnit: number | bigint;
18
+ tokenType: TokenTypeArgs;
17
19
  };
18
20
  export declare function getDCASettingsInpSerializer(): Serializer<DCASettingsInpArgs, DCASettingsInp>;
19
21
  //# sourceMappingURL=dCASettingsInp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dCASettingsInp.d.ts","sourceRoot":"","sources":["../../../src/generated/types/dCASettingsInp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAe,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EAE1B,MAAM,GAAG,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,qBAAqB,CAAC;IAClC,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,yBAAyB,CAAC;IACtC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC;CACpC,CAAC;AAEF,wBAAgB,2BAA2B,IAAI,UAAU,CACvD,kBAAkB,EAClB,cAAc,CACf,CAQA"}
1
+ {"version":3,"file":"dCASettingsInp.d.ts","sourceRoot":"","sources":["../../../src/generated/types/dCASettingsInp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAe,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,SAAS,EACT,aAAa,EAGd,MAAM,GAAG,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,qBAAqB,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,yBAAyB,CAAC;IACtC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,wBAAgB,2BAA2B,IAAI,UAAU,CACvD,kBAAkB,EAClB,cAAc,CACf,CASA"}
@@ -13,6 +13,7 @@ const _1 = require(".");
13
13
  function getDCASettingsInpSerializer() {
14
14
  return (0, serializers_1.struct)([
15
15
  ['automation', (0, _1.getAutomationSettingsInpSerializer)()],
16
- ['debtToAddBaseUnit', (0, serializers_1.u64)()],
16
+ ['dcaInBaseUnit', (0, serializers_1.u64)()],
17
+ ['tokenType', (0, _1.getTokenTypeSerializer)()],
17
18
  ], { description: 'DCASettingsInp' });
18
19
  }
@@ -9,7 +9,6 @@ export * from './automationSettings';
9
9
  export * from './automationSettingsInp';
10
10
  export * from './dCASettings';
11
11
  export * from './dCASettingsInp';
12
- export * from './feeType';
13
12
  export * from './lendingPlatform';
14
13
  export * from './podBool';
15
14
  export * from './positionData';
@@ -22,5 +21,6 @@ export * from './solautoSettingsParameters';
22
21
  export * from './solautoSettingsParametersInp';
23
22
  export * from './tokenAmount';
24
23
  export * from './tokenBalanceAmount';
24
+ export * from './tokenType';
25
25
  export * from './updatePositionData';
26
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
@@ -25,7 +25,6 @@ __exportStar(require("./automationSettings"), exports);
25
25
  __exportStar(require("./automationSettingsInp"), exports);
26
26
  __exportStar(require("./dCASettings"), exports);
27
27
  __exportStar(require("./dCASettingsInp"), exports);
28
- __exportStar(require("./feeType"), exports);
29
28
  __exportStar(require("./lendingPlatform"), exports);
30
29
  __exportStar(require("./podBool"), exports);
31
30
  __exportStar(require("./positionData"), exports);
@@ -38,4 +37,5 @@ __exportStar(require("./solautoSettingsParameters"), exports);
38
37
  __exportStar(require("./solautoSettingsParametersInp"), exports);
39
38
  __exportStar(require("./tokenAmount"), exports);
40
39
  __exportStar(require("./tokenBalanceAmount"), exports);
40
+ __exportStar(require("./tokenType"), exports);
41
41
  __exportStar(require("./updatePositionData"), exports);
@@ -6,10 +6,10 @@
6
6
  * @see https://github.com/metaplex-foundation/kinobi
7
7
  */
8
8
  import { Serializer } from '@metaplex-foundation/umi/serializers';
9
- export declare enum FeeType {
10
- Small = 0,
11
- Default = 1
9
+ export declare enum TokenType {
10
+ Supply = 0,
11
+ Debt = 1
12
12
  }
13
- export type FeeTypeArgs = FeeType;
14
- export declare function getFeeTypeSerializer(): Serializer<FeeTypeArgs, FeeType>;
15
- //# sourceMappingURL=feeType.d.ts.map
13
+ export type TokenTypeArgs = TokenType;
14
+ export declare function getTokenTypeSerializer(): Serializer<TokenTypeArgs, TokenType>;
15
+ //# sourceMappingURL=tokenType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenType.d.ts","sourceRoot":"","sources":["../../../src/generated/types/tokenType.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAc,MAAM,sCAAsC,CAAC;AAE9E,oBAAY,SAAS;IACnB,MAAM,IAAA;IACN,IAAI,IAAA;CACL;AAED,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;AAEtC,wBAAgB,sBAAsB,IAAI,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,CAI7E"}