Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@masa-finance/zksbt-cookie
Advanced tools
Readme
A customizable, easy-to-use React component for connecting to cookie monster, written in TypeScript.
This package provides built-in support for tracking different types of events:
These events can be easily integrated into your application to gather insights about user interactions.
firePageViewEvent
function is provided to send a page visit event to your API. It takes the following parameters:
page
: A unique identifier of the page visited.user_address
: The users wallet address.import { useCookieMonster } from "@masa-finance/zksbt-cookie";
const { firePageViewEvent } = useCookieMonster({
clientApp: "My App",
clientName: "My Company Name",
});
// Track a page visit event
const user_address = "0x742d35Cc6634C0532925a3b844Bc454e4438f44e";
const page = "https://your-site.example.com/page1";
void firePageViewEvent(page, user_address);
fireLoginEvent
function is provided to send a login event to your API. It takes the following parameters:
user_address
: The users wallet address.import { useCookieMonster } from "@masa-finance/zksbt-cookie";
const { fireLoginEvent } = useCookieMonster({
clientApp: "My App",
clientName: "My Company Name",
});
// Track a login event
const user_address = "0x742d35Cc6634C0532925a3b844Bc454e4438f44e";
void fireLoginEvent(user_address);
fireMintEvent
function is provided to send a mint event to your API. It takes the following parameters:
user_address
: The users wallet address.network
: The blockchain network of the mint operation.contract_address
: The address of the contract of the mint operation.token_name
: The token name of the contract of the mint operation.ticker
: The ticker of the contract of the mint operation.token_type
: The type of the contract of the mint operation.import { useCookieMonster } from "@masa-finance/zksbt-cookie";
const { fireMintEvent } = useCookieMonster({
clientApp: "My App",
clientName: "My Company Name",
});
// Track a mint event
const user_address = "0x742d35Cc6634C0532925a3b844Bc454e4438f44e";
const network = "goerli";
const contract_address = "0x742d35Cc6634C0532925a3b844Bc454e4438f44e";
const token_name = "My SBT Project";
const ticker = "MSP";
const token_type = "SBT";
void fireMintEvent(
user_address,
network,
contract_address,
token_name,
ticker,
token_type
);
These events can be used to monitor user interactions with your website, helping you make data-driven decisions and improve the user experience.
You can install the @masa-finance/zksbt-cookie
package using either npm or yarn:
npm install @masa-finance/zksbt-cookie
yarn add @masa-finance/zksbt-cookie
Before publishing to npm, ensure that you have all the required dependencies installed:
npm install
Next, build the package:
npm run build
Now, you should see a dist
folder containing the compiled JavaScript files.
To publish the package to npm, first log in to your npm account using the command line:
npm login
Enter your username, password, and email when prompted.
Finally, publish the package:
npm publish
Your package is now published to npm and can be installed and used in other projects.
We welcome contributions from the community! If you'd like to contribute to this project, please follow these steps:
For bug reports and feature requests, please create an issue on GitHub.
zksbt-cookie
is released under the MIT License.
By adding these sections, your README will be more comprehensive and provide all the necessary information for developers to use, contribute to, and understand the licensing of your package.
FAQs
A customizable, easy-to-use React component for displaying a cookie consent banner on your website, written in TypeScript.
The npm package @masa-finance/zksbt-cookie receives a total of 2 weekly downloads. As such, @masa-finance/zksbt-cookie popularity was classified as not popular.
We found that @masa-finance/zksbt-cookie demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.