States / Availability
Availability is the main state machine that powers String Theory. States are focused on modeling whether or not money is available to be used. If you need additional states use custom tags to be able to identify other states that are meaningful to you.
State Machine
Section titled “State Machine”States Descriptions
Section titled “States Descriptions”Money is used to mean any type of value in this section for ease of reading, but knots can represent non-monetary value as well.
Available
Section titled “Available”The money represented by this knot is allowed to be withdrawn. This is similar to available balance in your bank account, it’s money that is in your account and free to be used.
Properties
Section titled “Properties”- Contributes to available balance
- Can be withdrawn or transferred
Withdrawn
Section titled “Withdrawn”The money represented by this knot has been used. This is similar to your outbound transactions in your bank account, it’s money that has been spent. Withdrawn knots serve as a record of the money that moved through your account/system but is no longer there.
Properties
Section titled “Properties”- Does not contribute to available balance
- Cannot be withdrawn or transferred
- Can be returned to become available again
Pending Deposit
Section titled “Pending Deposit”This knot represents money that you are expecting to enter your system, but has not cleared yet. This is similar to pending credits in your bank account, it’s money that is expected to be available soon. Pending deposit knots serve as a record of the money that is expected to move into your account/system.
Properties
Section titled “Properties”- Does not contribute to available balance
- Cannot be withdrawn or transferred
- Can be confirmed to become available
Pending Withdrawal
Section titled “Pending Withdrawal”This knot represents money that you are expecting to leave your system, but has not cleared yet. This is similar to pending debits in your bank account, it’s money that is expected to be gone soon. Pending withdrawal knots serve as a record of the money that is expected to move out of your account/system.
Properties
Section titled “Properties”- Does not contribute to available balance
- Cannot be transferred
- Can be confirmed to become withdrawn
- Can be canceled to become available again
Pending Return
Section titled “Pending Return”This knot represents money that you are expecting to re-enter your system, but is not available yet. This is similar to a pending deposit: it’s money that is expected to be available soon. Except, unlike a pending deposit which is new money, a pending return is money that system already knows about but that was previously withdrawn.
Properties
Section titled “Properties”- Does not contribute to available balance
- Cannot be transferred
- Can be confirmed to become available
- Can be canceled to become withdrawn again
Cancelled
Section titled “Cancelled”This knot represents money that you were expecting to enter the system, but later found out that it would not arrive. This is a terminal state. If you later find out that money will arrive, you’ll want to use deposit or pending deposit.
Properties
Section titled “Properties”- Does not contribute to available balance
- Cannot be withdrawn or transferred
- Cannot move to any other state