Create an unsigned transaction to freeze balance.
Usage
visionWeb.transactionBuilder.freezeBalance(
amount,
duration,
resource,
ownerAddress,
receiverAddress,
parentAddress,
options
);
Parameters
Parameter | Description | Type | Default |
---|---|---|---|
amount | Amount of VS (in VDT) to freeze. | number | 0 |
duration | Days to freeze VS for. Minimum of 3 days. | number | 3 |
resource | Resource that you're freezing VS in order to obtain. Must be either "PHOTON", "ENTROPY","CommunityVoting" or "FVGUARANTEE". | PHOTON | ENTROPY |CommunityVoting |FVGUARANTEE | PHOTON |
ownerAddress | Address of the owner of the VS to be frozen (defaults to caller's default address). | string | Default account address |
receiverAddress | Address of other user receiving the resource. | string | - |
parentAddress | Address of the frozen owner account to be bound, when the resource is of type SPREAD. | string | - |
freezeBalanceStage | Entropy and Photon freeze stages, balances | [balanceStage] | - |
options | Descriptions are below. | object | - |
balanceStage: {stage: number, frozen_balance: number}
Parameter | Description | Type | Default |
---|---|---|---|
stage | freeze stage | number | - |
frozen_balance | balance of frozen | number | - |
options parameters:
Parameter | Description | Type | Default |
---|---|---|---|
permissionId | The 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'
}