Expand description
This module provides WASM bindings to functionality needed in a client application using the IOP Stack™. Network related asynchronous code is provided in the TypeScript part of the SDK and is not done from these WASM bindings.
Structs§
- IString
Array - JsBip32
- Entry point to generate extended private keys in a hierarchical deterministic wallet starting from a seed based on the BIP-0032 standard (and the SLIP-0010 for crypto suites other than Secp256k1).
- JsBip39
- Tool for generating, validating and parsing BIP-0039 phrases in different supported languages.
- JsBip44
- Entry point to generate a hierarchical deterministic wallet using the BIP-0044 standard. It is a more structured way to use the same seed for multiple coins, each with multiple accounts, each accounts with a new key for each transaction request. The standard is built on BIP-0043 using the purpose code 44. And BIP-0043 itself uses BIP-0032 to derive all nodes from a single master extended private key.
- JsBip32
Node - In BIP-0032 each extended private key has the same operations, independently from the actual path. This struct represents such an extended private key in a given subtree.
- JsBip32
Public Node - In BIP-0032 a neutered extended private key is an extended public key. This object represents such an extended public key in a given subtree. It is able to do normal (public) derivation, signature verification, creating and validating key identifiers
- JsBip39
Phrase - An intermediate object that represents a BIP39 phrase with a known language
- JsBip44
Account - Represents the private API of a given account of a given coin in the BIP32 tree.
- JsBip44
Coin - Represents a given coin in the BIP32 tree.
- JsBip44
Key - Represents the private API of a key with a given index within a sub-account used on the chain for storing balance or authenticating actions.
- JsBip44
Public Account - Represents the public API of a given account of a given coin in the BIP32 tree.
- JsBip44
Public Key - Represents a public key with a given index within a sub-account used on the chain for verifying signatures or validating key identifiers.
- JsBip44
Public SubAccount - Public API for a sub-account of a given account on a given coin that is either used for external keys (receiving addresses) or internal keys (change addresses). Some implementations do not distinguish these and just always use receiving addresses.
- JsBip44
SubAccount - Private API for a sub-account of a given account on a given coin that is either used for external keys (receiving addresses) or internal keys (change addresses). Some implementations do not distinguish these and just always use receiving addresses.
- JsCoeus
Asset - JsCoeus
TxBuilder - JsDid
- An object representing a valid DID. This identifier can be used to look up a DID document on multiple blockchains. Without any on-chain SSI transactions, there will be a single key that can update and impersonate the DID, which has the default key identifier.
- JsDomain
Name - JsHydra
Parameters - Parameters of a Hydra account added to a {@link Vault}
- JsHydra
Plugin - Represents a Hydra account in a given vault.
- JsHydra
Private - Private keys of a Hydra account in a vault.
- JsHydra
Public - Public keys of a Hydra account in a vault.
- JsHydra
Signer - Thin adapter around {@link SecpPrivateKey} for signing Hydra transactions.
- JsHydra
TxBuilder - Builder for core Hydra transactions on a given network.
- JsJwt
Builder - Builder object for creating and signing a JWT (JSON Web Token) with or without an associated content.
- JsJwt
Parser - Parser for reading a JWT (JSON Web Token) from a string and validate its content and signature.
- JsMKey
Id - Multicipher key id (fingerprint/digest/hash of a public key)
- JsMPrivate
Key - Multicipher private key
- JsMPublic
Key - Multicipher public key
- JsMSignature
- Multicipher signature
- JsMorpheus
- Starting point for deriving all Morpheus related keys in a BIP32 hierarchy. Morpheus uses Ed25519 cipher and currently there are no WASM wrappers for Bip32 nodes with that cipher. Still, Bip32 paths are returned by each object so compatible wallets can derive the same extended private keys.
- JsMorpheus
Asset Builder - Builder for a {@link IMorpheusAsset}.
- JsMorpheus
Kind - Root node of a specific kind of DIDs. The kind used to derive a DID is indistiguishable outside the wallet.
- JsMorpheus
Operation Builder - Builder for operations on a given DID. These operations can be later added to a {@link MorpheusOperationSigner} even for different DIDs, so the operations can be signed by a multicipher {@link PrivateKey} that has update rights on these DIDs.
- JsMorpheus
Operation Signer - Builder object for collecting SSI operations into a bundle signed by a single multicipher {@link PrivateKey} that has update rights on all DIDs being altered in those operations.
- JsMorpheus
Plugin - Represents the Morpheus subtree in a given vault.
- JsMorpheus
Private - Private keys of the Morpheus subtree in a vault.
- JsMorpheus
Private Key - The operations on an identifier that require the private key to be available in memory.
- JsMorpheus
Private Kind - Private keys for a given DID kind in the Morpheus subtree in a vault.
- JsMorpheus
Public - Public keys of the Morpheus subtree in a vault.
- JsMorpheus
Public Key - The operations on an identifier that do not require the private key to be available in memory.
- JsMorpheus
Public Kind - Public keys for a given DID kind in the Morpheus subtree in a vault.
- JsMorpheus
Root - Representation of the root node of the Morpheus subtree in the HD wallet.
- JsMorpheus
Signable Operation - An object representing a single SSI operation on a single DID. This operation is not yet signed by a key with update rights on the DID document, and therefore needs to be added to a {@link MorpheusOperationSigner}
- JsMorpheus
Signed Operation - A set of SSI operations already signed by a key that had update rights on all DIDs altered by the operations.
- JsMorpheus
TxBuilder - Builder for SSI Hydra transactions.
- JsNonced
Bundle - JsNonced
Bundle Builder - JsPrice
- JsPrincipal
- JsSecp
KeyId - Secp256k1 key id (fingerprint/digest/hash of a public key)
- JsSecp
Private Key - Secp256k1 private key
- JsSecp
Public Key - Secp256k1 public key
- JsSecp
Signature - Secp256k1 signature
- JsSeed
- The seed used for BIP32 derivations. A seed cannot be turned back into a phrase, because there is salted hashing involed in creating it from the BIP39 mnemonic phrase.
- JsSigned
Bundle - JsSigned
Bytes - Binary data signed by a multicipher key.
- JsSigned
Json - JSON signed by a multicipher key. Since the signature is done on a digest created by {@link digestJson}, the same signature can be validated against different selectively revealed JSON documents.
- JsSubtree
Policies - JsUser
Operation - JsValidation
Issue - A single issue found while validating against a DID document.
- JsValidation
Result - All issues found while validating against a DID document.
- JsVault
- This object provides a safe serialization format for an in-rest encoded vault file for the IOP Stack™.
Traits§
- Wraps
- Most WASM types are wrapping a Rust type one-on-one. This trait helps to enforce a convention so that WASM types can easily peek under the hood of other such wrapped WASM types.
- Wraps
Mut - Most WASM types are wrapping a Rust type one-on-one. This trait helps to enforce a convention so that WASM types can easily peek under the hood of other such wrapped WASM types.
Functions§
- all_
network_ names - The list of all network names accepted by {@link validateNetworkName}
- decrypt
- Decrypts the ciphertext with a password. The format of the ciphertext is defined by the {@link encrypt} function. Only the matching password will decrypt the ciphertext.
- digest
- Calculates the digest of a JSON document. Since this digest is calculated by recursively replacing sub-objects with their digest, it is possible to selectively reveal parts of the document using {@link selectiveDigestJson}
- encrypt
- Encrypts the plaintext with a password. Make sure the password is not weak. A random nonce is generated for each call so each time the same plaintext is encrypted with the same password, the result is a different ciphertext. The ciphertext returned will be 40 bytes longer than the plaintext.
- selective_
digest - Returns a canonical string representation of a JSON document, in which any sub-objects not explicitly listed in the second argument are collapsed to their digest. The format of the second argument is inspired by JQ basic filters and these are some examples:
- stringify
- This function provides a canonical string for any JSON document. Order of the keys in objects, whitespace and unicode normalization are all taken care of, so document that belongs to a single digest is not malleable.
- validate_
network_ name - Free function that checks if a string is a valid network name usable as a parameter in some other calls.
- wrap_
with_ nonce - You should protect scalar values and easy-to-guess lists by replacing them with an object that has an extra “nonce” property, which has enough entropy. List of all countries, cities in a country, streets in a city are all easy to enumerate for a brute-fore attack.