MultiversX (EGLD)
MultiversX (formerly Elrond) is a highly scalable, fast, and secure blockchain platform for distributed apps, enterprise use cases, and the new internet economy.Creating the SDK instance
To interact with the MultiversX blockchain, you first need to create an instance of the SDK. Here’s how you can do it:Connecting your wallet
You can connect your wallet using a private key (keyFile) and password as shown below:Getting your address
You can get your address using thegetAddress method:
Preparing a transaction
You can prepare a transaction using thepreparePay method:
preparePay method returns a signed transaction ready to be sent to a DEMOS node.
Preparing multiple transactions
You can prepare multiple transactions using thepreparePays method:
preparePays method returns an array of signed transactions. These transactions are signed with increasing nonces derived from the account’s current nonce on the network.
Signing messages
Cleaning up
When you’re done with the SDK instance, you can disconnect your wallet:Hacking
The DEMOS MultiversX SDK provides a limited set of methods to interact with the blockchain. For more advanced usage, you can access the underlying objects:| Property | Type | Description |
|---|---|---|
instance.provider | INetworkProvider | Provides access to network data |
instance.wallet | UserSigner or ExtensionProvider | Manages wallet operations |
Example
To get all the tokens owned by an address (a feature not directly implemented in the SDK):getAllEsdtTokens method from the underlying INetworkProvider, which is not directly exposed in the DEMOS SDK.
For more advanced operations, refer to the following documentation: