diff --git a/classes/Entropy.html b/classes/Entropy.html index c305eb5f..076e0f86 100644 --- a/classes/Entropy.html +++ b/classes/Entropy.html @@ -1,5 +1,5 @@ Entropy | @entropyxyz/sdk

The main class to handle all interactions within the Entropy SDK.

-

Constructors

Constructors

Properties

Constructors

  • Parameters

    Returns Entropy

    Example

    import { Entropy, wasmGlobalsReady } from '@entropyxyz/sdk'
    import { Keyring } from '@entropyxyz/sdk/keys'

    async function main () {
    const keyring = new Keyring({ seed })
    const entropy = new Entropy({ keyring })

    await wasmGlobalsReady()
    await entropy.ready
    }

    main()
    -

Properties

keyring: Keyring

Accessor for the keyring passed at instantiation

-
programs: default
ready: Promise<boolean>

A promise that resolves once all internal setup has been successfully completed.

-
registrationManager: default
signingManager: default
substrate: ApiPromise

(Advanced) Accessor for the raw subtate API.

-

Methods

  • Shuts the Entropy SDK down gracefully. +

Properties

keyring: Keyring

Accessor for the keyring passed at instantiation

+
programs: default
ready: Promise<boolean>

A promise that resolves once all internal setup has been successfully completed.

+
registrationManager: default
signingManager: default
substrate: ApiPromise

(Advanced) Accessor for the raw subtate API.

+

Methods

  • Shuts the Entropy SDK down gracefully. Closes substrate connections for you.

    -

    Returns Promise<void>

  • Registers a new account with the provided parameters.

    +

    Returns Promise<void>

  • Registers a new account with the provided parameters.

    Parameters

    • Optional params: RegistrationParams

      The registration parameters.

    Returns Promise<string>

    A promise that resolves to the verifying key for the new account when the registration is complete.

    Throws

    If the address is already registered or if there's a problem during registration.

    -
  • Signs a signature request hash. +

  • Signs a signature request hash. This method involves various steps including validator selection, transaction request formatting, and submission of these requests to validators for signing. It returns the signature from the first validator after validation.

    Parameters

    • params: SigOps

      The signature operation parameters.

    Returns Promise<Uint8Array>

    A promise that resolves to the signed hash as a Uint8Array.

    Throws

    If there's an error in the signing routine.

    -
  • Parameters

    • params: SigWithAdaptersOps

    Returns Promise<unknown>

\ No newline at end of file +
\ No newline at end of file diff --git a/classes/Keyring.html b/classes/Keyring.html index 15a6df55..1b79a1f3 100644 --- a/classes/Keyring.html +++ b/classes/Keyring.html @@ -1,5 +1,5 @@ Keyring | @entropyxyz/sdk

A utility class to allow consumers of the SDK to subscribe to key creations and "account" updates.

-

Constructors

Constructors

Properties

Methods

getAccount @@ -8,11 +8,11 @@

Parameters

  • account: KeyMaterial

    The key material (or account) used for key generation.

Returns Keyring

Example

import { Keyring } from '@entropyxyz/sdk/keys'

const keyring = new Keyring({
seed: '0xbc1ede780f784bb6991a585e4f6e61522c14e1cae6ad0895fb57b9a205a8f938'
})

keyring.accounts.on('account-update', (fullAccount) => {
// TODO: persist this
})
-

Properties

accounts: AccountsEmitter

The accounts

-
crypto: Crypto

Methods

  • Retrieves the current account information.

    +

Properties

accounts: AccountsEmitter

The accounts

+
crypto: Crypto

Methods

  • Retrieves the current account information.

    Returns EntropyAccount

    An object containing the Entropy account details.

    -
  • Lazily loads a key proxy for a given type. +

  • Lazily loads a key proxy for a given type. This is so we dont just generate a bunch of useless keys that are getting stored for no reason

    Parameters

    • childKey: ChildKey

    Returns Signer

    A Signer proxy object.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/functions/wasmGlobalsReady.html b/functions/wasmGlobalsReady.html index 1357111b..b1926d87 100644 --- a/functions/wasmGlobalsReady.html +++ b/functions/wasmGlobalsReady.html @@ -1 +1 @@ -wasmGlobalsReady | @entropyxyz/sdk

Function wasmGlobalsReady

  • Returns Promise<void>

\ No newline at end of file +wasmGlobalsReady | @entropyxyz/sdk

Function wasmGlobalsReady

  • Returns Promise<void>

\ No newline at end of file diff --git a/interfaces/EntropyOpts.html b/interfaces/EntropyOpts.html index 026d860b..c2d763e3 100644 --- a/interfaces/EntropyOpts.html +++ b/interfaces/EntropyOpts.html @@ -1,8 +1,8 @@ -EntropyOpts | @entropyxyz/sdk

Interface EntropyOpts

interface EntropyOpts {
    adapters?: {
        [key: string | number]: Adapter;
    };
    endpoint?: string;
    keyring: Keyring;
}

Properties

adapters? +EntropyOpts | @entropyxyz/sdk

Interface EntropyOpts

interface EntropyOpts {
    adapters?: {
        [key: string | number]: Adapter;
    };
    endpoint?: string;
    keyring: Keyring;
}

Properties

adapters?: {
    [key: string | number]: Adapter;
}

A collection of adapters used for signing messages of particular types. These help with formatting, configuring hash functions to use, etc.

-

Type declaration

  • [key: string | number]: Adapter
endpoint?: string

A websocket endpoint for establishing a connection to validators

-
keyring: Keyring

Keyring used to manage all the keys Entropy uses

-
\ No newline at end of file +

Type declaration

  • [key: string | number]: Adapter
endpoint?: string

A websocket endpoint for establishing a connection to validators

+
keyring: Keyring

Keyring used to manage all the keys Entropy uses

+
\ No newline at end of file