0.0.2-alpha.8 • Published 2 years ago

@nickadamson/sdk v0.0.2-alpha.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

This is a work in progress. The API is not yet stable, and is subject to change, including breaking changes. Contributions welcome.

Valorem TypeScript SDK

This is a TypeScript SDK for interacting with Valorem's smart contracts and Trade API.

Installation

npm i @valorem-labs-inc/sdk
pnpm i @valorem-labs-inc/sdk
yarn add @valorem-labs-inc/sdk

Getting Started

import { createPublicClient, createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { arbitrumGoerli } from 'viem/chains';
import { ValoremSDK } from '@valorem-labs-inc/sdk';

// set up viem clients
const account = privateKeyToAccount(YOUR_PRIVATE_KEY);
const publicClient = createPublicClient({
  chain: arbitrumGoerli,
  transport: http(),
});
const walletClient = createWalletClient({
  account,
  chain: arbitrumGoerli,
  transport: http(),
});

// init Valorem SDK
const valoremSDK = new ValoremSDK({
  publicClient,
  walletClient,
});

Usage

const webTaker = valoremSDK.webTaker;
await webTaker.signIn();
// now you can send requests to the Trade API

A full example of using the Valorem Typescript SDK to create an option, request a quote, and fulfill a trade order is located here: @valorem-labs-inc/trade-interfaces/examples/typescript/src/RFQ_taker.ts.

Documentation

For documentation, visit https://valorem-labs-inc.github.io/typescript-sdk/

0.0.2-alpha.8

2 years ago

0.0.2-alpha.7

2 years ago

0.0.2-alpha.6

2 years ago

0.0.2-alpha.5

2 years ago

0.0.2-alpha.4

2 years ago

0.0.2-alpha.3

2 years ago

0.0.2-alpha.2

2 years ago

0.0.2-alpha.1

2 years ago

0.0.11-dev31

2 years ago

0.0.11-dev30

2 years ago

0.0.11-dev29

2 years ago

0.0.11-dev28

2 years ago

0.0.11-dev27

2 years ago

0.0.2-alpha.0

2 years ago

0.0.11-dev26

2 years ago

0.0.11-dev25

2 years ago

0.0.11-dev24

2 years ago

0.0.11-dev23

2 years ago

0.0.11-dev22

2 years ago

0.0.11-dev21

2 years ago

0.0.11-dev20

2 years ago

0.0.11-dev19

2 years ago

0.0.11-dev18

2 years ago

0.0.11-dev16

2 years ago

0.0.11-dev15

2 years ago

0.0.11-dev14

2 years ago

0.0.11-dev13

2 years ago

0.0.11-dev12

2 years ago

0.0.11-dev11

2 years ago

0.0.11-dev10

2 years ago

0.0.11-dev9

2 years ago

0.0.11-dev8

2 years ago

0.0.11-dev7

2 years ago

0.0.11-dev6

2 years ago

0.0.11-dev5

2 years ago

0.0.11-dev4

2 years ago

0.0.11-dev3

2 years ago

0.0.11-dev2

2 years ago

0.0.11-dev1

2 years ago

0.0.11-dev0

2 years ago

0.0.10-dev

2 years ago

0.0.10-dev8

2 years ago

0.0.10-dev7

2 years ago

0.0.10-dev6

2 years ago

0.0.10-dev5

2 years ago

0.0.10-dev4

2 years ago

0.0.10-dev3

2 years ago

0.0.10-dev2

2 years ago

0.0.10-dev1

2 years ago

0.0.10-dev0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago