SOHO Pay - Credit Layer Payments
This skill allows the agent to initiate payments through the SOHO Pay Creditor smart contract using the spendWithAuthorization EIP-712 flow.
The agent signs the payment authorization off-chain using a pre-configured wallet, and then submits the transaction to the network on the user's behalf.
Core Command
The primary way to use this skill is with a natural language command that maps to:
pay <amount> to <merchant_address>
<amount>: The numerical amount to pay (e.g.,10,0.5).<merchant_address>: The recipient EVM address (0x...). Names are not supported and no random addresses are ever generated by this skill.
Workflow
When triggered, the skill's script performs the following actions:
- Parse Inputs: Extracts the amount and merchant address from the user's request.
- Validate Merchant Address: Confirms that the merchant is a valid EVM address; otherwise it aborts.
- Pre-Flight Checks: Before signing, it runs a series of checks to ensure the transaction is likely to succeed:
- Verifies the borrower is registered and active.
- Checks if the borrower has a sufficient credit limit.
- Generate Authorization: Creates an EIP-712 typed data message for the payment.
- Sign Off-Chain: Uses the configured
PRIVATE_KEYwallet (from environment variables) to sign the authorization message. - Execute On-Chain: Calls the
spendWithAuthorizationfunction on theCreditorcontract, providing the signed message. - Report Result: Returns the transaction hash to the user upon confirmation.
Configuration
- Environment Variable (runtime): The private key for the signing wallet must be provided via the
PRIVATE_KEYenvironment variable. - Skill Metadata: The skill declares
PRIVATE_KEYas a required, sensitive credential, intended only for testnet signing. - Network: All transactions are performed on the Base Sepolia testnet. The script will abort if connected to mainnet or any non-Base-Sepolia chain.
Defaults
The following values are hardcoded into the script for consistency:
- Creditor Contract:
0x669324C8c8011c3C0cA31faFBdD9C76219C06dB1 - Borrower Manager:
0xFdcb4abf261944383dbac37cB8E9147E50E2a609 - Asset (USDC):
0x08B1797bB535C4cf86f93424137Cb3e004476624(6 decimals) - Payment Plan ID:
0
Security & Testnet Usage
- This skill requires a TESTNET-ONLY private key. Do not use a mainnet or real-funds wallet.
- It is designed only for Base Sepolia. The script enforces the Base Sepolia
chainIdand aborts on mainnet or any other network. - The agent cannot auto-invoke this skill; it must be called manually by a user or higher-level workflow.
- The merchant must be provided as an explicit
merchant_address. If the address is wrong, funds on the testnet may be irrecoverably sent to the wrong account. - No random address generation is performed. The skill will refuse non-address merchant inputs.
Example Usage
pay 10 to 0x1234567890abcdef1234567890abcdef12345678
This command will trigger a payment of 10 USDC to the specified address on Base Sepolia, signed by the configured testnet wallet.