Satscard class

Inheritance

Constructors

Satscard(SatscardConstructorParams params)
Used to construct a Satscard from native data

Properties

activeSlotIndex int
getter/setter pair
appletVersion String
finalinherited
authDelay int
getter/setter pairinherited
birthHeight int
finalinherited
handle int
finalinherited
hashCode int
The hash code for this object.
no setterinherited
hasUnusedSlots bool
getter/setter pair
ident String
finalinherited
isCertsChecked bool
getter/setter pairinherited
isTampered bool
finalinherited
isTapsigner bool
no setterinherited
isTestnet bool
finalinherited
isUsedUp bool
getter/setter pair
needSetup bool
getter/setter pairinherited
numSlots int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type CardType
finalinherited

Methods

certificateCheck(Transport transport) Future<void>
Checks the certificate of the Satscard to ensure it's an authentic card. isCertsChecked will be updated based on the result
getActiveSlot() Future<Slot>
Constructs and returns the active slot of the Satscard, if one exists. Any Satscard which hasn't been fully used up will have an active slot, however if isUsedUp is true then this will fail
getSlot(Transport transport, int slot, {String spendCode = ""}) Future<Slot>
Requests the given slot from the Satscard. If the spendCode is provided then the private key will also be revealed for SlotStatus.unsealed slots
listSlots(Transport transport, {String spendCode = "", int limit = 10}) Future<List<Slot>>
Requests every slot from the Satscard. If the spendCode is provided then the private keys will also be available for SlotStatus.unsealed slots
newSlot(Transport transport, String spendCode, {String chainCode = ""}) Future<Slot>
Attempts to initialize the next slot of the Satscard, revealing a new public key and making the next slot active. If isUsedUp this will fail. chainCode must either be empty (and will be generated by the library) or a 64-character (32-byte) hex string. spendCode must be a 6-digit numeric code
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toSatscard() Satscard?
inherited
toString() String
A string representation of this object.
inherited
toTapsigner() Tapsigner?
inherited
unseal(Transport transport, String spendCode) Future<Slot>
Attempts to unseal the current slot revealing the private key for the active slot. If isUsedUp is true this will fail. spendCode must be a 6-digit numeric code
wait(Transport transport) Future<WaitResponse>
Sends a wait command to the device. This takes 1 second and once complete it will reduce the authDelay value by one (if > 0). Once an incorrect CVC or Spend Code is entered 3 times you must send 15 wait commands before you can try any secure function again
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromTransport(Transport transport) Future<Satscard>
override