Available Contracts
The Rootz team and its partners have been developing a handful of basic contracts to employ. These all derive from the DataWallet but take advantage of a second base contract, the CreditRegistry. The Registry is used to manage a system of credits within the network. Each Service Provider (Epistery Agent) owns a CreditRegistry and selects the contracts it underwrites with gas.
Note: Please recognize that this is a pattern as much as a technology. There is no proscription for what can be a contract. The purpose is to establish a truly open market by equipping every entity with agency.
SecretsWallet
A secrets wallet contract is designed for use by people and machines. Developers would recognize this as AWS Secret Store or OCI Vault. It holds structured data on chain, encrypted and accessible only to the addresses on the access control list. Addresses with permission can modify the list and update the secrets. Authorized readers can request a uniquely keyed copy.
Example Usage
const body = {name:'secret', rosesAre:"red"}
const creationReceipt = await epistery.post('/agent/SecretsWallet/FlowerSecret/create', body)
const data = await epistery.get('/agent/SecretsWallet/FlowerSecret/data');
console.log(data.value===body); // true
const authReceipt = await epistery.post('/agent/SecretsWallet/FlowerSecret/authorize/0x00bd2f7a0...');
// now that address can also read the secret.
// Data can be requested directly with the url, but the result is encrypted for the address owner
AdWallet
An AdWallet contains an online ad package. Currently this only handles a traditional set of text, subtext, graphic (with variants) and a link. The meta data provides the ownership information including reference links to the Advertiser, the Agent and possibly creative accreditation. It further carries common terms identifying audience and restrictions.
The AdWallet is equipped with credits by the agent who mints it. These credits are used to pay the hosting site. The AdWallet will accumulate all transactions. When the ad runs out of credits it won't serve itself. The Advertiser and Agent can request the transaction report from the Ad. The Agent will be responsible for bridging credits to real world value.
Read more at https://epistery.geistm.com
Publisher Integration
For the publisher, equipping a page to use AdWallets is a little javascript:
// the publisher specifies suitable ads (this is better registered in the server side config)
const profile = await (await (fetch.get('/adProfile')).json());
const elem = document.querySelector('#AdBannerOne', profile);
// epistery forwards the request to the configured agent
await epistery.get('/agent/adWallet/place', elem, {presentation:"banner"});
Build Your Own Contract
Epistery is designed to be extensible. You can create custom contracts for your specific use cases.
Get Started View API Documentation