3.8.0 • Published 1 year ago

@orcaprotocol/orca-sdk v3.8.0

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

orca-sdk

Todo: update readme

Getting Started

Initialize the SDK with the init function on startup:

import { init } from '@orcaprotocol/orca-sdk';

// Any ethers provider works.
// 1 for mainnet, 5 for goerli.
// Make sure that the provider is instantiated before the SDK
init({ provider: ethers.getDefaultProvider(), network: 1 });

Once you init the SDK, you can call getPod(), getUserPods(), or getAdminPods() anywhere to fetch Pod objects.

import { getPod, getUserPods, getAdminPods } from '@orcaprotocol/orca-sdk';

const podFromEnsName = await getPod('mypod.pod.xyz');
// ENS names also work for the below.
const podFromAddress = await getPod('0x123...456');
const podFromId = await getPod(1);

// Returns null
const notAPod = await getPod('not a pod');

// Fetches all Pods that a user is a member of
const userPods = await getUserPods(userAddress);

// Fetches all Pods that a user is an admin of
const adminPods = await getAdminPods(adminAddress);

Types

Types can be imported as such:

import { Pod, Proposal } from '@orcaprotocol/orca-sdk';

Additional Documentation

Additional documentation can be found here

Test Scripts

We have some test scripts to test approve/reject proposals and super proposals. They can be executed by duplicating the env-examples.json with private keys in env.json, and executing the transactions with npx ts-node ./scripts/reject-superproposal.ts.

3.8.0

1 year ago

3.4.0

1 year ago

3.6.1

1 year ago

3.6.0

1 year ago

3.7.1

1 year ago

3.7.0

1 year ago

3.5.1

1 year ago

3.5.0

1 year ago

3.3.14

1 year ago

3.3.9

2 years ago

3.3.8

2 years ago

3.3.7

2 years ago

3.3.13

2 years ago

3.3.10

2 years ago

3.3.11

2 years ago

3.3.12

2 years ago

3.3.6

2 years ago

3.2.2

2 years ago

3.2.3

2 years ago

3.3.1

2 years ago

3.3.0

2 years ago

3.3.5

2 years ago

3.3.4

2 years ago

3.3.3

2 years ago

3.3.2

2 years ago

1.6.3

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

3.2.1

2 years ago

3.2.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

3.1.3

2 years ago

3.1.2

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.1.7

2 years ago

3.1.6

2 years ago

3.1.5

2 years ago

3.1.4

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.9

2 years ago

1.5.8

2 years ago

1.5.7

2 years ago

1.5.6

2 years ago

1.5.5

2 years ago

1.4.6

2 years ago

1.5.4

2 years ago

1.4.5

2 years ago

1.5.3

2 years ago

1.4.4

2 years ago

1.5.2

2 years ago

1.4.3

2 years ago

1.5.1

2 years ago

1.4.2

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.0.6

2 years ago

1.1.4

2 years ago

1.0.5

2 years ago

1.1.3

2 years ago

1.0.4

2 years ago

1.3.0

2 years ago

1.1.2

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago