How can I make transaction output time locked?Is the time value in transaction or block information the time it arrived at my client?How do you publish a transaction which is cancelled if not claimed by a given time?Is there any way to make an UTXO that cannot be spent until a certain block #?Bitcoin contracts with stickK.com functionalityIs my understanding of locktime correct?How do I use CHECKLOCKTIMEVERIFY to prevent a transaction being spent before 100 blocks?Is it safe to keep ONLY a time-locked tx?What OP code can I use in the scripting system to make a smart contract that acts similar to a lotteryIs it posible to create a transaction output that can either be reddemed by privK of Addr A or by privK of Addr B AFTER certain blockheight?How to spend a multisignature, CLTV time-locked UTXO?
Why did Intel abandon unified CPU cache?
Is it possible to have a wealthy country without a middle class?
The Frozen Wastes
Non-aqueous eyes?
How can one's career as a reviewer be ended?
Is there a set of positive integers of density 1 which contains no infinite arithmetic progression?
How to hide rifle during medieval town entrance inspection?
Teaching a class likely meant to inflate the GPA of student athletes
With Ubuntu 18.04, how can I have a hot corner that locks the computer?
What is this airplane?
What aircraft was used as Air Force One for the flight between Southampton and Shannon?
Why was this person allowed to become Grand Maester?
Is this a bug in plotting step functions?
Why are MBA programs closing?
What are some really overused phrases in French that are common nowadays?
Origin of "boor"
Is it possible for a vehicle to be manufactured without a catalytic converter?
Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?
What is the color of artificial intelligence?
Understanding "Current Draw" in terms of "Ohm's Law"
How to safely destroy (a large quantity of) valid checks?
How can I make transaction output time locked?
Is using 'echo' to display attacker-controlled data on the terminal dangerous?
What would be the way to say "just saying" in German? (Not the literal translation)
How can I make transaction output time locked?
Is the time value in transaction or block information the time it arrived at my client?How do you publish a transaction which is cancelled if not claimed by a given time?Is there any way to make an UTXO that cannot be spent until a certain block #?Bitcoin contracts with stickK.com functionalityIs my understanding of locktime correct?How do I use CHECKLOCKTIMEVERIFY to prevent a transaction being spent before 100 blocks?Is it safe to keep ONLY a time-locked tx?What OP code can I use in the scripting system to make a smart contract that acts similar to a lotteryIs it posible to create a transaction output that can either be reddemed by privK of Addr A or by privK of Addr B AFTER certain blockheight?How to spend a multisignature, CLTV time-locked UTXO?
Is it possible to submit some coins to some address and make them spendable after some period of time?
Like I want submit 1btc to address 1Kc24m... and make that output to be spendable after january 1st 2030.
locktime checklocktimeverify
add a comment |
Is it possible to submit some coins to some address and make them spendable after some period of time?
Like I want submit 1btc to address 1Kc24m... and make that output to be spendable after january 1st 2030.
locktime checklocktimeverify
add a comment |
Is it possible to submit some coins to some address and make them spendable after some period of time?
Like I want submit 1btc to address 1Kc24m... and make that output to be spendable after january 1st 2030.
locktime checklocktimeverify
Is it possible to submit some coins to some address and make them spendable after some period of time?
Like I want submit 1btc to address 1Kc24m... and make that output to be spendable after january 1st 2030.
locktime checklocktimeverify
locktime checklocktimeverify
edited 7 hours ago
Ugam Kamat
1,957422
1,957422
asked 9 hours ago
MichalMichal
297147
297147
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Yes, you can use OP_CHECKLOCKTIMEVERIFY
opcode in the locking script of the output. This opcode takes either blocks or Unix Epoch Time (seconds since 1-Jan-1970) as the parameter to lock. If the parameter is non-zero and below 500 million, it is interpreted as a block height, if it is greater than or equal to 500 million, it is interpreted as a Unix Epoch timestamp. When you would reference this UTXO at the time of spending, you need to set the transaction nLocktime
equal to or great than the OP_CHECKLOCKTIMEVERIFY
. The nLocktime
parameter while spending should be same as what was specified in the CLTV; i.e. if the CLTV locking parameter was in blocks, it should be specified in blocks, otherwise in Unix Epoch timestamp.
Since you want it to be spendable after 1st Jan 2030, that is equivalent to timestamp of 1,893,456,000 (or 0x70dbd880). So your locking script will be concatenation of:
OP_DATA (size of CLTV_expiry): 0x04
CLTV (little endian): 0x80d8db70
OP_CLTV: 0xb1
OP_DROP: 0x75
OP_DUP: 0x76
OP_HASH160: 0xa9
OP_DATA (size of address): 0x14
Address: <address>
OP_EQUALVERIFY: 0x88
OP_CHECKSIG: 0xac
Two things to note: (1) When you are spending this transaction, the input referencing this UTXO needs to have nSequence
value between 0xF0000000 to 0xFFFFFFFE. (2) Median_time (time of last 11 blocks) is used to check nLocktime
when the script is evaluated which is generally about hour behind the actual time on your wall clock.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "308"
;
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f88234%2fhow-can-i-make-transaction-output-time-locked%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Yes, you can use OP_CHECKLOCKTIMEVERIFY
opcode in the locking script of the output. This opcode takes either blocks or Unix Epoch Time (seconds since 1-Jan-1970) as the parameter to lock. If the parameter is non-zero and below 500 million, it is interpreted as a block height, if it is greater than or equal to 500 million, it is interpreted as a Unix Epoch timestamp. When you would reference this UTXO at the time of spending, you need to set the transaction nLocktime
equal to or great than the OP_CHECKLOCKTIMEVERIFY
. The nLocktime
parameter while spending should be same as what was specified in the CLTV; i.e. if the CLTV locking parameter was in blocks, it should be specified in blocks, otherwise in Unix Epoch timestamp.
Since you want it to be spendable after 1st Jan 2030, that is equivalent to timestamp of 1,893,456,000 (or 0x70dbd880). So your locking script will be concatenation of:
OP_DATA (size of CLTV_expiry): 0x04
CLTV (little endian): 0x80d8db70
OP_CLTV: 0xb1
OP_DROP: 0x75
OP_DUP: 0x76
OP_HASH160: 0xa9
OP_DATA (size of address): 0x14
Address: <address>
OP_EQUALVERIFY: 0x88
OP_CHECKSIG: 0xac
Two things to note: (1) When you are spending this transaction, the input referencing this UTXO needs to have nSequence
value between 0xF0000000 to 0xFFFFFFFE. (2) Median_time (time of last 11 blocks) is used to check nLocktime
when the script is evaluated which is generally about hour behind the actual time on your wall clock.
add a comment |
Yes, you can use OP_CHECKLOCKTIMEVERIFY
opcode in the locking script of the output. This opcode takes either blocks or Unix Epoch Time (seconds since 1-Jan-1970) as the parameter to lock. If the parameter is non-zero and below 500 million, it is interpreted as a block height, if it is greater than or equal to 500 million, it is interpreted as a Unix Epoch timestamp. When you would reference this UTXO at the time of spending, you need to set the transaction nLocktime
equal to or great than the OP_CHECKLOCKTIMEVERIFY
. The nLocktime
parameter while spending should be same as what was specified in the CLTV; i.e. if the CLTV locking parameter was in blocks, it should be specified in blocks, otherwise in Unix Epoch timestamp.
Since you want it to be spendable after 1st Jan 2030, that is equivalent to timestamp of 1,893,456,000 (or 0x70dbd880). So your locking script will be concatenation of:
OP_DATA (size of CLTV_expiry): 0x04
CLTV (little endian): 0x80d8db70
OP_CLTV: 0xb1
OP_DROP: 0x75
OP_DUP: 0x76
OP_HASH160: 0xa9
OP_DATA (size of address): 0x14
Address: <address>
OP_EQUALVERIFY: 0x88
OP_CHECKSIG: 0xac
Two things to note: (1) When you are spending this transaction, the input referencing this UTXO needs to have nSequence
value between 0xF0000000 to 0xFFFFFFFE. (2) Median_time (time of last 11 blocks) is used to check nLocktime
when the script is evaluated which is generally about hour behind the actual time on your wall clock.
add a comment |
Yes, you can use OP_CHECKLOCKTIMEVERIFY
opcode in the locking script of the output. This opcode takes either blocks or Unix Epoch Time (seconds since 1-Jan-1970) as the parameter to lock. If the parameter is non-zero and below 500 million, it is interpreted as a block height, if it is greater than or equal to 500 million, it is interpreted as a Unix Epoch timestamp. When you would reference this UTXO at the time of spending, you need to set the transaction nLocktime
equal to or great than the OP_CHECKLOCKTIMEVERIFY
. The nLocktime
parameter while spending should be same as what was specified in the CLTV; i.e. if the CLTV locking parameter was in blocks, it should be specified in blocks, otherwise in Unix Epoch timestamp.
Since you want it to be spendable after 1st Jan 2030, that is equivalent to timestamp of 1,893,456,000 (or 0x70dbd880). So your locking script will be concatenation of:
OP_DATA (size of CLTV_expiry): 0x04
CLTV (little endian): 0x80d8db70
OP_CLTV: 0xb1
OP_DROP: 0x75
OP_DUP: 0x76
OP_HASH160: 0xa9
OP_DATA (size of address): 0x14
Address: <address>
OP_EQUALVERIFY: 0x88
OP_CHECKSIG: 0xac
Two things to note: (1) When you are spending this transaction, the input referencing this UTXO needs to have nSequence
value between 0xF0000000 to 0xFFFFFFFE. (2) Median_time (time of last 11 blocks) is used to check nLocktime
when the script is evaluated which is generally about hour behind the actual time on your wall clock.
Yes, you can use OP_CHECKLOCKTIMEVERIFY
opcode in the locking script of the output. This opcode takes either blocks or Unix Epoch Time (seconds since 1-Jan-1970) as the parameter to lock. If the parameter is non-zero and below 500 million, it is interpreted as a block height, if it is greater than or equal to 500 million, it is interpreted as a Unix Epoch timestamp. When you would reference this UTXO at the time of spending, you need to set the transaction nLocktime
equal to or great than the OP_CHECKLOCKTIMEVERIFY
. The nLocktime
parameter while spending should be same as what was specified in the CLTV; i.e. if the CLTV locking parameter was in blocks, it should be specified in blocks, otherwise in Unix Epoch timestamp.
Since you want it to be spendable after 1st Jan 2030, that is equivalent to timestamp of 1,893,456,000 (or 0x70dbd880). So your locking script will be concatenation of:
OP_DATA (size of CLTV_expiry): 0x04
CLTV (little endian): 0x80d8db70
OP_CLTV: 0xb1
OP_DROP: 0x75
OP_DUP: 0x76
OP_HASH160: 0xa9
OP_DATA (size of address): 0x14
Address: <address>
OP_EQUALVERIFY: 0x88
OP_CHECKSIG: 0xac
Two things to note: (1) When you are spending this transaction, the input referencing this UTXO needs to have nSequence
value between 0xF0000000 to 0xFFFFFFFE. (2) Median_time (time of last 11 blocks) is used to check nLocktime
when the script is evaluated which is generally about hour behind the actual time on your wall clock.
edited 7 hours ago
answered 8 hours ago
Ugam KamatUgam Kamat
1,957422
1,957422
add a comment |
add a comment |
Thanks for contributing an answer to Bitcoin Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f88234%2fhow-can-i-make-transaction-output-time-locked%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown