You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@canvas-js/interfaces

Package Overview
Dependencies
Maintainers
3
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canvas-js/interfaces

This package includes interfaces for Canvas signed data. Most developers should not use this directly, except to import TypeScript types when copying signed data to other databases and data stores.

0.2.0
npmnpm
Version published
Weekly downloads
678
-38.75%
Maintainers
3
Weekly downloads
 
Created
Source

@canvas-js/interfaces

This package includes interfaces for Canvas signed data. Most developers should not use this directly, except to import TypeScript types when copying signed data to other databases and data stores.

Default Canvas types

  • Action: An object that carries the signed data, signature, and optionally a session field if the payload was signed using a session address.
  • ActionPayload: The default signed data for a user interaction. This includes a function call and its arguments.
  • Session: An object that carries the signed data and signature for a session.
  • SessionPayload: The default signed data for initiating a session. This includes a signature, timestamp, and for applications that read from blockchain data, it also includes a blockhash to tie the session to a specific block on the chain.

Collectively, we refer to actions and sessions as messages. When replicating Canvas data across nodes, we typically store messages in a MessageStore, which stores them in a database and MST.

Custom Actions

Canvas will also support custom action payloads. More documentation on this will be included in an upcoming release.

FAQs

Package last updated on 06 Mar 2023

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