100x-sdk 1.0.1 → 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.js CHANGED
@@ -20409,6 +20409,7 @@
20409
20409
  mintAccount: mint,
20410
20410
  curveAccount: accounts.curveAccount,
20411
20411
  poolTokenAccount: accounts.poolTokenAccount,
20412
+ poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
20412
20413
  poolSolAccount: accounts.poolSolAccount,
20413
20414
  upOrderbook: upOrderbook,
20414
20415
  downOrderbook: downOrderbook,
@@ -20545,6 +20546,7 @@
20545
20546
  mintAccount: mint,
20546
20547
  curveAccount: accounts.curveAccount,
20547
20548
  poolTokenAccount: accounts.poolTokenAccount,
20549
+ poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
20548
20550
  poolSolAccount: accounts.poolSolAccount,
20549
20551
  upOrderbook: upOrderbook,
20550
20552
  downOrderbook: downOrderbook,
@@ -20666,6 +20668,7 @@
20666
20668
  mintAccount: mint,
20667
20669
  curveAccount: accounts.curveAccount,
20668
20670
  poolTokenAccount: accounts.poolTokenAccount,
20671
+ poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
20669
20672
  poolSolAccount: accounts.poolSolAccount,
20670
20673
  tokenProgram: TOKEN_PROGRAM_ID$2,
20671
20674
  systemProgram: SystemProgram$3.programId,
@@ -20777,6 +20780,7 @@
20777
20780
  mintAccount: mint,
20778
20781
  curveAccount: accounts.curveAccount,
20779
20782
  poolTokenAccount: accounts.poolTokenAccount,
20783
+ poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
20780
20784
  poolSolAccount: accounts.poolSolAccount,
20781
20785
  tokenProgram: TOKEN_PROGRAM_ID$2,
20782
20786
  systemProgram: SystemProgram$3.programId,
@@ -20920,6 +20924,7 @@
20920
20924
  mintAccount: mint,
20921
20925
  curveAccount: accounts.curveAccount,
20922
20926
  poolTokenAccount: accounts.poolTokenAccount,
20927
+ poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
20923
20928
  poolSolAccount: accounts.poolSolAccount,
20924
20929
  userSolAccount: userSolAccountPubkey, // 开仓用户的SOL账户 / User SOL account (must be order opener)
20925
20930
  tokenProgram: TOKEN_PROGRAM_ID$2,
@@ -21069,6 +21074,7 @@
21069
21074
  mintAccount: mint,
21070
21075
  curveAccount: accounts.curveAccount,
21071
21076
  poolTokenAccount: accounts.poolTokenAccount,
21077
+ poolBorrowTokenAccount: accounts.poolBorrowTokenAccount,
21072
21078
  poolSolAccount: accounts.poolSolAccount,
21073
21079
  userSolAccount: userSolAccountPubkey, // 开仓用户的SOL账户 / User SOL account (must be order opener)
21074
21080
  tokenProgram: TOKEN_PROGRAM_ID$2,
@@ -21130,6 +21136,12 @@
21130
21136
  this.sdk.programId
21131
21137
  );
21132
21138
 
21139
+ // 计算借贷池专用代币账户 PDA
21140
+ const [poolBorrowTokenAccount] = PublicKey$6.findProgramAddressSync(
21141
+ [Buffer$6.from('pool_borrow_token'), mintAccount.toBuffer()],
21142
+ this.sdk.programId
21143
+ );
21144
+
21133
21145
  // 计算池子 SOL 账户 PDA
21134
21146
  const [poolSolAccount] = PublicKey$6.findProgramAddressSync(
21135
21147
  [Buffer$6.from('pool_sol'), mintAccount.toBuffer()],
@@ -21139,6 +21151,7 @@
21139
21151
  return {
21140
21152
  curveAccount,
21141
21153
  poolTokenAccount,
21154
+ poolBorrowTokenAccount,
21142
21155
  poolSolAccount
21143
21156
  };
21144
21157
  }
@@ -21279,6 +21292,15 @@
21279
21292
  this.sdk.programId
21280
21293
  );
