mirror of
https://github.com/penxio/penx.git
synced 2026-01-15 00:18:08 -05:00
11 lines
275 B
TypeScript
11 lines
275 B
TypeScript
import { IPFS_ADD_URL } from '@penx/constants'
|
|
|
|
export async function addToIpfs(value: string) {
|
|
const res = await fetch(IPFS_ADD_URL, {
|
|
method: 'POST',
|
|
body: value,
|
|
headers: { 'Content-Type': 'application/json' },
|
|
}).then((d) => d.json())
|
|
return res.cid
|
|
}
|