Class Mintblue

The main SDK class. Instantiate this class using the Mintblue.create() function

  const token = 'YOUR SDK TOKEN';
const project_id = 'YOUR PROJECT ID*
const client = await Mintblue.create({ token: token *
const outputs = [
{
type: 'data',
value: 'Hello world',
sign: true,
encrypt: true,
},
];

const { txid, rawtx } = await client.createTransaction({ project_id, outputs });

Hierarchy

  • Mintblue

Methods

  • Create access token

    Parameters

    Returns Promise<{
        sdkToken: string;
        apiToken: string;
    }>

    SDK token & API token

  • Experimental

    Stream Project (experimental)

    This function allows you to stream experimental data from a project.

    Parameters

    Returns Promise<{
        close: (() => void);
    }>

    A promise that resolves with an object containing a close method. The close method can be used to gracefully close the streaming connection.

    This function is experimental and subject to change. Use it with caution.

  • Retrieves project data with the specified ID.

    Parameters

    • params: {
          id: string;
      }

      The parameters for retrieving the project.

      • id: string

        The ID of the project to retrieve.

    Returns Promise<Project>

    A promise that resolves with the retrieved project data.

  • Updates a project with the specified ID using the provided data.

    Parameters

    • params: {
          id: string;
          data: CreateProjectOptions;
      }

      The parameters for updating the project.

      • id: string

        The ID of the project to update.

      • data: CreateProjectOptions

        The data to update the project with.

    Returns Promise<Project>

    A promise that resolves with the updated project data.

  • Deletes a project with the specified ID.

    Parameters

    • params: {
          id: string;
      }

      The parameters for deleting the project.

      • id: string

        The ID of the project to delete.

    Returns Promise<void>

    A promise that resolves when the project is deleted.

  • Retrieves event listener data with the specified ID.

    Parameters

    • id: {
          id: string;
      }

      The ID of the event listener to retrieve.

      • id: string

    Returns Promise<EventListener>

    A promise that resolves with the retrieved event listener data.

  • Experimental

    Get Peppol Key information

    Returns {
        uncompressedPublicKey: string;
        compressedPublicKey: string;
        jwk: JWK;
        kid: string;
        info: string;
    }

    Object containing uncompressed public key in hex format.
    Read more about compressed and decompressed keys here

    • uncompressedPublicKey: string
    • compressedPublicKey: string
    • jwk: JWK
    • kid: string
    • info: string
  • Experimental

    Get Peppol Key information

    Returns Promise<{
        uncompressedPublicKey: string;
        compressedPublicKey: string;
        jwk: JWK;
        kid: string;
        info: string;
        SHA1Fingerprint: string;
    }>

    Object containing uncompressed public key in hex format.
    Read more about compressed and decompressed keys here

  • Experimental

    Get Signing Key information

    Returns Promise<{
        uncompressedPublicKey: string;
        compressedPublicKey: string;
        jwk: JWK;
        kid: string;
        info: string;
        SHA1Fingerprint: string;
    }>

    Object containing uncompressed public key in hex format.
    Read more about compressed and decompressed keys here

  • Experimental

    Get Derive Key information

    Returns Promise<{
        uncompressedPublicKey: string;
        compressedPublicKey: string;
        jwk: JWK;
        kid: string;
        info: string;
        SHA1Fingerprint: string;
    }>

    Object containing uncompressed public key in hex format.
    Read more about compressed and decompressed keys here

Generated using TypeDoc