Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rosen-bridge/rosen-extractor

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rosen-bridge/rosen-extractor - npm Package Compare versions

Comparing version 0.1.10 to 0.1.11

14

dist/lib/getRosenData/cardano/CardanoKoiosRosenExtractor.js
import { isPlainObject } from 'lodash-es';
import AbstractRosenDataExtractor from '../abstract/AbstractRosenDataExtractor';
import { CARDANO_CHAIN, CARDANO_NATIVE_TOKEN } from '../const';
import Utils from '../Utils';
export class CardanoKoiosRosenExtractor extends AbstractRosenDataExtractor {

@@ -10,2 +11,3 @@ /**

get = (transaction) => {
const baseError = `No rosen data found for tx [${transaction.tx_hash}]`;
const metadata = transaction.metadata;

@@ -39,4 +41,10 @@ try {

}
this.logger.debug(baseError + `: No valid transformation found in any output boxes`);
}
else
this.logger.debug(baseError +
`: Incomplete metadata. isPlain: ${isPlainObject(data)}, data: ${Utils.JsonBI.stringify(data)}`);
}
else
this.logger.debug(baseError + `: Invalid metadata: ${Utils.JsonBI.stringify(metadata)}`);
}

@@ -83,6 +91,8 @@ catch (e) {

}
else
else {
this.logger.debug(`No rosen asset transformation found for box [${box.tx_hash}.${box.tx_index}]: box assets: ${Utils.JsonBI.stringify(box.asset_list)}`);
return undefined;
}
};
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2FyZGFub0tvaW9zUm9zZW5FeHRyYWN0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWIvZ2V0Um9zZW5EYXRhL2NhcmRhbm8vQ2FyZGFub0tvaW9zUm9zZW5FeHRyYWN0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLFdBQVcsQ0FBQzt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dGlvbi5tZXRhZGF0YTtcbiAgICB0cnkge1xuICAgICAgaWYgKG1ldGFkYXRhICYmIE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChtZXRhZGF0YSwgJzAnKSkge1xuICAgICAgICBjb25zdCBkYXRhID0gbWV0YWRhdGFbJzAnXTtcbiAgICAgICAgaWYgKFxuICAgICAgICAgIGlzUGxhaW5PYmplY3QoZGF0YSkgJiZcbiAgICAgICAgICAndG8nIGluIGRhdGEgJiZcbiAgICAgICAgICAnYnJpZGdlRmVlJyBpbiBkYXRhICYmXG4gICAgICAgICAgJ25ldHdvcmtGZWUnIGluIGRhdGEgJiZcbiAgICAgICAgICAndG9BZGRyZXNzJyBpbiBkYXRhICYmXG4gICAgICAgICAgJ2Zyb21BZGRyZXNzJyBpbiBkYXRhXG4gICAgICAgICkge1xuICAgICAgICAgIGNvbnN0IHJvc2VuRGF0YSA9IGRhdGEgYXMgdW5rbm93biBhcyBDYXJkYW5vTWV0YWRhdGFSb3NlbkRhdGE7XG5cbiAgICAgICAgICBjb25zdCBsb2NrT3V0cHV0cyA9IHRyYW5zYWN0aW9uLm91dHB1dHMuZmlsdGVyKFxuICAgICAgICAgICAgKG91dHB1dCkgPT4gb3V0cHV0LnBheW1lbnRfYWRkci5iZWNoMzIgPT09IHRoaXMubG9ja0FkZHJlc3NcbiAgICAgICAgICApO1xuICAgICAgICAgIGZvciAoY29uc3Qgb3V0cHV0IG9mIGxvY2tPdXRwdXRzKSB7XG4gICAgICAgICAgICBjb25zdCBhc3NldFRyYW5zZm9ybWF0aW9uID0gdGhpcy5nZXRBc3NldFRyYW5zZm9ybWF0aW9uKFxuICAgICAgICAgICAgICBvdXRwdXQsXG4gICAgICAgICAgICAgIHJvc2VuRGF0YS50b1xuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChhc3NldFRyYW5zZm9ybWF0aW9uKSB7XG4gICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICA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gQ2FyZGFub01ldGFkYXRhUm9zZW5EYXRhO1xuXG4gICAgICAgICAgY29uc3QgbG9ja091dHB1dHMgPSB0cmFuc2FjdGlvbi5vdXRwdXRzLmZpbHRlcihcbiAgICAgICAgICAgIChvdXRwdXQpID0+IG91dHB1dC5wYXltZW50X2FkZHIuYmVjaDMyID09PSB0aGlzLmxvY2tBZGRyZXNzXG4gICAgICAgICAgKTtcbiAgICAgICAgICBmb3IgKGNvbnN0IG91dHB1dCBvZiBsb2NrT3V0cHV0cykge1xuICAgICAgICAgICAgY29uc3QgYXNzZXRUcmFuc2Zvcm1hdGlvbiA9IHRoaXMuZ2V0QXNzZXRUcmFuc2Zvcm1hdGlvbihcbiAgICAgICAgICAgICAgb3V0cHV0LFxuICAgICAgICAgICAgICByb3NlbkRhdGEudG9cbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAoYXNzZXRUcmFuc2Zvcm1hdGlvbikge1xuICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHRvQ2hhaW46IHJvc2VuRGF0YS50byxcbiAgICAgICAgICAgICAgICB0b0FkZHJlc3M6IHJvc2VuRGF0YS50b0FkZHJlc3MsXG4gICAgICAgICAgICAgICAgYnJpZGdlRmVlOiByb3NlbkRhdGEuYnJpZGdlRmVlLFxuICAgICAgICAgICAgICAgIG5ldHdvcmtGZWU6IHJvc2VuRGF0YS5uZXR3b3JrRmVlLFxuICAgICAgICAgICAgICAgIGZyb21BZGRyZXNzOiByb3NlbkRhdGEuZnJvbUFkZHJlc3Muam9pbignJyksXG4gICAgICAgICAgICAgICAgc291cmNlQ2hhaW5Ub2tlbklkOiBhc3NldFRyYW5zZm9ybWF0aW9uLmZyb20sXG4gICAgICAgICAgICAgICAgYW1vdW50OiBhc3NldFRyYW5zZm9ybWF0aW9uLmFtb3VudCxcbiAgICAgICAgICAgICAgICB0YXJnZXRDaGFpblRva2VuSWQ6IGFzc2V0VHJhbnNmb3JtYXRpb24udG8sXG4gICA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gdXNpbmcgbG9ja2VkIEFEQVxuICAgIGNvbnN0IGxvdmVsYWNlID0gdGhpcy50b2tlbnMuc2VhcmNoKENBUkRBTk9fQ0hBSU4sIHtcbiAgICAgIFt0aGlzLnRva2Vucy5nZXRJZEtleShDQVJEQU5PX0NIQUlOKV06IENBUkRBTk9fTkFUSVZFX1RPS0VOLFxuICAgIH0pO1xuICAgIGlmIChsb3ZlbGFjZS5sZW5ndGggPiAwKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBmcm9tOiBDQVJEQU5PX05BVElWRV9UT0tFTixcbiAgICAgICAgdG86IHRoaXMudG9rZW5zLmdldElEKGxvdmVsYWNlWzBdLCB0b0NoYWluKSxcbiAgICAgICAgYW1vdW50OiBib3gudmFsdWUsXG4gICAgICB9O1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLmxvZ2dlci5kZWJ1ZyhcbiAgICAgICAgYE5vIHJvc2VuIGFzc2V0IHRyYW5zZm9ybWF0aW9uIGZvdW5kIGZvciBib3ggWyR7Ym94LnR4X2hhc2h9LiR7XG4gICAgICAgICAgYm94LnR4X2luZGV4XG4gICAgICAgIH1dOiBib3ggYXNzZXRzOiAke1V0aWxzLkpzb25CSS5zdHJpbmdpZnkoYm94LmFzc2V0X2xpc3QpfWBcbiAgICAgICk7XG4gICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH1cbiAgfTtcbn1cbiJdfQ==

@@ -11,2 +11,3 @@ import AbstractRosenDataExtractor from '../abstract/AbstractRosenDataExtractor';

get = (transaction) => {
const baseError = `No rosen data found for tx [${transaction.id}]`;
const metadata = transaction.metadata;

@@ -42,5 +43,13 @@ try {

}
this.logger.debug(baseError + `: No valid transformation found in any output boxes`);
}
else
this.logger.debug(baseError +
`: Incomplete metadata: ${Utils.JsonBI.stringify(metadata)}`);
}
else
this.logger.debug(baseError + `: Invalid blob: ${Utils.JsonBI.stringify(metadata)}`);
}
else
this.logger.debug(baseError + `: Invalid metadata: ${Utils.JsonBI.stringify(metadata)}`);
}

@@ -96,6 +105,8 @@ catch (e) {

}
else
else {
this.logger.debug(`No rosen asset transformation found for Ogmios box with assets: ${Utils.JsonBI.stringify(box.value.assets)}`);
return undefined;
}
};
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2FyZGFub09nbWlvc1Jvc2VuRXh0cmFjdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vbGliL2dldFJvc2VuRGF0YS9jYXJkYW5vL0NhcmRhbm9PZ21pb3NSb3NlbkV4dHJhY3Rvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLDBCQUEwQixNQUFNLHdDQUF3QyxDQUFDO0FBQ2hGLE9BQU8sRUFBRSxhQUFhLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxVQUFVLENBQUM7QUFDL0QsT0FBTyxLQUFLLE1BQU0sVUFBVSxDQUFDO0FBRzdCLE9BQU8sRUFBRSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBRTlDLE1BQU0sT0FBTywyQkFBNEIsU0FBUSwwQkFBcUM7SUFDcEY7OztPQUdHO0lBQ0gsR0FBRyxHQUFHLENBQUMsV0FBc0IsRUFBeUIsRUFBRTtRQUN0RCxNQUFNLFFBQVEsR0FBRyxXQUFXLENBQUMsUUFBUSxDQUFDO1FBQ3RDLElBQUk7WUFDRixJQUFJLFFBQVEsS0FBSyxJQUFJLEVBQUU7Z0JBQ3JCLE1BQU0sSUFBSSxHQUFHLFFBQVEsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDO2dCQUNoQyxJQUFJLElBQUksSUFBSSxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUU7b0JBQ3JCLE1BQU0sSUFBSSxHQUFHLEtBQUssQ0FBQyxZQUFZLENBQzdCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FDMkI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YXMgQ2FyZGFub01ldGFkYXRhUm9zZW5EYXRhO1xuXG4gICAgICAgICAgICBjb25zdCBsb2NrT3V0cHV0cyA9IHRyYW5zYWN0aW9uLmJvZHkub3V0cHV0cy5maWx0ZXIoXG4gICAgICAgICAgICAgIChvdXRwdXQpID0+IG91dHB1dC5hZGRyZXNzID09PSB0aGlzLmxvY2tBZGRyZXNzXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgZm9yIChjb25zdCBvdXRwdXQgb2YgbG9ja091dHB1dHMpIHtcbiAgICAgICAgICAgICAgY29uc3QgYXNzZXRUcmFuc2Zvcm1hdGlvbiA9IHRoaXMuZ2V0QXNzZXRUcmFuc2Zvcm1hdGlvbihcbiAgICAgICAgICAgICAgICBvdXRwdXQsXG4gICAgICAgICAgICAgICAgcm9zZW5EYXRhLnRvXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIGlmIChhc3NldFRyYW5zZm9ybWF0aW9uKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgIHRvQ2hhaW46IHJvc2VuRGF0YS50byxcbiAgICAgICAgICAgICAgICAgIHRvQWRkcmVzczogcm9zZW5EYXRhLnRvQWRkcmVzcyxcbiAgICAgICAgICAgICAgICAgIGJyaWRnZUZlZTogcm9zZW5EYXRhLmJyaWRnZUZlZSxcbiAgICAgICAgICAgICAgICAgIG5ldHdvcmtGZWU6IHJvc2VuRGF0YS5uZXR3b3JrRmVlLFxuICAgICAgICAgICAgICAgICAgZnJvbUFkZHJlc3M6IHJvc2VuRGF0YS5mcm9tQWRkcmVzcy5qb2luKCcnKSxcbiAgICAgICAgICAgICAgICAgIHNvdXJjZUNoYWluVG9rZW5JZDogYXNzZXRUcmFuc2Zvcm1hdGlvbi5mcm9tLFxuICAgICAgICAgICAgICAgICAgYW1vdW50OiBhc3NldFRyYW5zZm9ybWF0aW9uLmFtb3VudCxcbiAgICAgICAgICAgICAgICAgIHRhcmdldENoYWluVG9rZ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lLmFzc2V0cyk7XG4gICAgICBpZiAoYXNzZXRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgZm9yIChjb25zdCB0b2tlbktleSBvZiBhc3NldHMpIHtcbiAgICAgICAgICAvLyBhY2NvcmRpbmcgdG8gb2dtaW9zIGRvY3MgYXNzZXRzIGFyZSBzdG9yZXMgYXNcbiAgICAgICAgICAvLyAgICAgIFtwb2xpY3lJZC5hc3NldE5hbWVdOiBhbW91bnRcbiAgICAgICAgICAvLyAgICAgIFtwb2xpY3lJZF06IGFtb3VudCAgICAgICAgaWYgYXNzZXROYW1lIG5vdCBleGlzdHMuXG4gICAgICAgICAgY29uc3QgcGFydHMgPSB0b2tlbktleS5zcGxpdCgnLicpO1xuICAgICAgICAgIC8vIGlmIGFzc2V0TmFtZSBleGlzdHMsIHNlYXJjaCB0b2tlbiB3aXRoIHBvbGljeUlkIGFuZCBhc3NldCBuYW1lXG4gICAgICAgICAgLy8gaWYgbm90LCBzZWFyY2ggdG9rZW4gd2l0aCBwb2xpY3lJZFxuICAgICAgICAgIGNvbnN0IHRva2VuID0gdGhpcy50b2tlbnMuc2VhcmNoKFxuICAgICAgICAgICAgQ0FSREFOT19DSEFJTixcbiAgICAgICAgICAgIHRva2VuS2V5LmluZGV4T2YoJy4nKSAhPSAtMVxuICAgICAgICAgICAgICA/IHsgcG9saWN5SWQ6IHBhcnRzWzBdLnRyaW0oKSwgYXNzZXROYW1lOiBwYXJ0c1sxXS50cmltKCkgfVxuICAgICAgICAgICAgICA6IHsgcG9saWN5SWQ6IHRva2VuS2V5IH1cbiAgICAgICAgICApO1xuICAgICAgICAgIGlmICh0b2tlbi5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICBmcm9tOiB0aGlzLnRva2Vucy5nZXRJRCh0b2tlblswXSwgQ0FSREFOT19DSEFJTiksXG4gICAgICAgICAgICAgIHRvOiB0aGlzLnRva2Vucy5nZXRJRCh0b2tlblswXSwgdG9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gICAgICAgICAgaWYgKFxuICAgICAgICAgICAgaXNTdHJpbmcoZGF0YS50bykgJiZcbiAgICAgICAgICAgIGlzU3RyaW5nKGRhdGEubmV0d29ya0ZlZSkgJiZcbiAgICAgICAgICAgIGlzU3RyaW5nKGRhdGEuYnJpZGdlRmVlKSAmJlxuICAgICAgICAgICAgaXNTdHJpbmcoZGF0YS50b0FkZHJlc3MpICYmXG4gICAgICAgICAgICBpc0FycmF5KGRhdGEuZnJvbUFkZHJlc3MpICYmXG4gICAgICAgICAgICBkYXRhLmZyb21BZGRyZXNzLmV2ZXJ5KGlzU3RyaW5nKVxuICAgICAgICAgICkge1xuICAgICAgICAgICAgY29uc3Qgcm9zZW5EYXRhID0gZGF0YSBhcyB1bmtub3duIGFzIENhcmRhbm9NZXRhZGF0YVJvc2VuRGF0YTtcblxuICAgICAgICAgICAgY29uc3QgbG9ja091dHB1dHMgPSB0cmFuc2FjdGlvbi5ib2R5Lm91dHB1dHMuZmlsdGVyKFxuICAgICAgICAgICAgICAob3V0cHV0KSA9PiBvdXRwdXQuYWRkcmVzcyA9PT0gdGhpcy5sb2NrQWRkcmVzc1xuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGZvciAoY29uc3Qgb3V0cHV0IG9mIGxvY2tPdXRwdXRzKSB7XG4gICAgICAgICAgICAgIGNvbnN0IGFzc2V0VHJhbnNmb3JtYXRpb24gPSB0aGlzLmdldEFzc2V0VHJhbnNmb3JtYXRpb24oXG4gICAgICAgICAgICAgICAgb3V0cHV0LFxuICAgICAgICAgICAgICAgIHJvc2VuRGF0YS50b1xuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICBpZiAoYXNzZXRUcmFuc2Zvcm1hdGlvbikge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICB0b0NoYWluOiByb3NlbkRhdGEudG8sXG4gICAgICAgICAgICAgICAgICB0b0FkZHJlc3M6IHJvc2VuRGF0YS50b0FkZHJlc3MsXG4gICAgICAgICAgICAgICAgICBicmlkZ2VGZWU6IHJvc2VuRGF0YS5icmlkZ2VGZWUsXG4gICAgICAgICAgICAgICAgICBuZXR3b3JrRmVlOiByb3NlbkRhdGEubmV0d29ya0ZlZSxcbiAgICAgICAgICAgICAgICAgIGZyb21BZGRyZXNzOiByb3NlbkRhdGEuZnJvbUFkZHJlc3Muam9pbignJyksXG4gICAgICAgICAgICAgICAgICBzb3VyY2VDaGFpblRva2VuSWQ6IGFzc2V0VHJhbnNmb3JtYXRpb24uZnJvbSxcbiAgICAgICAgICAgICAgICAgIGFtb3VudDogYXNzZXRUcmFuc2Zvcm1hdGlvbi5hbW91bnQsXG4gICAgICAgICAgICAgICAgICB0YXJnZXRDaGFpblRva2VuSWQ6IGFzc2V0VHJhbnNmb3JtYXRpb24udG8sXG4gICAgICAgICAgICAgICAgICBzb3VyY2VUeElkOiB0cmFuc2FjdGlvbi5pZCxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmxvZ2dlci5kZWJ1ZyhcbiAgICAgICAgICAgICAgYmFzZUVycm9yICsgYDogTm8gdmFsaWQgdHJhbnNmb3JtYXRpb24gZm91bmQgaW4gYW55IG91dHB1dCBib3hlc2BcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICB0aGlzLmxvZ2dlci5kZWJ1ZyhcbiAgICAgICAgICAgICAgYmFzZUVycm9yICtcbiAgICAgICAgICAgICAgICBgOiBJbmNvbXBsZXRlIG1ldGFkYXRhOiAke1V0aWxzLkpzb25CSS5zdHJpbmdpZnkobWV0YWRhdGEpfWBcbiAgICAgICAgICAgICk7XG4gICAgICAgIH0gZWxzZVxuICAgICAgICAgIHRoaXMubG9nZ2VyLmRlYnVnKFxuICAgICAgICAgICAgYmFzZUVycm9yICsgYDogSW52YWxpZCBibG9iOiAke1V0aWxzLkpzb25CSS5zdHJpbmdpZnkobWV0YW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uYXNzZXRzKTtcbiAgICAgIGlmIChhc3NldHMubGVuZ3RoID4gMCkge1xuICAgICAgICBmb3IgKGNvbnN0IHRva2VuS2V5IG9mIGFzc2V0cykge1xuICAgICAgICAgIC8vIGFjY29yZGluZyB0byBvZ21pb3MgZG9jcyBhc3NldHMgYXJlIHN0b3JlcyBhc1xuICAgICAgICAgIC8vICAgICAgW3BvbGljeUlkLmFzc2V0TmFtZV06IGFtb3VudFxuICAgICAgICAgIC8vICAgICAgW3BvbGljeUlkXTogYW1vdW50ICAgICAgICBpZiBhc3NldE5hbWUgbm90IGV4aXN0cy5cbiAgICAgICAgICBjb25zdCBwYXJ0cyA9IHRva2VuS2V5LnNwbGl0KCcuJyk7XG4gICAgICAgICAgLy8gaWYgYXNzZXROYW1lIGV4aXN0cywgc2VhcmNoIHRva2VuIHdpdGggcG9saWN5SWQgYW5kIGFzc2V0IG5hbWVcbiAgICAgICAgICAvLyBpZiBub3QsIHNlYXJjaCB0b2tlbiB3aXRoIHBvbGljeUlkXG4gICAgICAgICAgY29uc3QgdG9rZW4gPSB0aGlzLnRva2Vucy5zZWFyY2goXG4gICAgICAgICAgICBDQVJEQU5PX0NIQUlOLFxuICAgICAgICAgICAgdG9rZW5LZXkuaW5kZXhPZignLicpICE9IC0xXG4gICAgICAgICAgICAgID8geyBwb2xpY3lJZDogcGFydHNbMF0udHJpbSgpLCBhc3NldE5hbWU6IHBhcnRzWzFdLnRyaW0oKSB9XG4gICAgICAgICAgICAgIDogeyBwb2xpY3lJZDogdG9rZW5LZXkgfVxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHRva2VuLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgIGZyb206IHRoaXMudG9rZW5zLmdldElEKHRva2VuWzBdLCBDQVJEQU5PX0NIQUlOKSxcbiAgICAgICAgICAgICAgdG86IHRoaXMudG9rZW5zLmdldElEKHRva2VuWzBdLCB0b0NoYWluKSxcbiAgICAgICAgICAgICAgYW1vdW50OiBib3gudmFsdWUuYXNzZXRzW3Rva2VuS2V5XS50b1N0cmluZygpLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyB0cnkgdG8gYnVpbGQgdHJhbnNmb3JtYXRpb24gdXNpbmcgbG9ja2VkIEFEQVxuICAgIGNvbnN0IGxvdmVsYWNlID0gdGhpcy50b2tlbnMuc2VhcmNoKENBUkRBTk9fQ0hBSU4sIHtcbiAgICAgIFt0aGlzLnRva2Vucy5nZXRJZEtleShDQVJEQU5PX0NIQUlOKV06IENBUkRBTk9fTkFUSVZFX1RPS0VOLFxuICAgIH0pO1xuICAgIGlmIChsb3ZlbGFjZS5sZW5ndGggPiAwKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBmcm9tOiBDQVJEQU5PX05BVElWRV9UT0tFTixcbiAgICAgICAgdG86IHRoaXMudG9rZW5zLmdldElEKGxvdmVsYWNlWzBdLCB0b0NoYWluKSxcbiAgICAgICAgYW1vdW50OiBib3gudmFsdWUuY29pbnMudG9TdHJpbmcoKSxcbiAgICAgIH07XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMubG9nZ2VyLmRlYnVnKFxuICAgICAgICBgTm8gcm9zZW4gYXNzZXQgdHJhbnNmb3JtYXRpb24gZm91bmQgZm9yIE9nbWlvcyBib3ggd2l0aCBhc3NldHM6ICR7VXRpbHMuSnNvbkJJLnN0cmluZ2lmeShcbiAgICAgICAgICBib3gudmFsdWUuYXNzZXRzXG4gICAgICAgICl9YFxuICAgICAgKTtcbiAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuICB9O1xufVxuIl19
import AbstractRosenDataExtractor from '../abstract/AbstractRosenDataExtractor';
import { CARDANO_CHAIN, CARDANO_NATIVE_TOKEN } from '../const';
import * as JSONBigInt from 'json-bigint';
import Utils from '../Utils';
export class CardanoRosenExtractor extends AbstractRosenDataExtractor {

@@ -17,2 +18,3 @@ /**

}
const baseError = `No rosen data found for tx [${transaction.id}]`;
const rosenMetadata = transaction.metadata?.['0'];

@@ -43,3 +45,7 @@ if (rosenMetadata &&

}
this.logger.debug(baseError + `: No valid transformation found in any output boxes`);
}
else
this.logger.debug(baseError +
`: Incomplete metadata: ${Utils.JsonBI.stringify(transaction.metadata)}`);
return undefined;

@@ -79,6 +85,8 @@ };

}
else
else {
this.logger.debug(`No rosen asset transformation found for CardanoBoxCandidate with assets: ${Utils.JsonBI.stringify(box.assets)}`);
return undefined;
}
};
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2FyZGFub1Jvc2VuRXh0cmFjdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vbGliL2dldFJvc2VuRGF0YS9jYXJkYW5vL0NhcmRhbm9Sb3NlbkV4dHJhY3Rvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLDBCQUEwQixNQUFNLHdDQUF3QyxDQUFDO0FBUWhGLE9BQU8sRUFBRSxhQUFhLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxVQUFVLENBQUM7QUFDL0QsT0FBTyxLQUFLLFVBQVUsTUFBTSxhQUFhLENBQUM7QUFFMUMsTUFBTSxPQUFPLHFCQUFzQixTQUFRLDBCQUFrQztJQUMzRTs7O09BR0c7SUFDSCxHQUFHLEdBQUcsQ0FBQyxxQkFBNkIsRUFBeUIsRUFBRTtRQUM3RCxJQUFJLFdBQXNCLENBQUM7UUFDM0IsSUFBSTtZQUNGLFdBQVcsR0FBRyxVQUFVLENBQUMsS0FBSyxDQUFDLHFCQUFxQixDQUFDLENBQUM7U0FDdkQ7UUFBQyxPQUFPLENBQUMsRUFBRTtZQUNWLE1BQU0sSUFBSSxLQUFLLENBQ2IscUZBQXFGLENBQUMsRUFBRSxDQUN6RixDQUFDO1NBQ0g7UUFDRC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AgIH1cbiAgfTtcbn1cbiJdfQ==
import AbstractRosenDataExtractor from '../abstract/AbstractRosenDataExtractor';
import { ERGO_CHAIN, ERGO_NATIVE_TOKEN } from '../const';
import { Address, Constant } from 'ergo-lib-wasm-nodejs';
import Utils from '../Utils';
export class ErgoNodeRosenExtractor extends AbstractRosenDataExtractor {

@@ -17,4 +18,6 @@ lockErgoTree;

get = (transaction) => {
const baseError = `No rosen data found for tx [${transaction.id}]`;
try {
for (const box of transaction.outputs) {
const boxBaseError = `No rosen data found in box [${box.boxId}]`;
if (box.ergoTree === this.lockErgoTree && box.additionalRegisters?.R4) {

@@ -41,5 +44,16 @@ const R4 = Constant.decode_from_base16(box.additionalRegisters.R4);

}
else
this.logger.debug(boxBaseError +
`: length of data in R4 is less than expected [${R4Serialized.length} < 5]`);
}
}
else {
if (box.ergoTree !== this.lockErgoTree)
this.logger.debug(boxBaseError +
`: invalid ergo tree [${box.ergoTree} !== ${this.lockErgoTree}]`);
else
this.logger.debug(boxBaseError + `: no R4`);
}
}
this.logger.debug(baseError + `: No valid rosen data found in any output box registers`);
}

@@ -85,6 +99,8 @@ catch (e) {

}
else
else {
this.logger.debug(`No rosen asset transformation found for box [${box.boxId}]: box assets: ${Utils.JsonBI.stringify(box.assets)}`);
return undefined;
}
};
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXJnb05vZGVSb3NlbkV4dHJhY3Rvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9nZXRSb3NlbkRhdGEvZXJnby9FcmdvTm9kZVJvc2VuRXh0cmFjdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sMEJBQTBCLE1BQU0sd0NBQXdDLENBQUM7QUFDaEYsT0FBTyxFQUFFLFVBQVUsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLFVBQVUsQ0FBQztBQUd6RCxPQUFP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94LmFzc2V0cy5sZW5ndGggPiAwKSB7XG4gICAgICBmb3IgKGNvbnN0IGxvY2tlZFRva2VuIG9mIGJveC5hc3NldHMpIHtcbiAgICAgICAgY29uc3QgdG9rZW4gPSB0aGlzLnRva2Vucy5zZWFyY2goRVJHT19DSEFJTiwge1xuICAgICAgICAgIFt0aGlzLnRva2Vucy5nZXRJZEtleShFUkdPX0NIQUlOKV06IGxvY2tlZFRva2VuLnRva2VuSWQsXG4gICAgICAgIH0pO1xuICAgICAgICBpZiAodG9rZW4ubGVuZ3RoID4gMClcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZnJvbTogdGhpcy50b2tlbnMuZ2V0SUQodG9rZW5bMF0sIEVSR09fQ0hBSU4pLFxuICAgICAgICAgICAgdG86IHRoaXMudG9rZW5zLmdldElEKHRva2VuWzBdLCB0b0NoYWluKSxcbiAgICAgICAgICAgIGFtb3VudDogbG9ja2VkVG9rZW4uYW1vdW50LFxuICAgICAgICAgIH07XG4gICAgICB9XG4gICAgfVxuXG4gICAgLy8gdHJ5IHRvIGJ1aWxkIHRyYW5zZm9ybWF0aW9uIHVzaW5nIGxvY2tlZCBFcmdcbiAgICBjb25zdCBlcmcgPSB0aGlzLnRva2Vucy5zZWFyY2goRVJHT19DSEFJTiwge1xuICAgICAgW3RoaXMudG9rZW5zLmdldElkS2V5KEVSR09fQ0hBSU4pXTogRVJHT19OQVRJVkVfVE9LRU4sXG4gICAgfSk7XG4gICAgaWYgKGVyZy5sZW5ndGggPiAwKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBmcm9tOiBFUkdPX05BVElWRV9UT0tFTixcbiAgICAgICAgdG86IHRoaXMudG9rZW5zLmdldElEKGVyZ1swXSwgdG9DaGFpbiksXG4gICAgICAgIGFtb3VudDogYm94LnZhbHVlLFxuICAgICAgfTtcbiAgICB9IGVsc2UgcmV0dXJuIHVuZGVmaW5lZDtcbiAgfTtcbn1cbiJdfQ==
//# sourceMappingURL=data:application/json;base64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ICAgICAgICAgICAgICAgICBicmlkZ2VGZWU6IEJ1ZmZlci5mcm9tKFI0U2VyaWFsaXplZFszXSkudG9TdHJpbmcoKSxcbiAgICAgICAgICAgICAgICAgIG5ldHdvcmtGZWU6IEJ1ZmZlci5mcm9tKFI0U2VyaWFsaXplZFsyXSkudG9TdHJpbmcoKSxcbiAgICAgICAgICAgICAgICAgIGZyb21BZGRyZXNzOiBCdWZmZXIuZnJvbShSNFNlcmlhbGl6ZWRbNF0pLnRvU3RyaW5nKCksXG4gICAgICAgICAgICAgICAgICBzb3VyY2VDaGFpblRva2VuSWQ6IGFzc2V0VHJhbnNmb3JtYXRpb24uZnJvbSxcbiAgICAgICAgICAgICAgICAgIGFtb3VudDogYXNzZXRUcmFuc2Zvcm1hdGlvbi5hbW91bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICAgICAgICAgIHRhcmdldENoYWluVG9rZW5JZDogYXNzZXRUcmFuc2Zvcm1hdGlvbi50byxcbiAgICAgICAgICAgICAgICAgIHNvdXJjZVR4SWQ6IHRyYW5zYWN0aW9uLmlkLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICB0aGlzLmxvZ2dlci5kZWJ1ZyhcbiAgICAgICAgICAgICAgICBib3hCYXNlRXJyb3IgK1xuICAgICAgICAgICAgICAgICAgYDogbGVuZ3RoIG9mIGRhdGEgaW4gUjQgaXMgbGVzcyB0aGFuIGV4cGVjdGVkIFske1I0U2VyaWFsaXplZC5sZW5ndGh9IDwgNV1gXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmIChib3guZXJnb1RyZWUgIT09IHRoaXMubG9ja0VyZ29UcmVlKVxuICAgICAgICAgICAgdGhpcy5sb2dnZXIuZGVidWcoXG4gICAgICAgICAgICAgIGJveEJhc2VFcnJvciArXG4gICAgICAgICAgICAgICAgYDogaW52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AgICAgIH07XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMubG9nZ2VyLmRlYnVnKFxuICAgICAgICBgTm8gcm9zZW4gYXNzZXQgdHJhbnNmb3JtYXRpb24gZm91bmQgZm9yIGJveCBbJHtcbiAgICAgICAgICBib3guYm94SWRcbiAgICAgICAgfV06IGJveCBhc3NldHM6ICR7VXRpbHMuSnNvbkJJLnN0cmluZ2lmeShib3guYXNzZXRzKX1gXG4gICAgICApO1xuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG4gIH07XG59XG4iXX0=

2

package.json
{
"name": "@rosen-bridge/rosen-extractor",
"version": "0.1.10",
"version": "0.1.11",
"description": "this project contains methods to get rosen data from blockchain",

@@ -5,0 +5,0 @@ "main": "dist/lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc