New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@calimero-network/calimero-client

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@calimero-network/calimero-client

Javascript library to interact with Calimero P2P node

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

SDK publish gh action npm version

Daytona logo

TypeScript Client SDK Overview

The Calimero TypeScript Client SDK helps developers interact with decentralized apps by handling server communication. It simplifies the process, letting you focus on building your app while the SDK manages the technical details. Built with TypeScript, it ensures a smoother development experience with reliable tools.

The SDK has two main parts: RpcClient for sending queries and updates to the server, and SubscriptionsClient for subscribing to real-time updates. Both are designed to be easy to use and flexible, making it simple to adapt to future updates.

Quick Examples

  1. Using JsonRpcClient:

    const rpcClient = new JsonRpcClient(
      process.env['NEXT_PUBLIC_API_URL'],
      '/jsonrpc',
    );
    const params = {
      applicationId: process.env['NEXT_PUBLIC_APPLICATION_ID'],
      method: 'create_post',
      argsJson: { title: 'My First Post', text: 'This is my first post' },
    };
    const response = await rpcClient.mutate(params);
    console.log(response);
    
  2. Using WsSubscriptionsClient:

    const subscriptionsClient = new WsSubscriptionsClient(
      process.env['NEXT_PUBLIC_API_URL'],
      '/ws',
    );
    await subscriptionsClient.connect();
    subscriptionsClient.subscribe([process.env['NEXT_PUBLIC_APPLICATION_ID']]);
    subscriptionsClient.addCallback((data) => console.log(data));
    

The SDK keeps things simple, letting you build decentralized apps efficiently without worrying about server details.

FAQs

Package last updated on 03 Dec 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

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