https://github.com/matrixesports/ceratosaur
☄️ Wrapper for interact with the Ceramic Network API in Deno (WIP)
https://github.com/matrixesports/ceratosaur
ceramic
Last synced: 5 months ago
JSON representation
☄️ Wrapper for interact with the Ceramic Network API in Deno (WIP)
- Host: GitHub
- URL: https://github.com/matrixesports/ceratosaur
- Owner: matrixesports
- Created: 2021-12-11T19:41:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-05T23:59:14.000Z (over 4 years ago)
- Last Synced: 2025-10-20T17:51:59.435Z (9 months ago)
- Topics: ceramic
- Language: TypeScript
- Homepage: https://deno.land/x/ceratosaur
- Size: 16.6 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Ceratosaur ☄️
Ceratosaur is a Wrapper for interact with the [Ceramic Network](https://ceramic.network) HTTP API
Get it from 🦕 [**deno.land**](https://deno.land/x/ceratosaur) or [**nest.land**](https://nest.land/package/ceratosaur) 🥚
## Example
Ceratosaur is built in a way that you can use as you like, you can use the base functions, specify the database URL, or use the `ceramic` function.
**Get Stream**
With `ceramic`
```ts
import { ceramic } from "https://deno.land/x/ceratosaur/mod.ts";
const database = ceramic("http://localhost:7007");
// this automatically concatenates the url with /api/v0/streams
ceramic.getStream(
"k2t6wyfsu4pg2qvoorchoj23e8hf3eiis4w7bucllxkmlk91sjgluuag5syphl",
);
```
with `getStream` function
```ts
import { getStream } from "https://deno.land/x/ceratosaur/mod.ts";
// you need specify /api/v0/streams
getStream(
"http://localhost:7007/api/v0/streams",
"k2t6wyfsu4pg2qvoorchoj23e8hf3eiis4w7bucllxkmlk91sjgluuag5syphl",
);
```
**Create stream**
With `ceramic`
```ts
import { ceramic } from "https://deno.land/x/ceratosaur/mod.ts";
const database = ceramic("http://localhost:7007");
const awesomeStream = ceramic.createStream();
console.log(awesomeStream.streamId);
```
with `createStream` function
```ts
import { createStream } from "https://deno.land/x/ceratosaur/mod.ts";
const awesomeStream = createStream("http://localhost:7007/api/v0/streams");
console.log(awesomeStream.streamId);
```
## Useful Links
[**Documentation**](https://doc.deno.land/https://deno.land/x/ceratosaur/mod.ts)