Claude
Skills
Sign in
Back

pillar

Included with Lifetime
$97 forever

Pillar smart wallet operations in two modes — browser-handoff (pillar.ts) opens the Pillar frontend for user signing, and agent-signed direct (pillar-direct.ts) signs locally with a secp256k1 keypair and submits directly to the Pillar API (no browser required, gas sponsored). Supports sBTC send/supply/boost/unwind, DCA programs, stacking, key management, wallet creation, and position queries.

Web Dev

What this skill does


# Pillar Skill

Provides Pillar smart wallet operations in two modes:

- **pillar.ts** — Browser-handoff mode. Creates an operation on the Pillar backend, opens the Pillar frontend in the user's browser for signing, then polls for the result. Requires the user to be logged in at pillarbtc.com.
- **pillar-direct.ts** — Agent-signed direct mode. Generates and manages a local secp256k1 signing keypair. Signs SIP-018 structured data locally, submits directly to the Pillar backend API. No browser needed; gas is sponsored by the backend.

## pillar.ts — Browser-Handoff Mode

### Usage

```
bun run pillar/pillar.ts <subcommand> [options]
```

### Subcommands

#### connect

Connect to your Pillar smart wallet. Opens the Pillar website; if logged in, automatically connects and saves the wallet address locally.

```
bun run pillar/pillar.ts connect
```

#### disconnect

Disconnect from Pillar. Clears the locally stored wallet session.

```
bun run pillar/pillar.ts disconnect
```

#### status

Check if connected to Pillar and get the current wallet address.

```
bun run pillar/pillar.ts status
```

#### send

Send sBTC from your Pillar smart wallet. Opens the frontend for signing, then waits for confirmation.

```
bun run pillar/pillar.ts send --to <recipient> --amount <sats> [--recipient-type bns|wallet|address]
```

Options:
- `--to` (required) — Recipient: BNS name, Pillar wallet name, or Stacks address
- `--amount` (required) — Amount in satoshis
- `--recipient-type` (optional) — `bns` (default), `wallet`, or `address`

#### fund

Fund your Pillar smart wallet via exchange deposit, BTC wallet, or sBTC wallet.

```
bun run pillar/pillar.ts fund --method exchange|btc|sbtc [--amount <sats>]
```

Options:
- `--method` (required) — `exchange`, `btc`, or `sbtc`
- `--amount` (optional) — Amount in satoshis

#### add-admin

Add a backup admin address to your Pillar smart wallet for recovery.

```
bun run pillar/pillar.ts add-admin [--admin-address <SP...>]
```

Options:
- `--admin-address` (optional) — Stacks address to add as backup admin

#### supply

Earn yield by supplying sBTC to Zest Protocol. No leverage, no liquidation risk.

```
bun run pillar/pillar.ts supply [--amount <sats>]
```

Options:
- `--amount` (optional) — Amount in satoshis

#### auto-compound

Configure auto-compound for your Pillar wallet.

```
bun run pillar/pillar.ts auto-compound [--min-sbtc <sats>] [--trigger <sats>]
```

Options:
- `--min-sbtc` (optional) — Minimum sBTC to keep in wallet (sats)
- `--trigger` (optional) — Amount above minimum that triggers auto-compound (sats)

#### unwind

Close or reduce your leveraged sBTC position.

```
bun run pillar/pillar.ts unwind [--percentage <1-100>]
```

Options:
- `--percentage` (optional) — Percentage of position to unwind (1-100)

#### boost

Create or increase a leveraged sBTC position (up to 1.5x).

```
bun run pillar/pillar.ts boost [--amount <sats>]
```

Options:
- `--amount` (optional) — Amount in satoshis to boost

#### position

View your Pillar wallet balance and Zest position. Opens the position page in the browser.

```
bun run pillar/pillar.ts position
```

#### create-wallet

Create a new Pillar smart wallet. Opens the Pillar website to complete registration.

```
bun run pillar/pillar.ts create-wallet [--referral <wallet-address>]
```

Options:
- `--referral` (optional) — Referral wallet address

#### invite

Get your Pillar referral link to invite friends.

```
bun run pillar/pillar.ts invite
```

#### dca-invite

Invite a DCA partner by email or wallet address.

```
bun run pillar/pillar.ts dca-invite --partner <email-or-address>
```

Options:
- `--partner` (required) — Partner's email address or Stacks wallet address

#### dca-partners

View your DCA partners and weekly status.

```
bun run pillar/pillar.ts dca-partners
```

#### dca-leaderboard

View the DCA streak leaderboard.

```
bun run pillar/pillar.ts dca-leaderboard
```

#### dca-status

