@keel-fi/svm-alm-controller 1.0.1-rc.1 → 1.0.3-rc.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.
Files changed (53) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.es.js +550 -1
  4. package/dist/index.js +565 -0
  5. package/dist/instructions/claimRent.d.ts +3 -0
  6. package/dist/instructions/claimRent.d.ts.map +1 -0
  7. package/dist/instructions/index.d.ts +16 -0
  8. package/dist/instructions/index.d.ts.map +1 -0
  9. package/dist/instructions/initializeIntegration/atomicSwap.d.ts +8 -0
  10. package/dist/instructions/initializeIntegration/atomicSwap.d.ts.map +1 -0
  11. package/dist/instructions/initializeIntegration/index.d.ts +2 -0
  12. package/dist/instructions/initializeIntegration/index.d.ts.map +1 -0
  13. package/dist/instructions/initializeOracle.d.ts +3 -0
  14. package/dist/instructions/initializeOracle.d.ts.map +1 -0
  15. package/dist/instructions/initializeReserve.d.ts +4 -0
  16. package/dist/instructions/initializeReserve.d.ts.map +1 -0
  17. package/dist/instructions/manageController.d.ts +4 -0
  18. package/dist/instructions/manageController.d.ts.map +1 -0
  19. package/dist/instructions/manageIntegration.d.ts +4 -0
  20. package/dist/instructions/manageIntegration.d.ts.map +1 -0
  21. package/dist/instructions/managePermissions.d.ts +4 -0
  22. package/dist/instructions/managePermissions.d.ts.map +1 -0
  23. package/dist/instructions/manageReserve.d.ts +4 -0
  24. package/dist/instructions/manageReserve.d.ts.map +1 -0
  25. package/dist/instructions/pull/index.d.ts +2 -0
  26. package/dist/instructions/pull/index.d.ts.map +1 -0
  27. package/dist/instructions/push/index.d.ts +2 -0
  28. package/dist/instructions/push/index.d.ts.map +1 -0
  29. package/dist/instructions/refreshKaminoObligation.d.ts +3 -0
  30. package/dist/instructions/refreshKaminoObligation.d.ts.map +1 -0
  31. package/dist/instructions/refreshKaminoReserve.d.ts +3 -0
  32. package/dist/instructions/refreshKaminoReserve.d.ts.map +1 -0
  33. package/dist/instructions/syncIntegration.d.ts +3 -0
  34. package/dist/instructions/syncIntegration.d.ts.map +1 -0
  35. package/dist/instructions/syncReserve.d.ts +3 -0
  36. package/dist/instructions/syncReserve.d.ts.map +1 -0
  37. package/dist/instructions/updateOracle.d.ts +4 -0
  38. package/dist/instructions/updateOracle.d.ts.map +1 -0
  39. package/dist/instructions/utils.d.ts +5 -0
  40. package/dist/instructions/utils.d.ts.map +1 -0
  41. package/dist/integrations/drift/index.d.ts +2 -0
  42. package/dist/integrations/drift/index.d.ts.map +1 -0
  43. package/dist/integrations/drift/pdas.d.ts +10 -0
  44. package/dist/integrations/drift/pdas.d.ts.map +1 -0
  45. package/dist/integrations/index.d.ts +3 -0
  46. package/dist/integrations/index.d.ts.map +1 -0
  47. package/dist/integrations/kamino/index.d.ts +2 -0
  48. package/dist/integrations/kamino/index.d.ts.map +1 -0
  49. package/dist/integrations/kamino/pdas.d.ts +27 -0
  50. package/dist/integrations/kamino/pdas.d.ts.map +1 -0
  51. package/dist/pdas.d.ts +1 -0
  52. package/dist/pdas.d.ts.map +1 -1
  53. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  export * from "./generated";
2
2
  export * from "./pdas";
3
+ export * from "./integrations";
4
+ export * from "./instructions";
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
package/dist/index.es.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { getEnumEncoder, getEnumDecoder, combineCodec, getStructEncoder, getAddressEncoder, getOptionEncoder, getU64Encoder, getStructDecoder, getAddressDecoder, getOptionDecoder, getU64Decoder, getI64Encoder, getU16Encoder, getU8Encoder, getBooleanEncoder, fixEncoderSize, getBytesEncoder, getI64Decoder, getU16Decoder, getU8Decoder, getBooleanDecoder, fixDecoderSize, getBytesDecoder, getU32Encoder, getU32Decoder, getDiscriminatedUnionEncoder, getUnitEncoder, getDiscriminatedUnionDecoder, getUnitDecoder, getTupleEncoder, getTupleDecoder, decodeAccount, assertAccountExists, fetchEncodedAccount, assertAccountsExist, fetchEncodedAccounts, getU128Encoder, getU128Decoder, getI128Encoder, getArrayEncoder, getI128Decoder, getArrayDecoder, containsBytes, AccountRole, upgradeRoleToSigner, isTransactionSigner as isTransactionSigner$1, transformEncoder, addEncoderSizePrefix, addDecoderSizePrefix } from '@solana/kit';
2
2
  import { getAddressEncoder as getAddressEncoder$1, getProgramDerivedAddress, address } from '@solana/addresses';
3
+ import createKeccakHash from 'keccak';
3
4
 
4
5
  var AccountDiscriminators;
5
6
  (function (AccountDiscriminators) {
@@ -3094,5 +3095,553 @@ const deriveReservePda = async (controller, mint) => {
3094
3095
  });
3095
3096
  return reservePda;
3096
3097
  };
