(output: Output)
| 140 | } |
| 141 | |
| 142 | export function cashScriptOutputToLibauthOutput(output: Output): LibauthOutput { |
| 143 | return { |
| 144 | lockingBytecode: typeof output.to === 'string' ? addressToLockScript(output.to) : output.to, |
| 145 | valueSatoshis: output.amount, |
| 146 | token: output.token && { |
| 147 | ...output.token, |
| 148 | category: hexToBin(output.token.category), |
| 149 | nft: output.token.nft && { |
| 150 | ...output.token.nft, |
| 151 | commitment: hexToBin(output.token.nft.commitment), |
| 152 | }, |
| 153 | }, |
| 154 | }; |
| 155 | } |
| 156 | |
| 157 | export function libauthOutputToCashScriptOutput(output: LibauthOutput): Output { |
| 158 | return { |
no test coverage detected