You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: data/transactions/logic/README.md
+1
Original file line number
Diff line number
Diff line change
@@ -165,6 +165,7 @@ various sizes.
165
165
|`extract_uint16`| pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+2, convert bytes as big endian and push the uint64 result. If B+2 is larger than the array length, the program fails |
166
166
|`extract_uint32`| pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+4, convert bytes as big endian and push the uint64 result. If B+4 is larger than the array length, the program fails |
167
167
|`extract_uint64`| pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+8, convert bytes as big endian and push the uint64 result. If B+8 is larger than the array length, the program fails |
168
+
|`base64_decode e`| decode X which was base64-encoded using _encoding alphabet_ E. Fail if X is not base64 encoded with alphabet E |
168
169
169
170
These opcodes take byte-array values that are interpreted as
170
171
big-endian unsigned integers. For mathematical operators, the
Copy file name to clipboardexpand all lines: data/transactions/logic/TEAL_opcodes.md
+11
Original file line number
Diff line number
Diff line change
@@ -854,6 +854,17 @@ When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on
854
854
- pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+8, convert bytes as big endian and push the uint64 result. If B+8 is larger than the array length, the program fails
855
855
- LogicSigVersion >= 5
856
856
857
+
## base64_decode e
858
+
859
+
- Opcode: 0x5c {uint8 alphabet index}
860
+
- Pops: *... stack*, []byte
861
+
- Pushes: []byte
862
+
- decode X which was base64-encoded using _encoding alphabet_ E. Fail if X is not base64 encoded with alphabet E
863
+
-**Cost**: 25
864
+
- LogicSigVersion >= 6
865
+
866
+
decodes X using the base64 encoding alphabet E. Specify the alphabet with an immediate arg either as URL and Filename Safe (`URLAlph`) or Standard (`StdAlph`). See <ahref="https://rfc-editor.org/rfc/rfc4648.html#section-4">RFC 4648</a> (sections 4 and 5)
Copy file name to clipboardexpand all lines: data/transactions/logic/doc.go
+5-1
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,7 @@ var opDocByName = map[string]string{
133
133
"extract_uint16": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+2, convert bytes as big endian and push the uint64 result. If B+2 is larger than the array length, the program fails",
134
134
"extract_uint32": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+4, convert bytes as big endian and push the uint64 result. If B+4 is larger than the array length, the program fails",
135
135
"extract_uint64": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+8, convert bytes as big endian and push the uint64 result. If B+8 is larger than the array length, the program fails",
136
+
"base64_decode": "decode X which was base64-encoded using _encoding alphabet_ E. Fail if X is not base64 encoded with alphabet E",
136
137
137
138
"balance": "get balance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted.",
138
139
"min_balance": "get minimum required balance for account A, in microalgos. Required balance is affected by [ASA](https://developer.algorand.org/docs/features/asa/#assets-overview) and [App](https://developer.algorand.org/docs/features/asc1/stateful/#minimum-balance-requirement-for-a-smart-contract) usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes.",
@@ -229,6 +230,8 @@ var opcodeImmediateNotes = map[string]string{
229
230
"ecdsa_verify": "{uint8 curve index}",
230
231
"ecdsa_pk_decompress": "{uint8 curve index}",
231
232
"ecdsa_pk_recover": "{uint8 curve index}",
233
+
234
+
"base64_decode": "{uint8 alphabet index}",
232
235
}
233
236
234
237
// OpImmediateNote returns a short string about immediate data which follows the op byte
@@ -283,6 +286,7 @@ var opDocExtras = map[string]string{
283
286
"itxn_begin": "`itxn_begin` initializes Sender to the application address; Fee to the minimum allowable, taking into account MinTxnFee and credit from overpaying in earlier transactions; FirstValid/LastValid to the values in the top-level transaction, and all other fields to zero values.",
284
287
"itxn_field": "`itxn_field` fails if X is of the wrong type for F, including a byte array of the wrong size for use as an address when F is an address field. `itxn_field` also fails if X is an account or asset that does not appear in `txn.Accounts` or `txn.ForeignAssets` of the top-level transaction. (Setting addresses in asset creation are exempted from this requirement.)",
285
288
"itxn_submit": "`itxn_submit` resets the current transaction so that it can not be resubmitted. A new `itxn_begin` is required to prepare another inner transaction.",
289
+
"base64_decode": "decodes X using the base64 encoding alphabet E. Specify the alphabet with an immediate arg either as URL and Filename Safe (`URLAlph`) or Standard (`StdAlph`). See <a href=\"https://rfc-editor.org/rfc/rfc4648.html#section-4\">RFC 4648</a> (sections 4 and 5)",
286
290
}
287
291
288
292
// OpDocExtra returns extra documentation text about an op
0 commit comments