Skip to main content

Introduction

A JavaScript/TypeScript SDK for interacting with the HyMatrix decentralized computing and messaging protocol, supporting Ethereum, Arweave, and AO networks. It allows developers to easily integrate with both Node.js and web environments.

debug: Whether to enable the default test environment. If url is already configured, this parameter will have no effect.

url: This parameter is extremely important. Each processId (process) has a designated url, which can be obtained via getNodesByProcess.

  1. When initiating a transaction, you must specify the url for the given processId; otherwise, the transaction cannot be sent.
  2. If you want to query a transaction record by messageId after the transaction, you must do so using the same url that was used when the transaction was initiated; otherwise, the query will fail.
  3. If you want to query a transaction record by processId and nonce after the transaction, you must also perform the query using the url specified for that processId; otherwise, the query will fail.

Currently, hymatrix-js supports 4 signature methods for developers to choose from:

privateKey: Ethereum private key, composed of '0x' + a 64-character private key, totaling 66 characters.

arJWK: Arweave JWKInterface JSON file. See arweave Docs - Sample JWK.

signer: Ethereum signer created via new Web3Provider(window.ethereum). You can import Web3Provider from hymatrix-js.

arJWK with use_wallet: arweave-js also supports using 'use_wallet' as the JWK parameter in the browser to work with ArConnect for retrieving the Arweave wallet address, as well as performing Arweave transfers and signing. For more details, see arweave-js Search · use_wallet. On the web, using 'use_wallet' (representing Wander) is more secure.