11import { Bytes , FixedBytes } from './impl/primitives'
22
3+ /** @internal */
34export const UINT64_SIZE = 64
5+ /** @internal */
46export const UINT512_SIZE = 512
7+ /** @internal */
58export const MAX_UINT8 = 2 ** 8 - 1
9+ /** @internal */
610export const MAX_UINT16 = 2 ** 16 - 1
11+ /** @internal */
712export const MAX_UINT32 = 2 ** 32 - 1
13+ /** @internal */
814export const MAX_UINT64 = 2n ** 64n - 1n
15+ /** @internal */
916export const MAX_UINT128 = 2n ** 128n - 1n
17+ /** @internal */
1018export const MAX_UINT256 = 2n ** 256n - 1n
19+ /** @internal */
1120export const MAX_UINT512 = 2n ** 512n - 1n
21+ /** @internal */
1222export const MAX_BYTES_SIZE = 4096
23+ /** @internal */
1324export const MAX_LOG_SIZE = 1024
25+ /** @internal */
1426export const MAX_ITEMS_IN_LOG = 32
27+ /** @internal */
1528export const MAX_BOX_SIZE = 32768
29+ /** @internal */
1630export const BITS_IN_BYTE = 8
31+ /** @internal */
1732export const DEFAULT_ACCOUNT_MIN_BALANCE = 100_000
33+ /** @internal */
1834export const DEFAULT_MAX_TXN_LIFE = 1_000
35+ /** @internal */
1936export const DEFAULT_ASSET_CREATE_MIN_BALANCE = 1000_000
37+ /** @internal */
2038export const DEFAULT_ASSET_OPT_IN_MIN_BALANCE = 10_000
2139
22- // from python code: list(b"\x85Y\xb5\x14x\xfd\x89\xc1vC\xd0]\x15\xa8\xaek\x10\xabG\xbbm\x8a1\x88\x11V\xe6\xbd;\xae\x95\xd1")
40+ /** @internal
41+ * from python code: list(b"\x85Y\xb5\x14x\xfd\x89\xc1vC\xd0]\x15\xa8\xaek\x10\xabG\xbbm\x8a1\x88\x11V\xe6\xbd;\xae\x95\xd1")
42+ */
2343export const DEFAULT_GLOBAL_GENESIS_HASH = FixedBytes (
2444 32 ,
2545 new Uint8Array ( [
@@ -28,37 +48,55 @@ export const DEFAULT_GLOBAL_GENESIS_HASH = FixedBytes(
2848 ] ) ,
2949)
3050
31- // algorand encoded address of 32 zero bytes
51+ /** @internal
52+ * algorand encoded address of 32 zero bytes
53+ */
3254export const ZERO_ADDRESS = Bytes . fromBase32 ( 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' )
3355
34- /**
56+ /** @internal
3557"\x09" # pragma version 9
3658"\x81\x01" # pushint 1
3759 */
3860export const ALWAYS_APPROVE_TEAL_PROGRAM = Bytes ( new Uint8Array ( [ 0x09 , 0x81 , 0x01 ] ) )
3961
40- // bytes: program (logic) data prefix when signing
62+ /** @internal
63+ * bytes: program (logic) data prefix when signing
64+ */
4165export const LOGIC_DATA_PREFIX = Bytes ( 'ProgData' )
4266
43- //number: minimum transaction fee
67+ /** @internal
68+ * number: minimum transaction fee
69+ */
4470export const MIN_TXN_FEE = 1000
4571
72+ /** @internal */
4673export const ABI_RETURN_VALUE_LOG_PREFIX = Bytes . fromHex ( '151F7C75' )
4774
75+ /** @internal */
4876export const UINT64_OVERFLOW_UNDERFLOW_MESSAGE = 'Uint64 overflow or underflow'
77+ /** @internal */
4978export const BIGUINT_OVERFLOW_UNDERFLOW_MESSAGE = 'BigUint overflow or underflow'
79+ /** @internal */
5080export const DEFAULT_TEMPLATE_VAR_PREFIX = 'TMPL_'
5181
82+ /** @internal */
5283export const APP_ID_PREFIX = 'appID'
84+ /** @internal */
5385export const HASH_BYTES_LENGTH = 32
86+ /** @internal */
5487export const ALGORAND_ADDRESS_BYTE_LENGTH = 36
88+ /** @internal */
5589export const ALGORAND_CHECKSUM_BYTE_LENGTH = 4
90+ /** @internal */
5691export const ALGORAND_ADDRESS_LENGTH = 58
5792
93+ /** @internal */
5894export const PROGRAM_TAG = 'Program'
5995
96+ /** @internal */
6097export const TRANSACTION_GROUP_MAX_SIZE = 16
6198
99+ /** @internal */
62100export enum OnApplicationComplete {
63101 NoOpOC = 0 ,
64102 OptInOC = 1 ,
@@ -68,6 +106,7 @@ export enum OnApplicationComplete {
68106 DeleteApplicationOC = 5 ,
69107}
70108
109+ /** @internal */
71110export const ConventionalRouting = {
72111 methodNames : {
73112 closeOutOfApplication : 'closeOutOfApplication' ,
0 commit comments