Communities

Kaspa Q&A
Kaspa Q&A
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Kaspa Q&A

Can we enable subscriptions on KIP-17?

+1
−0

KIP-17 allows scripts to constrain how the owner spends.

Can it also allow scripts to define conditions under which a third party can spend without the owner's signature?

For example: 'Address X can claim up to Y KAS from this UTXO every Z blocks without my signature.

History

0 comment threads

1 answer

+1
−0

Yes. Your specific use case can already be implemented via KIP 10, that enables some covenants functionality.

Assuming Alice wants to grant Bob the permission to charge her with 10 KAS/month, she sends some funds to a script that enforces:

  1. Alice can spend the UTXO unconditionally.
  2. If Bob wants to spend, he needs to wait 100 blocks (or any other number). This can be enforced via 100 OpCheckSequenceVerify.
  3. Bob's transaction has to only have two outputs, 1 that goes to Bob and sends 10 KAS, and the that goes to the same address the UTXO was spent from, and send there the rest of the funds (except for some fee). This can be done with combination of OpTxInputIndex,OpTxOutputCount, OpTxInputAmount, OpTxInputSpk, OpTxOutputAmount and OpTxOutputSpk.
History

1 comment thread

Could this covenant script be a user's primary wallet address? So they're not moving funds to a separ... (2 comments)

Sign up to answer this question »