Skip to content

Commit 552ff00

Browse files
committed
feat: throw when a unsupported ledger field is detected
1 parent 4a258a3 commit 552ff00

11 files changed

+269
-101
lines changed

docs/capabilities/transaction-composer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ const result = algorand
4545
})
4646
```
4747

48+
## Ledger new field support
49+
50+
When new transaction fields are added to the Algorand protocol, they are not immediately supported by Ledger signing devices. To help developers avoid unexpected behaviour, the transaction composer will throw an exception when it detects the use of a field that is not yet supported by Ledger devices.
51+
52+
To acknowledge this limitation and disable the error checking, you can use `Config.configure({ disableLedgerUnsupportedErrors: true })`. As these fields gain Ledger support over time, the transaction composer will be updated accordingly. It's recommended to periodically re-enable this error checking by removing the configuration override to ensure you're aware of any newly supported fields.
53+
4854
## Sending a transaction
4955

5056
Once you have constructed all the required transactions, they can be sent by calling `send()` on the `TransactionComposer`.

docs/code/classes/types_algo_http_client_with_retry.AlgoHttpClientWithRetry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ URLTokenBaseHTTPClient.constructor
5757

5858
#### Defined in
5959

60-
node_modules/algosdk/dist/types/client/urlTokenBaseHTTPClient.d.ts:27
60+
node_modules/algosdk/types/client/urlTokenBaseHTTPClient.d.ts:27
6161

6262
## Properties
6363

docs/code/classes/types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ await algorand.createTransaction.appCall({
123123
// Max fee doesn't make sense with extraFee AND staticFee
124124
// already specified, but here for completeness
125125
maxFee: (3000).microAlgo(),
126+
rejectVersion: 1,
126127
})
127128
```
128129

