From 954d0f0b656f5cea2ed24b6d0625f13b83a14c25 Mon Sep 17 00:00:00 2001 From: Bobby Lat Date: Mon, 23 Dec 2024 11:01:13 +0800 Subject: [PATCH 1/2] feat: export ptypeToArc4EncodedType function needed for stub implementation of encodeArc4, decodeArc4 functions --- src/awst_build/ptypes/for-export.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/awst_build/ptypes/for-export.ts b/src/awst_build/ptypes/for-export.ts index 6093c0b1..61966dae 100644 --- a/src/awst_build/ptypes/for-export.ts +++ b/src/awst_build/ptypes/for-export.ts @@ -1,3 +1,4 @@ /* This file aggregates all ptypes into a single export for external consumption of the compiler api */ -export * from './index' +export { ptypeToArc4EncodedType } from '../arc4-util' export * from './arc4-types' +export * from './index' From 02bbad07131ff8fd8dcc6ffc4754d7712e4fb59c Mon Sep 17 00:00:00 2001 From: Bobby Lat Date: Tue, 24 Dec 2024 16:58:17 +0800 Subject: [PATCH 2/2] feat: export compile option types for stub implementation --- package-lock.json | 2 +- packages/algo-ts/package.json | 2 +- packages/algo-ts/src/compiled.ts | 4 ++-- packages/algo-ts/src/index.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index d98d0b51..05439f4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13511,7 +13511,7 @@ }, "packages/algo-ts/dist": { "name": "@algorandfoundation/algorand-typescript", - "version": "1.0.0-beta.3", + "version": "1.0.0-beta.4", "dev": true, "peerDependencies": { "tslib": "^2.6.2" diff --git a/packages/algo-ts/package.json b/packages/algo-ts/package.json index 3db257ba..2911e3e4 100644 --- a/packages/algo-ts/package.json +++ b/packages/algo-ts/package.json @@ -1,6 +1,6 @@ { "name": "@algorandfoundation/algorand-typescript", - "version": "1.0.0-beta.3", + "version": "1.0.0-beta.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", diff --git a/packages/algo-ts/src/compiled.ts b/packages/algo-ts/src/compiled.ts index 8d711cbf..e43e7675 100644 --- a/packages/algo-ts/src/compiled.ts +++ b/packages/algo-ts/src/compiled.ts @@ -52,7 +52,7 @@ export type CompiledLogicSig = { /** * Options for compiling a contract */ -type CompileContractOptions = { +export type CompileContractOptions = { /** * Number of extra program pages, defaults to minimum required for contract */ @@ -87,7 +87,7 @@ type CompileContractOptions = { /** * Options for compiling a logic signature */ -type CompileLogicSigOptions = { +export type CompileLogicSigOptions = { /** * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant * and match the type of the template var declaration diff --git a/packages/algo-ts/src/index.ts b/packages/algo-ts/src/index.ts index e02f1471..719880ba 100644 --- a/packages/algo-ts/src/index.ts +++ b/packages/algo-ts/src/index.ts @@ -15,6 +15,6 @@ export { TransactionType } from './transactions' export { LogicSig, logicsig } from './logic-sig' export { TemplateVar } from './template-var' export { Base64, Ec, Ecdsa, VrfVerify } from './op-types' -export { compile, CompiledContract, CompiledLogicSig } from './compiled' +export { compile, CompiledContract, CompiledLogicSig, CompileContractOptions, CompileLogicSigOptions } from './compiled' export { MutableArray } from './mutable-array' export { emit } from './arc-28'