freezeBalance

Create an unsigned transaction to freeze balance.

Usage

visionWeb.transactionBuilder.freezeBalance(
  amount,
  duration,
  resource,
  ownerAddress,
  receiverAddress,
  parentAddress,
  options
);

Parameters

ParameterDescriptionTypeDefault
amountAmount of VS (in VDT) to freeze.number0
durationDays to freeze VS for. Minimum of 3 days.number3
resourceResource that you're freezing VS in order to obtain. Must be either "PHOTON", "ENTROPY","CommunityVoting" or "FVGUARANTEE".PHOTON | ENTROPY|CommunityVoting|FVGUARANTEEPHOTON
ownerAddressAddress of the owner of the VS to be frozen (defaults to caller's default address).stringDefault account address
receiverAddressAddress of other user receiving the resource.string-
parentAddressAddress of the frozen owner account to be bound, when the resource is of type SPREAD.string-
freezeBalanceStageEntropy and Photon freeze stages, balances[balanceStage]-
optionsDescriptions are below.object-

balanceStage: {stage: number, frozen_balance: number}

ParameterDescriptionTypeDefault
stagefreeze stagenumber-
frozen_balancebalance of frozennumber-

options parameters:

ParameterDescriptionTypeDefault
permissionIdThe permission Id,optional, for multi-signature use.number-

Returns

Object

Example

visionWeb.transactionBuilder.freezeBalance(100000000,3,"ENTROPY","VEoh3WDXviqcPZ1qVNCQpqLHYzigrQWTPL","VJJKvvPZ1cLkRoeYmswWPYdwi9Y2mkK8c8");
> {
  visible: false,
  txID: '89aa361b66777330af9fdf4394227c99e3bce30bc5b088297836715cadf94727',
  raw_data: {
    contract: [ [Object] ],
    ref_block_bytes: '475d',
    ref_block_hash: 'd544241ca7a794eb',
    expiration: 1608467445000,
    timestamp: 1608467386756
  },
  raw_data_hex: '0a02475d2208d544241ca7a794eb4088ea8581e82e5a71080b126d0a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e467265657a6542616c616e6365436f6e747261637412370a154653cd48c2723cb985679f4e44d99c64d22d89f41d1080ade204180350017a15462d7a77f8bef6fe225bf5e353dd6a380f588a14967084a38281e82e'
}