@algorandfoundation/algorand-typescript 1.0.2-beta.2 → 1.1.0-beta.2

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.
package/arc4/index.d.ts CHANGED
@@ -180,6 +180,15 @@ export declare function methodSelector(methodSignature: InstanceMethod<Contract>
180
180
  * @returns The ARC4 method selector. Eg. `02BECE11`
181
181
  */
182
182
  export declare function methodSelector(methodSignature: string): bytes<4>;
183
+ /**
184
+ * Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first
185
+ * 4 bytes of the SHA512/256 hash of the method signature.
186
+ * @typeParam TMethod The type of an ARC4 method signature (eg. `typeof MyContract.prototype.myMethod`)
187
+ * @returns The ARC4 method selector. Eg. `02BECE11`
188
+ * @remarks This overload can be used in conjunction with type only import (eg. `import type { MyContract } from './my-contract'`) to
189
+ * work around what would otherwise be a circular reference in the event two contracts need to call each other.
190
+ */
191
+ export declare function methodSelector<TMethod>(): bytes<4>;
183
192
  /**
184
193
  * Interpret the provided bytes as an ARC4 encoded type
185
194
  * @param bytes An arc4 encoded bytes value
@@ -1 +1 @@
1
- {"version":3,"file":"index-C_DRi4sH.js","sources":["../src/base-contract.ts","../src/arc4/c2c.ts","../src/arc4/encoded-types.ts","../src/arc4/index.ts"],"sourcesContent":["import { NoImplementation } from './internal/errors'\nimport { ConstructorFor } from './internal/typescript-helpers'\nimport { uint64 } from './primitives'\nimport { NumberRange } from './util'\n\n/**\n * The base type for all Algorand TypeScript contracts\n */\nexport abstract class BaseContract {\n /**\n * The program to be run when the On Completion Action is != ClearState (3)\n */\n public abstract approvalProgram(): boolean | uint64\n\n /**\n * The program to be run when the On Completion Action is == ClearState (3)\n */\n public clearStateProgram(): boolean | uint64 {\n return true\n }\n}\n\n/**\n * Options class to manually define the total amount of global and local state contract will use.\n *\n * This is not required when all state is assigned to `this.`, but is required if a\n * contract dynamically interacts with state via `AppGlobal.getBytes` etc, or if you want\n * to reserve additional state storage for future contract updates, since the Algorand protocol\n * doesn't allow increasing them after creation.\n */\nexport type StateTotals = {\n globalUints?: number\n globalBytes?: number\n localUints?: number\n localBytes?: number\n}\n\n/**\n * Additional configuration options for a contract\n */\nexport type ContractOptions = {\n /**\n * Determines which AVM version to use, this affects what operations are supported.\n * Defaults to value provided on command line (which defaults to current mainnet version)\n */\n avmVersion?: 10 | 11 | 12 | 13\n\n /**\n * Override the name of the logic signature when generating build artifacts.\n * Defaults to the class name\n */\n name?: string\n /**\n * Allows you to mark a slot ID or range of slot IDs as \"off limits\" to Puya.\n * These slot ID(s) will never be written to or otherwise manipulating by the compiler itself.\n * This is particularly useful in combination with `op.gload_bytes` / `op.gload_uint64`\n * which lets a contract in a group transaction read from the scratch slots of another contract\n * that occurs earlier in the transaction group.\n *\n * In the case of inheritance, scratch slots reserved become cumulative. It is not an error\n * to have overlapping ranges or values either, so if a base class contract reserves slots\n * 0-5 inclusive and the derived contract reserves 5-10 inclusive, then within the derived\n * contract all slots 0-10 will be marked as reserved.\n */\n scratchSlots?: Array<number | NumberRange>\n /**\n * Allows defining what values should be used for global and local uint and bytes storage\n * values when creating a contract. Used when outputting ARC-32 application.json schemas.\n *\n * If left unspecified, the totals will be determined by the compiler based on state\n * variables assigned to `this`.\n *\n * This setting is not inherited, and only applies to the exact `Contract` it is specified\n * on. If a base class does specify this setting, and a derived class does not, a warning\n * will be emitted for the derived class. To resolve this warning, `stateTotals` must be\n * specified. An empty object may be provided in order to indicate that this contract should\n * revert to the default behaviour\n */\n stateTotals?: StateTotals\n}\n\n/**\n * The contract decorator can be used to specify additional configuration options for a smart contract\n * @param options An object containing the configuration options\n */\nexport function contract(options: ContractOptions) {\n return <T extends ConstructorFor<BaseContract>>(contract: T, ctx: ClassDecoratorContext) => {\n throw new NoImplementation()\n }\n}\n","import { CompileContractOptions, CompiledContract } from '../compiled'\nimport { gtxn } from '../gtxn'\nimport { NoImplementation } from '../internal/errors'\nimport { AnyFunction, ConstructorFor, InstanceMethod } from '../internal/typescript-helpers'\nimport { itxn } from '../itxn'\nimport { Contract } from './index'\n\n/**\n * Defines txn fields that are available for a bare create application call.\n *\n * This is the regular application call fields minus:\n * - appId: because the appId is not known when creating an application\n * - appArgs: because a bare call cannot have arguments\n */\nexport type BareCreateApplicationCallFields = Omit<itxn.ApplicationCallFields, 'appId' | 'appArgs'>\n\n/**\n * Conditional type which given a group transaction type, returns the equivalent inner transaction\n * params type.\n */\nexport type GtxnToItxnFields<T extends gtxn.Transaction> = T extends gtxn.PaymentTxn\n ? itxn.PaymentItxnParams\n : T extends gtxn.KeyRegistrationTxn\n ? itxn.KeyRegistrationItxnParams\n : T extends gtxn.AssetConfigTxn\n ? itxn.AssetConfigItxnParams\n : T extends gtxn.AssetTransferTxn\n ? itxn.AssetTransferItxnParams\n : T extends gtxn.AssetFreezeTxn\n ? itxn.AssetFreezeItxnParams\n : T extends gtxn.ApplicationCallTxn\n ? itxn.ApplicationCallItxnParams\n : itxn.ItxnParams\n\n/**\n * Conditional type which given an application argument, returns the input type for that argument.\n *\n * The input type will usually be the original type apart from group transactions which will be substituted\n * with their equivalent inner transaction type.\n */\nexport type TypedApplicationArg<TArg> = TArg extends gtxn.Transaction ? GtxnToItxnFields<TArg> : TArg\n\n/**\n * Conditional type which maps a tuple of application arguments to a tuple of input types for specifying those arguments.\n */\nexport type TypedApplicationArgs<TArgs> = TArgs extends never\n ? unknown[]\n : TArgs extends []\n ? []\n : TArgs extends [infer TArg, ...infer TRest]\n ? readonly [TypedApplicationArg<TArg>, ...TypedApplicationArgs<TRest>]\n : never\n\n/**\n * Application call fields with `appArgs` replaced with an `args` property that is strongly typed to the actual arguments for the\n * given application call.\n */\nexport type TypedApplicationCallFields<TArgs> = Omit<itxn.ApplicationCallFields, 'appArgs'> &\n (TArgs extends [] ? { readonly args?: TypedApplicationArgs<TArgs> } : { readonly args: TypedApplicationArgs<TArgs> })\n\n/**\n * The response type of a typed application call. Includes the raw itxn result object and the parsed ABI return value if applicable.\n */\nexport type TypedApplicationCallResponse<TReturn> = TReturn extends void\n ? { readonly itxn: itxn.ApplicationCallInnerTxn }\n : { readonly itxn: itxn.ApplicationCallInnerTxn; readonly returnValue: TReturn }\n\n/**\n * Conditional type which maps an ABI method to a factory method for constructing an application call transaction to call that method.\n */\nexport type ContractProxyMethod<TMethod> = TMethod extends (...args: infer TArgs) => infer TReturn\n ? (fields?: TypedApplicationCallFields<TArgs>) => TypedApplicationCallResponse<TReturn>\n : never\n\n/**\n * Conditional type which maps an ARC4 compatible contract to a proxy object which allows for constructing application call transactions for\n * all available ABI and bare methods. Also includes the compiled contract result data.\n */\nexport type ContractProxy<TContract extends Contract> = CompiledContract & {\n /**\n * Get methods for calling ABI and bare methods on the target contract\n */\n call: {\n /**\n * Invoke this method via an inner transaction call\n */\n [key in keyof TContract as key extends 'approvalProgram' | 'clearStateProgram'\n ? never\n : TContract[key] extends AnyFunction\n ? key\n : never]: ContractProxyMethod<TContract[key]>\n }\n /**\n * Create a bare application call itxn to create the contract.\n * @param fields Specify values for transaction fields which should override the default values.\n */\n bareCreate(fields?: BareCreateApplicationCallFields): itxn.ApplicationCallInnerTxn\n}\n\n/**\n * Pre compile the target ARC4 contract and return a proxy object for constructing inner transactions to call an instance of that contract.\n * @param contract An ARC4 contract class\n * @param options Compile contract arguments\n */\nexport function compileArc4<TContract extends Contract>(\n contract: ConstructorFor<TContract>,\n options?: CompileContractOptions,\n): ContractProxy<TContract> {\n throw new NoImplementation()\n}\n\nexport interface AbiCallOptions<TMethod> extends Omit<itxn.ApplicationCallFields, 'appArgs'> {\n readonly method?: TMethod\n readonly args?: TMethod extends InstanceMethod<Contract, infer TParams> ? TypedApplicationArgs<TParams> : unknown[]\n}\n\nexport type AbiCallResponse<TMethod> =\n TMethod extends InstanceMethod<Contract, infer TParams, infer TResult>\n ? TypedApplicationCallResponse<TResult>\n : TypedApplicationCallResponse<unknown>\n\n/**\n * Invokes the target ABI method using a strongly typed fields object.\n * @param options Specify options for the abi call.\n */\nexport function abiCall<TMethod>(options: AbiCallOptions<TMethod>): AbiCallResponse<TMethod> {\n throw new NoImplementation()\n}\n","import { NoImplementation } from '../internal/errors'\nimport { biguint, BigUintCompat, bytes, BytesBacked, StringCompat, uint64, Uint64Compat } from '../primitives'\nimport { Account } from '../reference'\n\n/**\n * Defines UintN bit sizes which are compatible with the uint64 type\n */\ntype UintBitSize = 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64\n/**\n * Defines UintN bit sizes which are only compatible with the biguint type\n */\ntype BigUintBitSize =\n | 72\n | 80\n | 88\n | 96\n | 104\n | 112\n | 120\n | 128\n | 136\n | 144\n | 152\n | 160\n | 168\n | 176\n | 184\n | 192\n | 200\n | 208\n | 216\n | 224\n | 232\n | 240\n | 248\n | 256\n | 264\n | 272\n | 280\n | 288\n | 296\n | 304\n | 312\n | 320\n | 328\n | 336\n | 344\n | 352\n | 360\n | 368\n | 376\n | 384\n | 392\n | 400\n | 408\n | 416\n | 424\n | 432\n | 440\n | 448\n | 456\n | 464\n | 472\n | 480\n | 488\n | 496\n | 504\n | 512\n/**\n * Defines supported bit sizes for the UintN and UFixed types\n */\nexport type BitSize = UintBitSize | BigUintBitSize\n\n/**\n * Conditional type which returns the compat type relevant to a given UintN bit size\n */\ntype CompatForArc4Int<N extends BitSize> = N extends UintBitSize ? Uint64Compat : BigUintCompat\n\n/**\n * @hidden\n */\nconst TypeProperty = Symbol('ARC4Type')\n\n/**\n * A base type for ARC4 encoded values\n */\nexport abstract class ARC4Encoded implements BytesBacked {\n /**\n * @hidden\n *\n * Since TypeScript is structurally typed, different ARC4Encodeds with compatible\n * structures will often be assignable to one and another and this is generally\n * not desirable. The TypeProperty property should be used to declare a literal value\n * (usually the class name) on each distinct ARC4Encoded class to ensure they are\n * structurally different.\n */\n abstract [TypeProperty]?: string\n\n /**\n * Retrieve the encoded bytes for this type\n */\n get bytes(): bytes {\n throw new NoImplementation()\n }\n}\n\n/**\n * A utf8 encoded string prefixed with its length expressed as a 2 byte uint\n */\nexport class Str extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: 'arc4.Str'\n\n /**\n * Create a new Str instance\n * @param s The native string to initialize this Str from\n */\n constructor(s?: StringCompat) {\n super()\n }\n\n /**\n * Retrieve the decoded native string\n */\n get native(): string {\n throw new NoImplementation()\n }\n}\n\n/**\n * A fixed bit size unsigned int\n */\nexport class Uint<N extends BitSize> extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: `arc4.Uint<${N}>`\n\n /**\n * Create a new UintN instance\n * @param v The native uint64 or biguint value to initialize this UintN from\n */\n constructor(v?: CompatForArc4Int<N>) {\n super()\n }\n\n /**\n * Retrieve the decoded native uint64\n */\n asUint64(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Retrieve the decoded native biguint\n */\n asBigUint(): biguint {\n throw new NoImplementation()\n }\n}\n\n/**\n * An alias for Uint<8>\n */\nexport class Byte extends Uint<8> {}\n\n/**\n * An alias for Uint<8>\n */\nexport class Uint8 extends Uint<8> {}\n\n/**\n * An alias for Uint<16>\n */\nexport class Uint16 extends Uint<16> {}\n\n/**\n * An alias for Uint<32>\n */\nexport class Uint32 extends Uint<32> {}\n\n/**\n * An alias for Uint<64>\n */\nexport class Uint64 extends Uint<64> {}\n\n/**\n * An alias for Uint<128>\n */\nexport class Uint128 extends Uint<128> {}\n\n/**\n * An alias for Uint<256>\n */\nexport class Uint256 extends Uint<256> {}\n\n/**\n * A fixed bit size, fixed decimal unsigned value\n */\nexport class UFixed<N extends BitSize, M extends number> extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: `arc4.UFixed<${N}x${M}>`\n\n /**\n * Create a new UFixed value\n * @param v A string representing the integer and fractional portion of the number\n */\n constructor(v?: `${number}.${number}`) {\n super()\n }\n}\n\n/**\n * A boolean value\n */\nexport class Bool extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: 'arc4.Bool'\n\n /**\n * Create a new Bool value\n * @param v The native boolean to initialize this value from\n */\n constructor(v?: boolean) {\n super()\n }\n\n /**\n * Get the decoded native boolean for this value\n */\n get native(): boolean {\n throw new NoImplementation()\n }\n}\n\n/**\n * A base type for arc4 array types\n */\nabstract class Arc4ArrayBase<TItem extends ARC4Encoded> extends ARC4Encoded implements ConcatArray<TItem> {\n protected constructor() {\n super()\n }\n\n /**\n * Returns the current length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n throw new NoImplementation()\n }\n\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new Dynamic array with all items from this array\n */\n slice(): Array<TItem>\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new DynamicArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n */\n slice(end: Uint64Compat): Array<TItem>\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new DynamicArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n */\n slice(start: Uint64Compat, end: Uint64Compat): Array<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): Array<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Creates a string by concatenating all the items in the array delimited by the\n * specified separator (or ',' by default)\n * @param separator\n * @deprecated Join is not supported in Algorand TypeScript\n */\n join(separator?: string): string {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): IterableIterator<readonly [uint64, TItem]> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n throw new NoImplementation()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n}\n\n/**\n * A fixed sized array of arc4 items\n * @typeParam TItem The type of a single item in the array\n * @typeParam TLength The fixed length of the array\n */\nexport class StaticArray<TItem extends ARC4Encoded, TLength extends number> extends Arc4ArrayBase<TItem> {\n /** @hidden */\n [TypeProperty]?: `arc4.StaticArray<${TItem[typeof TypeProperty]}, ${TLength}>`\n\n /**\n * Create a new StaticArray instance\n */\n constructor()\n /**\n * Create a new StaticArray instance with the specified items\n * @param items The initial items for the array\n */\n constructor(...items: TItem[] & { length: TLength })\n constructor(...items: TItem[] & { length: TLength }) {\n super()\n }\n\n /**\n * Returns a new array containing all items from _this_ array, and _other_ array\n * @param other Another array to concat with this one\n */\n concat(other: Arc4ArrayBase<TItem>): DynamicArray<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns the statically declared length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n}\n\n/**\n * A dynamic sized array of arc4 items\n * @typeParam TItem The type of a single item in the array\n */\nexport class DynamicArray<TItem extends ARC4Encoded> extends Arc4ArrayBase<TItem> {\n /** @hidden */\n [TypeProperty]?: `arc4.DynamicArray<${TItem[typeof TypeProperty]}>`\n\n /**\n * Create a new DynamicArray with the specified items\n * @param items The initial items for the array\n */\n constructor(...items: TItem[]) {\n super()\n }\n\n /**\n * Push a number of items into this array\n * @param items The items to be added to this array\n */\n push(...items: TItem[]): void {\n throw new NoImplementation()\n }\n\n /**\n * Pop a single item from this array\n */\n pop(): TItem {\n throw new NoImplementation()\n }\n\n /**\n * Returns a new array containing all items from _this_ array, and _other_ array\n * @param other Another array to concat with this one\n */\n concat(other: Arc4ArrayBase<TItem>): DynamicArray<TItem> {\n throw new NoImplementation()\n }\n}\n\n/**\n * @hidden\n */\ntype ExpandTupleType<T extends readonly ARC4Encoded[]> = T extends [infer T1 extends ARC4Encoded, ...infer TRest extends ARC4Encoded[]]\n ? TRest extends []\n ? `${T1[typeof TypeProperty]}`\n : `${T1[typeof TypeProperty]},${ExpandTupleType<TRest>}`\n : ''\n\n/**\n * An arc4 encoded tuple of values\n * @typeParam TTuple A type representing the native tuple of item types\n */\nexport class Tuple<const TTuple extends readonly [ARC4Encoded, ...ARC4Encoded[]]> extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: `arc4.Tuple<${ExpandTupleType<TTuple>}>`\n\n /**\n * Create a new Tuple with the default zero values for items\n */\n constructor()\n /**\n * Create a new Tuple with the specified items\n * @param items The tuple items\n */\n constructor(...items: TTuple)\n constructor(...items: TTuple | []) {\n super()\n }\n\n /**\n * Returns the item at the specified index\n * @param index The index of the item to get. Must be a positive literal representing a tuple index\n */\n at<TIndex extends keyof TTuple>(index: TIndex): TTuple[TIndex] {\n throw new NoImplementation()\n }\n\n /**\n * Returns the length of this tuple\n */\n get length(): TTuple['length'] & uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the decoded native tuple (with arc4 encoded items)\n */\n get native(): TTuple {\n throw new NoImplementation()\n }\n}\n\n/**\n * A 32 byte Algorand Address\n */\nexport class Address extends Arc4ArrayBase<Byte> {\n /** @hidden */\n [TypeProperty]?: 'arc4.Address'\n\n /**\n * Create a new Address instance\n * @param value An Account, base 32 address string, or the address bytes\n */\n constructor(value?: Account | string | bytes) {\n super()\n }\n\n /**\n * Returns an Account instance for this Address\n */\n get native(): Account {\n throw new NoImplementation()\n }\n}\n\n/**\n * The base type for arc4 structs\n */\nclass StructBase<T> extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: 'arc4.Struct'\n\n get native(): T {\n throw new NoImplementation()\n }\n}\n\n/**\n * Type alias for the Struct constructor function\n * @typeParam T The shape of the arc4 struct\n */\ntype StructConstructor = {\n new <T extends Record<string, ARC4Encoded>>(initial: T): StructBase<T> & T\n}\n\n/**\n * The base type of arc4 structs\n *\n * Usage:\n * ```\n * class MyStruct extends Struct<{ x: Uint8, y: Str, z: DynamicBytes }> { }\n * ```\n */\nexport const Struct = StructBase as unknown as StructConstructor\n\n/**\n * A variable length sequence of bytes prefixed with its length expressed as a 2 byte uint\n */\nexport class DynamicBytes extends Arc4ArrayBase<Byte> {\n /** @hidden */\n [TypeProperty]?: 'arc4.DynamicBytes'\n\n /**\n * Create a new DynamicBytes instance\n * @param value The bytes or utf8 interpreted string to initialize this type\n */\n constructor(value?: bytes | string) {\n super()\n }\n\n /**\n * Get the native bytes value (excludes the length prefix)\n */\n get native(): bytes {\n throw new NoImplementation()\n }\n\n /**\n * Returns a dynamic bytes object containing all bytes from _this_ and _other_\n * @param other Another array of bytes to concat with this one\n */\n concat(other: Arc4ArrayBase<Byte>): DynamicBytes {\n throw new NoImplementation()\n }\n}\n\n/**\n * A fixed length sequence of bytes\n */\nexport class StaticBytes<TLength extends uint64 = 0> extends Arc4ArrayBase<Byte> {\n /** @hidden */\n [TypeProperty]?: `arc4.StaticBytes<${TLength}>`\n\n /**\n * Create a new StaticBytes instance from native fixed sized bytes\n * @param value The bytes\n */\n constructor(value: bytes<TLength>)\n /**\n * Create a new StaticBytes instance from native bytes\n * @param value The bytes\n */\n constructor(value: bytes)\n /**\n * Create a new StaticBytes instance from a utf8 string\n * @param value A string\n */\n constructor(value: string)\n /**\n * Create a new StaticBytes instance of length 0\n */\n constructor()\n constructor(value?: bytes | string) {\n super()\n }\n\n /**\n * Get the native bytes value\n */\n get native(): bytes<TLength> {\n throw new NoImplementation()\n }\n\n /**\n * Returns a dynamic bytes object containing all bytes from _this_ and _other_\n * @param other Another array of bytes to concat with this one\n */\n concat(other: Arc4ArrayBase<Byte>): DynamicBytes {\n throw new NoImplementation()\n }\n\n /**\n * Returns the statically declared length of this byte array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n}\n","import { BaseContract } from '../base-contract'\nimport { NoImplementation } from '../internal/errors'\nimport { AnyFunction, DeliberateAny, InstanceMethod } from '../internal/typescript-helpers'\nimport { OnCompleteActionStr } from '../on-complete-action'\nimport { bytes, BytesCompat, uint64 } from '../primitives'\nimport { ARC4Encoded } from './encoded-types'\n\nexport * from './c2c'\nexport * from './encoded-types'\n\n/**\n * The base type for all ARC4 contracts in Algorand TypeScript\n */\nexport class Contract extends BaseContract {\n /**\n * Default implementation of an ARC4 approval program, routes transactions to ABI or bare methods based on application\n * args and on completion actions\n */\n override approvalProgram(): boolean {\n throw new NoImplementation()\n }\n}\n\n/**\n * Defines conventional routing method names. When used, methods with these names will be implicitly routed to the corresponding\n * application lifecycle event.\n *\n * @remarks This behaviour is independent of a contract explicitly implementing this interface. The interface is provided simply to improve\n * the developer experience of using this feature.\n */\nexport interface ConventionalRouting {\n /**\n * The function to invoke when closing out of this application\n */\n closeOutOfApplication?: AnyFunction\n /**\n * The function to invoke when creating this application\n */\n createApplication?: AnyFunction\n /**\n * The function to invoke when deleting this application\n */\n deleteApplication?: AnyFunction\n /**\n * The function to invoke when opting in to this application\n */\n optInToApplication?: AnyFunction\n /**\n * The function to invoke when updating this application\n */\n updateApplication?: AnyFunction\n}\n\n/**\n * The possible options for a method being available on application create\n *\n * allow: This method CAN be called when the application is being created, but it is not required\n * disallow: This method CANNOT be called when the application is being created\n * require: This method CAN ONLY be called when the application is being created\n */\nexport type CreateOptions = 'allow' | 'disallow' | 'require'\n\n/**\n * The possible options for the resource encoding to use for the method\n *\n * index: Application, Asset, and Account arguments are included in the transaction's relevant array. The argument value is the uint8 index of the resource in the that array.\n * value: Application, Asset and Account arguments are passed by their uint64 id (Application and Asset) or bytes[32] address (Account).\n */\nexport type ResourceEncodingOptions = 'index' | 'value'\n\n/**\n * The possible options for validation behaviour for this method\n * args: ABI arguments are validated automatically to ensure they are encoded correctly.\n * unsafe-disabled: No automatic validation occurs. Arguments can instead be validated manually.\n */\nexport type ValidateEncodingOptions = 'unsafe-disabled' | 'args'\n\n/**\n * Type alias for a default argument schema\n * @typeParam TContract The type of the contract containing the method this default argument is for\n */\nexport type DefaultArgument<TContract extends Contract> =\n | {\n /**\n * A compile time constant value to be used as a default\n */\n constant: string | boolean | number | bigint\n }\n | {\n /**\n * Retrieve the default value from a member of this contract. The member can be\n *\n * LocalState: The value is retrieved from the calling user's local state before invoking this method\n * GlobalState: The value is retrieved from the specified global state key before invoking this method\n * Method: Any readonly abimethod with no arguments can be used as a source\n */\n from: keyof TContract\n }\n/**\n * Configuration options for an abi method\n * @typeParam TContract the type of the contract this method is a part of\n */\nexport type AbiMethodConfig<TContract extends Contract> = {\n /**\n * Which on complete action(s) are allowed when invoking this method.\n * @default 'NoOp'\n */\n allowActions?: OnCompleteActionStr | OnCompleteActionStr[]\n /**\n * Whether this method should be callable when creating the application.\n * @default 'disallow'\n */\n onCreate?: CreateOptions\n /**\n * Does the method only perform read operations (no mutation of chain state)\n * @default false\n */\n readonly?: boolean\n /**\n * Override the name used to generate the abi method selector\n */\n name?: string\n /**\n * The resource encoding to use for this method. The default is 'value'\n *\n * index: Application, Asset, and Account arguments are included in the transaction's relevant array. The argument value is the uint8 index of the resource in the that array.\n * value: Application, Asset and Account arguments are passed by their uint64 id (Application and Asset) or bytes[32] address (Account).\n *\n * The resource must still be 'available' to this transaction but can take advantage of resource sharing within the transaction group.\n */\n resourceEncoding?: ResourceEncodingOptions\n\n /**\n * Controls validation behaviour for this method.\n *\n * If \"args\", then ABI arguments are validated automatically to ensure they are encoded correctly.\n * If \"unsafe-disabled\", then no automatic validation occurs. Arguments can instead be validated using the validateEncoding(...) function.\n * The default behaviour of this option can be controlled with the --validate-abi-args CLI flag.\n */\n validateEncoding?: ValidateEncodingOptions\n\n /**\n * Specify default arguments that can be populated by clients calling this method.\n *\n * A map of parameter names to the default argument source\n */\n defaultArguments?: Record<string, DefaultArgument<TContract>>\n}\n\n/**\n * Declares the decorated method as an abimethod that is called when the first transaction arg matches the method selector\n * @param config The config for this abi method\n * @typeParam TContract the type of the contract this method is a part of\n */\nexport function abimethod<TContract extends Contract>(config?: AbiMethodConfig<TContract>) {\n return function <TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n ): (this: TContract, ...args: TArgs) => TReturn {\n throw new NoImplementation()\n }\n}\n/**\n * Declares this abi method does not mutate chain state and can be called using a simulate call to the same effect.\n *\n * Shorthand for `@abimethod({readonly: true})`\n * @typeParam TContract the type of the contract this method is a part of\n */\nexport function readonly<TContract extends Contract, TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n): (this: TContract, ...args: TArgs) => TReturn {\n throw new NoImplementation()\n}\n\n/**\n * Configuration options for a bare method\n */\nexport type BareMethodConfig = {\n /**\n * Which on complete action(s) are allowed when invoking this method.\n * @default 'NoOp'\n */\n allowActions?: OnCompleteActionStr | OnCompleteActionStr[]\n /**\n * Whether this method should be callable when creating the application.\n * @default 'disallow'\n */\n onCreate?: CreateOptions\n}\n\n/**\n * Declares the decorated method as a baremethod that can only be called with no transaction args\n * @param config The config for this bare method\n * @typeParam TContract the type of the contract this method is a part of\n */\nexport function baremethod<TContract extends Contract>(config?: BareMethodConfig) {\n return function <TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n ): (this: TContract, ...args: TArgs) => TReturn {\n throw new NoImplementation()\n }\n}\n/**\n * Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first\n * 4 bytes of the SHA512/256 hash of the method signature.\n * @param methodSignature An ARC4 contract method reference. (Eg. `MyContract.prototype.myMethod`)\n * @returns The ARC4 method selector. Eg. `02BECE11`\n */\nexport function methodSelector(methodSignature: InstanceMethod<Contract>): bytes<4>\n/**\n * Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first\n * 4 bytes of the SHA512/256 hash of the method signature.\n * @param methodSignature An ARC4 method signature string (Eg. `hello(string)string`. Must be a compile time constant)\n * @returns The ARC4 method selector. Eg. `02BECE11`\n */\nexport function methodSelector(methodSignature: string): bytes<4>\nexport function methodSelector(methodSignature: string | InstanceMethod<Contract>): bytes<4> {\n throw new NoImplementation()\n}\n\n/**\n * Interpret the provided bytes as an ARC4 encoded type\n * @param bytes An arc4 encoded bytes value\n * @param options Options for how the bytes should be converted\n * @param options.prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed\n * @param options.strategy The strategy used for converting bytes.\n * `unsafe-cast`: Reinterpret the value as an ARC4 encoded type without validation\n * `validate`: Asserts the encoding of the raw bytes matches the expected type\n */\nexport function convertBytes<T extends ARC4Encoded>(\n bytes: BytesCompat,\n options: { prefix?: 'none' | 'log'; strategy: 'unsafe-cast' | 'validate' },\n): T {\n throw new NoImplementation()\n}\n\n/**\n * Decode the provided bytes to a native Algorand TypeScript value\n * @param bytes An arc4 encoded bytes value\n * @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed\n */\nexport function decodeArc4<T>(bytes: BytesCompat, prefix: 'none' | 'log' = 'none'): T {\n throw new NoImplementation()\n}\n\n/**\n * Encode the provided Algorand TypeScript value as ARC4 bytes\n * @param value Any native Algorand TypeScript value with a supported ARC4 encoding\n */\nexport function encodeArc4<const T>(value: T): bytes {\n throw new NoImplementation()\n}\n\n/**\n * Return the total number of bytes required to store T as bytes.\n *\n * T must represent a type with a fixed length encoding scheme.\n * @typeParam T Any native or arc4 type with a fixed encoding size.\n */\nexport function sizeOf<T>(): uint64 {\n throw new NoImplementation()\n}\n"],"names":[],"mappings":";;AAKA;;AAEG;MACmB,YAAY,CAAA;AAMhC;;AAEG;IACI,iBAAiB,GAAA;AACtB,QAAA,OAAO,IAAI;;AAEd;AA6DD;;;AAGG;AACG,SAAU,QAAQ,CAAC,OAAwB,EAAA;AAC/C,IAAA,OAAO,CAAyC,QAAW,EAAE,GAA0B,KAAI;QACzF,MAAM,IAAI,gBAAgB,EAAE;AAC9B,KAAC;AACH;;ACUA;;;;AAIG;AACa,SAAA,WAAW,CACzB,QAAmC,EACnC,OAAgC,EAAA;IAEhC,MAAM,IAAI,gBAAgB,EAAE;AAC9B;AAYA;;;AAGG;AACG,SAAU,OAAO,CAAU,OAAgC,EAAA;IAC/D,MAAM,IAAI,gBAAgB,EAAE;AAC9B;;ACjDA;;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AACa,SAAA,YAAY,CAC1B,KAAkB,EAClB,OAA0E,EAAA;IAE1E,MAAM,IAAI,gBAAgB,EAAE;AAC9B;AAEA;;;;AAIG;SACa,UAAU,CAAI,KAAkB,EAAE,SAAyB,MAAM,EAAA;IAC/E,MAAM,IAAI,gBAAgB,EAAE;AAC9B;AAEA;;;AAGG;AACG,SAAU,UAAU,CAAU,KAAQ,EAAA;IAC1C,MAAM,IAAI,gBAAgB,EAAE;AAC9B;AAEA;;;;;AAKG;SACa,MAAM,GAAA;IACpB,MAAM,IAAI,gBAAgB,EAAE;AAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index-C_DRi4sH.js","sources":["../src/base-contract.ts","../src/arc4/c2c.ts","../src/arc4/encoded-types.ts","../src/arc4/index.ts"],"sourcesContent":["import { NoImplementation } from './internal/errors'\nimport { ConstructorFor } from './internal/typescript-helpers'\nimport { uint64 } from './primitives'\nimport { NumberRange } from './util'\n\n/**\n * The base type for all Algorand TypeScript contracts\n */\nexport abstract class BaseContract {\n /**\n * The program to be run when the On Completion Action is != ClearState (3)\n */\n public abstract approvalProgram(): boolean | uint64\n\n /**\n * The program to be run when the On Completion Action is == ClearState (3)\n */\n public clearStateProgram(): boolean | uint64 {\n return true\n }\n}\n\n/**\n * Options class to manually define the total amount of global and local state contract will use.\n *\n * This is not required when all state is assigned to `this.`, but is required if a\n * contract dynamically interacts with state via `AppGlobal.getBytes` etc, or if you want\n * to reserve additional state storage for future contract updates, since the Algorand protocol\n * doesn't allow increasing them after creation.\n */\nexport type StateTotals = {\n globalUints?: number\n globalBytes?: number\n localUints?: number\n localBytes?: number\n}\n\n/**\n * Additional configuration options for a contract\n */\nexport type ContractOptions = {\n /**\n * Determines which AVM version to use, this affects what operations are supported.\n * Defaults to value provided on command line (which defaults to current mainnet version)\n */\n avmVersion?: 10 | 11 | 12 | 13\n\n /**\n * Override the name of the logic signature when generating build artifacts.\n * Defaults to the class name\n */\n name?: string\n /**\n * Allows you to mark a slot ID or range of slot IDs as \"off limits\" to Puya.\n * These slot ID(s) will never be written to or otherwise manipulating by the compiler itself.\n * This is particularly useful in combination with `op.gload_bytes` / `op.gload_uint64`\n * which lets a contract in a group transaction read from the scratch slots of another contract\n * that occurs earlier in the transaction group.\n *\n * In the case of inheritance, scratch slots reserved become cumulative. It is not an error\n * to have overlapping ranges or values either, so if a base class contract reserves slots\n * 0-5 inclusive and the derived contract reserves 5-10 inclusive, then within the derived\n * contract all slots 0-10 will be marked as reserved.\n */\n scratchSlots?: Array<number | NumberRange>\n /**\n * Allows defining what values should be used for global and local uint and bytes storage\n * values when creating a contract. Used when outputting ARC-32 application.json schemas.\n *\n * If left unspecified, the totals will be determined by the compiler based on state\n * variables assigned to `this`.\n *\n * This setting is not inherited, and only applies to the exact `Contract` it is specified\n * on. If a base class does specify this setting, and a derived class does not, a warning\n * will be emitted for the derived class. To resolve this warning, `stateTotals` must be\n * specified. An empty object may be provided in order to indicate that this contract should\n * revert to the default behaviour\n */\n stateTotals?: StateTotals\n}\n\n/**\n * The contract decorator can be used to specify additional configuration options for a smart contract\n * @param options An object containing the configuration options\n */\nexport function contract(options: ContractOptions) {\n return <T extends ConstructorFor<BaseContract>>(contract: T, ctx: ClassDecoratorContext) => {\n throw new NoImplementation()\n }\n}\n","import { CompileContractOptions, CompiledContract } from '../compiled'\nimport { gtxn } from '../gtxn'\nimport { NoImplementation } from '../internal/errors'\nimport { AnyFunction, ConstructorFor, InstanceMethod } from '../internal/typescript-helpers'\nimport { itxn } from '../itxn'\nimport { Contract } from './index'\n\n/**\n * Defines txn fields that are available for a bare create application call.\n *\n * This is the regular application call fields minus:\n * - appId: because the appId is not known when creating an application\n * - appArgs: because a bare call cannot have arguments\n */\nexport type BareCreateApplicationCallFields = Omit<itxn.ApplicationCallFields, 'appId' | 'appArgs'>\n\n/**\n * Conditional type which given a group transaction type, returns the equivalent inner transaction\n * params type.\n */\nexport type GtxnToItxnFields<T extends gtxn.Transaction> = T extends gtxn.PaymentTxn\n ? itxn.PaymentItxnParams\n : T extends gtxn.KeyRegistrationTxn\n ? itxn.KeyRegistrationItxnParams\n : T extends gtxn.AssetConfigTxn\n ? itxn.AssetConfigItxnParams\n : T extends gtxn.AssetTransferTxn\n ? itxn.AssetTransferItxnParams\n : T extends gtxn.AssetFreezeTxn\n ? itxn.AssetFreezeItxnParams\n : T extends gtxn.ApplicationCallTxn\n ? itxn.ApplicationCallItxnParams\n : itxn.ItxnParams\n\n/**\n * Conditional type which given an application argument, returns the input type for that argument.\n *\n * The input type will usually be the original type apart from group transactions which will be substituted\n * with their equivalent inner transaction type.\n */\nexport type TypedApplicationArg<TArg> = TArg extends gtxn.Transaction ? GtxnToItxnFields<TArg> : TArg\n\n/**\n * Conditional type which maps a tuple of application arguments to a tuple of input types for specifying those arguments.\n */\nexport type TypedApplicationArgs<TArgs> = TArgs extends never\n ? unknown[]\n : TArgs extends []\n ? []\n : TArgs extends [infer TArg, ...infer TRest]\n ? readonly [TypedApplicationArg<TArg>, ...TypedApplicationArgs<TRest>]\n : never\n\n/**\n * Application call fields with `appArgs` replaced with an `args` property that is strongly typed to the actual arguments for the\n * given application call.\n */\nexport type TypedApplicationCallFields<TArgs> = Omit<itxn.ApplicationCallFields, 'appArgs'> &\n (TArgs extends [] ? { readonly args?: TypedApplicationArgs<TArgs> } : { readonly args: TypedApplicationArgs<TArgs> })\n\n/**\n * The response type of a typed application call. Includes the raw itxn result object and the parsed ABI return value if applicable.\n */\nexport type TypedApplicationCallResponse<TReturn> = TReturn extends void\n ? { readonly itxn: itxn.ApplicationCallInnerTxn }\n : { readonly itxn: itxn.ApplicationCallInnerTxn; readonly returnValue: TReturn }\n\n/**\n * Conditional type which maps an ABI method to a factory method for constructing an application call transaction to call that method.\n */\nexport type ContractProxyMethod<TMethod> = TMethod extends (...args: infer TArgs) => infer TReturn\n ? (fields?: TypedApplicationCallFields<TArgs>) => TypedApplicationCallResponse<TReturn>\n : never\n\n/**\n * Conditional type which maps an ARC4 compatible contract to a proxy object which allows for constructing application call transactions for\n * all available ABI and bare methods. Also includes the compiled contract result data.\n */\nexport type ContractProxy<TContract extends Contract> = CompiledContract & {\n /**\n * Get methods for calling ABI and bare methods on the target contract\n */\n call: {\n /**\n * Invoke this method via an inner transaction call\n */\n [key in keyof TContract as key extends 'approvalProgram' | 'clearStateProgram'\n ? never\n : TContract[key] extends AnyFunction\n ? key\n : never]: ContractProxyMethod<TContract[key]>\n }\n /**\n * Create a bare application call itxn to create the contract.\n * @param fields Specify values for transaction fields which should override the default values.\n */\n bareCreate(fields?: BareCreateApplicationCallFields): itxn.ApplicationCallInnerTxn\n}\n\n/**\n * Pre compile the target ARC4 contract and return a proxy object for constructing inner transactions to call an instance of that contract.\n * @param contract An ARC4 contract class\n * @param options Compile contract arguments\n */\nexport function compileArc4<TContract extends Contract>(\n contract: ConstructorFor<TContract>,\n options?: CompileContractOptions,\n): ContractProxy<TContract> {\n throw new NoImplementation()\n}\n\nexport interface AbiCallOptions<TMethod> extends Omit<itxn.ApplicationCallFields, 'appArgs'> {\n readonly method?: TMethod\n readonly args?: TMethod extends InstanceMethod<Contract, infer TParams> ? TypedApplicationArgs<TParams> : unknown[]\n}\n\nexport type AbiCallResponse<TMethod> =\n TMethod extends InstanceMethod<Contract, infer TParams, infer TResult>\n ? TypedApplicationCallResponse<TResult>\n : TypedApplicationCallResponse<unknown>\n\n/**\n * Invokes the target ABI method using a strongly typed fields object.\n * @param options Specify options for the abi call.\n */\nexport function abiCall<TMethod>(options: AbiCallOptions<TMethod>): AbiCallResponse<TMethod> {\n throw new NoImplementation()\n}\n","import { NoImplementation } from '../internal/errors'\nimport { biguint, BigUintCompat, bytes, BytesBacked, StringCompat, uint64, Uint64Compat } from '../primitives'\nimport { Account } from '../reference'\n\n/**\n * Defines UintN bit sizes which are compatible with the uint64 type\n */\ntype UintBitSize = 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64\n/**\n * Defines UintN bit sizes which are only compatible with the biguint type\n */\ntype BigUintBitSize =\n | 72\n | 80\n | 88\n | 96\n | 104\n | 112\n | 120\n | 128\n | 136\n | 144\n | 152\n | 160\n | 168\n | 176\n | 184\n | 192\n | 200\n | 208\n | 216\n | 224\n | 232\n | 240\n | 248\n | 256\n | 264\n | 272\n | 280\n | 288\n | 296\n | 304\n | 312\n | 320\n | 328\n | 336\n | 344\n | 352\n | 360\n | 368\n | 376\n | 384\n | 392\n | 400\n | 408\n | 416\n | 424\n | 432\n | 440\n | 448\n | 456\n | 464\n | 472\n | 480\n | 488\n | 496\n | 504\n | 512\n/**\n * Defines supported bit sizes for the UintN and UFixed types\n */\nexport type BitSize = UintBitSize | BigUintBitSize\n\n/**\n * Conditional type which returns the compat type relevant to a given UintN bit size\n */\ntype CompatForArc4Int<N extends BitSize> = N extends UintBitSize ? Uint64Compat : BigUintCompat\n\n/**\n * @hidden\n */\nconst TypeProperty = Symbol('ARC4Type')\n\n/**\n * A base type for ARC4 encoded values\n */\nexport abstract class ARC4Encoded implements BytesBacked {\n /**\n * @hidden\n *\n * Since TypeScript is structurally typed, different ARC4Encodeds with compatible\n * structures will often be assignable to one and another and this is generally\n * not desirable. The TypeProperty property should be used to declare a literal value\n * (usually the class name) on each distinct ARC4Encoded class to ensure they are\n * structurally different.\n */\n abstract [TypeProperty]?: string\n\n /**\n * Retrieve the encoded bytes for this type\n */\n get bytes(): bytes {\n throw new NoImplementation()\n }\n}\n\n/**\n * A utf8 encoded string prefixed with its length expressed as a 2 byte uint\n */\nexport class Str extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: 'arc4.Str'\n\n /**\n * Create a new Str instance\n * @param s The native string to initialize this Str from\n */\n constructor(s?: StringCompat) {\n super()\n }\n\n /**\n * Retrieve the decoded native string\n */\n get native(): string {\n throw new NoImplementation()\n }\n}\n\n/**\n * A fixed bit size unsigned int\n */\nexport class Uint<N extends BitSize> extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: `arc4.Uint<${N}>`\n\n /**\n * Create a new UintN instance\n * @param v The native uint64 or biguint value to initialize this UintN from\n */\n constructor(v?: CompatForArc4Int<N>) {\n super()\n }\n\n /**\n * Retrieve the decoded native uint64\n */\n asUint64(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Retrieve the decoded native biguint\n */\n asBigUint(): biguint {\n throw new NoImplementation()\n }\n}\n\n/**\n * An alias for Uint<8>\n */\nexport class Byte extends Uint<8> {}\n\n/**\n * An alias for Uint<8>\n */\nexport class Uint8 extends Uint<8> {}\n\n/**\n * An alias for Uint<16>\n */\nexport class Uint16 extends Uint<16> {}\n\n/**\n * An alias for Uint<32>\n */\nexport class Uint32 extends Uint<32> {}\n\n/**\n * An alias for Uint<64>\n */\nexport class Uint64 extends Uint<64> {}\n\n/**\n * An alias for Uint<128>\n */\nexport class Uint128 extends Uint<128> {}\n\n/**\n * An alias for Uint<256>\n */\nexport class Uint256 extends Uint<256> {}\n\n/**\n * A fixed bit size, fixed decimal unsigned value\n */\nexport class UFixed<N extends BitSize, M extends number> extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: `arc4.UFixed<${N}x${M}>`\n\n /**\n * Create a new UFixed value\n * @param v A string representing the integer and fractional portion of the number\n */\n constructor(v?: `${number}.${number}`) {\n super()\n }\n}\n\n/**\n * A boolean value\n */\nexport class Bool extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: 'arc4.Bool'\n\n /**\n * Create a new Bool value\n * @param v The native boolean to initialize this value from\n */\n constructor(v?: boolean) {\n super()\n }\n\n /**\n * Get the decoded native boolean for this value\n */\n get native(): boolean {\n throw new NoImplementation()\n }\n}\n\n/**\n * A base type for arc4 array types\n */\nabstract class Arc4ArrayBase<TItem extends ARC4Encoded> extends ARC4Encoded implements ConcatArray<TItem> {\n protected constructor() {\n super()\n }\n\n /**\n * Returns the current length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n throw new NoImplementation()\n }\n\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new Dynamic array with all items from this array\n */\n slice(): Array<TItem>\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new DynamicArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n */\n slice(end: Uint64Compat): Array<TItem>\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new DynamicArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n */\n slice(start: Uint64Compat, end: Uint64Compat): Array<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): Array<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Creates a string by concatenating all the items in the array delimited by the\n * specified separator (or ',' by default)\n * @param separator\n * @deprecated Join is not supported in Algorand TypeScript\n */\n join(separator?: string): string {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): IterableIterator<readonly [uint64, TItem]> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n throw new NoImplementation()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n}\n\n/**\n * A fixed sized array of arc4 items\n * @typeParam TItem The type of a single item in the array\n * @typeParam TLength The fixed length of the array\n */\nexport class StaticArray<TItem extends ARC4Encoded, TLength extends number> extends Arc4ArrayBase<TItem> {\n /** @hidden */\n [TypeProperty]?: `arc4.StaticArray<${TItem[typeof TypeProperty]}, ${TLength}>`\n\n /**\n * Create a new StaticArray instance\n */\n constructor()\n /**\n * Create a new StaticArray instance with the specified items\n * @param items The initial items for the array\n */\n constructor(...items: TItem[] & { length: TLength })\n constructor(...items: TItem[] & { length: TLength }) {\n super()\n }\n\n /**\n * Returns a new array containing all items from _this_ array, and _other_ array\n * @param other Another array to concat with this one\n */\n concat(other: Arc4ArrayBase<TItem>): DynamicArray<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns the statically declared length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n}\n\n/**\n * A dynamic sized array of arc4 items\n * @typeParam TItem The type of a single item in the array\n */\nexport class DynamicArray<TItem extends ARC4Encoded> extends Arc4ArrayBase<TItem> {\n /** @hidden */\n [TypeProperty]?: `arc4.DynamicArray<${TItem[typeof TypeProperty]}>`\n\n /**\n * Create a new DynamicArray with the specified items\n * @param items The initial items for the array\n */\n constructor(...items: TItem[]) {\n super()\n }\n\n /**\n * Push a number of items into this array\n * @param items The items to be added to this array\n */\n push(...items: TItem[]): void {\n throw new NoImplementation()\n }\n\n /**\n * Pop a single item from this array\n */\n pop(): TItem {\n throw new NoImplementation()\n }\n\n /**\n * Returns a new array containing all items from _this_ array, and _other_ array\n * @param other Another array to concat with this one\n */\n concat(other: Arc4ArrayBase<TItem>): DynamicArray<TItem> {\n throw new NoImplementation()\n }\n}\n\n/**\n * @hidden\n */\ntype ExpandTupleType<T extends readonly ARC4Encoded[]> = T extends [infer T1 extends ARC4Encoded, ...infer TRest extends ARC4Encoded[]]\n ? TRest extends []\n ? `${T1[typeof TypeProperty]}`\n : `${T1[typeof TypeProperty]},${ExpandTupleType<TRest>}`\n : ''\n\n/**\n * An arc4 encoded tuple of values\n * @typeParam TTuple A type representing the native tuple of item types\n */\nexport class Tuple<const TTuple extends readonly [ARC4Encoded, ...ARC4Encoded[]]> extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: `arc4.Tuple<${ExpandTupleType<TTuple>}>`\n\n /**\n * Create a new Tuple with the default zero values for items\n */\n constructor()\n /**\n * Create a new Tuple with the specified items\n * @param items The tuple items\n */\n constructor(...items: TTuple)\n constructor(...items: TTuple | []) {\n super()\n }\n\n /**\n * Returns the item at the specified index\n * @param index The index of the item to get. Must be a positive literal representing a tuple index\n */\n at<TIndex extends keyof TTuple>(index: TIndex): TTuple[TIndex] {\n throw new NoImplementation()\n }\n\n /**\n * Returns the length of this tuple\n */\n get length(): TTuple['length'] & uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the decoded native tuple (with arc4 encoded items)\n */\n get native(): TTuple {\n throw new NoImplementation()\n }\n}\n\n/**\n * A 32 byte Algorand Address\n */\nexport class Address extends Arc4ArrayBase<Byte> {\n /** @hidden */\n [TypeProperty]?: 'arc4.Address'\n\n /**\n * Create a new Address instance\n * @param value An Account, base 32 address string, or the address bytes\n */\n constructor(value?: Account | string | bytes) {\n super()\n }\n\n /**\n * Returns an Account instance for this Address\n */\n get native(): Account {\n throw new NoImplementation()\n }\n}\n\n/**\n * The base type for arc4 structs\n */\nclass StructBase<T> extends ARC4Encoded {\n /** @hidden */\n [TypeProperty]?: 'arc4.Struct'\n\n get native(): T {\n throw new NoImplementation()\n }\n}\n\n/**\n * Type alias for the Struct constructor function\n * @typeParam T The shape of the arc4 struct\n */\ntype StructConstructor = {\n new <T extends Record<string, ARC4Encoded>>(initial: T): StructBase<T> & T\n}\n\n/**\n * The base type of arc4 structs\n *\n * Usage:\n * ```\n * class MyStruct extends Struct<{ x: Uint8, y: Str, z: DynamicBytes }> { }\n * ```\n */\nexport const Struct = StructBase as unknown as StructConstructor\n\n/**\n * A variable length sequence of bytes prefixed with its length expressed as a 2 byte uint\n */\nexport class DynamicBytes extends Arc4ArrayBase<Byte> {\n /** @hidden */\n [TypeProperty]?: 'arc4.DynamicBytes'\n\n /**\n * Create a new DynamicBytes instance\n * @param value The bytes or utf8 interpreted string to initialize this type\n */\n constructor(value?: bytes | string) {\n super()\n }\n\n /**\n * Get the native bytes value (excludes the length prefix)\n */\n get native(): bytes {\n throw new NoImplementation()\n }\n\n /**\n * Returns a dynamic bytes object containing all bytes from _this_ and _other_\n * @param other Another array of bytes to concat with this one\n */\n concat(other: Arc4ArrayBase<Byte>): DynamicBytes {\n throw new NoImplementation()\n }\n}\n\n/**\n * A fixed length sequence of bytes\n */\nexport class StaticBytes<TLength extends uint64 = 0> extends Arc4ArrayBase<Byte> {\n /** @hidden */\n [TypeProperty]?: `arc4.StaticBytes<${TLength}>`\n\n /**\n * Create a new StaticBytes instance from native fixed sized bytes\n * @param value The bytes\n */\n constructor(value: bytes<TLength>)\n /**\n * Create a new StaticBytes instance from native bytes\n * @param value The bytes\n */\n constructor(value: bytes)\n /**\n * Create a new StaticBytes instance from a utf8 string\n * @param value A string\n */\n constructor(value: string)\n /**\n * Create a new StaticBytes instance of length 0\n */\n constructor()\n constructor(value?: bytes | string) {\n super()\n }\n\n /**\n * Get the native bytes value\n */\n get native(): bytes<TLength> {\n throw new NoImplementation()\n }\n\n /**\n * Returns a dynamic bytes object containing all bytes from _this_ and _other_\n * @param other Another array of bytes to concat with this one\n */\n concat(other: Arc4ArrayBase<Byte>): DynamicBytes {\n throw new NoImplementation()\n }\n\n /**\n * Returns the statically declared length of this byte array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n}\n","import { BaseContract } from '../base-contract'\nimport { NoImplementation } from '../internal/errors'\nimport { AnyFunction, DeliberateAny, InstanceMethod } from '../internal/typescript-helpers'\nimport { OnCompleteActionStr } from '../on-complete-action'\nimport { bytes, BytesCompat, uint64 } from '../primitives'\nimport { ARC4Encoded } from './encoded-types'\n\nexport * from './c2c'\nexport * from './encoded-types'\n\n/**\n * The base type for all ARC4 contracts in Algorand TypeScript\n */\nexport class Contract extends BaseContract {\n /**\n * Default implementation of an ARC4 approval program, routes transactions to ABI or bare methods based on application\n * args and on completion actions\n */\n override approvalProgram(): boolean {\n throw new NoImplementation()\n }\n}\n\n/**\n * Defines conventional routing method names. When used, methods with these names will be implicitly routed to the corresponding\n * application lifecycle event.\n *\n * @remarks This behaviour is independent of a contract explicitly implementing this interface. The interface is provided simply to improve\n * the developer experience of using this feature.\n */\nexport interface ConventionalRouting {\n /**\n * The function to invoke when closing out of this application\n */\n closeOutOfApplication?: AnyFunction\n /**\n * The function to invoke when creating this application\n */\n createApplication?: AnyFunction\n /**\n * The function to invoke when deleting this application\n */\n deleteApplication?: AnyFunction\n /**\n * The function to invoke when opting in to this application\n */\n optInToApplication?: AnyFunction\n /**\n * The function to invoke when updating this application\n */\n updateApplication?: AnyFunction\n}\n\n/**\n * The possible options for a method being available on application create\n *\n * allow: This method CAN be called when the application is being created, but it is not required\n * disallow: This method CANNOT be called when the application is being created\n * require: This method CAN ONLY be called when the application is being created\n */\nexport type CreateOptions = 'allow' | 'disallow' | 'require'\n\n/**\n * The possible options for the resource encoding to use for the method\n *\n * index: Application, Asset, and Account arguments are included in the transaction's relevant array. The argument value is the uint8 index of the resource in the that array.\n * value: Application, Asset and Account arguments are passed by their uint64 id (Application and Asset) or bytes[32] address (Account).\n */\nexport type ResourceEncodingOptions = 'index' | 'value'\n\n/**\n * The possible options for validation behaviour for this method\n * args: ABI arguments are validated automatically to ensure they are encoded correctly.\n * unsafe-disabled: No automatic validation occurs. Arguments can instead be validated manually.\n */\nexport type ValidateEncodingOptions = 'unsafe-disabled' | 'args'\n\n/**\n * Type alias for a default argument schema\n * @typeParam TContract The type of the contract containing the method this default argument is for\n */\nexport type DefaultArgument<TContract extends Contract> =\n | {\n /**\n * A compile time constant value to be used as a default\n */\n constant: string | boolean | number | bigint\n }\n | {\n /**\n * Retrieve the default value from a member of this contract. The member can be\n *\n * LocalState: The value is retrieved from the calling user's local state before invoking this method\n * GlobalState: The value is retrieved from the specified global state key before invoking this method\n * Method: Any readonly abimethod with no arguments can be used as a source\n */\n from: keyof TContract\n }\n/**\n * Configuration options for an abi method\n * @typeParam TContract the type of the contract this method is a part of\n */\nexport type AbiMethodConfig<TContract extends Contract> = {\n /**\n * Which on complete action(s) are allowed when invoking this method.\n * @default 'NoOp'\n */\n allowActions?: OnCompleteActionStr | OnCompleteActionStr[]\n /**\n * Whether this method should be callable when creating the application.\n * @default 'disallow'\n */\n onCreate?: CreateOptions\n /**\n * Does the method only perform read operations (no mutation of chain state)\n * @default false\n */\n readonly?: boolean\n /**\n * Override the name used to generate the abi method selector\n */\n name?: string\n /**\n * The resource encoding to use for this method. The default is 'value'\n *\n * index: Application, Asset, and Account arguments are included in the transaction's relevant array. The argument value is the uint8 index of the resource in the that array.\n * value: Application, Asset and Account arguments are passed by their uint64 id (Application and Asset) or bytes[32] address (Account).\n *\n * The resource must still be 'available' to this transaction but can take advantage of resource sharing within the transaction group.\n */\n resourceEncoding?: ResourceEncodingOptions\n\n /**\n * Controls validation behaviour for this method.\n *\n * If \"args\", then ABI arguments are validated automatically to ensure they are encoded correctly.\n * If \"unsafe-disabled\", then no automatic validation occurs. Arguments can instead be validated using the validateEncoding(...) function.\n * The default behaviour of this option can be controlled with the --validate-abi-args CLI flag.\n */\n validateEncoding?: ValidateEncodingOptions\n\n /**\n * Specify default arguments that can be populated by clients calling this method.\n *\n * A map of parameter names to the default argument source\n */\n defaultArguments?: Record<string, DefaultArgument<TContract>>\n}\n\n/**\n * Declares the decorated method as an abimethod that is called when the first transaction arg matches the method selector\n * @param config The config for this abi method\n * @typeParam TContract the type of the contract this method is a part of\n */\nexport function abimethod<TContract extends Contract>(config?: AbiMethodConfig<TContract>) {\n return function <TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n ): (this: TContract, ...args: TArgs) => TReturn {\n throw new NoImplementation()\n }\n}\n/**\n * Declares this abi method does not mutate chain state and can be called using a simulate call to the same effect.\n *\n * Shorthand for `@abimethod({readonly: true})`\n * @typeParam TContract the type of the contract this method is a part of\n */\nexport function readonly<TContract extends Contract, TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n): (this: TContract, ...args: TArgs) => TReturn {\n throw new NoImplementation()\n}\n\n/**\n * Configuration options for a bare method\n */\nexport type BareMethodConfig = {\n /**\n * Which on complete action(s) are allowed when invoking this method.\n * @default 'NoOp'\n */\n allowActions?: OnCompleteActionStr | OnCompleteActionStr[]\n /**\n * Whether this method should be callable when creating the application.\n * @default 'disallow'\n */\n onCreate?: CreateOptions\n}\n\n/**\n * Declares the decorated method as a baremethod that can only be called with no transaction args\n * @param config The config for this bare method\n * @typeParam TContract the type of the contract this method is a part of\n */\nexport function baremethod<TContract extends Contract>(config?: BareMethodConfig) {\n return function <TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n ): (this: TContract, ...args: TArgs) => TReturn {\n throw new NoImplementation()\n }\n}\n/**\n * Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first\n * 4 bytes of the SHA512/256 hash of the method signature.\n * @param methodSignature An ARC4 contract method reference. (Eg. `MyContract.prototype.myMethod`)\n * @returns The ARC4 method selector. Eg. `02BECE11`\n */\nexport function methodSelector(methodSignature: InstanceMethod<Contract>): bytes<4>\n/**\n * Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first\n * 4 bytes of the SHA512/256 hash of the method signature.\n * @param methodSignature An ARC4 method signature string (Eg. `hello(string)string`. Must be a compile time constant)\n * @returns The ARC4 method selector. Eg. `02BECE11`\n */\nexport function methodSelector(methodSignature: string): bytes<4>\n/**\n * Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first\n * 4 bytes of the SHA512/256 hash of the method signature.\n * @typeParam TMethod The type of an ARC4 method signature (eg. `typeof MyContract.prototype.myMethod`)\n * @returns The ARC4 method selector. Eg. `02BECE11`\n * @remarks This overload can be used in conjunction with type only import (eg. `import type { MyContract } from './my-contract'`) to\n * work around what would otherwise be a circular reference in the event two contracts need to call each other.\n */\nexport function methodSelector<TMethod>(): bytes<4>\nexport function methodSelector<TMethod>(methodSignature?: string | InstanceMethod<Contract>): bytes<4> {\n throw new NoImplementation()\n}\n\n/**\n * Interpret the provided bytes as an ARC4 encoded type\n * @param bytes An arc4 encoded bytes value\n * @param options Options for how the bytes should be converted\n * @param options.prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed\n * @param options.strategy The strategy used for converting bytes.\n * `unsafe-cast`: Reinterpret the value as an ARC4 encoded type without validation\n * `validate`: Asserts the encoding of the raw bytes matches the expected type\n */\nexport function convertBytes<T extends ARC4Encoded>(\n bytes: BytesCompat,\n options: { prefix?: 'none' | 'log'; strategy: 'unsafe-cast' | 'validate' },\n): T {\n throw new NoImplementation()\n}\n\n/**\n * Decode the provided bytes to a native Algorand TypeScript value\n * @param bytes An arc4 encoded bytes value\n * @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed\n */\nexport function decodeArc4<T>(bytes: BytesCompat, prefix: 'none' | 'log' = 'none'): T {\n throw new NoImplementation()\n}\n\n/**\n * Encode the provided Algorand TypeScript value as ARC4 bytes\n * @param value Any native Algorand TypeScript value with a supported ARC4 encoding\n */\nexport function encodeArc4<const T>(value: T): bytes {\n throw new NoImplementation()\n}\n\n/**\n * Return the total number of bytes required to store T as bytes.\n *\n * T must represent a type with a fixed length encoding scheme.\n * @typeParam T Any native or arc4 type with a fixed encoding size.\n */\nexport function sizeOf<T>(): uint64 {\n throw new NoImplementation()\n}\n"],"names":[],"mappings":";;AAKA;;AAEG;MACmB,YAAY,CAAA;AAMhC;;AAEG;IACI,iBAAiB,GAAA;AACtB,QAAA,OAAO,IAAI;;AAEd;AA6DD;;;AAGG;AACG,SAAU,QAAQ,CAAC,OAAwB,EAAA;AAC/C,IAAA,OAAO,CAAyC,QAAW,EAAE,GAA0B,KAAI;QACzF,MAAM,IAAI,gBAAgB,EAAE;AAC9B,KAAC;AACH;;ACUA;;;;AAIG;AACa,SAAA,WAAW,CACzB,QAAmC,EACnC,OAAgC,EAAA;IAEhC,MAAM,IAAI,gBAAgB,EAAE;AAC9B;AAYA;;;AAGG;AACG,SAAU,OAAO,CAAU,OAAgC,EAAA;IAC/D,MAAM,IAAI,gBAAgB,EAAE;AAC9B;;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;AAQG;AACa,SAAA,YAAY,CAC1B,KAAkB,EAClB,OAA0E,EAAA;IAE1E,MAAM,IAAI,gBAAgB,EAAE;AAC9B;AAEA;;;;AAIG;SACa,UAAU,CAAI,KAAkB,EAAE,SAAyB,MAAM,EAAA;IAC/E,MAAM,IAAI,gBAAgB,EAAE;AAC9B;AAEA;;;AAGG;AACG,SAAU,UAAU,CAAU,KAAQ,EAAA;IAC1C,MAAM,IAAI,gBAAgB,EAAE;AAC9B;AAEA;;;;;AAKG;SACa,MAAM,GAAA;IACpB,MAAM,IAAI,gBAAgB,EAAE;AAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/index.mjs CHANGED
@@ -363,6 +363,15 @@ var itxn;
363
363
  itxn.applicationCall = applicationCall;
