Module utils
Last updated
Last updated
Misc utility Functions.
– Converts address from any TVM format to TVM format
– Validates and returns the type of any Acki Nacki address.
– Calculates storage fee for an account over a specified time period
– Compresses data using Zstandard algorithm
– Decompresses data using Zstandard algorithm
Converts address from any Acki Nacki format to any Acki Nacki format
NOTE: Sync version is available only for lib-node
binding.
address
: string – Account address in any Acki NAcki format.
address
: string – Address in the specified format
Validates and returns the type of any Acki Nacki address.
Address types are the following
0:919db8e740d50bf349df2eea03fa30c385d846b991ff5542e67098ee833fc7f7
- standard Acki Nacki address most commonly used in all cases. Also called as hex address 919db8e740d50bf349df2eea03fa30c385d846b991ff5542e67098ee833fc7f7
- account ID. A part of full address. Identifies account inside particular workchain EQCRnbjnQNUL80nfLuoD+jDDhdhGuZH/VULmcJjugz/H9wam
- base64 address. Also called "user-friendly". Was used at the beginning of TVM. Now it is supported for compatibility
NOTE: Sync version is available only for lib-node
binding.
address
: string – Account address in any TVM format.
Calculates storage fee for an account over a specified time period
NOTE: Sync version is available only for lib-node
binding.
account
: string
period
: number
fee
: string
Compresses data using Zstandard algorithm
NOTE: Sync version is available only for lib-node
binding.
uncompressed
: string – Uncompressed data.
Must be encoded as base64.
level
?: number – Compression level, from 1 to 21. Where: 1 - lowest compression level (fastest compression); 21 - highest compression level (slowest compression). If level is omitted, the default compression level is used (currently 3
).
compressed
: string – Compressed data.
Must be encoded as base64.
Decompresses data using Zstandard algorithm
NOTE: Sync version is available only for lib-node
binding.
compressed
: string – Compressed data.
Must be encoded as base64.
decompressed
: string – Decompressed data.
Must be encoded as base64.
url
: boolean
test
: boolean
bounce
: boolean
Depends on value of the type
field.
When type is 'AccountId'
When type is 'Hex'
When type is 'Base64'
url
: boolean
test
: boolean
bounce
: boolean
Variant constructors:
One of the following value:
AccountId = "AccountId"
Hex = "Hex"
Base64 = "Base64"
address
: string – Account address in any Acki Nacki format.
address
: string – Address in the specified format
address
: string – Account address in any TVM format.
account
: string
period
: number
fee
: string
uncompressed
: string – Uncompressed data.
Must be encoded as base64.
level
?: number – Compression level, from 1 to 21. Where: 1 - lowest compression level (fastest compression); 21 - highest compression level (slowest compression). If level is omitted, the default compression level is used (currently 3
).
compressed
: string – Compressed data.
Must be encoded as base64.
compressed
: string – Compressed data.
Must be encoded as base64.
decompressed
: string – Decompressed data.
Must be encoded as base64.
output_format
: – Specify the format to convert to.
address_type
: – Account address type.
output_format
: – Specify the format to convert to.
address_type
: – Account address type.