Skip to content

getMaticBalance

Return MATIC balance of the current wallet or the specidfied address.

Params

ParamDefault value
addressuser address

Usage

import { BcodeSDK } from "@bcode-tech/bcode-sdk";

(async () => {
  const sdk = new BcodeSDK({
    apiKey: "your-api-key",
    config: { env: "MUMBAI" },
  });

  // Returns address for used wallet
  await sdk.getMaticBalance();
})();

Return

Integer value of MATIC balance.