21281
21294
 
21295
+ // Calculate borrow pool token account address (pool_borrow_token)
21296
+ const [poolBorrowTokenAccount] = PublicKey$5.findProgramAddressSync(
21297
+ [
21298
+ Buffer$5.from("pool_borrow_token"),
21299
+ mint.publicKey.toBuffer(),
21300
+ ],
21301
+ this.sdk.programId
21302
+ );
21303
+
21282
21304
  // Calculate liquidity pool SOL account address (pool_sol)
21283
21305
  const [poolSolAccount] = PublicKey$5.findProgramAddressSync(
21284
21306
  [
@@ -21318,6 +21340,7 @@
21318
21340
  console.log('Calculated account addresses:');
21319
21341
  console.log(' Borrowing liquidity pool account:', curveAccount.toString());
21320
21342
  console.log(' Liquidity pool token account:', poolTokenAccount.toString());
21343
+ console.log(' Borrow pool token account:', poolBorrowTokenAccount.toString());
21321
21344
  console.log(' Liquidity pool SOL account:', poolSolAccount.toString());
21322
21345
  console.log(' Up orderbook:', upOrderbook.toString());
21323
21346
  console.log(' Down orderbook:', downOrderbook.toString());
@@ -21351,6 +21374,7 @@
21351
21374
  mintAccount: mint.publicKey,
21352
21375
  curveAccount: curveAccount,
21353
21376
  poolTokenAccount: poolTokenAccount,
21377
+ poolBorrowTokenAccount: poolBorrowTokenAccount,
21354
21378
  poolSolAccount: poolSolAccount,
21355
21379
  upOrderbook: upOrderbook,
21356
21380
  downOrderbook: downOrderbook,
@@ -21377,6 +21401,7 @@
21377
21401
  mint: mint.publicKey,
21378
21402
  curveAccount,
21379
21403
  poolTokenAccount,
21404
+ poolBorrowTokenAccount,
21380
21405
  poolSolAccount,
21381
21406
  upOrderbook,
21382
21407
  downOrderbook,
@@ -21540,6 +21565,7 @@
21540
21565
  mintAccount: mintPubkey,
21541
21566
  curveAccount: createResult.accounts.curveAccount,
21542
21567
  poolTokenAccount: createResult.accounts.poolTokenAccount,
21568
+ poolBorrowTokenAccount: createResult.accounts.poolBorrowTokenAccount,
21543
21569
  poolSolAccount: createResult.accounts.poolSolAccount,
21544
21570
  upOrderbook: upOrderbook,
21545
21571
  downOrderbook: downOrderbook,
@@ -36806,12 +36832,20 @@
36806
36832
  * @returns {string} returns.downOrderbook - Down orderbook (long orders) PDA address
36807
36833
  * @returns {string} returns.creator - Token creator address, the wallet that created this token
36808
36834
  * @returns {string} returns.poolTokenAccount - Pool token account address, stores tokens in the liquidity pool
36835
+ * @returns {string} returns.poolBorrowTokenAccount - Pool borrow token account address (PDA seed "pool_borrow_token"), stores tokens for the borrow pool
36809
36836
  * @returns {string} returns.poolSolAccount - Pool SOL account address, stores native SOL in the liquidity pool
36810
36837
  *
36838
+ * **Dynamic Liquidity Pool Parameters:**
36839
+ * @returns {bigint} returns.initialVirtualSol - Initial virtual SOL reserve (lamports), used for k value / price curve
36840
+ * @returns {bigint} returns.initialVirtualToken - Initial virtual Token reserve (smallest unit), used for k value / price curve
36841
+ * @returns {bigint} returns.initialBorrowTokenReserve - Borrow pool initial funding (smallest unit), never changes after creation. Borrowed out = initialBorrowTokenReserve - borrowTokenReserve
36842
+ * @returns {number} returns.poolType - Pool type (0: basic version, 1: advanced version)
36843
+ * @returns {number} returns.borrowPoolRatio - Borrow pool token ratio (5-30 means 5%-30%, basic version fixed at 20)
36844
+ *
36811
36845
  * **Token Supply Information:**
36812
36846
  * @returns {bigint} returns.totalSupply - Total token supply (smallest unit)
36813
36847
  * @returns {number} returns.decimals - Token decimal places
36814
- * @returns {bigint} returns.initialBorrowPool - Initial borrow pool size = totalSupply - initialVirtualToken
36848
+ * @returns {bigint} returns.initialBorrowPool - Initial borrow pool size (= initialBorrowTokenReserve from chain)
36815
36849
  * @returns {bigint} returns.circulatingSupply - Circulating supply = totalSupply - borrowTokenReserve
36816
36850
  *
36817
36851
  * **Balance Information:**
@@ -36967,6 +37001,15 @@
36967
37001
  this.sdk.programId
36968
37002
  );
36969
37003
 
37004
+ // 借贷池专用 token 账户 PDA(合约新增,seed = "pool_borrow_token")
37005
+ const [poolBorrowTokenAccountPDA] = PublicKey$3.findProgramAddressSync(
37006
+ [
37007
+ Buffer$3.from("pool_borrow_token"),
37008
+ mintPubkey.toBuffer()
37009
+ ],
37010
+ this.sdk.programId
37011
+ );
37012
+
36970
37013
  const [poolSolAccountPDA] = PublicKey$3.findProgramAddressSync(
36971
37014
  [
36972
37015
  Buffer$3.from("pool_sol"),
@@ -36979,6 +37022,7 @@
36979
37022
  let baseFeeRecipientBalance = 0;
36980
37023
  let feeRecipientBalance = 0;
36981
37024
  let poolTokenBalance = { value: { amount: '0' } };
37025
+ let poolBorrowTokenBalance = { value: { amount: '0' } };
36982
37026
  let poolSolBalance = 0;
36983
37027
  let tokenSupply = { value: { amount: '0', decimals: 0 } };
36984
37028
 
@@ -36987,12 +37031,14 @@
36987
37031
  baseFeeRecipientBalance,
36988
37032
  feeRecipientBalance,
36989
37033
  poolTokenBalance,
37034
+ poolBorrowTokenBalance,
36990
37035
  poolSolBalance,
36991
37036
  tokenSupply
36992
37037
  ] = await Promise.all([
36993
37038
  this.sdk.connection.getBalance(decodedData.baseFeeRecipient),
36994
37039
  this.sdk.connection.getBalance(decodedData.feeRecipient),
36995
37040
  this.sdk.connection.getTokenAccountBalance(poolTokenAccountPDA).catch(() => ({ value: { amount: '0' } })),
37041
+ this.sdk.connection.getTokenAccountBalance(poolBorrowTokenAccountPDA).catch(() => ({ value: { amount: '0' } })),
36996
37042
  this.sdk.connection.getBalance(poolSolAccountPDA),
36997
37043
  this.sdk.connection.getTokenSupply(mintPubkey)
36998
37044
  ]);
@@ -37031,6 +37077,10 @@
37031
37077
  initialVirtualSol: BigInt(decodedData.initialVirtualSol.toString()), // u64, lamports
37032
37078
  initialVirtualToken: BigInt(decodedData.initialVirtualToken.toString()), // u64, 最小单位
37033
37079
 
37080
+ // 借贷池初始资金(合约新增),创建后永不变
37081
+ // 已借出量 = initialBorrowTokenReserve - borrowTokenReserve
37082
+ initialBorrowTokenReserve: BigInt(decodedData.initialBorrowTokenReserve.toString()), // u64, 最小单位
37083
+
37034
37084
  // === 第二阶段新增字段:高级版池子参数 ===
37035
37085
  poolType: decodedData.poolType, // u8, 0=普通版, 1=高级版
37036
37086
  borrowPoolRatio: decodedData.borrowPoolRatio, // u8, 5-30表示5%-30%
@@ -37038,7 +37088,8 @@
37038
37088
  // Token Supply 信息
37039
37089
  totalSupply: BigInt(tokenSupply.value.amount),
37040
37090
  decimals: tokenSupply.value.decimals,
37041
- initialBorrowPool: BigInt(tokenSupply.value.amount) - BigInt(decodedData.initialVirtualToken.toString()),
37091
+ // 借贷池初始总量,直接取链上字段(旧公式 totalSupply - initialVirtualToken 已废弃)
37092
+ initialBorrowPool: BigInt(decodedData.initialBorrowTokenReserve.toString()),
37042
37093
  circulatingSupply: BigInt(decodedData.initialVirtualToken.toString())
37043
37094
  + (BigInt(tokenSupply.value.amount) - BigInt(decodedData.initialVirtualToken.toString()) - BigInt(decodedData.borrowTokenReserve.toString())),
37044
37095
 
@@ -37047,10 +37098,12 @@
37047
37098
  feeRecipientBalance: feeRecipientBalance, // Unit: lamports
37048
37099
 
37049
37100
  // Pool account information
37050
- poolTokenAccount: poolTokenAccountPDA.toString(), // Pool token account address
37051
- poolSolAccount: poolSolAccountPDA.toString(), // Pool SOL account address
37052
- poolTokenBalance: BigInt(poolTokenBalance.value.amount), // Pool token balance
37053
- poolSolBalance: poolSolBalance, // Pool SOL balance (lamports)
37101
+ poolTokenAccount: poolTokenAccountPDA.toString(), // Pool token account address
37102
+ poolBorrowTokenAccount: poolBorrowTokenAccountPDA.toString(), // Pool borrow token account address (新增)
37103
+ poolSolAccount: poolSolAccountPDA.toString(), // Pool SOL account address
37104
+ poolTokenBalance: BigInt(poolTokenBalance.value.amount), // Pool token balance
37105
+ poolBorrowTokenBalance: BigInt(poolBorrowTokenBalance.value.amount), // Pool borrow token balance (= borrowTokenReserve, 新增)
37106
+ poolSolBalance: poolSolBalance, // Pool SOL balance (lamports)
37054
37107
 
37055
37108
  // Additional metadata
37056
37109
  _metadata: {
@@ -38688,6 +38741,40 @@
38688
38741
  ]
38689
38742
  }
38690
38743
  },
