curl and jq.
1
Search for a beneficiary
Search takes a name and returns charities and campaigns together. Here it is limited to
charities. No key is needed.An example answer:Keep the
type and the id of the result you want. Together they are the beneficiary.2
Read the charity
A search result is a summary. Read the charity in full to show it to a person.The answer starts with the same seven fields and adds
description, websiteUrl,
registrationNumber, country, location, socials, eligible and stats.
The coin page guide has the whole response. Its
stats, as an example:eligible says whether the charity can go into a new config. Amounts in stats are US dollars
times 10^6 in a string, so "228998452896" is $228,998.45.3
Create a config
A config names up to five beneficiaries and gives each a weight. This one sends everything to
one charity. This call needs your key.The call answers
201 with the config. Its id is written twice, as the same 32 bytes: id is
0x hex for EVM contracts and idBase58 is for Solana. Either works in an API path.Sending the same beneficiaries and weights again returns the same config with 200, so a retry
is safe.4
Read the config back
Anyone can read a config by id. No key is needed.An example answer. The id illustrates the shape, and yours differs:That is the whole config: who is paid and in what proportion. It has no fee and no names. It
never changes, so you can keep this answer.
5
Quote the fee a donation pays
Before you ask a donor to sign, ask what fee applies now. Pass the chain the donor pays on and
the address the donation is credited to, which is usually the donor’s wallet. An example answer:
101 is Solana.
The address below is a placeholder nobody holds.feeBps is in basis points: 2000 is 20%. The quote is an estimate, not a locked rate. Ask
again just before the donor signs.What you have now
A config id. A donation made on-chain against that id pays the beneficiaries in it.- To send the donation, pass the id to the Solana program or an EVM contract.
- To build a full product flow, pick a guide: a coin that donates, a donate button or a campaign page.
- To split between several beneficiaries, read configs and weights.
- To show who a coin pays, read its config beneficiaries by config id.