[go: up one dir, main page]

Skip to content

Push SDK is a growing Monorepo of packages that provide solutions for a wide range of development tasks one might come across while building on top of Push protocol. It is a Javascript-based group of packages that enables easy usage of imperative communication tools for Web3

Notifications You must be signed in to change notification settings

push-protocol/push-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Push Protocol is a web3 communication network, enabling cross-chain notifications and messaging for dapps, wallets, and services.🚀

dashboard

Introduction

What is Push Protocol?

Push Protocol, previously known as EPNS, is a Web3 communication protocol that enables any dApps, smart contracts, backends, or protocols to communicate both on-chain and off-chain via user wallet addresses in an open, gasless, multichain, and platform-agnostic fashion.

What We Do

Being an open communication middleware, Push is building a suite of products to enable notifications, chats, streaming, and more. We currently have two major products, Push Notifications and Push Chat.

Features

apis   data-models

own-your-code   customize-code

own-your-code  



PUSH-SDK

Push SDK provides an abstraction layer to integrate Push protocol features with your Frontend as well as Backend

PUSH SDK is a Javascript based Monorepo of packages that helps developers to

  • build PUSH features into their DApps
    • Notifications
    • Chat
    • Group Chat
    • Push NFT Chat
    • Video Calls
  • get access to PUSH Push Nodes APIs
  • render PUSH Notifications UI

without having to write a lot of boilerplate code. All the heavy lifting is done by the SDK, so that you the developer can focus on building features and bootstrap a DApp with PUSH features in no time!

The SDK provides a suite of solutions for different problems. It is written in Typescript and supports React, React Native, Plain JS, Node JS based platforms. (We are adding support for more!)

It is also built on top of standard Web3 packages like ethers, @web3-react

Development

Packages available

Click on the packages to view more details.

Sample Usage

How to use a package from the SDK?

Let's take @pushprotocol/restapi as an example.

Open a teminal and enter

mkdir sdk-quickstart
cd sdk-quickstart

# at sdk-quickstart, hit enter for all if no change from default intended
yarn init 

# or NPM
npm init

If you want to use ES6 Modules syntax then inside package.json set “type” to “module”.

# install the sdk "restapi" package & its peer dependencies in your app
yarn add @pushprotocol/restapi ethers

# or NPM
npm install @pushprotocol/restapi ethers
touch main.js

For CommonJS Syntax

// import in main.js
const PushAPI = require("@pushprotocol/restapi");

OR

For ES6 modules Syntax

// import in main.js
import * as PushAPI from "@pushprotocol/restapi";
// use a feature from restapi package,
// here "getFeeds" gets all the notifications for the user address provided
const main = async() => {
  const notifications = await PushAPI.user.getFeeds({
    user: 'eip155:11155111:0xD8634C39BBFd4033c0d3289C4515275102423681', // user address in CAIP
    env: 'staging'
  });

  // log the notifications 
  console.log('notifications: \n\n', notifications);
}

main();

Then to run this code open terminal and type

node main

Resources

  • Website To checkout our Product.
  • Docs For comprehensive documentation.
  • Blog To learn more about our partners, new launches, etc.
  • Discord for support and discussions with the community and the team.
  • GitHub for source code, project board, issues, and pull requests.
  • Twitter for the latest updates on the product and published blogs.

Contributing

Push Protocol is an open source Project. We firmly believe in a completely transparent development process and value any contributions. We would love to have you as a member of the community, whether you are assisting us in bug fixes, suggesting new features, enhancing our documentation, or simply spreading the word.

  • Bug Report: Please create a bug report if you encounter any errors or problems while utilising the Push Protocol.
  • Feature Request: Please submit a feature request if you have an idea or discover a capability that would make development simpler and more reliable.
  • Documentation Request: If you're reading the Push documentation and believe that we're missing something, please create a docs request.

Read how you can contribute HERE

Not sure where to start? Join our discord and we will help you get started!

Discord

License

Check out our License HERE

About

Push SDK is a growing Monorepo of packages that provide solutions for a wide range of development tasks one might come across while building on top of Push protocol. It is a Javascript-based group of packages that enables easy usage of imperative communication tools for Web3

Resources

Stars

Watchers

Forks

Packages

No packages published