Stellar TimeLock for Birthday Gift

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
6
down vote

favorite












Say Alice wants to send Bob 100 XLM for his birthday, but she is often traveling and may not remember to carry out the Tx on the day of Bob's birthday...



Time lock just specifies when a Tx can be signed and submitted to the network.



Is there a way to sign/submit a Tx that will 'execute' itself at a specific time&date in the future?



Any ideas on how to do this with Stellar?










share|improve this question

























    up vote
    6
    down vote

    favorite












    Say Alice wants to send Bob 100 XLM for his birthday, but she is often traveling and may not remember to carry out the Tx on the day of Bob's birthday...



    Time lock just specifies when a Tx can be signed and submitted to the network.



    Is there a way to sign/submit a Tx that will 'execute' itself at a specific time&date in the future?



    Any ideas on how to do this with Stellar?










    share|improve this question























      up vote
      6
      down vote

      favorite









      up vote
      6
      down vote

      favorite











      Say Alice wants to send Bob 100 XLM for his birthday, but she is often traveling and may not remember to carry out the Tx on the day of Bob's birthday...



      Time lock just specifies when a Tx can be signed and submitted to the network.



      Is there a way to sign/submit a Tx that will 'execute' itself at a specific time&date in the future?



      Any ideas on how to do this with Stellar?










      share|improve this question













      Say Alice wants to send Bob 100 XLM for his birthday, but she is often traveling and may not remember to carry out the Tx on the day of Bob's birthday...



      Time lock just specifies when a Tx can be signed and submitted to the network.



      Is there a way to sign/submit a Tx that will 'execute' itself at a specific time&date in the future?



      Any ideas on how to do this with Stellar?







      smart-contract






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 31 at 0:02









      AliceXLM

      332




      332




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          7
          down vote



          accepted










          This capability is not on-network. Third party solution(s) exist. For example: https://galactictalk.org/d/1466-smart-stellar-timed-payments






          share|improve this answer




















          • K lovely! Thank you :-)
            – AliceXLM
            Aug 31 at 9:48

















          up vote
          2
          down vote













          Another solution is to have Alice create and fund a new account C and sign a timebound transaction to merge C into Bob account. Then she can share the transaction with Bob before his birthday, he has the transaction but he has to wait his birthday to submit it to the network and redeem his gift.



          Alice can set the thresholds and signatures weighs of C so that Bob knows she can't move the funds out of the account before his birthday.



          First Alice needs to build the merge account transaction (here n is the Contract account sequence):



          Transaction #2



          • Source: C

          • Sequence: n+2

          • Time Bounds: (min=bob birthday, max=0)

          • Operations:

            1. Operation

              • Type: AccountMerge

              • Destination: B



          Alice would write down the transaction hash h(#2) and XDR.
          To setup the Contract C, Alice would send the following transaction to the network:



          Transaction #1



          • Source: C

          • Sequence: n+1

          • Operations:

            1. Operation

              • Type: SetOptions

              • MasterWeight: 0

              • LowThreshold: 2

              • MediumThreshold: 2

              • HighThreshold: 2

              • Signer: (type=ed25519, key=B, weight=1)


            2. Operation

              • Type: SetOptions

              • Signer: (type=pre-auth-tx, hash=h(#2), weight=1)



          On the day of its birthday, Bob would sign and submit transaction #2 to receive Alice gift. Before that date, neither Bob nor Alice are able to withdraw the funds.






          share|improve this answer






















          • Is there actually a way to set things so that the merge account goes through but the account can’t send payments from it?
            – Paul
            Aug 31 at 14:01










          • Yes, let me edit the answer to expand on it
            – Francesco
            Aug 31 at 14:30

















          up vote
          1
          down vote













          I'm the author of https://test.artspirit.com/ and doing timed-payments is the main service of my site. It's working already on the testnet.



          Let me know if this one is what you are looking for. Any feedback
          on the current version is welcome.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "686"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstellar.stackexchange.com%2fquestions%2f1551%2fstellar-timelock-for-birthday-gift%23new-answer', 'question_page');

            );

            Post as a guest






























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            7
            down vote



            accepted










            This capability is not on-network. Third party solution(s) exist. For example: https://galactictalk.org/d/1466-smart-stellar-timed-payments






            share|improve this answer




















            • K lovely! Thank you :-)
              – AliceXLM
              Aug 31 at 9:48














            up vote
            7
            down vote



            accepted










            This capability is not on-network. Third party solution(s) exist. For example: https://galactictalk.org/d/1466-smart-stellar-timed-payments






            share|improve this answer




















            • K lovely! Thank you :-)
              – AliceXLM
              Aug 31 at 9:48












            up vote
            7
            down vote



            accepted







            up vote
            7
            down vote



            accepted






            This capability is not on-network. Third party solution(s) exist. For example: https://galactictalk.org/d/1466-smart-stellar-timed-payments






            share|improve this answer












            This capability is not on-network. Third party solution(s) exist. For example: https://galactictalk.org/d/1466-smart-stellar-timed-payments







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 31 at 0:06









            Synesso♦

            1,926223




            1,926223











            • K lovely! Thank you :-)
              – AliceXLM
              Aug 31 at 9:48
















            • K lovely! Thank you :-)
              – AliceXLM
              Aug 31 at 9:48















            K lovely! Thank you :-)
            – AliceXLM
            Aug 31 at 9:48




            K lovely! Thank you :-)
            – AliceXLM
            Aug 31 at 9:48










            up vote
            2
            down vote













            Another solution is to have Alice create and fund a new account C and sign a timebound transaction to merge C into Bob account. Then she can share the transaction with Bob before his birthday, he has the transaction but he has to wait his birthday to submit it to the network and redeem his gift.



            Alice can set the thresholds and signatures weighs of C so that Bob knows she can't move the funds out of the account before his birthday.



            First Alice needs to build the merge account transaction (here n is the Contract account sequence):



            Transaction #2



            • Source: C

            • Sequence: n+2

            • Time Bounds: (min=bob birthday, max=0)

            • Operations:

              1. Operation

                • Type: AccountMerge

                • Destination: B



            Alice would write down the transaction hash h(#2) and XDR.
            To setup the Contract C, Alice would send the following transaction to the network:



            Transaction #1



            • Source: C

            • Sequence: n+1

            • Operations:

              1. Operation

                • Type: SetOptions

                • MasterWeight: 0

                • LowThreshold: 2

                • MediumThreshold: 2

                • HighThreshold: 2

                • Signer: (type=ed25519, key=B, weight=1)


              2. Operation

                • Type: SetOptions

                • Signer: (type=pre-auth-tx, hash=h(#2), weight=1)



            On the day of its birthday, Bob would sign and submit transaction #2 to receive Alice gift. Before that date, neither Bob nor Alice are able to withdraw the funds.






            share|improve this answer






















            • Is there actually a way to set things so that the merge account goes through but the account can’t send payments from it?
              – Paul
              Aug 31 at 14:01










            • Yes, let me edit the answer to expand on it
              – Francesco
              Aug 31 at 14:30














            up vote
            2
            down vote













            Another solution is to have Alice create and fund a new account C and sign a timebound transaction to merge C into Bob account. Then she can share the transaction with Bob before his birthday, he has the transaction but he has to wait his birthday to submit it to the network and redeem his gift.



            Alice can set the thresholds and signatures weighs of C so that Bob knows she can't move the funds out of the account before his birthday.



            First Alice needs to build the merge account transaction (here n is the Contract account sequence):



            Transaction #2



            • Source: C

            • Sequence: n+2

            • Time Bounds: (min=bob birthday, max=0)

            • Operations:

              1. Operation

                • Type: AccountMerge

                • Destination: B



            Alice would write down the transaction hash h(#2) and XDR.
            To setup the Contract C, Alice would send the following transaction to the network:



            Transaction #1



            • Source: C

            • Sequence: n+1

            • Operations:

              1. Operation

                • Type: SetOptions

                • MasterWeight: 0

                • LowThreshold: 2

                • MediumThreshold: 2

                • HighThreshold: 2

                • Signer: (type=ed25519, key=B, weight=1)


              2. Operation

                • Type: SetOptions

                • Signer: (type=pre-auth-tx, hash=h(#2), weight=1)



            On the day of its birthday, Bob would sign and submit transaction #2 to receive Alice gift. Before that date, neither Bob nor Alice are able to withdraw the funds.






            share|improve this answer






















            • Is there actually a way to set things so that the merge account goes through but the account can’t send payments from it?
              – Paul
              Aug 31 at 14:01










            • Yes, let me edit the answer to expand on it
              – Francesco
              Aug 31 at 14:30












            up vote
            2
            down vote










            up vote
            2
            down vote









            Another solution is to have Alice create and fund a new account C and sign a timebound transaction to merge C into Bob account. Then she can share the transaction with Bob before his birthday, he has the transaction but he has to wait his birthday to submit it to the network and redeem his gift.



            Alice can set the thresholds and signatures weighs of C so that Bob knows she can't move the funds out of the account before his birthday.



            First Alice needs to build the merge account transaction (here n is the Contract account sequence):



            Transaction #2



            • Source: C

            • Sequence: n+2

            • Time Bounds: (min=bob birthday, max=0)

            • Operations:

              1. Operation

                • Type: AccountMerge

                • Destination: B



            Alice would write down the transaction hash h(#2) and XDR.
            To setup the Contract C, Alice would send the following transaction to the network:



            Transaction #1



            • Source: C

            • Sequence: n+1

            • Operations:

              1. Operation

                • Type: SetOptions

                • MasterWeight: 0

                • LowThreshold: 2

                • MediumThreshold: 2

                • HighThreshold: 2

                • Signer: (type=ed25519, key=B, weight=1)


              2. Operation

                • Type: SetOptions

                • Signer: (type=pre-auth-tx, hash=h(#2), weight=1)



            On the day of its birthday, Bob would sign and submit transaction #2 to receive Alice gift. Before that date, neither Bob nor Alice are able to withdraw the funds.






            share|improve this answer














            Another solution is to have Alice create and fund a new account C and sign a timebound transaction to merge C into Bob account. Then she can share the transaction with Bob before his birthday, he has the transaction but he has to wait his birthday to submit it to the network and redeem his gift.



            Alice can set the thresholds and signatures weighs of C so that Bob knows she can't move the funds out of the account before his birthday.



            First Alice needs to build the merge account transaction (here n is the Contract account sequence):



            Transaction #2



            • Source: C

            • Sequence: n+2

            • Time Bounds: (min=bob birthday, max=0)

            • Operations:

              1. Operation

                • Type: AccountMerge

                • Destination: B



            Alice would write down the transaction hash h(#2) and XDR.
            To setup the Contract C, Alice would send the following transaction to the network:



            Transaction #1



            • Source: C

            • Sequence: n+1

            • Operations:

              1. Operation

                • Type: SetOptions

                • MasterWeight: 0

                • LowThreshold: 2

                • MediumThreshold: 2

                • HighThreshold: 2

                • Signer: (type=ed25519, key=B, weight=1)


              2. Operation

                • Type: SetOptions

                • Signer: (type=pre-auth-tx, hash=h(#2), weight=1)



            On the day of its birthday, Bob would sign and submit transaction #2 to receive Alice gift. Before that date, neither Bob nor Alice are able to withdraw the funds.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 31 at 14:50

























            answered Aug 31 at 12:46









            Francesco

            892417




            892417











            • Is there actually a way to set things so that the merge account goes through but the account can’t send payments from it?
              – Paul
              Aug 31 at 14:01










            • Yes, let me edit the answer to expand on it
              – Francesco
              Aug 31 at 14:30
















            • Is there actually a way to set things so that the merge account goes through but the account can’t send payments from it?
              – Paul
              Aug 31 at 14:01










            • Yes, let me edit the answer to expand on it
              – Francesco
              Aug 31 at 14:30















            Is there actually a way to set things so that the merge account goes through but the account can’t send payments from it?
            – Paul
            Aug 31 at 14:01




            Is there actually a way to set things so that the merge account goes through but the account can’t send payments from it?
            – Paul
            Aug 31 at 14:01












            Yes, let me edit the answer to expand on it
            – Francesco
            Aug 31 at 14:30




            Yes, let me edit the answer to expand on it
            – Francesco
            Aug 31 at 14:30










            up vote
            1
            down vote













            I'm the author of https://test.artspirit.com/ and doing timed-payments is the main service of my site. It's working already on the testnet.



            Let me know if this one is what you are looking for. Any feedback
            on the current version is welcome.






            share|improve this answer
























              up vote
              1
              down vote













              I'm the author of https://test.artspirit.com/ and doing timed-payments is the main service of my site. It's working already on the testnet.



              Let me know if this one is what you are looking for. Any feedback
              on the current version is welcome.






              share|improve this answer






















                up vote
                1
                down vote










                up vote
                1
                down vote









                I'm the author of https://test.artspirit.com/ and doing timed-payments is the main service of my site. It's working already on the testnet.



                Let me know if this one is what you are looking for. Any feedback
                on the current version is welcome.






                share|improve this answer












                I'm the author of https://test.artspirit.com/ and doing timed-payments is the main service of my site. It's working already on the testnet.



                Let me know if this one is what you are looking for. Any feedback
                on the current version is welcome.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 1 at 22:02









                bluesky

                414




                414



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstellar.stackexchange.com%2fquestions%2f1551%2fstellar-timelock-for-birthday-gift%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    這個網誌中的熱門文章

                    How to combine Bézier curves to a surface?

                    Mutual Information Always Non-negative

                    Why am i infinitely getting the same tweet with the Twitter Search API?