100x-sdk 1.0.2 → 1.0.3
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/100x-sdk.cjs.js +595 -6
- package/dist/100x-sdk.esm.js +598 -9
- package/dist/100x-sdk.js +598 -9
- package/dist/100x-sdk.js.map +1 -1
- package/package.json +1 -1
package/dist/100x-sdk.cjs.js
CHANGED
|
@@ -15730,6 +15730,7 @@ class TradingModule$1 {
|
|
|
15730
15730
|
mintAccount: mint,
|
|
15731
15731
|
curveAccount: accounts.curveAccount,
|
|
15732
15732
|
poolTokenAccount: accounts.poolTokenAccount,
|
|
15733
|
+
poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
|
|
15733
15734
|
poolSolAccount: accounts.poolSolAccount,
|
|
15734
15735
|
upOrderbook: upOrderbook,
|
|
15735
15736
|
downOrderbook: downOrderbook,
|
|
@@ -15866,6 +15867,7 @@ class TradingModule$1 {
|
|
|
15866
15867
|
mintAccount: mint,
|
|
15867
15868
|
curveAccount: accounts.curveAccount,
|
|
15868
15869
|
poolTokenAccount: accounts.poolTokenAccount,
|
|
15870
|
+
poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
|
|
15869
15871
|
poolSolAccount: accounts.poolSolAccount,
|
|
15870
15872
|
upOrderbook: upOrderbook,
|
|
15871
15873
|
downOrderbook: downOrderbook,
|
|
@@ -15987,6 +15989,7 @@ class TradingModule$1 {
|
|
|
15987
15989
|
mintAccount: mint,
|
|
15988
15990
|
curveAccount: accounts.curveAccount,
|
|
15989
15991
|
poolTokenAccount: accounts.poolTokenAccount,
|
|
15992
|
+
poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
|
|
15990
15993
|
poolSolAccount: accounts.poolSolAccount,
|
|
15991
15994
|
tokenProgram: TOKEN_PROGRAM_ID$2,
|
|
15992
15995
|
systemProgram: SystemProgram$3.programId,
|
|
@@ -16098,6 +16101,7 @@ class TradingModule$1 {
|
|
|
16098
16101
|
mintAccount: mint,
|
|
16099
16102
|
curveAccount: accounts.curveAccount,
|
|
16100
16103
|
poolTokenAccount: accounts.poolTokenAccount,
|
|
16104
|
+
poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
|
|
16101
16105
|
poolSolAccount: accounts.poolSolAccount,
|
|
16102
16106
|
tokenProgram: TOKEN_PROGRAM_ID$2,
|
|
16103
16107
|
systemProgram: SystemProgram$3.programId,
|
|
@@ -16241,6 +16245,7 @@ class TradingModule$1 {
|
|
|
16241
16245
|
mintAccount: mint,
|
|
16242
16246
|
curveAccount: accounts.curveAccount,
|
|
16243
16247
|
poolTokenAccount: accounts.poolTokenAccount,
|
|
16248
|
+
poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
|
|
16244
16249
|
poolSolAccount: accounts.poolSolAccount,
|
|
16245
16250
|
userSolAccount: userSolAccountPubkey, // 开仓用户的SOL账户 / User SOL account (must be order opener)
|
|
16246
16251
|
tokenProgram: TOKEN_PROGRAM_ID$2,
|
|
@@ -16390,6 +16395,7 @@ class TradingModule$1 {
|
|
|
16390
16395
|
mintAccount: mint,
|
|
16391
16396
|
curveAccount: accounts.curveAccount,
|
|
16392
16397
|
poolTokenAccount: accounts.poolTokenAccount,
|
|
16398
|
+
poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
|
|
16393
16399
|
poolSolAccount: accounts.poolSolAccount,
|
|
16394
16400
|
userSolAccount: userSolAccountPubkey, // 开仓用户的SOL账户 / User SOL account (must be order opener)
|
|
16395
16401
|
tokenProgram: TOKEN_PROGRAM_ID$2,
|
|
@@ -16451,6 +16457,12 @@ class TradingModule$1 {
|
|
|
16451
16457
|
this.sdk.programId
|
|
16452
16458
|
);
|
|
16453
16459
|
|
|
16460
|
+
// 计算借贷池专用代币账户 PDA
|
|
16461
|
+
const [poolBorrowTokenAccount] = PublicKey$6.findProgramAddressSync(
|
|
16462
|
+
[Buffer$6.from('pool_borrow_token'), mintAccount.toBuffer()],
|
|
16463
|
+
this.sdk.programId
|
|
16464
|
+
);
|
|
16465
|
+
|
|
16454
16466
|
// 计算池子 SOL 账户 PDA
|
|
16455
16467
|
const [poolSolAccount] = PublicKey$6.findProgramAddressSync(
|
|
16456
16468
|
[Buffer$6.from('pool_sol'), mintAccount.toBuffer()],
|
|
@@ -16460,6 +16472,7 @@ class TradingModule$1 {
|
|
|
16460
16472
|
return {
|
|
16461
16473
|
curveAccount,
|
|
16462
16474
|
poolTokenAccount,
|
|
16475
|
+
poolBorrowTokenAccount,
|
|
16463
16476
|
poolSolAccount
|
|
16464
16477
|
};
|
|
16465
16478
|
}
|
|
@@ -16600,6 +16613,15 @@ class TokenModule$1 {
|
|
|
16600
16613
|
this.sdk.programId
|
|
16601
16614
|
);
|
|
16602
16615
|
|
|
16616
|
+
// Calculate borrow pool token account address (pool_borrow_token)
|
|
16617
|
+
const [poolBorrowTokenAccount] = PublicKey$5.findProgramAddressSync(
|
|
16618
|
+
[
|
|
16619
|
+
Buffer$5.from("pool_borrow_token"),
|
|
16620
|
+
mint.publicKey.toBuffer(),
|
|
16621
|
+
],
|
|
16622
|
+
this.sdk.programId
|
|
16623
|
+
);
|
|
16624
|
+
|
|
16603
16625
|
// Calculate liquidity pool SOL account address (pool_sol)
|
|
16604
16626
|
const [poolSolAccount] = PublicKey$5.findProgramAddressSync(
|
|
16605
16627
|
[
|
|
@@ -16639,6 +16661,7 @@ class TokenModule$1 {
|
|
|
16639
16661
|
console.log('Calculated account addresses:');
|
|
16640
16662
|
console.log(' Borrowing liquidity pool account:', curveAccount.toString());
|
|
16641
16663
|
console.log(' Liquidity pool token account:', poolTokenAccount.toString());
|
|
16664
|
+
console.log(' Borrow pool token account:', poolBorrowTokenAccount.toString());
|
|
16642
16665
|
console.log(' Liquidity pool SOL account:', poolSolAccount.toString());
|
|
16643
16666
|
console.log(' Up orderbook:', upOrderbook.toString());
|
|
16644
16667
|
console.log(' Down orderbook:', downOrderbook.toString());
|
|
@@ -16672,6 +16695,7 @@ class TokenModule$1 {
|
|
|
16672
16695
|
mintAccount: mint.publicKey,
|
|
16673
16696
|
curveAccount: curveAccount,
|
|
16674
16697
|
poolTokenAccount: poolTokenAccount,
|
|
16698
|
+
poolBorrowTokenAccount: poolBorrowTokenAccount,
|
|
16675
16699
|
poolSolAccount: poolSolAccount,
|
|
16676
16700
|
upOrderbook: upOrderbook,
|
|
16677
16701
|
downOrderbook: downOrderbook,
|
|
@@ -16698,6 +16722,7 @@ class TokenModule$1 {
|
|
|
16698
16722
|
mint: mint.publicKey,
|
|
16699
16723
|
curveAccount,
|
|
16700
16724
|
poolTokenAccount,
|
|
16725
|
+
poolBorrowTokenAccount,
|
|
16701
16726
|
poolSolAccount,
|
|
16702
16727
|
upOrderbook,
|
|
16703
16728
|
downOrderbook,
|
|
@@ -16861,6 +16886,7 @@ class TokenModule$1 {
|
|
|
16861
16886
|
mintAccount: mintPubkey,
|
|
16862
16887
|
curveAccount: createResult.accounts.curveAccount,
|
|
16863
16888
|
poolTokenAccount: createResult.accounts.poolTokenAccount,
|
|
16889
|
+
poolBorrowTokenAccount: createResult.accounts.poolBorrowTokenAccount,
|
|
16864
16890
|
poolSolAccount: createResult.accounts.poolSolAccount,
|
|
16865
16891
|
upOrderbook: upOrderbook,
|
|
16866
16892
|
downOrderbook: downOrderbook,
|
|
@@ -48156,12 +48182,20 @@ class ChainModule$1 {
|
|
|
48156
48182
|
* @returns {string} returns.downOrderbook - Down orderbook (long orders) PDA address
|
|
48157
48183
|
* @returns {string} returns.creator - Token creator address, the wallet that created this token
|
|
48158
48184
|
* @returns {string} returns.poolTokenAccount - Pool token account address, stores tokens in the liquidity pool
|
|
48185
|
+
* @returns {string} returns.poolBorrowTokenAccount - Pool borrow token account address (PDA seed "pool_borrow_token"), stores tokens for the borrow pool
|
|
48159
48186
|
* @returns {string} returns.poolSolAccount - Pool SOL account address, stores native SOL in the liquidity pool
|
|
48160
48187
|
*
|
|
48188
|
+
* **Dynamic Liquidity Pool Parameters:**
|
|
48189
|
+
* @returns {bigint} returns.initialVirtualSol - Initial virtual SOL reserve (lamports), used for k value / price curve
|
|
48190
|
+
* @returns {bigint} returns.initialVirtualToken - Initial virtual Token reserve (smallest unit), used for k value / price curve
|
|
48191
|
+
* @returns {bigint} returns.initialBorrowTokenReserve - Borrow pool initial funding (smallest unit), never changes after creation. Borrowed out = initialBorrowTokenReserve - borrowTokenReserve
|
|
48192
|
+
* @returns {number} returns.poolType - Pool type (0: basic version, 1: advanced version)
|
|
48193
|
+
* @returns {number} returns.borrowPoolRatio - Borrow pool token ratio (5-30 means 5%-30%, basic version fixed at 20)
|
|
48194
|
+
*
|
|
48161
48195
|
* **Token Supply Information:**
|
|
48162
48196
|
* @returns {bigint} returns.totalSupply - Total token supply (smallest unit)
|
|
48163
48197
|
* @returns {number} returns.decimals - Token decimal places
|
|
48164
|
-
* @returns {bigint} returns.initialBorrowPool - Initial borrow pool size =
|
|
48198
|
+
* @returns {bigint} returns.initialBorrowPool - Initial borrow pool size (= initialBorrowTokenReserve from chain)
|
|
48165
48199
|
* @returns {bigint} returns.circulatingSupply - Circulating supply = totalSupply - borrowTokenReserve
|
|
48166
48200
|
*
|
|
48167
48201
|
* **Balance Information:**
|
|
@@ -48317,6 +48351,15 @@ class ChainModule$1 {
|
|
|
48317
48351
|
this.sdk.programId
|
|
48318
48352
|
);
|
|
48319
48353
|
|
|
48354
|
+
// 借贷池专用 token 账户 PDA(合约新增,seed = "pool_borrow_token")
|
|
48355
|
+
const [poolBorrowTokenAccountPDA] = PublicKey$3.findProgramAddressSync(
|
|
48356
|
+
[
|
|
48357
|
+
Buffer$3.from("pool_borrow_token"),
|
|
48358
|
+
mintPubkey.toBuffer()
|
|
48359
|
+
],
|
|
48360
|
+
this.sdk.programId
|
|
48361
|
+
);
|
|
48362
|
+
|
|
48320
48363
|
const [poolSolAccountPDA] = PublicKey$3.findProgramAddressSync(
|
|
48321
48364
|
[
|
|
48322
48365
|
Buffer$3.from("pool_sol"),
|
|
@@ -48329,6 +48372,7 @@ class ChainModule$1 {
|
|
|
48329
48372
|
let baseFeeRecipientBalance = 0;
|
|
48330
48373
|
let feeRecipientBalance = 0;
|
|
48331
48374
|
let poolTokenBalance = { value: { amount: '0' } };
|
|
48375
|
+
let poolBorrowTokenBalance = { value: { amount: '0' } };
|
|
48332
48376
|
let poolSolBalance = 0;
|
|
48333
48377
|
let tokenSupply = { value: { amount: '0', decimals: 0 } };
|
|
48334
48378
|
|
|
@@ -48337,12 +48381,14 @@ class ChainModule$1 {
|
|
|
48337
48381
|
baseFeeRecipientBalance,
|
|
48338
48382
|
feeRecipientBalance,
|
|
48339
48383
|
poolTokenBalance,
|
|
48384
|
+
poolBorrowTokenBalance,
|
|
48340
48385
|
poolSolBalance,
|
|
48341
48386
|
tokenSupply
|
|
48342
48387
|
] = await Promise.all([
|
|
48343
48388
|
this.sdk.connection.getBalance(decodedData.baseFeeRecipient),
|
|
48344
48389
|
this.sdk.connection.getBalance(decodedData.feeRecipient),
|
|
48345
48390
|
this.sdk.connection.getTokenAccountBalance(poolTokenAccountPDA).catch(() => ({ value: { amount: '0' } })),
|
|
48391
|
+
this.sdk.connection.getTokenAccountBalance(poolBorrowTokenAccountPDA).catch(() => ({ value: { amount: '0' } })),
|
|
48346
48392
|
this.sdk.connection.getBalance(poolSolAccountPDA),
|
|
48347
48393
|
this.sdk.connection.getTokenSupply(mintPubkey)
|
|
48348
48394
|
]);
|
|
@@ -48381,6 +48427,10 @@ class ChainModule$1 {
|
|
|
48381
48427
|
initialVirtualSol: BigInt(decodedData.initialVirtualSol.toString()), // u64, lamports
|
|
48382
48428
|
initialVirtualToken: BigInt(decodedData.initialVirtualToken.toString()), // u64, 最小单位
|
|
48383
48429
|
|
|
48430
|
+
// 借贷池初始资金(合约新增),创建后永不变
|
|
48431
|
+
// 已借出量 = initialBorrowTokenReserve - borrowTokenReserve
|
|
48432
|
+
initialBorrowTokenReserve: BigInt(decodedData.initialBorrowTokenReserve.toString()), // u64, 最小单位
|
|
48433
|
+
|
|
48384
48434
|
// === 第二阶段新增字段:高级版池子参数 ===
|
|
48385
48435
|
poolType: decodedData.poolType, // u8, 0=普通版, 1=高级版
|
|
48386
48436
|
borrowPoolRatio: decodedData.borrowPoolRatio, // u8, 5-30表示5%-30%
|
|
@@ -48388,7 +48438,8 @@ class ChainModule$1 {
|
|
|
48388
48438
|
// Token Supply 信息
|
|
48389
48439
|
totalSupply: BigInt(tokenSupply.value.amount),
|
|
48390
48440
|
decimals: tokenSupply.value.decimals,
|
|
48391
|
-
|
|
48441
|
+
// 借贷池初始总量,直接取链上字段(旧公式 totalSupply - initialVirtualToken 已废弃)
|
|
48442
|
+
initialBorrowPool: BigInt(decodedData.initialBorrowTokenReserve.toString()),
|
|
48392
48443
|
circulatingSupply: BigInt(decodedData.initialVirtualToken.toString())
|
|
48393
48444
|
+ (BigInt(tokenSupply.value.amount) - BigInt(decodedData.initialVirtualToken.toString()) - BigInt(decodedData.borrowTokenReserve.toString())),
|
|
48394
48445
|
|
|
@@ -48397,10 +48448,12 @@ class ChainModule$1 {
|
|
|
48397
48448
|
feeRecipientBalance: feeRecipientBalance, // Unit: lamports
|
|
48398
48449
|
|
|
48399
48450
|
// Pool account information
|
|
48400
|
-
poolTokenAccount: poolTokenAccountPDA.toString(),
|
|
48401
|
-
|
|
48402
|
-
|
|
48403
|
-
|
|
48451
|
+
poolTokenAccount: poolTokenAccountPDA.toString(), // Pool token account address
|
|
48452
|
+
poolBorrowTokenAccount: poolBorrowTokenAccountPDA.toString(), // Pool borrow token account address (新增)
|
|
48453
|
+
poolSolAccount: poolSolAccountPDA.toString(), // Pool SOL account address
|
|
48454
|
+
poolTokenBalance: BigInt(poolTokenBalance.value.amount), // Pool token balance
|
|
48455
|
+
poolBorrowTokenBalance: BigInt(poolBorrowTokenBalance.value.amount), // Pool borrow token balance (= borrowTokenReserve, 新增)
|
|
48456
|
+
poolSolBalance: poolSolBalance, // Pool SOL balance (lamports)
|
|
48404
48457
|
|
|
48405
48458
|
// Additional metadata
|
|
48406
48459
|
_metadata: {
|
|
@@ -50038,6 +50091,40 @@ var instructions$1 = [
|
|
|
50038
50091
|
]
|
|
50039
50092
|
}
|
|
50040
50093
|
},
|
|
50094
|
+
{
|
|
50095
|
+
name: "pool_borrow_token_account",
|
|
50096
|
+
writable: true,
|
|
50097
|
+
pda: {
|
|
50098
|
+
seeds: [
|
|
50099
|
+
{
|
|
50100
|
+
kind: "const",
|
|
50101
|
+
value: [
|
|
50102
|
+
112,
|
|
50103
|
+
111,
|
|
50104
|
+
111,
|
|
50105
|
+
108,
|
|
50106
|
+
95,
|
|
50107
|
+
98,
|
|
50108
|
+
111,
|
|
50109
|
+
114,
|
|
50110
|
+
114,
|
|
50111
|
+
111,
|
|
50112
|
+
119,
|
|
50113
|
+
95,
|
|
50114
|
+
116,
|
|
50115
|
+
111,
|
|
50116
|
+
107,
|
|
50117
|
+
101,
|
|
50118
|
+
110
|
|
50119
|
+
]
|
|
50120
|
+
},
|
|
50121
|
+
{
|
|
50122
|
+
kind: "account",
|
|
50123
|
+
path: "mint_account"
|
|
50124
|
+
}
|
|
50125
|
+
]
|
|
50126
|
+
}
|
|
50127
|
+
},
|
|
50041
50128
|
{
|
|
50042
50129
|
name: "pool_sol_account",
|
|
50043
50130
|
writable: true,
|
|
@@ -50365,6 +50452,40 @@ var instructions$1 = [
|
|
|
50365
50452
|
]
|
|
50366
50453
|
}
|
|
50367
50454
|
},
|
|
50455
|
+
{
|
|
50456
|
+
name: "pool_borrow_token_account",
|
|
50457
|
+
writable: true,
|
|
50458
|
+
pda: {
|
|
50459
|
+
seeds: [
|
|
50460
|
+
{
|
|
50461
|
+
kind: "const",
|
|
50462
|
+
value: [
|
|
50463
|
+
112,
|
|
50464
|
+
111,
|
|
50465
|
+
111,
|
|
50466
|
+
108,
|
|
50467
|
+
95,
|
|
50468
|
+
98,
|
|
50469
|
+
111,
|
|
50470
|
+
114,
|
|
50471
|
+
114,
|
|
50472
|
+
111,
|
|
50473
|
+
119,
|
|
50474
|
+
95,
|
|
50475
|
+
116,
|
|
50476
|
+
111,
|
|
50477
|
+
107,
|
|
50478
|
+
101,
|
|
50479
|
+
110
|
|
50480
|
+
]
|
|
50481
|
+
},
|
|
50482
|
+
{
|
|
50483
|
+
kind: "account",
|
|
50484
|
+
path: "mint_account"
|
|
50485
|
+
}
|
|
50486
|
+
]
|
|
50487
|
+
}
|
|
50488
|
+
},
|
|
50368
50489
|
{
|
|
50369
50490
|
name: "pool_sol_account",
|
|
50370
50491
|
writable: true,
|
|
@@ -50577,6 +50698,40 @@ var instructions$1 = [
|
|
|
50577
50698
|
]
|
|
50578
50699
|
}
|
|
50579
50700
|
},
|
|
50701
|
+
{
|
|
50702
|
+
name: "pool_borrow_token_account",
|
|
50703
|
+
writable: true,
|
|
50704
|
+
pda: {
|
|
50705
|
+
seeds: [
|
|
50706
|
+
{
|
|
50707
|
+
kind: "const",
|
|
50708
|
+
value: [
|
|
50709
|
+
112,
|
|
50710
|
+
111,
|
|
50711
|
+
111,
|
|
50712
|
+
108,
|
|
50713
|
+
95,
|
|
50714
|
+
98,
|
|
50715
|
+
111,
|
|
50716
|
+
114,
|
|
50717
|
+
114,
|
|
50718
|
+
111,
|
|
50719
|
+
119,
|
|
50720
|
+
95,
|
|
50721
|
+
116,
|
|
50722
|
+
111,
|
|
50723
|
+
107,
|
|
50724
|
+
101,
|
|
50725
|
+
110
|
|
50726
|
+
]
|
|
50727
|
+
},
|
|
50728
|
+
{
|
|
50729
|
+
kind: "account",
|
|
50730
|
+
path: "mint_account"
|
|
50731
|
+
}
|
|
50732
|
+
]
|
|
50733
|
+
}
|
|
50734
|
+
},
|
|
50580
50735
|
{
|
|
50581
50736
|
name: "pool_sol_account",
|
|
50582
50737
|
writable: true,
|
|
@@ -51017,6 +51172,40 @@ var instructions$1 = [
|
|
|
51017
51172
|
]
|
|
51018
51173
|
}
|
|
51019
51174
|
},
|
|
51175
|
+
{
|
|
51176
|
+
name: "pool_borrow_token_account",
|
|
51177
|
+
writable: true,
|
|
51178
|
+
pda: {
|
|
51179
|
+
seeds: [
|
|
51180
|
+
{
|
|
51181
|
+
kind: "const",
|
|
51182
|
+
value: [
|
|
51183
|
+
112,
|
|
51184
|
+
111,
|
|
51185
|
+
111,
|
|
51186
|
+
108,
|
|
51187
|
+
95,
|
|
51188
|
+
98,
|
|
51189
|
+
111,
|
|
51190
|
+
114,
|
|
51191
|
+
114,
|
|
51192
|
+
111,
|
|
51193
|
+
119,
|
|
51194
|
+
95,
|
|
51195
|
+
116,
|
|
51196
|
+
111,
|
|
51197
|
+
107,
|
|
51198
|
+
101,
|
|
51199
|
+
110
|
|
51200
|
+
]
|
|
51201
|
+
},
|
|
51202
|
+
{
|
|
51203
|
+
kind: "account",
|
|
51204
|
+
path: "mint_account"
|
|
51205
|
+
}
|
|
51206
|
+
]
|
|
51207
|
+
}
|
|
51208
|
+
},
|
|
51020
51209
|
{
|
|
51021
51210
|
name: "pool_sol_account",
|
|
51022
51211
|
writable: true,
|
|
@@ -51252,6 +51441,40 @@ var instructions$1 = [
|
|
|
51252
51441
|
]
|
|
51253
51442
|
}
|
|
51254
51443
|
},
|
|
51444
|
+
{
|
|
51445
|
+
name: "pool_borrow_token_account",
|
|
51446
|
+
writable: true,
|
|
51447
|
+
pda: {
|
|
51448
|
+
seeds: [
|
|
51449
|
+
{
|
|
51450
|
+
kind: "const",
|
|
51451
|
+
value: [
|
|
51452
|
+
112,
|
|
51453
|
+
111,
|
|
51454
|
+
111,
|
|
51455
|
+
108,
|
|
51456
|
+
95,
|
|
51457
|
+
98,
|
|
51458
|
+
111,
|
|
51459
|
+
114,
|
|
51460
|
+
114,
|
|
51461
|
+
111,
|
|
51462
|
+
119,
|
|
51463
|
+
95,
|
|
51464
|
+
116,
|
|
51465
|
+
111,
|
|
51466
|
+
107,
|
|
51467
|
+
101,
|
|
51468
|
+
110
|
|
51469
|
+
]
|
|
51470
|
+
},
|
|
51471
|
+
{
|
|
51472
|
+
kind: "account",
|
|
51473
|
+
path: "mint_account"
|
|
51474
|
+
}
|
|
51475
|
+
]
|
|
51476
|
+
}
|
|
51477
|
+
},
|
|
51255
51478
|
{
|
|
51256
51479
|
name: "pool_sol_account",
|
|
51257
51480
|
writable: true,
|
|
@@ -51464,6 +51687,40 @@ var instructions$1 = [
|
|
|
51464
51687
|
]
|
|
51465
51688
|
}
|
|
51466
51689
|
},
|
|
51690
|
+
{
|
|
51691
|
+
name: "pool_borrow_token_account",
|
|
51692
|
+
writable: true,
|
|
51693
|
+
pda: {
|
|
51694
|
+
seeds: [
|
|
51695
|
+
{
|
|
51696
|
+
kind: "const",
|
|
51697
|
+
value: [
|
|
51698
|
+
112,
|
|
51699
|
+
111,
|
|
51700
|
+
111,
|
|
51701
|
+
108,
|
|
51702
|
+
95,
|
|
51703
|
+
98,
|
|
51704
|
+
111,
|
|
51705
|
+
114,
|
|
51706
|
+
114,
|
|
51707
|
+
111,
|
|
51708
|
+
119,
|
|
51709
|
+
95,
|
|
51710
|
+
116,
|
|
51711
|
+
111,
|
|
51712
|
+
107,
|
|
51713
|
+
101,
|
|
51714
|
+
110
|
|
51715
|
+
]
|
|
51716
|
+
},
|
|
51717
|
+
{
|
|
51718
|
+
kind: "account",
|
|
51719
|
+
path: "mint_account"
|
|
51720
|
+
}
|
|
51721
|
+
]
|
|
51722
|
+
}
|
|
51723
|
+
},
|
|
51467
51724
|
{
|
|
51468
51725
|
name: "pool_sol_account",
|
|
51469
51726
|
writable: true,
|
|
@@ -51791,6 +52048,40 @@ var instructions$1 = [
|
|
|
51791
52048
|
]
|
|
51792
52049
|
}
|
|
51793
52050
|
},
|
|
52051
|
+
{
|
|
52052
|
+
name: "pool_borrow_token_account",
|
|
52053
|
+
writable: true,
|
|
52054
|
+
pda: {
|
|
52055
|
+
seeds: [
|
|
52056
|
+
{
|
|
52057
|
+
kind: "const",
|
|
52058
|
+
value: [
|
|
52059
|
+
112,
|
|
52060
|
+
111,
|
|
52061
|
+
111,
|
|
52062
|
+
108,
|
|
52063
|
+
95,
|
|
52064
|
+
98,
|
|
52065
|
+
111,
|
|
52066
|
+
114,
|
|
52067
|
+
114,
|
|
52068
|
+
111,
|
|
52069
|
+
119,
|
|
52070
|
+
95,
|
|
52071
|
+
116,
|
|
52072
|
+
111,
|
|
52073
|
+
107,
|
|
52074
|
+
101,
|
|
52075
|
+
110
|
|
52076
|
+
]
|
|
52077
|
+
},
|
|
52078
|
+
{
|
|
52079
|
+
kind: "account",
|
|
52080
|
+
path: "mint_account"
|
|
52081
|
+
}
|
|
52082
|
+
]
|
|
52083
|
+
}
|
|
52084
|
+
},
|
|
51794
52085
|
{
|
|
51795
52086
|
name: "pool_sol_account",
|
|
51796
52087
|
writable: true,
|
|
@@ -52960,6 +53251,16 @@ var types$1 = [
|
|
|
52960
53251
|
],
|
|
52961
53252
|
type: "u64"
|
|
52962
53253
|
},
|
|
53254
|
+
{
|
|
53255
|
+
name: "initial_borrow_token_reserve",
|
|
53256
|
+
docs: [
|
|
53257
|
+
"Borrow pool initial funding (initial token amount minted into borrow pool at creation)",
|
|
53258
|
+
"Unlike borrow_token_reserve which changes in real time with borrow/repay,",
|
|
53259
|
+
"this field never changes after creation; used by external parties to compute",
|
|
53260
|
+
"\"borrowed out = initial funding - current available reserve\"."
|
|
53261
|
+
],
|
|
53262
|
+
type: "u64"
|
|
53263
|
+
},
|
|
52963
53264
|
{
|
|
52964
53265
|
name: "pool_type",
|
|
52965
53266
|
docs: [
|
|
@@ -53086,6 +53387,18 @@ var types$1 = [
|
|
|
53086
53387
|
name: "mint_account",
|
|
53087
53388
|
type: "pubkey"
|
|
53088
53389
|
},
|
|
53390
|
+
{
|
|
53391
|
+
name: "is_buy",
|
|
53392
|
+
type: "bool"
|
|
53393
|
+
},
|
|
53394
|
+
{
|
|
53395
|
+
name: "token_amount",
|
|
53396
|
+
type: "u64"
|
|
53397
|
+
},
|
|
53398
|
+
{
|
|
53399
|
+
name: "sol_amount",
|
|
53400
|
+
type: "u64"
|
|
53401
|
+
},
|
|
53089
53402
|
{
|
|
53090
53403
|
name: "order_id",
|
|
53091
53404
|
type: "u64"
|
|
@@ -53428,6 +53741,10 @@ var types$1 = [
|
|
|
53428
53741
|
name: "pool_token_account",
|
|
53429
53742
|
type: "pubkey"
|
|
53430
53743
|
},
|
|
53744
|
+
{
|
|
53745
|
+
name: "pool_borrow_token_account",
|
|
53746
|
+
type: "pubkey"
|
|
53747
|
+
},
|
|
53431
53748
|
{
|
|
53432
53749
|
name: "pool_sol_account",
|
|
53433
53750
|
type: "pubkey"
|
|
@@ -53488,6 +53805,10 @@ var types$1 = [
|
|
|
53488
53805
|
name: "initial_virtual_token",
|
|
53489
53806
|
type: "u64"
|
|
53490
53807
|
},
|
|
53808
|
+
{
|
|
53809
|
+
name: "initial_borrow_token_reserve",
|
|
53810
|
+
type: "u64"
|
|
53811
|
+
},
|
|
53491
53812
|
{
|
|
53492
53813
|
name: "pool_type",
|
|
53493
53814
|
type: "u8"
|
|
@@ -53784,6 +54105,40 @@ var instructions = [
|
|
|
53784
54105
|
]
|
|
53785
54106
|
}
|
|
53786
54107
|
},
|
|
54108
|
+
{
|
|
54109
|
+
name: "pool_borrow_token_account",
|
|
54110
|
+
writable: true,
|
|
54111
|
+
pda: {
|
|
54112
|
+
seeds: [
|
|
54113
|
+
{
|
|
54114
|
+
kind: "const",
|
|
54115
|
+
value: [
|
|
54116
|
+
112,
|
|
54117
|
+
111,
|
|
54118
|
+
111,
|
|
54119
|
+
108,
|
|
54120
|
+
95,
|
|
54121
|
+
98,
|
|
54122
|
+
111,
|
|
54123
|
+
114,
|
|
54124
|
+
114,
|
|
54125
|
+
111,
|
|
54126
|
+
119,
|
|
54127
|
+
95,
|
|
54128
|
+
116,
|
|
54129
|
+
111,
|
|
54130
|
+
107,
|
|
54131
|
+
101,
|
|
54132
|
+
110
|
|
54133
|
+
]
|
|
54134
|
+
},
|
|
54135
|
+
{
|
|
54136
|
+
kind: "account",
|
|
54137
|
+
path: "mint_account"
|
|
54138
|
+
}
|
|
54139
|
+
]
|
|
54140
|
+
}
|
|
54141
|
+
},
|
|
53787
54142
|
{
|
|
53788
54143
|
name: "pool_sol_account",
|
|
53789
54144
|
writable: true,
|
|
@@ -54111,6 +54466,40 @@ var instructions = [
|
|
|
54111
54466
|
]
|
|
54112
54467
|
}
|
|
54113
54468
|
},
|
|
54469
|
+
{
|
|
54470
|
+
name: "pool_borrow_token_account",
|
|
54471
|
+
writable: true,
|
|
54472
|
+
pda: {
|
|
54473
|
+
seeds: [
|
|
54474
|
+
{
|
|
54475
|
+
kind: "const",
|
|
54476
|
+
value: [
|
|
54477
|
+
112,
|
|
54478
|
+
111,
|
|
54479
|
+
111,
|
|
54480
|
+
108,
|
|
54481
|
+
95,
|
|
54482
|
+
98,
|
|
54483
|
+
111,
|
|
54484
|
+
114,
|
|
54485
|
+
114,
|
|
54486
|
+
111,
|
|
54487
|
+
119,
|
|
54488
|
+
95,
|
|
54489
|
+
116,
|
|
54490
|
+
111,
|
|
54491
|
+
107,
|
|
54492
|
+
101,
|
|
54493
|
+
110
|
|
54494
|
+
]
|
|
54495
|
+
},
|
|
54496
|
+
{
|
|
54497
|
+
kind: "account",
|
|
54498
|
+
path: "mint_account"
|
|
54499
|
+
}
|
|
54500
|
+
]
|
|
54501
|
+
}
|
|
54502
|
+
},
|
|
54114
54503
|
{
|
|
54115
54504
|
name: "pool_sol_account",
|
|
54116
54505
|
writable: true,
|
|
@@ -54323,6 +54712,40 @@ var instructions = [
|
|
|
54323
54712
|
]
|
|
54324
54713
|
}
|
|
54325
54714
|
},
|
|
54715
|
+
{
|
|
54716
|
+
name: "pool_borrow_token_account",
|
|
54717
|
+
writable: true,
|
|
54718
|
+
pda: {
|
|
54719
|
+
seeds: [
|
|
54720
|
+
{
|
|
54721
|
+
kind: "const",
|
|
54722
|
+
value: [
|
|
54723
|
+
112,
|
|
54724
|
+
111,
|
|
54725
|
+
111,
|
|
54726
|
+
108,
|
|
54727
|
+
95,
|
|
54728
|
+
98,
|
|
54729
|
+
111,
|
|
54730
|
+
114,
|
|
54731
|
+
114,
|
|
54732
|
+
111,
|
|
54733
|
+
119,
|
|
54734
|
+
95,
|
|
54735
|
+
116,
|
|
54736
|
+
111,
|
|
54737
|
+
107,
|
|
54738
|
+
101,
|
|
54739
|
+
110
|
|
54740
|
+
]
|
|
54741
|
+
},
|
|
54742
|
+
{
|
|
54743
|
+
kind: "account",
|
|
54744
|
+
path: "mint_account"
|
|
54745
|
+
}
|
|
54746
|
+
]
|
|
54747
|
+
}
|
|
54748
|
+
},
|
|
54326
54749
|
{
|
|
54327
54750
|
name: "pool_sol_account",
|
|
54328
54751
|
writable: true,
|
|
@@ -54763,6 +55186,40 @@ var instructions = [
|
|
|
54763
55186
|
]
|
|
54764
55187
|
}
|
|
54765
55188
|
},
|
|
55189
|
+
{
|
|
55190
|
+
name: "pool_borrow_token_account",
|
|
55191
|
+
writable: true,
|
|
55192
|
+
pda: {
|
|
55193
|
+
seeds: [
|
|
55194
|
+
{
|
|
55195
|
+
kind: "const",
|
|
55196
|
+
value: [
|
|
55197
|
+
112,
|
|
55198
|
+
111,
|
|
55199
|
+
111,
|
|
55200
|
+
108,
|
|
55201
|
+
95,
|
|
55202
|
+
98,
|
|
55203
|
+
111,
|
|
55204
|
+
114,
|
|
55205
|
+
114,
|
|
55206
|
+
111,
|
|
55207
|
+
119,
|
|
55208
|
+
95,
|
|
55209
|
+
116,
|
|
55210
|
+
111,
|
|
55211
|
+
107,
|
|
55212
|
+
101,
|
|
55213
|
+
110
|
|
55214
|
+
]
|
|
55215
|
+
},
|
|
55216
|
+
{
|
|
55217
|
+
kind: "account",
|
|
55218
|
+
path: "mint_account"
|
|
55219
|
+
}
|
|
55220
|
+
]
|
|
55221
|
+
}
|
|
55222
|
+
},
|
|
54766
55223
|
{
|
|
54767
55224
|
name: "pool_sol_account",
|
|
54768
55225
|
writable: true,
|
|
@@ -54998,6 +55455,40 @@ var instructions = [
|
|
|
54998
55455
|
]
|
|
54999
55456
|
}
|
|
55000
55457
|
},
|
|
55458
|
+
{
|
|
55459
|
+
name: "pool_borrow_token_account",
|
|
55460
|
+
writable: true,
|
|
55461
|
+
pda: {
|
|
55462
|
+
seeds: [
|
|
55463
|
+
{
|
|
55464
|
+
kind: "const",
|
|
55465
|
+
value: [
|
|
55466
|
+
112,
|
|
55467
|
+
111,
|
|
55468
|
+
111,
|
|
55469
|
+
108,
|
|
55470
|
+
95,
|
|
55471
|
+
98,
|
|
55472
|
+
111,
|
|
55473
|
+
114,
|
|
55474
|
+
114,
|
|
55475
|
+
111,
|
|
55476
|
+
119,
|
|
55477
|
+
95,
|
|
55478
|
+
116,
|
|
55479
|
+
111,
|
|
55480
|
+
107,
|
|
55481
|
+
101,
|
|
55482
|
+
110
|
|
55483
|
+
]
|
|
55484
|
+
},
|
|
55485
|
+
{
|
|
55486
|
+
kind: "account",
|
|
55487
|
+
path: "mint_account"
|
|
55488
|
+
}
|
|
55489
|
+
]
|
|
55490
|
+
}
|
|
55491
|
+
},
|
|
55001
55492
|
{
|
|
55002
55493
|
name: "pool_sol_account",
|
|
55003
55494
|
writable: true,
|
|
@@ -55210,6 +55701,40 @@ var instructions = [
|
|
|
55210
55701
|
]
|
|
55211
55702
|
}
|
|
55212
55703
|
},
|
|
55704
|
+
{
|
|
55705
|
+
name: "pool_borrow_token_account",
|
|
55706
|
+
writable: true,
|
|
55707
|
+
pda: {
|
|
55708
|
+
seeds: [
|
|
55709
|
+
{
|
|
55710
|
+
kind: "const",
|
|
55711
|
+
value: [
|
|
55712
|
+
112,
|
|
55713
|
+
111,
|
|
55714
|
+
111,
|
|
55715
|
+
108,
|
|
55716
|
+
95,
|
|
55717
|
+
98,
|
|
55718
|
+
111,
|
|
55719
|
+
114,
|
|
55720
|
+
114,
|
|
55721
|
+
111,
|
|
55722
|
+
119,
|
|
55723
|
+
95,
|
|
55724
|
+
116,
|
|
55725
|
+
111,
|
|
55726
|
+
107,
|
|
55727
|
+
101,
|
|
55728
|
+
110
|
|
55729
|
+
]
|
|
55730
|
+
},
|
|
55731
|
+
{
|
|
55732
|
+
kind: "account",
|
|
55733
|
+
path: "mint_account"
|
|
55734
|
+
}
|
|
55735
|
+
]
|
|
55736
|
+
}
|
|
55737
|
+
},
|
|
55213
55738
|
{
|
|
55214
55739
|
name: "pool_sol_account",
|
|
55215
55740
|
writable: true,
|
|
@@ -55537,6 +56062,40 @@ var instructions = [
|
|
|
55537
56062
|
]
|
|
55538
56063
|
}
|
|
55539
56064
|
},
|
|
56065
|
+
{
|
|
56066
|
+
name: "pool_borrow_token_account",
|
|
56067
|
+
writable: true,
|
|
56068
|
+
pda: {
|
|
56069
|
+
seeds: [
|
|
56070
|
+
{
|
|
56071
|
+
kind: "const",
|
|
56072
|
+
value: [
|
|
56073
|
+
112,
|
|
56074
|
+
111,
|
|
56075
|
+
111,
|
|
56076
|
+
108,
|
|
56077
|
+
95,
|
|
56078
|
+
98,
|
|
56079
|
+
111,
|
|
56080
|
+
114,
|
|
56081
|
+
114,
|
|
56082
|
+
111,
|
|
56083
|
+
119,
|
|
56084
|
+
95,
|
|
56085
|
+
116,
|
|
56086
|
+
111,
|
|
56087
|
+
107,
|
|
56088
|
+
101,
|
|
56089
|
+
110
|
|
56090
|
+
]
|
|
56091
|
+
},
|
|
56092
|
+
{
|
|
56093
|
+
kind: "account",
|
|
56094
|
+
path: "mint_account"
|
|
56095
|
+
}
|
|
56096
|
+
]
|
|
56097
|
+
}
|
|
56098
|
+
},
|
|
55540
56099
|
{
|
|
55541
56100
|
name: "pool_sol_account",
|
|
55542
56101
|
writable: true,
|
|
@@ -56706,6 +57265,16 @@ var types = [
|
|
|
56706
57265
|
],
|
|
56707
57266
|
type: "u64"
|
|
56708
57267
|
},
|
|
57268
|
+
{
|
|
57269
|
+
name: "initial_borrow_token_reserve",
|
|
57270
|
+
docs: [
|
|
57271
|
+
"Borrow pool initial funding (initial token amount minted into borrow pool at creation)",
|
|
57272
|
+
"Unlike borrow_token_reserve which changes in real time with borrow/repay,",
|
|
57273
|
+
"this field never changes after creation; used by external parties to compute",
|
|
57274
|
+
"\"borrowed out = initial funding - current available reserve\"."
|
|
57275
|
+
],
|
|
57276
|
+
type: "u64"
|
|
57277
|
+
},
|
|
56709
57278
|
{
|
|
56710
57279
|
name: "pool_type",
|
|
56711
57280
|
docs: [
|
|
@@ -56832,6 +57401,18 @@ var types = [
|
|
|
56832
57401
|
name: "mint_account",
|
|
56833
57402
|
type: "pubkey"
|
|
56834
57403
|
},
|
|
57404
|
+
{
|
|
57405
|
+
name: "is_buy",
|
|
57406
|
+
type: "bool"
|
|
57407
|
+
},
|
|
57408
|
+
{
|
|
57409
|
+
name: "token_amount",
|
|
57410
|
+
type: "u64"
|
|
57411
|
+
},
|
|
57412
|
+
{
|
|
57413
|
+
name: "sol_amount",
|
|
57414
|
+
type: "u64"
|
|
57415
|
+
},
|
|
56835
57416
|
{
|
|
56836
57417
|
name: "order_id",
|
|
56837
57418
|
type: "u64"
|
|
@@ -57174,6 +57755,10 @@ var types = [
|
|
|
57174
57755
|
name: "pool_token_account",
|
|
57175
57756
|
type: "pubkey"
|
|
57176
57757
|
},
|
|
57758
|
+
{
|
|
57759
|
+
name: "pool_borrow_token_account",
|
|
57760
|
+
type: "pubkey"
|
|
57761
|
+
},
|
|
57177
57762
|
{
|
|
57178
57763
|
name: "pool_sol_account",
|
|
57179
57764
|
type: "pubkey"
|
|
@@ -57234,6 +57819,10 @@ var types = [
|
|
|
57234
57819
|
name: "initial_virtual_token",
|
|
57235
57820
|
type: "u64"
|
|
57236
57821
|
},
|
|
57822
|
+
{
|
|
57823
|
+
name: "initial_borrow_token_reserve",
|
|
57824
|
+
type: "u64"
|
|
57825
|
+
},
|
|
57237
57826
|
{
|
|
57238
57827
|
name: "pool_type",
|
|
57239
57828
|
type: "u8"
|