Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
565 changes: 565 additions & 0 deletions plugins/brl-usdc-invoice/Cargo.lock

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions plugins/brl-usdc-invoice/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "brl-usdc-invoice"
version = "0.3.2"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "ZeroClaw tool: dual-rail BRL PIX + Solana USDC invoice (T1, no keys)"
publish = false

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
wit-bindgen = "0.46"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
solana-wasm-core = { path = "vendor/solana-wasm-core" }

[profile.release]
opt-level = "s"
lto = true
strip = true
codegen-units = 1

[workspace]
21 changes: 21 additions & 0 deletions plugins/brl-usdc-invoice/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 PixZClaw contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
469 changes: 469 additions & 0 deletions plugins/brl-usdc-invoice/README.md

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions plugins/brl-usdc-invoice/config.example.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Example operator config for brl-usdc-invoice (custody tier T1).
# In ZeroClaw this lands under the plugin's jailed section (name = brl-usdc-invoice)
# and is injected into `execute` as the flat `__config` map. All values are strings.

# --- PIX (BRL) receive identity — required ---
pix_key = "loja@empresa.com.br"
pix_name = "ACME LTDA"
pix_city = "SAO PAULO"

# --- Solana (USDC) receive identity — required ---
# Receive-only pubkey. There is no private key here and none is ever accepted.
merchant_solana = "YourBase58MerchantPubkey1111111111111111111"
usdc_mint = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

# --- Hard caps, enforced in code (not by prompt) ---
# An over-cap request fails closed: no PIX payload, no Solana Pay URL.
max_amount_brl = "1000"
max_amount_usdc = "200"

# --- Offline BRL/USDC quote (v1: no oracle HTTP; this plugin has no network) ---
brl_per_usdc = "5.5"

# --- Locks ---
# recipient_locked = true -> an agent-supplied `merchant_override` is ignored.
recipient_locked = "true"
# Comma-separated allowlist for `mint_override`; anything else fails closed.
allowed_mints = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

# --- Payment reminder CTA (default: true) ---
# Appends one merchant-only line to the invoice card offering a notification when
# the USDC arrives ("avisa quando a <id> pagar"). If the merchant accepts, the
# agent schedules a ZeroClaw cron job that polls the `invoice_status` tool and
# removes itself once the invoice settles. This plugin only prints the
# invitation — it neither schedules nor cancels anything, and holds no cron
# permission.
# Booleans accept 1 / true / yes / on (case-insensitive); a blank value keeps the
# default. Set to "false" to drop the line entirely.
watch_hint = "true"
7 changes: 7 additions & 0 deletions plugins/brl-usdc-invoice/manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "brl-usdc-invoice"
version = "0.3.2"
description = "Dual-rail invoice: PIX Copia e Cola (BRL) + Solana Pay USDC under one invoice_id. T1, no Solana keys."
author = "ZeroClaw Solana Bounty"
wasm_path = "brl_usdc_invoice.wasm"
capabilities = ["tool"]
permissions = ["config_read"]
Loading