3098
+ const deriveOraclePda = async (nonce) => {
3099
+ const addressEncoder = getAddressEncoder$1();
3100
+ const [oraclePda] = await getProgramDerivedAddress({
3101
+ programAddress: address(SVM_ALM_CONTROLLER_PROGRAM_ADDRESS),
3102
+ seeds: ["oracle", addressEncoder.encode(nonce)],
3103
+ });
3104
+ return oraclePda;
3105
+ };
3106
+
3107
+ const DRIFT_PROGRAM_ID = "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH";
3108
+ const deriveDriftSigner = async () => {
3109
+ const [driftSignerPda] = await getProgramDerivedAddress({
3110
+ programAddress: DRIFT_PROGRAM_ID,
3111
+ seeds: ["drift_signer"],
3112
+ });
3113
+ return driftSignerPda;
3114
+ };
3115
+ const deriveDriftSignerNonce = async () => {
3116
+ const [, nonce] = await getProgramDerivedAddress({
3117
+ programAddress: DRIFT_PROGRAM_ID,
3118
+ seeds: ["drift_signer"],
3119
+ });
3120
+ return nonce;
3121
+ };
3122
+ const deriveStatePda = async () => {
3123
+ const [statePda] = await getProgramDerivedAddress({
3124
+ programAddress: DRIFT_PROGRAM_ID,
3125
+ seeds: ["drift_state"],
3126
+ });
3127
+ return statePda;
3128
+ };
3129
+ const deriveUserStatsPda = async (authority) => {
3130
+ const addressEncoder = getAddressEncoder$1();
3131
+ const [userStatsPda] = await getProgramDerivedAddress({
3132
+ programAddress: DRIFT_PROGRAM_ID,
3133
+ seeds: ["user_stats", addressEncoder.encode(authority)],
3134
+ });
3135
+ return userStatsPda;
3136
+ };
3137
+ const deriveUserPda = async (authority, subAccountId) => {
3138
+ const addressEncoder = getAddressEncoder$1();
3139
+ const [userPda] = await getProgramDerivedAddress({
3140
+ programAddress: DRIFT_PROGRAM_ID,
3141
+ seeds: [
3142
+ "user",
3143
+ addressEncoder.encode(authority),
3144
+ Buffer.from(new Uint16Array([subAccountId]).buffer),
3145
+ ],
3146
+ });
3147
+ return userPda;
3148
+ };
3149
+ const deriveSpotMarketPda = async (marketIndex) => {
3150
+ const [spotMarketPda] = await getProgramDerivedAddress({
3151
+ programAddress: DRIFT_PROGRAM_ID,
3152
+ seeds: [
3153
+ "spot_market",
3154
+ Buffer.from(new Uint16Array([marketIndex]).buffer),
3155
+ ],
3156
+ });
3157
+ return spotMarketPda;
3158
+ };
3159
+ const deriveSpotMarketVaultPda = async (marketIndex) => {
3160
+ const [spotMarketVaultPda] = await getProgramDerivedAddress({
3161
+ programAddress: DRIFT_PROGRAM_ID,
3162
+ seeds: [
3163
+ "spot_market_vault",
3164
+ Buffer.from(new Uint16Array([marketIndex]).buffer),
3165
+ ],
3166
+ });
3167
+ return spotMarketVaultPda;
3168
+ };
3169
+
3170
+ var index$1 = /*#__PURE__*/Object.freeze({
3171
+ __proto__: null,
3172
+ DRIFT_PROGRAM_ID: DRIFT_PROGRAM_ID,
3173
+ deriveDriftSigner: deriveDriftSigner,
3174
+ deriveDriftSignerNonce: deriveDriftSignerNonce,
3175
+ deriveSpotMarketPda: deriveSpotMarketPda,
3176
+ deriveSpotMarketVaultPda: deriveSpotMarketVaultPda,
3177
+ deriveStatePda: deriveStatePda,
3178
+ deriveUserPda: deriveUserPda,
3179
+ deriveUserStatsPda: deriveUserStatsPda
3180
+ });
3181
+
3182
+ const KAMINO_LEND_PROGRAM_ID$2 = "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD";
3183
+ const KAMINO_FARMS_PROGRAM_ID = "FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr";
3184
+ const DEFAULT_PUBLIC_KEY = "11111111111111111111111111111111";
3185
+ const deriveVanillaObligationAddress = async (obligationId, authority, market) => {
3186
+ const addressEncoder = getAddressEncoder$1();
3187
+ const [obligationPda] = await getProgramDerivedAddress({
3188
+ programAddress: KAMINO_LEND_PROGRAM_ID$2,
3189
+ seeds: [
3190
+ Buffer.from([0]),
3191
+ Buffer.from(new Uint8Array([obligationId])),
3192
+ addressEncoder.encode(authority),
3193
+ addressEncoder.encode(market),
3194
+ addressEncoder.encode(DEFAULT_PUBLIC_KEY),
3195
+ addressEncoder.encode(DEFAULT_PUBLIC_KEY),
3196
+ ],
3197
+ });
3198
+ return obligationPda;
3199
+ };
3200
+ const deriveReserveLiquiditySupply = async (market, reserveLiquidityMint) => {
3201
+ const addressEncoder = getAddressEncoder$1();
3202
+ const [pda] = await getProgramDerivedAddress({
3203
+ programAddress: KAMINO_LEND_PROGRAM_ID$2,
3204
+ seeds: [
3205
+ "reserve_liq_supply",
3206
+ addressEncoder.encode(market),
3207
+ addressEncoder.encode(reserveLiquidityMint),
3208
+ ],
3209
+ });
3210
+ return pda;
3211
+ };
3212
+ const deriveReserveCollateralMint = async (market, reserveLiquidityMint) => {
3213
+ const addressEncoder = getAddressEncoder$1();
3214
+ const [pda] = await getProgramDerivedAddress({
3215
+ programAddress: KAMINO_LEND_PROGRAM_ID$2,
3216
+ seeds: [
3217
+ "reserve_coll_mint",
3218
+ addressEncoder.encode(market),
3219
+ addressEncoder.encode(reserveLiquidityMint),
3220
+ ],
3221
+ });
3222
+ return pda;
3223
+ };
3224
+ const deriveReserveCollateralSupply = async (market, reserveLiquidityMint) => {
3225
+ const addressEncoder = getAddressEncoder$1();
3226
+ const [pda] = await getProgramDerivedAddress({
3227
+ programAddress: KAMINO_LEND_PROGRAM_ID$2,
3228
+ seeds: [
3229
+ "reserve_coll_supply",
3230
+ addressEncoder.encode(market),
3231
+ addressEncoder.encode(reserveLiquidityMint),
3232
+ ],
3233
+ });
3234
+ return pda;
3235
+ };
3236
+ const deriveMarketAuthorityAddress = async (market) => {
3237
+ const addressEncoder = getAddressEncoder$1();
3238
+ const [pda, bump] = await getProgramDerivedAddress({
3239
+ programAddress: KAMINO_LEND_PROGRAM_ID$2,
3240
+ seeds: ["lma", addressEncoder.encode(market)],
3241
+ });
3242
+ return { address: pda, bump };
3243
+ };
3244
+ const deriveObligationFarmAddress = async (reserveFarm, obligation) => {
3245
+ const addressEncoder = getAddressEncoder$1();
3246
+ const [pda] = await getProgramDerivedAddress({
3247
+ programAddress: KAMINO_FARMS_PROGRAM_ID,
3248
+ seeds: [
3249
+ "user",
3250
+ addressEncoder.encode(reserveFarm),
3251
+ addressEncoder.encode(obligation),
3252
+ ],
3253
+ });
3254
+ return pda;
3255
+ };
3256
+ const deriveUserMetadataAddress = async (user) => {
3257
+ const addressEncoder = getAddressEncoder$1();
3258
+ const [pda, bump] = await getProgramDerivedAddress({
3259
+ programAddress: KAMINO_LEND_PROGRAM_ID$2,
3260
+ seeds: ["user_meta", addressEncoder.encode(user)],
3261
+ });
3262
+ return { address: pda, bump };
3263
+ };
3264
+ const deriveRewardsVault = async (farmState, rewardsVaultMint) => {
3265
+ const addressEncoder = getAddressEncoder$1();
3266
+ const [pda] = await getProgramDerivedAddress({
3267
+ programAddress: KAMINO_FARMS_PROGRAM_ID,
3268
+ seeds: [
3269
+ "rvault",
3270
+ addressEncoder.encode(farmState),
3271
+ addressEncoder.encode(rewardsVaultMint),
3272
+ ],
3273
+ });
3274
+ return pda;
3275
+ };
3276
+ const deriveRewardsTreasuryVault = async (globalConfig, rewardsVaultMint) => {
3277
+ const addressEncoder = getAddressEncoder$1();
3278
+ const [pda] = await getProgramDerivedAddress({
3279
+ programAddress: KAMINO_FARMS_PROGRAM_ID,
3280
+ seeds: [
3281
+ "tvault",
3282
+ addressEncoder.encode(globalConfig),
3283
+ addressEncoder.encode(rewardsVaultMint),
3284
+ ],
3285
+ });
3286
+ return pda;
3287
+ };
3288
+ const deriveFarmVaultsAuthority = async (farmState) => {
3289
+ const addressEncoder = getAddressEncoder$1();
3290
+ const [pda, bump] = await getProgramDerivedAddress({
3291
+ programAddress: KAMINO_FARMS_PROGRAM_ID,
3292
+ seeds: ["authority", addressEncoder.encode(farmState)],
3293
+ });
3294
+ return { address: pda, bump };
3295
+ };
3296
+ const deriveKFarmsTreasuryVaultAuthority = async (globalConfig) => {
3297
+ const addressEncoder = getAddressEncoder$1();
3298
+ const [pda, bump] = await getProgramDerivedAddress({
3299
+ programAddress: KAMINO_FARMS_PROGRAM_ID,
3300
+ seeds: ["authority", addressEncoder.encode(globalConfig)],
3301
+ });
3302
+ return { address: pda, bump };
3303
+ };
3304
+
3305
+ var index = /*#__PURE__*/Object.freeze({
3306
+ __proto__: null,
3307
+ KAMINO_FARMS_PROGRAM_ID: KAMINO_FARMS_PROGRAM_ID,
3308
+ KAMINO_LEND_PROGRAM_ID: KAMINO_LEND_PROGRAM_ID$2,
3309
+ deriveFarmVaultsAuthority: deriveFarmVaultsAuthority,
3310
+ deriveKFarmsTreasuryVaultAuthority: deriveKFarmsTreasuryVaultAuthority,
3311
+ deriveMarketAuthorityAddress: deriveMarketAuthorityAddress,
3312
+ deriveObligationFarmAddress: deriveObligationFarmAddress,
3313
+ deriveReserveCollateralMint: deriveReserveCollateralMint,
3314
+ deriveReserveCollateralSupply: deriveReserveCollateralSupply,
3315
+ deriveReserveLiquiditySupply: deriveReserveLiquiditySupply,
3316
+ deriveRewardsTreasuryVault: deriveRewardsTreasuryVault,
3317
+ deriveRewardsVault: deriveRewardsVault,
3318
+ deriveUserMetadataAddress: deriveUserMetadataAddress,
3319
+ deriveVanillaObligationAddress: deriveVanillaObligationAddress
3320
+ });
3321
+
3322
+ async function createClaimRentInstruction(controller, authority, destination) {
3323
+ const controllerAuthority = await deriveControllerAuthorityPda(controller);
3324
+ const permission = await derivePermissionPda(controller, authority.address);
3325
+ return getClaimRentInstruction({
3326
+ controller,
3327
+ controllerAuthority,
3328
+ authority,
3329
+ permission,
3330
+ destination,
3331
+ }, {
3332
+ programAddress: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
3333
+ });
3334
+ }
3335
+
3336
+ const ASSOCIATED_TOKEN_PROGRAM_ID$1 = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
3337
+ async function getAssociatedTokenAddress(owner, mint, tokenProgram = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA") {
3338
+ const addressEncoder = getAddressEncoder$1();
3339
+ const [ata] = await getProgramDerivedAddress({
3340
+ programAddress: address(ASSOCIATED_TOKEN_PROGRAM_ID$1),
3341
+ seeds: [
3342
+ addressEncoder.encode(owner),
3343
+ addressEncoder.encode(tokenProgram),
3344
+ addressEncoder.encode(mint),
3345
+ ],
3346
+ });
3347
+ return ata;
3348
+ }
3349
+ const computeIntegrationHash = (config) => {
3350
+ let ixBytes;
3351
+ let hash;
3352
+ ixBytes = Buffer.from(getIntegrationConfigEncoder().encode(config));
3353
+ hash = createKeccakHash("keccak256").update(ixBytes).digest();
3354
+ return hash;
3355
+ };
3356
+
3357
+ const ASSOCIATED_TOKEN_PROGRAM_ID = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
3358
+ async function createInitializeReserveInstruction(payer, controller, authority, mint, tokenProgram, status, rateLimitSlope, rateLimitMaxOutflow) {
3359
+ const permissionPda = await derivePermissionPda(controller, authority.address);
3360
+ const reservePda = await deriveReservePda(controller, mint);
3361
+ const controllerAuthority = await deriveControllerAuthorityPda(controller);
3362
+ const vault = await getAssociatedTokenAddress(controllerAuthority, mint, tokenProgram);
3363
+ return getInitializeReserveInstruction({
3364
+ payer,
3365
+ controller,
3366
+ controllerAuthority,
3367
+ authority,
3368
+ permission: permissionPda,
3369
+ reserve: reservePda,
3370
+ mint,
3371
+ vault,
3372
+ tokenProgram,
3373
+ associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID,
3374
+ programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
3375
+ status,
3376
+ rateLimitSlope,
3377
+ rateLimitMaxOutflow,
3378
+ });
3379
+ }
3380
+
3381
+ async function createManageControllerInstruction(controller, authority, status) {
3382
+ const permissionPda = await derivePermissionPda(controller, authority.address);
3383
+ const controllerAuthority = await deriveControllerAuthorityPda(controller);
3384
+ return getManageControllerInstruction({
3385
+ controller,
3386
+ controllerAuthority,
3387
+ authority,
3388
+ permission: permissionPda,
3389
+ programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
3390
+ status,
3391
+ });
3392
+ }
3393
+
3394
+ async function createManageIntegrationInstruction(controller, authority, integration, status, rateLimitSlope, rateLimitMaxOutflow, description) {
3395
+ const permissionPda = await derivePermissionPda(controller, authority.address);
3396
+ const controllerAuthority = await deriveControllerAuthorityPda(controller);
3397
+ return getManageIntegrationInstruction({
3398
+ controller,
3399
+ controllerAuthority,
3400
+ authority,
3401
+ permission: permissionPda,
3402
+ integration,
3403
+ programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
3404
+ status,
3405
+ description: description ?? null,
3406
+ rateLimitSlope,
3407
+ rateLimitMaxOutflow,
3408
+ });
3409
+ }
3410
+
3411
+ const SYSTEM_PROGRAM_ID$2 = "11111111111111111111111111111111";
3412
+ async function createManagePermissionsInstruction(controller, payer, callingAuthority, subjectAuthority, status, canExecuteSwap, canManagePermissions, canInvokeExternalTransfer, canReallocate, canFreezeController, canUnfreezeController, canManageReservesAndIntegrations, canSuspendPermissions, canLiquidate) {
3413
+ const callingPermissionPda = await derivePermissionPda(controller, callingAuthority.address);
3414
+ const controllerAuthority = await deriveControllerAuthorityPda(controller);
3415
+ const subjectPermissionPda = await derivePermissionPda(controller, subjectAuthority);
3416
+ return getManagePermissionInstruction({
3417
+ controller,
3418
+ controllerAuthority,
3419
+ superAuthority: callingAuthority,
3420
+ superPermission: callingPermissionPda,
3421
+ authority: subjectAuthority,
3422
+ permission: subjectPermissionPda,
3423
+ payer,
3424
+ programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
3425
+ systemProgram: SYSTEM_PROGRAM_ID$2,
3426
+ status,
3427
+ canExecuteSwap,
3428
+ canManagePermissions,
3429
+ canInvokeExternalTransfer,
3430
+ canReallocate,
3431
+ canFreezeController,
3432
+ canUnfreezeController,
3433
+ canManageReservesAndIntegrations,
3434
+ canSuspendPermissions,
3435
+ canLiquidate,
3436
+ });
3437
+ }
3438
+
3439
+ async function createManageReserveInstruction(controller, authority, mint, status, rateLimitSlope, rateLimitMaxOutflow) {
3440
+ const permissionPda = await derivePermissionPda(controller, authority.address);
3441
+ const reservePda = await deriveReservePda(controller, mint);
3442
+ const controllerAuthority = await deriveControllerAuthorityPda(controller);
3443
+ return getManageReserveInstruction({
3444
+ controller,
3445
+ controllerAuthority,
3446
+ authority,
3447
+ permission: permissionPda,
3448
+ reserve: reservePda,
3449
+ programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
3450
+ status,
3451
+ rateLimitSlope,
3452
+ rateLimitMaxOutflow,
3453
+ });
3454
+ }
3455
+
3456
+ const SYSTEM_PROGRAM_ID$1 = "11111111111111111111111111111111";
3457
+ async function createInitializeOracleInstruction(controller, authority, nonce, priceFeed, oracleType, mint, quoteMint) {
3458
+ const controllerAuthority = await deriveControllerAuthorityPda(controller);
3459
+ const oraclePda = await deriveOraclePda(nonce);
3460
+ return getInitializeOracleInstruction({
3461
+ controller,
3462
+ controllerAuthority,
3463
+ authority,
3464
+ oracle: oraclePda,
3465
+ priceFeed,
3466
+ payer: authority,
3467
+ systemProgram: SYSTEM_PROGRAM_ID$1,
3468
+ oracleType,
3469
+ nonce,
3470
+ baseMint: mint,
3471
+ quoteMint,
3472
+ });
3473
+ }
3474
+
3475
+ async function createUpdateOracleInstruction(controller, authority, oracle, priceFeed, feedArgs, newAuthority) {
3476
+ const controllerAuthority = await deriveControllerAuthorityPda(controller);
3477
+ return getUpdateOracleInstruction({
3478
+ controller,
3479
+ controllerAuthority,
3480
+ authority,
3481
+ oracle,
3482
+ priceFeed,
3483
+ newAuthority,
3484
+ feedArgs,
3485
+ });
3486
+ }
3487
+
3488
+ async function createSyncIntegrationInstruction(controller, payer, integration, reserve) {
3489
+ const controllerAuthority = await deriveControllerAuthorityPda(controller);
3490
+ return getSyncInstruction({
3491
+ controller,
3492
+ controllerAuthority,
3493
+ payer,
3494
+ integration,
3495
+ reserve,
3496
+ });
3497
+ }
3498
+
3499
+ async function createSyncReserveInstruction(controller, mint, tokenProgram) {
3500
+ const reservePda = await deriveReservePda(controller, mint);
3501
+ const controllerAuthority = await deriveControllerAuthorityPda(controller);
3502
+ const vault = await getAssociatedTokenAddress(controllerAuthority, mint, tokenProgram);
3503
+ return getSyncReserveInstruction({
3504
+ controller,
3505
+ controllerAuthority,
3506
+ reserve: reservePda,
3507
+ vault,
3508
+ });
3509
+ }
3510
+
3511
+ const KAMINO_LEND_PROGRAM_ID$1 = "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD";
3512
+ function getRefreshObligationDiscriminator() {
3513
+ return new Uint8Array([0x8a, 0x1f, 0x9c, 0x5e, 0x8f, 0x2d, 0x3a, 0x4b]);
3514
+ }
3515
+ function createRefreshKaminoObligationInstruction(market, obligation, reserves) {
3516
+ const data = getRefreshObligationDiscriminator();
3517
+ const accounts = [
3518
+ {
3519
+ address: market,
3520
+ role: AccountRole.READONLY,
3521
+ },
3522
+ {
3523
+ address: obligation,
3524
+ role: AccountRole.WRITABLE,
3525
+ },
3526
+ ...reserves.map((reserve) => ({
3527
+ address: reserve,
3528
+ role: AccountRole.WRITABLE,
3529
+ })),
3530
+ ];
3531
+ return {
3532
+ programAddress: KAMINO_LEND_PROGRAM_ID$1,
3533
+ accounts,
3534
+ data,
3535
+ };
3536
+ }
3537
+
3538
+ const KAMINO_LEND_PROGRAM_ID = "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD";
3539
+ function getRefreshReserveDiscriminator() {
3540
+ return new Uint8Array([0x7b, 0x2e, 0x8d, 0x4f, 0x9a, 0x1c, 0x5b, 0x6d]);
3541
+ }
3542
+ function createRefreshKaminoReserveInstruction(reserve, market, scopePrices) {
3543
+ const data = getRefreshReserveDiscriminator();
3544
+ const accounts = [
3545
+ {
3546
+ address: reserve,
3547
+ role: AccountRole.WRITABLE,
3548
+ },
3549
+ {
3550
+ address: market,
3551
+ role: AccountRole.READONLY,
3552
+ },
3553
+ {
3554
+ address: KAMINO_LEND_PROGRAM_ID,
3555
+ role: AccountRole.READONLY,
3556
+ },
3557
+ {
3558
+ address: KAMINO_LEND_PROGRAM_ID,
3559
+ role: AccountRole.READONLY,
3560
+ },
3561
+ {
3562
+ address: KAMINO_LEND_PROGRAM_ID,
3563
+ role: AccountRole.READONLY,
3564
+ },
3565
+ {
3566
+ address: scopePrices,
3567
+ role: AccountRole.READONLY,
3568
+ },
3569
+ ];
3570
+ return {
3571
+ programAddress: KAMINO_LEND_PROGRAM_ID,
3572
+ accounts,
3573
+ data,
3574
+ };
3575
+ }
3576
+
3577
+ const SYSTEM_PROGRAM_ID = "11111111111111111111111111111111";
3578
+ async function createAtomicSwapInitializeIntegrationInstruction(payer, controller, authority, description, status, rateLimitSlope, rateLimitMaxOutflow, permitLiquidation, inputToken, inputMintDecimals, outputToken, outputMintDecimals, oracle, maxStaleness, expiryTimestamp, maxSlippageBps, oraclePriceInverted) {
3579
+ const config = {
3580
+ __kind: "AtomicSwap",
3581
+ fields: [
3582
+ {
3583
+ inputToken,
3584
+ outputToken,
3585
+ oracle,
3586
+ maxStaleness,
3587
+ expiryTimestamp,
3588
+ maxSlippageBps,
3589
+ inputMintDecimals,
3590
+ outputMintDecimals,
3591
+ oraclePriceInverted,
3592
+ padding: new Uint8Array(107),
3593
+ },
3594
+ ],
3595
+ };
3596
+ const innerArgs = {
3597
+ __kind: "AtomicSwap",
3598
+ maxSlippageBps,
3599
+ maxStaleness,
3600
+ expiryTimestamp,
3601
+ oraclePriceInverted,
3602
+ };
3603
+ const configHash = computeIntegrationHash(config);
3604
+ const integrationPda = await deriveIntegrationPda(controller, configHash);
3605
+ const permissionPda = await derivePermissionPda(controller, authority.address);
3606
+ const controllerAuthority = await deriveControllerAuthorityPda(controller);
3607
+ const descriptionBytes = new TextEncoder().encode(description);
3608
+ const descriptionEncoding = new Uint8Array(32);
3609
+ descriptionEncoding.set(descriptionBytes.slice(0, 32));
3610
+ const remainingAccounts = [
3611
+ {
3612
+ address: inputToken,
3613
+ role: AccountRole.READONLY,
3614
+ },
3615
+ {
3616
+ address: outputToken,
3617
+ role: AccountRole.READONLY,
3618
+ },
3619
+ {
3620
+ address: oracle,
3621
+ role: AccountRole.READONLY,
3622
+ },
3623
+ ];
3624
+ const instruction = getInitializeIntegrationInstruction({
3625
+ payer,
3626
+ controller,
3627
+ controllerAuthority,
3628
+ authority,
3629
+ permission: permissionPda,
3630
+ integration: integrationPda,
3631
+ programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
3632
+ systemProgram: SYSTEM_PROGRAM_ID,
3633
+ integrationType: IntegrationType.AtomicSwap,
3634
+ status,
3635
+ description: descriptionEncoding,
3636
+ rateLimitSlope,
3637
+ rateLimitMaxOutflow,
3638
+ permitLiquidation,
3639
+ innerArgs,
3640
+ });
3641
+ return {
3642
+ ...instruction,
3643
+ accounts: [...instruction.accounts, ...remainingAccounts],
3644
+ };
3645
+ }
3097
3646
 
