DynamicBytes
@algorandfoundation/algorand-typescript
@algorandfoundation/algorand-typescript / arc4 / DynamicBytes
Class: DynamicBytes
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:496
A variable length sequence of bytes prefixed with its length expressed as a 2 byte uint
Extends
Indexable
Constructors
new DynamicBytes()
new DynamicBytes(
value
?):DynamicBytes
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:504
Create a new DynamicBytes instance
Parameters
value?
The bytes or utf8 interpreted string to initialize this type
string
| bytes
Returns
Overrides
Accessors
bytes
Get Signature
get bytes():
bytes
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:97
Retrieve the encoded bytes for this type
Returns
Inherited from
length
Get Signature
get length():
uint64
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:240
Returns the current length of this array
Returns
Inherited from
native
Get Signature
get native():
bytes
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:511
Get the native bytes value (excludes the length prefix)
Returns
Methods
[iterator]()
[iterator]():
IterableIterator
<Byte
>
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:277
Returns an iterator for the items in this array
Returns
Inherited from
at()
at(
index
):Byte
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:249
Returns the item at the given index. Negative indexes are taken from the end.
Parameters
index
The index of the item to retrieve
Returns
Inherited from
concat()
concat(
other
):DynamicBytes
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:519
Returns a dynamic bytes object containing all bytes from this and other
Parameters
other
Another array of bytes to concat with this one
Returns
entries()
entries():
IterableIterator
<readonly [uint64
,Byte
]>
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:284
Returns an iterator for a tuple of the indexes and items in this array
Returns
IterableIterator
<readonly [uint64
, Byte
]>
Inherited from
keys()
keys():
IterableIterator
<uint64
>
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:291
Returns an iterator for the indexes in this array
Returns
Inherited from
slice()
Call Signature
slice():
DynamicArray
<Byte
>
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:256
Internal
Create a new Dynamic array with all items from this array
Returns
Inherited from
Call Signature
slice(
end
):DynamicArray
<Byte
>
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:262
Internal
Create a new DynamicArray with all items up till end
.
Negative indexes are taken from the end.
Parameters
end
An index in which to stop copying items.
Returns
Inherited from
Call Signature
slice(
start
,end
):DynamicArray
<Byte
>
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:269
Internal
Create a new DynamicArray with items from start
, up until end
Negative indexes are taken from the end.
Parameters
start
An index in which to start copying items.
end
An index in which to stop copying items