MCPcopy Create free account
hub / github.com/CashScript/cashscript / cashScriptOutputToLibauthOutput

Function cashScriptOutputToLibauthOutput

packages/cashscript/src/utils.ts:142–155  ·  view source on GitHub ↗
(output: Output)

Source from the content-addressed store, hash-verified

140}
141
142export 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
157export function libauthOutputToCashScriptOutput(output: LibauthOutput): Output {
158 return {

Callers 2

encodeOutputFunction · 0.85

Calls 1

addressToLockScriptFunction · 0.85

Tested by

no test coverage detected