3098
- export { ATOMIC_SWAP_BORROW_DISCRIMINATOR, ATOMIC_SWAP_REPAY_DISCRIMINATOR, AccountDiscriminators, AccountingAction, AccountingDirection, CLAIM_RENT_DISCRIMINATOR, ControllerStatus, EMIT_EVENT_DISCRIMINATOR, INITIALIZE_CONTROLLER_DISCRIMINATOR, INITIALIZE_INTEGRATION_DISCRIMINATOR, INITIALIZE_ORACLE_DISCRIMINATOR, INITIALIZE_RESERVE_DISCRIMINATOR, IntegrationStatus, IntegrationType, MANAGE_CONTROLLER_DISCRIMINATOR, MANAGE_INTEGRATION_DISCRIMINATOR, MANAGE_PERMISSION_DISCRIMINATOR, MANAGE_RESERVE_DISCRIMINATOR, PULL_DISCRIMINATOR, PUSH_DISCRIMINATOR, PermissionStatus, REFRESH_ORACLE_DISCRIMINATOR, RESET_LZ_PUSH_IN_FLIGHT_DISCRIMINATOR, ReserveStatus, SVM_ALM_CONTROLLER_PROGRAM_ADDRESS, SYNC_DISCRIMINATOR, SYNC_RESERVE_DISCRIMINATOR, SvmAlmControllerAccount, SvmAlmControllerInstruction, UPDATE_ORACLE_DISCRIMINATOR, decodeController, decodeIntegration, decodeOracle, decodePermission, decodeReserve, deriveControllerAuthorityPda, deriveControllerPda, deriveIntegrationPda, derivePermissionPda, deriveReservePda, fetchAllController, fetchAllIntegration, fetchAllMaybeController, fetchAllMaybeIntegration, fetchAllMaybeOracle, fetchAllMaybePermission, fetchAllMaybeReserve, fetchAllOracle, fetchAllPermission, fetchAllReserve, fetchController, fetchIntegration, fetchMaybeController, fetchMaybeIntegration, fetchMaybeOracle, fetchMaybePermission, fetchMaybeReserve, fetchOracle, fetchPermission, fetchReserve, getAccountDiscriminatorsCodec, getAccountDiscriminatorsDecoder, getAccountDiscriminatorsEncoder, getAccountingActionCodec, getAccountingActionDecoder, getAccountingActionEncoder, getAccountingDirectionCodec, getAccountingDirectionDecoder, getAccountingDirectionEncoder, getAccountingEventCodec, getAccountingEventDecoder, getAccountingEventEncoder, getAtomicSwapBorrowDiscriminatorBytes, getAtomicSwapBorrowInstruction, getAtomicSwapBorrowInstructionDataCodec, getAtomicSwapBorrowInstructionDataDecoder, getAtomicSwapBorrowInstructionDataEncoder, getAtomicSwapConfigCodec, getAtomicSwapConfigDecoder, getAtomicSwapConfigEncoder, getAtomicSwapRepayDiscriminatorBytes, getAtomicSwapRepayInstruction, getAtomicSwapRepayInstructionDataCodec, getAtomicSwapRepayInstructionDataDecoder, getAtomicSwapRepayInstructionDataEncoder, getAtomicSwapStateCodec, getAtomicSwapStateDecoder, getAtomicSwapStateEncoder, getCctpBridgeConfigCodec, getCctpBridgeConfigDecoder, getCctpBridgeConfigEncoder, getCctpBridgeStateCodec, getCctpBridgeStateDecoder, getCctpBridgeStateEncoder, getClaimRentDiscriminatorBytes, getClaimRentInstruction, getClaimRentInstructionDataCodec, getClaimRentInstructionDataDecoder, getClaimRentInstructionDataEncoder, getControllerCodec, getControllerDecoder, getControllerEncoder, getControllerSize, getControllerStatusCodec, getControllerStatusDecoder, getControllerStatusEncoder, getControllerUpdateEventCodec, getControllerUpdateEventDecoder, getControllerUpdateEventEncoder, getDriftConfigCodec, getDriftConfigDecoder, getDriftConfigEncoder, getEmitEventDiscriminatorBytes, getEmitEventInstruction, getEmitEventInstructionDataCodec, getEmitEventInstructionDataDecoder, getEmitEventInstructionDataEncoder, getFeedArgsCodec, getFeedArgsDecoder, getFeedArgsEncoder, getFeedCodec, getFeedDecoder, getFeedEncoder, getInitializeArgsCodec, getInitializeArgsDecoder, getInitializeArgsEncoder, getInitializeControllerDiscriminatorBytes, getInitializeControllerInstruction, getInitializeControllerInstructionDataCodec, getInitializeControllerInstructionDataDecoder, getInitializeControllerInstructionDataEncoder, getInitializeIntegrationDiscriminatorBytes, getInitializeIntegrationInstruction, getInitializeIntegrationInstructionDataCodec, getInitializeIntegrationInstructionDataDecoder, getInitializeIntegrationInstructionDataEncoder, getInitializeOracleDiscriminatorBytes, getInitializeOracleInstruction, getInitializeOracleInstructionDataCodec, getInitializeOracleInstructionDataDecoder, getInitializeOracleInstructionDataEncoder, getInitializeReserveDiscriminatorBytes, getInitializeReserveInstruction, getInitializeReserveInstructionDataCodec, getInitializeReserveInstructionDataDecoder, getInitializeReserveInstructionDataEncoder, getIntegrationCodec, getIntegrationConfigCodec, getIntegrationConfigDecoder, getIntegrationConfigEncoder, getIntegrationDecoder, getIntegrationEncoder, getIntegrationSize, getIntegrationStateCodec, getIntegrationStateDecoder, getIntegrationStateEncoder, getIntegrationStatusCodec, getIntegrationStatusDecoder, getIntegrationStatusEncoder, getIntegrationTypeCodec, getIntegrationTypeDecoder, getIntegrationTypeEncoder, getIntegrationUpdateEventCodec, getIntegrationUpdateEventDecoder, getIntegrationUpdateEventEncoder, getKaminoConfigCodec, getKaminoConfigDecoder, getKaminoConfigEncoder, getLendingStateCodec, getLendingStateDecoder, getLendingStateEncoder, getLocalTokenCodec, getLocalTokenDecoder, getLocalTokenEncoder, getLzBridgeConfigCodec, getLzBridgeConfigDecoder, getLzBridgeConfigEncoder, getLzBridgeStateCodec, getLzBridgeStateDecoder, getLzBridgeStateEncoder, getManageControllerDiscriminatorBytes, getManageControllerInstruction, getManageControllerInstructionDataCodec, getManageControllerInstructionDataDecoder, getManageControllerInstructionDataEncoder, getManageIntegrationDiscriminatorBytes, getManageIntegrationInstruction, getManageIntegrationInstructionDataCodec, getManageIntegrationInstructionDataDecoder, getManageIntegrationInstructionDataEncoder, getManagePermissionDiscriminatorBytes, getManagePermissionInstruction, getManagePermissionInstructionDataCodec, getManagePermissionInstructionDataDecoder, getManagePermissionInstructionDataEncoder, getManageReserveDiscriminatorBytes, getManageReserveInstruction, getManageReserveInstructionDataCodec, getManageReserveInstructionDataDecoder, getManageReserveInstructionDataEncoder, getOFTStoreCodec, getOFTStoreDecoder, getOFTStoreEncoder, getOftSendParamsCodec, getOftSendParamsDecoder, getOftSendParamsEncoder, getOracleCodec, getOracleDecoder, getOracleEncoder, getOracleSize, getOracleUpdateEventCodec, getOracleUpdateEventDecoder, getOracleUpdateEventEncoder, getPeerConfigCodec, getPeerConfigDecoder, getPeerConfigEncoder, getPermissionCodec, getPermissionDecoder, getPermissionEncoder, getPermissionSize, getPermissionStatusCodec, getPermissionStatusDecoder, getPermissionStatusEncoder, getPermissionUpdateEventCodec, getPermissionUpdateEventDecoder, getPermissionUpdateEventEncoder, getPullArgsCodec, getPullArgsDecoder, getPullArgsEncoder, getPullDiscriminatorBytes, getPullInstruction, getPullInstructionDataCodec, getPullInstructionDataDecoder, getPullInstructionDataEncoder, getPushArgsCodec, getPushArgsDecoder, getPushArgsEncoder, getPushDiscriminatorBytes, getPushInstruction, getPushInstructionDataCodec, getPushInstructionDataDecoder, getPushInstructionDataEncoder, getRefreshOracleDiscriminatorBytes, getRefreshOracleInstruction, getRefreshOracleInstructionDataCodec, getRefreshOracleInstructionDataDecoder, getRefreshOracleInstructionDataEncoder, getRemoteTokenMessengerCodec, getRemoteTokenMessengerDecoder, getRemoteTokenMessengerEncoder, getReserveCodec, getReserveDecoder, getReserveEncoder, getReserveSize, getReserveStatusCodec, getReserveStatusDecoder, getReserveStatusEncoder, getReserveUpdateEventCodec, getReserveUpdateEventDecoder, getReserveUpdateEventEncoder, getResetLzPushInFlightDiscriminatorBytes, getResetLzPushInFlightInstruction, getResetLzPushInFlightInstructionDataCodec, getResetLzPushInFlightInstructionDataDecoder, getResetLzPushInFlightInstructionDataEncoder, getSplTokenExternalConfigCodec, getSplTokenExternalConfigDecoder, getSplTokenExternalConfigEncoder, getSplTokenExternalStateCodec, getSplTokenExternalStateDecoder, getSplTokenExternalStateEncoder, getSvmAlmControllerEventCodec, getSvmAlmControllerEventDecoder, getSvmAlmControllerEventEncoder, getSyncDiscriminatorBytes, getSyncInstruction, getSyncInstructionDataCodec, getSyncInstructionDataDecoder, getSyncInstructionDataEncoder, getSyncReserveDiscriminatorBytes, getSyncReserveInstruction, getSyncReserveInstructionDataCodec, getSyncReserveInstructionDataDecoder, getSyncReserveInstructionDataEncoder, getUpdateOracleDiscriminatorBytes, getUpdateOracleInstruction, getUpdateOracleInstructionDataCodec, getUpdateOracleInstructionDataDecoder, getUpdateOracleInstructionDataEncoder, identifySvmAlmControllerInstruction, initializeArgs, integrationConfig, integrationState, isInitializeArgs, isIntegrationConfig, isIntegrationState, isPullArgs, isPushArgs, isSvmAlmControllerEvent, parseAtomicSwapBorrowInstruction, parseAtomicSwapRepayInstruction, parseClaimRentInstruction, parseEmitEventInstruction, parseInitializeControllerInstruction, parseInitializeIntegrationInstruction, parseInitializeOracleInstruction, parseInitializeReserveInstruction, parseManageControllerInstruction, parseManageIntegrationInstruction, parseManagePermissionInstruction, parseManageReserveInstruction, parsePullInstruction, parsePushInstruction, parseRefreshOracleInstruction, parseResetLzPushInFlightInstruction, parseSyncInstruction, parseSyncReserveInstruction, parseUpdateOracleInstruction, pullArgs, pushArgs, svmAlmControllerEvent };
3647
+ export { ATOMIC_SWAP_BORROW_DISCRIMINATOR, ATOMIC_SWAP_REPAY_DISCRIMINATOR, AccountDiscriminators, AccountingAction, AccountingDirection, CLAIM_RENT_DISCRIMINATOR, ControllerStatus, EMIT_EVENT_DISCRIMINATOR, INITIALIZE_CONTROLLER_DISCRIMINATOR, INITIALIZE_INTEGRATION_DISCRIMINATOR, INITIALIZE_ORACLE_DISCRIMINATOR, INITIALIZE_RESERVE_DISCRIMINATOR, IntegrationStatus, IntegrationType, MANAGE_CONTROLLER_DISCRIMINATOR, MANAGE_INTEGRATION_DISCRIMINATOR, MANAGE_PERMISSION_DISCRIMINATOR, MANAGE_RESERVE_DISCRIMINATOR, PULL_DISCRIMINATOR, PUSH_DISCRIMINATOR, PermissionStatus, REFRESH_ORACLE_DISCRIMINATOR, RESET_LZ_PUSH_IN_FLIGHT_DISCRIMINATOR, ReserveStatus, SVM_ALM_CONTROLLER_PROGRAM_ADDRESS, SYNC_DISCRIMINATOR, SYNC_RESERVE_DISCRIMINATOR, SvmAlmControllerAccount, SvmAlmControllerInstruction, UPDATE_ORACLE_DISCRIMINATOR, createAtomicSwapInitializeIntegrationInstruction, createClaimRentInstruction, createInitializeOracleInstruction, createInitializeReserveInstruction, createManageControllerInstruction, createManageIntegrationInstruction, createManagePermissionsInstruction, createManageReserveInstruction, createRefreshKaminoObligationInstruction, createRefreshKaminoReserveInstruction, createSyncIntegrationInstruction, createSyncReserveInstruction, createUpdateOracleInstruction, decodeController, decodeIntegration, decodeOracle, decodePermission, decodeReserve, deriveControllerAuthorityPda, deriveControllerPda, deriveIntegrationPda, deriveOraclePda, derivePermissionPda, deriveReservePda, index$1 as drift, fetchAllController, fetchAllIntegration, fetchAllMaybeController, fetchAllMaybeIntegration, fetchAllMaybeOracle, fetchAllMaybePermission, fetchAllMaybeReserve, fetchAllOracle, fetchAllPermission, fetchAllReserve, fetchController, fetchIntegration, fetchMaybeController, fetchMaybeIntegration, fetchMaybeOracle, fetchMaybePermission, fetchMaybeReserve, fetchOracle, fetchPermission, fetchReserve, getAccountDiscriminatorsCodec, getAccountDiscriminatorsDecoder, getAccountDiscriminatorsEncoder, getAccountingActionCodec, getAccountingActionDecoder, getAccountingActionEncoder, getAccountingDirectionCodec, getAccountingDirectionDecoder, getAccountingDirectionEncoder, getAccountingEventCodec, getAccountingEventDecoder, getAccountingEventEncoder, getAtomicSwapBorrowDiscriminatorBytes, getAtomicSwapBorrowInstruction, getAtomicSwapBorrowInstructionDataCodec, getAtomicSwapBorrowInstructionDataDecoder, getAtomicSwapBorrowInstructionDataEncoder, getAtomicSwapConfigCodec, getAtomicSwapConfigDecoder, getAtomicSwapConfigEncoder, getAtomicSwapRepayDiscriminatorBytes, getAtomicSwapRepayInstruction, getAtomicSwapRepayInstructionDataCodec, getAtomicSwapRepayInstructionDataDecoder, getAtomicSwapRepayInstructionDataEncoder, getAtomicSwapStateCodec, getAtomicSwapStateDecoder, getAtomicSwapStateEncoder, getCctpBridgeConfigCodec, getCctpBridgeConfigDecoder, getCctpBridgeConfigEncoder, getCctpBridgeStateCodec, getCctpBridgeStateDecoder, getCctpBridgeStateEncoder, getClaimRentDiscriminatorBytes, getClaimRentInstruction, getClaimRentInstructionDataCodec, getClaimRentInstructionDataDecoder, getClaimRentInstructionDataEncoder, getControllerCodec, getControllerDecoder, getControllerEncoder, getControllerSize, getControllerStatusCodec, getControllerStatusDecoder, getControllerStatusEncoder, getControllerUpdateEventCodec, getControllerUpdateEventDecoder, getControllerUpdateEventEncoder, getDriftConfigCodec, getDriftConfigDecoder, getDriftConfigEncoder, getEmitEventDiscriminatorBytes, getEmitEventInstruction, getEmitEventInstructionDataCodec, getEmitEventInstructionDataDecoder, getEmitEventInstructionDataEncoder, getFeedArgsCodec, getFeedArgsDecoder, getFeedArgsEncoder, getFeedCodec, getFeedDecoder, getFeedEncoder, getInitializeArgsCodec, getInitializeArgsDecoder, getInitializeArgsEncoder, getInitializeControllerDiscriminatorBytes, getInitializeControllerInstruction, getInitializeControllerInstructionDataCodec, getInitializeControllerInstructionDataDecoder, getInitializeControllerInstructionDataEncoder, getInitializeIntegrationDiscriminatorBytes, getInitializeIntegrationInstruction, getInitializeIntegrationInstructionDataCodec, getInitializeIntegrationInstructionDataDecoder, getInitializeIntegrationInstructionDataEncoder, getInitializeOracleDiscriminatorBytes, getInitializeOracleInstruction, getInitializeOracleInstructionDataCodec, getInitializeOracleInstructionDataDecoder, getInitializeOracleInstructionDataEncoder, getInitializeReserveDiscriminatorBytes, getInitializeReserveInstruction, getInitializeReserveInstructionDataCodec, getInitializeReserveInstructionDataDecoder, getInitializeReserveInstructionDataEncoder, getIntegrationCodec, getIntegrationConfigCodec, getIntegrationConfigDecoder, getIntegrationConfigEncoder, getIntegrationDecoder, getIntegrationEncoder, getIntegrationSize, getIntegrationStateCodec, getIntegrationStateDecoder, getIntegrationStateEncoder, getIntegrationStatusCodec, getIntegrationStatusDecoder, getIntegrationStatusEncoder, getIntegrationTypeCodec, getIntegrationTypeDecoder, getIntegrationTypeEncoder, getIntegrationUpdateEventCodec, getIntegrationUpdateEventDecoder, getIntegrationUpdateEventEncoder, getKaminoConfigCodec, getKaminoConfigDecoder, getKaminoConfigEncoder, getLendingStateCodec, getLendingStateDecoder, getLendingStateEncoder, getLocalTokenCodec, getLocalTokenDecoder, getLocalTokenEncoder, getLzBridgeConfigCodec, getLzBridgeConfigDecoder, getLzBridgeConfigEncoder, getLzBridgeStateCodec, getLzBridgeStateDecoder, getLzBridgeStateEncoder, getManageControllerDiscriminatorBytes, getManageControllerInstruction, getManageControllerInstructionDataCodec, getManageControllerInstructionDataDecoder, getManageControllerInstructionDataEncoder, getManageIntegrationDiscriminatorBytes, getManageIntegrationInstruction, getManageIntegrationInstructionDataCodec, getManageIntegrationInstructionDataDecoder, getManageIntegrationInstructionDataEncoder, getManagePermissionDiscriminatorBytes, getManagePermissionInstruction, getManagePermissionInstructionDataCodec, getManagePermissionInstructionDataDecoder, getManagePermissionInstructionDataEncoder, getManageReserveDiscriminatorBytes, getManageReserveInstruction, getManageReserveInstructionDataCodec, getManageReserveInstructionDataDecoder, getManageReserveInstructionDataEncoder, getOFTStoreCodec, getOFTStoreDecoder, getOFTStoreEncoder, getOftSendParamsCodec, getOftSendParamsDecoder, getOftSendParamsEncoder, getOracleCodec, getOracleDecoder, getOracleEncoder, getOracleSize, getOracleUpdateEventCodec, getOracleUpdateEventDecoder, getOracleUpdateEventEncoder, getPeerConfigCodec, getPeerConfigDecoder, getPeerConfigEncoder, getPermissionCodec, getPermissionDecoder, getPermissionEncoder, getPermissionSize, getPermissionStatusCodec, getPermissionStatusDecoder, getPermissionStatusEncoder, getPermissionUpdateEventCodec, getPermissionUpdateEventDecoder, getPermissionUpdateEventEncoder, getPullArgsCodec, getPullArgsDecoder, getPullArgsEncoder, getPullDiscriminatorBytes, getPullInstruction, getPullInstructionDataCodec, getPullInstructionDataDecoder, getPullInstructionDataEncoder, getPushArgsCodec, getPushArgsDecoder, getPushArgsEncoder, getPushDiscriminatorBytes, getPushInstruction, getPushInstructionDataCodec, getPushInstructionDataDecoder, getPushInstructionDataEncoder, getRefreshOracleDiscriminatorBytes, getRefreshOracleInstruction, getRefreshOracleInstructionDataCodec, getRefreshOracleInstructionDataDecoder, getRefreshOracleInstructionDataEncoder, getRemoteTokenMessengerCodec, getRemoteTokenMessengerDecoder, getRemoteTokenMessengerEncoder, getReserveCodec, getReserveDecoder, getReserveEncoder, getReserveSize, getReserveStatusCodec, getReserveStatusDecoder, getReserveStatusEncoder, getReserveUpdateEventCodec, getReserveUpdateEventDecoder, getReserveUpdateEventEncoder, getResetLzPushInFlightDiscriminatorBytes, getResetLzPushInFlightInstruction, getResetLzPushInFlightInstructionDataCodec, getResetLzPushInFlightInstructionDataDecoder, getResetLzPushInFlightInstructionDataEncoder, getSplTokenExternalConfigCodec, getSplTokenExternalConfigDecoder, getSplTokenExternalConfigEncoder, getSplTokenExternalStateCodec, getSplTokenExternalStateDecoder, getSplTokenExternalStateEncoder, getSvmAlmControllerEventCodec, getSvmAlmControllerEventDecoder, getSvmAlmControllerEventEncoder, getSyncDiscriminatorBytes, getSyncInstruction, getSyncInstructionDataCodec, getSyncInstructionDataDecoder, getSyncInstructionDataEncoder, getSyncReserveDiscriminatorBytes, getSyncReserveInstruction, getSyncReserveInstructionDataCodec, getSyncReserveInstructionDataDecoder, getSyncReserveInstructionDataEncoder, getUpdateOracleDiscriminatorBytes, getUpdateOracleInstruction, getUpdateOracleInstructionDataCodec, getUpdateOracleInstructionDataDecoder, getUpdateOracleInstructionDataEncoder, identifySvmAlmControllerInstruction, initializeArgs, integrationConfig, integrationState, isInitializeArgs, isIntegrationConfig, isIntegrationState, isPullArgs, isPushArgs, isSvmAlmControllerEvent, index as kamino, parseAtomicSwapBorrowInstruction, parseAtomicSwapRepayInstruction, parseClaimRentInstruction, parseEmitEventInstruction, parseInitializeControllerInstruction, parseInitializeIntegrationInstruction, parseInitializeOracleInstruction, parseInitializeReserveInstruction, parseManageControllerInstruction, parseManageIntegrationInstruction, parseManagePermissionInstruction, parseManageReserveInstruction, parsePullInstruction, parsePushInstruction, parseRefreshOracleInstruction, parseResetLzPushInFlightInstruction, parseSyncInstruction, parseSyncReserveInstruction, parseUpdateOracleInstruction, pullArgs, pushArgs, svmAlmControllerEvent };