Create Base Groups for Your Community
Group creation is a write flow; Rust runner not available yet. Steps (for future runner integration):
- Choose group metadata (name/symbol) and policy.
- Register the group with Hub/Name Registry.
- Configure trusted collateral types for minting.
Read-only today:
- Query existing groups and memberships.
- Inspect group-related events.
Example: list groups
use circles_rpc::{QueryMethods, RpcClient};
use circles_types::{OrderBy, QueryParams};
use reqwest::Url;
#[derive(Debug, Clone, serde::Deserialize)]
struct GroupRowLite {
group: String,
name: Option<String>,
symbol: Option<String>,
}
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = RpcClient::http(Url::parse("https://rpc.aboutcircles.com/")?);
let queries = QueryMethods::new(client);
let rows: Vec<GroupRowLite> = queries
.circles_query(QueryParams {
namespace: "circles".into(),
table: "groups".into(),
columns: vec!["group".into(), "name".into(), "symbol".into()],
filter: vec![],
order: vec![OrderBy::asc("group".into())],
limit: Some(25),
})
.await?;
println!("groups: {}", rows.len());
Ok(())
}