Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@masa-finance/analytics-sdk

Package Overview
Dependencies
Maintainers
5
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@masa-finance/analytics-sdk - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

dist/src/config.d.ts

6

dist/package.json
{
"name": "@masa-finance/analytics-sdk",
"version": ".0.0",
"main": "dist/index.js",
"version": "0.0.2",
"main": "dist/src/index.js",
"license": "MIT",

@@ -15,2 +15,3 @@ "scripts": {

"devDependencies": {
"@types/node": "^20.6.1",
"@types/uuid": "^9.0.4",

@@ -21,2 +22,3 @@ "prettier": "^3.0.3",

"dependencies": {
"axios": "^1.5.0",
"ethers": "5",

@@ -23,0 +25,0 @@ "uuid": "^9.0.1"

@@ -1,6 +0,5 @@

import { Signer } from "ethers";
export declare const generateSignature: (wallet: Signer, client_app: string, client_name: string) => Promise<{
message: string;
signature: string;
}>;
export * from "./interfaces";
export { generateSignature } from "./tools";
export { logEvent } from "./event-logger";
export { MasaAnalytics } from "./masa-analytics";
//# sourceMappingURL=index.d.ts.map
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateSignature = void 0;
const uuid_1 = require("uuid");
// Function to generate a random nonce using a UUID
const generateRandomNonce = () => {
return (0, uuid_1.v4)();
};
const generateSignature = (wallet, client_app, client_name) => __awaiter(void 0, void 0, void 0, function* () {
// Generate a unique nonce
const nonce = generateRandomNonce();
// Log the generated nonce
console.log("Nonce:", nonce);
// Request body
const requestBody = {
client_app,
client_name,
};
// Convert the request body to a string
const requestBodyString = JSON.stringify(requestBody);
// Construct the message to sign, including the nonce and request body
const message = `Please sign this message to confirm your request. Nonce: ${nonce}. Request Body: ${requestBodyString}`;
// Sign the message
const signature = yield wallet.signMessage(message);
return {
message,
signature,
};
});
exports.generateSignature = generateSignature;
exports.MasaAnalytics = exports.logEvent = exports.generateSignature = void 0;
__exportStar(require("./interfaces"), exports);
var tools_1 = require("./tools");
Object.defineProperty(exports, "generateSignature", { enumerable: true, get: function () { return tools_1.generateSignature; } });
var event_logger_1 = require("./event-logger");
Object.defineProperty(exports, "logEvent", { enumerable: true, get: function () { return event_logger_1.logEvent; } });
var masa_analytics_1 = require("./masa-analytics");
Object.defineProperty(exports, "MasaAnalytics", { enumerable: true, get: function () { return masa_analytics_1.MasaAnalytics; } });
//# sourceMappingURL=index.js.map
{
"name": "@masa-finance/analytics-sdk",
"version": "0.0.2",
"version": "0.0.3",
"main": "dist/src/index.js",

@@ -15,2 +15,3 @@ "license": "MIT",

"devDependencies": {
"@types/node": "^20.6.1",
"@types/uuid": "^9.0.4",

@@ -21,2 +22,3 @@ "prettier": "^3.0.3",

"dependencies": {
"axios": "^1.5.0",
"ethers": "5",

@@ -23,0 +25,0 @@ "uuid": "^9.0.1"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc