@algorandfoundation/puya-ts 1.2.0-beta.4 → 1.2.0-beta.41
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/README.md +7 -5
- package/{analyser-service-_vXhzOY0.js → analyser-service-DRDPe9MV.js} +45 -8
- package/analyser-service-DRDPe9MV.js.map +1 -0
- package/analyserService.mjs +7 -6
- package/analyserService.mjs.map +1 -1
- package/arc4-clientgen-sFEhO2LJ.js +324 -0
- package/arc4-clientgen-sFEhO2LJ.js.map +1 -0
- package/arc4-clientgen.d.ts +6 -0
- package/awst/intrinsic-factory.d.ts +4 -2
- package/awst/json-serialize-awst.d.ts +0 -1
- package/awst/node-factory.d.ts +1 -0
- package/awst/nodes.d.ts +26 -15
- package/awst/source-location.d.ts +0 -1
- package/awst/to-code-visitor.d.ts +3 -2
- package/awst/validation/arc4-approval-calls-router.d.ts +1 -1
- package/awst/validation/{awst-traverser.d.ts → function-traverser.d.ts} +4 -10
- package/awst/wtypes.d.ts +47 -45
- package/awst_build/arc4-util.d.ts +1 -38
- package/awst_build/ast-visitors/base-visitor.d.ts +0 -1
- package/awst_build/ast-visitors/class-definition-visitor.d.ts +721 -1
- package/awst_build/ast-visitors/contract-method-visitor.d.ts +3 -5
- package/awst_build/ast-visitors/function-visitor.d.ts +721 -1
- package/awst_build/ast-visitors/text-visitor.d.ts +721 -1
- package/awst_build/context/awst-build-context.d.ts +1 -1
- package/awst_build/eb/arc28/arc-28-emit-function-builder.d.ts +1 -2
- package/awst_build/eb/arc4/arrays.d.ts +2 -1
- package/awst_build/eb/arc4/c2c.d.ts +0 -17
- package/awst_build/eb/arc4/uintn.d.ts +1 -1
- package/awst_build/eb/arc4/util.d.ts +1 -0
- package/awst_build/eb/array-like/arrays.d.ts +3 -2
- package/awst_build/eb/array-like/util.d.ts +0 -1
- package/awst_build/eb/bytes-expression-builder.d.ts +0 -28
- package/awst_build/eb/contract-builder.d.ts +0 -11
- package/awst_build/eb/index.d.ts +0 -2
- package/awst_build/eb/literal/object-literal-expression-builder.d.ts +8 -4
- package/awst_build/eb/logged-error-builder.d.ts +11 -0
- package/awst_build/eb/objects/util.d.ts +0 -2
- package/awst_build/eb/op-module-builder.d.ts +0 -3
- package/awst_build/eb/storage/box/box.d.ts +1 -21
- package/awst_build/eb/storage/global-map.d.ts +21 -0
- package/awst_build/eb/storage/local-map.d.ts +21 -0
- package/awst_build/eb/string-expression-builder.d.ts +0 -6
- package/awst_build/eb/util/resolve-compat-builder.d.ts +0 -8
- package/awst_build/models/decorator-data.d.ts +1 -0
- package/awst_build/op-metadata.d.ts +4 -3
- package/awst_build/ptypes/arc4-types.d.ts +11 -7
- package/awst_build/ptypes/base.d.ts +5 -0
- package/awst_build/ptypes/for-export.d.ts +0 -1
- package/awst_build/ptypes/index.d.ts +103 -100
- package/awst_build/ptypes/util.d.ts +2 -2
- package/awst_build/ptypes/visitor.d.ts +3 -1
- package/awst_build/ptypes/visitors/default-visitor.d.ts +3 -1
- package/awst_build/ptypes/visitors/index-type-visitor.d.ts +0 -31
- package/awst_build/type-resolver.d.ts +1 -1
- package/bin/puyats-clientgen.d.ts +2 -0
- package/bin/puyats-clientgen.mjs +101 -0
- package/bin/puyats-clientgen.mjs.map +1 -0
- package/bin/puyats-ls.mjs +24 -49
- package/bin/puyats-ls.mjs.map +1 -1
- package/bin/run-cli.mjs +19 -13
- package/bin/run-cli.mjs.map +1 -1
- package/{check-node-version-CNvxI8_l.js → check-node-version-C1jtIFzd.js} +3 -3
- package/{check-node-version-CNvxI8_l.js.map → check-node-version-C1jtIFzd.js.map} +1 -1
- package/cli/build-command.d.ts +2 -0
- package/cli-ls.d.ts +1 -1
- package/cli.d.ts +1 -1
- package/cli.mjs +39 -79
- package/cli.mjs.map +1 -1
- package/clientgen.d.ts +1 -0
- package/code-fix/{invalid-non-null-assertion.d.ts → no-op-non-null-assertion.d.ts} +1 -1
- package/{compile-Bz8LVwK2.js → compile-D3rBypqy.js} +11 -4
- package/compile-D3rBypqy.js.map +1 -0
- package/compile.d.ts +1 -1
- package/constants.d.ts +7 -2
- package/contract-class-model-bHAozdbL.js +5456 -0
- package/contract-class-model-bHAozdbL.js.map +1 -0
- package/errors.d.ts +1 -6
- package/index.d.ts +1 -2
- package/index.mjs +36 -26
- package/index.mjs.map +1 -1
- package/language-server/analyser-service.d.ts +0 -1
- package/language-server/compile-trigger-queue.d.ts +2 -2
- package/language-server/puya-language-server.d.ts +0 -38
- package/logger/index.d.ts +0 -7
- package/{options-COFRHTFQ.js → options-lB3ucfHV.js} +2666 -8407
- package/options-lB3ucfHV.js.map +1 -0
- package/options.d.ts +8 -3
- package/package.json +20 -12
- package/puya/check-puya-version.d.ts +0 -13
- package/puya/index.d.ts +1 -1
- package/puya/log-deserializer.d.ts +0 -2
- package/puya/puya-service.d.ts +5 -1
- package/{resolve-puya-path-DtTAMi0Y.js → resolve-puya-path-CxwX2Y7m.js} +9 -45
- package/resolve-puya-path-CxwX2Y7m.js.map +1 -0
- package/semver-DSCCFKAJ.js +45 -0
- package/semver-DSCCFKAJ.js.map +1 -0
- package/util/base-85.d.ts +1 -4
- package/util/generate-temp-file.d.ts +0 -8
- package/util/index.d.ts +1 -3
- package/util/typed-message-port.d.ts +2 -2
- package/util-Dz5YVLPa.js +63 -0
- package/util-Dz5YVLPa.js.map +1 -0
- package/visitor/syntax-names.d.ts +194 -194
- package/visitor/visitor.d.ts +4 -4
- package/analyser-service-_vXhzOY0.js.map +0 -1
- package/compile-Bz8LVwK2.js.map +0 -1
- package/language-server/ls-logger.d.ts +0 -11
- package/options-COFRHTFQ.js.map +0 -1
- package/resolve-puya-path-DtTAMi0Y.js.map +0 -1
- package/util/arc4-signature-parser.d.ts +0 -14
- package/util/polyfills.d.ts +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AddressConstant, AppAccountStateExpression, AppStateExpression,
|
|
1
|
+
import type { ABICall, AddressConstant, AppAccountStateExpression, AppStateExpression, ARC4Decode, ARC4Encode, ARC4FromBytes, ARC4Router, ArrayConcat, ArrayExtend, ArrayLength, ArrayPop, ArrayReplace, AssertExpression, AssignmentExpression, AssignmentStatement, BigUIntAugmentedAssignment, BigUIntBinaryOperation, BigUIntPostfixUnaryOperation, Block, BoolConstant, BooleanBinaryOperation, BoxValueExpression, BytesAugmentedAssignment, BytesBinaryOperation, BytesComparisonExpression, BytesConstant, BytesUnaryOperation, CheckedMaybe, CommaExpression, CompiledContract, CompiledLogicSig, ConditionalExpression, ConvertArray, Copy, CreateInnerTransaction, DecimalConstant, Emit, EmitFields, Enumeration, ExpressionStatement, ExpressionVisitor, FieldExpression, ForInLoop, Goto, GroupTransactionReference, IfElse, IndexExpression, InnerTransactionField, IntegerConstant, IntersectionSliceExpression, IntrinsicCall, LoopContinue, LoopExit, MapPrefixedKeyExpression, MethodConstant, NamedTupleExpression, NewArray, NewStruct, Not, NumericComparisonExpression, PuyaLibCall, Range, ReinterpretCast, ReturnStatement, Reversed, SingleEvaluation, SizeOf, SliceExpression, StageInnerTransactions, StateDelete, StateExists, StateGet, StateGetEx, StatementVisitor, StringConstant, SubmitInnerTransaction, SubroutineCallExpression, Switch, TemplateVar, TupleExpression, TupleItemExpression, UInt64AugmentedAssignment, UInt64BinaryOperation, UInt64PostfixUnaryOperation, UInt64UnaryOperation, UpdateInnerTransaction, VarExpression, VoidConstant, WhileLoop } from '../nodes';
|
|
2
2
|
export declare class FunctionTraverser implements ExpressionVisitor<void>, StatementVisitor<void> {
|
|
3
3
|
visitExpressionStatement(statement: ExpressionStatement): void;
|
|
4
4
|
visitBlock(statement: Block): void;
|
|
@@ -46,7 +46,7 @@ export declare class FunctionTraverser implements ExpressionVisitor<void>, State
|
|
|
46
46
|
visitNamedTupleExpression(expression: NamedTupleExpression): void;
|
|
47
47
|
visitVarExpression(expression: VarExpression): void;
|
|
48
48
|
visitInnerTransactionField(expression: InnerTransactionField): void;
|
|
49
|
-
|
|
49
|
+
visitABICall(expression: ABICall): void;
|
|
50
50
|
visitSubmitInnerTransaction(expression: SubmitInnerTransaction): void;
|
|
51
51
|
visitSizeOf(expression: SizeOf): void;
|
|
52
52
|
visitFieldExpression(expression: FieldExpression): void;
|
|
@@ -55,7 +55,7 @@ export declare class FunctionTraverser implements ExpressionVisitor<void>, State
|
|
|
55
55
|
visitIntersectionSliceExpression(expression: IntersectionSliceExpression): void;
|
|
56
56
|
visitAppStateExpression(expression: AppStateExpression): void;
|
|
57
57
|
visitAppAccountStateExpression(expression: AppAccountStateExpression): void;
|
|
58
|
-
|
|
58
|
+
visitMapPrefixedKeyExpression(expression: MapPrefixedKeyExpression): void;
|
|
59
59
|
visitBoxValueExpression(expression: BoxValueExpression): void;
|
|
60
60
|
visitSingleEvaluation(expression: SingleEvaluation): void;
|
|
61
61
|
visitReinterpretCast(expression: ReinterpretCast): void;
|
|
@@ -76,6 +76,7 @@ export declare class FunctionTraverser implements ExpressionVisitor<void>, State
|
|
|
76
76
|
visitBooleanBinaryOperation(expression: BooleanBinaryOperation): void;
|
|
77
77
|
visitNot(expression: Not): void;
|
|
78
78
|
visitEmit(expression: Emit): void;
|
|
79
|
+
visitEmitFields(expression: EmitFields): void;
|
|
79
80
|
visitRange(expression: Range): void;
|
|
80
81
|
visitEnumeration(expression: Enumeration): void;
|
|
81
82
|
visitReversed(expression: Reversed): void;
|
|
@@ -88,10 +89,3 @@ export declare class FunctionTraverser implements ExpressionVisitor<void>, State
|
|
|
88
89
|
visitCompiledLogicSig(expression: CompiledLogicSig): void;
|
|
89
90
|
visitARC4Router(expression: ARC4Router): void;
|
|
90
91
|
}
|
|
91
|
-
export declare class AwstTraverser extends FunctionTraverser implements RootNodeVisitor<void>, ContractMemberNodeVisitor<void> {
|
|
92
|
-
visitContractMethod(contractMemberNode: ContractMethod): void;
|
|
93
|
-
visitAppStorageDefinition(contractMemberNode: AppStorageDefinition): void;
|
|
94
|
-
visitSubroutine(rootNode: Subroutine): void;
|
|
95
|
-
visitLogicSignature(rootNode: LogicSignature): void;
|
|
96
|
-
visitContract(rootNode: Contract): void;
|
|
97
|
-
}
|
package/awst/wtypes.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TransactionKind } from './models';
|
|
2
2
|
import type { SourceLocation } from './source-location';
|
|
3
3
|
export declare namespace wtypes {
|
|
4
|
-
class WType {
|
|
4
|
+
export class WType {
|
|
5
5
|
constructor(props: {
|
|
6
6
|
name: string;
|
|
7
7
|
immutable?: boolean;
|
|
@@ -11,25 +11,25 @@ export declare namespace wtypes {
|
|
|
11
11
|
equals(other: WType): boolean;
|
|
12
12
|
toString(): string;
|
|
13
13
|
}
|
|
14
|
-
const voidWType: WType;
|
|
15
|
-
const boolWType: WType;
|
|
16
|
-
const uint64WType: WType;
|
|
17
|
-
const uint64RangeWType: WType;
|
|
18
|
-
const stateKeyWType: WType;
|
|
19
|
-
const boxKeyWType: WType;
|
|
20
|
-
const stringWType: WType;
|
|
21
|
-
const biguintWType: WType;
|
|
22
|
-
const assetWType: WType;
|
|
23
|
-
const accountWType: WType;
|
|
24
|
-
const applicationWType: WType;
|
|
25
|
-
class BytesWType extends WType {
|
|
14
|
+
export const voidWType: WType;
|
|
15
|
+
export const boolWType: WType;
|
|
16
|
+
export const uint64WType: WType;
|
|
17
|
+
export const uint64RangeWType: WType;
|
|
18
|
+
export const stateKeyWType: WType;
|
|
19
|
+
export const boxKeyWType: WType;
|
|
20
|
+
export const stringWType: WType;
|
|
21
|
+
export const biguintWType: WType;
|
|
22
|
+
export const assetWType: WType;
|
|
23
|
+
export const accountWType: WType;
|
|
24
|
+
export const applicationWType: WType;
|
|
25
|
+
export class BytesWType extends WType {
|
|
26
26
|
readonly length: bigint | null;
|
|
27
27
|
constructor(args?: {
|
|
28
28
|
length: bigint | null;
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
const bytesWType: BytesWType;
|
|
32
|
-
class ARC4Type extends WType {
|
|
31
|
+
export const bytesWType: BytesWType;
|
|
32
|
+
export class ARC4Type extends WType {
|
|
33
33
|
/**
|
|
34
34
|
* Override the default name of this type with a valid arc4 alias.
|
|
35
35
|
*
|
|
@@ -42,7 +42,7 @@ export declare namespace wtypes {
|
|
|
42
42
|
immutable?: boolean;
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
class WTuple extends WType {
|
|
45
|
+
export class WTuple extends WType {
|
|
46
46
|
types: WType[];
|
|
47
47
|
names: string[] | undefined;
|
|
48
48
|
constructor(props: {
|
|
@@ -53,55 +53,52 @@ export declare namespace wtypes {
|
|
|
53
53
|
equals(other: WType): boolean;
|
|
54
54
|
toString(): string;
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
export class ReferenceArray extends WType {
|
|
57
57
|
readonly elementType: WType;
|
|
58
58
|
readonly sourceLocation: SourceLocation | null;
|
|
59
|
-
protected constructor(props: {
|
|
60
|
-
name: string;
|
|
61
|
-
itemType: WType;
|
|
62
|
-
sourceLocation?: SourceLocation;
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
class ReferenceArray extends NativeArray {
|
|
66
|
-
readonly immutable = false;
|
|
67
59
|
constructor(props: {
|
|
68
60
|
itemType: WType;
|
|
69
|
-
immutable: boolean;
|
|
70
61
|
sourceLocation?: SourceLocation;
|
|
71
62
|
});
|
|
72
63
|
}
|
|
73
|
-
class WEnumeration extends WType {
|
|
64
|
+
export class WEnumeration extends WType {
|
|
74
65
|
readonly sequenceType: WType;
|
|
75
66
|
constructor(props: {
|
|
76
67
|
sequenceType: WType;
|
|
77
68
|
});
|
|
78
69
|
}
|
|
79
|
-
class WGroupTransaction extends WType {
|
|
70
|
+
export class WGroupTransaction extends WType {
|
|
80
71
|
transactionType: TransactionKind | null;
|
|
81
72
|
constructor({ transactionType }: {
|
|
82
73
|
transactionType?: TransactionKind;
|
|
83
74
|
});
|
|
84
75
|
}
|
|
85
|
-
class WInnerTransaction extends WType {
|
|
76
|
+
export class WInnerTransaction extends WType {
|
|
86
77
|
transactionType: TransactionKind | null;
|
|
87
78
|
constructor({ transactionType }: {
|
|
88
79
|
transactionType?: TransactionKind;
|
|
89
80
|
});
|
|
90
81
|
}
|
|
91
|
-
class WInnerTransactionFields extends WType {
|
|
92
|
-
transactionType: TransactionKind | null;
|
|
82
|
+
export class WInnerTransactionFields extends WType {
|
|
83
|
+
readonly transactionType: TransactionKind | null;
|
|
93
84
|
constructor({ transactionType }: {
|
|
94
85
|
transactionType?: TransactionKind;
|
|
95
86
|
});
|
|
96
87
|
}
|
|
97
|
-
class
|
|
88
|
+
export class WABICallInnerTransactionFields extends WInnerTransactionFields {
|
|
89
|
+
resultType: WType;
|
|
90
|
+
constructor({ returnType }: {
|
|
91
|
+
returnType?: WType;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
export class ARC4UIntN extends ARC4Type {
|
|
98
95
|
readonly n: bigint;
|
|
99
96
|
constructor({ n, arc4Alias }: {
|
|
100
97
|
n: bigint;
|
|
101
98
|
arc4Alias?: string;
|
|
102
99
|
});
|
|
103
100
|
}
|
|
104
|
-
class ARC4UFixedNxM extends ARC4Type {
|
|
101
|
+
export class ARC4UFixedNxM extends ARC4Type {
|
|
105
102
|
readonly n: bigint;
|
|
106
103
|
readonly m: bigint;
|
|
107
104
|
constructor({ n, m }: {
|
|
@@ -109,8 +106,13 @@ export declare namespace wtypes {
|
|
|
109
106
|
m: bigint;
|
|
110
107
|
});
|
|
111
108
|
}
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
type WTypeField = {
|
|
110
|
+
name: string;
|
|
111
|
+
wtype: WType;
|
|
112
|
+
description: string | null;
|
|
113
|
+
};
|
|
114
|
+
export class ARC4Struct extends ARC4Type {
|
|
115
|
+
fields: WTypeField[];
|
|
114
116
|
sourceLocation: SourceLocation | null;
|
|
115
117
|
frozen: boolean;
|
|
116
118
|
desc: string | null;
|
|
@@ -118,21 +120,20 @@ export declare namespace wtypes {
|
|
|
118
120
|
frozen: boolean;
|
|
119
121
|
name: string;
|
|
120
122
|
desc: string | null;
|
|
121
|
-
fields:
|
|
123
|
+
fields: WTypeField[];
|
|
122
124
|
sourceLocation?: SourceLocation;
|
|
123
125
|
});
|
|
124
126
|
}
|
|
125
|
-
class ARC4Tuple extends ARC4Type {
|
|
127
|
+
export class ARC4Tuple extends ARC4Type {
|
|
126
128
|
readonly types: WType[];
|
|
127
129
|
readonly sourceLocation: SourceLocation | null;
|
|
128
|
-
readonly immutable: boolean;
|
|
129
130
|
constructor({ types, sourceLocation, immutable }: {
|
|
130
131
|
types: WType[];
|
|
131
132
|
sourceLocation?: SourceLocation;
|
|
132
133
|
immutable: boolean;
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
|
-
abstract class ARC4Array extends ARC4Type {
|
|
136
|
+
export abstract class ARC4Array extends ARC4Type {
|
|
136
137
|
readonly elementType: WType;
|
|
137
138
|
protected constructor(props: {
|
|
138
139
|
arc4Alias: string | null;
|
|
@@ -141,7 +142,7 @@ export declare namespace wtypes {
|
|
|
141
142
|
immutable?: boolean;
|
|
142
143
|
});
|
|
143
144
|
}
|
|
144
|
-
class ARC4DynamicArray extends ARC4Array {
|
|
145
|
+
export class ARC4DynamicArray extends ARC4Array {
|
|
145
146
|
readonly sourceLocation: SourceLocation | null;
|
|
146
147
|
constructor({ elementType, sourceLocation, arc4Alias, immutable, }: {
|
|
147
148
|
elementType: WType;
|
|
@@ -150,7 +151,7 @@ export declare namespace wtypes {
|
|
|
150
151
|
immutable?: boolean;
|
|
151
152
|
});
|
|
152
153
|
}
|
|
153
|
-
class ARC4StaticArray extends ARC4Array {
|
|
154
|
+
export class ARC4StaticArray extends ARC4Array {
|
|
154
155
|
readonly sourceLocation: SourceLocation | null;
|
|
155
156
|
readonly arraySize: bigint;
|
|
156
157
|
constructor({ elementType, sourceLocation, arraySize, arc4Alias, immutable, }: {
|
|
@@ -161,8 +162,9 @@ export declare namespace wtypes {
|
|
|
161
162
|
immutable?: boolean;
|
|
162
163
|
});
|
|
163
164
|
}
|
|
164
|
-
const arc4ByteAliasWType: ARC4UIntN;
|
|
165
|
-
const arc4AddressAliasWType: ARC4StaticArray;
|
|
166
|
-
const arc4BooleanWType: ARC4Type;
|
|
167
|
-
const arc4StringAliasWType: ARC4DynamicArray;
|
|
165
|
+
export const arc4ByteAliasWType: ARC4UIntN;
|
|
166
|
+
export const arc4AddressAliasWType: ARC4StaticArray;
|
|
167
|
+
export const arc4BooleanWType: ARC4Type;
|
|
168
|
+
export const arc4StringAliasWType: ARC4DynamicArray;
|
|
169
|
+
export {};
|
|
168
170
|
}
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import type { ResourceEncoding } from '../awst';
|
|
2
1
|
import { ARC4ABIMethodConfig } from '../awst/nodes';
|
|
3
2
|
import type { SourceLocation } from '../awst/source-location';
|
|
4
|
-
import type {
|
|
5
|
-
import { ArrayPType, FixedArrayPType, ImmutableObjectPType, MutableTuplePType, ReadonlyArrayPType, ReadonlyTuplePType } from './ptypes';
|
|
6
|
-
import { ARC4EncodedType, ARC4StructType, ARC4TupleType, DynamicArrayType, StaticArrayType } from './ptypes/arc4-types';
|
|
7
|
-
/**
|
|
8
|
-
* For a given ptype, return the equivalent ABI compatible type - or error if there is no compatible type
|
|
9
|
-
* @param ptype The type of the parameter
|
|
10
|
-
* @param direction The direction of the parameter (in for method args, out for method returns)
|
|
11
|
-
* @param resourceEncoding The encoding strategy for the foreign resource types (App, Asset, Account)
|
|
12
|
-
* @param sourceLocation The location of the method or parameter, for use in error metadata
|
|
13
|
-
*/
|
|
14
|
-
export declare function ptypeToAbiPType(ptype: PType, direction: 'in' | 'out', resourceEncoding: ResourceEncoding, sourceLocation: SourceLocation): ABICompatiblePType;
|
|
3
|
+
import type { FunctionPType } from './ptypes';
|
|
15
4
|
export declare function arc4ConfigFromType(functionType: FunctionPType, sourceLocation: SourceLocation): {
|
|
16
5
|
arc4Config: ARC4ABIMethodConfig;
|
|
17
6
|
methodSelector: import("../awst/nodes").MethodConstant;
|
|
@@ -23,29 +12,3 @@ export declare function arc4ConfigFromType(functionType: FunctionPType, sourceLo
|
|
|
23
12
|
* @param sourceLocation The source location of the code generating the constant,
|
|
24
13
|
*/
|
|
25
14
|
export declare function buildArc4MethodConstant(functionType: FunctionPType, arc4Config: ARC4ABIMethodConfig, sourceLocation: SourceLocation): import("../awst/nodes").MethodConstant;
|
|
26
|
-
/**
|
|
27
|
-
* Get the ARC4 type name for a ptype, or throw if the ptype is not usable in an ABI method.
|
|
28
|
-
* @param ptype The ptype of the parameter
|
|
29
|
-
* @param direction The direction of the parameter (in for method args, out for method returns)
|
|
30
|
-
* @param resourceEncoding The encoding strategy for the foreign resource types (App, Asset, Account)
|
|
31
|
-
* @param sourceLocation The location of the method or parameter, for use in error metadata
|
|
32
|
-
*/
|
|
33
|
-
export declare function getABITypeName(ptype: PType, direction: 'in' | 'out', resourceEncoding: ResourceEncoding, sourceLocation: SourceLocation): string;
|
|
34
|
-
/**
|
|
35
|
-
* Is the given type an ARC4 encoded type, or can it be encoded to one
|
|
36
|
-
* @param ptype The type to check
|
|
37
|
-
*/
|
|
38
|
-
export declare function isArc4EncodableType(ptype: PType): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* For a given type, return the arc4 encoded version of that type
|
|
41
|
-
* @param ptype The type to be encoded
|
|
42
|
-
* @param sourceLocation The source location triggering the conversion
|
|
43
|
-
*/
|
|
44
|
-
export declare function ptypeToArc4EncodedType(ptype: ReadonlyTuplePType, sourceLocation: SourceLocation): ARC4TupleType;
|
|
45
|
-
export declare function ptypeToArc4EncodedType(ptype: MutableTuplePType, sourceLocation: SourceLocation): ARC4TupleType;
|
|
46
|
-
export declare function ptypeToArc4EncodedType(ptype: ImmutableObjectPType, sourceLocation: SourceLocation): ARC4StructType;
|
|
47
|
-
export declare function ptypeToArc4EncodedType(ptype: ArrayPType, sourceLocation: SourceLocation): DynamicArrayType;
|
|
48
|
-
export declare function ptypeToArc4EncodedType(ptype: ReadonlyArrayPType, sourceLocation: SourceLocation): DynamicArrayType;
|
|
49
|
-
export declare function ptypeToArc4EncodedType(ptype: FixedArrayPType, sourceLocation: SourceLocation): StaticArrayType;
|
|
50
|
-
export declare function ptypeToArc4EncodedType<T extends ARC4EncodedType>(ptype: T, sourceLocation: SourceLocation): T;
|
|
51
|
-
export declare function ptypeToArc4EncodedType(ptype: PType, sourceLocation: SourceLocation): ARC4EncodedType;
|
|
@@ -11,7 +11,6 @@ export declare abstract class BaseVisitor implements Visitor<Expressions, NodeBu
|
|
|
11
11
|
private baseAccept;
|
|
12
12
|
readonly textVisitor: TextVisitor;
|
|
13
13
|
get context(): AwstBuildContext;
|
|
14
|
-
protected constructor();
|
|
15
14
|
logNotSupported(node: ts.Node | undefined, message: string): void;
|
|
16
15
|
throwNotSupported(node: ts.Node, message: string): never;
|
|
17
16
|
visitBigIntLiteral(node: ts.BigIntLiteral): InstanceBuilder;
|