Skip to content

EqualFiLabs/ski

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@equalfi/ski

Interactive Session Key Installer for EqualFi.

Install & Run

pnpm dlx @equalfi/ski

Commands

pnpm dlx @equalfi/ski            # init (interactive)
pnpm dlx @equalfi/ski list       # list stored keys
pnpm dlx @equalfi/ski show --label position-1
pnpm dlx @equalfi/ski test --label position-1 --rpc http://127.0.0.1:8545 --tba 0x... --module 0x...

What it does

  • Prompts for Position NFT id and Validation Entity ID
  • Generates a fresh session EOA
  • Stores encrypted keystore at ~/.openclaw/keys/equalfi/<label>.json
  • Stores the password in your OS keychain (one prompt) via @napi-rs/keyring
  • Prints the session key address to paste into the UI

Flags

  • --label <label>: use a specific label (e.g., position-1)
  • --json: output JSON (works with init/list/show/test)

Runtime helper (for agents)

This package also exposes helpers to execute calls via executeWithRuntimeValidation using the session key.

const { loadSessionWallet, buildRuntimeAuthorization, executeWithRuntimeValidation } = require('@equalfi/ski');

const wallet = await loadSessionWallet('position-1');
// build runtime authorization
const data = '0x...'; // ABI-encoded call (e.g., nonce())
const { authorization } = await buildRuntimeAuthorization({
  moduleAddress: '0xSessionKeyValidationModule',
  account: '0xTBA',
  entityId: 7,
  sender: wallet.address,
  value: 0n,
  data,
  sessionWallet: wallet,
  chainId: 31337,
});

// or send directly
await executeWithRuntimeValidation({
  rpcUrl: 'http://127.0.0.1:8545',
  tbaAddress: '0xTBA',
  moduleAddress: '0xSessionKeyValidationModule',
  entityId: 7,
  data,
  value: 0n,
  sessionWallet: wallet,
  chainId: 31337,
});

Notes

  • Default label is position-<tokenId>
  • If the key already exists, it asks before overwriting

Output example

✅ Session key created
Address: 0xabc...
Label:   position-1
Entity:  7
Stored:  ~/.openclaw/keys/equalfi/position-1.json

Then paste the address into the EqualFi UI Session Key Address field and click Install Session Key Module.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors