1.47.0 • Published 3 days ago

@arianee/arianee-privacy-gateway-client v1.47.0

Weekly downloads
-
License
-
Repository
-
Last release
3 days ago

@arianee/arianee-privacy-gateway-client

This is a TypeScript library that provides a client to interact with the Arianee Privacy Gateway. The Arianee Privacy Gateway is used to retrieve content of private non-fungible tokens (NFTs).

Usage

To use the library, you need to import the ArianeePrivacyGatewayClient class and create a new instance of it with the following parameters:

  • auth: An instance of the Core class from the @arianee/core package, an Arianee access token as a string, or an object containing a message and a signature.
  • fetchLike: A function that behaves like the fetch function, used to make HTTP requests.

The ArianeePrivacyGatewayClient class provides the following methods:

certificateRead

This method retrieves the (original) content of a NFT. If the NFT was updated, you need to use updateRead instead.

async certificateRead(
  rpcUrl: RpcUrl,
  {
    certificateId,
    passphrase,
  }: {
    certificateId: string;
    passphrase?: string;
  }
): Promise<ArianeeProductCertificateI18N>;
  • rpcUrl: The URL of the arianee privacy gateway rpc.
  • certificateId: The ID of the certificate to retrieve the content of.
  • passphrase (optional): The passphrase of the certificate

updateRead

This method retrieves the updated content of a NFT.

async updateRead(
  rpcUrl: RpcUrl,
  {
    certificateId,
    passphrase,
  }: {
    certificateId: string;
    passphrase?: string;
  }
): Promise<ArianeeProductCertificateI18N>;
  • rpcUrl: The URL of the arianee privacy gateway rpc.
  • certificateId: The ID of the certificate to retrieve the updated content of.
  • passphrase (optional): The passphrase of the certificate

messageRead

This method retrieves the content of a private NFT message.

async messageRead(
  rpcUrl: RpcUrl,
  {
    messageId,
  }: {
    messageId: string;
  }
): Promise<ArianeeMessageI18N>;
  • rpcUrl: The URL of the arianee privacy gateway rpc.
  • messageId: The ID of the message to retrieve content of.

eventRead

This method retrieves the content of a private NFT event.

async eventRead(
  rpcUrl: RpcUrl,
  {
    certificateId,
    eventId,
    passphrase,
  }: {
    certificateId: string;
    eventId: string;
    passphrase?: string;
  }
): Promise<ArianeeEventI18N>;
  • rpcUrl: The URL of the arianee privacy gateway rpc.
  • certificateId: The ID of the certificate that the event belongs to.
  • eventId: The ID of the event to retrieve the content of.
  • passphrase (optional): The passphrase of the certificate

Authentication

The library supports two types of authentication: Arianee access tokens and message/signature authentication. If you pass an instance of the Core class as the auth parameter, the library will use an Arianee access token generated using the Core instance to authenticate requests. If you pass an object with a message and a signature property, the library will use message/signature authentication.

1.47.0

3 days ago

1.46.0

27 days ago

1.45.0

1 month ago

1.44.0

1 month ago

1.43.0

1 month ago

1.42.0

1 month ago

1.41.0

2 months ago

1.39.0

2 months ago

1.40.0

2 months ago

1.38.0

2 months ago

1.37.0

2 months ago

1.35.0

2 months ago

1.36.0

2 months ago

1.34.0

2 months ago

1.33.0

3 months ago

1.32.0

3 months ago

1.31.0

3 months ago

1.30.1

3 months ago

1.30.0

4 months ago

1.29.2

4 months ago

1.29.1

4 months ago

1.29.0

4 months ago

1.27.0

4 months ago

1.26.0

4 months ago

1.28.0

4 months ago

1.25.0

4 months ago

1.24.0

4 months ago

1.23.0

4 months ago

1.22.0

4 months ago

1.21.0

5 months ago

1.20.0

5 months ago

1.19.0

5 months ago

1.14.0

5 months ago

1.12.0

5 months ago

1.18.0

5 months ago

1.16.0

5 months ago

1.15.0

5 months ago

1.13.0

5 months ago

1.17.0

5 months ago

1.11.1

6 months ago

1.11.0

6 months ago

1.10.0

6 months ago

1.9.0

6 months ago

1.8.0

6 months ago

1.6.1

6 months ago

1.2.0

7 months ago

1.1.0

7 months ago

1.0.0

7 months ago

0.21.0

9 months ago

0.20.0

10 months ago

1.7.0

7 months ago

1.6.0

7 months ago

1.5.0

7 months ago

1.4.0

7 months ago

1.3.0

7 months ago

0.15.0

10 months ago

0.18.0

10 months ago

0.26.0

7 months ago

0.25.0

7 months ago

0.24.0

7 months ago

0.23.0

8 months ago

0.22.0

8 months ago

0.11.0

10 months ago

0.13.0

10 months ago

0.9.0

11 months ago

0.8.0

11 months ago

0.5.0

11 months ago

0.7.0

11 months ago

0.6.0

11 months ago

0.5.1

11 months ago

0.4.0

12 months ago

0.3.0

12 months ago

0.2.0

12 months ago

0.1.0

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago