• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
          • Command-error
          • Sign
          • Init-from-mnemonic
          • Command-error-message
          • Stat
          • Next-key
          • Init-from-entropy
          • Process-command
          • Transaction-message
          • Maybe-command-error
          • Maybe-stat
          • Check-stat-file-present
          • Valid-key-path-p
          • String-to-byte-list
          • Load-stat
          • Mnemonic-message
          • All-valid-key-paths-p
          • Process-sign
          • Process-init-from-entropy
          • String-to-word
          • String-to-nat
          • Process-next-key
          • Wallet
            • Process-init-from-mnemonic
            • Check-stat-file-absent
            • Stat-wfp
            • Save-stat
            • Stat-addresses-bounded-p
            • Stat-all-valid-key-paths-p
            • Stat-priv-keys-p
            • Stat-root-depth-zero-p
            • Stat-path-prefix-in-tree-p
            • Crypto-hdwallet-executable
            • *stat-filepath*
            • *key-path-prefix*
            • *coin-type-index*
            • *purpose-index*
            • *external-chain-index*
            • *command-name-init-from-mnemonic*
            • *command-name-init-from-entropy*
            • *account-index*
            • *command-name-sign*
            • *command-name-next-key*
          • Error-checking
          • Apt
          • Abnf
          • Fty-extensions
          • Isar
          • Kestrel-utilities
          • Prime-field-constraint-systems
          • Soft
          • Bv
          • Imp-language
          • Event-macros
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Java
          • C
          • Syntheto
          • Number-theory
          • Cryptography
          • Lists-light
          • File-io-light
          • Json
          • Built-ins
          • Solidity
          • Axe
          • Std-extensions
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • Crypto-hdwallet

    Wallet

    Entry point to the ACL2 code of the wallet.

    For the main documentation topic, please go up one level to CRYPTO-HDWALLET.

    This is a macro, with an associated function as is customary. The function processes the inputs from the shell script and displays the resulting message. The macro wraps the function call in a make-event that keeps the output ``clean'' and that automatically passes the ACL2 state to the function. The macro is called with the strings from the shell script as arguments.

    Macro: wallet

    (defmacro
     wallet (&rest inputs)
     (cons
      'with-output
      (cons
       ':off
       (cons
        ':all
        (cons
         ':on
         (cons
            'error
            (cons (cons 'make-event
                        (cons (cons 'wallet-fn
                                    (cons (cons 'list inputs) '(state)))
                              '(:on-behalf-of :quiet)))
                  'nil)))))))

    Definitions and Theorems

    Function: wallet-fn

    (defun wallet-fn (inputs state)
           (declare (xargs :stobjs (state)))
           (declare (xargs :guard (string-listp inputs)))
           (b* (((mv msg state)
                 (process-command inputs state))
                (- (cw "~%~@0~%" msg)))
               (value '(value-triple :invisible))))