@@ -142,7 +143,7 @@ await algorand.createTransaction.appCall({
142143

143144
#### Defined in
144145

145-
[src/types/algorand-client-transaction-creator.ts:462](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L462)
146+
[src/types/algorand-client-transaction-creator.ts:466](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L466)
146147

147148
___
148149

@@ -194,6 +195,7 @@ await algorand.createTransaction.appCallMethodCall({
194195
// Max fee doesn't make sense with extraFee AND staticFee
195196
// already specified, but here for completeness
196197
maxFee: (3000).microAlgo(),
198+
rejectVersion: 1,
197199
})
198200
```
199201

@@ -213,7 +215,7 @@ await algorand.createTransaction.appCallMethodCall({
213215

214216
#### Defined in
215217

216-
[src/types/algorand-client-transaction-creator.ts:661](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L661)
218+
[src/types/algorand-client-transaction-creator.ts:669](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L669)
217219

218220
___
219221

@@ -262,6 +264,7 @@ await algorand.createTransaction.appCreate({
262264
// Max fee doesn't make sense with extraFee AND staticFee
263265
// already specified, but here for completeness
264266
maxFee: (3000).microAlgo(),
267+
rejectVersion: 1,
265268
})
266269
```
267270

@@ -308,7 +311,7 @@ await algorand.createTransaction.appCreate({
308311

309312
#### Defined in
310313

311-
[src/types/algorand-client-transaction-creator.ts:355](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L355)
314+
[src/types/algorand-client-transaction-creator.ts:356](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L356)
312315

313316
___
314317

@@ -369,6 +372,7 @@ await algorand.createTransaction.appCreateMethodCall({
369372
// Max fee doesn't make sense with extraFee AND staticFee
370373
// already specified, but here for completeness
371374
maxFee: (3000).microAlgo(),
375+
rejectVersion: 1,
372376
})
373377
```
374378

@@ -388,7 +392,7 @@ await algorand.createTransaction.appCreateMethodCall({
388392

389393
#### Defined in
390394

391-
[src/types/algorand-client-transaction-creator.ts:518](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L518)
395+
[src/types/algorand-client-transaction-creator.ts:523](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L523)
392396

393397
___
394398

@@ -428,6 +432,7 @@ await algorand.createTransaction.appDelete({
428432
// Max fee doesn't make sense with extraFee AND staticFee
429433
// already specified, but here for completeness
430434
maxFee: (3000).microAlgo(),
435+
rejectVersion: 1,
431436
})
432437
```
433438

@@ -447,7 +452,7 @@ await algorand.createTransaction.appDelete({
447452

448453
#### Defined in
449454

450-
[src/types/algorand-client-transaction-creator.ts:427](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L427)
455+
[src/types/algorand-client-transaction-creator.ts:430](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L430)
451456

452457
___
453458

@@ -499,6 +504,7 @@ await algorand.createTransaction.appDeleteMethodCall({
499504
// Max fee doesn't make sense with extraFee AND staticFee
500505
// already specified, but here for completeness
501506
maxFee: (3000).microAlgo(),
507+
rejectVersion: 1,
502508
})
503509
```
504510

@@ -518,7 +524,7 @@ await algorand.createTransaction.appDeleteMethodCall({
518524

519525
#### Defined in
520526

521-
[src/types/algorand-client-transaction-creator.ts:614](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L614)
527+
[src/types/algorand-client-transaction-creator.ts:621](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L621)
522528

523529
___
524530

@@ -560,6 +566,7 @@ await algorand.createTransaction.appUpdate({
560566
// Max fee doesn't make sense with extraFee AND staticFee
561567
// already specified, but here for completeness
562568
maxFee: (3000).microAlgo(),
569+
rejectVersion: 1,
563570
})
564571
```
565572

@@ -601,7 +608,7 @@ await algorand.createTransaction.appUpdate({
601608

602609
#### Defined in
603610

604-
[src/types/algorand-client-transaction-creator.ts:392](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L392)
611+
[src/types/algorand-client-transaction-creator.ts:394](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L394)
605612

606613
___
607614

@@ -655,6 +662,7 @@ await algorand.createTransaction.appUpdateMethodCall({
655662
// Max fee doesn't make sense with extraFee AND staticFee
656663
// already specified, but here for completeness
657664
maxFee: (3000).microAlgo(),
665+
rejectVersion: 1,
658666
})
659667
```
660668

@@ -674,7 +682,7 @@ await algorand.createTransaction.appUpdateMethodCall({
674682

675683
#### Defined in
676684

677-
[src/types/algorand-client-transaction-creator.ts:567](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L567)
685+
[src/types/algorand-client-transaction-creator.ts:573](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L573)
678686

679687
___
680688

@@ -1128,7 +1136,7 @@ await algorand.createTransaction.offlineKeyRegistration({
11281136

11291137
#### Defined in
11301138

1131-
[src/types/algorand-client-transaction-creator.ts:733](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L733)
1139+
[src/types/algorand-client-transaction-creator.ts:741](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L741)
11321140

11331141
___
11341142

@@ -1194,7 +1202,7 @@ await algorand.createTransaction.onlineKeyRegistration({
11941202

11951203
#### Defined in
11961204

1197-
[src/types/algorand-client-transaction-creator.ts:703](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L703)
1205+
[src/types/algorand-client-transaction-creator.ts:711](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-creator.ts#L711)
11981206

11991207
___
12001208

docs/code/classes/types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ await algorand.send.appCall({
150150
// Max fee doesn't make sense with extraFee AND staticFee
151151
// already specified, but here for completeness
152152
maxFee: (3000).microAlgo(),
153+
rejectVersion: 1,
153154
// Signer only needed if you want to provide one,
154155
// generally you'd register it with AlgorandClient
155156
// against the sender and not need to pass it in
@@ -175,7 +176,7 @@ await algorand.send.appCall({
175176

176177
#### Defined in
177178

178-
[src/types/algorand-client-transaction-sender.ts:735](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L735)
179+
[src/types/algorand-client-transaction-sender.ts:739](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L739)
179180

180181
___
181182

@@ -227,6 +228,7 @@ await algorand.send.appCallMethodCall({
227228
// Max fee doesn't make sense with extraFee AND staticFee
228229
// already specified, but here for completeness
229230
maxFee: (3000).microAlgo(),
231+
rejectVersion: 1,
230232
// Signer only needed if you want to provide one,
231233
// generally you'd register it with AlgorandClient
232234
// against the sender and not need to pass it in
@@ -252,7 +254,7 @@ await algorand.send.appCallMethodCall({
252254

253255
#### Defined in
254256

255-
[src/types/algorand-client-transaction-sender.ts:979](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L979)
257+
[src/types/algorand-client-transaction-sender.ts:987](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L987)
256258

257259
___
258260

@@ -302,6 +304,7 @@ await algorand.send.appCreate({
302304
// Max fee doesn't make sense with extraFee AND staticFee
303305
// already specified, but here for completeness
304306
maxFee: (3000).microAlgo(),
307+
rejectVersion: 1,
305308
// Signer only needed if you want to provide one,
306309
// generally you'd register it with AlgorandClient
307310
// against the sender and not need to pass it in
@@ -327,7 +330,7 @@ await algorand.send.appCreate({
327330

328331
#### Defined in
329332

330-
[src/types/algorand-client-transaction-sender.ts:595](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L595)
333+
[src/types/algorand-client-transaction-sender.ts:596](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L596)
331334

332335
___
333336

@@ -389,6 +392,7 @@ await algorand.send.appCreateMethodCall({
389392
// Max fee doesn't make sense with extraFee AND staticFee
390393
// already specified, but here for completeness
391394
maxFee: (3000).microAlgo(),
395+
rejectVersion: 1,
392396
// Signer only needed if you want to provide one,
393397
// generally you'd register it with AlgorandClient
394398
// against the sender and not need to pass it in
@@ -414,7 +418,7 @@ await algorand.send.appCreateMethodCall({
414418

415419
#### Defined in
416420

417-
[src/types/algorand-client-transaction-sender.ts:803](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L803)
421+
[src/types/algorand-client-transaction-sender.ts:808](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L808)
418422

419423
___
420424

@@ -454,6 +458,7 @@ await algorand.send.appDelete({
454458
// Max fee doesn't make sense with extraFee AND staticFee
455459
// already specified, but here for completeness
456460
maxFee: (3000).microAlgo(),
461+
rejectVersion: 1,
457462
// Signer only needed if you want to provide one,
458463
// generally you'd register it with AlgorandClient
459464
// against the sender and not need to pass it in
@@ -479,7 +484,7 @@ await algorand.send.appDelete({
479484

480485
#### Defined in
481486

482-
[src/types/algorand-client-transaction-sender.ts:689](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L689)
487+
[src/types/algorand-client-transaction-sender.ts:692](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L692)
483488

484489
___
485490

@@ -531,6 +536,7 @@ await algorand.send.appDeleteMethodCall({
531536
// Max fee doesn't make sense with extraFee AND staticFee
532537
// already specified, but here for completeness
533538
maxFee: (3000).microAlgo(),
539+
rejectVersion: 1,
534540
// Signer only needed if you want to provide one,
535541
// generally you'd register it with AlgorandClient
536542
// against the sender and not need to pass it in
@@ -556,7 +562,7 @@ await algorand.send.appDeleteMethodCall({
556562

557563
#### Defined in
558564

559-
[src/types/algorand-client-transaction-sender.ts:921](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L921)
565+
[src/types/algorand-client-transaction-sender.ts:928](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L928)
560566

561567
___
562568

@@ -598,6 +604,7 @@ await algorand.send.appUpdate({
598604
// Max fee doesn't make sense with extraFee AND staticFee
599605
// already specified, but here for completeness
600606
maxFee: (3000).microAlgo(),
607+
rejectVersion: 1,
601608
// Signer only needed if you want to provide one,
602609
// generally you'd register it with AlgorandClient
603610
// against the sender and not need to pass it in
@@ -623,7 +630,7 @@ await algorand.send.appUpdate({
623630

624631
#### Defined in
625632

626-
[src/types/algorand-client-transaction-sender.ts:643](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L643)
633+
[src/types/algorand-client-transaction-sender.ts:645](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L645)
627634

628635
___
629636

@@ -677,6 +684,7 @@ await algorand.send.appUpdateMethodCall({
677684
// Max fee doesn't make sense with extraFee AND staticFee
678685
// already specified, but here for completeness
679686
maxFee: (3000).microAlgo(),
687+
rejectVersion: 1,
680688
// Signer only needed if you want to provide one,
681689
// generally you'd register it with AlgorandClient
682690
// against the sender and not need to pass it in
@@ -702,7 +710,7 @@ await algorand.send.appUpdateMethodCall({
702710

703711
#### Defined in
704712

705-
[src/types/algorand-client-transaction-sender.ts:863](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L863)
713+
[src/types/algorand-client-transaction-sender.ts:869](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L869)
706714

707715
___
708716

@@ -1060,7 +1068,7 @@ const result = await algorand.send.offlineKeyRegistration({
10601068

10611069
#### Defined in
10621070

1063-
[src/types/algorand-client-transaction-sender.ts:1058](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L1058)
1071+
[src/types/algorand-client-transaction-sender.ts:1066](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L1066)
10641072

10651073
___
10661074

@@ -1126,7 +1134,7 @@ const result = await algorand.send.onlineKeyRegistration({
11261134

11271135
#### Defined in
11281136

1129-
[src/types/algorand-client-transaction-sender.ts:1025](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L1025)
1137+
[src/types/algorand-client-transaction-sender.ts:1033](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-transaction-sender.ts#L1033)
11301138

11311139
___
11321140

docs/code/classes/types_app_arc56.Arc56Method.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ algosdk.ABIMethod.description
8686

8787
#### Defined in
8888

89-
node_modules/algosdk/dist/types/abi/method.d.ts:28
89+
node_modules/algosdk/types/abi/method.d.ts:28
9090

9191
___
9292

@@ -100,7 +100,7 @@ algosdk.ABIMethod.events
100100

101101
#### Defined in
102102

103-
node_modules/algosdk/dist/types/abi/method.d.ts:38
103+
node_modules/algosdk/types/abi/method.d.ts:38
104104

105105
___
106106

@@ -124,7 +124,7 @@ algosdk.ABIMethod.name
124124

125125
#### Defined in
126126

127-
node_modules/algosdk/dist/types/abi/method.d.ts:27
127+
node_modules/algosdk/types/abi/method.d.ts:27
128128

129129
___
130130

@@ -138,7 +138,7 @@ algosdk.ABIMethod.readonly
138138

139139
#### Defined in
140140

141-
node_modules/algosdk/dist/types/abi/method.d.ts:39
141+
node_modules/algosdk/types/abi/method.d.ts:39
142142

143143
___
144144

@@ -178,7 +178,7 @@ algosdk.ABIMethod.getSelector
178178

179179
#### Defined in
180180

181-
node_modules/algosdk/dist/types/abi/method.d.ts:42
181+
node_modules/algosdk/types/abi/method.d.ts:42
182182

183183
___
184184

@@ -196,7 +196,7 @@ algosdk.ABIMethod.getSignature
196196

197197
#### Defined in
198198

199-
node_modules/algosdk/dist/types/abi/method.d.ts:41
199+
node_modules/algosdk/types/abi/method.d.ts:41
200200

201201
___
202202

@@ -232,7 +232,7 @@ algosdk.ABIMethod.txnCount
232232

233233
#### Defined in
234234

235-
node_modules/algosdk/dist/types/abi/method.d.ts:43
235+
node_modules/algosdk/types/abi/method.d.ts:43
236236

237237
___
238238

@@ -256,4 +256,4 @@ algosdk.ABIMethod.fromSignature
256256

257257
#### Defined in
258258

259-
node_modules/algosdk/dist/types/abi/method.d.ts:45
259+
node_modules/algosdk/types/abi/method.d.ts:45

0 commit comments

Comments
 (0)