Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.46 KB

README.md

File metadata and controls

49 lines (36 loc) · 1.46 KB

JavaScript Crypto helpers for Sorare

@sorare/crypto is a JavaScript library (TypeScript types included) providing various crypto functions to be used to sign your Sorare LimitOrder objects in order to make a bid, create or accept an offer. It can be used in both NodeJS and Browser environments.

Functions

signLimitOrder

The signLimitOrder(privateKey, limitOrder) function is used to sign a LimitOrder object with a Sorare private key.

import { signLimitOrder } from '@sorare/crypto';

const privateKey = /* Your Sorare private key */;
const limitOrder = /* The LimitOrder object you get from GraphQL */;

const signature = signLimitOrder(privateKey, limitOrder);

Release

  • Bump version in package.json
  • Run yarn release

License

@sorare/crypto is MIT licensed.