VarIntWriter
scrypt-ts / VarIntWriter
Class: VarIntWriter
A writer that serializes ByteString
, boolean
, bigint
Table of contents
Constructors
Methods
Constructors
constructor
• new VarIntWriter()
Methods
writeBool
▸ Static
writeBool(x
): ByteString
serializes boolean
with fixed 1 byte
Parameters
Name | Type | Description |
---|---|---|
x | boolean | a boolean |
Returns
serialized ByteString
Defined in
dist/smart-contract/builtins/functions.d.ts:1124
writeBytes
▸ Static
writeBytes(buf
): ByteString
serializes ByteString
with VarInt
encoding
Parameters
Name | Type | Description |
---|---|---|
buf | ByteString | a ByteString |
Returns
serialized ByteString
Defined in
dist/smart-contract/builtins/functions.d.ts:1118
writeInt
▸ Static
writeInt(x
): ByteString
serializes bigint
with VarInt
encoding
Parameters
Name | Type | Description |
---|---|---|
x | bigint | a boolean |
Returns
serialized ByteString
Defined in
dist/smart-contract/builtins/functions.d.ts:1130