@ -211,20 +212,17 @@ const amountMicroStx = new BN(100000000000);
// set the number of cycles to lock
// set the number of cycles to lock
const cycles = 10;
const cycles = 10;
// set the private key to the account
const key = privateKey;
// set the burnchain (BTC) block for stacking lock to start
// set the burnchain (BTC) block for stacking lock to start
// you can find the current burnchain block height from coreInfo above
// you can find the current burnchain block height from coreInfo above
const burnBlockHeight = 2136;
const burnBlockHeight = 2136;
// execute the stacking action by signing and broadcasting a transaction to the network
// execute the stacking action by signing and broadcasting a transaction to the network
stacker
client
.lockStx({
.stack({
amountMicroStx,
amountMicroStx,
poxAddress,
poxAddress,
cycles,
cycles,
key,
privateKey,
burnBlockHeight,
burnBlockHeight,
})
})
.then(response => {
.then(response => {
@ -288,7 +286,7 @@ await sub.unsubscribe();
With the completed transactions, Stacks tokens are locked up for the lockup duration. During that time, your application can display the following details: unlocking time, amount of Stacks locked, and bitcoin address used for rewards.
With the completed transactions, Stacks tokens are locked up for the lockup duration. During that time, your application can display the following details: unlocking time, amount of Stacks locked, and bitcoin address used for rewards.
```js
```js
const stackingStatus = await stacker.getStatus();
const stackingStatus = await client.getStatus();
// If stacking is active for the account, you will receive the stacking details
// If stacking is active for the account, you will receive the stacking details