Socket
Socket
Sign inDemoInstall

@musakui/fedi

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

4

package.json

@@ -13,3 +13,3 @@ {

},
"version": "0.0.1",
"version": "0.0.2",
"type": "module",

@@ -20,3 +20,3 @@ "files": [

"exports": {
"hs": {
"./hs": {
"node": "./lib/hs/node.js",

@@ -23,0 +23,0 @@ "default": "./lib/hs/index.js"

@@ -5,1 +5,29 @@ # Fediverse Tools

## Install
```sh
$ npm i @musakui/fedi
```
## Usage
### HTTP Signatures
```js
import * as HS from '@musakui/fedi/hs'
import { readFileSync } from 'fs'
HS.useKey('[keyId]', readFileSync('./private.pem'))
const resp = await HS.sendRequest({
url: 'https://mastodon.social/inbox',
headers: {
'content-type': 'application/activity+json',
},
body: JSON.stringify({
// some ActivityPub object
}),
})
console.log(await resp.text())
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc