|
|
@@ -24,12 +24,12 @@ class TransactionBuilder:
|
|
|
input.note = note
|
|
|
self.inputs.append(input)
|
|
|
|
|
|
- def add_output(self, value, token_id, public, depends, user_data):
|
|
|
+ def add_output(self, value, token_id, public, spend_hook, user_data):
|
|
|
output = ClassNamespace()
|
|
|
output.value = value
|
|
|
output.token_id = token_id
|
|
|
output.public = public
|
|
|
- output.depends = depends
|
|
|
+ output.spend_hook = spend_hook
|
|
|
output.user_data = user_data
|
|
|
self.outputs.append(output)
|
|
|
|
|
|
@@ -70,7 +70,7 @@ class TransactionBuilder:
|
|
|
tx_input.burn_proof = BurnProof(
|
|
|
input.note.value, input.note.token_id, input.note.value_blind,
|
|
|
token_blind, input.note.serial, input.note.coin_blind,
|
|
|
- input.secret, input.note.depends, input.note.user_data,
|
|
|
+ input.secret, input.note.spend_hook, input.note.user_data,
|
|
|
input.all_coins, signature_secret, self.ec)
|
|
|
tx_input.revealed = tx_input.burn_proof.get_revealed()
|
|
|
tx.inputs.append(tx_input)
|
|
|
@@ -92,7 +92,7 @@ class TransactionBuilder:
|
|
|
note.coin_blind = self.ec.random_base()
|
|
|
note.value_blind = value_blind
|
|
|
note.token_blind = token_blind
|
|
|
- note.depends = output.depends
|
|
|
+ note.spend_hook = output.spend_hook
|
|
|
note.user_data = output.user_data
|
|
|
|
|
|
tx_output = ClassNamespace()
|
|
|
@@ -101,7 +101,7 @@ class TransactionBuilder:
|
|
|
tx_output.mint_proof = MintProof(
|
|
|
note.value, note.token_id, note.value_blind,
|
|
|
note.token_blind, note.serial, note.coin_blind,
|
|
|
- output.public, output.depends, output.user_data, self.ec)
|
|
|
+ output.public, output.spend_hook, output.user_data, self.ec)
|
|
|
tx_output.revealed = tx_output.mint_proof.get_revealed()
|
|
|
assert tx_output.mint_proof.verify(tx_output.revealed)
|
|
|
|
|
|
@@ -201,7 +201,7 @@ class Transaction:
|
|
|
class BurnProof:
|
|
|
|
|
|
def __init__(self, value, token_id, value_blind, token_blind, serial,
|
|
|
- coin_blind, secret, depends, user_data, all_coins,
|
|
|
+ coin_blind, secret, spend_hook, user_data, all_coins,
|
|
|
signature_secret, ec):
|
|
|
self.value = value
|
|
|
self.token_id = token_id
|
|
|
@@ -210,7 +210,7 @@ class BurnProof:
|
|
|
self.serial = serial
|
|
|
self.coin_blind = coin_blind
|
|
|
self.secret = secret
|
|
|
- self.depends = depends
|
|
|
+ self.spend_hook = spend_hook
|
|
|
self.user_data = user_data
|
|
|
self.all_coins = all_coins
|
|
|
self.signature_secret = signature_secret
|
|
|
@@ -234,7 +234,7 @@ class BurnProof:
|
|
|
self.ec.G)
|
|
|
|
|
|
# This is fully public, no merkle tree or anything
|
|
|
- revealed.depends = self.depends
|
|
|
+ revealed.spend_hook = self.spend_hook
|
|
|
|
|
|
return revealed
|
|
|
|
|
|
@@ -250,7 +250,7 @@ class BurnProof:
|
|
|
self.token_id,
|
|
|
self.serial,
|
|
|
self.coin_blind,
|
|
|
- self.depends,
|
|
|
+ self.spend_hook,
|
|
|
self.user_data,
|
|
|
)
|
|
|
# Merkle root check
|
|
|
@@ -268,7 +268,7 @@ class BurnProof:
|
|
|
class MintProof:
|
|
|
|
|
|
def __init__(self, value, token_id, value_blind, token_blind, serial,
|
|
|
- coin_blind, public, depends, user_data, ec):
|
|
|
+ coin_blind, public, spend_hook, user_data, ec):
|
|
|
self.value = value
|
|
|
self.token_id = token_id
|
|
|
self.value_blind = value_blind
|
|
|
@@ -276,7 +276,7 @@ class MintProof:
|
|
|
self.serial = serial
|
|
|
self.coin_blind = coin_blind
|
|
|
self.public = public
|
|
|
- self.depends = depends
|
|
|
+ self.spend_hook = spend_hook
|
|
|
self.user_data = user_data
|
|
|
|
|
|
self.ec = ec
|
|
|
@@ -291,7 +291,7 @@ class MintProof:
|
|
|
self.token_id,
|
|
|
self.serial,
|
|
|
self.coin_blind,
|
|
|
- self.depends,
|
|
|
+ self.spend_hook,
|
|
|
self.user_data
|
|
|
)
|
|
|
|