StaticBytes
Algorand TypeScript / arc4 / StaticBytes
Defined in: arc4/encoded-types.ts:535
A fixed length sequence of bytes
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”TLength
Section titled “TLength”TLength extends uint64 = 0
Indexable
Section titled “Indexable”Get or set the item at the specified index. Negative indexes are not supported
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new StaticBytes<
TLength>(value):StaticBytes<TLength>
Defined in: arc4/encoded-types.ts:543
Create a new StaticBytes instance from native fixed sized bytes
Parameters
Section titled “Parameters”bytes<TLength>
The bytes
Returns
Section titled “Returns”StaticBytes<TLength>
Overrides
Section titled “Overrides”Constructor
Section titled “Constructor”new StaticBytes<
TLength>(value):StaticBytes<TLength>
Defined in: arc4/encoded-types.ts:548
Create a new StaticBytes instance from native bytes
Parameters
Section titled “Parameters”The bytes
Returns
Section titled “Returns”StaticBytes<TLength>
Overrides
Section titled “Overrides”Arc4ArrayBase<Byte>.constructor
Constructor
Section titled “Constructor”new StaticBytes<
TLength>(value):StaticBytes<TLength>
Defined in: arc4/encoded-types.ts:553
Create a new StaticBytes instance from a utf8 string
Parameters
Section titled “Parameters”string
A string
Returns
Section titled “Returns”StaticBytes<TLength>
Overrides
Section titled “Overrides”Arc4ArrayBase<Byte>.constructor
Constructor
Section titled “Constructor”new StaticBytes<
TLength>():StaticBytes<TLength>
Defined in: arc4/encoded-types.ts:557
Create a new StaticBytes instance of length 0
Returns
Section titled “Returns”StaticBytes<TLength>
Overrides
Section titled “Overrides”Arc4ArrayBase<Byte>.constructor
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get bytes():
bytes
Defined in: arc4/encoded-types.ts:102
Retrieve the encoded bytes for this type
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”length
Section titled “length”Get Signature
Section titled “Get Signature”get length():
uint64
Defined in: arc4/encoded-types.ts:580
Returns the statically declared length of this byte array
Returns
Section titled “Returns”Overrides
Section titled “Overrides”native
Section titled “native”Get Signature
Section titled “Get Signature”get native():
bytes<TLength>
Defined in: arc4/encoded-types.ts:565
Get the native bytes value
Returns
Section titled “Returns”bytes<TLength>
Methods
Section titled “Methods”[iterator]()
Section titled “[iterator]()”[iterator]():
IterableIterator<Byte>
Defined in: arc4/encoded-types.ts:292
Returns an iterator for the items in this array
Returns
Section titled “Returns”IterableIterator<Byte>
Inherited from
Section titled “Inherited from”at(
index):Byte
Defined in: arc4/encoded-types.ts:254
Returns the item at the given index. Negative indexes are taken from the end.
Parameters
Section titled “Parameters”The index of the item to retrieve
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”concat()
Section titled “concat()”concat(
other):DynamicBytes
Defined in: arc4/encoded-types.ts:573
Returns a dynamic bytes object containing all bytes from this and other
Parameters
Section titled “Parameters”Another array of bytes to concat with this one
Returns
Section titled “Returns”entries()
Section titled “entries()”Defined in: arc4/encoded-types.ts:299
Returns an iterator for a tuple of the indexes and items in this array
Returns
Section titled “Returns”IterableIterator<readonly [uint64, Byte]>
Inherited from
Section titled “Inherited from”join()
Section titled “join()”join(
separator?):string
Defined in: arc4/encoded-types.ts:285
Creates a string by concatenating all the items in the array delimited by the specified separator (or ’,’ by default)
Parameters
Section titled “Parameters”separator?
Section titled “separator?”string
Returns
Section titled “Returns”string
Deprecated
Section titled “Deprecated”Join is not supported in Algorand TypeScript
Inherited from
Section titled “Inherited from”keys()
Section titled “keys()”keys():
IterableIterator<uint64>
Defined in: arc4/encoded-types.ts:306
Returns an iterator for the indexes in this array
Returns
Section titled “Returns”IterableIterator<uint64>
Inherited from
Section titled “Inherited from”slice()
Section titled “slice()”Call Signature
Section titled “Call Signature”slice():
Byte[]
Defined in: arc4/encoded-types.ts:261
Returns
Section titled “Returns”Byte[]
Deprecated
Section titled “Deprecated”Array slicing is not yet supported in Algorand TypeScript Create a new Dynamic array with all items from this array
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”slice(
end):Byte[]
Defined in: arc4/encoded-types.ts:267
Parameters
Section titled “Parameters”An index in which to stop copying items.
Returns
Section titled “Returns”Byte[]
Deprecated
Section titled “Deprecated”Array slicing is not yet supported in Algorand TypeScript
Create a new DynamicArray with all items up till end.
Negative indexes are taken from the end.
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”slice(
start,end):Byte[]
Defined in: arc4/encoded-types.ts:274
Parameters
Section titled “Parameters”An index in which to start copying items.
An index in which to stop copying items
Returns
Section titled “Returns”Byte[]
Deprecated
Section titled “Deprecated”Array slicing is not yet supported in Algorand TypeScript
Create a new DynamicArray with items from start, up until end
Negative indexes are taken from the end.