# StackingClient | Stacks.js 1.0.0 Library Reference
Documentation for Stacks.js 1.0.0 Library Reference

### Hierarchy

- StackingClient

## Index

### Constructors

- constructor

### Properties

- address
- network

### Methods

- canStack
- getAccountBalance
- getAccountStatus
- getCoreInfo
- getCycleDuration
- getPoxInfo
- getSecondsUntilNextCycle
- getStackOptions
- getStatus
- getTargetBlockTime
- hasMinimumStx
- isStackingEnabledNextCycle
- modifyLockTxFee
- stack

## Constructors

### constructor

- new StackingClient(address: string, network: StacksNetwork): StackingClient

- - Defined in packages/stacking/src/index.ts:108

  #### Parameters

  - ##### address: string

  - ##### network: StacksNetwork

  #### Returns StackingClient

## Properties

### address

address: string

- Defined in packages/stacking/src/index.ts:110

### network

network: StacksNetwork

- Defined in packages/stacking/src/index.ts:111

## Methods

### canStack

- canStack(__namedParameters: { cycles: number; poxAddress: string }): Promise< StackingEligibility >

- - Defined in packages/stacking/src/index.ts:231

  Check if account can lock stx

  #### Parameters

  - ##### __namedParameters: { cycles: number; poxAddress: string }

    - ##### cycles: number

    - ##### poxAddress: string

  #### Returns Promise< StackingEligibility >

  that resolves to a StackingEligibility object if the operation succeeds

### getAccountBalance

- getAccountBalance(): Promise< BN >

- - Defined in packages/stacking/src/index.ts:162

  Get account balance

  #### Returns Promise< BN >

  that resolves to a BigNum if the operation succeeds

### getAccountStatus

- getAccountStatus(): Promise<any>

- - Defined in packages/stacking/src/index.ts:151

  #### Returns Promise<any>

### getCoreInfo

- getCoreInfo(): Promise< CoreInfo >

- - Defined in packages/stacking/src/index.ts:118

  Get stacks node info

  #### Returns Promise< CoreInfo >

  that resolves to a CoreInfo response if the operation succeeds

### getCycleDuration

- getCycleDuration(): Promise<number>

- - Defined in packages/stacking/src/index.ts:172

  Get reward cycle duration in seconds

  #### Returns Promise<number>

  that resolves to a number if the operation succeeds

### getPoxInfo

- getPoxInfo(): Promise< PoxInfo >

- - Defined in packages/stacking/src/index.ts:129

  Get stacks node pox info

  #### Returns Promise< PoxInfo >

  that resolves to a PoxInfo response if the operation succeeds

### getSecondsUntilNextCycle

- getSecondsUntilNextCycle(): Promise<number>

- - Defined in packages/stacking/src/index.ts:187

  Get number of seconds until next reward cycle

  #### Returns Promise<number>

  that resolves to a number if the operation succeeds

### getStackOptions

- getStackOptions(__namedParameters: { amountMicroStx: BN ; burnBlockHeight: number; contract: string; cycles: number; poxAddress: string }): ContractCallOptions

- - Defined in packages/stacking/src/index.ts:317

  #### Parameters

  - ##### __namedParameters: { amountMicroStx: BN ; burnBlockHeight: number; contract: string; cycles: number; poxAddress: string }

    - ##### amountMicroStx: BN

    - ##### burnBlockHeight: number

    - ##### contract: string

    - ##### cycles: number

    - ##### poxAddress: string

  #### Returns ContractCallOptions

### getStatus

- getStatus(): Promise< StackerInfo >

- - Defined in packages/stacking/src/index.ts:361

  Check stacking status

  #### Returns Promise< StackerInfo >

  that resolves to a StackerInfo object if the operation succeeds

### getTargetBlockTime

- getTargetBlockTime(): Promise<number>

- - Defined in packages/stacking/src/index.ts:140

  Get stacks node target block time

  #### Returns Promise<number>

  that resolves to a number if the operation succeeds

### hasMinimumStx

- hasMinimumStx(): Promise<boolean>

- - Defined in packages/stacking/src/index.ts:217

  Check if account has minimum require amount of Stacks for stacking

  #### Returns Promise<boolean>

  that resolves to a bool if the operation succeeds

### isStackingEnabledNextCycle

- isStackingEnabledNextCycle(): Promise<boolean>

- - Defined in packages/stacking/src/index.ts:208

  Check if stacking is enabled for next reward cycle

  #### Returns Promise<boolean>

  that resolves to a bool if the operation succeeds

### modifyLockTxFee

- modifyLockTxFee(__namedParameters: { amountMicroStx: BN ; tx: StacksTransaction }): StacksTransaction

- - Defined in packages/stacking/src/index.ts:415

  Adjust microstacks amount for locking after taking into account transaction fees

  #### Parameters

  - ##### __namedParameters: { amountMicroStx: BN ; tx: StacksTransaction }

    - ##### amountMicroStx: BN

    - ##### tx: StacksTransaction

  #### Returns StacksTransaction

  that resolves to a transaction object if the operation succeeds

### stack

- stack(__namedParameters: { amountMicroStx: BN ; burnBlockHeight: number; cycles: number; poxAddress: string; privateKey: string }): Promise<string>

- - Defined in packages/stacking/src/index.ts:287

  Generate and broadcast a stacking transaction to lock STX

  #### Parameters

  - ##### __namedParameters: { amountMicroStx: BN ; burnBlockHeight: number; cycles: number; poxAddress: string; privateKey: string }

    - ##### amountMicroStx: BN

    - ##### burnBlockHeight: number

    - ##### cycles: number

    - ##### poxAddress: string

    - ##### privateKey: string

  #### Returns Promise<string>

  that resolves to a broadcasted txid if the operation succeeds

Generated using TypeDoc