38744
+ {
38745
+ name: "pool_borrow_token_account",
38746
+ writable: true,
38747
+ pda: {
38748
+ seeds: [
38749
+ {
38750
+ kind: "const",
38751
+ value: [
38752
+ 112,
38753
+ 111,
38754
+ 111,
38755
+ 108,
38756
+ 95,
38757
+ 98,
38758
+ 111,
38759
+ 114,
38760
+ 114,
38761
+ 111,
38762
+ 119,
38763
+ 95,
38764
+ 116,
38765
+ 111,
38766
+ 107,
38767
+ 101,
38768
+ 110
38769
+ ]
38770
+ },
38771
+ {
38772
+ kind: "account",
38773
+ path: "mint_account"
38774
+ }
38775
+ ]
38776
+ }
38777
+ },
38691
38778
  {
38692
38779
  name: "pool_sol_account",
38693
38780
  writable: true,
@@ -39015,6 +39102,40 @@
39015
39102
  ]
39016
39103
  }
39017
39104
  },
39105
+ {
39106
+ name: "pool_borrow_token_account",
39107
+ writable: true,
39108
+ pda: {
39109
+ seeds: [
39110
+ {
39111
+ kind: "const",
39112
+ value: [
39113
+ 112,
39114
+ 111,
39115
+ 111,
39116
+ 108,
39117
+ 95,
39118
+ 98,
39119
+ 111,
39120
+ 114,
39121
+ 114,
39122
+ 111,
39123
+ 119,
39124
+ 95,
39125
+ 116,
39126
+ 111,
39127
+ 107,
39128
+ 101,
39129
+ 110
39130
+ ]
39131
+ },
39132
+ {
39133
+ kind: "account",
39134
+ path: "mint_account"
39135
+ }
39136
+ ]
39137
+ }
39138
+ },
39018
39139
  {
39019
39140
  name: "pool_sol_account",
39020
39141
  writable: true,
@@ -39227,6 +39348,40 @@
39227
39348
  ]
