Skip to content

Commit

Permalink
Add publicKey field to actors
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyUnderStars committed Sep 26, 2023
1 parent fddc5cb commit 005727b
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 37 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Build and push
uses: alexthemaster/action-build-typescript@master
with:
pushToBranch: true
branch: "dist"
githubToken: ${{ secrets.GITHUB_TOKEN }}
81 changes: 45 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
{
"name": "activitypub-types",
"version": "1.0.3",
"description": "ActivityPub Typescript types",
"main": "./dist/index.js",
"scripts": {
"tsc": "tsc -p ./tsconfig.json",
"tsc:watch": "tsc -w -p ./tsconfig.json",
"lint:fix": "eslint --fix ."
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"eslint": "^8.36.0",
"typescript": "^4.9.5"
},
"keywords": [
"activitypub",
"typescript",
"types",
"models",
"activitystreams"
],
"files": [
"dist",
"LICENSE",
"README.md",
"package.json",
"package-lock.json"
],
"author": "SiranWeb <siranweb@tuta.io>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/SiranWeb/activitypub-types"
}
}
"name": "activitypub-types",
"version": "1.0.4",
"description": "ActivityPub Typescript types",
"main": "./dist/index.js",
"scripts": {
"build": "tsc",
"tsc:watch": "tsc -w",
"lint:fix": "eslint --fix ."
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"eslint": "^8.36.0",
"typescript": "^4.9.5"
},
"keywords": [
"activitypub",
"typescript",
"types",
"models",
"activitystreams"
],
"files": [
"dist",
"LICENSE",
"README.md",
"package.json",
"package-lock.json"
],
"contributors": [
{
"name": "SiranWeb",
"email": "siranweb@tuta.io"
},
{
"name": "Spacebarchat",
"url": "https://spacebar.chat"
}
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/spacebarchat/activitypub-types"
}
}
12 changes: 12 additions & 0 deletions src/model-interfaces/actors/actor.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,16 @@ export interface APActor extends APObject {
* {@link https://www.w3.org/TR/activitypub/#actors Docs}
*/
endpoints?: EndpointsField;

/**
* The public key of this actor, used to sign activities.
*/
publicKey?: {
/** The ID of this public key. Typically `https://example.com/users/username#main-key`. */
id: string;
/** The owner of this key. Typically matches actor ID. */
owner: string;
/** The RSA public key. */
publicKeyPem: string;
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"skipLibCheck": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"],
"exclude": ["node_modules"]
}

0 comments on commit 005727b

Please sign in to comment.