@keel-fi/svm-alm-controller 1.0.2-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.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +343 -9
- package/dist/index.js +356 -8
- package/dist/instructions/claimRent.d.ts +3 -0
- package/dist/instructions/claimRent.d.ts.map +1 -0
- package/dist/instructions/index.d.ts +16 -0
- package/dist/instructions/index.d.ts.map +1 -0
- package/dist/instructions/initializeIntegration/atomicSwap.d.ts +8 -0
- package/dist/instructions/initializeIntegration/atomicSwap.d.ts.map +1 -0
- package/dist/instructions/initializeIntegration/index.d.ts +2 -0
- package/dist/instructions/initializeIntegration/index.d.ts.map +1 -0
- package/dist/instructions/initializeOracle.d.ts +3 -0
- package/dist/instructions/initializeOracle.d.ts.map +1 -0
- package/dist/instructions/initializeReserve.d.ts +4 -0
- package/dist/instructions/initializeReserve.d.ts.map +1 -0
- package/dist/instructions/manageController.d.ts +4 -0
- package/dist/instructions/manageController.d.ts.map +1 -0
- package/dist/instructions/manageIntegration.d.ts +4 -0
- package/dist/instructions/manageIntegration.d.ts.map +1 -0
- package/dist/instructions/managePermissions.d.ts +4 -0
- package/dist/instructions/managePermissions.d.ts.map +1 -0
- package/dist/instructions/manageReserve.d.ts +4 -0
- package/dist/instructions/manageReserve.d.ts.map +1 -0
- package/dist/instructions/pull/index.d.ts +2 -0
- package/dist/instructions/pull/index.d.ts.map +1 -0
- package/dist/instructions/push/index.d.ts +2 -0
- package/dist/instructions/push/index.d.ts.map +1 -0
- package/dist/instructions/refreshKaminoObligation.d.ts +3 -0
- package/dist/instructions/refreshKaminoObligation.d.ts.map +1 -0
- package/dist/instructions/refreshKaminoReserve.d.ts +3 -0
- package/dist/instructions/refreshKaminoReserve.d.ts.map +1 -0
- package/dist/instructions/syncIntegration.d.ts +3 -0
- package/dist/instructions/syncIntegration.d.ts.map +1 -0
- package/dist/instructions/syncReserve.d.ts +3 -0
- package/dist/instructions/syncReserve.d.ts.map +1 -0
- package/dist/instructions/updateOracle.d.ts +4 -0
- package/dist/instructions/updateOracle.d.ts.map +1 -0
- package/dist/instructions/utils.d.ts +5 -0
- package/dist/instructions/utils.d.ts.map +1 -0
- package/dist/pdas.d.ts +1 -0
- package/dist/pdas.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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"}
|
|
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,6 +3095,14 @@ 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
|
+
};
|
|
3097
3106
|
|
|
3098
3107
|
const DRIFT_PROGRAM_ID = "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH";
|
|
3099
3108
|
const deriveDriftSigner = async () => {
|
|
@@ -3170,13 +3179,13 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
3170
3179
|
deriveUserStatsPda: deriveUserStatsPda
|
|
3171
3180
|
});
|
|
3172
3181
|
|
|
3173
|
-
const KAMINO_LEND_PROGRAM_ID = "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD";
|
|
3182
|
+
const KAMINO_LEND_PROGRAM_ID$2 = "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD";
|
|
3174
3183
|
const KAMINO_FARMS_PROGRAM_ID = "FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr";
|
|
3175
3184
|
const DEFAULT_PUBLIC_KEY = "11111111111111111111111111111111";
|
|
3176
3185
|
const deriveVanillaObligationAddress = async (obligationId, authority, market) => {
|
|
3177
3186
|
const addressEncoder = getAddressEncoder$1();
|
|
3178
3187
|
const [obligationPda] = await getProgramDerivedAddress({
|
|
3179
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3188
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3180
3189
|
seeds: [
|
|
3181
3190
|
Buffer.from([0]),
|
|
3182
3191
|
Buffer.from(new Uint8Array([obligationId])),
|
|
@@ -3191,7 +3200,7 @@ const deriveVanillaObligationAddress = async (obligationId, authority, market) =
|
|
|
3191
3200
|
const deriveReserveLiquiditySupply = async (market, reserveLiquidityMint) => {
|
|
3192
3201
|
const addressEncoder = getAddressEncoder$1();
|
|
3193
3202
|
const [pda] = await getProgramDerivedAddress({
|
|
3194
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3203
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3195
3204
|
seeds: [
|
|
3196
3205
|
"reserve_liq_supply",
|
|
3197
3206
|
addressEncoder.encode(market),
|
|
@@ -3203,7 +3212,7 @@ const deriveReserveLiquiditySupply = async (market, reserveLiquidityMint) => {
|
|
|
3203
3212
|
const deriveReserveCollateralMint = async (market, reserveLiquidityMint) => {
|
|
3204
3213
|
const addressEncoder = getAddressEncoder$1();
|
|
3205
3214
|
const [pda] = await getProgramDerivedAddress({
|
|
3206
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3215
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3207
3216
|
seeds: [
|
|
3208
3217
|
"reserve_coll_mint",
|
|
3209
3218
|
addressEncoder.encode(market),
|
|
@@ -3215,7 +3224,7 @@ const deriveReserveCollateralMint = async (market, reserveLiquidityMint) => {
|
|
|
3215
3224
|
const deriveReserveCollateralSupply = async (market, reserveLiquidityMint) => {
|
|
3216
3225
|
const addressEncoder = getAddressEncoder$1();
|
|
3217
3226
|
const [pda] = await getProgramDerivedAddress({
|
|
3218
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3227
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3219
3228
|
seeds: [
|
|
3220
3229
|
"reserve_coll_supply",
|
|
3221
3230
|
addressEncoder.encode(market),
|
|
@@ -3227,7 +3236,7 @@ const deriveReserveCollateralSupply = async (market, reserveLiquidityMint) => {
|
|
|
3227
3236
|
const deriveMarketAuthorityAddress = async (market) => {
|
|
3228
3237
|
const addressEncoder = getAddressEncoder$1();
|
|
3229
3238
|
const [pda, bump] = await getProgramDerivedAddress({
|
|
3230
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3239
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3231
3240
|
seeds: ["lma", addressEncoder.encode(market)],
|
|
3232
3241
|
});
|
|
3233
3242
|
return { address: pda, bump };
|
|
@@ -3247,7 +3256,7 @@ const deriveObligationFarmAddress = async (reserveFarm, obligation) => {
|
|
|
3247
3256
|
const deriveUserMetadataAddress = async (user) => {
|
|
3248
3257
|
const addressEncoder = getAddressEncoder$1();
|
|
3249
3258
|
const [pda, bump] = await getProgramDerivedAddress({
|
|
3250
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3259
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3251
3260
|
seeds: ["user_meta", addressEncoder.encode(user)],
|
|
3252
3261
|
});
|
|
3253
3262
|
return { address: pda, bump };
|
|
@@ -3296,7 +3305,7 @@ const deriveKFarmsTreasuryVaultAuthority = async (globalConfig) => {
|
|
|
3296
3305
|
var index = /*#__PURE__*/Object.freeze({
|
|
3297
3306
|
__proto__: null,
|
|
3298
3307
|
KAMINO_FARMS_PROGRAM_ID: KAMINO_FARMS_PROGRAM_ID,
|
|
3299
|
-
KAMINO_LEND_PROGRAM_ID: KAMINO_LEND_PROGRAM_ID,
|
|
3308
|
+
KAMINO_LEND_PROGRAM_ID: KAMINO_LEND_PROGRAM_ID$2,
|
|
3300
3309
|
deriveFarmVaultsAuthority: deriveFarmVaultsAuthority,
|
|
3301
3310
|
deriveKFarmsTreasuryVaultAuthority: deriveKFarmsTreasuryVaultAuthority,
|
|
3302
3311
|
deriveMarketAuthorityAddress: deriveMarketAuthorityAddress,
|
|
@@ -3310,4 +3319,329 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
3310
3319
|
deriveVanillaObligationAddress: deriveVanillaObligationAddress
|
|
3311
3320
|
});
|
|
3312
3321
|
|
|
3313
|
-
|
|
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
|
+
}
|
|
3646
|
+
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var kit = require('@solana/kit');
|
|
4
4
|
var addresses = require('@solana/addresses');
|
|
5
|
+
var createKeccakHash = require('keccak');
|
|
5
6
|
|
|
6
7
|
exports.AccountDiscriminators = void 0;
|
|
7
8
|
(function (AccountDiscriminators) {
|
|
@@ -3096,6 +3097,14 @@ const deriveReservePda = async (controller, mint) => {
|
|
|
3096
3097
|
});
|
|
3097
3098
|
return reservePda;
|
|
3098
3099
|
};
|
|
3100
|
+
const deriveOraclePda = async (nonce) => {
|
|
3101
|
+
const addressEncoder = addresses.getAddressEncoder();
|
|
3102
|
+
const [oraclePda] = await addresses.getProgramDerivedAddress({
|
|
3103
|
+
programAddress: addresses.address(SVM_ALM_CONTROLLER_PROGRAM_ADDRESS),
|
|
3104
|
+
seeds: ["oracle", addressEncoder.encode(nonce)],
|
|
3105
|
+
});
|
|
3106
|
+
return oraclePda;
|
|
3107
|
+
};
|
|
3099
3108
|
|
|
3100
3109
|
const DRIFT_PROGRAM_ID = "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH";
|
|
3101
3110
|
const deriveDriftSigner = async () => {
|
|
@@ -3172,13 +3181,13 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
3172
3181
|
deriveUserStatsPda: deriveUserStatsPda
|
|
3173
3182
|
});
|
|
3174
3183
|
|
|
3175
|
-
const KAMINO_LEND_PROGRAM_ID = "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD";
|
|
3184
|
+
const KAMINO_LEND_PROGRAM_ID$2 = "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD";
|
|
3176
3185
|
const KAMINO_FARMS_PROGRAM_ID = "FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr";
|
|
3177
3186
|
const DEFAULT_PUBLIC_KEY = "11111111111111111111111111111111";
|
|
3178
3187
|
const deriveVanillaObligationAddress = async (obligationId, authority, market) => {
|
|
3179
3188
|
const addressEncoder = addresses.getAddressEncoder();
|
|
3180
3189
|
const [obligationPda] = await addresses.getProgramDerivedAddress({
|
|
3181
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3190
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3182
3191
|
seeds: [
|
|
3183
3192
|
Buffer.from([0]),
|
|
3184
3193
|
Buffer.from(new Uint8Array([obligationId])),
|
|
@@ -3193,7 +3202,7 @@ const deriveVanillaObligationAddress = async (obligationId, authority, market) =
|
|
|
3193
3202
|
const deriveReserveLiquiditySupply = async (market, reserveLiquidityMint) => {
|
|
3194
3203
|
const addressEncoder = addresses.getAddressEncoder();
|
|
3195
3204
|
const [pda] = await addresses.getProgramDerivedAddress({
|
|
3196
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3205
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3197
3206
|
seeds: [
|
|
3198
3207
|
"reserve_liq_supply",
|
|
3199
3208
|
addressEncoder.encode(market),
|
|
@@ -3205,7 +3214,7 @@ const deriveReserveLiquiditySupply = async (market, reserveLiquidityMint) => {
|
|
|
3205
3214
|
const deriveReserveCollateralMint = async (market, reserveLiquidityMint) => {
|
|
3206
3215
|
const addressEncoder = addresses.getAddressEncoder();
|
|
3207
3216
|
const [pda] = await addresses.getProgramDerivedAddress({
|
|
3208
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3217
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3209
3218
|
seeds: [
|
|
3210
3219
|
"reserve_coll_mint",
|
|
3211
3220
|
addressEncoder.encode(market),
|
|
@@ -3217,7 +3226,7 @@ const deriveReserveCollateralMint = async (market, reserveLiquidityMint) => {
|
|
|
3217
3226
|
const deriveReserveCollateralSupply = async (market, reserveLiquidityMint) => {
|
|
3218
3227
|
const addressEncoder = addresses.getAddressEncoder();
|
|
3219
3228
|
const [pda] = await addresses.getProgramDerivedAddress({
|
|
3220
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3229
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3221
3230
|
seeds: [
|
|
3222
3231
|
"reserve_coll_supply",
|
|
3223
3232
|
addressEncoder.encode(market),
|
|
@@ -3229,7 +3238,7 @@ const deriveReserveCollateralSupply = async (market, reserveLiquidityMint) => {
|
|
|
3229
3238
|
const deriveMarketAuthorityAddress = async (market) => {
|
|
3230
3239
|
const addressEncoder = addresses.getAddressEncoder();
|
|
3231
3240
|
const [pda, bump] = await addresses.getProgramDerivedAddress({
|
|
3232
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3241
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3233
3242
|
seeds: ["lma", addressEncoder.encode(market)],
|
|
3234
3243
|
});
|
|
3235
3244
|
return { address: pda, bump };
|
|
@@ -3249,7 +3258,7 @@ const deriveObligationFarmAddress = async (reserveFarm, obligation) => {
|
|
|
3249
3258
|
const deriveUserMetadataAddress = async (user) => {
|
|
3250
3259
|
const addressEncoder = addresses.getAddressEncoder();
|
|
3251
3260
|
const [pda, bump] = await addresses.getProgramDerivedAddress({
|
|
3252
|
-
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3261
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$2,
|
|
3253
3262
|
seeds: ["user_meta", addressEncoder.encode(user)],
|
|
3254
3263
|
});
|
|
3255
3264
|
return { address: pda, bump };
|
|
@@ -3298,7 +3307,7 @@ const deriveKFarmsTreasuryVaultAuthority = async (globalConfig) => {
|
|
|
3298
3307
|
var index = /*#__PURE__*/Object.freeze({
|
|
3299
3308
|
__proto__: null,
|
|
3300
3309
|
KAMINO_FARMS_PROGRAM_ID: KAMINO_FARMS_PROGRAM_ID,
|
|
3301
|
-
KAMINO_LEND_PROGRAM_ID: KAMINO_LEND_PROGRAM_ID,
|
|
3310
|
+
KAMINO_LEND_PROGRAM_ID: KAMINO_LEND_PROGRAM_ID$2,
|
|
3302
3311
|
deriveFarmVaultsAuthority: deriveFarmVaultsAuthority,
|
|
3303
3312
|
deriveKFarmsTreasuryVaultAuthority: deriveKFarmsTreasuryVaultAuthority,
|
|
3304
3313
|
deriveMarketAuthorityAddress: deriveMarketAuthorityAddress,
|
|
@@ -3312,6 +3321,331 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
3312
3321
|
deriveVanillaObligationAddress: deriveVanillaObligationAddress
|
|
3313
3322
|
});
|
|
3314
3323
|
|
|
3324
|
+
async function createClaimRentInstruction(controller, authority, destination) {
|
|
3325
|
+
const controllerAuthority = await deriveControllerAuthorityPda(controller);
|
|
3326
|
+
const permission = await derivePermissionPda(controller, authority.address);
|
|
3327
|
+
return getClaimRentInstruction({
|
|
3328
|
+
controller,
|
|
3329
|
+
controllerAuthority,
|
|
3330
|
+
authority,
|
|
3331
|
+
permission,
|
|
3332
|
+
destination,
|
|
3333
|
+
}, {
|
|
3334
|
+
programAddress: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
|
|
3335
|
+
});
|
|
3336
|
+
}
|
|
3337
|
+
|
|
3338
|
+
const ASSOCIATED_TOKEN_PROGRAM_ID$1 = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
3339
|
+
async function getAssociatedTokenAddress(owner, mint, tokenProgram = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA") {
|
|
3340
|
+
const addressEncoder = addresses.getAddressEncoder();
|
|
3341
|
+
const [ata] = await addresses.getProgramDerivedAddress({
|
|
3342
|
+
programAddress: addresses.address(ASSOCIATED_TOKEN_PROGRAM_ID$1),
|
|
3343
|
+
seeds: [
|
|
3344
|
+
addressEncoder.encode(owner),
|
|
3345
|
+
addressEncoder.encode(tokenProgram),
|
|
3346
|
+
addressEncoder.encode(mint),
|
|
3347
|
+
],
|
|
3348
|
+
});
|
|
3349
|
+
return ata;
|
|
3350
|
+
}
|
|
3351
|
+
const computeIntegrationHash = (config) => {
|
|
3352
|
+
let ixBytes;
|
|
3353
|
+
let hash;
|
|
3354
|
+
ixBytes = Buffer.from(getIntegrationConfigEncoder().encode(config));
|
|
3355
|
+
hash = createKeccakHash("keccak256").update(ixBytes).digest();
|
|
3356
|
+
return hash;
|
|
3357
|
+
};
|
|
3358
|
+
|
|
3359
|
+
const ASSOCIATED_TOKEN_PROGRAM_ID = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
3360
|
+
async function createInitializeReserveInstruction(payer, controller, authority, mint, tokenProgram, status, rateLimitSlope, rateLimitMaxOutflow) {
|
|
3361
|
+
const permissionPda = await derivePermissionPda(controller, authority.address);
|
|
3362
|
+
const reservePda = await deriveReservePda(controller, mint);
|
|
3363
|
+
const controllerAuthority = await deriveControllerAuthorityPda(controller);
|
|
3364
|
+
const vault = await getAssociatedTokenAddress(controllerAuthority, mint, tokenProgram);
|
|
3365
|
+
return getInitializeReserveInstruction({
|
|
3366
|
+
payer,
|
|
3367
|
+
controller,
|
|
3368
|
+
controllerAuthority,
|
|
3369
|
+
authority,
|
|
3370
|
+
permission: permissionPda,
|
|
3371
|
+
reserve: reservePda,
|
|
3372
|
+
mint,
|
|
3373
|
+
vault,
|
|
3374
|
+
tokenProgram,
|
|
3375
|
+
associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID,
|
|
3376
|
+
programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
|
|
3377
|
+
status,
|
|
3378
|
+
rateLimitSlope,
|
|
3379
|
+
rateLimitMaxOutflow,
|
|
3380
|
+
});
|
|
3381
|
+
}
|
|
3382
|
+
|
|
3383
|
+
async function createManageControllerInstruction(controller, authority, status) {
|
|
3384
|
+
const permissionPda = await derivePermissionPda(controller, authority.address);
|
|
3385
|
+
const controllerAuthority = await deriveControllerAuthorityPda(controller);
|
|
3386
|
+
return getManageControllerInstruction({
|
|
3387
|
+
controller,
|
|
3388
|
+
controllerAuthority,
|
|
3389
|
+
authority,
|
|
3390
|
+
permission: permissionPda,
|
|
3391
|
+
programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
|
|
3392
|
+
status,
|
|
3393
|
+
});
|
|
3394
|
+
}
|
|
3395
|
+
|
|
3396
|
+
async function createManageIntegrationInstruction(controller, authority, integration, status, rateLimitSlope, rateLimitMaxOutflow, description) {
|
|
3397
|
+
const permissionPda = await derivePermissionPda(controller, authority.address);
|
|
3398
|
+
const controllerAuthority = await deriveControllerAuthorityPda(controller);
|
|
3399
|
+
return getManageIntegrationInstruction({
|
|
3400
|
+
controller,
|
|
3401
|
+
controllerAuthority,
|
|
3402
|
+
authority,
|
|
3403
|
+
permission: permissionPda,
|
|
3404
|
+
integration,
|
|
3405
|
+
programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
|
|
3406
|
+
status,
|
|
3407
|
+
description: description ?? null,
|
|
3408
|
+
rateLimitSlope,
|
|
3409
|
+
rateLimitMaxOutflow,
|
|
3410
|
+
});
|
|
3411
|
+
}
|
|
3412
|
+
|
|
3413
|
+
const SYSTEM_PROGRAM_ID$2 = "11111111111111111111111111111111";
|
|
3414
|
+
async function createManagePermissionsInstruction(controller, payer, callingAuthority, subjectAuthority, status, canExecuteSwap, canManagePermissions, canInvokeExternalTransfer, canReallocate, canFreezeController, canUnfreezeController, canManageReservesAndIntegrations, canSuspendPermissions, canLiquidate) {
|
|
3415
|
+
const callingPermissionPda = await derivePermissionPda(controller, callingAuthority.address);
|
|
3416
|
+
const controllerAuthority = await deriveControllerAuthorityPda(controller);
|
|
3417
|
+
const subjectPermissionPda = await derivePermissionPda(controller, subjectAuthority);
|
|
3418
|
+
return getManagePermissionInstruction({
|
|
3419
|
+
controller,
|
|
3420
|
+
controllerAuthority,
|
|
3421
|
+
superAuthority: callingAuthority,
|
|
3422
|
+
superPermission: callingPermissionPda,
|
|
3423
|
+
authority: subjectAuthority,
|
|
3424
|
+
permission: subjectPermissionPda,
|
|
3425
|
+
payer,
|
|
3426
|
+
programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
|
|
3427
|
+
systemProgram: SYSTEM_PROGRAM_ID$2,
|
|
3428
|
+
status,
|
|
3429
|
+
canExecuteSwap,
|
|
3430
|
+
canManagePermissions,
|
|
3431
|
+
canInvokeExternalTransfer,
|
|
3432
|
+
canReallocate,
|
|
3433
|
+
canFreezeController,
|
|
3434
|
+
canUnfreezeController,
|
|
3435
|
+
canManageReservesAndIntegrations,
|
|
3436
|
+
canSuspendPermissions,
|
|
3437
|
+
canLiquidate,
|
|
3438
|
+
});
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
async function createManageReserveInstruction(controller, authority, mint, status, rateLimitSlope, rateLimitMaxOutflow) {
|
|
3442
|
+
const permissionPda = await derivePermissionPda(controller, authority.address);
|
|
3443
|
+
const reservePda = await deriveReservePda(controller, mint);
|
|
3444
|
+
const controllerAuthority = await deriveControllerAuthorityPda(controller);
|
|
3445
|
+
return getManageReserveInstruction({
|
|
3446
|
+
controller,
|
|
3447
|
+
controllerAuthority,
|
|
3448
|
+
authority,
|
|
3449
|
+
permission: permissionPda,
|
|
3450
|
+
reserve: reservePda,
|
|
3451
|
+
programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
|
|
3452
|
+
status,
|
|
3453
|
+
rateLimitSlope,
|
|
3454
|
+
rateLimitMaxOutflow,
|
|
3455
|
+
});
|
|
3456
|
+
}
|
|
3457
|
+
|
|
3458
|
+
const SYSTEM_PROGRAM_ID$1 = "11111111111111111111111111111111";
|
|
3459
|
+
async function createInitializeOracleInstruction(controller, authority, nonce, priceFeed, oracleType, mint, quoteMint) {
|
|
3460
|
+
const controllerAuthority = await deriveControllerAuthorityPda(controller);
|
|
3461
|
+
const oraclePda = await deriveOraclePda(nonce);
|
|
3462
|
+
return getInitializeOracleInstruction({
|
|
3463
|
+
controller,
|
|
3464
|
+
controllerAuthority,
|
|
3465
|
+
authority,
|
|
3466
|
+
oracle: oraclePda,
|
|
3467
|
+
priceFeed,
|
|
3468
|
+
payer: authority,
|
|
3469
|
+
systemProgram: SYSTEM_PROGRAM_ID$1,
|
|
3470
|
+
oracleType,
|
|
3471
|
+
nonce,
|
|
3472
|
+
baseMint: mint,
|
|
3473
|
+
quoteMint,
|
|
3474
|
+
});
|
|
3475
|
+
}
|
|
3476
|
+
|
|
3477
|
+
async function createUpdateOracleInstruction(controller, authority, oracle, priceFeed, feedArgs, newAuthority) {
|
|
3478
|
+
const controllerAuthority = await deriveControllerAuthorityPda(controller);
|
|
3479
|
+
return getUpdateOracleInstruction({
|
|
3480
|
+
controller,
|
|
3481
|
+
controllerAuthority,
|
|
3482
|
+
authority,
|
|
3483
|
+
oracle,
|
|
3484
|
+
priceFeed,
|
|
3485
|
+
newAuthority,
|
|
3486
|
+
feedArgs,
|
|
3487
|
+
});
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3490
|
+
async function createSyncIntegrationInstruction(controller, payer, integration, reserve) {
|
|
3491
|
+
const controllerAuthority = await deriveControllerAuthorityPda(controller);
|
|
3492
|
+
return getSyncInstruction({
|
|
3493
|
+
controller,
|
|
3494
|
+
controllerAuthority,
|
|
3495
|
+
payer,
|
|
3496
|
+
integration,
|
|
3497
|
+
reserve,
|
|
3498
|
+
});
|
|
3499
|
+
}
|
|
3500
|
+
|
|
3501
|
+
async function createSyncReserveInstruction(controller, mint, tokenProgram) {
|
|
3502
|
+
const reservePda = await deriveReservePda(controller, mint);
|
|
3503
|
+
const controllerAuthority = await deriveControllerAuthorityPda(controller);
|
|
3504
|
+
const vault = await getAssociatedTokenAddress(controllerAuthority, mint, tokenProgram);
|
|
3505
|
+
return getSyncReserveInstruction({
|
|
3506
|
+
controller,
|
|
3507
|
+
controllerAuthority,
|
|
3508
|
+
reserve: reservePda,
|
|
3509
|
+
vault,
|
|
3510
|
+
});
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
const KAMINO_LEND_PROGRAM_ID$1 = "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD";
|
|
3514
|
+
function getRefreshObligationDiscriminator() {
|
|
3515
|
+
return new Uint8Array([0x8a, 0x1f, 0x9c, 0x5e, 0x8f, 0x2d, 0x3a, 0x4b]);
|
|
3516
|
+
}
|
|
3517
|
+
function createRefreshKaminoObligationInstruction(market, obligation, reserves) {
|
|
3518
|
+
const data = getRefreshObligationDiscriminator();
|
|
3519
|
+
const accounts = [
|
|
3520
|
+
{
|
|
3521
|
+
address: market,
|
|
3522
|
+
role: kit.AccountRole.READONLY,
|
|
3523
|
+
},
|
|
3524
|
+
{
|
|
3525
|
+
address: obligation,
|
|
3526
|
+
role: kit.AccountRole.WRITABLE,
|
|
3527
|
+
},
|
|
3528
|
+
...reserves.map((reserve) => ({
|
|
3529
|
+
address: reserve,
|
|
3530
|
+
role: kit.AccountRole.WRITABLE,
|
|
3531
|
+
})),
|
|
3532
|
+
];
|
|
3533
|
+
return {
|
|
3534
|
+
programAddress: KAMINO_LEND_PROGRAM_ID$1,
|
|
3535
|
+
accounts,
|
|
3536
|
+
data,
|
|
3537
|
+
};
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
const KAMINO_LEND_PROGRAM_ID = "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD";
|
|
3541
|
+
function getRefreshReserveDiscriminator() {
|
|
3542
|
+
return new Uint8Array([0x7b, 0x2e, 0x8d, 0x4f, 0x9a, 0x1c, 0x5b, 0x6d]);
|
|
3543
|
+
}
|
|
3544
|
+
function createRefreshKaminoReserveInstruction(reserve, market, scopePrices) {
|
|
3545
|
+
const data = getRefreshReserveDiscriminator();
|
|
3546
|
+
const accounts = [
|
|
3547
|
+
{
|
|
3548
|
+
address: reserve,
|
|
3549
|
+
role: kit.AccountRole.WRITABLE,
|
|
3550
|
+
},
|
|
3551
|
+
{
|
|
3552
|
+
address: market,
|
|
3553
|
+
role: kit.AccountRole.READONLY,
|
|
3554
|
+
},
|
|
3555
|
+
{
|
|
3556
|
+
address: KAMINO_LEND_PROGRAM_ID,
|
|
3557
|
+
role: kit.AccountRole.READONLY,
|
|
3558
|
+
},
|
|
3559
|
+
{
|
|
3560
|
+
address: KAMINO_LEND_PROGRAM_ID,
|
|
3561
|
+
role: kit.AccountRole.READONLY,
|
|
3562
|
+
},
|
|
3563
|
+
{
|
|
3564
|
+
address: KAMINO_LEND_PROGRAM_ID,
|
|
3565
|
+
role: kit.AccountRole.READONLY,
|
|
3566
|
+
},
|
|
3567
|
+
{
|
|
3568
|
+
address: scopePrices,
|
|
3569
|
+
role: kit.AccountRole.READONLY,
|
|
3570
|
+
},
|
|
3571
|
+
];
|
|
3572
|
+
return {
|
|
3573
|
+
programAddress: KAMINO_LEND_PROGRAM_ID,
|
|
3574
|
+
accounts,
|
|
3575
|
+
data,
|
|
3576
|
+
};
|
|
3577
|
+
}
|
|
3578
|
+
|
|
3579
|
+
const SYSTEM_PROGRAM_ID = "11111111111111111111111111111111";
|
|
3580
|
+
async function createAtomicSwapInitializeIntegrationInstruction(payer, controller, authority, description, status, rateLimitSlope, rateLimitMaxOutflow, permitLiquidation, inputToken, inputMintDecimals, outputToken, outputMintDecimals, oracle, maxStaleness, expiryTimestamp, maxSlippageBps, oraclePriceInverted) {
|
|
3581
|
+
const config = {
|
|
3582
|
+
__kind: "AtomicSwap",
|
|
3583
|
+
fields: [
|
|
3584
|
+
{
|
|
3585
|
+
inputToken,
|
|
3586
|
+
outputToken,
|
|
3587
|
+
oracle,
|
|
3588
|
+
maxStaleness,
|
|
3589
|
+
expiryTimestamp,
|
|
3590
|
+
maxSlippageBps,
|
|
3591
|
+
inputMintDecimals,
|
|
3592
|
+
outputMintDecimals,
|
|
3593
|
+
oraclePriceInverted,
|
|
3594
|
+
padding: new Uint8Array(107),
|
|
3595
|
+
},
|
|
3596
|
+
],
|
|
3597
|
+
};
|
|
3598
|
+
const innerArgs = {
|
|
3599
|
+
__kind: "AtomicSwap",
|
|
3600
|
+
maxSlippageBps,
|
|
3601
|
+
maxStaleness,
|
|
3602
|
+
expiryTimestamp,
|
|
3603
|
+
oraclePriceInverted,
|
|
3604
|
+
};
|
|
3605
|
+
const configHash = computeIntegrationHash(config);
|
|
3606
|
+
const integrationPda = await deriveIntegrationPda(controller, configHash);
|
|
3607
|
+
const permissionPda = await derivePermissionPda(controller, authority.address);
|
|
3608
|
+
const controllerAuthority = await deriveControllerAuthorityPda(controller);
|
|
3609
|
+
const descriptionBytes = new TextEncoder().encode(description);
|
|
3610
|
+
const descriptionEncoding = new Uint8Array(32);
|
|
3611
|
+
descriptionEncoding.set(descriptionBytes.slice(0, 32));
|
|
3612
|
+
const remainingAccounts = [
|
|
3613
|
+
{
|
|
3614
|
+
address: inputToken,
|
|
3615
|
+
role: kit.AccountRole.READONLY,
|
|
3616
|
+
},
|
|
3617
|
+
{
|
|
3618
|
+
address: outputToken,
|
|
3619
|
+
role: kit.AccountRole.READONLY,
|
|
3620
|
+
},
|
|
3621
|
+
{
|
|
3622
|
+
address: oracle,
|
|
3623
|
+
role: kit.AccountRole.READONLY,
|
|
3624
|
+
},
|
|
3625
|
+
];
|
|
3626
|
+
const instruction = getInitializeIntegrationInstruction({
|
|
3627
|
+
payer,
|
|
3628
|
+
controller,
|
|
3629
|
+
controllerAuthority,
|
|
3630
|
+
authority,
|
|
3631
|
+
permission: permissionPda,
|
|
3632
|
+
integration: integrationPda,
|
|
3633
|
+
programId: SVM_ALM_CONTROLLER_PROGRAM_ADDRESS,
|
|
3634
|
+
systemProgram: SYSTEM_PROGRAM_ID,
|
|
3635
|
+
integrationType: exports.IntegrationType.AtomicSwap,
|
|
3636
|
+
status,
|
|
3637
|
+
description: descriptionEncoding,
|
|
3638
|
+
rateLimitSlope,
|
|
3639
|
+
rateLimitMaxOutflow,
|
|
3640
|
+
permitLiquidation,
|
|
3641
|
+
innerArgs,
|
|
3642
|
+
});
|
|
3643
|
+
return {
|
|
3644
|
+
...instruction,
|
|
3645
|
+
accounts: [...instruction.accounts, ...remainingAccounts],
|
|
3646
|
+
};
|
|
3647
|
+
}
|
|
3648
|
+
|
|
3315
3649
|
exports.ATOMIC_SWAP_BORROW_DISCRIMINATOR = ATOMIC_SWAP_BORROW_DISCRIMINATOR;
|
|
3316
3650
|
exports.ATOMIC_SWAP_REPAY_DISCRIMINATOR = ATOMIC_SWAP_REPAY_DISCRIMINATOR;
|
|
3317
3651
|
exports.CLAIM_RENT_DISCRIMINATOR = CLAIM_RENT_DISCRIMINATOR;
|
|
@@ -3332,6 +3666,19 @@ exports.SVM_ALM_CONTROLLER_PROGRAM_ADDRESS = SVM_ALM_CONTROLLER_PROGRAM_ADDRESS;
|
|
|
3332
3666
|
exports.SYNC_DISCRIMINATOR = SYNC_DISCRIMINATOR;
|
|
3333
3667
|
exports.SYNC_RESERVE_DISCRIMINATOR = SYNC_RESERVE_DISCRIMINATOR;
|
|
3334
3668
|
exports.UPDATE_ORACLE_DISCRIMINATOR = UPDATE_ORACLE_DISCRIMINATOR;
|
|
3669
|
+
exports.createAtomicSwapInitializeIntegrationInstruction = createAtomicSwapInitializeIntegrationInstruction;
|
|
3670
|
+
exports.createClaimRentInstruction = createClaimRentInstruction;
|
|
3671
|
+
exports.createInitializeOracleInstruction = createInitializeOracleInstruction;
|
|
3672
|
+
exports.createInitializeReserveInstruction = createInitializeReserveInstruction;
|
|
3673
|
+
exports.createManageControllerInstruction = createManageControllerInstruction;
|
|
3674
|
+
exports.createManageIntegrationInstruction = createManageIntegrationInstruction;
|
|
3675
|
+
exports.createManagePermissionsInstruction = createManagePermissionsInstruction;
|
|
3676
|
+
exports.createManageReserveInstruction = createManageReserveInstruction;
|
|
3677
|
+
exports.createRefreshKaminoObligationInstruction = createRefreshKaminoObligationInstruction;
|
|
3678
|
+
exports.createRefreshKaminoReserveInstruction = createRefreshKaminoReserveInstruction;
|
|
3679
|
+
exports.createSyncIntegrationInstruction = createSyncIntegrationInstruction;
|
|
3680
|
+
exports.createSyncReserveInstruction = createSyncReserveInstruction;
|
|
3681
|
+
exports.createUpdateOracleInstruction = createUpdateOracleInstruction;
|
|
3335
3682
|
exports.decodeController = decodeController;
|
|
3336
3683
|
exports.decodeIntegration = decodeIntegration;
|
|
3337
3684
|
exports.decodeOracle = decodeOracle;
|
|
@@ -3340,6 +3687,7 @@ exports.decodeReserve = decodeReserve;
|
|
|
3340
3687
|
exports.deriveControllerAuthorityPda = deriveControllerAuthorityPda;
|
|
3341
3688
|
exports.deriveControllerPda = deriveControllerPda;
|
|
3342
3689
|
exports.deriveIntegrationPda = deriveIntegrationPda;
|
|
3690
|
+
exports.deriveOraclePda = deriveOraclePda;
|
|
3343
3691
|
exports.derivePermissionPda = derivePermissionPda;
|
|
3344
3692
|
exports.deriveReservePda = deriveReservePda;
|
|
3345
3693
|
exports.drift = index$1;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Address, TransactionSigner } from "@solana/kit";
|
|
2
|
+
export declare function createClaimRentInstruction(controller: Address, authority: TransactionSigner, destination: Address): Promise<import("../generated").ClaimRentInstruction<Address<"ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd">, string, string, string, string, string, string, []>>;
|
|
3
|
+
//# sourceMappingURL=claimRent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claimRent.d.ts","sourceRoot":"","sources":["../../src/instructions/claimRent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAWzD,wBAAsB,0BAA0B,CAC9C,UAAU,EAAE,OAAO,EACnB,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,OAAO,qKAiBrB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./claimRent";
|
|
2
|
+
export * from "./initializeReserve";
|
|
3
|
+
export * from "./manageController";
|
|
4
|
+
export * from "./manageIntegration";
|
|
5
|
+
export * from "./managePermissions";
|
|
6
|
+
export * from "./manageReserve";
|
|
7
|
+
export * from "./initializeOracle";
|
|
8
|
+
export * from "./updateOracle";
|
|
9
|
+
export * from "./syncIntegration";
|
|
10
|
+
export * from "./syncReserve";
|
|
11
|
+
export * from "./refreshKaminoObligation";
|
|
12
|
+
export * from "./refreshKaminoReserve";
|
|
13
|
+
export * from "./initializeIntegration";
|
|
14
|
+
export * from "./push";
|
|
15
|
+
export * from "./pull";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/instructions/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Address, TransactionSigner, AccountMeta } from "@solana/kit";
|
|
2
|
+
import type { IntegrationStatusArgs } from "../../generated/types";
|
|
3
|
+
export declare function createAtomicSwapInitializeIntegrationInstruction(payer: TransactionSigner, controller: Address, authority: TransactionSigner, description: string, status: IntegrationStatusArgs, rateLimitSlope: number | bigint, rateLimitMaxOutflow: number | bigint, permitLiquidation: boolean, inputToken: Address, inputMintDecimals: number, outputToken: Address, outputMintDecimals: number, oracle: Address, maxStaleness: number | bigint, expiryTimestamp: number | bigint, maxSlippageBps: number, oraclePriceInverted: boolean): Promise<{
|
|
4
|
+
accounts: AccountMeta<string>[];
|
|
5
|
+
data: import("@solana/kit").ReadonlyUint8Array;
|
|
6
|
+
programAddress: import("@solana/nominal-types").NominalType<"brand", "Address"> & import("@solana/nominal-types").NominalType<"stringEncoding", "base58"> & "ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd";
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=atomicSwap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomicSwap.d.ts","sourceRoot":"","sources":["../../../src/instructions/initializeIntegration/atomicSwap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAe,MAAM,aAAa,CAAC;AAQnF,OAAO,KAAK,EACV,qBAAqB,EAItB,MAAM,uBAAuB,CAAC;AAY/B,wBAAsB,gDAAgD,CACpE,KAAK,EAAE,iBAAiB,EACxB,UAAU,EAAE,OAAO,EACnB,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,qBAAqB,EAC7B,cAAc,EAAE,MAAM,GAAG,MAAM,EAC/B,mBAAmB,EAAE,MAAM,GAAG,MAAM,EACpC,iBAAiB,EAAE,OAAO,EAC1B,UAAU,EAAE,OAAO,EACnB,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,OAAO,EACpB,kBAAkB,EAAE,MAAM,EAC1B,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,MAAM,GAAG,MAAM,EAC7B,eAAe,EAAE,MAAM,GAAG,MAAM,EAChC,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,OAAO;;;;GA6E7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/instructions/initializeIntegration/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Address, TransactionSigner } from "@solana/kit";
|
|
2
|
+
export declare function createInitializeOracleInstruction(controller: Address, authority: TransactionSigner, nonce: Address, priceFeed: Address, oracleType: number, mint: Address, quoteMint: Address): Promise<import("../generated").InitializeOracleInstruction<Address<"ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd">, string, string, string, string, string, string, string, []>>;
|
|
3
|
+
//# sourceMappingURL=initializeOracle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initializeOracle.d.ts","sourceRoot":"","sources":["../../src/instructions/initializeOracle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAUzD,wBAAsB,iCAAiC,CACrD,UAAU,EAAE,OAAO,EACnB,SAAS,EAAE,iBAAiB,EAC5B,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,OAAO,EAClB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,OAAO,oLAkBnB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Address, TransactionSigner } from "@solana/kit";
|
|
2
|
+
import type { ReserveStatusArgs } from "../generated/types";
|
|
3
|
+
export declare function createInitializeReserveInstruction(payer: TransactionSigner, controller: Address, authority: TransactionSigner, mint: Address, tokenProgram: Address, status: ReserveStatusArgs, rateLimitSlope: number | bigint, rateLimitMaxOutflow: number | bigint): Promise<import("../generated").InitializeReserveInstruction<Address<"ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd">, string, string, string, string, string, string, string, string, string, string, "ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd", string, []>>;
|
|
4
|
+
//# sourceMappingURL=initializeReserve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initializeReserve.d.ts","sourceRoot":"","sources":["../../src/instructions/initializeReserve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AASzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAO5D,wBAAsB,kCAAkC,CACtD,KAAK,EAAE,iBAAiB,EACxB,UAAU,EAAE,OAAO,EACnB,SAAS,EAAE,iBAAiB,EAC5B,IAAI,EAAE,OAAO,EACb,YAAY,EAAE,OAAO,EACrB,MAAM,EAAE,iBAAiB,EACzB,cAAc,EAAE,MAAM,GAAG,MAAM,EAC/B,mBAAmB,EAAE,MAAM,GAAG,MAAM,qQA2BrC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Address, TransactionSigner } from "@solana/kit";
|
|
2
|
+
import type { ControllerStatusArgs } from "../generated/types";
|
|
3
|
+
export declare function createManageControllerInstruction(controller: Address, authority: TransactionSigner, status: ControllerStatusArgs): Promise<import("../generated").ManageControllerInstruction<Address<"ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd">, string, string, string, string, "ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd", []>>;
|
|
4
|
+
//# sourceMappingURL=manageController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manageController.d.ts","sourceRoot":"","sources":["../../src/instructions/manageController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAK/D,wBAAsB,iCAAiC,CACrD,UAAU,EAAE,OAAO,EACnB,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,oBAAoB,4MAa7B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Address, TransactionSigner, OptionOrNullable } from "@solana/kit";
|
|
2
|
+
import type { IntegrationStatusArgs } from "../generated/types";
|
|
3
|
+
export declare function createManageIntegrationInstruction(controller: Address, authority: TransactionSigner, integration: Address, status: OptionOrNullable<IntegrationStatusArgs>, rateLimitSlope: OptionOrNullable<number | bigint>, rateLimitMaxOutflow: OptionOrNullable<number | bigint>, description?: OptionOrNullable<Uint8Array>): Promise<import("../generated").ManageIntegrationInstruction<Address<"ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd">, string, string, string, string, string, "ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd", []>>;
|
|
4
|
+
//# sourceMappingURL=manageIntegration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manageIntegration.d.ts","sourceRoot":"","sources":["../../src/instructions/manageIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAO3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAKhE,wBAAsB,kCAAkC,CACtD,UAAU,EAAE,OAAO,EACnB,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,EAC/C,cAAc,EAAE,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,EACjD,mBAAmB,EAAE,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,EACtD,WAAW,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,qNAiB3C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Address, TransactionSigner } from "@solana/kit";
|
|
2
|
+
import type { PermissionStatusArgs } from "../generated/types";
|
|
3
|
+
export declare function createManagePermissionsInstruction(controller: Address, payer: TransactionSigner, callingAuthority: TransactionSigner, subjectAuthority: Address, status: PermissionStatusArgs, canExecuteSwap: boolean, canManagePermissions: boolean, canInvokeExternalTransfer: boolean, canReallocate: boolean, canFreezeController: boolean, canUnfreezeController: boolean, canManageReservesAndIntegrations: boolean, canSuspendPermissions: boolean, canLiquidate: boolean): Promise<import("../generated").ManagePermissionInstruction<Address<"ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd">, string, string, string, string, string, string, string, "ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd", string, []>>;
|
|
4
|
+
//# sourceMappingURL=managePermissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managePermissions.d.ts","sourceRoot":"","sources":["../../src/instructions/managePermissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAO/D,wBAAsB,kCAAkC,CACtD,UAAU,EAAE,OAAO,EACnB,KAAK,EAAE,iBAAiB,EACxB,gBAAgB,EAAE,iBAAiB,EACnC,gBAAgB,EAAE,OAAO,EACzB,MAAM,EAAE,oBAAoB,EAC5B,cAAc,EAAE,OAAO,EACvB,oBAAoB,EAAE,OAAO,EAC7B,yBAAyB,EAAE,OAAO,EAClC,aAAa,EAAE,OAAO,EACtB,mBAAmB,EAAE,OAAO,EAC5B,qBAAqB,EAAE,OAAO,EAC9B,gCAAgC,EAAE,OAAO,EACzC,qBAAqB,EAAE,OAAO,EAC9B,YAAY,EAAE,OAAO,4OAiCtB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Address, TransactionSigner } from "@solana/kit";
|
|
2
|
+
import type { ReserveStatusArgs } from "../generated/types";
|
|
3
|
+
export declare function createManageReserveInstruction(controller: Address, authority: TransactionSigner, mint: Address, status: ReserveStatusArgs, rateLimitSlope: number | bigint, rateLimitMaxOutflow: number | bigint): Promise<import("../generated").ManageReserveInstruction<Address<"ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd">, string, string, string, string, string, "ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd", []>>;
|
|
4
|
+
//# sourceMappingURL=manageReserve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manageReserve.d.ts","sourceRoot":"","sources":["../../src/instructions/manageReserve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAQzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAK5D,wBAAsB,8BAA8B,CAClD,UAAU,EAAE,OAAO,EACnB,SAAS,EAAE,iBAAiB,EAC5B,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,iBAAiB,EACzB,cAAc,EAAE,MAAM,GAAG,MAAM,EAC/B,mBAAmB,EAAE,MAAM,GAAG,MAAM,iNAiBrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/instructions/pull/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/instructions/push/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshKaminoObligation.d.ts","sourceRoot":"","sources":["../../src/instructions/refreshKaminoObligation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,WAAW,EAAe,MAAM,aAAa,CAAC;AAwB7E,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,OAAO,EACnB,QAAQ,EAAE,OAAO,EAAE,GAClB,WAAW,CAuBb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshKaminoReserve.d.ts","sourceRoot":"","sources":["../../src/instructions/refreshKaminoReserve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,WAAW,EAAe,MAAM,aAAa,CAAC;AAmB7E,wBAAgB,qCAAqC,CACnD,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,OAAO,EACf,WAAW,EAAE,OAAO,GACnB,WAAW,CAuCb"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Address, TransactionSigner } from "@solana/kit";
|
|
2
|
+
export declare function createSyncIntegrationInstruction(controller: Address, payer: TransactionSigner, integration: Address, reserve: Address): Promise<import("../generated").SyncInstruction<Address<"ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd">, string, string, string, string, string, []>>;
|
|
3
|
+
//# sourceMappingURL=syncIntegration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syncIntegration.d.ts","sourceRoot":"","sources":["../../src/instructions/syncIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAQzD,wBAAsB,gCAAgC,CACpD,UAAU,EAAE,OAAO,EACnB,KAAK,EAAE,iBAAiB,EACxB,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,OAAO,wJAWjB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Address } from "@solana/kit";
|
|
2
|
+
export declare function createSyncReserveInstruction(controller: Address, mint: Address, tokenProgram: Address): Promise<import("../generated").SyncReserveInstruction<Address<"ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd">, string, string, string, string, []>>;
|
|
3
|
+
//# sourceMappingURL=syncReserve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syncReserve.d.ts","sourceRoot":"","sources":["../../src/instructions/syncReserve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAStC,wBAAsB,4BAA4B,CAChD,UAAU,EAAE,OAAO,EACnB,IAAI,EAAE,OAAO,EACb,YAAY,EAAE,OAAO,uJAgBtB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Address, TransactionSigner, OptionOrNullable } from "@solana/kit";
|
|
2
|
+
import type { FeedArgs } from "../generated/types";
|
|
3
|
+
export declare function createUpdateOracleInstruction(controller: Address, authority: TransactionSigner, oracle: Address, priceFeed: Address, feedArgs: OptionOrNullable<FeedArgs>, newAuthority?: Address): Promise<import("../generated").UpdateOracleInstruction<Address<"ALM1JSnEhc5PkNecbSZotgprBuJujL5objTbwGtpTgTd">, string, string, string, string, string, string, []>>;
|
|
4
|
+
//# sourceMappingURL=updateOracle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateOracle.d.ts","sourceRoot":"","sources":["../../src/instructions/updateOracle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAKnD,wBAAsB,6BAA6B,CACjD,UAAU,EAAE,OAAO,EACnB,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,EACpC,YAAY,CAAC,EAAE,OAAO,wKAavB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Address } from "@solana/addresses";
|
|
2
|
+
import { IntegrationConfigArgs } from "../generated";
|
|
3
|
+
export declare function getAssociatedTokenAddress(owner: Address, mint: Address, tokenProgram?: Address): Promise<Address>;
|
|
4
|
+
export declare const computeIntegrationHash: (config: IntegrationConfigArgs) => Uint8Array;
|
|
5
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/instructions/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA+C,MAAM,mBAAmB,CAAC;AAGzF,OAAO,EAA+B,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAOlF,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,OAAO,EACb,YAAY,GAAE,OAAkE,GAC/E,OAAO,CAAC,OAAO,CAAC,CAalB;AAQD,eAAO,MAAM,sBAAsB,GAC/B,QAAQ,qBAAqB,KAC5B,UAOF,CAAC"}
|
package/dist/pdas.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ export declare const deriveControllerPda: (id: number) => Promise<Address<string
|
|
|
5
5
|
export declare const deriveControllerAuthorityPda: (controller: Address) => Promise<Address<string>>;
|
|
6
6
|
export declare const derivePermissionPda: (controller: Address, authority: Address) => Promise<Address<string>>;
|
|
7
7
|
export declare const deriveReservePda: (controller: Address, mint: Address) => Promise<Address<string>>;
|
|
8
|
+
export declare const deriveOraclePda: (nonce: Address) => Promise<Address<string>>;
|
|
8
9
|
//# sourceMappingURL=pdas.d.ts.map
|
package/dist/pdas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdas.d.ts","sourceRoot":"","sources":["../src/pdas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,EAGR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,eAAO,MAAM,oBAAoB,GAC/B,YAAY,OAAO,EACnB,iBAAiB,kBAAkB,6BAWpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,IAAI,MAAM,6BAOnD,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAU,YAAY,OAAO,6BASrE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,YAAY,OAAO,EACnB,WAAW,OAAO,6BAcnB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,YAAY,OAAO,EAAE,MAAM,OAAO,6BAaxE,CAAC"}
|
|
1
|
+
{"version":3,"file":"pdas.d.ts","sourceRoot":"","sources":["../src/pdas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,EAGR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,eAAO,MAAM,oBAAoB,GAC/B,YAAY,OAAO,EACnB,iBAAiB,kBAAkB,6BAWpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,IAAI,MAAM,6BAOnD,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAU,YAAY,OAAO,6BASrE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,YAAY,OAAO,EACnB,WAAW,OAAO,6BAcnB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,YAAY,OAAO,EAAE,MAAM,OAAO,6BAaxE,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,OAAO,OAAO,6BASnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keel-fi/svm-alm-controller",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3-rc.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"files": [
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@solana/kit": "^3.0.3",
|
|
15
|
+
"keccak": "^3.0.4",
|
|
15
16
|
"ws": "^8.18.3"
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|