Repository navigation
Expand file tree
/
Copy pathloader.js
More file actions
30 lines (30 loc) · 1.73 KB
/
Copy pathloader.js
File metadata and controls
30 lines (30 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
let targetName = `${process.platform}-${process.arch}`;
if (process.platform === 'linux') {
const libc = require('detect-libc').familySync() || 'glibc';
targetName += `-${libc}`;
}
const addon = require(`./native/${targetName}.node`);
module.exports = addon;
// Explicit named exports so Node's CJS static analysis (and `export * from` in ESM) can see them.
module.exports.getVersion = addon.getVersion;
module.exports.decodeTransaction = addon.decodeTransaction;
module.exports.decodeNakamotoBlock = addon.decodeNakamotoBlock;
module.exports.decodeStacksBlock = addon.decodeStacksBlock;
module.exports.decodeClarityValueToRepr = addon.decodeClarityValueToRepr;
module.exports.decodeClarityValueToTypeName = addon.decodeClarityValueToTypeName;
module.exports.decodeClarityValue = addon.decodeClarityValue;
module.exports.decodeClarityValueList = addon.decodeClarityValueList;
module.exports.decodePostConditions = addon.decodePostConditions;
module.exports.stacksToBitcoinAddress = addon.stacksToBitcoinAddress;
module.exports.bitcoinToStacksAddress = addon.bitcoinToStacksAddress;
module.exports.isValidStacksAddress = addon.isValidStacksAddress;
module.exports.decodeStacksAddress = addon.decodeStacksAddress;
module.exports.decodeClarityValueToPrincipal = addon.decodeClarityValueToPrincipal;
module.exports.stacksAddressFromParts = addon.stacksAddressFromParts;
module.exports.memoToString = addon.memoToString;
module.exports.decodePoxSyntheticEvent = addon.decodePoxSyntheticEvent;
module.exports.decodeSignerMessage = addon.decodeSignerMessage;
module.exports.startProfiler = addon.startProfiler;
module.exports.stopProfiler = addon.stopProfiler;
module.exports.createProfiler = addon.createProfiler;
module.exports.perfTestC32Encode = addon.perfTestC32Encode;