39228
39349
  }
39229
39350
  },
39351
+ {
39352
+ name: "pool_borrow_token_account",
39353
+ writable: true,
39354
+ pda: {
39355
+ seeds: [
39356
+ {
39357
+ kind: "const",
39358
+ value: [
39359
+ 112,
39360
+ 111,
39361
+ 111,
39362
+ 108,
39363
+ 95,
39364
+ 98,
39365
+ 111,
39366
+ 114,
39367
+ 114,
39368
+ 111,
39369
+ 119,
39370
+ 95,
39371
+ 116,
39372
+ 111,
39373
+ 107,
39374
+ 101,
39375
+ 110
39376
+ ]
39377
+ },
39378
+ {
39379
+ kind: "account",
39380
+ path: "mint_account"
39381
+ }
39382
+ ]
39383
+ }
39384
+ },
39230
39385
  {
39231
39386
  name: "pool_sol_account",
39232
39387
  writable: true,
@@ -39667,6 +39822,40 @@
39667
39822
  ]
39668
39823
  }
39669
39824
  },
39825
+ {
39826
+ name: "pool_borrow_token_account",
39827
+ writable: true,
39828
+ pda: {
39829
+ seeds: [
39830
+ {
39831
+ kind: "const",
39832
+ value: [
39833
+ 112,
39834
+ 111,
39835
+ 111,
39836
+ 108,
39837
+ 95,
39838
+ 98,
39839
+ 111,
39840
+ 114,
39841
+ 114,
39842
+ 111,
39843
+ 119,
39844
+ 95,
39845
+ 116,
39846
+ 111,
39847
+ 107,
39848
+ 101,
39849
+ 110
39850
+ ]
39851
+ },
39852
+ {
39853
+ kind: "account",
39854
+ path: "mint_account"
39855
+ }
39856
+ ]
39857
+ }
39858
+ },
39670
39859
  {
39671
39860
  name: "pool_sol_account",
39672
39861
  writable: true,
@@ -39902,6 +40091,40 @@
39902
40091
  ]
