0.5.13 • Published 1 year ago

@spool.fi/spool-sdk v0.5.13

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Spool SDK

Spool SDK is a stateless npm package written in TypeScript.
It is a facade that wraps RPC calls from and to the Spool smart contracts as well as API calls to subgraph and the Spool analytics server.

Production Mode

To use this package, import it as follows:

import {SpoolSdk, SpoolSdkParameters} from '@spool.fi/spool-sdk';

It needs to be initialized with correct parameters before it can be used.
Also, a web3 Provider object (or Signer) needs to be passed! provider = read-only

import type {BaseProvider} from '@ethersproject/providers';

const sdk = new SpoolSdk(
    providerOrSigner: BaseProvider | Signer,
    params: SpoolSdkParameters
)

The default config parameters can be found here.
Please make sure to pass only LOWER CASE addresses.

Once initialized, the SDK can be used to retrieve data like this:

sdk.spools.getAllSpools()

sdk.fees.getEstimatedFeesEarned(...)

Development

To install and use this npm package from source, run the following command (it generates types from smart contract ABIs)

npm i
npm run build:prod
0.5.10

1 year ago

0.5.11

1 year ago

0.5.12

1 year ago

0.5.13

1 year ago

0.5.8

1 year ago

0.5.7

1 year ago

0.5.9

1 year ago

0.5.7-dev.1

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.5.6

1 year ago

0.5.5

1 year ago

0.5.2

1 year ago

0.5.0-dev.3

2 years ago

0.5.6-dev.2

1 year ago

0.5.6-dev.1

1 year ago

0.5.0-dev.2

2 years ago

0.5.0

2 years ago

0.5.1

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.3.29

2 years ago

0.3.20

2 years ago

0.3.28

2 years ago

0.3.27

2 years ago

0.3.26

2 years ago

0.3.25

2 years ago

0.3.24

2 years ago

0.3.23

2 years ago

0.3.22

2 years ago

0.3.21

2 years ago

0.3.19

2 years ago

0.3.18

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.2

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.9

2 years ago

0.3.17

2 years ago

0.3.16

2 years ago

0.3.15

2 years ago

0.3.14

2 years ago

0.3.13

2 years ago

0.3.12

2 years ago

0.3.11

2 years ago

0.3.10

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.9

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.0.3

2 years ago

0.1.1

2 years ago

0.0.2

2 years ago

0.1.8

2 years ago

0.0.9

2 years ago

0.1.7

2 years ago

0.0.8

2 years ago

0.1.4

2 years ago

0.0.5

2 years ago

0.1.3

2 years ago

0.0.4

2 years ago

0.1.6

2 years ago

0.0.7

2 years ago

0.1.5

2 years ago

0.0.6

2 years ago

0.0.1

2 years ago