What is Nostr?
Danny / Danny Morabito
npub1ven…ddfh
2024-10-22 10:01:44
in reply to nevent1q…7vrz

Danny on Nostr: I'm not at all an expert in this area, I have never coded a Java card, but I looked ...

I'm not at all an expert in this area, I have never coded a Java card, but I looked into this a bit; javacard.framework.Applet defines a method called process(javacard.framework.APDU) which gets called whenever there is an incoming packet of information, and allows it to receive any kind of arbitrary data. This means that it's absolutely possible to code any instruction you would want, in fact from what I'm reading from the documentation, the byte at position ISO7816.OFFSET_INS, is designed specifically for that. So you'd check if it's whatever constant you set to getting sats and then read the following n bytes as the amount, the card can then respond with an ecash token of that amount without any issue.
Author Public Key
npub1ven4zk8xxw873876gx8y9g9l9fazkye9qnwnglcptgvfwxmygscqsxddfh