@algorandfoundation/algorand-typescript-testing 1.0.0-beta.11 → 1.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/abi-metadata.d.ts +2 -2
  2. package/collections/custom-key-map.d.ts +3 -2
  3. package/context-helpers/context-util.d.ts +2 -2
  4. package/context-helpers/internal-context.d.ts +6 -7
  5. package/decode-logs.d.ts +1 -1
  6. package/encoders.d.ts +3 -2
  7. package/impl/acct-params.d.ts +2 -1
  8. package/impl/app-global.d.ts +1 -1
  9. package/impl/app-local.d.ts +1 -1
  10. package/impl/app-params.d.ts +2 -2
  11. package/impl/asset-holding.d.ts +1 -1
  12. package/impl/asset-params.d.ts +3 -2
  13. package/impl/base.d.ts +2 -1
  14. package/impl/block.d.ts +3 -3
  15. package/impl/compiled.d.ts +2 -2
  16. package/impl/crypto.d.ts +2 -1
  17. package/impl/encoded-types.d.ts +8 -6
  18. package/impl/ensure-budget.d.ts +2 -1
  19. package/impl/global.d.ts +3 -2
  20. package/impl/gtxn.d.ts +1 -1
  21. package/impl/inner-transactions.d.ts +3 -2
  22. package/impl/itxn.d.ts +1 -1
  23. package/impl/log.d.ts +3 -0
  24. package/impl/logicSigArg.d.ts +1 -1
  25. package/impl/match.d.ts +1 -1
  26. package/impl/online-stake.d.ts +1 -1
  27. package/impl/pure.d.ts +2 -1
  28. package/impl/reference.d.ts +90 -0
  29. package/impl/state.d.ts +2 -1
  30. package/impl/transactions.d.ts +32 -31
  31. package/impl/txn.d.ts +2 -1
  32. package/impl/urange.d.ts +1 -1
  33. package/impl/voter-params.d.ts +1 -1
  34. package/index.mjs +14 -29
  35. package/index.mjs.map +1 -1
  36. package/internal/arc4.mjs +2 -0
  37. package/internal/arc4.mjs.map +1 -0
  38. package/internal/op.mjs +2 -0
  39. package/internal/op.mjs.map +1 -0
  40. package/internal-arc4-BPiMhb9a.js +23 -0
  41. package/internal-arc4-BPiMhb9a.js.map +1 -0
  42. package/internal-arc4.d.ts +1 -0
  43. package/internal-op-BJR4Xrem.js +23 -0
  44. package/internal-op-BJR4Xrem.js.map +1 -0
  45. package/internal-op.d.ts +1 -0
  46. package/internal.d.ts +10 -0
  47. package/internal.mjs +137 -0
  48. package/internal.mjs.map +1 -0
  49. package/log-C5qsaKI5.js +602 -0
  50. package/log-C5qsaKI5.js.map +1 -0
  51. package/package.json +14 -2
  52. package/{runtime-helpers-Bq9M2MMd.js → runtime-helpers-C6O92q80.js} +6 -696
  53. package/runtime-helpers-C6O92q80.js.map +1 -0
  54. package/runtime-helpers.d.ts +1 -6
  55. package/runtime-helpers.mjs +3 -2
  56. package/runtime-helpers.mjs.map +1 -1
  57. package/subcontexts/contract-context.d.ts +3 -3
  58. package/subcontexts/ledger-context.d.ts +23 -22
  59. package/subcontexts/transaction-context.d.ts +8 -7
  60. package/test-execution-context.d.ts +7 -6
  61. package/test-transformer/index.mjs +34 -13
  62. package/test-transformer/index.mjs.map +1 -1
  63. package/test-transformer/node-factory.d.ts +2 -2
  64. package/test-transformer/visitors.d.ts +1 -1
  65. package/util.d.ts +3 -6
  66. package/value-generators/arc4.d.ts +1 -1
  67. package/value-generators/avm.d.ts +9 -9
  68. package/value-generators/txn.d.ts +3 -2
  69. package/impl/account.d.ts +0 -35
  70. package/impl/application.d.ts +0 -30
  71. package/impl/asset.d.ts +0 -24
  72. package/runtime-helpers-Bq9M2MMd.js.map +0 -1
