HomeGuidesAPI ReferenceChangelog
GuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsChange Log
API Reference

undelegateResource

The interface used to revoke delegated resource, which can specify the number of revoked resources. (v5.1.0 new interface)

Usage

tronWeb.transactionBuilder.undelegateResource(amount, receiverAddress, resource, address, options);

Parameters

ParametersParameter DescriptionType
amountthe amount of assets to be revoked (sun), larger than 0Integer
receiverAddressthe account address to receive revoked delegation (base58 or hex)String
resourceasset type of revoked delegation, optional BANDWIDTH or ENERGYString
addressthe account address of the revoked delegation asset (base58 or hex)String
optionsoptional fieldsObject

Return

Object

Example

> const transaction = await tronWeb.transactionBuilder.undelegateResource(10e6, 'receiverAddress', 'BANDWIDTH', 'ownerAddress');