Automate the full flow: wallet connect → karpak-life registration → SBT mint. Zero external dependencies — uses Node.js built-in modules + browser bridge for wallet interactions.
Activate when the user's message contains any of:
KARPAK-LIFEkarpak-lifeThe skill runs a local HTTP bridge server that serves an embedded HTML page. When a wallet interaction (signing or transaction) is needed, it opens the user's default browser to a page that triggers MetaMask. The result is posted back to the local server, and the script continues.
No Puppeteer/Playwright required. No external npm packages needed.
EnvironmentAPI BaseSBT URLChaintestnethttps://devnet-lifestyle-api.karpak.xyz``https://devnet.paratrix-sbt.pages.devBSC Testnet (97)mainnethttps://lifestyle-api.karpak.xyz``https://sbt.karpak.xyzBSC Mainnet (56)
--env is required — always pass --env=testnet or --env=mainnet. If the user doesn't specify an environment, ask them which one before running.
Before running the script, you MUST scan the user's message for these parameters. Extract them from natural language and map to CLI flags:
User may sayExtract to CLI flagExample extractionNickname: qqqqq or name is qqqqq``--nickname=qqqqqAny string after "nickname/name"Twitter: @abc or twitter abc``--twitter=abcStrip leading @ if presentIdentity: HUMAN or type is AGENT``--identity=IDENTITY_TYPE_HUMANPrefix with IDENTITY_TYPE_, uppercaseEnvironment: testnet or env is mainnet``--env=testnet``testnet or mainnet``Wallet: 0xABC... or address 0xABC...``--wallet=0xABC...Must start with 0x
If the user provides a parameter, you MUST pass it. Never silently drop user-provided values.
If a parameter is NOT provided by the user, omit the flag entirely — the script will auto-generate nicknames/twitter. Exception: --env is always required — if the user doesn't specify, ask them (testnet or mainnet) before running.
User says:
karpak-life-register
Please register my wallet on Karpak Life and mint the Soulbound Token.
Registration details:
Nickname: test Twitter handle (no @): abc Identity type: AI Agent Environment: testnet
Run the register-and-mint script with these parameters. Open browser bridge when wallet interaction is needed. Report the final result when done.
You run:
bash
node ${HERMES_SKILL_DIR}/register-and-mint.mjs --nickname=test --twitter=abc --identity=IDENTITY_TYPE_AGENT --env=testnet
User says:
karpak-life-register
Please register my wallet on Karpak Life and mint the Soulbound Token.
Registration details:
Nickname: test Twitter handle (no @): abc Identity type: AI Agent
Run the register-and-mint script with these parameters. Open browser bridge when wallet interaction is needed. Report the final result when done.
You run:
bash
node ${HERMES_SKILL_DIR}/register-and-mint.mjs --nickname=test --twitter=abc --identity=IDENTITY_TYPE_AGENT --env=mainnet
User says:
karpak-life-register, nickname: alice, identity: HUMAN, env: mainnet
You run:
bash
node ${HERMES_SKILL_DIR}/register-and-mint.mjs --nickname=alice --identity=IDENTITY_TYPE_HUMAN --env=mainnet
Construct the CLI command from extracted parameters and run:
bash
node ${HERMES_SKILL_DIR}/register-and-mint.mjs [OPTIONS]
Path Resolution:
${HERMES_SKILL_DIR}is automatically replaced with the skill's absolute directory at load time.
FlagDefaultDescription--nickname=NAMEAuto-generated ( karpak_agent_XXXXXXXX)Display name on karpak-life--identity=TYPE``IDENTITY_TYPE_HUMAN``IDENTITY_TYPE_HUMAN or IDENTITY_TYPE_AGENT``--twitter=USERAuto-generatedTwitter username for SBT (no @)--wallet=0x...(via bridge)Skip wallet connect step--env=testnet|mainnet_(required)_Target environment
text
┌─────────────┐ ┌──────────────┐ ┌───────────────┐
│ 1. Connect │────▶│ 2. IssueNonce│────▶│ 3. Sign msg │
│ wallet │ │ (API) │ │ (MetaMask) │
└─────────────┘ └──────────────┘ └───────┬───────┘
│
▼
┌──────────────┐ ┌──────────────────────────────────────┐
│ 5. Profile? │◀───▶│ 4. Verify → accountStatus │
│ (if needed)│ │ PROFILE_REQUIRED → set profile │
└──────┬───────┘ │ CREDENTIAL_REQUIRED → mint SBT │
│ │ ACTIVE → done! │
▼ └──────────────────────────────────────┘
┌─────────────────────────────────────────────────────┐
│ 6. Mint SBT Flow: │
│ credentialMintConfig → mint-signature → │
│ MetaMask tx → wait confirm → verify credential │
└─────────────────────────────────────────────────────┘
The script opens the browser exactly twice (or once if already registered):
Each browser tab auto-closes after the user acts.
Before minting, the script calls GET /api/mint-status on the SBT server. If mintEnded is true, the mint is skipped and the user is notified. This prevents attempting to mint when the campaign has ended.
The script handles these errors gracefully:
ErrorBehaviorNo wallet extensionReports to user, exitsUser rejects signatureReports to user, exitsUser rejects transactionReports to user, exitsNonce expiredSuggests retryInvalid tokenSuggests re-loginTransaction revertedReports on-chain failureTimeout (120s)Reports timeout, exits
text
ACCOUNT_STATUS_PROFILE_REQUIRED → PUT /v1/me → CREDENTIAL_REQUIRED or ACTIVE
ACCOUNT_STATUS_CREDENTIAL_REQUIRED → mint SBT → ACTIVE
ACCOUNT_STATUS_ACTIVE → done
VariableDefaultDescriptionKARPAK_ENV—Target environment (alternative to --env)KARPAK_NICKNAME(auto)Default nicknameKARPAK_IDENTITY``IDENTITY_TYPE_HUMANIdentity typeKARPAK_TWITTER(auto)Default Twitter handleKARPAK_WALLET(bridge)Pre-set wallet addressBRIDGE_PORTrandom 3000-4000Local bridge server port