| 1 | package Bitcoin::Crypto::Transaction::AutoSigner; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 40 | $Bitcoin::Crypto::Transaction::AutoSigner::VERSION = '4.005'; | |||||||||||||||||||||||||||||||||||||||||
| 3 | 40 | ▶ | use v5.14; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 40 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | 40 | ▶ | use Mooish::Base -standard; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | 40 | ▶ | use Bitcoin::Crypto qw(btc_script); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 40 | ▶ | use Bitcoin::Crypto::Exception; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 40 | ▶ | use Bitcoin::Crypto::Constants; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | 40 | ▶ | use Bitcoin::Crypto::Helpers qw(die_no_trace); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 12 | 40 | ▶ | use Bitcoin::Crypto::Types -types; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||
| 14 | 40 | has param 'transaction' => ( | |||||||||||||||||||||||||||||||||||||||||
| 15 | isa => InstanceOf ['Bitcoin::Crypto::Transaction'], | ||||||||||||||||||||||||||||||||||||||||||
| 16 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||
| 18 | 40 | has param 'key' => ( | |||||||||||||||||||||||||||||||||||||||||
| 19 | isa => InstanceOf ['Bitcoin::Crypto::Key::Private'], | ||||||||||||||||||||||||||||||||||||||||||
| 20 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||
| 22 | 40 | has param 'signing_index' => ( | |||||||||||||||||||||||||||||||||||||||||
| 23 | isa => PositiveOrZeroInt, | ||||||||||||||||||||||||||||||||||||||||||
| 24 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||
| 26 | 40 | has option 'redeem_script' => ( | |||||||||||||||||||||||||||||||||||||||||
| 27 | coerce => BitcoinScript, | ||||||||||||||||||||||||||||||||||||||||||
| 28 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | 40 | has option 'multisig' => ( | |||||||||||||||||||||||||||||||||||||||||
| 31 | isa => Tuple [PositiveInt, PositiveInt], | ||||||||||||||||||||||||||||||||||||||||||
| 32 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||
| 34 | 40 | has option 'sighash' => ( | |||||||||||||||||||||||||||||||||||||||||
| 35 | isa => PositiveOrZeroInt, | ||||||||||||||||||||||||||||||||||||||||||
| 36 | writer => -hidden, | ||||||||||||||||||||||||||||||||||||||||||
| 37 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||
| 39 | 40 | has option 'script_tree' => ( | |||||||||||||||||||||||||||||||||||||||||
| 40 | coerce => BitcoinScriptTree, | ||||||||||||||||||||||||||||||||||||||||||
| 41 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||
| 43 | 40 | has field '_compat' => ( | |||||||||||||||||||||||||||||||||||||||||
| 44 | writer => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 45 | default => !!0, | ||||||||||||||||||||||||||||||||||||||||||
| 46 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | has field 'input' => ( | ||||||||||||||||||||||||||||||||||||||||||
| 49 | 23 | ▶ | lazy => sub { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 50 | 23 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 51 | 23 | return $self->transaction->inputs->[$self->signing_index]; | |||||||||||||||||||||||||||||||||||||||||
| 52 | }, | ||||||||||||||||||||||||||||||||||||||||||
| 53 | 40 | ); | |||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||
| 55 | sub _get_old_signature | ||||||||||||||||||||||||||||||||||||||||||
| 56 | 7 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_get_old_signature: called CC=5 SCAR=16.2
| |||||||||||||||||||||||||||||||||||||||||||
| 57 | 7 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||
| 59 | 7 | ▶ | if ($self->input->is_segwit) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 60 | 4 | ▶ | return [@{$self->input->witness // []}]; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->input->witness // []
MC/DC0%0/1
$self->input->witness // []
$self->input->witness
Truth table50%1/2
A
A= $self->input->witness
| |||||||||||||||||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||||||||||||||
| 62 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 63 | 3 | my $old_script = $self->input->signature_script->operations; | |||||||||||||||||||||||||||||||||||||||||
| 64 | 3 | my @result; | |||||||||||||||||||||||||||||||||||||||||
| 65 | 3 | foreach my $part (@$old_script) { | |||||||||||||||||||||||||||||||||||||||||
| 66 | 4 | ▶ | push @result, $part->[2] | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 67 | if $part->[0]->pushop; | ||||||||||||||||||||||||||||||||||||||||||
| 68 | } | ||||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||
| 70 | 3 | return \@result; | |||||||||||||||||||||||||||||||||||||||||
| 71 | } | ||||||||||||||||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||
| 74 | sub _sign_P2PK | ||||||||||||||||||||||||||||||||||||||||||
| 75 | 8 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_sign_P2PK: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 76 | 8 | my ($self, $signature) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||
| 78 | 8 | $self->transaction | |||||||||||||||||||||||||||||||||||||||||
| 79 | ->sign( | ||||||||||||||||||||||||||||||||||||||||||
| 80 | signing_index => $self->signing_index, | ||||||||||||||||||||||||||||||||||||||||||
| 81 | compat => $self->_compat, | ||||||||||||||||||||||||||||||||||||||||||
| 82 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 83 | ->add_signature($self->key, sighash => $self->sighash) | ||||||||||||||||||||||||||||||||||||||||||
| 84 | ->finalize; | ||||||||||||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||
| 87 | sub _sign_P2PKH | ||||||||||||||||||||||||||||||||||||||||||
| 88 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_sign_P2PKH: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 89 | 2 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||
| 91 | 2 | return $self->_sign_P2PK; | |||||||||||||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||||||||||
| 94 | sub _sign_P2MS | ||||||||||||||||||||||||||||||||||||||||||
| 95 | 7 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_sign_P2MS: called CC=6 SCAR=18.0
| |||||||||||||||||||||||||||||||||||||||||||
| 96 | 7 | my ($self, $signature) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||
| 98 | 7 | ▶ | die_no_trace 'trying to sign payout from P2MS but no multisig was specified' | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 99 | unless $self->has_multisig; | ||||||||||||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||||||||||||
| 101 | 7 | my ($this_signature, $total_signatures) = @{$self->multisig}; | |||||||||||||||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||||||||||||||||
| 103 | 7 | ▶ | my $signer = $self->transaction | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 104 | ->sign( | ||||||||||||||||||||||||||||||||||||||||||
| 105 | signing_index => $self->signing_index, | ||||||||||||||||||||||||||||||||||||||||||
| 106 | compat => $self->_compat, | ||||||||||||||||||||||||||||||||||||||||||
| 107 | ($self->redeem_script ? (script => $self->redeem_script) : ()), | ||||||||||||||||||||||||||||||||||||||||||
| 108 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||||
| 110 | 7 | my $sig = $self->_get_old_signature; | |||||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||||||
| 112 | # process signatures in reverse order, since add_signature works that way | ||||||||||||||||||||||||||||||||||||||||||
| 113 | 7 | foreach my $sig_num (reverse 1 .. $total_signatures) { | |||||||||||||||||||||||||||||||||||||||||
| 114 | 13 | ▶ | if ($sig_num == $this_signature) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||
| 116 | # set this signature | ||||||||||||||||||||||||||||||||||||||||||
| 117 | 7 | $signer->add_signature($self->key, sighash => $self->sighash); | |||||||||||||||||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||||||||||||||||
| 119 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||||||||||||||||
| 121 | # Do not touch other signatures if they exist at all | ||||||||||||||||||||||||||||||||||||||||||
| 122 | 6 | ▶ | $signer->add_signature($sig->[$sig_num] // ''); | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$sig->[$sig_num] // ""
MC/DC100%1/1
$sig->[$sig_num] // ""
$sig->[$sig_num]
Truth table100%2/2
A
A= $sig->[$sig_num]
| |||||||||||||||||||||||||||||||||||||||||||
| 123 | } | ||||||||||||||||||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||||||||||||
| 126 | $signer | ||||||||||||||||||||||||||||||||||||||||||
| 127 | ->finalize_multisignature | ||||||||||||||||||||||||||||||||||||||||||
| 128 | 7 | ->finalize; | |||||||||||||||||||||||||||||||||||||||||
| 129 | } | ||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||
| 131 | sub _sign_P2WPKH | ||||||||||||||||||||||||||||||||||||||||||
| 132 | 3 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_sign_P2WPKH: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 133 | 3 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||||||||||||||||
| 135 | 3 | return $self->_sign_P2PK; | |||||||||||||||||||||||||||||||||||||||||
| 136 | } | ||||||||||||||||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||||||||||||||||
| 138 | sub _sign_P2TR | ||||||||||||||||||||||||||||||||||||||||||
| 139 | 8 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_sign_P2TR: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 140 | 8 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 141 | 8 | my $script_tree = $self->script_tree; | |||||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||||||
| 143 | # signs key path only | ||||||||||||||||||||||||||||||||||||||||||
| 144 | 8 | ▶ | $self->transaction | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 145 | ->sign( | ||||||||||||||||||||||||||||||||||||||||||
| 146 | signing_index => $self->signing_index, | ||||||||||||||||||||||||||||||||||||||||||
| 147 | ($script_tree ? (script_tree => $script_tree) : ()), | ||||||||||||||||||||||||||||||||||||||||||
| 148 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 149 | ->add_signature($self->key, sighash => $self->sighash) | ||||||||||||||||||||||||||||||||||||||||||
| 150 | ->finalize; | ||||||||||||||||||||||||||||||||||||||||||
| 151 | } | ||||||||||||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||||||||||||
| 153 | sub _sign_script | ||||||||||||||||||||||||||||||||||||||||||
| 154 | 30 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_sign_script: called CC=11 SCAR=25.4
| |||||||||||||||||||||||||||||||||||||||||||
| 155 | 30 | my ($self, $script, $nested) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 156 | 30 | my $type = $script->type; | |||||||||||||||||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||||||||||||||||
| 158 | 30 | my $method = $self->can("_sign_$type"); | |||||||||||||||||||||||||||||||||||||||||
| 159 | 30 | ▶ | return $self->$method if $method; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||||||||||||||||
| 161 | 8 | ▶ | Bitcoin::Crypto::Exception::ScriptType->raise( | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 162 | "don't know how to sign nested standard script type $type" | ||||||||||||||||||||||||||||||||||||||||||
| 163 | ) if $nested; | ||||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||
| 165 | 8 | ▶ | if ($type eq 'P2SH') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 166 | 5 | ▶ | if (!$self->has_redeem_script) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||||
| 168 | # P2SH but no redeem script - must be compat P2WPKH | ||||||||||||||||||||||||||||||||||||||||||
| 169 | 1 | $self->_set_compat(!!1); | |||||||||||||||||||||||||||||||||||||||||
| 170 | 1 | return $self->_sign_P2WPKH; | |||||||||||||||||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||||||||||||||||
| 172 | elsif (!$self->_compat) { | ||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||
| 174 | # this may be compat P2WSH - let further code handle it | ||||||||||||||||||||||||||||||||||||||||||
| 175 | 4 | my $witness_el = $self->redeem_script->witness_program->to_serialized; | |||||||||||||||||||||||||||||||||||||||||
| 176 | 4 | ▶ | $self->_set_compat(!!1) if $script->run([$witness_el])->success; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 177 | } | ||||||||||||||||||||||||||||||||||||||||||
| 178 | } | ||||||||||||||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||||||||||||
| 180 | 7 | ▶ | my $redeem_type = $self->has_redeem_script && $self->redeem_script->type; | ||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$self->has_redeem_script && $self->redeem_script->type
MC/DC0%0/2
$self->has_redeem_script && $self->redeem_script->type
$self->has_redeem_script
$self->redeem_script->type
Truth table33%1/3
A && B
A= $self->has_redeem_scriptB= $self->redeem_script->type
| |||||||||||||||||||||||||||||||||||||||||||
| 181 | 7 | ▶ | return $self->_sign_script($self->redeem_script, -nested) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
$redeem_type and $type eq "P2SH" || $type eq "P2WSH"
$type eq "P2SH" or $type eq "P2WSH"
MC/DC0%0/3
$redeem_type and $type eq "P2SH" || $type eq "P2WSH"
$redeem_type
$type eq "P2SH"
$type eq "P2WSH"
Truth table50%2/4
A and B or C
A= $redeem_typeB= $type eq "P2SH"C= $type eq "P2WSH"
| |||||||||||||||||||||||||||||||||||||||||||
| 182 | if $redeem_type && ($type eq 'P2SH' || $type eq 'P2WSH'); | ||||||||||||||||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||||||||||||||||
| 184 | 0 | Bitcoin::Crypto::Exception::ScriptType->raise( | |||||||||||||||||||||||||||||||||||||||||
| 185 | "don't know how to sign standard script type $type" | ||||||||||||||||||||||||||||||||||||||||||
| 186 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 187 | } | ||||||||||||||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||||||||||||
| 189 | sub sign | ||||||||||||||||||||||||||||||||||||||||||
| 190 | 23 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
sign: called CC=1 SCAR=0.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 191 | 23 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||
| 193 | Bitcoin::Crypto::Exception::Sign->trap_into( | ||||||||||||||||||||||||||||||||||||||||||
| 194 | 23 | ▶ | sub { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.4
| |||||||||||||||||||||||||||||||||||||||||||
| 195 | 23 | ▶ | die_no_trace 'no such input' if !$self->input; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||||||||||||||||
| 197 | 23 | my $utxo = $self->input->utxo->output; | |||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||||
| 199 | 23 | ▶ | die_no_trace 'cannot automatically sign a non-standard locking script' | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 200 | if !$utxo->is_standard; | ||||||||||||||||||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||||||||||||||||||
| 202 | 23 | $self->_sign_script($utxo->locking_script); | |||||||||||||||||||||||||||||||||||||||||
| 203 | }, | ||||||||||||||||||||||||||||||||||||||||||
| 204 | 23 | "Can't sign transaction input " . $self->signing_index | |||||||||||||||||||||||||||||||||||||||||
| 205 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 206 | } | ||||||||||||||||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||||||||||||||||
| 208 | 40 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||||