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. Ifurlis already configured, this parameter will have no effect.
url: This parameter is extremely important. EachprocessId(process) has a designatedurl, which can be obtained via getNodesByProcess.
- When initiating a transaction, you must specify the
urlfor the givenprocessId; otherwise, the transaction cannot be sent. - If you want to query a transaction record by
messageIdafter the transaction, you must do so using the sameurlthat was used when the transaction was initiated; otherwise, the query will fail. - If you want to query a transaction record by
processIdandnonceafter the transaction, you must also perform the query using theurlspecified for thatprocessId; otherwise, the query will fail.
Currently, hymatrix-js supports 4 signature methods for developers to choose from:
privateKey: Ethereum private key, composed of'0x'+ a64-character private key, totaling66characters.
arJWK: ArweaveJWKInterfaceJSON file. See arweave Docs - Sample JWK.
signer: Ethereum signer created vianew Web3Provider(window.ethereum). You can importWeb3Providerfromhymatrix-js.
arJWKwithuse_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'(representingWander) is more secure.