Skip to content
This repository was archived by the owner on Jul 28, 2022. It is now read-only.
This repository was archived by the owner on Jul 28, 2022. It is now read-only.

new word: Lock & Unlock  #6

Open

Description

@Ljzn

This is a proposal for 2 new words:

Unlock

spec: ( txid output_index unlock_script -- bool )

Lock

spec: ( txid { lock_script } -- txid1 )

  • { } is a list

Activity

  1. Ljzn commented on Sep 1, 2020

    @Ljzn
    OwnerAuthor

    One fantastic of forth is you can produce massive side effects, think about a washing machine.

    We don't even have the list now!

  2. Ljzn commented on Sep 2, 2020

    @Ljzn
    OwnerAuthor

    Think about a template of the script: just like the HTML template, most things are static, and little things are dynamic. For P2PKH template, the pubkeyhash is dynamic.

    If we have a monitor to sync all transactions that have the template we want, then we can run a MiniForth module repeatedly -- because the code can handle the lock script (for P2PKH, again, we know the privatekeys). And according to the result of unlock operation (in fact, it can return values other than bool), create new lockscripts.

    The whole process is more like a human reacting to the changes in the world, than an automatic machine agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions