Skip to main content

61 docs tagged with "typescript"

View all tags

Add a wallet login button

Configure UnlockPanelManager once at startup, then add a reusable connect and disconnect button that works with every registered wallet provider.

Address utilities

The sdk-core Address toolkit, bech32/hex conversion, raw public key, shard computation, isSmartContract, and the HRP. Fully offline, no network.

Build a relayed v3 transaction

A sender who has no EGLD for gas, and a relayer who pays it, both signing the same transaction, devnet-verified, with V1/V2 deprecation flagged.

Call a payable endpoint with EGLD

Call a payable contract endpoint, attaching EGLD via nativeTransferAmount, against a real live devnet contract with sdk-core's controller pattern.

Claim and re-delegate rewards

Claim delegation rewards to your wallet or re-delegate (compound) them into the same MultiversX staking contract, with sdk-core DelegationController.

Create a delegation contract

Create a new MultiversX delegation (staking-provider) contract with sdk-core DelegationController and factory, then parse the outcome for its address.

Custom API/Proxy request

Call any API or Proxy endpoint the typed provider methods do not cover, via doGetGeneric and doPostGeneric, for economics, stats, and a raw VM query.

Decode contract events

Decode a smart contract's emitted events into named typed fields with sdk-core's TransactionEventsParser and an ABI, verified against a real event.

Delegate (stake) EGLD

Delegate (stake) EGLD to an existing MultiversX delegation contract with sdk-core DelegationController and factory, then parse the staked amount.

Deploy a smart contract

Deploy a smart contract from WASM bytecode and constructor arguments with sdk-core's controller and factory, then parse the outcome for the new address.

Fetch a block

Fetch the latest block and a block by hash via ApiNetworkProvider, and a block by shard and nonce via ProxyNetworkProvider. Verified live against mainnet.

Fetch an account's on-chain state

Read any address's nonce, balance, username, and guarded flag, plus its key-value storage, through a network provider. Verified live against mainnet.

Fetch an account's token balances

Read the tokens an account holds, all fungible ESDTs, all NFTs and SFTs, and one specific token balance, via a network provider. Verified live.

Fetch network config and status

Read the static network config (gas costs, shard count, round duration) and the live per-shard status (block nonce, epoch, round) via a network provider.

Fetch token metadata

Read a token's definition, name, ticker, decimals, owner and property flags, for a fungible token and for an NFT or SFT collection. Verified live.

Generate a mnemonic + derive keys

Generate a BIP39 mnemonic with sdk-core and derive secret keys at several address indices, fully offline, with a determinism check and secrecy notes.

Guard and unguard an account

Activate guardianship with GuardAccount and remove it with UnGuardAccount via sdk-core, including the guardian co-sign requirement, verified on devnet.

Hash-signing a transaction

Opt a transaction into hash signing with sdk-core, assert the version/options bits, and sign the hash correctly. Includes a real v15.4.1 signing trap.

Issue a fungible ESDT

Issue a fungible ESDT token with sdk-core's TokenManagementController against DevnetEntrypoint, payload hand-verified against real devnet.

Load an ABI

Load a contract's ABI from a file, a URL, or by hand with sdk-core's Abi/AbiRegistry, then introspect its endpoints and argument types.

Log in with a Ledger hardware wallet

A dedicated Ledger login button using ProviderFactory directly, including the anchor element the SDK renders its own device-connect and account-picker UI into.

Manage nonces (fetch-then-increment)

Fetch an account's nonce from the network once, then increment it locally for every transaction sent afterward in a batch, plus recovery from a nonce gap.

Migration: useGetAccountInfo v4 vs v5

The same hook name still resolves in v5 but returns less data, silently. The easiest migration bug to miss because nothing forces a second look at it.

Multi-token transfer in one tx

Send EGLD plus two or more ESDT/NFT/SFT tokens in one transaction with sdk-core's TransfersController, every field decoded against real devnet.

Query a read-only view

Query a smart contract's read-only view with sdk-core's SmartContractController, no wallet, no gas, no transaction, verified against live devnet.

Read a delegation contract's state

Read a MultiversX staking-provider contract state with read-only queries: total stake, service fee, a delegator active stake and claimable rewards.

Save and load a PEM (dev only)

Save a wallet to a PEM file and load it back via Account and UserPem with sdk-core. PEM is unencrypted and dev-only; fully offline, no network.

Send an ESDT

Send a fungible ESDT token using sdk-core's TransfersController and the Token/TokenTransfer classes against DevnetEntrypoint, no browser required.

Send EGLD to an address

Send a native EGLD transfer with sdk-core's TransfersController against DevnetEntrypoint, the backend/script pattern for when your own code holds the key.

Set a guardian on an account

Nominate a guardian for an account with SetGuardian via sdk-core's AccountController and AccountTransactionsFactory, payload verified on devnet.

Sign a message + verify a signature

Sign a message with an account or secret key and verify it with a UserVerifier, fully offline, including proof the check fails on a tampered signature.

Simulate and estimate a transaction

Ask the network what a transaction would cost with estimateTransactionCost and what it would do with simulateTransaction, without ever broadcasting it.

Undelegate and withdraw

Exit a MultiversX delegation: unDelegate an amount, wait out the unbonding period, then withdraw it, using sdk-core DelegationController and factory.

Upgrade a smart contract

Upgrade a deployed smart contract to new WASM bytecode with sdk-core's controller and factory, and read the upgradeContract builtin wire payload.