39903
40092
  }
39904
40093
  },
40094
+ {
40095
+ name: "pool_borrow_token_account",
40096
+ writable: true,
40097
+ pda: {
40098
+ seeds: [
40099
+ {
40100
+ kind: "const",
40101
+ value: [
40102
+ 112,
40103
+ 111,
40104
+ 111,
40105
+ 108,
40106
+ 95,
40107
+ 98,
40108
+ 111,
40109
+ 114,
40110
+ 114,
40111
+ 111,
40112
+ 119,
40113
+ 95,
40114
+ 116,
40115
+ 111,
40116
+ 107,
40117
+ 101,
40118
+ 110
40119
+ ]
40120
+ },
40121
+ {
40122
+ kind: "account",
40123
+ path: "mint_account"
40124
+ }
40125
+ ]
40126
+ }
40127
+ },
39905
40128
  {
39906
40129
  name: "pool_sol_account",
39907
40130
  writable: true,
@@ -40114,6 +40337,40 @@
40114
40337
  ]
40115
40338
  }
40116
40339
  },
40340
+ {
40341
+ name: "pool_borrow_token_account",
40342
+ writable: true,
40343
+ pda: {
40344
+ seeds: [
40345
+ {
40346
+ kind: "const",
40347
+ value: [
40348
+ 112,
40349
+ 111,
40350
+ 111,
40351
+ 108,
40352
+ 95,
40353
+ 98,
40354
+ 111,
40355
+ 114,
40356
+ 114,
40357
+ 111,
40358
+ 119,
40359
+ 95,
40360
+ 116,
40361
+ 111,
40362
+ 107,
40363
+ 101,
40364
+ 110
40365
+ ]
40366
+ },
40367
+ {
40368
+ kind: "account",
40369
+ path: "mint_account"
40370
+ }
40371
+ ]
40372
+ }
40373
+ },
40117
40374
  {
40118
40375
  name: "pool_sol_account",
40119
40376
  writable: true,
@@ -40441,6 +40698,40 @@
40441
40698
  ]
40442
40699
  }
40443
40700
  },
40701
+ {
40702
+ name: "pool_borrow_token_account",
40703
+ writable: true,
40704
+ pda: {
40705
+ seeds: [
40706
+ {
40707
+ kind: "const",
40708
+ value: [
40709
+ 112,
40710
+ 111,
40711
+ 111,
40712
+ 108,
40713
+ 95,
40714
+ 98,
40715
+ 111,
40716
+ 114,
40717
+ 114,
40718
+ 111,
40719
+ 119,
40720
+ 95,
40721
+ 116,
40722
+ 111,
40723
+ 107,
40724
+ 101,
40725
+ 110
40726
+ ]
40727
+ },
40728
+ {
40729
+ kind: "account",
40730
+ path: "mint_account"
40731
+ }
40732
+ ]
40733
+ }
40734
+ },
40444
40735
  {
40445
40736
  name: "pool_sol_account",
40446
40737
  writable: true,
@@ -41610,6 +41901,16 @@
41610
41901
  ],
41611
41902
  type: "u64"
41612
41903
  },
41904
+ {
41905
+ name: "initial_borrow_token_reserve",
41906
+ docs: [
41907
+ "Borrow pool initial funding (initial token amount minted into borrow pool at creation)",
41908
+ "Unlike borrow_token_reserve which changes in real time with borrow/repay,",
41909
+ "this field never changes after creation; used by external parties to compute",
41910
+ "\"borrowed out = initial funding - current available reserve\"."
41911
+ ],
41912
+ type: "u64"
41913
+ },
41613
41914
  {
41614
41915
  name: "pool_type",
41615
41916
  docs: [
@@ -41737,9 +42038,21 @@
41737
42038
  type: "pubkey"
41738
42039
  },
41739
42040
  {
41740
- name: "order_id",
41741
- type: "u64"
41742
- },
42041
+ name: "is_buy",
42042
+ type: "bool"
42043
+ },
42044
+ {
42045
+ name: "token_amount",
42046
+ type: "u64"
42047
+ },
42048
+ {
42049
+ name: "sol_amount",
42050
+ type: "u64"
42051
+ },
42052
+ {
42053
+ name: "order_id",
42054
+ type: "u64"
42055
+ },
41743
42056
  {
41744
42057
  name: "order_index",
41745
42058
  type: "u16"
@@ -42078,6 +42391,10 @@
42078
42391
  name: "pool_token_account",
42079
42392
  type: "pubkey"
42080
42393
  },
42394
+ {
42395
+ name: "pool_borrow_token_account",
42396
+ type: "pubkey"
42397
+ },
42081
42398
  {
42082
42399
  name: "pool_sol_account",
42083
42400
  type: "pubkey"
@@ -42138,6 +42455,10 @@
42138
42455
  name: "initial_virtual_token",
42139
42456
  type: "u64"
42140
42457
  },
42458
+ {
42459
+ name: "initial_borrow_token_reserve",
42460
+ type: "u64"
42461
+ },
42141
42462
  {
42142
42463
  name: "pool_type",
42143
42464
  type: "u8"
@@ -42434,6 +42755,40 @@
42434
42755
  ]
42435
42756
  }
42436
42757
  },
42758
+ {
42759
+ name: "pool_borrow_token_account",
42760
+ writable: true,
42761
+ pda: {
42762
+ seeds: [
42763
+ {
42764
+ kind: "const",
42765
+ value: [
42766
+ 112,
42767
+ 111,
42768
+ 111,
42769
+ 108,
42770
+ 95,
42771
+ 98,
42772
+ 111,
42773
+ 114,
42774
+ 114,
42775
+ 111,
42776
+ 119,
42777
+ 95,
42778
+ 116,
42779
+ 111,
42780
+ 107,
42781
+ 101,
42782
+ 110
42783
+ ]
42784
+ },
42785
+ {
42786
+ kind: "account",
42787
+ path: "mint_account"
42788
+ }
42789
+ ]
42790
+ }
42791
+ },
42437
42792
  {
42438
42793
  name: "pool_sol_account",
42439
42794
  writable: true,
@@ -42761,6 +43116,40 @@
42761
43116
  ]
