
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@gofynd/fp-signature
Advanced tools
Fynd platform's signature logic
FP-Signature is a versatile npm package that provides signature logic for Fynd platform requests. This package supports both CommonJS and ES modules, and it also comes with a web bundle for direct usage in browsers.
You can install FP-Signature via npm:
npm install @gofynd/fp-signature
const { sign } = require("@gofynd/fp-signature");
import { sign } from "@gofynd/fp-signature";
<script src="https://cdn.jsdelivr.net/npm/@gofynd/fp-signature@{version}"></script>
<script>
// FP-Signature library will be attached to the global window object
FPSignature.sign();
</script>
To use FP-Signature in Postman as a pre-script, include the postman_prescript.js file in the pre-script section of your Postman collection.
Change the FP-Signature package version within the pre-script according to your requirements.
sign functionThe sign function is used to generate a signature. It takes two parameters: request and options.
It will return the signature string directly.
The library generates a signature for your request. Include the returned signature string in the x-fp-signature header to sign the request.
Note: The
x-fp-datetimestamp is required for signature generation. You must include it in your request headers or query parameters. This timestamp helps prevent replay attacks and is used in the signature generation process. The timestamp should be in ISO 8601 format without colons, dashes, or milliseconds (e.g.,20240101T120000Z).
type RequestParam = {
method: string;
host?: string;
port?: number;
path?: string;
headers?: any;
body?: any;
doNotEncodePath?: boolean;
doNotModifyHeaders?: boolean;
};
type SigningOptions = {
secret: string;
}
function sign(request : RequestParam, options: SigningOptions) : string {}
RequestParam ObjectThe RequestParam object is used to configure the details of the HTTP request that needs to be signed.
method: (string, required) - HTTP method for the request (e.g., "GET", "POST").
host: (string, optional) - The host of the server. Ex: developer.mozilla.org:4097, api.fyndx5.de
port: (number, optional) - The port number of the server.
path: (string, optional) - The path of the request URL with query parameters(if any).
headers: (object, optional) - Custom headers for the request. Exclude default headers like common, delete, get, head, post, put, patch. Note: The x-fp-date header is required for signature generation.
body: (any, optional) - The body of the request.
doNotEncodePath: (boolean, optional) - If true, the path will not be URL encoded.
doNotModifyHeaders: (boolean, optional) - If true, headers will not be modified during signing.
const requestToSign = {
method: "GET",
host: "api.fynd.com",
path: "/service/application/configuration/v1.0/application?queryParam=value",
headers: {
Authorization: "Bearer <authorizationToken>",
"x-currency-code": "INR",
"x-fp-date": new Date().toISOString().replace(/[:\-]|\.\d{3}/g, "")
},
};
// For Common JS
// const {sign} = require("@gofynd/fp-signature")
// For ES Module
import {sign} from "@gofynd/fp-signature";
const requestToSign = {
method: "GET",
host: "api.fynd.com",
path: "/service/application/configuration/v1.0/application",
headers: {
Authorization: "Bearer <authorizationToken>",
"x-currency-code": "INR",
"x-fp-date": new Date().toISOString().replace(/[:\-]|\.\d{3}/g, "")
},
};
const signature = sign(requestToSign, { secret: 'your-secret-key' });
// Use the signature as needed - add to headers, query params, etc.
console.log('Generated signature:', signature);
FAQs
Fynd platform's signature logic
The npm package @gofynd/fp-signature receives a total of 3,715 weekly downloads. As such, @gofynd/fp-signature popularity was classified as popular.
We found that @gofynd/fp-signature demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.