@algorandfoundation/algorand-typescript 1.0.0-beta.15 → 1.0.0-beta.17
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/arc-28.d.ts +1 -1
- package/arc4/index.d.ts +15 -8
- package/arc4/index.mjs +2 -4
- package/arc4/index.mjs.map +1 -1
- package/base-contract.d.ts +5 -11
- package/compiled.d.ts +1 -1
- package/errors-D124-zqo.js +12 -0
- package/errors-D124-zqo.js.map +1 -0
- package/index-Bb3pKUmT.js +303 -0
- package/index-Bb3pKUmT.js.map +1 -0
- package/index.d.ts +0 -1
- package/index.mjs +42 -25
- package/index.mjs.map +1 -1
- package/internal/errors.d.ts +7 -0
- package/logic-sig.d.ts +1 -1
- package/{op-D_PMX-ox.js → op-BKy1vBsJ.js} +3 -71
- package/op-BKy1vBsJ.js.map +1 -0
- package/op.d.ts +1 -1
- package/op.mjs +2 -1
- package/op.mjs.map +1 -1
- package/package.json +3 -2
- package/util.d.ts +7 -0
- package/execution-context.d.ts +0 -14
- package/impl/base-32.d.ts +0 -2
- package/impl/encoding-util.d.ts +0 -10
- package/impl/errors.d.ts +0 -36
- package/impl/name-of-type.d.ts +0 -1
- package/impl/primitives.d.ts +0 -81
- package/index-CvINAmG9.js +0 -874
- package/index-CvINAmG9.js.map +0 -1
- package/internal.d.ts +0 -5
- package/op-D_PMX-ox.js.map +0 -1
- /package/{typescript-helpers.d.ts → internal/typescript-helpers.d.ts} +0 -0
package/arc-28.d.ts
CHANGED
package/arc4/index.d.ts
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
import { BaseContract } from '../base-contract';
|
2
|
+
import { DeliberateAny } from '../internal/typescript-helpers';
|
2
3
|
import { bytes } from '../primitives';
|
3
|
-
import { DeliberateAny } from '../typescript-helpers';
|
4
4
|
export * from './encoded-types';
|
5
5
|
export declare class Contract extends BaseContract {
|
6
|
-
static isArc4: boolean;
|
7
6
|
approvalProgram(): boolean;
|
8
7
|
}
|
9
8
|
export type CreateOptions = 'allow' | 'disallow' | 'require';
|
10
9
|
export type OnCompleteActionStr = 'NoOp' | 'OptIn' | 'ClearState' | 'CloseOut' | 'UpdateApplication' | 'DeleteApplication';
|
11
10
|
export declare enum OnCompleteAction {
|
12
|
-
NoOp,
|
13
|
-
OptIn,
|
14
|
-
CloseOut,
|
15
|
-
ClearState,
|
16
|
-
UpdateApplication,
|
17
|
-
DeleteApplication
|
11
|
+
NoOp = 0,
|
12
|
+
OptIn = 1,
|
13
|
+
CloseOut = 2,
|
14
|
+
ClearState = 3,
|
15
|
+
UpdateApplication = 4,
|
16
|
+
DeleteApplication = 5
|
18
17
|
}
|
19
18
|
export type DefaultArgument<TContract extends Contract> = {
|
20
19
|
constant: string | boolean | number | bigint;
|
@@ -43,6 +42,10 @@ export type AbiMethodConfig<TContract extends Contract> = {
|
|
43
42
|
name?: string;
|
44
43
|
defaultArguments?: Record<string, DefaultArgument<TContract>>;
|
45
44
|
};
|
45
|
+
/**
|
46
|
+
* Declares the decorated method as an abimethod that is called when the first transaction arg matches the method selector
|
47
|
+
* @param config
|
48
|
+
*/
|
46
49
|
export declare function abimethod<TContract extends Contract>(config?: AbiMethodConfig<TContract>): <TArgs extends DeliberateAny[], TReturn>(target: (this: TContract, ...args: TArgs) => TReturn, ctx: ClassMethodDecoratorContext<TContract>) => (this: TContract, ...args: TArgs) => TReturn;
|
47
50
|
export type BareMethodConfig = {
|
48
51
|
/**
|
@@ -56,6 +59,10 @@ export type BareMethodConfig = {
|
|
56
59
|
*/
|
57
60
|
onCreate?: CreateOptions;
|
58
61
|
};
|
62
|
+
/**
|
63
|
+
* Declares the decorated method as a baremethod that can only be called with no transaction args
|
64
|
+
* @param config
|
65
|
+
*/
|
59
66
|
export declare function baremethod<TContract extends Contract>(config?: BareMethodConfig): <TArgs extends DeliberateAny[], TReturn>(target: (this: TContract, ...args: TArgs) => TReturn, ctx: ClassMethodDecoratorContext<TContract>) => (this: TContract, ...args: TArgs) => TReturn;
|
60
67
|
/**
|
61
68
|
* Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first
|
package/arc4/index.mjs
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
export { A as ARC4Encoded,
|
2
|
-
import '../
|
3
|
-
import 'node:buffer';
|
4
|
-
import 'node:util';
|
1
|
+
export { A as ARC4Encoded, p as Address, n as Bool, d as Byte, C as Contract, D as DynamicArray, r as DynamicBytes, O as OnCompleteAction, o as StaticArray, s as StaticBytes, S as Str, q as Struct, T as Tuple, l as UFixedNxM, U as UintN, j as UintN128, f as UintN16, k as UintN256, g as UintN32, h as UintN64, e as UintN8, a as abimethod, b as baremethod, u as decodeArc4, v as encodeArc4, t as interpretAsArc4, m as methodSelector } from '../index-Bb3pKUmT.js';
|
2
|
+
import '../errors-D124-zqo.js';
|
5
3
|
//# sourceMappingURL=index.mjs.map
|
package/arc4/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/base-contract.d.ts
CHANGED
@@ -1,14 +1,10 @@
|
|
1
|
+
import { ConstructorFor } from './internal/typescript-helpers';
|
1
2
|
import { uint64 } from './primitives';
|
2
|
-
import {
|
3
|
+
import { NumberRange } from './util';
|
3
4
|
export declare abstract class BaseContract {
|
4
|
-
static isArc4: boolean;
|
5
5
|
abstract approvalProgram(): boolean | uint64;
|
6
6
|
clearStateProgram(): boolean | uint64;
|
7
7
|
}
|
8
|
-
type NumberRange = {
|
9
|
-
from: number;
|
10
|
-
to: number;
|
11
|
-
};
|
12
8
|
/**
|
13
9
|
* Options class to manually define the total amount of global and local state contract will use.
|
14
10
|
*
|
@@ -17,13 +13,13 @@ type NumberRange = {
|
|
17
13
|
* to reserve additional state storage for future contract updates, since the Algorand protocol
|
18
14
|
* doesn't allow increasing them after creation.
|
19
15
|
*/
|
20
|
-
type StateTotals = {
|
16
|
+
export type StateTotals = {
|
21
17
|
globalUints?: number;
|
22
18
|
globalBytes?: number;
|
23
19
|
localUints?: number;
|
24
20
|
localBytes?: number;
|
25
21
|
};
|
26
|
-
type ContractOptions = {
|
22
|
+
export type ContractOptions = {
|
27
23
|
/**
|
28
24
|
* Determines which AVM version to use, this affects what operations are supported.
|
29
25
|
* Defaults to value provided supplied on command line (which defaults to current mainnet version)
|
@@ -66,6 +62,4 @@ type ContractOptions = {
|
|
66
62
|
* The contract decorator can be used to specify additional configuration options for a smart contract
|
67
63
|
* @param options An object containing the configuration options
|
68
64
|
*/
|
69
|
-
export declare
|
70
|
-
export declare function contract(options: ContractOptions): <T extends ConstructorFor<BaseContract>>(contract: T, ctx: ClassDecoratorContext) => T;
|
71
|
-
export {};
|
65
|
+
export declare function contract(options: ContractOptions): <T extends ConstructorFor<BaseContract>>(contract: T, ctx: ClassDecoratorContext) => never;
|
package/compiled.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { BaseContract } from './base-contract';
|
2
|
+
import { ConstructorFor, DeliberateAny } from './internal/typescript-helpers';
|
2
3
|
import { LogicSig } from './logic-sig';
|
3
4
|
import { bytes, uint64 } from './primitives';
|
4
5
|
import { Account } from './reference';
|
5
|
-
import { ConstructorFor, DeliberateAny } from './typescript-helpers';
|
6
6
|
/**
|
7
7
|
* Provides compiled programs and state allocation values for a Contract. Created by calling `compile(ExampleContractType)`
|
8
8
|
*/
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* This error can be used in stub implementations that are expected to be overridden
|
3
|
+
* by the testing framework
|
4
|
+
*/
|
5
|
+
class NoImplementation extends Error {
|
6
|
+
constructor() {
|
7
|
+
super('This method is intentionally not implemented');
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
export { NoImplementation as N };
|
12
|
+
//# sourceMappingURL=errors-D124-zqo.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"errors-D124-zqo.js","sources":["../src/internal/errors.ts"],"sourcesContent":["/**\n * This error can be used in stub implementations that are expected to be overridden\n * by the testing framework\n */\nexport class NoImplementation extends Error {\n constructor() {\n super('This method is intentionally not implemented')\n }\n}\n"],"names":[],"mappings":"AAAA;;;AAGG;AACG,MAAO,gBAAiB,SAAQ,KAAK,CAAA;AACzC,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,8CAA8C,CAAC;;AAExD;;;;"}
|
@@ -0,0 +1,303 @@
|
|
1
|
+
import { N as NoImplementation } from './errors-D124-zqo.js';
|
2
|
+
|
3
|
+
class BaseContract {
|
4
|
+
clearStateProgram() {
|
5
|
+
return true;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
/**
|
9
|
+
* The contract decorator can be used to specify additional configuration options for a smart contract
|
10
|
+
* @param options An object containing the configuration options
|
11
|
+
*/
|
12
|
+
function contract(options) {
|
13
|
+
return (contract, ctx) => {
|
14
|
+
throw new NoImplementation();
|
15
|
+
};
|
16
|
+
}
|
17
|
+
|
18
|
+
const TypeProperty = Symbol('ARC4Type');
|
19
|
+
class ARC4Encoded {
|
20
|
+
get bytes() {
|
21
|
+
throw new NoImplementation();
|
22
|
+
}
|
23
|
+
}
|
24
|
+
class Str extends ARC4Encoded {
|
25
|
+
[TypeProperty];
|
26
|
+
#value;
|
27
|
+
constructor(s) {
|
28
|
+
super();
|
29
|
+
this.#value = s ?? '';
|
30
|
+
}
|
31
|
+
get native() {
|
32
|
+
return this.#value;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
class UintN extends ARC4Encoded {
|
36
|
+
[TypeProperty];
|
37
|
+
constructor(v) {
|
38
|
+
super();
|
39
|
+
}
|
40
|
+
get native() {
|
41
|
+
throw new NoImplementation();
|
42
|
+
}
|
43
|
+
}
|
44
|
+
class Byte extends UintN {
|
45
|
+
}
|
46
|
+
class UintN8 extends UintN {
|
47
|
+
}
|
48
|
+
class UintN16 extends UintN {
|
49
|
+
}
|
50
|
+
class UintN32 extends UintN {
|
51
|
+
}
|
52
|
+
class UintN64 extends UintN {
|
53
|
+
}
|
54
|
+
class UintN128 extends UintN {
|
55
|
+
}
|
56
|
+
class UintN256 extends UintN {
|
57
|
+
}
|
58
|
+
class UFixedNxM extends ARC4Encoded {
|
59
|
+
[TypeProperty];
|
60
|
+
constructor(v) {
|
61
|
+
super();
|
62
|
+
}
|
63
|
+
get native() {
|
64
|
+
throw new NoImplementation();
|
65
|
+
}
|
66
|
+
}
|
67
|
+
class Bool extends ARC4Encoded {
|
68
|
+
[TypeProperty];
|
69
|
+
constructor(v) {
|
70
|
+
super();
|
71
|
+
}
|
72
|
+
get native() {
|
73
|
+
throw new NoImplementation();
|
74
|
+
}
|
75
|
+
}
|
76
|
+
class Arc4ReadonlyArray extends ARC4Encoded {
|
77
|
+
constructor() {
|
78
|
+
super();
|
79
|
+
}
|
80
|
+
/**
|
81
|
+
* Returns the current length of this array
|
82
|
+
*/
|
83
|
+
get length() {
|
84
|
+
throw new NoImplementation();
|
85
|
+
}
|
86
|
+
/**
|
87
|
+
* Returns the item at the given index.
|
88
|
+
* Negative indexes are taken from the end.
|
89
|
+
* @param index The index of the item to retrieve
|
90
|
+
*/
|
91
|
+
at(index) {
|
92
|
+
throw new NoImplementation();
|
93
|
+
}
|
94
|
+
slice(start, end) {
|
95
|
+
throw new NoImplementation();
|
96
|
+
}
|
97
|
+
/**
|
98
|
+
* Returns an iterator for the items in this array
|
99
|
+
*/
|
100
|
+
[Symbol.iterator]() {
|
101
|
+
throw new NoImplementation();
|
102
|
+
}
|
103
|
+
/**
|
104
|
+
* Returns an iterator for a tuple of the indexes and items in this array
|
105
|
+
*/
|
106
|
+
entries() {
|
107
|
+
throw new NoImplementation();
|
108
|
+
}
|
109
|
+
/**
|
110
|
+
* Returns an iterator for the indexes in this array
|
111
|
+
*/
|
112
|
+
keys() {
|
113
|
+
throw new NoImplementation();
|
114
|
+
}
|
115
|
+
}
|
116
|
+
class StaticArray extends Arc4ReadonlyArray {
|
117
|
+
[TypeProperty];
|
118
|
+
constructor(...items) {
|
119
|
+
super();
|
120
|
+
}
|
121
|
+
copy() {
|
122
|
+
throw new NoImplementation();
|
123
|
+
}
|
124
|
+
}
|
125
|
+
class DynamicArray extends Arc4ReadonlyArray {
|
126
|
+
[TypeProperty];
|
127
|
+
constructor(...items) {
|
128
|
+
super();
|
129
|
+
}
|
130
|
+
/**
|
131
|
+
* Push a number of items into this array
|
132
|
+
* @param items The items to be added to this array
|
133
|
+
*/
|
134
|
+
push(...items) {
|
135
|
+
throw new NoImplementation();
|
136
|
+
}
|
137
|
+
/**
|
138
|
+
* Pop a single item from this array
|
139
|
+
*/
|
140
|
+
pop() {
|
141
|
+
throw new NoImplementation();
|
142
|
+
}
|
143
|
+
copy() {
|
144
|
+
throw new NoImplementation();
|
145
|
+
}
|
146
|
+
}
|
147
|
+
class Tuple extends ARC4Encoded {
|
148
|
+
[TypeProperty];
|
149
|
+
constructor(...items) {
|
150
|
+
super();
|
151
|
+
}
|
152
|
+
at(index) {
|
153
|
+
throw new NoImplementation();
|
154
|
+
}
|
155
|
+
get length() {
|
156
|
+
throw new NoImplementation();
|
157
|
+
}
|
158
|
+
get native() {
|
159
|
+
throw new NoImplementation();
|
160
|
+
}
|
161
|
+
}
|
162
|
+
class Address extends Arc4ReadonlyArray {
|
163
|
+
[TypeProperty];
|
164
|
+
constructor(value) {
|
165
|
+
super();
|
166
|
+
}
|
167
|
+
get native() {
|
168
|
+
throw new NoImplementation();
|
169
|
+
}
|
170
|
+
}
|
171
|
+
class StructBase extends ARC4Encoded {
|
172
|
+
[TypeProperty] = 'arc4.Struct';
|
173
|
+
}
|
174
|
+
class StructImpl extends StructBase {
|
175
|
+
constructor(initial) {
|
176
|
+
super();
|
177
|
+
for (const [prop, val] of Object.entries(initial)) {
|
178
|
+
Object.defineProperty(this, prop, {
|
179
|
+
value: val,
|
180
|
+
writable: true,
|
181
|
+
enumerable: true,
|
182
|
+
});
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
const Struct = StructImpl;
|
187
|
+
class DynamicBytes extends Arc4ReadonlyArray {
|
188
|
+
[TypeProperty];
|
189
|
+
constructor(value) {
|
190
|
+
super();
|
191
|
+
}
|
192
|
+
get native() {
|
193
|
+
throw new NoImplementation();
|
194
|
+
}
|
195
|
+
}
|
196
|
+
class StaticBytes extends Arc4ReadonlyArray {
|
197
|
+
[TypeProperty];
|
198
|
+
constructor(value) {
|
199
|
+
super();
|
200
|
+
}
|
201
|
+
get native() {
|
202
|
+
throw new NoImplementation();
|
203
|
+
}
|
204
|
+
}
|
205
|
+
/**
|
206
|
+
* Interpret the provided bytes as an ARC4 encoded type with no validation
|
207
|
+
* @param bytes An arc4 encoded bytes value
|
208
|
+
* @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed
|
209
|
+
*/
|
210
|
+
function interpretAsArc4(bytes, prefix = 'none') {
|
211
|
+
throw new NoImplementation();
|
212
|
+
}
|
213
|
+
/**
|
214
|
+
* Decode the provided bytes to a native Algorand TypeScript value
|
215
|
+
* @param bytes An arc4 encoded bytes value
|
216
|
+
* @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed
|
217
|
+
*/
|
218
|
+
function decodeArc4(bytes, prefix = 'none') {
|
219
|
+
throw new NoImplementation();
|
220
|
+
}
|
221
|
+
/**
|
222
|
+
* Encode the provided Algorand TypeScript value as ARC4 bytes
|
223
|
+
* @param value Any native Algorand TypeScript value with a supported ARC4 encoding
|
224
|
+
*/
|
225
|
+
function encodeArc4(value) {
|
226
|
+
throw new NoImplementation();
|
227
|
+
}
|
228
|
+
|
229
|
+
class Contract extends BaseContract {
|
230
|
+
approvalProgram() {
|
231
|
+
return true;
|
232
|
+
}
|
233
|
+
}
|
234
|
+
var OnCompleteAction;
|
235
|
+
(function (OnCompleteAction) {
|
236
|
+
OnCompleteAction[OnCompleteAction["NoOp"] = 0] = "NoOp";
|
237
|
+
OnCompleteAction[OnCompleteAction["OptIn"] = 1] = "OptIn";
|
238
|
+
OnCompleteAction[OnCompleteAction["CloseOut"] = 2] = "CloseOut";
|
239
|
+
OnCompleteAction[OnCompleteAction["ClearState"] = 3] = "ClearState";
|
240
|
+
OnCompleteAction[OnCompleteAction["UpdateApplication"] = 4] = "UpdateApplication";
|
241
|
+
OnCompleteAction[OnCompleteAction["DeleteApplication"] = 5] = "DeleteApplication";
|
242
|
+
})(OnCompleteAction || (OnCompleteAction = {}));
|
243
|
+
/**
|
244
|
+
* Declares the decorated method as an abimethod that is called when the first transaction arg matches the method selector
|
245
|
+
* @param config
|
246
|
+
*/
|
247
|
+
function abimethod(config) {
|
248
|
+
return function (target, ctx) {
|
249
|
+
throw new NoImplementation();
|
250
|
+
};
|
251
|
+
}
|
252
|
+
/**
|
253
|
+
* Declares the decorated method as a baremethod that can only be called with no transaction args
|
254
|
+
* @param config
|
255
|
+
*/
|
256
|
+
function baremethod(config) {
|
257
|
+
return function (target, ctx) {
|
258
|
+
throw new NoImplementation();
|
259
|
+
};
|
260
|
+
}
|
261
|
+
/**
|
262
|
+
* Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first
|
263
|
+
* 4 bytes of the SHA512/256 hash of the method signature.
|
264
|
+
* @param methodSignature An ARC4 method signature. Eg. `hello(string)string`. Must be a compile time constant.
|
265
|
+
* @returns The ARC4 method selector. Eg. `02BECE11`
|
266
|
+
*/
|
267
|
+
function methodSelector(methodSignature) {
|
268
|
+
throw new NoImplementation();
|
269
|
+
}
|
270
|
+
|
271
|
+
var index = /*#__PURE__*/Object.freeze({
|
272
|
+
__proto__: null,
|
273
|
+
ARC4Encoded: ARC4Encoded,
|
274
|
+
Address: Address,
|
275
|
+
Bool: Bool,
|
276
|
+
Byte: Byte,
|
277
|
+
Contract: Contract,
|
278
|
+
DynamicArray: DynamicArray,
|
279
|
+
DynamicBytes: DynamicBytes,
|
280
|
+
get OnCompleteAction () { return OnCompleteAction; },
|
281
|
+
StaticArray: StaticArray,
|
282
|
+
StaticBytes: StaticBytes,
|
283
|
+
Str: Str,
|
284
|
+
Struct: Struct,
|
285
|
+
Tuple: Tuple,
|
286
|
+
UFixedNxM: UFixedNxM,
|
287
|
+
UintN: UintN,
|
288
|
+
UintN128: UintN128,
|
289
|
+
UintN16: UintN16,
|
290
|
+
UintN256: UintN256,
|
291
|
+
UintN32: UintN32,
|
292
|
+
UintN64: UintN64,
|
293
|
+
UintN8: UintN8,
|
294
|
+
abimethod: abimethod,
|
295
|
+
baremethod: baremethod,
|
296
|
+
decodeArc4: decodeArc4,
|
297
|
+
encodeArc4: encodeArc4,
|
298
|
+
interpretAsArc4: interpretAsArc4,
|
299
|
+
methodSelector: methodSelector
|
300
|
+
});
|
301
|
+
|
302
|
+
export { ARC4Encoded as A, BaseContract as B, Contract as C, DynamicArray as D, OnCompleteAction as O, Str as S, Tuple as T, UintN as U, abimethod as a, baremethod as b, contract as c, Byte as d, UintN8 as e, UintN16 as f, UintN32 as g, UintN64 as h, index as i, UintN128 as j, UintN256 as k, UFixedNxM as l, methodSelector as m, Bool as n, StaticArray as o, Address as p, Struct as q, DynamicBytes as r, StaticBytes as s, interpretAsArc4 as t, decodeArc4 as u, encodeArc4 as v };
|
303
|
+
//# sourceMappingURL=index-Bb3pKUmT.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-Bb3pKUmT.js","sources":["../src/base-contract.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\nexport abstract class BaseContract {\n public abstract approvalProgram(): boolean | uint64\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\nexport type ContractOptions = {\n /**\n * Determines which AVM version to use, this affects what operations are supported.\n * Defaults to value provided supplied on command line (which defaults to current mainnet version)\n */\n avmVersion?: 10 | 11\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 { NoImplementation } from '../internal/errors'\nimport { biguint, BigUintCompat, bytes, BytesBacked, BytesCompat, StringCompat, uint64, Uint64Compat } from '../primitives'\nimport { Account } from '../reference'\n\ntype UintBitSize = 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64\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\nexport type BitSize = UintBitSize | BigUintBitSize\ntype NativeForArc4Int<N extends BitSize> = N extends UintBitSize ? uint64 : biguint\ntype CompatForArc4Int<N extends BitSize> = N extends UintBitSize ? Uint64Compat : BigUintCompat\n\nconst TypeProperty = Symbol('ARC4Type')\n\nexport abstract class ARC4Encoded implements BytesBacked {\n abstract [TypeProperty]?: string\n get bytes(): bytes {\n throw new NoImplementation()\n }\n}\n\nexport class Str extends ARC4Encoded {\n [TypeProperty]?: 'arc4.Str'\n #value: string\n constructor(s?: StringCompat) {\n super()\n this.#value = s ?? ''\n }\n get native(): string {\n return this.#value\n }\n}\nexport class UintN<N extends BitSize> extends ARC4Encoded {\n [TypeProperty]?: `arc4.UintN<${N}>`\n\n constructor(v?: CompatForArc4Int<N>) {\n super()\n }\n get native(): NativeForArc4Int<N> {\n throw new NoImplementation()\n }\n}\nexport class Byte extends UintN<8> {}\nexport class UintN8 extends UintN<8> {}\nexport class UintN16 extends UintN<16> {}\nexport class UintN32 extends UintN<32> {}\nexport class UintN64 extends UintN<64> {}\nexport class UintN128 extends UintN<128> {}\nexport class UintN256 extends UintN<256> {}\nexport class UFixedNxM<N extends BitSize, M extends number> extends ARC4Encoded {\n [TypeProperty]?: `arc4.UFixedNxM<${N}x${M}>`\n constructor(v: `${number}.${number}`) {\n super()\n }\n\n get native(): NativeForArc4Int<N> {\n throw new NoImplementation()\n }\n}\nexport class Bool extends ARC4Encoded {\n [TypeProperty]?: `arc4.Bool`\n\n constructor(v?: boolean) {\n super()\n }\n\n get native(): boolean {\n throw new NoImplementation()\n }\n}\n\nabstract class Arc4ReadonlyArray<TItem extends ARC4Encoded> extends ARC4Encoded {\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 /** @internal\n * Create a new Dynamic array with all items from this array\n */\n slice(): DynamicArray<TItem>\n /** @internal\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): DynamicArray<TItem>\n /** @internal\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): DynamicArray<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): DynamicArray<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\nexport class StaticArray<TItem extends ARC4Encoded, TLength extends number> extends Arc4ReadonlyArray<TItem> {\n [TypeProperty]?: `arc4.StaticArray<${TItem[typeof TypeProperty]}, ${TLength}>`\n constructor()\n constructor(...items: TItem[] & { length: TLength })\n constructor(...items: TItem[])\n constructor(...items: TItem[] & { length: TLength }) {\n super()\n }\n\n copy(): StaticArray<TItem, TLength> {\n throw new NoImplementation()\n }\n}\nexport class DynamicArray<TItem extends ARC4Encoded> extends Arc4ReadonlyArray<TItem> {\n [TypeProperty]?: `arc4.DynamicArray<${TItem[typeof TypeProperty]}>`\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 copy(): DynamicArray<TItem> {\n throw new NoImplementation()\n }\n}\ntype ExpandTupleType<T extends 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\nexport class Tuple<TTuple extends [ARC4Encoded, ...ARC4Encoded[]]> extends ARC4Encoded {\n [TypeProperty]?: `arc4.Tuple<${ExpandTupleType<TTuple>}>`\n constructor(...items: TTuple) {\n super()\n }\n\n at<TIndex extends keyof TTuple>(index: TIndex): TTuple[TIndex] {\n throw new NoImplementation()\n }\n\n get length(): TTuple['length'] & uint64 {\n throw new NoImplementation()\n }\n\n get native(): TTuple {\n throw new NoImplementation()\n }\n}\n\nexport class Address extends Arc4ReadonlyArray<Byte> {\n [TypeProperty]?: `arc4.Address`\n constructor(value?: Account | string | bytes) {\n super()\n }\n\n get native(): Account {\n throw new NoImplementation()\n }\n}\n\ntype StructConstraint = Record<string, ARC4Encoded>\n\nclass StructBase extends ARC4Encoded {\n [TypeProperty] = 'arc4.Struct'\n}\nclass StructImpl<T extends StructConstraint> extends StructBase {\n constructor(initial: T) {\n super()\n for (const [prop, val] of Object.entries(initial)) {\n Object.defineProperty(this, prop, {\n value: val,\n writable: true,\n enumerable: true,\n })\n }\n }\n}\n\ntype StructConstructor = new <T extends StructConstraint>(initial: T) => StructBase & Readonly<T>\n\nexport const Struct = StructImpl as StructConstructor\n\nexport class DynamicBytes extends Arc4ReadonlyArray<Byte> {\n [TypeProperty]?: `arc4.DynamicBytes`\n\n constructor(value?: bytes | string) {\n super()\n }\n\n get native(): bytes {\n throw new NoImplementation()\n }\n}\n\nexport class StaticBytes<TLength extends number = 0> extends Arc4ReadonlyArray<Byte> {\n [TypeProperty]?: `arc4.StaticBytes<${TLength}>`\n\n constructor(value?: bytes | string) {\n super()\n }\n\n get native(): bytes {\n throw new NoImplementation()\n }\n}\n\n/**\n * Interpret the provided bytes as an ARC4 encoded type with no validation\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 interpretAsArc4<T extends ARC4Encoded>(bytes: BytesCompat, prefix: 'none' | 'log' = 'none'): 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<T>(value: T): bytes {\n throw new NoImplementation()\n}\n","import { BaseContract } from '../base-contract'\nimport { NoImplementation } from '../internal/errors'\nimport { DeliberateAny } from '../internal/typescript-helpers'\nimport { bytes } from '../primitives'\n\nexport * from './encoded-types'\n\nexport class Contract extends BaseContract {\n override approvalProgram(): boolean {\n return true\n }\n}\n\nexport type CreateOptions = 'allow' | 'disallow' | 'require'\nexport type OnCompleteActionStr = 'NoOp' | 'OptIn' | 'ClearState' | 'CloseOut' | 'UpdateApplication' | 'DeleteApplication'\n\nexport enum OnCompleteAction {\n NoOp = 0,\n OptIn = 1,\n CloseOut = 2,\n ClearState = 3,\n UpdateApplication = 4,\n DeleteApplication = 5,\n}\n\nexport type DefaultArgument<TContract extends Contract> = { constant: string | boolean | number | bigint } | { from: keyof TContract }\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 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\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\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\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/**\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. 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 {\n throw new NoImplementation()\n}\n"],"names":[],"mappings":";;MAKsB,YAAY,CAAA;IAEzB,iBAAiB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AAU,SAAS,CAA6B,MAAmC,EAAA;IACvF,OAAO,UACL,MAAoD,EACpD,GAA2C,EAAA;QAE3C,MAAM,IAAI,gBAAgB,EAAE;AAC9B,KAAC;AACH;AAeA;;;AAGG;AACG,SAAU,UAAU,CAA6B,MAAyB,EAAA;IAC9E,OAAO,UACL,MAAoD,EACpD,GAA2C,EAAA;QAE3C,MAAM,IAAI,gBAAgB,EAAE;AAC9B,KAAC;AACH;AAEA;;;;;AAKG;AACG,SAAU,cAAc,CAAC,eAAuB,EAAA;IACpD,MAAM,IAAI,gBAAgB,EAAE;AAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/index.d.ts
CHANGED
@@ -3,7 +3,6 @@ export { log, err, assert, match, assertMatch, ensureBudget, urange, OpUpFeeSour
|
|
3
3
|
export * from './reference';
|
4
4
|
export * as op from './op';
|
5
5
|
export { Txn, Global } from './op';
|
6
|
-
export * as internal from './internal';
|
7
6
|
export * as arc4 from './arc4';
|
8
7
|
export { Contract, abimethod } from './arc4';
|
9
8
|
export { BaseContract, contract } from './base-contract';
|
package/index.mjs
CHANGED
@@ -1,26 +1,52 @@
|
|
1
|
-
import {
|
2
|
-
export { B as
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
import { N as NoImplementation } from './errors-D124-zqo.js';
|
2
|
+
export { B as Base64, E as Ec, a as Ecdsa, G as Global, M as MimcConfigurations, T as Txn, V as VrfVerify, o as op } from './op-BKy1vBsJ.js';
|
3
|
+
export { B as BaseContract, C as Contract, a as abimethod, i as arc4, c as contract } from './index-Bb3pKUmT.js';
|
4
|
+
|
5
|
+
function Uint64(v) {
|
6
|
+
throw new NoImplementation();
|
7
|
+
}
|
8
|
+
function BigUint(v) {
|
9
|
+
throw new NoImplementation();
|
10
|
+
}
|
11
|
+
function Bytes(value, ...replacements) {
|
12
|
+
throw new NoImplementation();
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* Create a new bytes value from a hexadecimal encoded string
|
16
|
+
* @param hex
|
17
|
+
*/
|
18
|
+
Bytes.fromHex = (hex) => {
|
19
|
+
throw new NoImplementation();
|
20
|
+
};
|
21
|
+
/**
|
22
|
+
* Create a new bytes value from a base 64 encoded string
|
23
|
+
* @param b64
|
24
|
+
*/
|
25
|
+
Bytes.fromBase64 = (b64) => {
|
26
|
+
throw new NoImplementation();
|
27
|
+
};
|
28
|
+
/**
|
29
|
+
* Create a new bytes value from a base 32 encoded string
|
30
|
+
* @param b32
|
31
|
+
*/
|
32
|
+
Bytes.fromBase32 = (b32) => {
|
33
|
+
throw new NoImplementation();
|
34
|
+
};
|
7
35
|
|
8
36
|
function log(...args) {
|
9
37
|
throw new NoImplementation();
|
10
38
|
}
|
11
39
|
function assert(condition, message) {
|
12
|
-
|
13
|
-
throw new AssertError(message ?? 'Assertion failed');
|
14
|
-
}
|
40
|
+
throw new NoImplementation();
|
15
41
|
}
|
16
42
|
function err(message) {
|
17
|
-
throw new
|
43
|
+
throw new NoImplementation();
|
18
44
|
}
|
19
45
|
function match(subject, test) {
|
20
|
-
|
46
|
+
throw new NoImplementation();
|
21
47
|
}
|
22
48
|
function assertMatch(subject, test, message) {
|
23
|
-
|
49
|
+
throw new NoImplementation();
|
24
50
|
}
|
25
51
|
var OpUpFeeSource;
|
26
52
|
(function (OpUpFeeSource) {
|
@@ -29,10 +55,10 @@ var OpUpFeeSource;
|
|
29
55
|
OpUpFeeSource[OpUpFeeSource["Any"] = 2] = "Any";
|
30
56
|
})(OpUpFeeSource || (OpUpFeeSource = {}));
|
31
57
|
function ensureBudget(budget, feeSource = OpUpFeeSource.GroupCredit) {
|
32
|
-
throw new
|
58
|
+
throw new NoImplementation();
|
33
59
|
}
|
34
60
|
function urange(a, b, c) {
|
35
|
-
throw new
|
61
|
+
throw new NoImplementation();
|
36
62
|
}
|
37
63
|
|
38
64
|
function Account(address) {
|
@@ -45,15 +71,6 @@ function Application(applicationId) {
|
|
45
71
|
throw new NoImplementation();
|
46
72
|
}
|
47
73
|
|
48
|
-
var internal = /*#__PURE__*/Object.freeze({
|
49
|
-
__proto__: null,
|
50
|
-
ContractOptionsSymbol: ContractOptionsSymbol,
|
51
|
-
ctxMgr: ctxMgr,
|
52
|
-
encodingUtil: encodingUtil,
|
53
|
-
errors: errors,
|
54
|
-
primitives: primitives
|
55
|
-
});
|
56
|
-
|
57
74
|
function Box(options) {
|
58
75
|
throw new NoImplementation();
|
59
76
|
}
|
@@ -181,7 +198,7 @@ function logicsig(options) {
|
|
181
198
|
}
|
182
199
|
|
183
200
|
function TemplateVar(variableName, prefix = 'TMPL_') {
|
184
|
-
throw NoImplementation;
|
201
|
+
throw new NoImplementation();
|
185
202
|
}
|
186
203
|
|
187
204
|
function compile(artefact) {
|
@@ -247,5 +264,5 @@ function emit(event, ...eventProps) {
|
|
247
264
|
throw new NoImplementation();
|
248
265
|
}
|
249
266
|
|
250
|
-
export { Account, Application, Asset, Box, BoxMap, BoxRef, GlobalState, LocalState, LogicSig, MutableArray, OpUpFeeSource, TemplateVar, TransactionType, assert, assertMatch, compile, emit, ensureBudget, err, gtxn,
|
267
|
+
export { Account, Application, Asset, BigUint, Box, BoxMap, BoxRef, Bytes, GlobalState, LocalState, LogicSig, MutableArray, OpUpFeeSource, TemplateVar, TransactionType, Uint64, assert, assertMatch, compile, emit, ensureBudget, err, gtxn, itxn, log, logicsig, match, urange };
|
251
268
|
//# sourceMappingURL=index.mjs.map
|