scryptlib
Version:
Javascript SDK for integration of Bitcoin SV Smart Contracts written in sCrypt language.
109 lines • 14.5 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.md5 = exports.uri2path = exports.path2uri = exports.getFullFilePath = exports.JSONParser = exports.isEmpty = exports.parseLiteral = exports.compilerVersion = exports.typeOfArg = exports.getABIDeclaration = exports.getStructDeclaration = exports.buildTypeResolver = exports.resolveGenericType = exports.structSign = exports.librarySign = exports.toLiteralArrayType = exports.arrayTypeAndSizeStr = exports.resolveConstValue = exports.findStatic = exports.findConstStatic = exports.parseAbiFromUnlockingScript = exports.getLowSPreimage = exports.readLaunchJson = exports.parseGenericType = exports.isGenericType = exports.subArrayType = exports.genLaunchConfigFile = exports.getNameByType = exports.newCall = exports.arrayTypeAndSize = exports.isArrayType = exports.findStructByName = exports.findStructByType = exports.getValidatedHexString = exports.bytesToHexString = exports.bytes2Literal = exports.int2Asm = exports.bin2num = exports.toHex = exports.bsv = exports.CompileResult = exports.compileContractAsync = exports.handleCompilerOutput = exports.signTx = exports.getPreimage = exports.doCompileAsync = exports.compileContract = exports.compileAsync = exports.compile = exports.buildContractClass = void 0;
exports.sha256ByPartialHash = exports.partialSha256 = exports.findCompiler = exports.getPlatformScryptc = exports.toLEUnsigned = exports.writeVarint = exports.buildPublicKeyHashScript = exports.len = exports.buildOpreturnScript = exports.num2bin = exports.invert = exports.xor = exports.or = exports.and = exports.hash256 = exports.sha256 = exports.hash160 = exports.DEFAULT_SIGHASH_TYPE = exports.ScryptType = exports.DEFAULT_FLAGS = exports.SymbolType = exports.DebugModeTag = exports.AbstractContract = exports.BuildType = exports.ABIEntityType = exports.HashedSet = exports.HashedMap = exports.PubKeyHash = exports.OpCodeType = exports.SigHashPreimage = exports.SigHashType = exports.Sha256 = exports.Sha1 = exports.Ripemd160 = exports.Sig = exports.PubKey = exports.PrivKey = exports.Bytes = exports.Bool = exports.Int = exports.flatternArg = exports.getSortedItem = exports.toJSON = exports.isSubBytes = exports.isScryptType = exports.stringToBytes = exports.FunctionCall = void 0;
var internal_1 = require("./internal");
Object.defineProperty(exports, "buildContractClass", { enumerable: true, get: function () { return internal_1.buildContractClass; } });
Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return internal_1.compile; } });
Object.defineProperty(exports, "compileAsync", { enumerable: true, get: function () { return internal_1.compileAsync; } });
Object.defineProperty(exports, "compileContract", { enumerable: true, get: function () { return internal_1.compileContract; } });
Object.defineProperty(exports, "doCompileAsync", { enumerable: true, get: function () { return internal_1.doCompileAsync; } });
Object.defineProperty(exports, "getPreimage", { enumerable: true, get: function () { return internal_1.getPreimage; } });
Object.defineProperty(exports, "signTx", { enumerable: true, get: function () { return internal_1.signTx; } });
Object.defineProperty(exports, "handleCompilerOutput", { enumerable: true, get: function () { return internal_1.handleCompilerOutput; } });
Object.defineProperty(exports, "compileContractAsync", { enumerable: true, get: function () { return internal_1.compileContractAsync; } });
Object.defineProperty(exports, "CompileResult", { enumerable: true, get: function () { return internal_1.CompileResult; } });
var internal_2 = require("./internal");
Object.defineProperty(exports, "bsv", { enumerable: true, get: function () { return internal_2.bsv; } });
Object.defineProperty(exports, "toHex", { enumerable: true, get: function () { return internal_2.toHex; } });
Object.defineProperty(exports, "bin2num", { enumerable: true, get: function () { return internal_2.bin2num; } });
Object.defineProperty(exports, "int2Asm", { enumerable: true, get: function () { return internal_2.int2Asm; } });
Object.defineProperty(exports, "bytes2Literal", { enumerable: true, get: function () { return internal_2.bytes2Literal; } });
Object.defineProperty(exports, "bytesToHexString", { enumerable: true, get: function () { return internal_2.bytesToHexString; } });
Object.defineProperty(exports, "getValidatedHexString", { enumerable: true, get: function () { return internal_2.getValidatedHexString; } });
Object.defineProperty(exports, "findStructByType", { enumerable: true, get: function () { return internal_2.findStructByType; } });
Object.defineProperty(exports, "findStructByName", { enumerable: true, get: function () { return internal_2.findStructByName; } });
Object.defineProperty(exports, "isArrayType", { enumerable: true, get: function () { return internal_2.isArrayType; } });
Object.defineProperty(exports, "arrayTypeAndSize", { enumerable: true, get: function () { return internal_2.arrayTypeAndSize; } });
Object.defineProperty(exports, "newCall", { enumerable: true, get: function () { return internal_2.newCall; } });
Object.defineProperty(exports, "getNameByType", { enumerable: true, get: function () { return internal_2.getNameByType; } });
Object.defineProperty(exports, "genLaunchConfigFile", { enumerable: true, get: function () { return internal_2.genLaunchConfigFile; } });
Object.defineProperty(exports, "subArrayType", { enumerable: true, get: function () { return internal_2.subArrayType; } });
Object.defineProperty(exports, "isGenericType", { enumerable: true, get: function () { return internal_2.isGenericType; } });
Object.defineProperty(exports, "parseGenericType", { enumerable: true, get: function () { return internal_2.parseGenericType; } });
Object.defineProperty(exports, "readLaunchJson", { enumerable: true, get: function () { return internal_2.readLaunchJson; } });
Object.defineProperty(exports, "getLowSPreimage", { enumerable: true, get: function () { return internal_2.getLowSPreimage; } });
Object.defineProperty(exports, "parseAbiFromUnlockingScript", { enumerable: true, get: function () { return internal_2.parseAbiFromUnlockingScript; } });
Object.defineProperty(exports, "findConstStatic", { enumerable: true, get: function () { return internal_2.findConstStatic; } });
Object.defineProperty(exports, "findStatic", { enumerable: true, get: function () { return internal_2.findStatic; } });
Object.defineProperty(exports, "resolveConstValue", { enumerable: true, get: function () { return internal_2.resolveConstValue; } });
Object.defineProperty(exports, "arrayTypeAndSizeStr", { enumerable: true, get: function () { return internal_2.arrayTypeAndSizeStr; } });
Object.defineProperty(exports, "toLiteralArrayType", { enumerable: true, get: function () { return internal_2.toLiteralArrayType; } });
Object.defineProperty(exports, "librarySign", { enumerable: true, get: function () { return internal_2.librarySign; } });
Object.defineProperty(exports, "structSign", { enumerable: true, get: function () { return internal_2.structSign; } });
Object.defineProperty(exports, "resolveGenericType", { enumerable: true, get: function () { return internal_2.resolveGenericType; } });
Object.defineProperty(exports, "buildTypeResolver", { enumerable: true, get: function () { return internal_2.buildTypeResolver; } });
Object.defineProperty(exports, "getStructDeclaration", { enumerable: true, get: function () { return internal_2.getStructDeclaration; } });
Object.defineProperty(exports, "getABIDeclaration", { enumerable: true, get: function () { return internal_2.getABIDeclaration; } });
Object.defineProperty(exports, "typeOfArg", { enumerable: true, get: function () { return internal_2.typeOfArg; } });
Object.defineProperty(exports, "compilerVersion", { enumerable: true, get: function () { return internal_2.compilerVersion; } });
Object.defineProperty(exports, "parseLiteral", { enumerable: true, get: function () { return internal_2.parseLiteral; } });
Object.defineProperty(exports, "isEmpty", { enumerable: true, get: function () { return internal_2.isEmpty; } });
Object.defineProperty(exports, "JSONParser", { enumerable: true, get: function () { return internal_2.JSONParser; } });
Object.defineProperty(exports, "getFullFilePath", { enumerable: true, get: function () { return internal_2.getFullFilePath; } });
Object.defineProperty(exports, "path2uri", { enumerable: true, get: function () { return internal_2.path2uri; } });
Object.defineProperty(exports, "uri2path", { enumerable: true, get: function () { return internal_2.uri2path; } });
Object.defineProperty(exports, "md5", { enumerable: true, get: function () { return internal_2.md5; } });
Object.defineProperty(exports, "FunctionCall", { enumerable: true, get: function () { return internal_2.FunctionCall; } });
Object.defineProperty(exports, "stringToBytes", { enumerable: true, get: function () { return internal_2.stringToBytes; } });
Object.defineProperty(exports, "isScryptType", { enumerable: true, get: function () { return internal_2.isScryptType; } });
Object.defineProperty(exports, "isSubBytes", { enumerable: true, get: function () { return internal_2.isSubBytes; } });
Object.defineProperty(exports, "toJSON", { enumerable: true, get: function () { return internal_2.toJSON; } });
Object.defineProperty(exports, "getSortedItem", { enumerable: true, get: function () { return internal_2.getSortedItem; } });
Object.defineProperty(exports, "flatternArg", { enumerable: true, get: function () { return internal_2.flatternArg; } });
var internal_3 = require("./internal");
Object.defineProperty(exports, "Int", { enumerable: true, get: function () { return internal_3.Int; } });
Object.defineProperty(exports, "Bool", { enumerable: true, get: function () { return internal_3.Bool; } });
Object.defineProperty(exports, "Bytes", { enumerable: true, get: function () { return internal_3.Bytes; } });
Object.defineProperty(exports, "PrivKey", { enumerable: true, get: function () { return internal_3.PrivKey; } });
Object.defineProperty(exports, "PubKey", { enumerable: true, get: function () { return internal_3.PubKey; } });
Object.defineProperty(exports, "Sig", { enumerable: true, get: function () { return internal_3.Sig; } });
Object.defineProperty(exports, "Ripemd160", { enumerable: true, get: function () { return internal_3.Ripemd160; } });
Object.defineProperty(exports, "Sha1", { enumerable: true, get: function () { return internal_3.Sha1; } });
Object.defineProperty(exports, "Sha256", { enumerable: true, get: function () { return internal_3.Sha256; } });
Object.defineProperty(exports, "SigHashType", { enumerable: true, get: function () { return internal_3.SigHashType; } });
Object.defineProperty(exports, "SigHashPreimage", { enumerable: true, get: function () { return internal_3.SigHashPreimage; } });
Object.defineProperty(exports, "OpCodeType", { enumerable: true, get: function () { return internal_3.OpCodeType; } });
Object.defineProperty(exports, "PubKeyHash", { enumerable: true, get: function () { return internal_3.PubKeyHash; } });
Object.defineProperty(exports, "HashedMap", { enumerable: true, get: function () { return internal_3.HashedMap; } });
Object.defineProperty(exports, "HashedSet", { enumerable: true, get: function () { return internal_3.HashedSet; } });
Object.defineProperty(exports, "ABIEntityType", { enumerable: true, get: function () { return internal_3.ABIEntityType; } });
Object.defineProperty(exports, "BuildType", { enumerable: true, get: function () { return internal_3.BuildType; } });
Object.defineProperty(exports, "AbstractContract", { enumerable: true, get: function () { return internal_3.AbstractContract; } });
Object.defineProperty(exports, "DebugModeTag", { enumerable: true, get: function () { return internal_3.DebugModeTag; } });
Object.defineProperty(exports, "SymbolType", { enumerable: true, get: function () { return internal_3.SymbolType; } });
Object.defineProperty(exports, "DEFAULT_FLAGS", { enumerable: true, get: function () { return internal_3.DEFAULT_FLAGS; } });
Object.defineProperty(exports, "ScryptType", { enumerable: true, get: function () { return internal_3.ScryptType; } });
Object.defineProperty(exports, "DEFAULT_SIGHASH_TYPE", { enumerable: true, get: function () { return internal_3.DEFAULT_SIGHASH_TYPE; } });
//Equivalent to the built-in functions
var internal_4 = require("./internal");
Object.defineProperty(exports, "hash160", { enumerable: true, get: function () { return internal_4.hash160; } });
Object.defineProperty(exports, "sha256", { enumerable: true, get: function () { return internal_4.sha256; } });
Object.defineProperty(exports, "hash256", { enumerable: true, get: function () { return internal_4.hash256; } });
Object.defineProperty(exports, "and", { enumerable: true, get: function () { return internal_4.and; } });
Object.defineProperty(exports, "or", { enumerable: true, get: function () { return internal_4.or; } });
Object.defineProperty(exports, "xor", { enumerable: true, get: function () { return internal_4.xor; } });
Object.defineProperty(exports, "invert", { enumerable: true, get: function () { return internal_4.invert; } });
Object.defineProperty(exports, "num2bin", { enumerable: true, get: function () { return internal_4.num2bin; } });
Object.defineProperty(exports, "buildOpreturnScript", { enumerable: true, get: function () { return internal_4.buildOpreturnScript; } });
Object.defineProperty(exports, "len", { enumerable: true, get: function () { return internal_4.len; } });
Object.defineProperty(exports, "buildPublicKeyHashScript", { enumerable: true, get: function () { return internal_4.buildPublicKeyHashScript; } });
Object.defineProperty(exports, "writeVarint", { enumerable: true, get: function () { return internal_4.writeVarint; } });
Object.defineProperty(exports, "toLEUnsigned", { enumerable: true, get: function () { return internal_4.toLEUnsigned; } });
var internal_5 = require("./internal");
Object.defineProperty(exports, "getPlatformScryptc", { enumerable: true, get: function () { return internal_5.getPlatformScryptc; } });
Object.defineProperty(exports, "findCompiler", { enumerable: true, get: function () { return internal_5.findCompiler; } });
var internal_6 = require("./internal");
Object.defineProperty(exports, "partialSha256", { enumerable: true, get: function () { return internal_6.partialSha256; } });
Object.defineProperty(exports, "sha256ByPartialHash", { enumerable: true, get: function () { return internal_6.sha256ByPartialHash; } });
//# sourceMappingURL=index.js.map
;