Skip to content

Commit 8ce9d46

Browse files
committed
chore: add more @internal flags
1 parent 9e66da5 commit 8ce9d46

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

src/collections/custom-key-map.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export abstract class CustomKeyMap<TKey, TValue> implements Map<TKey, TValue> {
88
#keySerializer: (key: TKey) => Primitive
99
#map = new Map<Primitive, [TKey, TValue]>()
1010

11+
/** @internal */
1112
constructor(keySerializer: (key: TKey) => number | bigint | string) {
1213
this.#keySerializer = keySerializer
1314
}
@@ -65,22 +66,26 @@ export abstract class CustomKeyMap<TKey, TValue> implements Map<TKey, TValue> {
6566
}
6667

6768
export class AccountMap<TValue> extends CustomKeyMap<Account, TValue> {
69+
/** @internal */
6870
constructor() {
6971
super(AccountMap.getAddressStrFromAccount)
7072
}
7173

74+
/** @internal */
7275
private static getAddressStrFromAccount = (acc: Account) => {
7376
return asBytesCls(acc.bytes).valueOf()
7477
}
7578
}
7679

7780
export class BytesMap<TValue> extends CustomKeyMap<BytesCompat, TValue> {
81+
/** @internal */
7882
constructor() {
7983
super((bytes) => asBytesCls(bytes).valueOf())
8084
}
8185
}
8286

8387
export class Uint64Map<TValue> extends CustomKeyMap<Uint64Compat, TValue> {
88+
/** @internal */
8489
constructor() {
8590
super((uint64) => asUint64Cls(uint64).valueOf())
8691
}

src/impl/inner-transactions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ export class ApplicationCallInnerTxnContext<TReturn = unknown> extends Applicati
355355
super.appendLog(value)
356356
}
357357

358+
/** @internal */
358359
private constructor(
359360
fields: ApplicationCallFields,
360361
public itxns?: Transaction[],

src/impl/transactions.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const baseDefaultFields = () => ({
3535
export type TxnFields<TTxn> = Partial<Mutable<Pick<TTxn, ObjectKeys<TTxn>>>>
3636

3737
abstract class TransactionBase {
38+
/** @internal */
3839
protected constructor(fields: Partial<ReturnType<typeof baseDefaultFields>>) {
3940
const baseDefaults = baseDefaultFields()
4041
this.sender = fields.sender ?? baseDefaults.sender
@@ -87,6 +88,7 @@ export class PaymentTransaction extends TransactionBase implements gtxn.PaymentT
8788
return new PaymentTransaction(fields)
8889
}
8990

91+
/** @internal */
9092
protected constructor(fields: TxnFields<gtxn.PaymentTxn>) {
9193
super(fields)
9294
this.receiver = fields.receiver ?? Account()
@@ -107,6 +109,7 @@ export class KeyRegistrationTransaction extends TransactionBase implements gtxn.
107109
return new KeyRegistrationTransaction(fields)
108110
}
109111

112+
/** @internal */
110113
protected constructor(fields: TxnFields<gtxn.KeyRegistrationTxn>) {
111114
super(fields)
112115
this.voteKey = fields.voteKey ?? (Bytes() as bytes<32>)
@@ -141,6 +144,7 @@ export class AssetConfigTransaction extends TransactionBase implements gtxn.Asse
141144
return new AssetConfigTransaction(fields)
142145
}
143146

147+
/** @internal */
144148
protected constructor(fields: TxnFields<gtxn.AssetConfigTxn>) {
145149
super(fields)
146150
this.configAsset = fields.configAsset ?? Asset()
@@ -181,6 +185,7 @@ export class AssetTransferTransaction extends TransactionBase implements gtxn.As
181185
return new AssetTransferTransaction(fields)
182186
}
183187

188+
/** @internal */
184189
protected constructor(fields: TxnFields<gtxn.AssetTransferTxn>) {
185190
super(fields)
186191
this.xferAsset = fields.xferAsset ?? Asset()
@@ -206,6 +211,7 @@ export class AssetFreezeTransaction extends TransactionBase implements gtxn.Asse
206211
return new AssetFreezeTransaction(fields)
207212
}
208213

214+
/** @internal */
209215
protected constructor(fields: TxnFields<gtxn.AssetFreezeTxn>) {
210216
super(fields)
211217
this.freezeAsset = fields.freezeAsset ?? Asset()
@@ -238,6 +244,7 @@ export class ApplicationCallTransaction extends TransactionBase implements gtxn.
238244
static create(fields: ApplicationCallTransactionFields) {
239245
return new ApplicationCallTransaction(fields)
240246
}
247+
/** @internal */
241248
private args: Array<unknown>
242249
#accounts: Array<AccountType>
243250
#assets: Array<AssetType>
@@ -247,6 +254,7 @@ export class ApplicationCallTransaction extends TransactionBase implements gtxn.
247254
#appLogs: Array<bytes>
248255
#appId: ApplicationType
249256

257+
/** @internal */
250258
protected constructor(fields: ApplicationCallTransactionFields) {
251259
super(fields)
252260
this.#appId = fields.appId ?? Application()

src/subcontexts/transaction-context.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,15 @@ interface ExecutionScope {
5959
export class DeferredAppCall<TParams extends unknown[], TReturn> {
6060
/** @internal */
6161
constructor(
62+
/** @internal */
6263
private readonly appId: uint64,
64+
/** @internal */
6365
readonly txns: Transaction[],
66+
/** @internal */
6467
private readonly method: (...args: TParams) => TReturn,
68+
/** @internal */
6569
private readonly abiMetadata: AbiMetadata,
70+
/** @internal */
6671
private readonly args: TParams,
6772
) {}
6873

0 commit comments

Comments
 (0)