21.0.0 • Published 8 months ago

@penumbra-zone/client v21.0.0

Weekly downloads
-
License
(MIT OR Apache-2....
Repository
-
Last release
8 months ago

@penumbra-zone/client

This package allows developers to create dApps that connect to Penumbra providers and query the Penumbra blockchain.

You can check this package in action in the NextJS example repo or read the Architecture Decision Record (ADR-006) describing the idea behind this package.

A simple example

import { PenumbraClient } from '@penumbra-zone/client';
import { ViewService } from '@penumbra-zone/protobuf';

const penumbra = createPenumbraClient();

// Get the `Record<string, PenumbraProvider>` – an object with keys as
// provider origin URIs and values as PenumbraProvider instances.
const providers = PenumbraClient.getProviders();

// Choose a provider to connect to
const someProviderOrigin: keyof providers = Object.keys(providers)[0];

// Get the provider's manifest – info about this provider with name, description, icons, etc.
const manifest = await penumbra.getProviderManifest(someProviderOrigin);
console.log(manifest.name); // e.g. "Prax wallet"

// Connect to the provider – user must approve the origin
await penumbra.connect(someProviderOrigin);

// Get a view service – a private query service to access the user's data from the provider
const address0 = penumbra.service(ViewService).getAddressByIndex({ account: 0 });
21.0.0

8 months ago

20.0.0

8 months ago

19.0.0

9 months ago

6.1.0

1 year ago

10.0.0

12 months ago

10.0.1

12 months ago

18.0.1

10 months ago

18.0.0

10 months ago

12.0.0

11 months ago

4.2.0

1 year ago

11.0.0

12 months ago

11.0.1

12 months ago

5.0.0

1 year ago

15.0.0

11 months ago

6.0.1

1 year ago

6.0.0

1 year ago

14.0.0

11 months ago

13.0.0

11 months ago

7.0.0

1 year ago

18.1.0

10 months ago

8.0.0

1 year ago

17.0.0

11 months ago

4.1.2

1 year ago

9.0.1

12 months ago

16.0.0

11 months ago

9.0.0

12 months ago

11.1.1

11 months ago

11.1.0

11 months ago

4.1.1

1 year ago

4.1.0

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.0.0

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago