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

Function addressToLockScript

packages/cashscript/src/utils.ts:335–340  ·  view source on GitHub ↗
(address: string)

Source from the content-addressed store, hash-verified

333* @returns a locking script corresponding to the passed address
334*/
335export function addressToLockScript(address: string): Uint8Array {
336 const result = cashAddressToLockingBytecode(address);
337 if (typeof result === 'string') throw new Error(result);
338
339 return result.bytecode;
340}
341
342export function getNetworkPrefix(network: string): 'bitcoincash' | 'bchtest' | 'bchreg' {
343 switch (network) {

Calls

no outgoing calls

Tested by

no test coverage detected