package/abi-metadata.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { BaseContract, Contract } from '@algorandfoundation/algorand-typescript';
2
- import { AbiMethodConfig, BareMethodConfig, CreateOptions, OnCompleteActionStr } from '@algorandfoundation/algorand-typescript/arc4';
1
+ import type { BaseContract, Contract } from '@algorandfoundation/algorand-typescript';
2
+ import type { AbiMethodConfig, BareMethodConfig, CreateOptions, OnCompleteActionStr } from '@algorandfoundation/algorand-typescript/arc4';
3
3
  export interface AbiMetadata {
4
4
  methodName: string;
5
5
  methodSignature: string | undefined;
@@ -1,5 +1,6 @@
1
- import { Account, internal } from '@algorandfoundation/algorand-typescript';
2
- import { DeliberateAny } from '../typescript-helpers';
1
+ import type { Account } from '@algorandfoundation/algorand-typescript';
2
+ import { internal } from '@algorandfoundation/algorand-typescript';
3
+ import type { DeliberateAny } from '../typescript-helpers';
3
4
  export declare abstract class CustomKeyMap<TKey, TValue> implements Map<TKey, TValue> {
4
5
  #private;
5
6
  constructor(keySerializer: (key: TKey) => number | bigint | string);
@@ -1,3 +1,3 @@
1
- import { uint64 } from '@algorandfoundation/algorand-typescript';
2
- import { AbiMetadata } from '../abi-metadata';
1
+ import type { uint64 } from '@algorandfoundation/algorand-typescript';
2
+ import type { AbiMetadata } from '../abi-metadata';
3
3
  export declare const checkRoutingConditions: (appId: uint64, metadata: AbiMetadata) => void;
@@ -1,10 +1,9 @@
1
- import { Account, BaseContract, internal } from '@algorandfoundation/algorand-typescript';
2
- import { AccountData } from '../impl/account';
3
- import { ApplicationData } from '../impl/application';
4
- import { AssetData } from '../impl/asset';
5
- import { VoterData } from '../impl/voter-params';
6
- import { TransactionGroup } from '../subcontexts/transaction-context';
7
- import { TestExecutionContext } from '../test-execution-context';
1
+ import type { Account } from '@algorandfoundation/algorand-typescript';
2
+ import { BaseContract, internal } from '@algorandfoundation/algorand-typescript';
3
+ import type { AccountData, ApplicationData, AssetData } from '../impl/reference';
4
+ import type { VoterData } from '../impl/voter-params';
5
+ import type { TransactionGroup } from '../subcontexts/transaction-context';
6
+ import type { TestExecutionContext } from '../test-execution-context';
8
7
  /**
9
8
  * For accessing implementation specific functions, with a convenient single entry
10
9
  * point for other modules to import Also allows for a single place to check and
package/decode-logs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { bytes } from '@algorandfoundation/algorand-typescript';
1
+ import type { bytes } from '@algorandfoundation/algorand-typescript';
2
2
  export type LogDecoding = 'i' | 's' | 'b';
3
3
  export type DecodedLog<T extends LogDecoding> = T extends 'i' ? bigint : T extends 's' ? string : Uint8Array;
4
4
  export type DecodedLogs<T extends [...LogDecoding[]]> = {
package/encoders.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { bytes, internal } from '@algorandfoundation/algorand-typescript';
2
- import { DeliberateAny } from './typescript-helpers';
1
+ import type { bytes } from '@algorandfoundation/algorand-typescript';
2
+ import { internal } from '@algorandfoundation/algorand-typescript';
3
+ import type { DeliberateAny } from './typescript-helpers';
3
4
  export type TypeInfo = {
4
5
  name: string;
5
6
  genericArgs?: TypeInfo[] | Record<string, TypeInfo>;
@@ -1,4 +1,5 @@
1
- import { Account, Application, internal, uint64 } from '@algorandfoundation/algorand-typescript';
1
+ import type { internal, uint64 } from '@algorandfoundation/algorand-typescript';
2
+ import type { Account, Application } from '@algorandfoundation/algorand-typescript';
2
3
  export declare const getAccount: (acct: Account | internal.primitives.StubUint64Compat) => Account;
3
4
  export declare const balance: (a: Account | internal.primitives.StubUint64Compat) => uint64;
4
5
  export declare const minBalance: (a: Account | internal.primitives.StubUint64Compat) => uint64;
@@ -1,2 +1,2 @@
1
- import { internal } from '@algorandfoundation/algorand-typescript';
1
+ import type { internal } from '@algorandfoundation/algorand-typescript';
2
2
  export declare const AppGlobal: internal.opTypes.AppGlobalType;
@@ -1,2 +1,2 @@
1
- import { internal } from '@algorandfoundation/algorand-typescript';
1
+ import type { internal } from '@algorandfoundation/algorand-typescript';
2
2
  export declare const AppLocal: internal.opTypes.AppLocalType;
@@ -1,3 +1,3 @@
1
- import { Application, internal } from '@algorandfoundation/algorand-typescript';
2
- export declare const getApp: (app: Application | internal.primitives.StubUint64Compat) => Application | undefined;
1
+ import type { internal, Application as ApplicationType } from '@algorandfoundation/algorand-typescript';
2
+ export declare const getApp: (app: ApplicationType | internal.primitives.StubUint64Compat) => ApplicationType | undefined;
3
3
  export declare const AppParams: internal.opTypes.AppParamsType;
@@ -1,2 +1,2 @@
1
- import { internal } from '@algorandfoundation/algorand-typescript';
1
+ import type { internal } from '@algorandfoundation/algorand-typescript';
2
2
  export declare const AssetHolding: internal.opTypes.AssetHoldingType;
@@ -1,3 +1,4 @@
1
- import { Asset, internal } from '@algorandfoundation/algorand-typescript';
2
- export declare const getAsset: (asset: Asset | internal.primitives.StubUint64Compat) => Asset | undefined;
1
+ import type { internal } from '@algorandfoundation/algorand-typescript';
2
+ import { type Asset as AssetType } from '@algorandfoundation/algorand-typescript';
3
+ export declare const getAsset: (asset: AssetType | internal.primitives.StubUint64Compat) => AssetType | undefined;
3
4
  export declare const AssetParams: internal.opTypes.AssetParamsType;
package/impl/base.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { bytes, internal, uint64 } from '@algorandfoundation/algorand-typescript';
1
+ import type { bytes, uint64 } from '@algorandfoundation/algorand-typescript';
2
+ import { internal } from '@algorandfoundation/algorand-typescript';
2
3
  import type { TypeInfo } from '../encoders';
3
4
  export declare abstract class BytesBackedCls {
4
5
  #private;
package/impl/block.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { Account, bytes, internal, uint64 } from '@algorandfoundation/algorand-typescript';
1
+ import type { bytes, internal, uint64, Account as AccountType } from '@algorandfoundation/algorand-typescript';
2
2
  export declare class BlockData {
3
3
  seed: bytes;
4
4
  timestamp: uint64;
5
- proposer: Account;
5
+ proposer: AccountType;
6
6
  feesCollected: uint64;
7
7
  bonus: uint64;
8
8
  branch: bytes;
9
- feeSink: Account;
9
+ feeSink: AccountType;
10
10
  protocol: bytes;
11
11
  txnCounter: uint64;
12
12
  proposerPayout: uint64;
@@ -1,3 +1,3 @@
1
- import { BaseContract, CompileContractOptions, CompiledContract, CompiledLogicSig, CompileLogicSigOptions, LogicSig } from '@algorandfoundation/algorand-typescript';
2
- import { ConstructorFor } from '../typescript-helpers';
1
+ import type { BaseContract, CompileContractOptions, CompiledContract, CompiledLogicSig, CompileLogicSigOptions, LogicSig } from '@algorandfoundation/algorand-typescript';
2
+ import type { ConstructorFor } from '../typescript-helpers';
3
3
  export declare function compileImpl(artefact: ConstructorFor<BaseContract> | ConstructorFor<LogicSig>, options?: CompileContractOptions | CompileLogicSigOptions): CompiledLogicSig | CompiledContract;
package/impl/crypto.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { bytes, Ecdsa, internal, MimcConfigurations, VrfVerify } from '@algorandfoundation/algorand-typescript';
1
+ import type { bytes, MimcConfigurations, VrfVerify } from '@algorandfoundation/algorand-typescript';
2
+ import { Ecdsa, internal } from '@algorandfoundation/algorand-typescript';
2
3
  export declare const sha256: (a: internal.primitives.StubBytesCompat) => bytes;
3
4
  export declare const sha3_256: (a: internal.primitives.StubBytesCompat) => bytes;
4
5
  export declare const keccak256: (a: internal.primitives.StubBytesCompat) => bytes;
@@ -1,7 +1,9 @@
1
- import { Account, BigUintCompat, bytes, internal, StringCompat, uint64, Uint64Compat } from '@algorandfoundation/algorand-typescript';
2
- import { Address, ARC4Encoded, BitSize, Bool, Byte, DynamicArray, DynamicBytes, StaticArray, StaticBytes, Str, Tuple, UFixedNxM, UintN } from '@algorandfoundation/algorand-typescript/arc4';
3
- import { fromBytes, TypeInfo } from '../encoders';
4
- import { DeliberateAny } from '../typescript-helpers';
1
+ import type { BigUintCompat, bytes, StringCompat, uint64, Uint64Compat, Account as AccountType } from '@algorandfoundation/algorand-typescript';
2
+ import { internal } from '@algorandfoundation/algorand-typescript';
3
+ import type { BitSize } from '@algorandfoundation/algorand-typescript/arc4';
4
+ import { Address, ARC4Encoded, Bool, Byte, DynamicArray, DynamicBytes, StaticArray, StaticBytes, Str, Tuple, UFixedNxM, UintN } from '@algorandfoundation/algorand-typescript/arc4';
5
+ import type { fromBytes, TypeInfo } from '../encoders';
6
+ import type { DeliberateAny } from '../typescript-helpers';
5
7
  type CompatForArc4Int<N extends BitSize> = N extends 8 | 16 | 32 | 64 ? Uint64Compat : BigUintCompat;
6
8
  export declare class UintNImpl<N extends BitSize> extends UintN<N> {
7
9
  private value;
@@ -84,11 +86,11 @@ export declare class StaticArrayImpl<TItem extends ARC4Encoded, TLength extends
84
86
  export declare class AddressImpl extends Address {
85
87
  typeInfo: TypeInfo;
86
88
  private value;
87
- constructor(typeInfo: TypeInfo | string, value?: Account | string | bytes);
89
+ constructor(typeInfo: TypeInfo | string, value?: AccountType | string | bytes);
88
90
  get bytes(): bytes;
89
91
  equals(other: this): boolean;
90
92
  get length(): uint64;
91
- get native(): Account;
93
+ get native(): AccountType;
92
94
  get items(): ByteImpl[];
93
95
  setItem(_index: number, _value: ByteImpl): void;
94
96
  static fromBytesImpl(value: internal.primitives.StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix?: 'none' | 'log'): AddressImpl;
@@ -1,2 +1,3 @@
1
- import { OpUpFeeSource, uint64 } from '@algorandfoundation/algorand-typescript';
1
+ import type { uint64 } from '@algorandfoundation/algorand-typescript';
2
+ import { OpUpFeeSource } from '@algorandfoundation/algorand-typescript';
2
3
  export declare function ensureBudgetImpl(_budget: uint64, _feeSource?: OpUpFeeSource): void;
package/impl/global.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { Account, bytes, internal, uint64 } from '@algorandfoundation/algorand-typescript';
1
+ import type { bytes, uint64, Account as AccountType } from '@algorandfoundation/algorand-typescript';
2
+ import { internal } from '@algorandfoundation/algorand-typescript';
2
3
  export declare class GlobalData {
3
4
  minTxnFee: uint64;
4
5
  minBalance: uint64;
5
6
  maxTxnLife: uint64;
6
- zeroAddress: Account;
7
+ zeroAddress: AccountType;
7
8
  logicSigVersion?: uint64;
8
9
  round?: uint64;
9
10
  latestTimestamp?: uint64;
package/impl/gtxn.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { internal } from '@algorandfoundation/algorand-typescript';
1
+ import type { internal } from '@algorandfoundation/algorand-typescript';
2
2
  export declare const GTxn: internal.opTypes.GTxnType;
@@ -1,5 +1,6 @@
1
- import { itxn, TransactionType } from '@algorandfoundation/algorand-typescript';
2
- import { InnerTxn, InnerTxnFields } from './itxn';
1
+ import type { itxn } from '@algorandfoundation/algorand-typescript';
2
+ import { TransactionType } from '@algorandfoundation/algorand-typescript';
3
+ import type { InnerTxn, InnerTxnFields } from './itxn';
3
4
  import { ApplicationTransaction, AssetConfigTransaction, AssetFreezeTransaction, AssetTransferTransaction, KeyRegistrationTransaction, PaymentTransaction } from './transactions';
4
5
  export declare class PaymentInnerTxn extends PaymentTransaction implements itxn.PaymentInnerTxn {
5
6
  readonly isItxn?: true;
package/impl/itxn.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { internal, itxn, TransactionType } from '@algorandfoundation/algorand-typescript';
1
+ import type { internal, itxn, TransactionType } from '@algorandfoundation/algorand-typescript';
2
2
  export type InnerTxn = itxn.PaymentInnerTxn | itxn.KeyRegistrationInnerTxn | itxn.AssetConfigInnerTxn | itxn.AssetTransferInnerTxn | itxn.AssetFreezeInnerTxn | itxn.ApplicationInnerTxn;
3
3
  export type InnerTxnFields = (itxn.PaymentFields | itxn.KeyRegistrationFields | itxn.AssetConfigFields | itxn.AssetTransferFields | itxn.AssetFreezeFields | itxn.ApplicationCallFields) & {
4
4
  type?: TransactionType;
package/impl/log.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { BytesBacked, StringCompat } from '@algorandfoundation/algorand-typescript';
2
+ import { internal } from '@algorandfoundation/algorand-typescript';
3
+ export declare function log(...args: Array<internal.primitives.StubUint64Compat | internal.primitives.StubBytesCompat | internal.primitives.StubBigUintCompat | StringCompat | BytesBacked>): void;
@@ -1,2 +1,2 @@
1
- import { bytes, internal } from '@algorandfoundation/algorand-typescript';
1
+ import type { bytes, internal } from '@algorandfoundation/algorand-typescript';
2
2
  export declare const arg: (a: internal.primitives.StubUint64Compat) => bytes;
package/impl/match.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { assertMatch, match } from '@algorandfoundation/algorand-typescript';
1
+ import type { assertMatch, match } from '@algorandfoundation/algorand-typescript';
2
2
  export declare const matchImpl: typeof match;
3
3
  export declare const assertMatchImpl: typeof assertMatch;
@@ -1,2 +1,2 @@
1
- import { internal } from '@algorandfoundation/algorand-typescript';
1
+ import type { internal } from '@algorandfoundation/algorand-typescript';
2
2
  export declare const onlineStake: internal.opTypes.OnlineStakeType;
package/impl/pure.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { Base64, biguint, bytes, internal, uint64 } from '@algorandfoundation/algorand-typescript';
1
+ import type { biguint, bytes, uint64 } from '@algorandfoundation/algorand-typescript';
2
+ import { Base64, internal } from '@algorandfoundation/algorand-typescript';
2
3
  export declare const addw: (a: internal.primitives.StubUint64Compat, b: internal.primitives.StubUint64Compat) => readonly [uint64, uint64];
3
4
  export declare const base64Decode: (e: Base64, a: internal.primitives.StubBytesCompat) => bytes;
4
5
  export declare const bitLength: (a: internal.primitives.StubUint64Compat | internal.primitives.StubBytesCompat) => uint64;
@@ -0,0 +1,90 @@
1
+ import type { bytes, LocalState, uint64, Account as AccountType, Application as ApplicationType, Asset as AssetType } from '@algorandfoundation/algorand-typescript';
2
+ import { internal } from '@algorandfoundation/algorand-typescript';
3
+ import { BytesMap, Uint64Map } from '../collections/custom-key-map';
4
+ import type { Mutable } from '../typescript-helpers';
5
+ import { BytesBackedCls, Uint64BackedCls } from './base';
6
+ import type { GlobalStateCls } from './state';
7
+ export declare class AssetHolding {
8
+ balance: uint64;
9
+ frozen: boolean;
10
+ constructor(balance: internal.primitives.StubUint64Compat, frozen: boolean);
11
+ }
12
+ export declare class AccountData {
13
+ optedAssets: Uint64Map<AssetHolding>;
14
+ optedApplications: Uint64Map<ApplicationType>;
15
+ incentiveEligible: boolean;
16
+ lastProposed?: uint64;
17
+ lastHeartbeat?: uint64;
18
+ account: Mutable<Omit<AccountType, 'bytes' | 'isOptedIn'>>;
19
+ constructor();
20
+ }
21
+ export declare function Account(address?: bytes): AccountType;
22
+ export declare class AccountCls extends BytesBackedCls implements AccountType {
23
+ constructor(address?: bytes);
24
+ private get data();
25
+ get balance(): uint64;
26
+ get minBalance(): uint64;
27
+ get authAddress(): AccountType;
28
+ get totalNumUint(): uint64;
29
+ get totalNumByteSlice(): uint64;
30
+ get totalExtraAppPages(): uint64;
31
+ get totalAppsCreated(): uint64;
32
+ get totalAppsOptedIn(): uint64;
33
+ get totalAssetsCreated(): uint64;
34
+ get totalAssets(): uint64;
35
+ get totalBoxes(): uint64;
36
+ get totalBoxBytes(): uint64;
37
+ isOptedIn(assetOrApp: AssetType | ApplicationType): boolean;
38
+ }
39
+ export declare class ApplicationData {
40
+ application: Mutable<Omit<ApplicationType, 'id' | 'address'>> & {
41
+ appLogs: bytes[];
42
+ globalStates: BytesMap<GlobalStateCls<unknown>>;
43
+ localStates: BytesMap<LocalState<unknown>>;
44
+ boxes: BytesMap<Uint8Array>;
45
+ };
46
+ isCreating: boolean;
47
+ get appLogs(): bytes[];
48
+ constructor();
49
+ }
50
+ export declare function Application(id?: uint64): ApplicationType;
51
+ export declare class ApplicationCls extends Uint64BackedCls implements ApplicationType {
52
+ get id(): uint64;
53
+ constructor(id?: uint64);
54
+ private get data();
55
+ get approvalProgram(): bytes;
56
+ get clearStateProgram(): bytes;
57
+ get globalNumUint(): uint64;
58
+ get globalNumBytes(): uint64;
59
+ get localNumUint(): uint64;
60
+ get localNumBytes(): uint64;
61
+ get extraProgramPages(): uint64;
62
+ get creator(): AccountType;
63
+ get address(): AccountType;
64
+ }
65
+ export type AssetData = Mutable<Omit<AssetType, 'id' | 'balance' | 'frozen'>>;
66
+ export declare function Asset(id?: uint64): AssetType;
67
+ export declare class AssetCls extends Uint64BackedCls implements AssetType {
68
+ get id(): uint64;
69
+ constructor(id?: internal.primitives.StubUint64Compat);
70
+ private get data();
71
+ get total(): uint64;
72
+ get decimals(): uint64;
73
+ get defaultFrozen(): boolean;
74
+ get unitName(): bytes;
75
+ get name(): bytes;
76
+ get url(): bytes;
77
+ get metadataHash(): bytes;
78
+ get manager(): AccountType;
79
+ get reserve(): AccountType;
80
+ get freeze(): AccountType;
81
+ get clawback(): AccountType;
82
+ get creator(): AccountType;
83
+ balance(account: AccountType): uint64;
84
+ frozen(account: AccountType): boolean;
85
+ private getAssetHolding;
86
+ }
87
+ export declare const checksumFromPublicKey: (pk: Uint8Array) => Uint8Array;
88
+ export declare const getApplicationAddress: (appId: internal.primitives.StubUint64Compat) => AccountType;
89
+ export declare const encodeAddress: (address: Uint8Array) => string;
90
+ export declare const decodePublicKey: (address: string) => Uint8Array;
package/impl/state.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { Account, BoxMap as BoxMapType, BoxRef as BoxRefType, Box as BoxType, bytes, GlobalStateOptions, GlobalState as GlobalStateType, internal, LocalState as LocalStateType, uint64 } from '@algorandfoundation/algorand-typescript';
1
+ import type { BoxMap as BoxMapType, BoxRef as BoxRefType, Box as BoxType, bytes, GlobalStateOptions, GlobalState as GlobalStateType, LocalState as LocalStateType, uint64, Account } from '@algorandfoundation/algorand-typescript';
2
+ import { internal } from '@algorandfoundation/algorand-typescript';
2
3
  export declare class GlobalStateCls<ValueType> {
3
4
  #private;
4
5
  private readonly _type;
@@ -1,7 +1,8 @@
1
- import { Account, Application, arc4, Asset, bytes, gtxn, internal, TransactionType, uint64 } from '@algorandfoundation/algorand-typescript';
2
- import { Mutable, ObjectKeys } from '../typescript-helpers';
1
+ import type { arc4, bytes, gtxn, uint64, Account as AccountType, Application as ApplicationType, Asset as AssetType } from '@algorandfoundation/algorand-typescript';
2
+ import { internal, TransactionType } from '@algorandfoundation/algorand-typescript';
3
+ import type { Mutable, ObjectKeys } from '../typescript-helpers';
3
4
  declare const baseDefaultFields: () => {
4
- sender: Account;
5
+ sender: AccountType;
5
6
  fee: uint64;
6
7
  firstValid: uint64;
7
8
  firstValidTime: uint64;
@@ -10,12 +11,12 @@ declare const baseDefaultFields: () => {
10
11
  lease: bytes;
11
12
  groupIndex: uint64;
12
13
  txnId: bytes;
13
- rekeyTo: Account;
14
+ rekeyTo: AccountType;
14
15
  };
15
16
  export type TxnFields<TTxn> = Partial<Mutable<Pick<TTxn, ObjectKeys<TTxn>>>>;
16
17
  declare abstract class TransactionBase {
17
18
  protected constructor(fields: Partial<ReturnType<typeof baseDefaultFields>>);
18
- readonly sender: Account;
19
+ readonly sender: AccountType;
19
20
  readonly fee: uint64;
20
21
  readonly firstValid: uint64;
21
22
  readonly firstValidTime: uint64;
@@ -24,16 +25,16 @@ declare abstract class TransactionBase {
24
25
  readonly lease: bytes;
25
26
  readonly groupIndex: uint64;
26
27
  readonly txnId: bytes;
27
- readonly rekeyTo: Account;
28
+ readonly rekeyTo: AccountType;
28
29
  readonly scratchSpace: Array<bytes | uint64>;
29
30
  setScratchSlot(index: internal.primitives.StubUint64Compat, value: internal.primitives.StubBytesCompat | internal.primitives.StubUint64Compat): void;
30
31
  getScratchSlot(index: internal.primitives.StubUint64Compat): bytes | uint64;
31
32
  }
32
33
  export declare class PaymentTransaction extends TransactionBase implements gtxn.PaymentTxn {
33
34
  protected constructor(fields: TxnFields<gtxn.PaymentTxn>);
34
- readonly receiver: Account;
35
+ readonly receiver: AccountType;
35
36
  readonly amount: uint64;
36
- readonly closeRemainderTo: Account;
37
+ readonly closeRemainderTo: AccountType;
37
38
  readonly type: TransactionType.Payment;
38
39
  readonly typeBytes: bytes;
39
40
  }
@@ -51,7 +52,7 @@ export declare class KeyRegistrationTransaction extends TransactionBase implemen
51
52
  }
52
53
  export declare class AssetConfigTransaction extends TransactionBase implements gtxn.AssetConfigTxn {
53
54
  protected constructor(fields: TxnFields<gtxn.AssetConfigTxn>);
54
- readonly configAsset: Asset;
55
+ readonly configAsset: AssetType;
55
56
  readonly total: uint64;
56
57
  readonly decimals: uint64;
57
58
  readonly defaultFrozen: boolean;
@@ -59,37 +60,37 @@ export declare class AssetConfigTransaction extends TransactionBase implements g
59
60
  readonly assetName: bytes;
60
61
  readonly url: bytes;
61
62
  readonly metadataHash: bytes;
62
- readonly manager: Account;
63
- readonly reserve: Account;
64
- readonly freeze: Account;
65
- readonly clawback: Account;
66
- readonly createdAsset: Asset;
63
+ readonly manager: AccountType;
64
+ readonly reserve: AccountType;
65
+ readonly freeze: AccountType;
66
+ readonly clawback: AccountType;
67
+ readonly createdAsset: AssetType;
67
68
  readonly type: TransactionType.AssetConfig;
68
69
  readonly typeBytes: bytes;
69
70
  }
70
71
  export declare class AssetTransferTransaction extends TransactionBase implements gtxn.AssetTransferTxn {
71
72
  protected constructor(fields: TxnFields<gtxn.AssetTransferTxn>);
72
- readonly xferAsset: Asset;
73
+ readonly xferAsset: AssetType;
73
74
  readonly assetAmount: uint64;
74
- readonly assetSender: Account;
75
- readonly assetReceiver: Account;
76
- readonly assetCloseTo: Account;
75
+ readonly assetSender: AccountType;
76
+ readonly assetReceiver: AccountType;
77
+ readonly assetCloseTo: AccountType;
77
78
  readonly type: TransactionType.AssetTransfer;
78
79
  readonly typeBytes: bytes;
79
80
  }
80
81
  export declare class AssetFreezeTransaction extends TransactionBase implements gtxn.AssetFreezeTxn {
81
82
  protected constructor(fields: TxnFields<gtxn.AssetFreezeTxn>);
82
- readonly freezeAsset: Asset;
83
- readonly freezeAccount: Account;
83
+ readonly freezeAsset: AssetType;
84
+ readonly freezeAccount: AccountType;
84
85
  readonly frozen: boolean;
85
86
  readonly type: TransactionType.AssetFreeze;
86
87
  readonly typeBytes: bytes;
87
88
  }
88
89
  export type ApplicationTransactionFields = TxnFields<gtxn.ApplicationTxn> & Partial<{
89
90
  appArgs: Array<unknown>;
90
- accounts: Array<Account>;
91
- assets: Array<Asset>;
92
- apps: Array<Application>;
91
+ accounts: Array<AccountType>;
92
+ assets: Array<AssetType>;
93
+ apps: Array<ApplicationType>;
93
94
  approvalProgramPages: Array<bytes>;
94
95
  clearStateProgramPages: Array<bytes>;
95
96
  appLogs: Array<bytes>;
@@ -98,14 +99,14 @@ export type ApplicationTransactionFields = TxnFields<gtxn.ApplicationTxn> & Part
98
99
  export declare class ApplicationTransaction extends TransactionBase implements gtxn.ApplicationTxn {
99
100
  #private;
100
101
  protected constructor(fields: ApplicationTransactionFields);
101
- readonly appId: Application;
102
+ readonly appId: ApplicationType;
102
103
  readonly onCompletion: arc4.OnCompleteActionStr;
103
104
  readonly globalNumUint: uint64;
104
105
  readonly globalNumBytes: uint64;
105
106
  readonly localNumUint: uint64;
106
107
  readonly localNumBytes: uint64;
107
108
  readonly extraProgramPages: uint64;
108
- readonly createdApp: Application;
109
+ readonly createdApp: ApplicationType;
109
110
  get approvalProgram(): bytes;
110
111
  get clearStateProgram(): bytes;
111
112
  get numAppArgs(): uint64;
@@ -116,13 +117,13 @@ export declare class ApplicationTransaction extends TransactionBase implements g
116
117
  get numClearStateProgramPages(): uint64;
117
118
  get numLogs(): uint64;
118
119
  get lastLog(): bytes;
119
- get apat(): Account[];
120
- get apas(): Asset[];
121
- get apfa(): Application[];
120
+ get apat(): AccountType[];
121
+ get apas(): AssetType[];
122
+ get apfa(): ApplicationType[];
122
123
  appArgs(index: internal.primitives.StubUint64Compat): bytes;
123
- accounts(index: internal.primitives.StubUint64Compat): Account;
124
- assets(index: internal.primitives.StubUint64Compat): Asset;
125
- apps(index: internal.primitives.StubUint64Compat): Application;
124
+ accounts(index: internal.primitives.StubUint64Compat): AccountType;
125
+ assets(index: internal.primitives.StubUint64Compat): AssetType;
126
+ apps(index: internal.primitives.StubUint64Compat): ApplicationType;
126
127
  approvalProgramPages(index: internal.primitives.StubUint64Compat): bytes;
127
128
  clearStateProgramPages(index: internal.primitives.StubUint64Compat): bytes;
128
129
  logs(index: internal.primitives.StubUint64Compat): bytes;
package/impl/txn.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- import { internal, uint64 } from '@algorandfoundation/algorand-typescript';
1
+ import type { uint64 } from '@algorandfoundation/algorand-typescript';
2
+ import { internal } from '@algorandfoundation/algorand-typescript';
2
3
  export declare const gaid: (a: internal.primitives.StubUint64Compat) => uint64;
3
4
  export declare const Txn: internal.opTypes.TxnType;
package/impl/urange.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { internal } from '@algorandfoundation/algorand-typescript';
1
+ import type { internal } from '@algorandfoundation/algorand-typescript';
2
2
  export declare function urangeImpl(a: internal.primitives.StubUint64Compat, b?: internal.primitives.StubUint64Compat, c?: internal.primitives.StubUint64Compat): Generator<import("@algorandfoundation/algorand-typescript").uint64, number, unknown>;
@@ -1,4 +1,4 @@
1
- import { internal, uint64 } from '@algorandfoundation/algorand-typescript';
1
+ import type { internal, uint64 } from '@algorandfoundation/algorand-typescript';
2
2
  export declare class VoterData {
3
3
  balance: uint64;
4
4
  incentiveEligible: boolean;