🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@pushprotocol/frames-validator

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pushprotocol/frames-validator

Validator package to validate trustedData from Push Clients.

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

frames-validator

This package can be used by a frame server to validate incoming requests from a Push Chat Client and get the trustedData from it.

Installation

npm i @pushprotocol/frames-validator

Usage

import verifyFrameMessage from "@pushprotocol/frames-validator";

const {isValid, trustedData} = await verifyFrameMessage(trustedData);

Sample Response

  • Returns isValid as true if the user originally made this frame interaction, otherwise return isValid as false.
{
  isValid: true,
  trustedData: {
    url: 'frame_url',
    unixTimestamp: timestamp,
    buttonIndex: 3,
    inputText: '',
    state: '',
    transactionId: 'undefined',
    address: 'user_address',
    messageId: 'previous:v2:11bce1cdfdd3ce9c05b6aeb564be993e2176f2e823c9f16aa361aa67d8fb7883',
    chatId: 'chatid:c3ea478558ffcea3dc0d08f4d52629af1125b1577490d2c95c9f56d771c8186a',
    clientProtocol: 'push',
    env: 'staging'
  }
}

Keywords

push-chat

FAQs

Package last updated on 08 Apr 2024

Did you know?

Socket

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.

Install

Related posts