42762
43117
  }
42763
43118
  },
43119
+ {
43120
+ name: "pool_borrow_token_account",
43121
+ writable: true,
43122
+ pda: {
43123
+ seeds: [
43124
+ {
43125
+ kind: "const",
43126
+ value: [
43127
+ 112,
43128
+ 111,
43129
+ 111,
43130
+ 108,
43131
+ 95,
43132
+ 98,
43133
+ 111,
43134
+ 114,
43135
+ 114,
43136
+ 111,
43137
+ 119,
43138
+ 95,
43139
+ 116,
43140
+ 111,
43141
+ 107,
43142
+ 101,
43143
+ 110
43144
+ ]
43145
+ },
43146
+ {
43147
+ kind: "account",
43148
+ path: "mint_account"
43149
+ }
43150
+ ]
43151
+ }
43152
+ },
42764
43153
  {
42765
43154
  name: "pool_sol_account",
42766
43155
  writable: true,
@@ -42973,6 +43362,40 @@
42973
43362
  ]
42974
43363
  }
42975
43364
  },
43365
+ {
43366
+ name: "pool_borrow_token_account",
43367
+ writable: true,
43368
+ pda: {
43369
+ seeds: [
43370
+ {
43371
+ kind: "const",
43372
+ value: [
43373
+ 112,
43374
+ 111,
43375
+ 111,
43376
+ 108,
43377
+ 95,
43378
+ 98,
43379
+ 111,
43380
+ 114,
43381
+ 114,
43382
+ 111,
43383
+ 119,
43384
+ 95,
43385
+ 116,
43386
+ 111,
43387
+ 107,
43388
+ 101,
43389
+ 110
43390
+ ]
43391
+ },
43392
+ {
43393
+ kind: "account",
43394
+ path: "mint_account"
43395
+ }
43396
+ ]
43397
+ }
43398
+ },
42976
43399
  {
42977
43400
  name: "pool_sol_account",
42978
43401
  writable: true,
@@ -43413,6 +43836,40 @@
43413
43836
  ]
43414
43837
  }
43415
43838
  },
43839
+ {
43840
+ name: "pool_borrow_token_account",
43841
+ writable: true,
43842
+ pda: {
43843
+ seeds: [
43844
+ {
43845
+ kind: "const",
43846
+ value: [
43847
+ 112,
43848
+ 111,
43849
+ 111,
43850
+ 108,
43851
+ 95,
43852
+ 98,
43853
+ 111,
43854
+ 114,
43855
+ 114,
43856
+ 111,
43857
+ 119,
43858
+ 95,
43859
+ 116,
43860
+ 111,
43861
+ 107,
43862
+ 101,
43863
+ 110
43864
+ ]
43865
+ },
43866
+ {
43867
+ kind: "account",
43868
+ path: "mint_account"
43869
+ }
43870
+ ]
43871
+ }
43872
+ },
43416
43873
  {
43417
43874
  name: "pool_sol_account",
43418
43875
  writable: true,
@@ -43648,6 +44105,40 @@
43648
44105
  ]
43649
44106
  }
43650
44107
  },
44108
+ {
44109
+ name: "pool_borrow_token_account",
44110
+ writable: true,
44111
+ pda: {
44112
+ seeds: [
44113
+ {
44114
+ kind: "const",
44115
+ value: [
44116
+ 112,
44117
+ 111,
44118
+ 111,
44119
+ 108,
44120
+ 95,
44121
+ 98,
44122
+ 111,
44123
+ 114,
44124
+ 114,
44125
+ 111,
44126
+ 119,
44127
+ 95,
44128
+ 116,
44129
+ 111,
44130
+ 107,
44131
+ 101,
44132
+ 110
44133
+ ]
44134
+ },
44135
+ {
44136
+ kind: "account",
44137
+ path: "mint_account"
44138
+ }
44139
+ ]
44140
+ }
44141
+ },
43651
44142
  {
43652
44143
  name: "pool_sol_account",
43653
44144
  writable: true,
@@ -43860,6 +44351,40 @@
43860
44351
  ]
