From d1f80a1bbd3f9450c33159fe5d71373b1e29eb58 Mon Sep 17 00:00:00 2001 From: Codetrauma Date: Sat, 9 Aug 2025 14:09:05 -0400 Subject: [PATCH] feat: cleaning up plugins --- examples/axis_bank/src/index.ts | 6 +++--- examples/discord_dm/package.json | 2 +- examples/discord_dm/src/index.d.ts | 1 - examples/discord_profile/package.json | 2 +- examples/id_me/package.json | 2 +- examples/id_me/src/index.d.ts | 2 +- examples/id_me/src/index.ts | 6 +++--- examples/spotify/src/index.ts | 5 ++--- 8 files changed, 12 insertions(+), 14 deletions(-) diff --git a/examples/axis_bank/src/index.ts b/examples/axis_bank/src/index.ts index 11e6393..ca7a0ea 100644 --- a/examples/axis_bank/src/index.ts +++ b/examples/axis_bank/src/index.ts @@ -40,7 +40,7 @@ export function start() { /** * Implementation of step "two". - * This step collects and validates authentication cookies and headers for 'api.x.com'. + * This step collects and validates authentication cookies and headers for 'axisbank.com'. * If all required information, it creates the request object. * Note that the url needs to be specified in the `config` too, otherwise the request will be refused. */ @@ -94,10 +94,10 @@ export function two() { } /** - * This method is used to parse the Twitter response and specify what information is revealed (i.e. **not** redacted) + * This method is used to parse the Axis Bank response and specify what information is revealed (i.e. **not** redacted) * This method is optional in the notarization request. When it is not specified nothing is redacted. * - * In this example it locates the `screen_name` and excludes that range from the revealed response. + * In this example it locates the `CUST_NAME` and excludes that range from the revealed response. */ export function parseAxisResp() { console.log("parseAxisResp: Starting function"); diff --git a/examples/discord_dm/package.json b/examples/discord_dm/package.json index 28ec6a2..e00de33 100644 --- a/examples/discord_dm/package.json +++ b/examples/discord_dm/package.json @@ -1,7 +1,7 @@ { "name": "discord_dm", "version": "1.0.0", - "description": "Demo TLSNotary plugin to notarize the ownership of a twitter profile", + "description": "Demo TLSNotary plugin to notarize the ownership of a discord DM", "main": "src/index.ts", "scripts": { "build": "node esbuild.js" diff --git a/examples/discord_dm/src/index.d.ts b/examples/discord_dm/src/index.d.ts index 836eb4a..f153510 100644 --- a/examples/discord_dm/src/index.d.ts +++ b/examples/discord_dm/src/index.d.ts @@ -4,7 +4,6 @@ declare module 'main' { export function parseDiscordDm(): I32; export function three(): I32; export function config(): I32; - export function parseDiscordDm(): I32; } declare module 'extism:host' { diff --git a/examples/discord_profile/package.json b/examples/discord_profile/package.json index a2d24e9..f9a20b3 100644 --- a/examples/discord_profile/package.json +++ b/examples/discord_profile/package.json @@ -1,7 +1,7 @@ { "name": "discord_profile", "version": "1.0.0", - "description": "Demo TLSNotary plugin to notarize the ownership of a twitter profile", + "description": "Demo TLSNotary plugin to notarize the ownership of a discord profile", "main": "src/index.ts", "scripts": { "build": "node esbuild.js" diff --git a/examples/id_me/package.json b/examples/id_me/package.json index 5c37a67..f4851c4 100644 --- a/examples/id_me/package.json +++ b/examples/id_me/package.json @@ -1,7 +1,7 @@ { "name": "idme_profile", "version": "1.0.0", - "description": "Demo TLSNotary plugin to notarize the ownership of a twitter profile", + "description": "Demo TLSNotary plugin to notarize the ownership of a id.me profile", "main": "src/index.ts", "scripts": { "build": "node esbuild.js" diff --git a/examples/id_me/src/index.d.ts b/examples/id_me/src/index.d.ts index 4870904..228e2df 100644 --- a/examples/id_me/src/index.d.ts +++ b/examples/id_me/src/index.d.ts @@ -2,7 +2,7 @@ declare module 'main' { // Extism exports take no params and return an I32 export function start(): I32; export function two(): I32; - export function parseTwitterResp(): I32; + export function parseIdentity(): I32; export function three(): I32; export function config(): I32; } diff --git a/examples/id_me/src/index.ts b/examples/id_me/src/index.ts index a296dcc..d75e34e 100644 --- a/examples/id_me/src/index.ts +++ b/examples/id_me/src/index.ts @@ -63,7 +63,7 @@ export function start() { /** * Implementation of step "two". - * This step collects and validates authentication cookies and headers for 'api.x.com'. + * This step collects and validates authentication cookies and headers for 'account.id.me'. * If all required information, it creates the request object. * Note that the url needs to be specified in the `config` too, otherwise the request will be refused. */ @@ -99,10 +99,10 @@ export function two() { } /** - * This method is used to parse the Twitter response and specify what information is revealed (i.e. **not** redacted) + * This method is used to parse the ID.me response and specify what information is revealed (i.e. **not** redacted) * This method is optional in the notarization request. When it is not specified nothing is redacted. * - * In this example it locates the `screen_name` and excludes that range from the revealed response. + * In this example it locates the `full_name` and excludes that range from the revealed response. */ export function parseIdentity() { const bodyString = Host.inputString(); diff --git a/examples/spotify/src/index.ts b/examples/spotify/src/index.ts index c3610fa..af7fc04 100644 --- a/examples/spotify/src/index.ts +++ b/examples/spotify/src/index.ts @@ -35,7 +35,7 @@ export function start() { /** * Implementation of step "two". - * This step collects and validates authentication cookies and headers for 'api.x.com'. + * This step collects and validates authentication cookies and headers for 'api.spotify.com'. * If all required information, it creates the request object. * Note that the url needs to be specified in the `config` too, otherwise the request will be refused. */ @@ -53,9 +53,8 @@ export function two() { url: 'https://api.spotify.com/v1/me/top/artists?time_range=medium_term&limit=1', method: 'GET', headers: { - 'x-twitter-client-language': 'en', 'x-csrf-token': headers['x-csrf-token'], - Host: 'api.x.com', + Host: 'api.spotify.com', authorization: headers.authorization, Connection: 'close', },