intToByteString
scrypt-ts-opcat / intToByteString
Function: intToByteString()
intToByteString(
n
,size
?):ByteString
Defined in: packages/scrypt-ts-opcat/src/smart-contract/fns/byteString.ts:37
int can be converted to a byte string with int2ByteString.
Parameters
n
bigint
a number being converts
size?
bigint
the size of the result byte string, if not specified, the size will be determined by the number of bytes required to represent the number.
Returns
returns a ByteString
Onchain
Throws
throws an error if the number is out of range size
bytes