43861
44352
  }
43862
44353
  },
44354
+ {
44355
+ name: "pool_borrow_token_account",
44356
+ writable: true,
44357
+ pda: {
44358
+ seeds: [
44359
+ {
44360
+ kind: "const",
44361
+ value: [
44362
+ 112,
44363
+ 111,
44364
+ 111,
44365
+ 108,
44366
+ 95,
44367
+ 98,
44368
+ 111,
44369
+ 114,
44370
+ 114,
44371
+ 111,
44372
+ 119,
44373
+ 95,
44374
+ 116,
44375
+ 111,
44376
+ 107,
44377
+ 101,
44378
+ 110
44379
+ ]
44380
+ },
44381
+ {
44382
+ kind: "account",
44383
+ path: "mint_account"
44384
+ }
44385
+ ]
44386
+ }
44387
+ },
43863
44388
  {
43864
44389
  name: "pool_sol_account",
43865
44390
  writable: true,
@@ -44187,6 +44712,40 @@
44187
44712
  ]
44188
44713
  }
44189
44714
  },
44715
+ {
44716
+ name: "pool_borrow_token_account",
44717
+ writable: true,
44718
+ pda: {
44719
+ seeds: [
44720
+ {
44721
+ kind: "const",
44722
+ value: [
44723
+ 112,
44724
+ 111,
44725
+ 111,
44726
+ 108,
44727
+ 95,
44728
+ 98,
44729
+ 111,
44730
+ 114,
44731
+ 114,
44732
+ 111,
44733
+ 119,
44734
+ 95,
44735
+ 116,
44736
+ 111,
44737
+ 107,
44738
+ 101,
44739
+ 110
44740
+ ]
44741
+ },
44742
+ {
44743
+ kind: "account",
44744
+ path: "mint_account"
44745
+ }
44746
+ ]
44747
+ }
44748
+ },
44190
44749
  {
44191
44750
  name: "pool_sol_account",
44192
44751
  writable: true,
@@ -45356,6 +45915,16 @@
45356
45915
  ],
45357
45916
  type: "u64"
45358
45917
  },
45918
+ {
45919
+ name: "initial_borrow_token_reserve",
45920
+ docs: [
45921
+ "Borrow pool initial funding (initial token amount minted into borrow pool at creation)",
45922
+ "Unlike borrow_token_reserve which changes in real time with borrow/repay,",
45923
+ "this field never changes after creation; used by external parties to compute",
45924
+ "\"borrowed out = initial funding - current available reserve\"."
45925
+ ],
45926
+ type: "u64"
45927
+ },
45359
45928
  {
45360
45929
  name: "pool_type",
45361
45930
  docs: [
@@ -45482,6 +46051,18 @@
45482
46051
  name: "mint_account",
45483
46052
  type: "pubkey"
45484
46053
  },
46054
+ {
46055
+ name: "is_buy",
46056
+ type: "bool"
46057
+ },
46058
+ {
46059
+ name: "token_amount",
46060
+ type: "u64"
46061
+ },
46062
+ {
46063
+ name: "sol_amount",
46064
+ type: "u64"
46065
+ },
45485
46066
  {
45486
46067
  name: "order_id",
45487
46068
  type: "u64"
@@ -45824,6 +46405,10 @@
45824
46405
  name: "pool_token_account",
45825
46406
  type: "pubkey"
45826
46407
  },
46408
+ {
46409
+ name: "pool_borrow_token_account",
46410
+ type: "pubkey"
46411
+ },
45827
46412
  {
45828
46413
  name: "pool_sol_account",
45829
46414
  type: "pubkey"
@@ -45884,6 +46469,10 @@
45884
46469
  name: "initial_virtual_token",
45885
46470
  type: "u64"
45886
46471
  },
46472
+ {
46473
+ name: "initial_borrow_token_reserve",
46474
+ type: "u64"
46475
+ },
45887
46476
  {
45888
46477
  name: "pool_type",
45889
46478
  type: "u8"