364
364
  })(itxn || (itxn = {}));
365
365
 
366
+ /**
367
+ * The itxnCompose helper can be used to build dynamically sized itxn groups which aren't supported by the stronger typed itxn paradigm. The
368
+ * first transaction in a group must be 'staged' with `itxnCompose.begin` whilst all other transactions in the group should use `itxnCompose.next`.
369
+ * When the group is complete it can be submitted using `itxnCompose.submit`.
370
+ *
371
+ * @remarks The itxn API offered by teal opcodes has some rough edges which are not fully abstracted over by this compose API, but it hoped that use
372
+ * cases for it are limited and that most transaction groups can be composed with a static size relying on the atomic nature of the outer transaction
373
+ * to ensure multiple smaller itxn groups are committed atomically.
374
+ */
366
375
  const itxnCompose = NoImplementation.value();
367
376
 
368
377
  var gtxn;
package/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/primitives.ts","../src/util.ts","../src/reference.ts","../src/box.ts","../src/state.ts","../src/itxn.ts","../src/itxn-compose.ts","../src/gtxn.ts","../src/transactions.ts","../src/logic-sig.ts","../src/template-var.ts","../src/compiled.ts","../src/reference-array.ts","../src/arc-28.ts","../src/on-complete-action.ts","../src/arrays.ts"],"sourcesContent":["import { NoImplementation } from './internal/errors'\n\n/**\n * An alias for types which can be converted to a uint64\n */\nexport type Uint64Compat = uint64 | bigint | boolean | number\n/**\n * An alias for types which can be converted to a biguint\n */\nexport type BigUintCompat = bigint | bytes | number | boolean\n/**\n * An alias for types which can be converted to a string\n */\nexport type StringCompat = string\n/**\n * An alias for types which can be converted to a bytes sequence\n */\nexport type BytesCompat = bytes | string\n\n/**\n * An unsigned integer of exactly 64 bits\n */\nexport type uint64 = {\n /**\n * @hidden\n */\n __type?: 'uint64'\n} & number\n\n/**\n * Create a uint64 with the default value of 0\n */\nexport function Uint64(): uint64\n/**\n * Create a uint64 from a string literal\n */\nexport function Uint64(v: string): uint64\n/**\n * Create a uint64 from a bigint literal\n */\nexport function Uint64(v: bigint): uint64\n/**\n * Create a uint64 from a number literal\n */\nexport function Uint64(v: number): uint64\n/**\n * Create a uint64 from a boolean value. True is 1, False is 0\n */\nexport function Uint64(v: boolean): uint64\nexport function Uint64(v?: Uint64Compat | string): uint64 {\n throw new NoImplementation()\n}\n\nUint64.MAX_VALUE = NoImplementation.value<uint64>()\nUint64.MIN_VALUE = NoImplementation.value<uint64>()\n\n/**\n * An unsigned integer of up to 512 bits\n *\n * Stored as a big-endian variable byte array\n */\nexport type biguint = {\n /**\n * @hidden\n */\n __type?: 'biguint'\n} & bigint\n\n/**\n * Create a biguint from a bigint literal\n */\nexport function BigUint(v: bigint): biguint\n/**\n * Create a biguint from a boolean value (true = 1, false = 0)\n */\nexport function BigUint(v: boolean): biguint\n/**\n * Create a biguint from a uint64 value\n */\nexport function BigUint(v: uint64): biguint\n/**\n * Create a biguint from a number literal\n */\nexport function BigUint(v: number): biguint\n/**\n * Create a biguint from a byte array interpreted as a big-endian number\n */\nexport function BigUint(v: bytes): biguint\n/**\n * Create a biguint from a string literal containing the decimal digits\n */\nexport function BigUint(v: string): biguint\n/**\n * Create a biguint with the default value of 0\n */\nexport function BigUint(): biguint\nexport function BigUint(v?: BigUintCompat | string): biguint {\n throw new NoImplementation()\n}\n\ntype ToFixedBytesOptions<TLength extends uint64 = uint64> = {\n /**\n * The length for the bounded type\n */\n length: TLength\n /**\n * The strategy to use for converting to a fixed length bytes type (default: 'assert-length')\n *\n * - 'assert-length': Asserts that the byte sequence has the specified length and fails if it differs\n * - 'unsafe-cast': Reinterprets the byte sequence as a fixed length type without any checks. This will succeed even if the value\n * is not of the specified length but will result in undefined behaviour for any code that makes use of this value.\n *\n */\n strategy?: 'assert-length' | 'unsafe-cast'\n}\n/**\n * A sequence of zero or more bytes (ie. byte[])\n *\n * @typeParam TLength The static length of this byte array\n */\nexport type bytes<out TLength extends uint64 = uint64> = {\n /**\n * Retrieve the length of the byte sequence\n */\n readonly length: uint64\n\n /**\n * Retrieve the byte at the index i\n * @param i The index to read. Can be negative to read from the end\n * @returns The byte found at the index, or an empty bytes value\n */\n at(i: Uint64Compat): bytes\n\n /**\n * Concatenate this bytes value with another bytes value\n * @param other The other bytes value\n * @returns The concatenation result\n */\n concat(other: BytesCompat): bytes\n\n /**\n * Perform a bitwise AND operation with this bytes value and another bytes value\n * of the same length.\n *\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseAnd(other: bytes<TLength>): bytes<TLength>\n\n /**\n * Perform a bitwise AND operation with this bytes value and another bytes value.\n *\n * The shorter of the two values will be zero-left extended to the larger length.\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseAnd(other: BytesCompat): bytes\n\n /**\n * Perform a bitwise OR operation with this bytes value and another bytes value\n * of the same length.\n *\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseOr(other: bytes<TLength>): bytes<TLength>\n\n /**\n * Perform a bitwise OR operation with this bytes value and another bytes value\n *\n * The shorter of the two values will be zero-left extended to the larger length.\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseOr(other: BytesCompat): bytes\n\n /**\n * Perform a bitwise XOR operation with this bytes value and another bytes value\n * of the same length.\n *\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseXor(other: bytes<TLength>): bytes<TLength>\n\n /**\n * Perform a bitwise XOR operation with this bytes value and another bytes value.\n *\n * The shorter of the two values will be zero-left extended to the larger length.\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseXor(other: BytesCompat): bytes\n\n /**\n * Perform a bitwise INVERT operation with this bytes value\n * @returns The bitwise operation result\n */\n bitwiseInvert(): bytes<TLength>\n\n /**\n * Compares this bytes value with another.\n * @param other The other bytes value\n * @returns True if both values represent the same byte sequence\n */\n equals(other: BytesCompat): boolean\n\n /**\n * Returns a copy of this bytes sequence\n */\n slice(): bytes<TLength>\n /**\n * Returns a slice of this bytes sequence from the specified start to the end\n * @param start The index to start slicing from. Can be negative to count from the end.\n */\n slice(start: Uint64Compat): bytes\n /**\n * Returns a slice of this bytes sequence from the specified start to the specified end\n * @param start The index to start slicing from. Can be negative to count from the end.\n * @param end The index to end the slice. Can be negative to count from the end.\n */\n slice(start: Uint64Compat, end: Uint64Compat): bytes\n /**\n * @hidden\n */\n slice(start?: Uint64Compat, end?: Uint64Compat): bytes\n\n /**\n * Interpret this byte sequence as a utf-8 string\n */\n toString(): string\n\n /**\n * Change this unbounded bytes instance into a bounded one\n * @param options Options for the conversion\n */\n toFixed<TNewLength extends TLength>(options: ToFixedBytesOptions<TNewLength>): bytes<TNewLength>\n}\n\n/**\n * Create a byte array from a string interpolation template and compatible replacements\n * @param value\n * @param replacements\n */\nexport function Bytes(value: TemplateStringsArray, ...replacements: BytesCompat[]): bytes<uint64>\n/**\n * Create a byte array from a utf8 string\n */\nexport function Bytes(value: string): bytes<uint64>\n/**\n * Create a byte array from a utf8 string\n */\nexport function Bytes<TLength extends uint64>(value: string, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n/**\n * No op, returns the provided byte array.\n */\nexport function Bytes(value: bytes): bytes<uint64>\n/**\n * No op, returns the provided byte array.\n */\nexport function Bytes<TLength extends uint64>(value: bytes, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n/**\n * Create a byte array from a biguint value encoded as a variable length big-endian number\n */\nexport function Bytes(value: biguint): bytes<uint64>\n/**\n * Create a byte array from a biguint value encoded as a variable length big-endian number\n */\nexport function Bytes<TLength extends uint64>(value: biguint, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n/**\n * Create a byte array from a uint64 value encoded as a a variable length 64-bit number\n */\nexport function Bytes(value: uint64): bytes<uint64>\n/**\n * Create a byte array from a uint64 value encoded as a a variable length 64-bit number\n */\nexport function Bytes<TLength extends uint64 = 8>(value: uint64, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n/**\n * Create a byte array from an Iterable<uint64> where each item is interpreted as a single byte and must be between 0 and 255 inclusively\n */\nexport function Bytes(value: Iterable<uint64>): bytes<uint64>\n/**\n * Create a byte array from an Iterable<uint64> where each item is interpreted as a single byte and must be between 0 and 255 inclusively\n */\nexport function Bytes<TLength extends uint64>(value: Iterable<uint64>, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n/**\n * Create an empty byte array\n */\nexport function Bytes(): bytes<uint64>\n/**\n * Create an empty byte array\n */\nexport function Bytes<TLength extends uint64 = uint64>(options: ToFixedBytesOptions<TLength>): bytes<TLength>\nexport function Bytes<TLength extends uint64 = uint64>(\n value?: BytesCompat | TemplateStringsArray | biguint | uint64 | Iterable<number> | ToFixedBytesOptions<TLength>,\n ...replacements: [ToFixedBytesOptions<TLength>] | BytesCompat[] | undefined[]\n): bytes<TLength> {\n throw new NoImplementation()\n}\n\nexport namespace Bytes {\n /**\n * Create a new bytes value from a hexadecimal encoded string\n * @param hex A literal string of hexadecimal characters\n */\n export function fromHex(hex: string): bytes<uint64>\n /**\n * Create a new bytes value from a hexadecimal encoded string\n * @param hex A literal string of hexadecimal characters\n * @param options Options for bounded bytes\n */\n export function fromHex<TLength extends uint64>(hex: string, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n export function fromHex<TLength extends uint64 = uint64>(hex: string, options?: ToFixedBytesOptions<TLength>): bytes<TLength> {\n throw new NoImplementation()\n }\n\n /**\n * Create a new bytes value from a base 64 encoded string\n * @param b64 A literal string of b64 encoded characters\n */\n export function fromBase64(b64: string): bytes<uint64>\n /**\n * Create a new bytes value from a base 64 encoded string\n * @param b64 A literal string of b64 encoded characters\n * @param options Options for bounded bytes\n */\n export function fromBase64<TLength extends uint64>(b64: string, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n export function fromBase64<TLength extends uint64 = uint64>(b64: string, options?: ToFixedBytesOptions<TLength>): bytes<TLength> {\n throw new NoImplementation()\n }\n\n /**\n * Create a new bytes value from a base 32 encoded string\n * @param b32 A literal string of b32 encoded characters\n */\n export function fromBase32(b32: string): bytes<uint64>\n /**\n * Create a new bytes value from a base 32 encoded string\n * @param b32 A literal string of b32 encoded characters\n * @param options Options for bounded bytes\n */\n export function fromBase32<TLength extends uint64>(b32: string, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n export function fromBase32<TLength extends uint64 = uint64>(b32: string, options?: ToFixedBytesOptions<TLength>): bytes<TLength> {\n throw new NoImplementation()\n }\n}\n\n/**\n * An interface for types which are backed by the AVM bytes type\n */\nexport interface BytesBacked<TLength extends uint64 = uint64> {\n /**\n * Retrieve the underlying bytes representing this value\n */\n get bytes(): bytes<TLength>\n}\n\n/**\n * Declare a homogeneous tuple with the item type T and length N.\n *\n * Eg.\n * NTuple<uint64, 3> === [uint64, uint64, uint64]\n */\nexport type NTuple<T, N extends number> = N extends N ? (number extends N ? T[] : _TupleOf<T, N, readonly []>) : never\n\ntype _TupleOf<T, N extends number, R extends readonly unknown[]> = R['length'] extends N ? R : _TupleOf<T, N, readonly [T, ...R]>\n","import { NoImplementation } from './internal/errors'\nimport { biguint, BigUintCompat, BytesBacked, BytesCompat, StringCompat, uint64, Uint64Compat } from './primitives'\n\n/**\n * Write one or more values to the transaction log.\n *\n * Each value is converted to bytes and concatenated\n * @param args The values to write\n */\nexport function log(...args: Array<Uint64Compat | BytesCompat | BigUintCompat | StringCompat | BytesBacked>): void {\n throw new NoImplementation()\n}\n\n/**\n * Asserts that `condition` is truthy, otherwise error and halt execution.\n * @param condition An expression that can be evaluated as truthy of falsy\n * @param message The message to show if `condition` is falsy and an error is raised.\n */\nexport function assert(condition: unknown, message?: string): asserts condition {\n throw new NoImplementation()\n}\n\n/**\n * Raise an error and halt execution\n * @param message The message to accompany the error\n */\nexport function err(message?: string): never {\n throw new NoImplementation()\n}\n\n/**\n * Defines possible comparison expressions for numeric types\n */\ntype NumericComparison<T> =\n | T\n | {\n /**\n * Is the subject less than the specified value\n */\n lessThan: T\n }\n | {\n /**\n * Is the subject greater than the specified value\n */\n greaterThan: T\n }\n | {\n /**\n * Is the subject greater than or equal to the specified value\n */\n greaterThanEq: T\n }\n | {\n /**\n * Is the subject less than or equal to the specified value\n */\n lessThanEq: T\n }\n | {\n /**\n * Is the subject between the specified values (inclusive)\n */\n between: readonly [T, T]\n }\n | {\n /**\n * Is the subject not equal to the specified value\n */\n not: T\n }\n\n/**\n * Defines possible comparison expressions for non-numeric types\n */\ntype NonNumericComparison<T> =\n | T\n | {\n /**\n * Is the subject not equal to the specified value\n */\n not: T\n }\n\n/**\n * Returns compatible comparison expressions for a type `T`\n * @typeParam T The type requiring comparison\n */\ntype ComparisonFor<T> = T extends uint64 | biguint ? NumericComparison<T> : NonNumericComparison<T>\n\n/**\n * A set of tests to apply to the match subject\n * @typeParam T The type of the test subject\n */\ntype MatchTest<T> =\n T extends ConcatArray<infer TItem>\n ? { [index: number]: ComparisonFor<TItem> } & {\n length?: ComparisonFor<uint64>\n }\n : {\n [key in keyof T]?: ComparisonFor<T[key]>\n }\n\n/**\n * Applies all tests in `test` against `subject` and returns a boolean indicating if they all pass\n * @param subject An object or tuple to be tested\n * @param test An object containing one or more tests to be applied to the subject\n * @typeParam T The type of the subject\n * @returns True if all tests pass, otherwise false\n */\nexport function match<T>(subject: T, test: MatchTest<T>): boolean {\n throw new NoImplementation()\n}\n\n/**\n *\n * Applies all tests in `test` against `subject` and asserts they all pass\n * @param subject An object or tuple to be tested\n * @param test An object containing one or more tests to be applied to the subject\n * @param message An optional message to show if the assertion fails\n * @typeParam T The type of the subject\n */\nexport function assertMatch<T>(subject: T, test: MatchTest<T>, message?: string): void {\n throw new NoImplementation()\n}\n\n/**\n * Defines the source of fees for the OpUp utility\n */\nexport enum OpUpFeeSource {\n /**\n * Only the excess fee (credit) on the outer group should be used (itxn.fee = 0)\n */\n GroupCredit = 0,\n /**\n * The app's account will cover all fees (itxn.fee = Global.minTxFee)\n */\n AppAccount = 1,\n /**\n * First the excess will be used, then remaining fees taken from the app account\n */\n Any = 2,\n}\n\n/**\n * Ensure the available op code budget is greater than or equal to requiredBudget.\n *\n * This is done by adding AppCall itxns to the group to increase the available budget. These itxns must be paid for\n * by the caller or the application.\n * @param requiredBudget The total required budget\n * @param feeSource Which source to withdraw txn fees from.\n */\nexport function ensureBudget(requiredBudget: uint64, feeSource: OpUpFeeSource = OpUpFeeSource.GroupCredit) {\n throw new NoImplementation()\n}\n\n/**\n * Generates an iterable sequence from 0...stop inclusive\n * @param stop The stop number of the sequence\n */\nexport function urange(stop: Uint64Compat): IterableIterator<uint64>\n/**\n * Generates an iterable sequence from start...stop inclusive\n * @param start The start number of the sequence\n * @param stop The stop number of the sequence\n */\nexport function urange(start: Uint64Compat, stop: Uint64Compat): IterableIterator<uint64>\n/**\n * Generates an iterable sequence from start...stop inclusive with increments of size step\n * @param start The start number of the sequence\n * @param stop The stop number of the sequence\n * @param step The step size of the sequence\n */\nexport function urange(start: Uint64Compat, stop: Uint64Compat, step: Uint64Compat): IterableIterator<uint64>\nexport function urange(a: Uint64Compat, b?: Uint64Compat, c?: Uint64Compat): IterableIterator<uint64> {\n throw new NoImplementation()\n}\n\n/**\n * Defines a numeric range including all numbers between from and to\n */\nexport type NumberRange = { from: number; to: number }\n\n/**\n * Creates a deep copy of the specified value\n * @param value The value to clone\n */\nexport function clone<T>(value: T): T {\n throw new NoImplementation()\n}\n\n/**\n * Performs validation to ensure the value is well-formed, errors if it is not\n * @param value The value to validate\n *\n */\nexport function validateEncoding<T>(value: T) {\n throw new NoImplementation()\n}\n","import { NoImplementation } from './internal/errors'\nimport { bytes, uint64 } from './primitives'\n\n/**\n * Represents an Algorand Account and exposes properties and methods for reading account data\n */\nexport type Account = {\n /**\n * Get the accounts address in bytes\n */\n readonly bytes: bytes<32>\n\n /**\n * Account balance in microalgos\n *\n * Account must be an available resource\n */\n readonly balance: uint64\n\n /**\n * Minimum required balance for account, in microalgos\n *\n * Account must be an available resource\n */\n readonly minBalance: uint64\n\n /**\n * Address the account is rekeyed to\n *\n * Account must be an available resource\n */\n readonly authAddress: Account\n\n /**\n * The total number of uint64 values allocated by this account in Global and Local States.\n *\n * Account must be an available resource\n */\n readonly totalNumUint: uint64\n\n /**\n * The total number of byte array values allocated by this account in Global and Local States.\n *\n * Account must be an available resource\n */\n readonly totalNumByteSlice: uint64\n\n /**\n * The number of extra app code pages used by this account.\n *\n * Account must be an available resource\n */\n readonly totalExtraAppPages: uint64\n\n /**\n * The number of existing apps created by this account.\n *\n * Account must be an available resource\n */\n readonly totalAppsCreated: uint64\n\n /**\n * The number of apps this account is opted into.\n *\n * Account must be an available resource\n */\n readonly totalAppsOptedIn: uint64\n\n /**\n * The number of existing ASAs created by this account.\n *\n * Account must be an available resource\n */\n readonly totalAssetsCreated: uint64\n\n /**\n * The numbers of ASAs held by this account (including ASAs this account created).\n *\n * Account must be an available resource\n */\n readonly totalAssets: uint64\n\n /**\n * The number of existing boxes created by this account's app.\n *\n * Account must be an available resource\n */\n readonly totalBoxes: uint64\n\n /**\n * The total number of bytes used by this account's app's box keys and values.\n *\n * Account must be an available resource\n */\n readonly totalBoxBytes: uint64\n\n /**\n * Returns true if this account is opted in to the specified Asset or Application.\n * Note: Account and Asset/Application must be an available resource\n *\n * @param assetOrApp\n */\n isOptedIn(assetOrApp: Asset | Application): boolean\n}\n\n/**\n * Create a new account object representing the zero address\n */\nexport function Account(): Account\n/**\n * Create a new account object representing the provided public key bytes\n * @param publicKey A 32-byte Algorand account public key\n */\nexport function Account(publicKey: bytes): Account\n/**\n * Create a new account object representing the provided address\n * @param address A 56 character base-32 encoded Algorand address\n */\nexport function Account(address: string): Account\nexport function Account(publicKeyOrAddress?: bytes | string): Account {\n throw new NoImplementation()\n}\n\n/**\n * Creates a new Asset object represent the asset id 0 (an invalid ID)\n */\nexport function Asset(): Asset\n/**\n * Creates a new Asset object representing the asset with the specified id\n * @param assetId The id of the asset\n */\nexport function Asset(assetId: uint64): Asset\nexport function Asset(assetId?: uint64): Asset {\n throw new NoImplementation()\n}\n/**\n * An Asset on the Algorand network.\n */\nexport type Asset = {\n /**\n * Returns the id of the Asset\n */\n readonly id: uint64\n\n /**\n * Total number of units of this asset\n */\n readonly total: uint64\n\n /**\n * @see AssetParams.decimals\n */\n readonly decimals: uint64\n\n /**\n * Frozen by default or not\n */\n readonly defaultFrozen: boolean\n\n /**\n * Asset unit name\n */\n readonly unitName: bytes\n\n /**\n * Asset name\n */\n readonly name: bytes\n\n /**\n * URL with additional info about the asset\n */\n readonly url: bytes\n\n /**\n * Arbitrary commitment\n */\n readonly metadataHash: bytes<32>\n\n /**\n * Manager address\n */\n readonly manager: Account\n\n /**\n * Reserve address\n */\n readonly reserve: Account\n\n /**\n * Freeze address\n */\n readonly freeze: Account\n\n /**\n * Clawback address\n */\n readonly clawback: Account\n\n /**\n * Creator address\n */\n readonly creator: Account\n\n /**\n * Amount of the asset unit held by this account. Fails if the account has not\n * opted in to the asset.\n * Asset and supplied Account must be an available resource\n * @param account Account\n * @return balance: uint64\n */\n balance(account: Account): uint64\n\n /**\n * Is the asset frozen or not. Fails if the account has not\n * opted in to the asset.\n * Asset and supplied Account must be an available resource\n * @param account Account\n * @return isFrozen: boolean\n */\n frozen(account: Account): boolean\n}\n\n/**\n * Creates a new Application object represent the application id 0 (an invalid ID)\n */\nexport function Application(): Application\n/**\n * Creates a new Application object representing the application with the specified id\n * @param applicationId The id of the application\n */\nexport function Application(applicationId: uint64): Application\nexport function Application(applicationId?: uint64): Application {\n throw new NoImplementation()\n}\n\n/**\n * An Application on the Algorand network.\n */\nexport type Application = {\n /**\n * The id of this application on the current network\n */\n readonly id: uint64\n /**\n * Bytecode of Approval Program\n */\n readonly approvalProgram: bytes\n\n /**\n * Bytecode of Clear State Program\n */\n readonly clearStateProgram: bytes\n\n /**\n * Number of uint64 values allowed in Global State\n */\n readonly globalNumUint: uint64\n\n /**\n * Number of byte array values allowed in Global State\n */\n readonly globalNumBytes: uint64\n\n /**\n * Number of uint64 values allowed in Local State\n */\n readonly localNumUint: uint64\n\n /**\n * Number of byte array values allowed in Local State\n */\n readonly localNumBytes: uint64\n\n /**\n * Number of Extra Program Pages of code space\n */\n readonly extraProgramPages: uint64\n\n /**\n * Creator address\n */\n readonly creator: Account\n\n /**\n * Address for which this application has authority\n */\n readonly address: Account\n\n /**\n * Version of the app, incremented each time the approval or clear program changes\n */\n readonly version: uint64\n}\n","import { NoImplementation } from './internal/errors'\nimport { bytes, uint64 } from './primitives'\n\n/**\n * A Box proxy\n * @typeParam TValue The type of the data stored in the box.\n */\nexport type Box<TValue> = {\n /**\n * Create the box for this proxy with a bzero value.\n * - If options.size is specified, the box will be created with that length\n * - Otherwise the box will be created with storage size of TValue. Errors if the size of TValue is not fixed\n *\n * No op if the box already exists with the same size\n * Errors if the box already exists with a different size.\n * Errors if the specified size is greater than the max box size (32,768)\n * @returns True if the box was created, false if it already existed\n */\n create(options?: { size?: uint64 }): boolean\n /**\n * Get the key used by this box proxy\n */\n readonly key: bytes\n /**\n * Get or set the value stored in the box\n *\n * Get will error if the box does not exist\n */\n value: TValue\n /**\n * Get a boolean indicating if the box exists or not\n */\n readonly exists: boolean\n /**\n * Get the value stored in the box, or return a specified default value if the box does not exist\n * @param options Options to specify a default value to be returned if no other value exists\n * @returns The value if the box exists, else the default value\n */\n get(options: { default: TValue }): TValue\n /**\n * Delete the box associated with this proxy if it exists.\n * @returns True if the box existed and was deleted, else false\n */\n delete(): boolean\n /**\n * Get the value stored in the box if available, and a boolean indicating if the box exists.\n *\n * If the box does not exist, the value returned at position 0 should not be relied on to have a valid value.\n * @returns A tuple with the first item being the box value, and the second item being a boolean indicating if the box exists.\n */\n maybe(): readonly [TValue, boolean]\n /**\n * Returns the length of the box, or error if the box does not exist\n */\n readonly length: uint64\n\n /**\n * Splice the specified bytes into the box starting at `start`, removing `length` bytes\n * from the existing value and replacing them with `value` before appending the remainder of the original box value.\n *\n * If the resulting byte value is larger than length, bytes will be trimmed from the end\n * If the resulting byte value is smaller than length, zero bytes will be appended to the end\n * Error if the box does not exist\n * @param start The index to start inserting the value\n * @param length The number of bytes after `start` to be omitted\n * @param value The value to be inserted\n */\n splice(start: uint64, length: uint64, value: bytes): void\n /**\n * Replace bytes in a box starting at `start`.\n *\n * Error if the box does not exist\n * Error if `start` + `value.length` is greater than the box size\n * @param start The index to start replacing\n * @param value The value to be written\n */\n replace(start: uint64, value: bytes): void\n /**\n * Extract a slice of bytes from the box\n *\n * Error if the box does not exist\n * Error if `start` + `length` is greater than the box size\n * @param start The index to start extracting\n * @param length The number of bytes to extract\n * @returns The extracted bytes\n */\n extract(start: uint64, length: uint64): bytes\n /**\n * Resize the box to the specified size.\n *\n * Adds zero bytes to the end if the new size is larger\n * Removes end bytes if the new size is smaller\n * Error if the box does not exist\n * @param newSize The new size for the box\n */\n resize(newSize: uint64): void\n}\n/**\n * A BoxMap proxy\n * @typeParam TKey The type of the value used to key each box.\n * @typeParam TValue The type of the data stored in the box.\n */\nexport type BoxMap<TKey, TValue> = {\n /**\n * Get the bytes used to prefix each key\n */\n readonly keyPrefix: bytes\n\n /**\n * Get a Box proxy for a single item in the BoxMap\n * @param key The key of the box to retrieve a proxy for\n */\n (key: TKey): Box<TValue>\n}\n\n/**\n * Options for creating a Box proxy\n */\ninterface CreateBoxOptions {\n /**\n * The bytes which make up the key of the box\n */\n key: bytes | string\n}\n\n/**\n * Creates a Box proxy object offering methods of getting and setting the value stored in a single box.\n * @param options Options for creating the Box proxy\n * @typeParam TValue The type of the data stored in the box. This value will be encoded to bytes when stored and decoded on retrieval.\n */\nexport function Box<TValue>(options: CreateBoxOptions): Box<TValue> {\n throw new NoImplementation()\n}\n\n/**\n * Options for creating a BoxMap proxy\n */\ninterface CreateBoxMapOptions {\n /**\n * The bytes which prefix each key of the box map\n */\n keyPrefix: bytes | string\n}\n\n/**\n * Creates a BoxMap proxy object offering methods of getting and setting a set of values stored in individual boxes indexed by a common key type\n * @param options Options for creating the BoxMap proxy\n * @typeParam TKey The type of the value used to key each box. This key will be encoded to bytes and prefixed with `keyPrefix`\n * @typeParam TValue The type of the data stored in the box. This value will be encoded to bytes when stored and decoded on retrieval.\n */\nexport function BoxMap<TKey, TValue>(options: CreateBoxMapOptions): BoxMap<TKey, TValue> {\n throw new NoImplementation()\n}\n","import { NoImplementation } from './internal/errors'\nimport { bytes } from './primitives'\nimport { Account } from './reference'\n\n/**\n * A proxy for manipulating a global state field\n * @typeParam ValueType The type of the value being stored - must be a serializable type\n */\nexport type GlobalState<ValueType> = {\n /**\n * Get or set the value of this global state field\n */\n value: ValueType\n /**\n * Delete the stored value of this global state field\n */\n delete(): void\n /**\n * Gets a boolean value indicating if global state field currently has a value\n */\n readonly hasValue: boolean\n}\n/**\n * Options for declaring a global state field\n */\nexport type GlobalStateOptions<ValueType> = {\n /**\n * The key to be used for this global state field.\n *\n * Defaults to the name of the property this proxy is assigned to\n */\n key?: bytes | string\n /**\n * An initial value to assign to this global state field when the application is created\n */\n initialValue?: ValueType\n}\n\n/**\n * Creates a new proxy for manipulating a global state field\n * @param options Options for configuring this field\n * @typeParam ValueType The type of the value being stored - must be a serializable type\n */\nexport function GlobalState<ValueType>(options?: GlobalStateOptions<ValueType>): GlobalState<ValueType> {\n throw new NoImplementation()\n}\n\n/**\n * A proxy for manipulating a local state field for a single account\n */\nexport type LocalStateForAccount<ValueType> = {\n /**\n * Get or set the value of this local state field for a single account\n */\n value: ValueType\n /**\n * Delete the stored value of this local state field for a single account\n */\n delete(): void\n /**\n * Gets a boolean value indicating if local state field for a single account currently has a value\n */\n readonly hasValue: boolean\n}\n\n/**\n * A proxy for manipulating a local state field for any account\n */\nexport type LocalState<ValueType> = {\n /**\n * Gets the LocalState proxy for a specific account\n * @param account The account to read or write state for. This account must be opted into the contract\n */\n (account: Account): LocalStateForAccount<ValueType>\n}\n/**\n * Options for declaring a local state field\n */\nexport type LocalStateOptions = {\n /**\n * The key to be used for this local state field.\n *\n * Defaults to the name of the property this proxy is assigned to\n */\n key?: bytes | string\n}\n\n/**\n * Creates a new proxy for manipulating a local state field\n * @param options Options for configuring this field\n */\nexport function LocalState<ValueType>(options?: LocalStateOptions): LocalState<ValueType> {\n throw new NoImplementation()\n}\n","/* THIS FILE IS GENERATED BY ~/scripts/generate-txn-types.ts - DO NOT MODIFY DIRECTLY */\nimport { NoImplementation } from './internal/errors'\nimport { OnCompleteAction } from './on-complete-action'\nimport { bytes, uint64 } from './primitives'\nimport { Account, Application, Asset } from './reference'\nimport { TransactionType } from './transactions'\n\nconst isItxn = Symbol('isItxn')\nexport namespace itxn {\n /**\n * An inner transaction of type 'pay'\n */\n export interface PaymentInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.Payment\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * 32 byte address\n */\n readonly receiver: Account\n /**\n * microalgos\n */\n readonly amount: uint64\n /**\n * 32 byte address\n */\n readonly closeRemainderTo: Account\n }\n /**\n * An inner transaction of type 'keyreg'\n */\n export interface KeyRegistrationInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.KeyRegistration\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * 32 byte address\n */\n readonly voteKey: bytes<32>\n /**\n * 32 byte address\n */\n readonly selectionKey: bytes<32>\n /**\n * The first round that the participation key is valid.\n */\n readonly voteFirst: uint64\n /**\n * The last round that the participation key is valid.\n */\n readonly voteLast: uint64\n /**\n * Dilution for the 2-level participation key\n */\n readonly voteKeyDilution: uint64\n /**\n * Marks an account nonparticipating for rewards\n */\n readonly nonparticipation: boolean\n /**\n * 64 byte state proof public key\n */\n readonly stateProofKey: bytes<64>\n }\n /**\n * An inner transaction of type 'acfg'\n */\n export interface AssetConfigInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetConfig\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID in asset config transaction\n */\n readonly configAsset: Asset\n /**\n * The asset created by this transaction\n */\n readonly createdAsset: Asset\n /**\n * Total number of units of this asset created\n */\n readonly total: uint64\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n readonly decimals: uint64\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n readonly defaultFrozen: boolean\n /**\n * Unit name of the asset\n */\n readonly unitName: bytes\n /**\n * The asset name\n */\n readonly assetName: bytes\n /**\n * URL\n */\n readonly url: bytes\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n readonly metadataHash: bytes<32>\n /**\n * 32 byte address\n */\n readonly manager: Account\n /**\n * 32 byte address\n */\n readonly reserve: Account\n /**\n * 32 byte address\n */\n readonly freeze: Account\n /**\n * 32 byte address\n */\n readonly clawback: Account\n }\n /**\n * An inner transaction of type 'axfer'\n */\n export interface AssetTransferInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetTransfer\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID\n */\n readonly xferAsset: Asset\n /**\n * value in Asset's units\n */\n readonly assetAmount: uint64\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n readonly assetSender: Account\n /**\n * 32 byte address\n */\n readonly assetReceiver: Account\n /**\n * 32 byte address\n */\n readonly assetCloseTo: Account\n }\n /**\n * An inner transaction of type 'afrz'\n */\n export interface AssetFreezeInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetFreeze\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID being frozen or un-frozen\n */\n readonly freezeAsset: Asset\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n readonly freezeAccount: Account\n /**\n * The new frozen value\n */\n readonly frozen: boolean\n }\n /**\n * An inner transaction of type 'appl'\n */\n export interface ApplicationCallInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.ApplicationCall\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * ApplicationID from ApplicationCall transaction\n */\n readonly appId: Application\n /**\n * ApplicationCall transaction on completion action\n */\n readonly onCompletion: OnCompleteAction\n /**\n * Number of ApplicationArgs\n */\n readonly numAppArgs: uint64\n /**\n * Number of ApplicationArgs\n */\n readonly numAccounts: uint64\n /**\n * The first page of the Approval program\n */\n readonly approvalProgram: bytes\n /**\n * The first page of the Clear State program\n */\n readonly clearStateProgram: bytes\n /**\n * Number of Assets\n */\n readonly numAssets: uint64\n /**\n * Number of Applications\n */\n readonly numApps: uint64\n /**\n * Number of global state integers this application makes use of.\n */\n readonly globalNumUint: uint64\n /**\n * Number of global state byteslices this application makes use of.\n */\n readonly globalNumBytes: uint64\n /**\n * Number of local state integers this application makes use of.\n */\n readonly localNumUint: uint64\n /**\n * Number of local state byteslices this application makes use of.\n */\n readonly localNumBytes: uint64\n /**\n * Number of additional pages for each of the application's approval and clear state program\n */\n readonly extraProgramPages: uint64\n /**\n * The last message emitted. Empty bytes if none were emitted. App mode only\n */\n readonly lastLog: bytes\n /**\n * Read application logs\n * @param index Index of the log to get\n */\n logs(index: uint64): bytes\n /**\n * Number of Approval Program pages\n */\n readonly numApprovalProgramPages: uint64\n /**\n * All approval program pages\n * @param index Index of the page to get\n */\n approvalProgramPages(index: uint64): bytes\n /**\n * Number of Clear State Program pages\n */\n readonly numClearStateProgramPages: uint64\n /**\n * All clear state program pages\n * @param index Index of the page to get\n */\n clearStateProgramPages(index: uint64): bytes\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * @param index Index of the arg to get\n */\n appArgs(index: uint64): bytes\n /**\n * Accounts listed in the ApplicationCall transaction\n * @param index Index of the account to get\n */\n accounts(index: uint64): Account\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * @param index Index of the asset to get\n */\n assets(index: uint64): Asset\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * @param index Index of the application to get\n */\n apps(index: uint64): Application\n /**\n * The id of the created application\n */\n readonly createdApp: Application\n /**\n * Number of logs\n */\n readonly numLogs: uint64\n /**\n * Application version for which the txn must reject\n */\n readonly rejectVersion: uint64\n }\n export interface PaymentFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * 32 byte address\n */\n receiver?: Account | bytes\n /**\n * microalgos\n */\n amount?: uint64\n /**\n * 32 byte address\n */\n closeRemainderTo?: Account | bytes\n }\n export interface KeyRegistrationFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * 32 byte address\n */\n voteKey?: bytes<32>\n /**\n * 32 byte address\n */\n selectionKey?: bytes<32>\n /**\n * The first round that the participation key is valid.\n */\n voteFirst?: uint64\n /**\n * The last round that the participation key is valid.\n */\n voteLast?: uint64\n /**\n * Dilution for the 2-level participation key\n */\n voteKeyDilution?: uint64\n /**\n * Marks an account nonparticipating for rewards\n */\n nonparticipation?: boolean\n /**\n * 64 byte state proof public key\n */\n stateProofKey?: bytes<64>\n }\n export interface AssetConfigFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * Asset ID in asset config transaction\n */\n configAsset?: Asset | uint64\n /**\n * Total number of units of this asset created\n */\n total?: uint64\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n decimals?: uint64\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n defaultFrozen?: boolean\n /**\n * Unit name of the asset\n */\n unitName?: bytes | string\n /**\n * The asset name\n */\n assetName?: bytes | string\n /**\n * URL\n */\n url?: bytes | string\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n metadataHash?: bytes<32>\n /**\n * 32 byte address\n */\n manager?: Account | bytes\n /**\n * 32 byte address\n */\n reserve?: Account | bytes\n /**\n * 32 byte address\n */\n freeze?: Account | bytes\n /**\n * 32 byte address\n */\n clawback?: Account | bytes\n }\n export interface AssetTransferFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * Asset ID\n */\n xferAsset?: Asset | uint64\n /**\n * value in Asset's units\n */\n assetAmount?: uint64\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n assetSender?: Account | bytes\n /**\n * 32 byte address\n */\n assetReceiver?: Account | bytes\n /**\n * 32 byte address\n */\n assetCloseTo?: Account | bytes\n }\n export interface AssetFreezeFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * Asset ID being frozen or un-frozen\n */\n freezeAsset?: Asset | uint64\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n freezeAccount?: Account | bytes\n /**\n * The new frozen value\n */\n frozen?: boolean\n }\n export interface ApplicationCallFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * ApplicationID from ApplicationCall transaction\n */\n appId?: Application | uint64\n /**\n * ApplicationCall transaction on completion action\n */\n onCompletion?: OnCompleteAction\n /**\n * Number of global state integers this application makes use of.\n */\n globalNumUint?: uint64\n /**\n * Number of global state byteslices this application makes use of.\n */\n globalNumBytes?: uint64\n /**\n * Number of local state integers this application makes use of.\n */\n localNumUint?: uint64\n /**\n * Number of local state byteslices this application makes use of.\n */\n localNumBytes?: uint64\n /**\n * Number of additional pages for each of the application's approval and clear state program\n */\n extraProgramPages?: uint64\n /**\n * All approval program pages\n * @param index Index of the page to get\n */\n approvalProgram?: bytes | readonly [...bytes[]]\n /**\n * All clear state program pages\n * @param index Index of the page to get\n */\n clearStateProgram?: bytes | readonly [...bytes[]]\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * @param index Index of the arg to get\n */\n appArgs?: readonly [...unknown[]]\n /**\n * Accounts listed in the ApplicationCall transaction\n * @param index Index of the account to get\n */\n accounts?: readonly [...(Account | bytes)[]]\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * @param index Index of the asset to get\n */\n assets?: readonly [...(Asset | uint64)[]]\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * @param index Index of the application to get\n */\n apps?: readonly [...(Application | uint64)[]]\n /**\n * Application version for which the txn must reject\n */\n rejectVersion?: uint64\n }\n /**\n * A union of all ItxnParams types\n */\n export type ItxnParams =\n | PaymentItxnParams\n | KeyRegistrationItxnParams\n | AssetConfigItxnParams\n | AssetTransferItxnParams\n | AssetFreezeItxnParams\n | ApplicationCallItxnParams\n /**\n * Conditional type which returns the matching InnerTransaction types for a given tuple of ItxnParams types\n */\n export type TxnFor<TFields extends [...ItxnParams[]]> = TFields extends [\n { submit(): infer TTxn },\n ...infer TRest extends [...ItxnParams[]],\n ]\n ? readonly [TTxn, ...TxnFor<TRest>]\n : []\n /**\n * Submit a group of ItxnParams objects and return the InnerTransaction results\n */\n export function submitGroup<TFields extends [...ItxnParams[]]>(...transactionFields: TFields): TxnFor<TFields> {\n throw new NoImplementation()\n }\n /**\n * Holds Payment fields which can be updated, cloned, or submitted.\n */\n export abstract class PaymentItxnParams {\n /**\n * Submit an itxn with these fields and return the PaymentInnerTxn result\n */\n submit(): PaymentInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this PaymentItxnParams object\n */\n set(fields: PaymentFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this PaymentItxnParams object\n */\n copy(): PaymentItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new PaymentItxnParams object with the specified fields\n */\n export function payment(fields: PaymentFields): PaymentItxnParams {\n throw new NoImplementation()\n }\n /**\n * Holds KeyRegistration fields which can be updated, cloned, or submitted.\n */\n export abstract class KeyRegistrationItxnParams {\n /**\n * Submit an itxn with these fields and return the KeyRegistrationInnerTxn result\n */\n submit(): KeyRegistrationInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this KeyRegistrationItxnParams object\n */\n set(fields: KeyRegistrationFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this KeyRegistrationItxnParams object\n */\n copy(): KeyRegistrationItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new KeyRegistrationItxnParams object with the specified fields\n */\n export function keyRegistration(fields: KeyRegistrationFields): KeyRegistrationItxnParams {\n throw new NoImplementation()\n }\n /**\n * Holds AssetConfig fields which can be updated, cloned, or submitted.\n */\n export abstract class AssetConfigItxnParams {\n /**\n * Submit an itxn with these fields and return the AssetConfigInnerTxn result\n */\n submit(): AssetConfigInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this AssetConfigItxnParams object\n */\n set(fields: AssetConfigFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this AssetConfigItxnParams object\n */\n copy(): AssetConfigItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new AssetConfigItxnParams object with the specified fields\n */\n export function assetConfig(fields: AssetConfigFields): AssetConfigItxnParams {\n throw new NoImplementation()\n }\n /**\n * Holds AssetTransfer fields which can be updated, cloned, or submitted.\n */\n export abstract class AssetTransferItxnParams {\n /**\n * Submit an itxn with these fields and return the AssetTransferInnerTxn result\n */\n submit(): AssetTransferInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this AssetTransferItxnParams object\n */\n set(fields: AssetTransferFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this AssetTransferItxnParams object\n */\n copy(): AssetTransferItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new AssetTransferItxnParams object with the specified fields\n */\n export function assetTransfer(fields: AssetTransferFields): AssetTransferItxnParams {\n throw new NoImplementation()\n }\n /**\n * Holds AssetFreeze fields which can be updated, cloned, or submitted.\n */\n export abstract class AssetFreezeItxnParams {\n /**\n * Submit an itxn with these fields and return the AssetFreezeInnerTxn result\n */\n submit(): AssetFreezeInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this AssetFreezeItxnParams object\n */\n set(fields: AssetFreezeFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this AssetFreezeItxnParams object\n */\n copy(): AssetFreezeItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new AssetFreezeItxnParams object with the specified fields\n */\n export function assetFreeze(fields: AssetFreezeFields): AssetFreezeItxnParams {\n throw new NoImplementation()\n }\n /**\n * Holds ApplicationCall fields which can be updated, cloned, or submitted.\n */\n export abstract class ApplicationCallItxnParams {\n /**\n * Submit an itxn with these fields and return the ApplicationCallInnerTxn result\n */\n submit(): ApplicationCallInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this ApplicationCallItxnParams object\n */\n set(fields: ApplicationCallFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this ApplicationCallItxnParams object\n */\n copy(): ApplicationCallItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new ApplicationCallItxnParams object with the specified fields\n */\n export function applicationCall(fields: ApplicationCallFields): ApplicationCallItxnParams {\n throw new NoImplementation()\n }\n}\n","import { Contract, TypedApplicationCallFields } from './arc4'\nimport { NoImplementation } from './internal/errors'\nimport { DeliberateAny, InstanceMethod } from './internal/typescript-helpers'\nimport { itxn } from './itxn'\nimport { TransactionType } from './transactions'\n\nexport interface PaymentComposeFields extends itxn.PaymentFields {\n type: TransactionType.Payment\n}\nexport interface KeyRegistrationComposeFields extends itxn.KeyRegistrationFields {\n type: TransactionType.KeyRegistration\n}\nexport interface AssetConfigComposeFields extends itxn.AssetConfigFields {\n type: TransactionType.AssetConfig\n}\nexport interface AssetTransferComposeFields extends itxn.AssetTransferFields {\n type: TransactionType.AssetTransfer\n}\nexport interface AssetFreezeComposeFields extends itxn.AssetFreezeFields {\n type: TransactionType.AssetFreeze\n}\nexport interface ApplicationCallComposeFields extends itxn.ApplicationCallFields {\n type: TransactionType.ApplicationCall\n}\n\nexport interface AnyTransactionComposeFields\n extends itxn.PaymentFields,\n itxn.KeyRegistrationFields,\n itxn.AssetConfigFields,\n itxn.AssetTransferFields,\n itxn.AssetFreezeFields,\n itxn.ApplicationCallFields {\n type: TransactionType\n}\n\nexport type ComposeItxnParams =\n | itxn.PaymentItxnParams\n | itxn.KeyRegistrationItxnParams\n | itxn.AssetConfigItxnParams\n | itxn.AssetTransferItxnParams\n | itxn.AssetFreezeItxnParams\n | itxn.ApplicationCallItxnParams\n\nexport type ItxnCompose = {\n begin(fields: PaymentComposeFields): void\n begin(fields: KeyRegistrationComposeFields): void\n begin(fields: AssetConfigComposeFields): void\n begin(fields: AssetTransferComposeFields): void\n begin(fields: AssetFreezeComposeFields): void\n begin(fields: ApplicationCallComposeFields): void\n begin(fields: AnyTransactionComposeFields): void\n begin(fields: ComposeItxnParams): void\n begin<TArgs extends DeliberateAny[]>(method: InstanceMethod<Contract, TArgs>, fields: TypedApplicationCallFields<TArgs>): void\n\n next(fields: PaymentComposeFields): void\n next(fields: KeyRegistrationComposeFields): void\n next(fields: AssetConfigComposeFields): void\n next(fields: AssetTransferComposeFields): void\n next(fields: AssetFreezeComposeFields): void\n next(fields: ApplicationCallComposeFields): void\n next(fields: AnyTransactionComposeFields): void\n next(fields: ComposeItxnParams): void\n next<TArgs extends DeliberateAny[]>(method: InstanceMethod<Contract, TArgs>, fields: TypedApplicationCallFields<TArgs>): void\n\n submit(): void\n}\n\nexport const itxnCompose: ItxnCompose = NoImplementation.value()\n","/* THIS FILE IS GENERATED BY ~/scripts/generate-txn-types.ts - DO NOT MODIFY DIRECTLY */\nimport { OnCompleteAction } from './on-complete-action'\nimport { bytes, uint64 } from './primitives'\nimport { Account, Application, Asset } from './reference'\nimport { TransactionType } from './transactions'\nimport { NoImplementation } from './internal/errors'\n\nconst isGtxn = Symbol('isGtxn')\nexport namespace gtxn {\n /**\n * A group transaction of type 'pay'\n */\n export interface PaymentTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.Payment\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * 32 byte address\n */\n readonly receiver: Account\n /**\n * microalgos\n */\n readonly amount: uint64\n /**\n * 32 byte address\n */\n readonly closeRemainderTo: Account\n }\n /**\n * A group transaction of type 'keyreg'\n */\n export interface KeyRegistrationTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.KeyRegistration\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * 32 byte address\n */\n readonly voteKey: bytes<32>\n /**\n * 32 byte address\n */\n readonly selectionKey: bytes<32>\n /**\n * The first round that the participation key is valid.\n */\n readonly voteFirst: uint64\n /**\n * The last round that the participation key is valid.\n */\n readonly voteLast: uint64\n /**\n * Dilution for the 2-level participation key\n */\n readonly voteKeyDilution: uint64\n /**\n * Marks an account nonparticipating for rewards\n */\n readonly nonparticipation: boolean\n /**\n * 64 byte state proof public key\n */\n readonly stateProofKey: bytes<64>\n }\n /**\n * A group transaction of type 'acfg'\n */\n export interface AssetConfigTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetConfig\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID in asset config transaction\n */\n readonly configAsset: Asset\n /**\n * The asset created by this transaction\n */\n readonly createdAsset: Asset\n /**\n * Total number of units of this asset created\n */\n readonly total: uint64\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n readonly decimals: uint64\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n readonly defaultFrozen: boolean\n /**\n * Unit name of the asset\n */\n readonly unitName: bytes\n /**\n * The asset name\n */\n readonly assetName: bytes\n /**\n * URL\n */\n readonly url: bytes\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n readonly metadataHash: bytes<32>\n /**\n * 32 byte address\n */\n readonly manager: Account\n /**\n * 32 byte address\n */\n readonly reserve: Account\n /**\n * 32 byte address\n */\n readonly freeze: Account\n /**\n * 32 byte address\n */\n readonly clawback: Account\n }\n /**\n * A group transaction of type 'axfer'\n */\n export interface AssetTransferTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetTransfer\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID\n */\n readonly xferAsset: Asset\n /**\n * value in Asset's units\n */\n readonly assetAmount: uint64\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n readonly assetSender: Account\n /**\n * 32 byte address\n */\n readonly assetReceiver: Account\n /**\n * 32 byte address\n */\n readonly assetCloseTo: Account\n }\n /**\n * A group transaction of type 'afrz'\n */\n export interface AssetFreezeTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetFreeze\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID being frozen or un-frozen\n */\n readonly freezeAsset: Asset\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n readonly freezeAccount: Account\n /**\n * The new frozen value\n */\n readonly frozen: boolean\n }\n /**\n * A group transaction of type 'appl'\n */\n export interface ApplicationCallTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.ApplicationCall\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * ApplicationID from ApplicationCall transaction\n */\n readonly appId: Application\n /**\n * ApplicationCall transaction on completion action\n */\n readonly onCompletion: OnCompleteAction\n /**\n * Number of ApplicationArgs\n */\n readonly numAppArgs: uint64\n /**\n * Number of ApplicationArgs\n */\n readonly numAccounts: uint64\n /**\n * The first page of the Approval program\n */\n readonly approvalProgram: bytes\n /**\n * The first page of the Clear State program\n */\n readonly clearStateProgram: bytes\n /**\n * Number of Assets\n */\n readonly numAssets: uint64\n /**\n * Number of Applications\n */\n readonly numApps: uint64\n /**\n * Number of global state integers this application makes use of.\n */\n readonly globalNumUint: uint64\n /**\n * Number of global state byteslices this application makes use of.\n */\n readonly globalNumBytes: uint64\n /**\n * Number of local state integers this application makes use of.\n */\n readonly localNumUint: uint64\n /**\n * Number of local state byteslices this application makes use of.\n */\n readonly localNumBytes: uint64\n /**\n * Number of additional pages for each of the application's approval and clear state program\n */\n readonly extraProgramPages: uint64\n /**\n * The last message emitted. Empty bytes if none were emitted. App mode only\n */\n readonly lastLog: bytes\n /**\n * Read application logs\n * @param index Index of the log to get\n */\n logs(index: uint64): bytes\n /**\n * Number of Approval Program pages\n */\n readonly numApprovalProgramPages: uint64\n /**\n * All approval program pages\n * @param index Index of the page to get\n */\n approvalProgramPages(index: uint64): bytes\n /**\n * Number of Clear State Program pages\n */\n readonly numClearStateProgramPages: uint64\n /**\n * All clear state program pages\n * @param index Index of the page to get\n */\n clearStateProgramPages(index: uint64): bytes\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * @param index Index of the arg to get\n */\n appArgs(index: uint64): bytes\n /**\n * Accounts listed in the ApplicationCall transaction\n * @param index Index of the account to get\n */\n accounts(index: uint64): Account\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * @param index Index of the asset to get\n */\n assets(index: uint64): Asset\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * @param index Index of the application to get\n */\n apps(index: uint64): Application\n /**\n * The id of the created application\n */\n readonly createdApp: Application\n /**\n * Number of logs\n */\n readonly numLogs: uint64\n /**\n * Application version for which the txn must reject\n */\n readonly rejectVersion: uint64\n }\n /**\n * A group transaction of any type\n */\n export type Transaction = PaymentTxn | KeyRegistrationTxn | AssetConfigTxn | AssetTransferTxn | AssetFreezeTxn | ApplicationCallTxn\n /**\n * Get the nth transaction in the group without verifying its type\n * @param n The index of the txn in the group\n */\n export function Transaction(n: uint64): Transaction {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'pay'\n * @param n The index of the txn in the group\n */\n export function PaymentTxn(n: uint64): PaymentTxn {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'keyreg'\n * @param n The index of the txn in the group\n */\n export function KeyRegistrationTxn(n: uint64): KeyRegistrationTxn {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'acfg'\n * @param n The index of the txn in the group\n */\n export function AssetConfigTxn(n: uint64): AssetConfigTxn {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'axfer'\n * @param n The index of the txn in the group\n */\n export function AssetTransferTxn(n: uint64): AssetTransferTxn {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'afrz'\n * @param n The index of the txn in the group\n */\n export function AssetFreezeTxn(n: uint64): AssetFreezeTxn {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'appl'\n * @param n The index of the txn in the group\n */\n export function ApplicationCallTxn(n: uint64): ApplicationCallTxn {\n throw new NoImplementation()\n }\n}\n","/**\n * The different transaction types available in a transaction\n */\nexport enum TransactionType {\n /**\n * A Payment transaction\n */\n Payment = 1,\n /**\n * A Key Registration transaction\n */\n KeyRegistration = 2,\n /**\n * An Asset Config transaction\n */\n AssetConfig = 3,\n /**\n * An Asset Transfer transaction\n */\n AssetTransfer = 4,\n /**\n * An Asset Freeze transaction\n */\n AssetFreeze = 5,\n /**\n * An Application Call transaction\n */\n ApplicationCall = 6,\n}\n","import { ConstructorFor } from './internal/typescript-helpers'\nimport { uint64 } from './primitives'\n\n/**\n * Base class for Algorand TypeScript Logic Signatures (also known as Smart Signatures)\n */\nexport abstract class LogicSig {\n /**\n * The logic signature program logic\n */\n abstract program(): boolean | uint64\n}\n\n/**\n * Alias for a numeric range specification.\n */\ntype NumberRange = {\n /**\n * The start point of the range (inclusive)\n */\n from: number\n /**\n * The end point of the range (inclusive)\n */\n to: number\n}\n\n/**\n * Defines optional configuration for a logic signature\n */\ntype LogicSigOptions = {\n /**\n * Determines which AVM version to use, this affects what operations are supported.\n * Defaults to value provided on command line (which defaults to current mainnet version)\n */\n avmVersion?: 10 | 11 | 12 | 13\n /**\n * Override the name of the logic signature when generating build artifacts.\n * Defaults to the class name\n */\n name?: string\n /**\n * Allows you to mark a slot ID or range of slot IDs as \"off limits\" to Puya.\n * These slot ID(s) will never be written to or otherwise manipulating by the compiler itself.\n * This is particularly useful in combination with `op.gload_bytes` / `op.gload_uint64`\n * which lets a contract in a group transaction read from the scratch slots of another contract\n * that occurs earlier in the transaction group.\n */\n scratchSlots?: Array<number | NumberRange>\n}\n\n/**\n * The logicsig decorator can be used to specify additional configuration options for a logic signature\n * @param options An object containing the configuration options\n */\nexport function logicsig(options: LogicSigOptions) {\n return <T extends ConstructorFor<LogicSig>>(logicSig: T) => logicSig\n}\n","import { NoImplementation } from './internal/errors'\n\n/**\n * Declare a template variable which can be replaced at compile time with an environment specific value.\n *\n * The final variable name will be `prefix + variableName`\n * @param variableName The key used to identify the variable.\n * @param prefix The prefix to apply the variable name (Defaults to 'TMPL_')\n */\nexport function TemplateVar<T>(variableName: string, prefix = 'TMPL_'): T {\n throw new NoImplementation()\n}\n","import { BaseContract } from './base-contract'\nimport { NoImplementation } from './internal/errors'\nimport { ConstructorFor, DeliberateAny } from './internal/typescript-helpers'\nimport { LogicSig } from './logic-sig'\nimport { bytes, uint64 } from './primitives'\nimport { Account } from './reference'\n\n/**\n * Provides compiled programs and state allocation values for a Contract. Created by calling `compile(ExampleContractType)`\n */\nexport type CompiledContract = {\n /**\n * Approval program pages for a contract, after template variables have been replaced and compiled to AVM bytecode\n */\n readonly approvalProgram: readonly [bytes, bytes]\n /**\n * Clear state program pages for a contract, after template variables have been replaced and compiled to AVM bytecode\n */\n readonly clearStateProgram: readonly [bytes, bytes]\n /**\n * By default, provides extra program pages required based on approval and clear state program size, can be overridden when calling `compile(ExampleContractType, { extraProgramPages: ... })`\n */\n readonly extraProgramPages: uint64\n /**\n * By default, provides global num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalUints: ... })`\n */\n readonly globalUints: uint64\n /**\n * By default, provides global num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalBytes: ... })`\n */\n readonly globalBytes: uint64\n /**\n * By default, provides local num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localUints: ... })`\n */\n readonly localUints: uint64\n /**\n * By default, provides local num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localBytes: ... })`\n */\n readonly localBytes: uint64\n}\n\n/**\n * Provides account for a Logic Signature. Created by calling `compile(LogicSigType)`\n */\nexport type CompiledLogicSig = {\n /**\n * Address of a logic sig program, after template variables have been replaced and compiled to AVM bytecode\n */\n readonly account: Account\n}\n\n/**\n * Options for compiling a contract\n */\nexport type CompileContractOptions = {\n /**\n * Number of extra program pages, defaults to minimum required for contract\n */\n readonly extraProgramPages?: uint64\n /**\n * Number of global uint64s, defaults to value defined for contract\n */\n readonly globalUints?: uint64\n /**\n * Number of global bytes, defaults to value defined for contract\n */\n readonly globalBytes?: uint64\n /**\n * Number of local uint64s, defaults to value defined for contract\n */\n readonly localUints?: uint64\n /**\n * Number of local bytes, defaults to value defined for contract\n */\n readonly localBytes?: uint64\n /**\n * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant\n * and match the type of the template var declaration\n */\n readonly templateVars?: Record<string, DeliberateAny>\n /**\n * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_)\n */\n readonly templateVarsPrefix?: string\n}\n\n/**\n * Options for compiling a logic signature\n */\nexport type CompileLogicSigOptions = {\n /**\n * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant\n * and match the type of the template var declaration\n */\n templateVars?: Record<string, DeliberateAny>\n /**\n * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_)\n */\n templateVarsPrefix?: string\n}\n\n/**\n * Compile a contract and return the resulting byte code for approval and clear state programs.\n * @param contract The contract class to compile\n * @param options Options for compiling the contract\n */\nexport function compile(contract: ConstructorFor<BaseContract>, options?: CompileContractOptions): CompiledContract\n/**\n * Compile a logic signature and return an account ready for signing transactions.\n * @param logicSig The logic sig class to compile\n * @param options Options for compiling the logic sig\n */\nexport function compile(logicSig: ConstructorFor<LogicSig>, options?: CompileLogicSigOptions): CompiledLogicSig\nexport function compile(artefact: ConstructorFor<BaseContract> | ConstructorFor<LogicSig>): CompiledLogicSig | CompiledContract {\n throw new NoImplementation()\n}\n","import { NoImplementation } from './internal/errors'\nimport { uint64, Uint64Compat } from './primitives'\n\n/**\n * An in memory mutable array which is passed by reference\n */\nexport class ReferenceArray<TItem> {\n /**\n * Create a new ReferenceArray with the specified items\n * @param items The initial items for the array\n */\n constructor(...items: TItem[]) {}\n\n /**\n * Returns the current length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n throw new NoImplementation()\n }\n\n /**\n * @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new ReferenceArray with all items from this array\n */\n slice(): ReferenceArray<TItem>\n /**\n * @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new ReferenceArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n */\n slice(end: Uint64Compat): ReferenceArray<TItem>\n /**\n * @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new ReferenceArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n */\n slice(start: Uint64Compat, end: Uint64Compat): ReferenceArray<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): ReferenceArray<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): IterableIterator<readonly [uint64, TItem]> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n throw new NoImplementation()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n\n /**\n * Push a number of items into this array\n * @param items The items to be added to this array\n */\n push(...items: TItem[]): void {\n throw new NoImplementation()\n }\n\n /**\n * Pop a single item from this array\n */\n pop(): TItem {\n throw new NoImplementation()\n }\n}\n","import { NoImplementation } from './internal/errors'\nimport { DeliberateAny } from './internal/typescript-helpers'\n\n/**\n * Emit an arc28 event log using either an ARC4Struct type or a named object type.\n * Object types must have an ARC4 equivalent type.\n *\n * Anonymous types cannot be used as the type name is used to determine the event prefix\n * @param event An ARC4Struct instance, or a plain object with a named type\n *\n * @example\n * class Demo extends Struct<{ a: Uint64 }> {}\n * emit(new Demo({ a: new Uint64(123) }))\n *\n * @example\n * type Demo = { a: uint64 }\n * emit<Demo>({a: 123})\n * // or\n * const d: Demo = { a: 123 }\n * emit(d)\n */\nexport function emit<TEvent extends Record<string, DeliberateAny>>(event: TEvent): void\n/**\n * Emit an arc28 event log using an explicit name and inferred property/field types.\n * Property types must be ARC4 or have an ARC4 equivalent type.\n * @param eventName The name of the event (must be a compile time constant)\n * @param eventProps A set of event properties (order is significant)\n *\n * @example\n * emit(\"Demo\", new Uint64(123))\n *\n * @example\n * const a: uint64 = 123\n * emit(\"Demo\", a)\n */\nexport function emit<TProps extends [...DeliberateAny[]]>(eventName: string, ...eventProps: TProps): void\nexport function emit<T>(event: T | string, ...eventProps: unknown[]): void {\n throw new NoImplementation()\n}\n","/**\n * The possible on complete actions a method can handle, represented as a string\n */\nexport type OnCompleteActionStr = 'NoOp' | 'OptIn' | 'ClearState' | 'CloseOut' | 'UpdateApplication' | 'DeleteApplication'\n\n/**\n * The possible on complete actions a method can handle, represented as an integer\n */\nexport enum OnCompleteAction {\n /**\n * Do nothing after the transaction has completed\n */\n NoOp = 0,\n /**\n * Opt the calling user into the contract\n */\n OptIn = 1,\n /**\n * Close the calling user out of the contract\n */\n CloseOut = 2,\n /**\n * Run the clear state program and forcibly close the user out of the contract\n */\n ClearState = 3,\n /**\n * Replace the application's approval and clear state programs with the bytes from this transaction\n */\n UpdateApplication = 4,\n /**\n * Delete the application\n */\n DeleteApplication = 5,\n}\n","import { NoImplementation } from './internal/errors'\nimport { uint64, Uint64Compat } from './primitives'\n\n/**\n * A fixed sized array\n * @typeParam TItem The type of a single item in the array\n * @typeParam TLength The fixed length of the array\n */\nexport class FixedArray<TItem, TLength extends number> implements ConcatArray<TItem> {\n /**\n * Create a new FixedArray instance\n */\n constructor()\n /**\n * Create a new FixedArray instance with the specified items\n * @param items The initial items for the array\n */\n constructor(...items: TItem[] & { length: TLength })\n constructor(...items: TItem[] & { length: TLength }) {}\n\n /**\n * Returns a new array containing all items from _this_ array, and _other_ array\n * @param items Another array to concat with this one\n */\n concat(...items: (TItem | ConcatArray<TItem>)[]): TItem[] {\n throw new NoImplementation()\n }\n\n /**\n * Returns the statically declared length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n throw new NoImplementation()\n }\n\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new Dynamic array with all items from this array\n */\n slice(): Array<TItem>\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new DynamicArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n */\n slice(end: Uint64Compat): Array<TItem>\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new DynamicArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n */\n slice(start: Uint64Compat, end: Uint64Compat): Array<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): Array<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): ArrayIterator<readonly [uint64, TItem]> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n throw new NoImplementation()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n\n /**\n * Creates a string by concatenating all the items in the array delimited by the\n * specified separator (or ',' by default)\n * @param separator\n * @deprecated Join is not supported in Algorand TypeScript\n */\n join(separator?: string): string {\n throw new NoImplementation()\n }\n}\n"],"names":[],"mappings":";;;;AAiDM,SAAU,MAAM,CAAC,CAAyB,EAAA;IAC9C,MA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/state.ts","../src/itxn.ts","../src/itxn-compose.ts","../src/gtxn.ts","../src/transactions.ts","../src/logic-sig.ts","../src/template-var.ts","../src/compiled.ts","../src/reference-array.ts","../src/arc-28.ts","../src/on-complete-action.ts","../src/arrays.ts"],"sourcesContent":["import { NoImplementation } from './internal/errors'\n\n/**\n * An alias for types which can be converted to a uint64\n */\nexport type Uint64Compat = uint64 | bigint | boolean | number\n/**\n * An alias for types which can be converted to a biguint\n */\nexport type BigUintCompat = bigint | bytes | number | boolean\n/**\n * An alias for types which can be converted to a string\n */\nexport type StringCompat = string\n/**\n * An alias for types which can be converted to a bytes sequence\n */\nexport type BytesCompat = bytes | string\n\n/**\n * An unsigned integer of exactly 64 bits\n */\nexport type uint64 = {\n /**\n * @hidden\n */\n __type?: 'uint64'\n} & number\n\n/**\n * Create a uint64 with the default value of 0\n */\nexport function Uint64(): uint64\n/**\n * Create a uint64 from a string literal\n */\nexport function Uint64(v: string): uint64\n/**\n * Create a uint64 from a bigint literal\n */\nexport function Uint64(v: bigint): uint64\n/**\n * Create a uint64 from a number literal\n */\nexport function Uint64(v: number): uint64\n/**\n * Create a uint64 from a boolean value. True is 1, False is 0\n */\nexport function Uint64(v: boolean): uint64\nexport function Uint64(v?: Uint64Compat | string): uint64 {\n throw new NoImplementation()\n}\n\nUint64.MAX_VALUE = NoImplementation.value<uint64>()\nUint64.MIN_VALUE = NoImplementation.value<uint64>()\n\n/**\n * An unsigned integer of up to 512 bits\n *\n * Stored as a big-endian variable byte array\n */\nexport type biguint = {\n /**\n * @hidden\n */\n __type?: 'biguint'\n} & bigint\n\n/**\n * Create a biguint from a bigint literal\n */\nexport function BigUint(v: bigint): biguint\n/**\n * Create a biguint from a boolean value (true = 1, false = 0)\n */\nexport function BigUint(v: boolean): biguint\n/**\n * Create a biguint from a uint64 value\n */\nexport function BigUint(v: uint64): biguint\n/**\n * Create a biguint from a number literal\n */\nexport function BigUint(v: number): biguint\n/**\n * Create a biguint from a byte array interpreted as a big-endian number\n */\nexport function BigUint(v: bytes): biguint\n/**\n * Create a biguint from a string literal containing the decimal digits\n */\nexport function BigUint(v: string): biguint\n/**\n * Create a biguint with the default value of 0\n */\nexport function BigUint(): biguint\nexport function BigUint(v?: BigUintCompat | string): biguint {\n throw new NoImplementation()\n}\n\ntype ToFixedBytesOptions<TLength extends uint64 = uint64> = {\n /**\n * The length for the bounded type\n */\n length: TLength\n /**\n * The strategy to use for converting to a fixed length bytes type (default: 'assert-length')\n *\n * - 'assert-length': Asserts that the byte sequence has the specified length and fails if it differs\n * - 'unsafe-cast': Reinterprets the byte sequence as a fixed length type without any checks. This will succeed even if the value\n * is not of the specified length but will result in undefined behaviour for any code that makes use of this value.\n *\n */\n strategy?: 'assert-length' | 'unsafe-cast'\n}\n/**\n * A sequence of zero or more bytes (ie. byte[])\n *\n * @typeParam TLength The static length of this byte array\n */\nexport type bytes<out TLength extends uint64 = uint64> = {\n /**\n * Retrieve the length of the byte sequence\n */\n readonly length: uint64\n\n /**\n * Retrieve the byte at the index i\n * @param i The index to read. Can be negative to read from the end\n * @returns The byte found at the index, or an empty bytes value\n */\n at(i: Uint64Compat): bytes\n\n /**\n * Concatenate this bytes value with another bytes value\n * @param other The other bytes value\n * @returns The concatenation result\n */\n concat(other: BytesCompat): bytes\n\n /**\n * Perform a bitwise AND operation with this bytes value and another bytes value\n * of the same length.\n *\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseAnd(other: bytes<TLength>): bytes<TLength>\n\n /**\n * Perform a bitwise AND operation with this bytes value and another bytes value.\n *\n * The shorter of the two values will be zero-left extended to the larger length.\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseAnd(other: BytesCompat): bytes\n\n /**\n * Perform a bitwise OR operation with this bytes value and another bytes value\n * of the same length.\n *\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseOr(other: bytes<TLength>): bytes<TLength>\n\n /**\n * Perform a bitwise OR operation with this bytes value and another bytes value\n *\n * The shorter of the two values will be zero-left extended to the larger length.\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseOr(other: BytesCompat): bytes\n\n /**\n * Perform a bitwise XOR operation with this bytes value and another bytes value\n * of the same length.\n *\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseXor(other: bytes<TLength>): bytes<TLength>\n\n /**\n * Perform a bitwise XOR operation with this bytes value and another bytes value.\n *\n * The shorter of the two values will be zero-left extended to the larger length.\n * @param other The other bytes value\n * @returns The bitwise operation result\n */\n bitwiseXor(other: BytesCompat): bytes\n\n /**\n * Perform a bitwise INVERT operation with this bytes value\n * @returns The bitwise operation result\n */\n bitwiseInvert(): bytes<TLength>\n\n /**\n * Compares this bytes value with another.\n * @param other The other bytes value\n * @returns True if both values represent the same byte sequence\n */\n equals(other: BytesCompat): boolean\n\n /**\n * Returns a copy of this bytes sequence\n */\n slice(): bytes<TLength>\n /**\n * Returns a slice of this bytes sequence from the specified start to the end\n * @param start The index to start slicing from. Can be negative to count from the end.\n */\n slice(start: Uint64Compat): bytes\n /**\n * Returns a slice of this bytes sequence from the specified start to the specified end\n * @param start The index to start slicing from. Can be negative to count from the end.\n * @param end The index to end the slice. Can be negative to count from the end.\n */\n slice(start: Uint64Compat, end: Uint64Compat): bytes\n /**\n * @hidden\n */\n slice(start?: Uint64Compat, end?: Uint64Compat): bytes\n\n /**\n * Interpret this byte sequence as a utf-8 string\n */\n toString(): string\n\n /**\n * Change this unbounded bytes instance into a bounded one\n * @param options Options for the conversion\n */\n toFixed<TNewLength extends TLength>(options: ToFixedBytesOptions<TNewLength>): bytes<TNewLength>\n}\n\n/**\n * Create a byte array from a string interpolation template and compatible replacements\n * @param value\n * @param replacements\n */\nexport function Bytes(value: TemplateStringsArray, ...replacements: BytesCompat[]): bytes<uint64>\n/**\n * Create a byte array from a utf8 string\n */\nexport function Bytes(value: string): bytes<uint64>\n/**\n * Create a byte array from a utf8 string\n */\nexport function Bytes<TLength extends uint64>(value: string, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n/**\n * No op, returns the provided byte array.\n */\nexport function Bytes(value: bytes): bytes<uint64>\n/**\n * No op, returns the provided byte array.\n */\nexport function Bytes<TLength extends uint64>(value: bytes, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n/**\n * Create a byte array from a biguint value encoded as a variable length big-endian number\n */\nexport function Bytes(value: biguint): bytes<uint64>\n/**\n * Create a byte array from a biguint value encoded as a variable length big-endian number\n */\nexport function Bytes<TLength extends uint64>(value: biguint, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n/**\n * Create a byte array from a uint64 value encoded as a a variable length 64-bit number\n */\nexport function Bytes(value: uint64): bytes<uint64>\n/**\n * Create a byte array from a uint64 value encoded as a a variable length 64-bit number\n */\nexport function Bytes<TLength extends uint64 = 8>(value: uint64, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n/**\n * Create a byte array from an Iterable<uint64> where each item is interpreted as a single byte and must be between 0 and 255 inclusively\n */\nexport function Bytes(value: Iterable<uint64>): bytes<uint64>\n/**\n * Create a byte array from an Iterable<uint64> where each item is interpreted as a single byte and must be between 0 and 255 inclusively\n */\nexport function Bytes<TLength extends uint64>(value: Iterable<uint64>, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n/**\n * Create an empty byte array\n */\nexport function Bytes(): bytes<uint64>\n/**\n * Create an empty byte array\n */\nexport function Bytes<TLength extends uint64 = uint64>(options: ToFixedBytesOptions<TLength>): bytes<TLength>\nexport function Bytes<TLength extends uint64 = uint64>(\n value?: BytesCompat | TemplateStringsArray | biguint | uint64 | Iterable<number> | ToFixedBytesOptions<TLength>,\n ...replacements: [ToFixedBytesOptions<TLength>] | BytesCompat[] | undefined[]\n): bytes<TLength> {\n throw new NoImplementation()\n}\n\nexport namespace Bytes {\n /**\n * Create a new bytes value from a hexadecimal encoded string\n * @param hex A literal string of hexadecimal characters\n */\n export function fromHex(hex: string): bytes<uint64>\n /**\n * Create a new bytes value from a hexadecimal encoded string\n * @param hex A literal string of hexadecimal characters\n * @param options Options for bounded bytes\n */\n export function fromHex<TLength extends uint64>(hex: string, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n export function fromHex<TLength extends uint64 = uint64>(hex: string, options?: ToFixedBytesOptions<TLength>): bytes<TLength> {\n throw new NoImplementation()\n }\n\n /**\n * Create a new bytes value from a base 64 encoded string\n * @param b64 A literal string of b64 encoded characters\n */\n export function fromBase64(b64: string): bytes<uint64>\n /**\n * Create a new bytes value from a base 64 encoded string\n * @param b64 A literal string of b64 encoded characters\n * @param options Options for bounded bytes\n */\n export function fromBase64<TLength extends uint64>(b64: string, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n export function fromBase64<TLength extends uint64 = uint64>(b64: string, options?: ToFixedBytesOptions<TLength>): bytes<TLength> {\n throw new NoImplementation()\n }\n\n /**\n * Create a new bytes value from a base 32 encoded string\n * @param b32 A literal string of b32 encoded characters\n */\n export function fromBase32(b32: string): bytes<uint64>\n /**\n * Create a new bytes value from a base 32 encoded string\n * @param b32 A literal string of b32 encoded characters\n * @param options Options for bounded bytes\n */\n export function fromBase32<TLength extends uint64>(b32: string, options: ToFixedBytesOptions<TLength>): bytes<TLength>\n export function fromBase32<TLength extends uint64 = uint64>(b32: string, options?: ToFixedBytesOptions<TLength>): bytes<TLength> {\n throw new NoImplementation()\n }\n}\n\n/**\n * An interface for types which are backed by the AVM bytes type\n */\nexport interface BytesBacked<TLength extends uint64 = uint64> {\n /**\n * Retrieve the underlying bytes representing this value\n */\n get bytes(): bytes<TLength>\n}\n\n/**\n * Declare a homogeneous tuple with the item type T and length N.\n *\n * Eg.\n * NTuple<uint64, 3> === [uint64, uint64, uint64]\n */\nexport type NTuple<T, N extends number> = N extends N ? (number extends N ? T[] : _TupleOf<T, N, readonly []>) : never\n\ntype _TupleOf<T, N extends number, R extends readonly unknown[]> = R['length'] extends N ? R : _TupleOf<T, N, readonly [T, ...R]>\n","import { NoImplementation } from './internal/errors'\nimport { biguint, BigUintCompat, BytesBacked, BytesCompat, StringCompat, uint64, Uint64Compat } from './primitives'\n\n/**\n * Write one or more values to the transaction log.\n *\n * Each value is converted to bytes and concatenated\n * @param args The values to write\n */\nexport function log(...args: Array<Uint64Compat | BytesCompat | BigUintCompat | StringCompat | BytesBacked>): void {\n throw new NoImplementation()\n}\n\n/**\n * Asserts that `condition` is truthy, otherwise error and halt execution.\n * @param condition An expression that can be evaluated as truthy of falsy\n * @param message The message to show if `condition` is falsy and an error is raised.\n */\nexport function assert(condition: unknown, message?: string): asserts condition {\n throw new NoImplementation()\n}\n\n/**\n * Raise an error and halt execution\n * @param message The message to accompany the error\n */\nexport function err(message?: string): never {\n throw new NoImplementation()\n}\n\n/**\n * Defines possible comparison expressions for numeric types\n */\ntype NumericComparison<T> =\n | T\n | {\n /**\n * Is the subject less than the specified value\n */\n lessThan: T\n }\n | {\n /**\n * Is the subject greater than the specified value\n */\n greaterThan: T\n }\n | {\n /**\n * Is the subject greater than or equal to the specified value\n */\n greaterThanEq: T\n }\n | {\n /**\n * Is the subject less than or equal to the specified value\n */\n lessThanEq: T\n }\n | {\n /**\n * Is the subject between the specified values (inclusive)\n */\n between: readonly [T, T]\n }\n | {\n /**\n * Is the subject not equal to the specified value\n */\n not: T\n }\n\n/**\n * Defines possible comparison expressions for non-numeric types\n */\ntype NonNumericComparison<T> =\n | T\n | {\n /**\n * Is the subject not equal to the specified value\n */\n not: T\n }\n\n/**\n * Returns compatible comparison expressions for a type `T`\n * @typeParam T The type requiring comparison\n */\ntype ComparisonFor<T> = T extends uint64 | biguint ? NumericComparison<T> : NonNumericComparison<T>\n\n/**\n * A set of tests to apply to the match subject\n * @typeParam T The type of the test subject\n */\ntype MatchTest<T> =\n T extends ConcatArray<infer TItem>\n ? { [index: number]: ComparisonFor<TItem> } & {\n length?: ComparisonFor<uint64>\n }\n : {\n [key in keyof T]?: ComparisonFor<T[key]>\n }\n\n/**\n * Applies all tests in `test` against `subject` and returns a boolean indicating if they all pass\n * @param subject An object or tuple to be tested\n * @param test An object containing one or more tests to be applied to the subject\n * @typeParam T The type of the subject\n * @returns True if all tests pass, otherwise false\n */\nexport function match<T>(subject: T, test: MatchTest<T>): boolean {\n throw new NoImplementation()\n}\n\n/**\n *\n * Applies all tests in `test` against `subject` and asserts they all pass\n * @param subject An object or tuple to be tested\n * @param test An object containing one or more tests to be applied to the subject\n * @param message An optional message to show if the assertion fails\n * @typeParam T The type of the subject\n */\nexport function assertMatch<T>(subject: T, test: MatchTest<T>, message?: string): void {\n throw new NoImplementation()\n}\n\n/**\n * Defines the source of fees for the OpUp utility\n */\nexport enum OpUpFeeSource {\n /**\n * Only the excess fee (credit) on the outer group should be used (itxn.fee = 0)\n */\n GroupCredit = 0,\n /**\n * The app's account will cover all fees (itxn.fee = Global.minTxFee)\n */\n AppAccount = 1,\n /**\n * First the excess will be used, then remaining fees taken from the app account\n */\n Any = 2,\n}\n\n/**\n * Ensure the available op code budget is greater than or equal to requiredBudget.\n *\n * This is done by adding AppCall itxns to the group to increase the available budget. These itxns must be paid for\n * by the caller or the application.\n * @param requiredBudget The total required budget\n * @param feeSource Which source to withdraw txn fees from.\n */\nexport function ensureBudget(requiredBudget: uint64, feeSource: OpUpFeeSource = OpUpFeeSource.GroupCredit) {\n throw new NoImplementation()\n}\n\n/**\n * Generates an iterable sequence from 0...stop inclusive\n * @param stop The stop number of the sequence\n */\nexport function urange(stop: Uint64Compat): IterableIterator<uint64>\n/**\n * Generates an iterable sequence from start...stop inclusive\n * @param start The start number of the sequence\n * @param stop The stop number of the sequence\n */\nexport function urange(start: Uint64Compat, stop: Uint64Compat): IterableIterator<uint64>\n/**\n * Generates an iterable sequence from start...stop inclusive with increments of size step\n * @param start The start number of the sequence\n * @param stop The stop number of the sequence\n * @param step The step size of the sequence\n */\nexport function urange(start: Uint64Compat, stop: Uint64Compat, step: Uint64Compat): IterableIterator<uint64>\nexport function urange(a: Uint64Compat, b?: Uint64Compat, c?: Uint64Compat): IterableIterator<uint64> {\n throw new NoImplementation()\n}\n\n/**\n * Defines a numeric range including all numbers between from and to\n */\nexport type NumberRange = { from: number; to: number }\n\n/**\n * Creates a deep copy of the specified value\n * @param value The value to clone\n */\nexport function clone<T>(value: T): T {\n throw new NoImplementation()\n}\n\n/**\n * Performs validation to ensure the value is well-formed, errors if it is not\n * @param value The value to validate\n *\n */\nexport function validateEncoding<T>(value: T) {\n throw new NoImplementation()\n}\n","import { NoImplementation } from './internal/errors'\nimport { bytes, uint64 } from './primitives'\n\n/**\n * Represents an Algorand Account and exposes properties and methods for reading account data\n */\nexport type Account = {\n /**\n * Get the accounts address in bytes\n */\n readonly bytes: bytes<32>\n\n /**\n * Account balance in microalgos\n *\n * Account must be an available resource\n */\n readonly balance: uint64\n\n /**\n * Minimum required balance for account, in microalgos\n *\n * Account must be an available resource\n */\n readonly minBalance: uint64\n\n /**\n * Address the account is rekeyed to\n *\n * Account must be an available resource\n */\n readonly authAddress: Account\n\n /**\n * The total number of uint64 values allocated by this account in Global and Local States.\n *\n * Account must be an available resource\n */\n readonly totalNumUint: uint64\n\n /**\n * The total number of byte array values allocated by this account in Global and Local States.\n *\n * Account must be an available resource\n */\n readonly totalNumByteSlice: uint64\n\n /**\n * The number of extra app code pages used by this account.\n *\n * Account must be an available resource\n */\n readonly totalExtraAppPages: uint64\n\n /**\n * The number of existing apps created by this account.\n *\n * Account must be an available resource\n */\n readonly totalAppsCreated: uint64\n\n /**\n * The number of apps this account is opted into.\n *\n * Account must be an available resource\n */\n readonly totalAppsOptedIn: uint64\n\n /**\n * The number of existing ASAs created by this account.\n *\n * Account must be an available resource\n */\n readonly totalAssetsCreated: uint64\n\n /**\n * The numbers of ASAs held by this account (including ASAs this account created).\n *\n * Account must be an available resource\n */\n readonly totalAssets: uint64\n\n /**\n * The number of existing boxes created by this account's app.\n *\n * Account must be an available resource\n */\n readonly totalBoxes: uint64\n\n /**\n * The total number of bytes used by this account's app's box keys and values.\n *\n * Account must be an available resource\n */\n readonly totalBoxBytes: uint64\n\n /**\n * Returns true if this account is opted in to the specified Asset or Application.\n * Note: Account and Asset/Application must be an available resource\n *\n * @param assetOrApp\n */\n isOptedIn(assetOrApp: Asset | Application): boolean\n}\n\n/**\n * Create a new account object representing the zero address\n */\nexport function Account(): Account\n/**\n * Create a new account object representing the provided public key bytes\n * @param publicKey A 32-byte Algorand account public key\n */\nexport function Account(publicKey: bytes): Account\n/**\n * Create a new account object representing the provided address\n * @param address A 56 character base-32 encoded Algorand address\n */\nexport function Account(address: string): Account\nexport function Account(publicKeyOrAddress?: bytes | string): Account {\n throw new NoImplementation()\n}\n\n/**\n * Creates a new Asset object represent the asset id 0 (an invalid ID)\n */\nexport function Asset(): Asset\n/**\n * Creates a new Asset object representing the asset with the specified id\n * @param assetId The id of the asset\n */\nexport function Asset(assetId: uint64): Asset\nexport function Asset(assetId?: uint64): Asset {\n throw new NoImplementation()\n}\n/**\n * An Asset on the Algorand network.\n */\nexport type Asset = {\n /**\n * Returns the id of the Asset\n */\n readonly id: uint64\n\n /**\n * Total number of units of this asset\n */\n readonly total: uint64\n\n /**\n * @see AssetParams.decimals\n */\n readonly decimals: uint64\n\n /**\n * Frozen by default or not\n */\n readonly defaultFrozen: boolean\n\n /**\n * Asset unit name\n */\n readonly unitName: bytes\n\n /**\n * Asset name\n */\n readonly name: bytes\n\n /**\n * URL with additional info about the asset\n */\n readonly url: bytes\n\n /**\n * Arbitrary commitment\n */\n readonly metadataHash: bytes<32>\n\n /**\n * Manager address\n */\n readonly manager: Account\n\n /**\n * Reserve address\n */\n readonly reserve: Account\n\n /**\n * Freeze address\n */\n readonly freeze: Account\n\n /**\n * Clawback address\n */\n readonly clawback: Account\n\n /**\n * Creator address\n */\n readonly creator: Account\n\n /**\n * Amount of the asset unit held by this account. Fails if the account has not\n * opted in to the asset.\n * Asset and supplied Account must be an available resource\n * @param account Account\n * @return balance: uint64\n */\n balance(account: Account): uint64\n\n /**\n * Is the asset frozen or not. Fails if the account has not\n * opted in to the asset.\n * Asset and supplied Account must be an available resource\n * @param account Account\n * @return isFrozen: boolean\n */\n frozen(account: Account): boolean\n}\n\n/**\n * Creates a new Application object represent the application id 0 (an invalid ID)\n */\nexport function Application(): Application\n/**\n * Creates a new Application object representing the application with the specified id\n * @param applicationId The id of the application\n */\nexport function Application(applicationId: uint64): Application\nexport function Application(applicationId?: uint64): Application {\n throw new NoImplementation()\n}\n\n/**\n * An Application on the Algorand network.\n */\nexport type Application = {\n /**\n * The id of this application on the current network\n */\n readonly id: uint64\n /**\n * Bytecode of Approval Program\n */\n readonly approvalProgram: bytes\n\n /**\n * Bytecode of Clear State Program\n */\n readonly clearStateProgram: bytes\n\n /**\n * Number of uint64 values allowed in Global State\n */\n readonly globalNumUint: uint64\n\n /**\n * Number of byte array values allowed in Global State\n */\n readonly globalNumBytes: uint64\n\n /**\n * Number of uint64 values allowed in Local State\n */\n readonly localNumUint: uint64\n\n /**\n * Number of byte array values allowed in Local State\n */\n readonly localNumBytes: uint64\n\n /**\n * Number of Extra Program Pages of code space\n */\n readonly extraProgramPages: uint64\n\n /**\n * Creator address\n */\n readonly creator: Account\n\n /**\n * Address for which this application has authority\n */\n readonly address: Account\n\n /**\n * Version of the app, incremented each time the approval or clear program changes\n */\n readonly version: uint64\n}\n","import { NoImplementation } from './internal/errors'\nimport { bytes, uint64 } from './primitives'\n\n/**\n * A Box proxy\n * @typeParam TValue The type of the data stored in the box.\n */\nexport type Box<TValue> = {\n /**\n * Create the box for this proxy with a bzero value.\n * - If options.size is specified, the box will be created with that length\n * - Otherwise the box will be created with storage size of TValue. Errors if the size of TValue is not fixed\n *\n * No op if the box already exists with the same size\n * Errors if the box already exists with a different size.\n * Errors if the specified size is greater than the max box size (32,768)\n * @returns True if the box was created, false if it already existed\n */\n create(options?: { size?: uint64 }): boolean\n /**\n * Get the key used by this box proxy\n */\n readonly key: bytes\n /**\n * Get or set the value stored in the box\n *\n * Get will error if the box does not exist\n */\n value: TValue\n /**\n * Get a boolean indicating if the box exists or not\n */\n readonly exists: boolean\n /**\n * Get the value stored in the box, or return a specified default value if the box does not exist\n * @param options Options to specify a default value to be returned if no other value exists\n * @returns The value if the box exists, else the default value\n */\n get(options: { default: TValue }): TValue\n /**\n * Delete the box associated with this proxy if it exists.\n * @returns True if the box existed and was deleted, else false\n */\n delete(): boolean\n /**\n * Get the value stored in the box if available, and a boolean indicating if the box exists.\n *\n * If the box does not exist, the value returned at position 0 should not be relied on to have a valid value.\n * @returns A tuple with the first item being the box value, and the second item being a boolean indicating if the box exists.\n */\n maybe(): readonly [TValue, boolean]\n /**\n * Returns the length of the box, or error if the box does not exist\n */\n readonly length: uint64\n\n /**\n * Splice the specified bytes into the box starting at `start`, removing `length` bytes\n * from the existing value and replacing them with `value` before appending the remainder of the original box value.\n *\n * If the resulting byte value is larger than length, bytes will be trimmed from the end\n * If the resulting byte value is smaller than length, zero bytes will be appended to the end\n * Error if the box does not exist\n * @param start The index to start inserting the value\n * @param length The number of bytes after `start` to be omitted\n * @param value The value to be inserted\n */\n splice(start: uint64, length: uint64, value: bytes): void\n /**\n * Replace bytes in a box starting at `start`.\n *\n * Error if the box does not exist\n * Error if `start` + `value.length` is greater than the box size\n * @param start The index to start replacing\n * @param value The value to be written\n */\n replace(start: uint64, value: bytes): void\n /**\n * Extract a slice of bytes from the box\n *\n * Error if the box does not exist\n * Error if `start` + `length` is greater than the box size\n * @param start The index to start extracting\n * @param length The number of bytes to extract\n * @returns The extracted bytes\n */\n extract(start: uint64, length: uint64): bytes\n /**\n * Resize the box to the specified size.\n *\n * Adds zero bytes to the end if the new size is larger\n * Removes end bytes if the new size is smaller\n * Error if the box does not exist\n * @param newSize The new size for the box\n */\n resize(newSize: uint64): void\n}\n/**\n * A BoxMap proxy\n * @typeParam TKey The type of the value used to key each box.\n * @typeParam TValue The type of the data stored in the box.\n */\nexport type BoxMap<TKey, TValue> = {\n /**\n * Get the bytes used to prefix each key\n */\n readonly keyPrefix: bytes\n\n /**\n * Get a Box proxy for a single item in the BoxMap\n * @param key The key of the box to retrieve a proxy for\n */\n (key: TKey): Box<TValue>\n}\n\n/**\n * Options for creating a Box proxy\n */\ninterface CreateBoxOptions {\n /**\n * The bytes which make up the key of the box\n */\n key: bytes | string\n}\n\n/**\n * Creates a Box proxy object offering methods of getting and setting the value stored in a single box.\n * @param options Options for creating the Box proxy\n * @typeParam TValue The type of the data stored in the box. This value will be encoded to bytes when stored and decoded on retrieval.\n */\nexport function Box<TValue>(options: CreateBoxOptions): Box<TValue> {\n throw new NoImplementation()\n}\n\n/**\n * Options for creating a BoxMap proxy\n */\ninterface CreateBoxMapOptions {\n /**\n * The bytes which prefix each key of the box map\n */\n keyPrefix: bytes | string\n}\n\n/**\n * Creates a BoxMap proxy object offering methods of getting and setting a set of values stored in individual boxes indexed by a common key type\n * @param options Options for creating the BoxMap proxy\n * @typeParam TKey The type of the value used to key each box. This key will be encoded to bytes and prefixed with `keyPrefix`\n * @typeParam TValue The type of the data stored in the box. This value will be encoded to bytes when stored and decoded on retrieval.\n */\nexport function BoxMap<TKey, TValue>(options: CreateBoxMapOptions): BoxMap<TKey, TValue> {\n throw new NoImplementation()\n}\n","import { NoImplementation } from './internal/errors'\nimport { bytes } from './primitives'\nimport { Account } from './reference'\n\n/**\n * A proxy for manipulating a global state field\n * @typeParam ValueType The type of the value being stored - must be a serializable type\n */\nexport type GlobalState<ValueType> = {\n /**\n * Get or set the value of this global state field\n */\n value: ValueType\n /**\n * Delete the stored value of this global state field\n */\n delete(): void\n /**\n * Gets a boolean value indicating if global state field currently has a value\n */\n readonly hasValue: boolean\n}\n/**\n * Options for declaring a global state field\n */\nexport type GlobalStateOptions<ValueType> = {\n /**\n * The key to be used for this global state field.\n *\n * Defaults to the name of the property this proxy is assigned to\n */\n key?: bytes | string\n /**\n * An initial value to assign to this global state field when the application is created\n */\n initialValue?: ValueType\n}\n\n/**\n * Creates a new proxy for manipulating a global state field\n * @param options Options for configuring this field\n * @typeParam ValueType The type of the value being stored - must be a serializable type\n */\nexport function GlobalState<ValueType>(options?: GlobalStateOptions<ValueType>): GlobalState<ValueType> {\n throw new NoImplementation()\n}\n\n/**\n * A proxy for manipulating a local state field for a single account\n */\nexport type LocalStateForAccount<ValueType> = {\n /**\n * Get or set the value of this local state field for a single account\n */\n value: ValueType\n /**\n * Delete the stored value of this local state field for a single account\n */\n delete(): void\n /**\n * Gets a boolean value indicating if local state field for a single account currently has a value\n */\n readonly hasValue: boolean\n}\n\n/**\n * A proxy for manipulating a local state field for any account\n */\nexport type LocalState<ValueType> = {\n /**\n * Gets the LocalState proxy for a specific account\n * @param account The account to read or write state for. This account must be opted into the contract\n */\n (account: Account): LocalStateForAccount<ValueType>\n}\n/**\n * Options for declaring a local state field\n */\nexport type LocalStateOptions = {\n /**\n * The key to be used for this local state field.\n *\n * Defaults to the name of the property this proxy is assigned to\n */\n key?: bytes | string\n}\n\n/**\n * Creates a new proxy for manipulating a local state field\n * @param options Options for configuring this field\n */\nexport function LocalState<ValueType>(options?: LocalStateOptions): LocalState<ValueType> {\n throw new NoImplementation()\n}\n","/* THIS FILE IS GENERATED BY ~/scripts/generate-txn-types.ts - DO NOT MODIFY DIRECTLY */\nimport { NoImplementation } from './internal/errors'\nimport { OnCompleteAction } from './on-complete-action'\nimport { bytes, uint64 } from './primitives'\nimport { Account, Application, Asset } from './reference'\nimport { TransactionType } from './transactions'\n\nconst isItxn = Symbol('isItxn')\nexport namespace itxn {\n /**\n * An inner transaction of type 'pay'\n */\n export interface PaymentInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.Payment\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * 32 byte address\n */\n readonly receiver: Account\n /**\n * microalgos\n */\n readonly amount: uint64\n /**\n * 32 byte address\n */\n readonly closeRemainderTo: Account\n }\n /**\n * An inner transaction of type 'keyreg'\n */\n export interface KeyRegistrationInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.KeyRegistration\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * 32 byte address\n */\n readonly voteKey: bytes<32>\n /**\n * 32 byte address\n */\n readonly selectionKey: bytes<32>\n /**\n * The first round that the participation key is valid.\n */\n readonly voteFirst: uint64\n /**\n * The last round that the participation key is valid.\n */\n readonly voteLast: uint64\n /**\n * Dilution for the 2-level participation key\n */\n readonly voteKeyDilution: uint64\n /**\n * Marks an account nonparticipating for rewards\n */\n readonly nonparticipation: boolean\n /**\n * 64 byte state proof public key\n */\n readonly stateProofKey: bytes<64>\n }\n /**\n * An inner transaction of type 'acfg'\n */\n export interface AssetConfigInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetConfig\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID in asset config transaction\n */\n readonly configAsset: Asset\n /**\n * The asset created by this transaction\n */\n readonly createdAsset: Asset\n /**\n * Total number of units of this asset created\n */\n readonly total: uint64\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n readonly decimals: uint64\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n readonly defaultFrozen: boolean\n /**\n * Unit name of the asset\n */\n readonly unitName: bytes\n /**\n * The asset name\n */\n readonly assetName: bytes\n /**\n * URL\n */\n readonly url: bytes\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n readonly metadataHash: bytes<32>\n /**\n * 32 byte address\n */\n readonly manager: Account\n /**\n * 32 byte address\n */\n readonly reserve: Account\n /**\n * 32 byte address\n */\n readonly freeze: Account\n /**\n * 32 byte address\n */\n readonly clawback: Account\n }\n /**\n * An inner transaction of type 'axfer'\n */\n export interface AssetTransferInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetTransfer\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID\n */\n readonly xferAsset: Asset\n /**\n * value in Asset's units\n */\n readonly assetAmount: uint64\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n readonly assetSender: Account\n /**\n * 32 byte address\n */\n readonly assetReceiver: Account\n /**\n * 32 byte address\n */\n readonly assetCloseTo: Account\n }\n /**\n * An inner transaction of type 'afrz'\n */\n export interface AssetFreezeInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetFreeze\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID being frozen or un-frozen\n */\n readonly freezeAsset: Asset\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n readonly freezeAccount: Account\n /**\n * The new frozen value\n */\n readonly frozen: boolean\n }\n /**\n * An inner transaction of type 'appl'\n */\n export interface ApplicationCallInnerTxn {\n /** @hidden */\n [isItxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.ApplicationCall\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * ApplicationID from ApplicationCall transaction\n */\n readonly appId: Application\n /**\n * ApplicationCall transaction on completion action\n */\n readonly onCompletion: OnCompleteAction\n /**\n * Number of ApplicationArgs\n */\n readonly numAppArgs: uint64\n /**\n * Number of ApplicationArgs\n */\n readonly numAccounts: uint64\n /**\n * The first page of the Approval program\n */\n readonly approvalProgram: bytes\n /**\n * The first page of the Clear State program\n */\n readonly clearStateProgram: bytes\n /**\n * Number of Assets\n */\n readonly numAssets: uint64\n /**\n * Number of Applications\n */\n readonly numApps: uint64\n /**\n * Number of global state integers this application makes use of.\n */\n readonly globalNumUint: uint64\n /**\n * Number of global state byteslices this application makes use of.\n */\n readonly globalNumBytes: uint64\n /**\n * Number of local state integers this application makes use of.\n */\n readonly localNumUint: uint64\n /**\n * Number of local state byteslices this application makes use of.\n */\n readonly localNumBytes: uint64\n /**\n * Number of additional pages for each of the application's approval and clear state program\n */\n readonly extraProgramPages: uint64\n /**\n * The last message emitted. Empty bytes if none were emitted. App mode only\n */\n readonly lastLog: bytes\n /**\n * Read application logs\n * @param index Index of the log to get\n */\n logs(index: uint64): bytes\n /**\n * Number of Approval Program pages\n */\n readonly numApprovalProgramPages: uint64\n /**\n * All approval program pages\n * @param index Index of the page to get\n */\n approvalProgramPages(index: uint64): bytes\n /**\n * Number of Clear State Program pages\n */\n readonly numClearStateProgramPages: uint64\n /**\n * All clear state program pages\n * @param index Index of the page to get\n */\n clearStateProgramPages(index: uint64): bytes\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * @param index Index of the arg to get\n */\n appArgs(index: uint64): bytes\n /**\n * Accounts listed in the ApplicationCall transaction\n * @param index Index of the account to get\n */\n accounts(index: uint64): Account\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * @param index Index of the asset to get\n */\n assets(index: uint64): Asset\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * @param index Index of the application to get\n */\n apps(index: uint64): Application\n /**\n * The id of the created application\n */\n readonly createdApp: Application\n /**\n * Number of logs\n */\n readonly numLogs: uint64\n /**\n * Application version for which the txn must reject\n */\n readonly rejectVersion: uint64\n }\n export interface PaymentFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * 32 byte address\n */\n receiver?: Account | bytes\n /**\n * microalgos\n */\n amount?: uint64\n /**\n * 32 byte address\n */\n closeRemainderTo?: Account | bytes\n }\n export interface KeyRegistrationFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * 32 byte address\n */\n voteKey?: bytes<32>\n /**\n * 32 byte address\n */\n selectionKey?: bytes<32>\n /**\n * The first round that the participation key is valid.\n */\n voteFirst?: uint64\n /**\n * The last round that the participation key is valid.\n */\n voteLast?: uint64\n /**\n * Dilution for the 2-level participation key\n */\n voteKeyDilution?: uint64\n /**\n * Marks an account nonparticipating for rewards\n */\n nonparticipation?: boolean\n /**\n * 64 byte state proof public key\n */\n stateProofKey?: bytes<64>\n }\n export interface AssetConfigFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * Asset ID in asset config transaction\n */\n configAsset?: Asset | uint64\n /**\n * Total number of units of this asset created\n */\n total?: uint64\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n decimals?: uint64\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n defaultFrozen?: boolean\n /**\n * Unit name of the asset\n */\n unitName?: bytes | string\n /**\n * The asset name\n */\n assetName?: bytes | string\n /**\n * URL\n */\n url?: bytes | string\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n metadataHash?: bytes<32>\n /**\n * 32 byte address\n */\n manager?: Account | bytes\n /**\n * 32 byte address\n */\n reserve?: Account | bytes\n /**\n * 32 byte address\n */\n freeze?: Account | bytes\n /**\n * 32 byte address\n */\n clawback?: Account | bytes\n }\n export interface AssetTransferFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * Asset ID\n */\n xferAsset?: Asset | uint64\n /**\n * value in Asset's units\n */\n assetAmount?: uint64\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n assetSender?: Account | bytes\n /**\n * 32 byte address\n */\n assetReceiver?: Account | bytes\n /**\n * 32 byte address\n */\n assetCloseTo?: Account | bytes\n }\n export interface AssetFreezeFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * Asset ID being frozen or un-frozen\n */\n freezeAsset?: Asset | uint64\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n freezeAccount?: Account | bytes\n /**\n * The new frozen value\n */\n frozen?: boolean\n }\n export interface ApplicationCallFields {\n /**\n * 32 byte address\n */\n sender?: Account | bytes\n /**\n * microalgos\n */\n fee?: uint64\n /**\n * round number\n */\n firstValid?: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime?: uint64\n /**\n * round number\n */\n lastValid?: uint64\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n /**\n * 32 byte lease value\n */\n lease?: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | bytes\n /**\n * ApplicationID from ApplicationCall transaction\n */\n appId?: Application | uint64\n /**\n * ApplicationCall transaction on completion action\n */\n onCompletion?: OnCompleteAction\n /**\n * Number of global state integers this application makes use of.\n */\n globalNumUint?: uint64\n /**\n * Number of global state byteslices this application makes use of.\n */\n globalNumBytes?: uint64\n /**\n * Number of local state integers this application makes use of.\n */\n localNumUint?: uint64\n /**\n * Number of local state byteslices this application makes use of.\n */\n localNumBytes?: uint64\n /**\n * Number of additional pages for each of the application's approval and clear state program\n */\n extraProgramPages?: uint64\n /**\n * All approval program pages\n * @param index Index of the page to get\n */\n approvalProgram?: bytes | readonly [...bytes[]]\n /**\n * All clear state program pages\n * @param index Index of the page to get\n */\n clearStateProgram?: bytes | readonly [...bytes[]]\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * @param index Index of the arg to get\n */\n appArgs?: readonly [...unknown[]]\n /**\n * Accounts listed in the ApplicationCall transaction\n * @param index Index of the account to get\n */\n accounts?: readonly [...(Account | bytes)[]]\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * @param index Index of the asset to get\n */\n assets?: readonly [...(Asset | uint64)[]]\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * @param index Index of the application to get\n */\n apps?: readonly [...(Application | uint64)[]]\n /**\n * Application version for which the txn must reject\n */\n rejectVersion?: uint64\n }\n /**\n * A union of all ItxnParams types\n */\n export type ItxnParams =\n | PaymentItxnParams\n | KeyRegistrationItxnParams\n | AssetConfigItxnParams\n | AssetTransferItxnParams\n | AssetFreezeItxnParams\n | ApplicationCallItxnParams\n /**\n * Conditional type which returns the matching InnerTransaction types for a given tuple of ItxnParams types\n */\n export type TxnFor<TFields extends [...ItxnParams[]]> = TFields extends [\n { submit(): infer TTxn },\n ...infer TRest extends [...ItxnParams[]],\n ]\n ? readonly [TTxn, ...TxnFor<TRest>]\n : []\n /**\n * Submit a group of ItxnParams objects and return the InnerTransaction results\n */\n export function submitGroup<TFields extends [...ItxnParams[]]>(...transactionFields: TFields): TxnFor<TFields> {\n throw new NoImplementation()\n }\n /**\n * Holds Payment fields which can be updated, cloned, or submitted.\n */\n export abstract class PaymentItxnParams {\n /**\n * Submit an itxn with these fields and return the PaymentInnerTxn result\n */\n submit(): PaymentInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this PaymentItxnParams object\n */\n set(fields: PaymentFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this PaymentItxnParams object\n */\n copy(): PaymentItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new PaymentItxnParams object with the specified fields\n */\n export function payment(fields: PaymentFields): PaymentItxnParams {\n throw new NoImplementation()\n }\n /**\n * Holds KeyRegistration fields which can be updated, cloned, or submitted.\n */\n export abstract class KeyRegistrationItxnParams {\n /**\n * Submit an itxn with these fields and return the KeyRegistrationInnerTxn result\n */\n submit(): KeyRegistrationInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this KeyRegistrationItxnParams object\n */\n set(fields: KeyRegistrationFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this KeyRegistrationItxnParams object\n */\n copy(): KeyRegistrationItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new KeyRegistrationItxnParams object with the specified fields\n */\n export function keyRegistration(fields: KeyRegistrationFields): KeyRegistrationItxnParams {\n throw new NoImplementation()\n }\n /**\n * Holds AssetConfig fields which can be updated, cloned, or submitted.\n */\n export abstract class AssetConfigItxnParams {\n /**\n * Submit an itxn with these fields and return the AssetConfigInnerTxn result\n */\n submit(): AssetConfigInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this AssetConfigItxnParams object\n */\n set(fields: AssetConfigFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this AssetConfigItxnParams object\n */\n copy(): AssetConfigItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new AssetConfigItxnParams object with the specified fields\n */\n export function assetConfig(fields: AssetConfigFields): AssetConfigItxnParams {\n throw new NoImplementation()\n }\n /**\n * Holds AssetTransfer fields which can be updated, cloned, or submitted.\n */\n export abstract class AssetTransferItxnParams {\n /**\n * Submit an itxn with these fields and return the AssetTransferInnerTxn result\n */\n submit(): AssetTransferInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this AssetTransferItxnParams object\n */\n set(fields: AssetTransferFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this AssetTransferItxnParams object\n */\n copy(): AssetTransferItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new AssetTransferItxnParams object with the specified fields\n */\n export function assetTransfer(fields: AssetTransferFields): AssetTransferItxnParams {\n throw new NoImplementation()\n }\n /**\n * Holds AssetFreeze fields which can be updated, cloned, or submitted.\n */\n export abstract class AssetFreezeItxnParams {\n /**\n * Submit an itxn with these fields and return the AssetFreezeInnerTxn result\n */\n submit(): AssetFreezeInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this AssetFreezeItxnParams object\n */\n set(fields: AssetFreezeFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this AssetFreezeItxnParams object\n */\n copy(): AssetFreezeItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new AssetFreezeItxnParams object with the specified fields\n */\n export function assetFreeze(fields: AssetFreezeFields): AssetFreezeItxnParams {\n throw new NoImplementation()\n }\n /**\n * Holds ApplicationCall fields which can be updated, cloned, or submitted.\n */\n export abstract class ApplicationCallItxnParams {\n /**\n * Submit an itxn with these fields and return the ApplicationCallInnerTxn result\n */\n submit(): ApplicationCallInnerTxn {\n throw new NoImplementation()\n }\n /**\n * Update one or more fields in this ApplicationCallItxnParams object\n */\n set(fields: ApplicationCallFields): void {\n throw new NoImplementation()\n }\n /**\n * Return a copy of this ApplicationCallItxnParams object\n */\n copy(): ApplicationCallItxnParams {\n throw new NoImplementation()\n }\n }\n /**\n * Create a new ApplicationCallItxnParams object with the specified fields\n */\n export function applicationCall(fields: ApplicationCallFields): ApplicationCallItxnParams {\n throw new NoImplementation()\n }\n}\n","import { AbiCallOptions, Contract, TypedApplicationCallFields } from './arc4'\nimport { NoImplementation } from './internal/errors'\nimport { DeliberateAny, InstanceMethod } from './internal/typescript-helpers'\nimport { itxn } from './itxn'\nimport { TransactionType } from './transactions'\n\nexport interface PaymentComposeFields extends itxn.PaymentFields {\n type: TransactionType.Payment\n}\nexport interface KeyRegistrationComposeFields extends itxn.KeyRegistrationFields {\n type: TransactionType.KeyRegistration\n}\nexport interface AssetConfigComposeFields extends itxn.AssetConfigFields {\n type: TransactionType.AssetConfig\n}\nexport interface AssetTransferComposeFields extends itxn.AssetTransferFields {\n type: TransactionType.AssetTransfer\n}\nexport interface AssetFreezeComposeFields extends itxn.AssetFreezeFields {\n type: TransactionType.AssetFreeze\n}\nexport interface ApplicationCallComposeFields extends itxn.ApplicationCallFields {\n type: TransactionType.ApplicationCall\n}\n\nexport interface AnyTransactionComposeFields\n extends itxn.PaymentFields,\n itxn.KeyRegistrationFields,\n itxn.AssetConfigFields,\n itxn.AssetTransferFields,\n itxn.AssetFreezeFields,\n itxn.ApplicationCallFields {\n type: TransactionType\n}\n\nexport type ComposeItxnParams =\n | itxn.PaymentItxnParams\n | itxn.KeyRegistrationItxnParams\n | itxn.AssetConfigItxnParams\n | itxn.AssetTransferItxnParams\n | itxn.AssetFreezeItxnParams\n | itxn.ApplicationCallItxnParams\n\nexport type ItxnCompose = {\n /**\n * Begin a transaction group with a payment transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n begin(fields: PaymentComposeFields): void\n /**\n * Begin a transaction group with a key registration transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n begin(fields: KeyRegistrationComposeFields): void\n /**\n * Begin a transaction group with an asset config transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n begin(fields: AssetConfigComposeFields): void\n /**\n * Begin a transaction group with an asset transfer transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n begin(fields: AssetTransferComposeFields): void\n /**\n * Begin a transaction group with an asset freeze transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n begin(fields: AssetFreezeComposeFields): void\n /**\n * Begin a transaction group with an application call transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n begin(fields: ApplicationCallComposeFields): void\n /**\n * Begin a transaction group with a new transaction with the specified fields\n * @param fields Specifies the type, and any transaction fields which should differ from their defaults\n */\n begin(fields: AnyTransactionComposeFields): void\n /**\n * Begin a transaction group with a new transaction from the specified itxn params object\n * @param fields\n */\n begin(fields: ComposeItxnParams): void\n /**\n * Begin a transaction group with a typed application call transaction.\n * @param method The ABI method to call\n * @param fields Specifies any transaction fields which should differ from their defaults\n *\n * @deprecated This overload has been deprecated in favour of the single arg overload where method is specified as a property of the fields\n * object, or via an explicit generic param. (`itxnCompose.begin({ method: MyContract.prototype.myMethod, ... })` or\n * `itxnCompose.begin<typeof MyContract.prototype.myMethod>({ ... })`)\n */\n begin<TArgs extends DeliberateAny[]>(method: InstanceMethod<Contract, TArgs>, fields: TypedApplicationCallFields<TArgs>): void\n /**\n * Begin a transaction group with a typed application call transaction. The method can be specified by options.method, or\n * by explicitly defining the type of the generic parameter TMethod.\n * @param options Specifies any transaction fields which should differ from their defaults\n * @typeParam TMethod The type of an ARC4 method signature (eg. `typeof MyContract.prototype.myMethod`)\n */\n begin<TMethod>(options: AbiCallOptions<TMethod>): void\n\n /**\n * Continue a transaction group with a payment transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n next(fields: PaymentComposeFields): void\n /**\n * Continue a transaction group with a key registration transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n next(fields: KeyRegistrationComposeFields): void\n /**\n * Continue a transaction group with an asset config transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n next(fields: AssetConfigComposeFields): void\n /**\n * Continue a transaction group with an asset transfer transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n next(fields: AssetTransferComposeFields): void\n /**\n * Continue a transaction group with an asset freeze transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n next(fields: AssetFreezeComposeFields): void\n /**\n * Continue a transaction group with an application call transaction\n * @param fields Specifies any transaction fields which should differ from their defaults\n */\n next(fields: ApplicationCallComposeFields): void\n /**\n * Continue a transaction group with a new transaction with the specified fields\n * @param fields Specifies the type, and any transaction fields which should differ from their defaults\n */\n next(fields: AnyTransactionComposeFields): void\n /**\n * Continue a transaction group with a new transaction from the specified itxn params object\n * @param fields\n */\n next(fields: ComposeItxnParams): void\n /**\n * Continue a transaction group with a typed application call transaction.\n * @param method The ABI method to call\n * @param fields Specifies any transaction fields which should differ from their defaults\n *\n * @deprecated This overload has been deprecated in favour of the single arg overload where method is specified as a property of the fields\n * object, or via an explicit generic param. (`itxnCompose.next({ method: MyContract.prototype.myMethod, ... })` or\n * `itxnCompose.next<typeof MyContract.prototype.myMethod>({ ... })`)\n */\n next<TArgs extends DeliberateAny[]>(method: InstanceMethod<Contract, TArgs>, fields: TypedApplicationCallFields<TArgs>): void\n /**\n * Continue a transaction group with a typed application call transaction. The method can be specified by options.method, or\n * by explicitly defining the type of the generic parameter TMethod.\n * @param options Specifies any transaction fields which should differ from their defaults\n * @typeParam TMethod The type of an ARC4 method signature (eg. `typeof MyContract.prototype.myMethod`)\n */\n next<TMethod>(options: AbiCallOptions<TMethod>): void\n\n /**\n * Submit all transactions in the group\n *\n * @remarks `op.GITxn.lastLog(n)` (and other methods on the GITxn object) can be used to read fields from the most recently submitted\n * transaction group where `n` is a compile time constant representing the index of the transaction in the group.\n */\n submit(): void\n}\n\n/**\n * The itxnCompose helper can be used to build dynamically sized itxn groups which aren't supported by the stronger typed itxn paradigm. The\n * first transaction in a group must be 'staged' with `itxnCompose.begin` whilst all other transactions in the group should use `itxnCompose.next`.\n * When the group is complete it can be submitted using `itxnCompose.submit`.\n *\n * @remarks The itxn API offered by teal opcodes has some rough edges which are not fully abstracted over by this compose API, but it hoped that use\n * cases for it are limited and that most transaction groups can be composed with a static size relying on the atomic nature of the outer transaction\n * to ensure multiple smaller itxn groups are committed atomically.\n */\nexport const itxnCompose: ItxnCompose = NoImplementation.value()\n","/* THIS FILE IS GENERATED BY ~/scripts/generate-txn-types.ts - DO NOT MODIFY DIRECTLY */\nimport { OnCompleteAction } from './on-complete-action'\nimport { bytes, uint64 } from './primitives'\nimport { Account, Application, Asset } from './reference'\nimport { TransactionType } from './transactions'\nimport { NoImplementation } from './internal/errors'\n\nconst isGtxn = Symbol('isGtxn')\nexport namespace gtxn {\n /**\n * A group transaction of type 'pay'\n */\n export interface PaymentTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.Payment\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * 32 byte address\n */\n readonly receiver: Account\n /**\n * microalgos\n */\n readonly amount: uint64\n /**\n * 32 byte address\n */\n readonly closeRemainderTo: Account\n }\n /**\n * A group transaction of type 'keyreg'\n */\n export interface KeyRegistrationTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.KeyRegistration\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * 32 byte address\n */\n readonly voteKey: bytes<32>\n /**\n * 32 byte address\n */\n readonly selectionKey: bytes<32>\n /**\n * The first round that the participation key is valid.\n */\n readonly voteFirst: uint64\n /**\n * The last round that the participation key is valid.\n */\n readonly voteLast: uint64\n /**\n * Dilution for the 2-level participation key\n */\n readonly voteKeyDilution: uint64\n /**\n * Marks an account nonparticipating for rewards\n */\n readonly nonparticipation: boolean\n /**\n * 64 byte state proof public key\n */\n readonly stateProofKey: bytes<64>\n }\n /**\n * A group transaction of type 'acfg'\n */\n export interface AssetConfigTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetConfig\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID in asset config transaction\n */\n readonly configAsset: Asset\n /**\n * The asset created by this transaction\n */\n readonly createdAsset: Asset\n /**\n * Total number of units of this asset created\n */\n readonly total: uint64\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n readonly decimals: uint64\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n readonly defaultFrozen: boolean\n /**\n * Unit name of the asset\n */\n readonly unitName: bytes\n /**\n * The asset name\n */\n readonly assetName: bytes\n /**\n * URL\n */\n readonly url: bytes\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n readonly metadataHash: bytes<32>\n /**\n * 32 byte address\n */\n readonly manager: Account\n /**\n * 32 byte address\n */\n readonly reserve: Account\n /**\n * 32 byte address\n */\n readonly freeze: Account\n /**\n * 32 byte address\n */\n readonly clawback: Account\n }\n /**\n * A group transaction of type 'axfer'\n */\n export interface AssetTransferTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetTransfer\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID\n */\n readonly xferAsset: Asset\n /**\n * value in Asset's units\n */\n readonly assetAmount: uint64\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n readonly assetSender: Account\n /**\n * 32 byte address\n */\n readonly assetReceiver: Account\n /**\n * 32 byte address\n */\n readonly assetCloseTo: Account\n }\n /**\n * A group transaction of type 'afrz'\n */\n export interface AssetFreezeTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.AssetFreeze\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * Asset ID being frozen or un-frozen\n */\n readonly freezeAsset: Asset\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n readonly freezeAccount: Account\n /**\n * The new frozen value\n */\n readonly frozen: boolean\n }\n /**\n * A group transaction of type 'appl'\n */\n export interface ApplicationCallTxn {\n /** @hidden */\n [isGtxn]?: true\n /**\n * 32 byte address\n */\n readonly sender: Account\n /**\n * microalgos\n */\n readonly fee: uint64\n /**\n * round number\n */\n readonly firstValid: uint64\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n /**\n * round number\n */\n readonly lastValid: uint64\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n /**\n * 32 byte lease value\n */\n readonly lease: bytes<32>\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n /**\n * Transaction type\n */\n readonly type: TransactionType.ApplicationCall\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes<32>\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n /**\n * ApplicationID from ApplicationCall transaction\n */\n readonly appId: Application\n /**\n * ApplicationCall transaction on completion action\n */\n readonly onCompletion: OnCompleteAction\n /**\n * Number of ApplicationArgs\n */\n readonly numAppArgs: uint64\n /**\n * Number of ApplicationArgs\n */\n readonly numAccounts: uint64\n /**\n * The first page of the Approval program\n */\n readonly approvalProgram: bytes\n /**\n * The first page of the Clear State program\n */\n readonly clearStateProgram: bytes\n /**\n * Number of Assets\n */\n readonly numAssets: uint64\n /**\n * Number of Applications\n */\n readonly numApps: uint64\n /**\n * Number of global state integers this application makes use of.\n */\n readonly globalNumUint: uint64\n /**\n * Number of global state byteslices this application makes use of.\n */\n readonly globalNumBytes: uint64\n /**\n * Number of local state integers this application makes use of.\n */\n readonly localNumUint: uint64\n /**\n * Number of local state byteslices this application makes use of.\n */\n readonly localNumBytes: uint64\n /**\n * Number of additional pages for each of the application's approval and clear state program\n */\n readonly extraProgramPages: uint64\n /**\n * The last message emitted. Empty bytes if none were emitted. App mode only\n */\n readonly lastLog: bytes\n /**\n * Read application logs\n * @param index Index of the log to get\n */\n logs(index: uint64): bytes\n /**\n * Number of Approval Program pages\n */\n readonly numApprovalProgramPages: uint64\n /**\n * All approval program pages\n * @param index Index of the page to get\n */\n approvalProgramPages(index: uint64): bytes\n /**\n * Number of Clear State Program pages\n */\n readonly numClearStateProgramPages: uint64\n /**\n * All clear state program pages\n * @param index Index of the page to get\n */\n clearStateProgramPages(index: uint64): bytes\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * @param index Index of the arg to get\n */\n appArgs(index: uint64): bytes\n /**\n * Accounts listed in the ApplicationCall transaction\n * @param index Index of the account to get\n */\n accounts(index: uint64): Account\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * @param index Index of the asset to get\n */\n assets(index: uint64): Asset\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * @param index Index of the application to get\n */\n apps(index: uint64): Application\n /**\n * The id of the created application\n */\n readonly createdApp: Application\n /**\n * Number of logs\n */\n readonly numLogs: uint64\n /**\n * Application version for which the txn must reject\n */\n readonly rejectVersion: uint64\n }\n /**\n * A group transaction of any type\n */\n export type Transaction = PaymentTxn | KeyRegistrationTxn | AssetConfigTxn | AssetTransferTxn | AssetFreezeTxn | ApplicationCallTxn\n /**\n * Get the nth transaction in the group without verifying its type\n * @param n The index of the txn in the group\n */\n export function Transaction(n: uint64): Transaction {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'pay'\n * @param n The index of the txn in the group\n */\n export function PaymentTxn(n: uint64): PaymentTxn {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'keyreg'\n * @param n The index of the txn in the group\n */\n export function KeyRegistrationTxn(n: uint64): KeyRegistrationTxn {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'acfg'\n * @param n The index of the txn in the group\n */\n export function AssetConfigTxn(n: uint64): AssetConfigTxn {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'axfer'\n * @param n The index of the txn in the group\n */\n export function AssetTransferTxn(n: uint64): AssetTransferTxn {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'afrz'\n * @param n The index of the txn in the group\n */\n export function AssetFreezeTxn(n: uint64): AssetFreezeTxn {\n throw new NoImplementation()\n }\n /**\n * Get the nth transaction in the group\n * Verifies the txn type is 'appl'\n * @param n The index of the txn in the group\n */\n export function ApplicationCallTxn(n: uint64): ApplicationCallTxn {\n throw new NoImplementation()\n }\n}\n","/**\n * The different transaction types available in a transaction\n */\nexport enum TransactionType {\n /**\n * A Payment transaction\n */\n Payment = 1,\n /**\n * A Key Registration transaction\n */\n KeyRegistration = 2,\n /**\n * An Asset Config transaction\n */\n AssetConfig = 3,\n /**\n * An Asset Transfer transaction\n */\n AssetTransfer = 4,\n /**\n * An Asset Freeze transaction\n */\n AssetFreeze = 5,\n /**\n * An Application Call transaction\n */\n ApplicationCall = 6,\n}\n","import { ConstructorFor } from './internal/typescript-helpers'\nimport { uint64 } from './primitives'\n\n/**\n * Base class for Algorand TypeScript Logic Signatures (also known as Smart Signatures)\n */\nexport abstract class LogicSig {\n /**\n * The logic signature program logic\n */\n abstract program(): boolean | uint64\n}\n\n/**\n * Alias for a numeric range specification.\n */\ntype NumberRange = {\n /**\n * The start point of the range (inclusive)\n */\n from: number\n /**\n * The end point of the range (inclusive)\n */\n to: number\n}\n\n/**\n * Defines optional configuration for a logic signature\n */\ntype LogicSigOptions = {\n /**\n * Determines which AVM version to use, this affects what operations are supported.\n * Defaults to value provided on command line (which defaults to current mainnet version)\n */\n avmVersion?: 10 | 11 | 12 | 13\n /**\n * Override the name of the logic signature when generating build artifacts.\n * Defaults to the class name\n */\n name?: string\n /**\n * Allows you to mark a slot ID or range of slot IDs as \"off limits\" to Puya.\n * These slot ID(s) will never be written to or otherwise manipulating by the compiler itself.\n * This is particularly useful in combination with `op.gload_bytes` / `op.gload_uint64`\n * which lets a contract in a group transaction read from the scratch slots of another contract\n * that occurs earlier in the transaction group.\n */\n scratchSlots?: Array<number | NumberRange>\n}\n\n/**\n * The logicsig decorator can be used to specify additional configuration options for a logic signature\n * @param options An object containing the configuration options\n */\nexport function logicsig(options: LogicSigOptions) {\n return <T extends ConstructorFor<LogicSig>>(logicSig: T) => logicSig\n}\n","import { NoImplementation } from './internal/errors'\n\n/**\n * Declare a template variable which can be replaced at compile time with an environment specific value.\n *\n * The final variable name will be `prefix + variableName`\n * @param variableName The key used to identify the variable.\n * @param prefix The prefix to apply the variable name (Defaults to 'TMPL_')\n */\nexport function TemplateVar<T>(variableName: string, prefix = 'TMPL_'): T {\n throw new NoImplementation()\n}\n","import { BaseContract } from './base-contract'\nimport { NoImplementation } from './internal/errors'\nimport { ConstructorFor, DeliberateAny } from './internal/typescript-helpers'\nimport { LogicSig } from './logic-sig'\nimport { bytes, uint64 } from './primitives'\nimport { Account } from './reference'\n\n/**\n * Provides compiled programs and state allocation values for a Contract. Created by calling `compile(ExampleContractType)`\n */\nexport type CompiledContract = {\n /**\n * Approval program pages for a contract, after template variables have been replaced and compiled to AVM bytecode\n */\n readonly approvalProgram: readonly [bytes, bytes]\n /**\n * Clear state program pages for a contract, after template variables have been replaced and compiled to AVM bytecode\n */\n readonly clearStateProgram: readonly [bytes, bytes]\n /**\n * By default, provides extra program pages required based on approval and clear state program size, can be overridden when calling `compile(ExampleContractType, { extraProgramPages: ... })`\n */\n readonly extraProgramPages: uint64\n /**\n * By default, provides global num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalUints: ... })`\n */\n readonly globalUints: uint64\n /**\n * By default, provides global num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalBytes: ... })`\n */\n readonly globalBytes: uint64\n /**\n * By default, provides local num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localUints: ... })`\n */\n readonly localUints: uint64\n /**\n * By default, provides local num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localBytes: ... })`\n */\n readonly localBytes: uint64\n}\n\n/**\n * Provides account for a Logic Signature. Created by calling `compile(LogicSigType)`\n */\nexport type CompiledLogicSig = {\n /**\n * Address of a logic sig program, after template variables have been replaced and compiled to AVM bytecode\n */\n readonly account: Account\n}\n\n/**\n * Options for compiling a contract\n */\nexport type CompileContractOptions = {\n /**\n * Number of extra program pages, defaults to minimum required for contract\n */\n readonly extraProgramPages?: uint64\n /**\n * Number of global uint64s, defaults to value defined for contract\n */\n readonly globalUints?: uint64\n /**\n * Number of global bytes, defaults to value defined for contract\n */\n readonly globalBytes?: uint64\n /**\n * Number of local uint64s, defaults to value defined for contract\n */\n readonly localUints?: uint64\n /**\n * Number of local bytes, defaults to value defined for contract\n */\n readonly localBytes?: uint64\n /**\n * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant\n * and match the type of the template var declaration\n */\n readonly templateVars?: Record<string, DeliberateAny>\n /**\n * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_)\n */\n readonly templateVarsPrefix?: string\n}\n\n/**\n * Options for compiling a logic signature\n */\nexport type CompileLogicSigOptions = {\n /**\n * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant\n * and match the type of the template var declaration\n */\n templateVars?: Record<string, DeliberateAny>\n /**\n * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_)\n */\n templateVarsPrefix?: string\n}\n\n/**\n * Compile a contract and return the resulting byte code for approval and clear state programs.\n * @param contract The contract class to compile\n * @param options Options for compiling the contract\n */\nexport function compile(contract: ConstructorFor<BaseContract>, options?: CompileContractOptions): CompiledContract\n/**\n * Compile a logic signature and return an account ready for signing transactions.\n * @param logicSig The logic sig class to compile\n * @param options Options for compiling the logic sig\n */\nexport function compile(logicSig: ConstructorFor<LogicSig>, options?: CompileLogicSigOptions): CompiledLogicSig\nexport function compile(artefact: ConstructorFor<BaseContract> | ConstructorFor<LogicSig>): CompiledLogicSig | CompiledContract {\n throw new NoImplementation()\n}\n","import { NoImplementation } from './internal/errors'\nimport { uint64, Uint64Compat } from './primitives'\n\n/**\n * An in memory mutable array which is passed by reference\n */\nexport class ReferenceArray<TItem> {\n /**\n * Create a new ReferenceArray with the specified items\n * @param items The initial items for the array\n */\n constructor(...items: TItem[]) {}\n\n /**\n * Returns the current length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n throw new NoImplementation()\n }\n\n /**\n * @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new ReferenceArray with all items from this array\n */\n slice(): ReferenceArray<TItem>\n /**\n * @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new ReferenceArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n */\n slice(end: Uint64Compat): ReferenceArray<TItem>\n /**\n * @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new ReferenceArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n */\n slice(start: Uint64Compat, end: Uint64Compat): ReferenceArray<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): ReferenceArray<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): IterableIterator<readonly [uint64, TItem]> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n throw new NoImplementation()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n\n /**\n * Push a number of items into this array\n * @param items The items to be added to this array\n */\n push(...items: TItem[]): void {\n throw new NoImplementation()\n }\n\n /**\n * Pop a single item from this array\n */\n pop(): TItem {\n throw new NoImplementation()\n }\n}\n","import { NoImplementation } from './internal/errors'\nimport { DeliberateAny } from './internal/typescript-helpers'\n\n/**\n * Emit an arc28 event log using either an ARC4Struct type or a named object type.\n * Object types must have an ARC4 equivalent type.\n *\n * Anonymous types cannot be used as the type name is used to determine the event prefix\n * @param event An ARC4Struct instance, or a plain object with a named type\n *\n * @example\n * class Demo extends Struct<{ a: Uint64 }> {}\n * emit(new Demo({ a: new Uint64(123) }))\n *\n * @example\n * type Demo = { a: uint64 }\n * emit<Demo>({a: 123})\n * // or\n * const d: Demo = { a: 123 }\n * emit(d)\n */\nexport function emit<TEvent extends Record<string, DeliberateAny>>(event: TEvent): void\n/**\n * Emit an arc28 event log using an explicit name and inferred property/field types.\n * Property types must be ARC4 or have an ARC4 equivalent type.\n * @param eventName The name of the event (must be a compile time constant)\n * @param eventProps A set of event properties (order is significant)\n *\n * @example\n * emit(\"Demo\", new Uint64(123))\n *\n * @example\n * const a: uint64 = 123\n * emit(\"Demo\", a)\n */\nexport function emit<TProps extends [...DeliberateAny[]]>(eventName: string, ...eventProps: TProps): void\nexport function emit<T>(event: T | string, ...eventProps: unknown[]): void {\n throw new NoImplementation()\n}\n","/**\n * The possible on complete actions a method can handle, represented as a string\n */\nexport type OnCompleteActionStr = 'NoOp' | 'OptIn' | 'ClearState' | 'CloseOut' | 'UpdateApplication' | 'DeleteApplication'\n\n/**\n * The possible on complete actions a method can handle, represented as an integer\n */\nexport enum OnCompleteAction {\n /**\n * Do nothing after the transaction has completed\n */\n NoOp = 0,\n /**\n * Opt the calling user into the contract\n */\n OptIn = 1,\n /**\n * Close the calling user out of the contract\n */\n CloseOut = 2,\n /**\n * Run the clear state program and forcibly close the user out of the contract\n */\n ClearState = 3,\n /**\n * Replace the application's approval and clear state programs with the bytes from this transaction\n */\n UpdateApplication = 4,\n /**\n * Delete the application\n */\n DeleteApplication = 5,\n}\n","import { NoImplementation } from './internal/errors'\nimport { uint64, Uint64Compat } from './primitives'\n\n/**\n * A fixed sized array\n * @typeParam TItem The type of a single item in the array\n * @typeParam TLength The fixed length of the array\n */\nexport class FixedArray<TItem, TLength extends number> implements ConcatArray<TItem> {\n /**\n * Create a new FixedArray instance\n */\n constructor()\n /**\n * Create a new FixedArray instance with the specified items\n * @param items The initial items for the array\n */\n constructor(...items: TItem[] & { length: TLength })\n constructor(...items: TItem[] & { length: TLength }) {}\n\n /**\n * Returns a new array containing all items from _this_ array, and _other_ array\n * @param items Another array to concat with this one\n */\n concat(...items: (TItem | ConcatArray<TItem>)[]): TItem[] {\n throw new NoImplementation()\n }\n\n /**\n * Returns the statically declared length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n throw new NoImplementation()\n }\n\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new Dynamic array with all items from this array\n */\n slice(): Array<TItem>\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new DynamicArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n */\n slice(end: Uint64Compat): Array<TItem>\n /** @deprecated Array slicing is not yet supported in Algorand TypeScript\n * Create a new DynamicArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n */\n slice(start: Uint64Compat, end: Uint64Compat): Array<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): Array<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): ArrayIterator<readonly [uint64, TItem]> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n throw new NoImplementation()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n\n /**\n * Creates a string by concatenating all the items in the array delimited by the\n * specified separator (or ',' by default)\n * @param separator\n * @deprecated Join is not supported in Algorand TypeScript\n */\n join(separator?: string): string {\n throw new NoImplementation()\n }\n}\n"],"names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;;;;"}
package/itxn-compose.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Contract, TypedApplicationCallFields } from './arc4';
1
+ import { AbiCallOptions, Contract, TypedApplicationCallFields } from './arc4';
2
2
  import { DeliberateAny, InstanceMethod } from './internal/typescript-helpers';
3
3
  import { itxn } from './itxn';
4
4
  import { TransactionType } from './transactions';
@@ -25,24 +25,135 @@ export interface AnyTransactionComposeFields extends itxn.PaymentFields, itxn.Ke
25
25
  }
26
26
  export type ComposeItxnParams = itxn.PaymentItxnParams | itxn.KeyRegistrationItxnParams | itxn.AssetConfigItxnParams | itxn.AssetTransferItxnParams | itxn.AssetFreezeItxnParams | itxn.ApplicationCallItxnParams;
27
27
  export type ItxnCompose = {
28
+ /**
29
+ * Begin a transaction group with a payment transaction
30
+ * @param fields Specifies any transaction fields which should differ from their defaults
31
+ */
28
32
  begin(fields: PaymentComposeFields): void;
33
+ /**
34
+ * Begin a transaction group with a key registration transaction
35
+ * @param fields Specifies any transaction fields which should differ from their defaults
36
+ */
29
37
  begin(fields: KeyRegistrationComposeFields): void;
38
+ /**
39
+ * Begin a transaction group with an asset config transaction
40
+ * @param fields Specifies any transaction fields which should differ from their defaults
41
+ */
30
42
  begin(fields: AssetConfigComposeFields): void;
43
+ /**
44
+ * Begin a transaction group with an asset transfer transaction
45
+ * @param fields Specifies any transaction fields which should differ from their defaults
46
+ */
31
47
  begin(fields: AssetTransferComposeFields): void;
48
+ /**
49
+ * Begin a transaction group with an asset freeze transaction
50
+ * @param fields Specifies any transaction fields which should differ from their defaults
51
+ */
32
52
  begin(fields: AssetFreezeComposeFields): void;
53
+ /**
54
+ * Begin a transaction group with an application call transaction
55
+ * @param fields Specifies any transaction fields which should differ from their defaults
56
+ */
33
57
  begin(fields: ApplicationCallComposeFields): void;
58
+ /**
59
+ * Begin a transaction group with a new transaction with the specified fields
60
+ * @param fields Specifies the type, and any transaction fields which should differ from their defaults
61
+ */
34
62
  begin(fields: AnyTransactionComposeFields): void;
63
+ /**
64
+ * Begin a transaction group with a new transaction from the specified itxn params object
65
+ * @param fields
66
+ */
35
67
  begin(fields: ComposeItxnParams): void;
68
+ /**
69
+ * Begin a transaction group with a typed application call transaction.
70
+ * @param method The ABI method to call
71
+ * @param fields Specifies any transaction fields which should differ from their defaults
72
+ *
73
+ * @deprecated This overload has been deprecated in favour of the single arg overload where method is specified as a property of the fields
74
+ * object, or via an explicit generic param. (`itxnCompose.begin({ method: MyContract.prototype.myMethod, ... })` or
75
+ * `itxnCompose.begin<typeof MyContract.prototype.myMethod>({ ... })`)
76
+ */
36
77
  begin<TArgs extends DeliberateAny[]>(method: InstanceMethod<Contract, TArgs>, fields: TypedApplicationCallFields<TArgs>): void;
78
+ /**
79
+ * Begin a transaction group with a typed application call transaction. The method can be specified by options.method, or
80
+ * by explicitly defining the type of the generic parameter TMethod.
81
+ * @param options Specifies any transaction fields which should differ from their defaults
82
+ * @typeParam TMethod The type of an ARC4 method signature (eg. `typeof MyContract.prototype.myMethod`)
83
+ */
84
+ begin<TMethod>(options: AbiCallOptions<TMethod>): void;
85
+ /**
86
+ * Continue a transaction group with a payment transaction
87
+ * @param fields Specifies any transaction fields which should differ from their defaults
88
+ */
37
89
  next(fields: PaymentComposeFields): void;
90
+ /**
91
+ * Continue a transaction group with a key registration transaction
92
+ * @param fields Specifies any transaction fields which should differ from their defaults
93
+ */
38
94
  next(fields: KeyRegistrationComposeFields): void;
95
+ /**
96
+ * Continue a transaction group with an asset config transaction
97
+ * @param fields Specifies any transaction fields which should differ from their defaults
98
+ */
39
99
  next(fields: AssetConfigComposeFields): void;
100
+ /**
101
+ * Continue a transaction group with an asset transfer transaction
102
+ * @param fields Specifies any transaction fields which should differ from their defaults
103
+ */
40
104
  next(fields: AssetTransferComposeFields): void;
105
+ /**
106
+ * Continue a transaction group with an asset freeze transaction
107
+ * @param fields Specifies any transaction fields which should differ from their defaults
108
+ */
41
109
  next(fields: AssetFreezeComposeFields): void;
110
+ /**
111
+ * Continue a transaction group with an application call transaction
112
+ * @param fields Specifies any transaction fields which should differ from their defaults
113
+ */
42
114
  next(fields: ApplicationCallComposeFields): void;
115
+ /**
116
+ * Continue a transaction group with a new transaction with the specified fields
117
+ * @param fields Specifies the type, and any transaction fields which should differ from their defaults
118
+ */
43
119
  next(fields: AnyTransactionComposeFields): void;
120
+ /**
121
+ * Continue a transaction group with a new transaction from the specified itxn params object
122
+ * @param fields
123
+ */
44
124
  next(fields: ComposeItxnParams): void;
125
+ /**
126
+ * Continue a transaction group with a typed application call transaction.
127
+ * @param method The ABI method to call
128
+ * @param fields Specifies any transaction fields which should differ from their defaults
129
+ *
130
+ * @deprecated This overload has been deprecated in favour of the single arg overload where method is specified as a property of the fields
131
+ * object, or via an explicit generic param. (`itxnCompose.next({ method: MyContract.prototype.myMethod, ... })` or
132
+ * `itxnCompose.next<typeof MyContract.prototype.myMethod>({ ... })`)
133
+ */
45
134
  next<TArgs extends DeliberateAny[]>(method: InstanceMethod<Contract, TArgs>, fields: TypedApplicationCallFields<TArgs>): void;
135
+ /**
136
+ * Continue a transaction group with a typed application call transaction. The method can be specified by options.method, or
137
+ * by explicitly defining the type of the generic parameter TMethod.
138
+ * @param options Specifies any transaction fields which should differ from their defaults
139
+ * @typeParam TMethod The type of an ARC4 method signature (eg. `typeof MyContract.prototype.myMethod`)
140
+ */
141
+ next<TMethod>(options: AbiCallOptions<TMethod>): void;
142
+ /**
143
+ * Submit all transactions in the group
144
+ *
145
+ * @remarks `op.GITxn.lastLog(n)` (and other methods on the GITxn object) can be used to read fields from the most recently submitted
146
+ * transaction group where `n` is a compile time constant representing the index of the transaction in the group.
147
+ */
46
148
  submit(): void;
47
149
  };
150
+ /**
151
+ * The itxnCompose helper can be used to build dynamically sized itxn groups which aren't supported by the stronger typed itxn paradigm. The
152
+ * first transaction in a group must be 'staged' with `itxnCompose.begin` whilst all other transactions in the group should use `itxnCompose.next`.
153
+ * When the group is complete it can be submitted using `itxnCompose.submit`.
154
+ *
155
+ * @remarks The itxn API offered by teal opcodes has some rough edges which are not fully abstracted over by this compose API, but it hoped that use
156
+ * cases for it are limited and that most transaction groups can be composed with a static size relying on the atomic nature of the outer transaction
157
+ * to ensure multiple smaller itxn groups are committed atomically.
158
+ */
48
159
  export declare const itxnCompose: ItxnCompose;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "**"
5
5
  ],
6
6
  "name": "@algorandfoundation/algorand-typescript",
7
- "version": "1.0.2-beta.2",
7
+ "version": "1.1.0-beta.2",
8
8
  "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.",
9
9
  "private": false,
10
10
  "overrides": {