@jpool/bond-sdk 0.10.2 → 0.10.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/index.d.mts +2 -32
- package/dist/index.d.ts +2 -32
- package/dist/index.js +189 -273
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +190 -273
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import { Fee } from '@solana/spl-stake-pool/src/layouts';
|
|
2
|
-
import { PublicKey, TransactionInstruction, Connection, PublicKeyInitData, Transaction, VersionedTransaction, Keypair } from '@solana/web3.js';
|
|
3
1
|
import * as bn_js from 'bn.js';
|
|
4
|
-
import bn_js__default from 'bn.js';
|
|
5
2
|
import { IdlTypes, IdlAccounts, Program, Provider } from '@coral-xyz/anchor';
|
|
6
|
-
|
|
7
|
-
type StakePoolManager = {
|
|
8
|
-
stakePoolAddress: PublicKey;
|
|
9
|
-
depositSol: (lamports: bn_js__default) => TransactionInstruction;
|
|
10
|
-
withdrawSol: (poolTokens: bn_js__default) => TransactionInstruction;
|
|
11
|
-
readonly exchangeRate: number;
|
|
12
|
-
readonly withdrawSolFee: Fee;
|
|
13
|
-
};
|
|
3
|
+
import { PublicKey, Connection, PublicKeyInitData, Transaction, VersionedTransaction, Keypair, TransactionInstruction } from '@solana/web3.js';
|
|
14
4
|
|
|
15
5
|
declare const JPOOL_STAKE_POOL: PublicKey;
|
|
16
6
|
declare enum Seeds {
|
|
@@ -741,9 +731,6 @@ type Jbond = {
|
|
|
741
731
|
},
|
|
742
732
|
{
|
|
743
733
|
"name": "globalInitialize";
|
|
744
|
-
"docs": [
|
|
745
|
-
"----------------------------- Global Instructions ----------------------------"
|
|
746
|
-
];
|
|
747
734
|
"discriminator": [
|
|
748
735
|
30,
|
|
749
736
|
79,
|
|
@@ -1753,7 +1740,7 @@ type GetHistoryOpts = {
|
|
|
1753
1740
|
declare class HistoryManager {
|
|
1754
1741
|
private program;
|
|
1755
1742
|
private connection;
|
|
1756
|
-
private programId;
|
|
1743
|
+
private readonly programId;
|
|
1757
1744
|
private discCache;
|
|
1758
1745
|
constructor(program: Program<Jbond>, connection: Connection, programId: PublicKey);
|
|
1759
1746
|
getHistory(bondType: BondType, vote: PublicKeyInitData, pdaDeriver: (bondType: BondType, vote: PublicKeyInitData) => [PublicKey, number], options?: GetHistoryOpts): Promise<TransactionHistoryItem[]>;
|
|
@@ -2051,23 +2038,6 @@ declare class JBondClient {
|
|
|
2051
2038
|
* @private
|
|
2052
2039
|
*/
|
|
2053
2040
|
private getBondStateStats;
|
|
2054
|
-
/**
|
|
2055
|
-
* Load stake pool account and cache it if not already cached
|
|
2056
|
-
* @private
|
|
2057
|
-
*/
|
|
2058
|
-
private loadStakePoolAccount;
|
|
2059
|
-
/**
|
|
2060
|
-
* Manages the interaction with a stake pool, allowing deposits and withdrawals of SOL.
|
|
2061
|
-
*/
|
|
2062
|
-
stakePoolManager(props?: {
|
|
2063
|
-
user?: PublicKey;
|
|
2064
|
-
}): Promise<StakePoolManager>;
|
|
2065
|
-
/**
|
|
2066
|
-
* Ensures that a valid user is provided. If a user is not explicitly passed
|
|
2067
|
-
* in the properties, it defaults to the provider's public key.
|
|
2068
|
-
* Throws an error if no user is available.
|
|
2069
|
-
*/
|
|
2070
|
-
private ensureUser;
|
|
2071
2041
|
private lamports;
|
|
2072
2042
|
}
|
|
2073
2043
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import { Fee } from '@solana/spl-stake-pool/src/layouts';
|
|
2
|
-
import { PublicKey, TransactionInstruction, Connection, PublicKeyInitData, Transaction, VersionedTransaction, Keypair } from '@solana/web3.js';
|
|
3
1
|
import * as bn_js from 'bn.js';
|
|
4
|
-
import bn_js__default from 'bn.js';
|
|
5
2
|
import { IdlTypes, IdlAccounts, Program, Provider } from '@coral-xyz/anchor';
|
|
6
|
-
|
|
7
|
-
type StakePoolManager = {
|
|
8
|
-
stakePoolAddress: PublicKey;
|
|
9
|
-
depositSol: (lamports: bn_js__default) => TransactionInstruction;
|
|
10
|
-
withdrawSol: (poolTokens: bn_js__default) => TransactionInstruction;
|
|
11
|
-
readonly exchangeRate: number;
|
|
12
|
-
readonly withdrawSolFee: Fee;
|
|
13
|
-
};
|
|
3
|
+
import { PublicKey, Connection, PublicKeyInitData, Transaction, VersionedTransaction, Keypair, TransactionInstruction } from '@solana/web3.js';
|
|
14
4
|
|
|
15
5
|
declare const JPOOL_STAKE_POOL: PublicKey;
|
|
16
6
|
declare enum Seeds {
|
|
@@ -741,9 +731,6 @@ type Jbond = {
|
|
|
741
731
|
},
|
|
742
732
|
{
|
|
743
733
|
"name": "globalInitialize";
|
|
744
|
-
"docs": [
|
|
745
|
-
"----------------------------- Global Instructions ----------------------------"
|
|
746
|
-
];
|
|
747
734
|
"discriminator": [
|
|
748
735
|
30,
|
|
749
736
|
79,
|
|
@@ -1753,7 +1740,7 @@ type GetHistoryOpts = {
|
|
|
1753
1740
|
declare class HistoryManager {
|
|
1754
1741
|
private program;
|
|
1755
1742
|
private connection;
|
|
1756
|
-
private programId;
|
|
1743
|
+
private readonly programId;
|
|
1757
1744
|
private discCache;
|
|
1758
1745
|
constructor(program: Program<Jbond>, connection: Connection, programId: PublicKey);
|
|
1759
1746
|
getHistory(bondType: BondType, vote: PublicKeyInitData, pdaDeriver: (bondType: BondType, vote: PublicKeyInitData) => [PublicKey, number], options?: GetHistoryOpts): Promise<TransactionHistoryItem[]>;
|
|
@@ -2051,23 +2038,6 @@ declare class JBondClient {
|
|
|
2051
2038
|
* @private
|
|
2052
2039
|
*/
|
|
2053
2040
|
private getBondStateStats;
|
|
2054
|
-
/**
|
|
2055
|
-
* Load stake pool account and cache it if not already cached
|
|
2056
|
-
* @private
|
|
2057
|
-
*/
|
|
2058
|
-
private loadStakePoolAccount;
|
|
2059
|
-
/**
|
|
2060
|
-
* Manages the interaction with a stake pool, allowing deposits and withdrawals of SOL.
|
|
2061
|
-
*/
|
|
2062
|
-
stakePoolManager(props?: {
|
|
2063
|
-
user?: PublicKey;
|
|
2064
|
-
}): Promise<StakePoolManager>;
|
|
2065
|
-
/**
|
|
2066
|
-
* Ensures that a valid user is provided. If a user is not explicitly passed
|
|
2067
|
-
* in the properties, it defaults to the provider's public key.
|
|
2068
|
-
* Throws an error if no user is available.
|
|
2069
|
-
*/
|
|
2070
|
-
private ensureUser;
|
|
2071
2041
|
private lamports;
|
|
2072
2042
|
}
|
|
2073
2043
|
|