Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work #12

Merged
merged 2 commits into from
Oct 8, 2024
Merged

Work #12

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/algo-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@algorandfoundation/algorand-typescript",
"version": "0.0.1-alpha.3",
"version": "0.0.1-alpha.4",
"description": "This package contains definitions for the types which comprise Algorand TypeScript which can be compiled to run on the Algorand Virtual Machine using the Puya compiler.",
"private": false,
"main": "index.js",
Expand Down
6 changes: 4 additions & 2 deletions packages/algo-ts/src/impl/primitives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ export class Uint64Cls extends AlgoTsPrimitiveCls {
return this.#value
}

toBytes(isDynamic: boolean = false): BytesCls {
return new BytesCls(bigIntToUint8Array(this.#value, isDynamic ? 'dynamic' : 8))
toBytes(): BytesCls {
return new BytesCls(bigIntToUint8Array(this.#value, 8))
}

asAlgoTs(): uint64 {
Expand Down Expand Up @@ -321,9 +321,11 @@ export class BytesCls extends AlgoTsPrimitiveCls {
toUint64(): Uint64Cls {
return new Uint64Cls(uint8ArrayToBigInt(this.#v))
}

toBigUint(): BigUintCls {
return new BigUintCls(uint8ArrayToBigInt(this.#v))
}

toString(): string {
return uint8ArrayToUtf8(this.#v)
}
Expand Down
2 changes: 2 additions & 0 deletions packages/algo-ts/src/primitives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export type bytes = {

equals(other: BytesCompat): boolean

slice(start?: Uint64Compat, end?: Uint64Compat): bytes

toString(): string
}

Expand Down