@jpool/bond-sdk 0.9.0-next.6 → 0.9.0-next.7

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 CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Fee } from '@solana/spl-stake-pool/src/layouts';
2
- import * as _solana_web3_js from '@solana/web3.js';
3
2
  import { PublicKey, TransactionInstruction, Connection, PublicKeyInitData, Transaction, VersionedTransaction, Keypair } from '@solana/web3.js';
4
3
  import BN from 'bn.js';
5
4
  import { IdlTypes, IdlAccounts, Program, Provider } from '@coral-xyz/anchor';
@@ -1565,6 +1564,7 @@ type RegisterValidatorProps = {
1565
1564
  type TopUpCollateralProps = {
1566
1565
  bondType: BondType;
1567
1566
  name: string;
1567
+ identity: PublicKey;
1568
1568
  voteAccount: PublicKey;
1569
1569
  collateral: BondCollateral;
1570
1570
  payer?: PublicKey;
@@ -1723,7 +1723,6 @@ declare class JBondClient {
1723
1723
  * Configure a specific option.
1724
1724
  */
1725
1725
  configureEnv<K extends keyof ClientOptions>(key: K, val: ClientOptions[K]): this;
1726
- private getAdapter;
1727
1726
  private getBondTypeSeed;
1728
1727
  /**
1729
1728
  * Program Derived Addresses (PDAs)
@@ -1792,48 +1791,30 @@ declare class JBondClient {
1792
1791
  bondType: BondType;
1793
1792
  name: string;
1794
1793
  }): Promise<string | undefined>;
1795
- buildBondGlobalStateInitializeInstruction(props: GlobalInitializeProps): Promise<_solana_web3_js.TransactionInstruction>;
1794
+ buildBondGlobalStateInitializeIx(props: GlobalInitializeProps): Promise<TransactionInstruction>;
1796
1795
  /**
1797
1796
  * Build configure instruction
1798
1797
  */
1799
- buildGlobalConfigureInstruction(props: GlobalConfigureProps): Promise<_solana_web3_js.TransactionInstruction>;
1798
+ buildGlobalConfigureInstruction(props: GlobalConfigureProps): Promise<TransactionInstruction>;
1800
1799
  /**
1801
1800
  * Build initialize instruction
1802
1801
  */
1803
- buildBondInitializeInstruction(props: BondInitializeProps): Promise<_solana_web3_js.TransactionInstruction>;
1804
- /**
1805
- * Build register validator instruction
1806
- */
1807
- buildRegisterValidatorInstruction(props: RegisterValidatorProps): Promise<_solana_web3_js.TransactionInstruction>;
1808
- /**
1809
- * Build top up collateral instruction
1810
- */
1811
- buildTopUpCollateralInstruction(props: TopUpCollateralProps): Promise<_solana_web3_js.TransactionInstruction>;
1812
- /**
1813
- * Build withdraw collateral instruction
1814
- */
1815
- buildWithdrawCollateralInstruction(props: WithdrawCollateralProps): Promise<_solana_web3_js.TransactionInstruction>;
1816
- /**
1817
- * Build claim compensation instruction
1818
- */
1819
- buildBondClaimInstruction(props: ClaimProps): Promise<_solana_web3_js.TransactionInstruction>;
1820
- /**
1821
- * Build configure instruction
1822
- */
1823
- buildConfigureInstruction(props: BondConfigureProps): Promise<_solana_web3_js.TransactionInstruction>;
1824
- /**
1825
- * Build set withdraw authority instruction
1826
- */
1827
- buildSetWithdrawAuthorityInstruction(props: SetWithdrawAuthorityProps): Promise<_solana_web3_js.TransactionInstruction>;
1828
- buildBondStartInstruction(props: {
1802
+ buildBondInitializeIx(props: BondInitializeProps): Promise<TransactionInstruction>;
1803
+ buildConfigureIx(props: BondConfigureProps): Promise<TransactionInstruction>;
1804
+ buildRegisterIx(props: RegisterValidatorProps): Promise<TransactionInstruction>;
1805
+ buildTopUpIXs(props: TopUpCollateralProps): Promise<TransactionInstruction[]>;
1806
+ buildWithdrawIx(props: WithdrawCollateralProps): Promise<TransactionInstruction>;
1807
+ buildClaimIx(props: ClaimProps): Promise<TransactionInstruction>;
1808
+ buildSetWithdrawAuthorityIx(props: SetWithdrawAuthorityProps): Promise<TransactionInstruction>;
1809
+ buildBondFinishIx(_props: {
1829
1810
  bondType: BondType;
1830
1811
  name: string;
1831
- duration_secs: number;
1832
- }): Promise<_solana_web3_js.TransactionInstruction>;
1833
- buildBondFinishInstruction(props: {
1812
+ }): Promise<TransactionInstruction>;
1813
+ buildBondStartIx(props: {
1834
1814
  bondType: BondType;
1835
1815
  name: string;
1836
- }): Promise<_solana_web3_js.TransactionInstruction>;
1816
+ duration_secs: number;
1817
+ }): Promise<TransactionInstruction>;
1837
1818
  /**
1838
1819
  * Fetch global state or throw if not found
1839
1820
  */
@@ -1880,6 +1861,7 @@ declare class JBondClient {
1880
1861
  * Throws an error if no user is available.
1881
1862
  */
1882
1863
  private ensureUser;
1864
+ private lamports;
1883
1865
  }
1884
1866
 
1885
1867
  export { BondClientEnv, type BondCollateral, type BondConfigureProps, type BondInitializeProps, type BondState, type BondStateStats, BondTransactionType, type BondType, BondTypeVariant, type ClaimProps, type ClientOptions, type CollateralType, ENV_PROGRAM_ID, type EpochHistoryItem, type GetHistoryGroupedProps, type GetHistoryProps, type GlobalConfigureProps, type GlobalInitializeProps, type GlobalState, JBondClient, JPOOL_STAKE_POOL, type Jbond, NodeWallet, type RegisterValidatorProps, Seeds, SessionStatus, type SetWithdrawAuthorityProps, type TopUpCollateralProps, type TransactionHistoryItem, type ValidatorBond, type WithdrawCollateralProps, bondTypeToSeed };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Fee } from '@solana/spl-stake-pool/src/layouts';
2
- import * as _solana_web3_js from '@solana/web3.js';
3
2
  import { PublicKey, TransactionInstruction, Connection, PublicKeyInitData, Transaction, VersionedTransaction, Keypair } from '@solana/web3.js';
4
3
  import BN from 'bn.js';
5
4
  import { IdlTypes, IdlAccounts, Program, Provider } from '@coral-xyz/anchor';
@@ -1565,6 +1564,7 @@ type RegisterValidatorProps = {
1565
1564
  type TopUpCollateralProps = {
1566
1565
  bondType: BondType;
1567
1566
  name: string;
1567
+ identity: PublicKey;
1568
1568
  voteAccount: PublicKey;
1569
1569
  collateral: BondCollateral;
1570
1570
  payer?: PublicKey;
@@ -1723,7 +1723,6 @@ declare class JBondClient {
1723
1723
  * Configure a specific option.
1724
1724
  */
1725
1725
  configureEnv<K extends keyof ClientOptions>(key: K, val: ClientOptions[K]): this;
1726
- private getAdapter;
1727
1726
  private getBondTypeSeed;
1728
1727
  /**
1729
1728
  * Program Derived Addresses (PDAs)
@@ -1792,48 +1791,30 @@ declare class JBondClient {
1792
1791
  bondType: BondType;
1793
1792
  name: string;
1794
1793
  }): Promise<string | undefined>;
1795
- buildBondGlobalStateInitializeInstruction(props: GlobalInitializeProps): Promise<_solana_web3_js.TransactionInstruction>;
1794
+ buildBondGlobalStateInitializeIx(props: GlobalInitializeProps): Promise<TransactionInstruction>;
1796
1795
  /**
1797
1796
  * Build configure instruction
1798
1797
  */
1799
- buildGlobalConfigureInstruction(props: GlobalConfigureProps): Promise<_solana_web3_js.TransactionInstruction>;
1798
+ buildGlobalConfigureInstruction(props: GlobalConfigureProps): Promise<TransactionInstruction>;
1800
1799
  /**
1801
1800
  * Build initialize instruction
1802
1801
  */
1803
- buildBondInitializeInstruction(props: BondInitializeProps): Promise<_solana_web3_js.TransactionInstruction>;
1804
- /**
1805
- * Build register validator instruction
1806
- */
1807
- buildRegisterValidatorInstruction(props: RegisterValidatorProps): Promise<_solana_web3_js.TransactionInstruction>;
1808
- /**
1809
- * Build top up collateral instruction
1810
- */
1811
- buildTopUpCollateralInstruction(props: TopUpCollateralProps): Promise<_solana_web3_js.TransactionInstruction>;
1812
- /**
1813
- * Build withdraw collateral instruction
1814
- */
1815
- buildWithdrawCollateralInstruction(props: WithdrawCollateralProps): Promise<_solana_web3_js.TransactionInstruction>;
1816
- /**
1817
- * Build claim compensation instruction
1818
- */
1819
- buildBondClaimInstruction(props: ClaimProps): Promise<_solana_web3_js.TransactionInstruction>;
1820
- /**
1821
- * Build configure instruction
1822
- */
1823
- buildConfigureInstruction(props: BondConfigureProps): Promise<_solana_web3_js.TransactionInstruction>;
1824
- /**
1825
- * Build set withdraw authority instruction
1826
- */
1827
- buildSetWithdrawAuthorityInstruction(props: SetWithdrawAuthorityProps): Promise<_solana_web3_js.TransactionInstruction>;
1828
- buildBondStartInstruction(props: {
1802
+ buildBondInitializeIx(props: BondInitializeProps): Promise<TransactionInstruction>;
1803
+ buildConfigureIx(props: BondConfigureProps): Promise<TransactionInstruction>;
1804
+ buildRegisterIx(props: RegisterValidatorProps): Promise<TransactionInstruction>;
1805
+ buildTopUpIXs(props: TopUpCollateralProps): Promise<TransactionInstruction[]>;
1806
+ buildWithdrawIx(props: WithdrawCollateralProps): Promise<TransactionInstruction>;
1807
+ buildClaimIx(props: ClaimProps): Promise<TransactionInstruction>;
1808
+ buildSetWithdrawAuthorityIx(props: SetWithdrawAuthorityProps): Promise<TransactionInstruction>;
1809
+ buildBondFinishIx(_props: {
1829
1810
  bondType: BondType;
1830
1811
  name: string;
1831
- duration_secs: number;
1832
- }): Promise<_solana_web3_js.TransactionInstruction>;
1833
- buildBondFinishInstruction(props: {
1812
+ }): Promise<TransactionInstruction>;
1813
+ buildBondStartIx(props: {
1834
1814
  bondType: BondType;
1835
1815
  name: string;
1836
- }): Promise<_solana_web3_js.TransactionInstruction>;
1816
+ duration_secs: number;
1817
+ }): Promise<TransactionInstruction>;
1837
1818
  /**
1838
1819
  * Fetch global state or throw if not found
1839
1820
  */
@@ -1880,6 +1861,7 @@ declare class JBondClient {
1880
1861
  * Throws an error if no user is available.
1881
1862
  */
1882
1863
  private ensureUser;
1864
+ private lamports;
1883
1865
  }
1884
1866
 
1885
1867
  export { BondClientEnv, type BondCollateral, type BondConfigureProps, type BondInitializeProps, type BondState, type BondStateStats, BondTransactionType, type BondType, BondTypeVariant, type ClaimProps, type ClientOptions, type CollateralType, ENV_PROGRAM_ID, type EpochHistoryItem, type GetHistoryGroupedProps, type GetHistoryProps, type GlobalConfigureProps, type GlobalInitializeProps, type GlobalState, JBondClient, JPOOL_STAKE_POOL, type Jbond, NodeWallet, type RegisterValidatorProps, Seeds, SessionStatus, type SetWithdrawAuthorityProps, type TopUpCollateralProps, type TransactionHistoryItem, type ValidatorBond, type WithdrawCollateralProps, bondTypeToSeed };