Check your DCA schedule status.

```
bun run pillar/pillar.ts dca-status
```

---

## pillar-direct.ts — Agent-Signed Direct Mode

### Usage

```
bun run pillar/pillar-direct.ts <subcommand> [options]
```

All direct operations are mainnet-only. Gas is sponsored by the Pillar backend.

### Key Management Subcommands

#### key-generate

Generate a new secp256k1 signing keypair. Returns the compressed public key.

```
bun run pillar/pillar-direct.ts key-generate [--smart-wallet <contract-id>]
```

Options:
- `--smart-wallet` (optional) — Smart wallet contract ID (default: "pending")

#### key-unlock

Unlock a signing key using the auto-derived password.

```
bun run pillar/pillar-direct.ts key-unlock [--key-id <id>]
```

Options:
- `--key-id` (optional) — Key ID to unlock (unlocks first stored key if omitted)

#### key-lock

Lock the signing key, clearing sensitive data from memory.

```
bun run pillar/pillar-direct.ts key-lock
```

#### key-info

Show signing key info: pubkey, smart wallet, lock status, and all stored keys.

```
bun run pillar/pillar-direct.ts key-info
```

### Direct Operation Subcommands

#### direct-boost

Create or increase a leveraged sBTC position (up to 1.5x). Agent-signed, no browser needed.

```
bun run pillar/pillar-direct.ts direct-boost --sbtc-amount <sats> --aeusdc-to-borrow <amount> --min-sbtc-from-swap <sats>
```

Options:
- `--sbtc-amount` (required) — sBTC amount in sats to supply as collateral
- `--aeusdc-to-borrow` (required) — aeUSDC amount to borrow (6 decimals)
- `--min-sbtc-from-swap` (required) — Min sBTC from swap in sats (slippage protection)

#### direct-unwind

Close or reduce your leveraged sBTC position. Agent-signed, no browser needed.

```
bun run pillar/pillar-direct.ts direct-unwind --sbtc-to-swap <sats> --sbtc-to-withdraw <sats> --min-aeusdc-from-swap <amount>
```

Options:
- `--sbtc-to-swap` (required) — sBTC to swap to aeUSDC for repayment (sats)
- `--sbtc-to-withdraw` (required) — sBTC to withdraw after repayment (sats)
- `--min-aeusdc-from-swap` (required) — Min aeUSDC from swap (6 decimals, slippage protection)

#### direct-supply

Earn yield by supplying sBTC to Zest. No leverage, no liquidation risk. Agent-signed.

```
bun run pillar/pillar-direct.ts direct-supply --sbtc-amount <sats>
```

Options:
- `--sbtc-amount` (required) — sBTC amount in sats to supply

#### direct-send

Send sBTC from your Pillar smart wallet. Agent-signed, no browser needed.

```
bun run pillar/pillar-direct.ts direct-send --to <recipient> --amount <sats> [--recipient-type bns|wallet|address]
```

Options:
- `--to` (required) — Recipient: BNS name, Pillar wallet name, or Stacks address
- `--amount` (required) — Amount in satoshis
- `--recipient-type` (optional) — `bns` (default), `wallet`, or `address`

#### direct-auto-compound

Configure auto-compound. Agent-signed, no browser needed.

```
bun run pillar/pillar-direct.ts direct-auto-compound --enabled true|false --min-sbtc <sats> --trigger <sats>
```

Options:
- `--enabled` (required) — Enable (`true`) or disable (`false`) auto-compound
- `--min-sbtc` (required) — Minimum sBTC to keep in wallet (sats)
- `--trigger` (required) — Amount above minimum that triggers auto-compound (sats)

#### direct-position

View your Pillar smart wallet balances and Zest position. No signing needed.

```
bun run pillar/pillar-direct.ts direct-position
```

#### direct-withdraw-collateral

Withdraw sBTC collateral from Zest. Agent-signed, no browser needed.

```
bun run pillar/pillar-direct.ts direct-withdraw-collateral --sbtc-amount <sats>
```

Options:
- `--sbtc-amount` (required) — sBTC amount in sats to withdraw

#### direct-add-admin

Add a backup admin address. Agent-signed, no browser needed.

```
bun run pillar/pillar-direct.ts direct-add-admin --new-admin <SP...>
```

Options:
- `--new-admin` (required) — Stacks address to add as backup admin

#### direct-create-wallet

Create a new Pillar smart wallet for agent direct operations. Generates keypair, unlocks it, and deploys.

```
bun run pillar/pillar-direct.
Files: 4
Size: 107.6 KB
Complexity: 45/100
Category: Web Dev

Related in Web Dev