@rosen-bridge/rosen-extractor 6.2.0 → 6.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/getRosenData/Utils.d.ts +59 -0
- package/dist/lib/getRosenData/Utils.d.ts.map +1 -0
- package/dist/lib/getRosenData/Utils.js +96 -0
- package/dist/lib/getRosenData/abstract/AbstractRosenDataExtractor.d.ts +20 -14
- package/dist/lib/getRosenData/abstract/types.d.ts +13 -13
- package/dist/lib/getRosenData/bitcoin/BitcoinEsploraRosenExtractor.d.ts +24 -15
- package/dist/lib/getRosenData/bitcoin/BitcoinRosenExtractor.d.ts +22 -15
- package/dist/lib/getRosenData/bitcoin/BitcoinRpcRosenExtractor.d.ts +22 -15
- package/dist/lib/getRosenData/bitcoin/types.d.ts +66 -66
- package/dist/lib/getRosenData/bitcoin/utils.d.ts +1 -1
- package/dist/lib/getRosenData/cardano/CardanoBlockFrostRosenExtractor.d.ts +16 -13
- package/dist/lib/getRosenData/cardano/CardanoGraphQLRosenExtractor.d.ts +16 -13
- package/dist/lib/getRosenData/cardano/CardanoKoiosRosenExtractor.d.ts +16 -13
- package/dist/lib/getRosenData/cardano/CardanoOgmiosRosenExtractor.d.ts +16 -13
- package/dist/lib/getRosenData/cardano/CardanoRosenExtractor.d.ts +16 -13
- package/dist/lib/getRosenData/cardano/types.d.ts +110 -90
- package/dist/lib/getRosenData/cardano/utils.d.ts +10 -8
- package/dist/lib/getRosenData/const.d.ts +9 -9
- package/dist/lib/getRosenData/ergo/ErgoNodeRosenExtractor.d.ts +22 -15
- package/dist/lib/getRosenData/ergo/ErgoRosenExtractor.d.ts +13 -9
- package/dist/lib/getRosenData/ergo/types.d.ts +24 -24
- package/dist/lib/getRosenData/evm/EvmEthersRosenExtractor.d.ts +15 -9
- package/dist/lib/getRosenData/evm/EvmRosenExtractor.d.ts +15 -9
- package/dist/lib/getRosenData/evm/EvmRpcRosenExtractor.d.ts +25 -19
- package/dist/lib/getRosenData/evm/utils.d.ts +5 -5
- package/dist/lib/index.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Metadatum } from '@cardano-ogmios/schema';
|
|
2
|
+
import { ListObject, MetadataObject } from './cardano/types';
|
|
3
|
+
declare class Utils {
|
|
4
|
+
static JsonBI: {
|
|
5
|
+
parse: (
|
|
6
|
+
text: string,
|
|
7
|
+
reviver?: ((this: any, key: string, value: any) => any) | undefined
|
|
8
|
+
) => any;
|
|
9
|
+
stringify: {
|
|
10
|
+
(
|
|
11
|
+
value: any,
|
|
12
|
+
replacer?: ((this: any, key: string, value: any) => any) | undefined,
|
|
13
|
+
space?: string | number | undefined
|
|
14
|
+
): string;
|
|
15
|
+
(
|
|
16
|
+
value: any,
|
|
17
|
+
replacer?: (string | number)[] | null | undefined,
|
|
18
|
+
space?: string | number | undefined
|
|
19
|
+
): string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* extracts int value from Metadatum object
|
|
24
|
+
* @param val
|
|
25
|
+
* @returns : int value or undefined if parameter is not an int
|
|
26
|
+
*/
|
|
27
|
+
static getIntValue: (val: Metadatum) => string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* extracts string value from Metadatum object
|
|
30
|
+
* @param val
|
|
31
|
+
* @returns : string value or undefined if parameter is not a string
|
|
32
|
+
*/
|
|
33
|
+
static getStringValue: (val: Metadatum) => string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* extracts list value from Metadatum object
|
|
36
|
+
* @param val
|
|
37
|
+
* @returns : list value or undefined if parameter is not a list
|
|
38
|
+
*/
|
|
39
|
+
static getListValue: (val: Metadatum) => ListObject | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* extracts one of int or string from Metadatum object
|
|
42
|
+
* @param val
|
|
43
|
+
* @returns : native value or undefined if parameter is not a string or int
|
|
44
|
+
*/
|
|
45
|
+
static getNativeValue: (val: Metadatum) => string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* extracts dictionary from Metadatum object
|
|
48
|
+
* @param val
|
|
49
|
+
* @returns : dictionary value or undefined if parameter is not a dict
|
|
50
|
+
*/
|
|
51
|
+
static getDictValue: (val: Metadatum) => MetadataObject;
|
|
52
|
+
/**
|
|
53
|
+
* Convert a Metadatum to a json
|
|
54
|
+
* @param val
|
|
55
|
+
*/
|
|
56
|
+
static ObjectToJson: (val: Metadatum) => MetadataObject;
|
|
57
|
+
}
|
|
58
|
+
export default Utils;
|
|
59
|
+
//# sourceMappingURL=Utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../../lib/getRosenData/Utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EAGV,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAc,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGzE,cAAM,KAAK;IACT,MAAM,CAAC,MAAM;;;;;;MAGV;IAEH;;;;OAIG;IACH,MAAM,CAAC,WAAW,QAAS,SAAS,wBAIlC;IAEF;;;;OAIG;IACH,MAAM,CAAC,cAAc,QAAS,SAAS,wBAIrC;IAEF;;;;OAIG;IACH,MAAM,CAAC,YAAY,QAAS,SAAS,KAAG,UAAU,GAAG,SAAS,CAa5D;IAEF;;;;OAIG;IACH,MAAM,CAAC,cAAc,QAAS,SAAS,wBAKrC;IAEF;;;;OAIG;IACH,MAAM,CAAC,YAAY,QAAS,SAAS,KAAG,cAAc,CAoBpD;IAEF;;;OAGG;IACH,MAAM,CAAC,YAAY,QAAS,SAAS,oBAMnC;CACH;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import JSONBigInt from 'json-bigint';
|
|
2
|
+
class Utils {
|
|
3
|
+
static JsonBI = JSONBigInt({
|
|
4
|
+
useNativeBigInt: true,
|
|
5
|
+
alwaysParseAsBig: true,
|
|
6
|
+
});
|
|
7
|
+
/**
|
|
8
|
+
* extracts int value from Metadatum object
|
|
9
|
+
* @param val
|
|
10
|
+
* @returns : int value or undefined if parameter is not an int
|
|
11
|
+
*/
|
|
12
|
+
static getIntValue = (val) => {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(val, 'int')
|
|
14
|
+
? val.int.toString()
|
|
15
|
+
: undefined;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* extracts string value from Metadatum object
|
|
19
|
+
* @param val
|
|
20
|
+
* @returns : string value or undefined if parameter is not a string
|
|
21
|
+
*/
|
|
22
|
+
static getStringValue = (val) => {
|
|
23
|
+
return Object.prototype.hasOwnProperty.call(val, 'string')
|
|
24
|
+
? val.string
|
|
25
|
+
: undefined;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* extracts list value from Metadatum object
|
|
29
|
+
* @param val
|
|
30
|
+
* @returns : list value or undefined if parameter is not a list
|
|
31
|
+
*/
|
|
32
|
+
static getListValue = (val) => {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(val, 'list')) {
|
|
34
|
+
const list = val.list;
|
|
35
|
+
const res = [];
|
|
36
|
+
list.forEach((item) => {
|
|
37
|
+
const val = this.ObjectToJson(item);
|
|
38
|
+
if (val) {
|
|
39
|
+
res.push(val);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return res;
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* extracts one of int or string from Metadatum object
|
|
48
|
+
* @param val
|
|
49
|
+
* @returns : native value or undefined if parameter is not a string or int
|
|
50
|
+
*/
|
|
51
|
+
static getNativeValue = (val) => {
|
|
52
|
+
const intVal = this.getIntValue(val);
|
|
53
|
+
if (intVal) return intVal;
|
|
54
|
+
const stringVal = this.getStringValue(val);
|
|
55
|
+
if (stringVal) return stringVal;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* extracts dictionary from Metadatum object
|
|
59
|
+
* @param val
|
|
60
|
+
* @returns : dictionary value or undefined if parameter is not a dict
|
|
61
|
+
*/
|
|
62
|
+
static getDictValue = (val) => {
|
|
63
|
+
if (Object.prototype.hasOwnProperty.call(val, 'map')) {
|
|
64
|
+
const list = val.map;
|
|
65
|
+
const res = {};
|
|
66
|
+
list.forEach((item) => {
|
|
67
|
+
const key = this.getNativeValue(item.k);
|
|
68
|
+
if (key) {
|
|
69
|
+
res[key] = this.ObjectToJson(item.v);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return res;
|
|
73
|
+
} else if (Object.prototype.hasOwnProperty.call(val, 'list')) {
|
|
74
|
+
const list = val.list;
|
|
75
|
+
const res = [];
|
|
76
|
+
list.map((item) => {
|
|
77
|
+
res.push(this.getDictValue(item));
|
|
78
|
+
});
|
|
79
|
+
return res;
|
|
80
|
+
}
|
|
81
|
+
return this.getNativeValue(val);
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Convert a Metadatum to a json
|
|
85
|
+
* @param val
|
|
86
|
+
*/
|
|
87
|
+
static ObjectToJson = (val) => {
|
|
88
|
+
const nativeValue = this.getNativeValue(val);
|
|
89
|
+
if (nativeValue) return nativeValue;
|
|
90
|
+
const listValue = this.getListValue(val);
|
|
91
|
+
if (listValue) return listValue;
|
|
92
|
+
return this.getDictValue(val);
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export default Utils;
|
|
96
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvZ2V0Um9zZW5EYXRhL1V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVFBLE9BQU8sVUFBVSxNQUFNLGFBQWEsQ0FBQztBQUVyQyxNQUFNLEtBQUs7SUFDVCxNQUFNLENBQUMs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amVjdFRvSnNvbihpdGVtLnYpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXM7XG4gICAgfSBlbHNlIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwodmFsLCAnbGlzdCcpKSB7XG4gICAgICBjb25zdCBsaXN0ID0gKHZhbCBhcyBMaXN0KS5saXN0O1xuICAgICAgY29uc3QgcmVzOiBMaXN0T2JqZWN0ID0gW107XG4gICAgICBsaXN0Lm1hcCgoaXRlbSkgPT4ge1xuICAgICAgICByZXMucHVzaCh0aGlzLmdldERpY3RWYWx1ZShpdGVtKSk7XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXM7XG4gICAgfVxuICAgIHJldHVybiB0aGlzLmdldE5hdGl2ZVZhbHVlKHZhbCk7XG4gIH07XG5cbiAgLyoqXG4gICAqIENvbnZlcnQgYSBNZXRhZGF0dW0gdG8gYSBqc29uXG4gICAqIEBwYXJhbSB2YWxcbiAgICovXG4gIHN0YXRpYyBPYmplY3RUb0pzb24gPSAodmFsOiBNZXRhZGF0dW0pID0+IHtcbiAgICBjb25zdCBuYXRpdmVWYWx1ZSA9IHRoaXMuZ2V0TmF0aXZlVmFsdWUodmFsKTtcbiAgICBpZiAobmF0aXZlVmFsdWUpIHJldHVybiBuYXRpdmVWYWx1ZTtcbiAgICBjb25zdCBsaXN0VmFsdWUgPSB0aGlzLmdldExpc3RWYWx1ZSh2YWwpO1xuICAgIGlmIChsaXN0VmFsdWUpIHJldHVybiBsaXN0VmFsdWU7XG4gICAgcmV0dXJuIHRoaXMuZ2V0RGljdFZhbHVlKHZhbCk7XG4gIH07XG59XG5cbmV4cG9ydCBkZWZhdWx0IFV0aWxzO1xuIl19
|
|
@@ -2,18 +2,24 @@ import { RosenTokens, TokenMap } from '@rosen-bridge/tokens';
|
|
|
2
2
|
import { RosenData } from './types';
|
|
3
3
|
import { AbstractLogger } from '@rosen-bridge/abstract-logger';
|
|
4
4
|
export default abstract class AbstractRosenDataExtractor<TransactionType> {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
abstract readonly chain: string;
|
|
6
|
+
protected readonly logger: AbstractLogger;
|
|
7
|
+
protected readonly tokens: TokenMap;
|
|
8
|
+
protected readonly lockAddress: string;
|
|
9
|
+
constructor(
|
|
10
|
+
lockAddress: string,
|
|
11
|
+
tokens: RosenTokens,
|
|
12
|
+
logger?: AbstractLogger
|
|
13
|
+
);
|
|
14
|
+
/**
|
|
15
|
+
* extracts RosenData from given lock transaction and wrap the amount
|
|
16
|
+
*/
|
|
17
|
+
get: (transaction: TransactionType) => RosenData | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* extracts RosenData from given lock transaction
|
|
20
|
+
*/
|
|
21
|
+
abstract extractRawData: (
|
|
22
|
+
transaction: TransactionType
|
|
23
|
+
) => RosenData | undefined;
|
|
18
24
|
}
|
|
19
|
-
//# sourceMappingURL=AbstractRosenDataExtractor.d.ts.map
|
|
25
|
+
//# sourceMappingURL=AbstractRosenDataExtractor.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
interface RosenData {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
toChain: string;
|
|
3
|
+
toAddress: string;
|
|
4
|
+
bridgeFee: string;
|
|
5
|
+
networkFee: string;
|
|
6
|
+
fromAddress: string;
|
|
7
|
+
sourceChainTokenId: string;
|
|
8
|
+
amount: string;
|
|
9
|
+
targetChainTokenId: string;
|
|
10
|
+
sourceTxId: string;
|
|
11
11
|
}
|
|
12
12
|
interface TokenTransformation {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
from: string;
|
|
14
|
+
to: string;
|
|
15
|
+
amount: string;
|
|
16
16
|
}
|
|
17
17
|
export { RosenData, TokenTransformation };
|
|
18
|
-
//# sourceMappingURL=types.d.ts.map
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -4,19 +4,28 @@ import { BitcoinEsploraTransaction, EsploraTxOutput } from './types';
|
|
|
4
4
|
import { RosenTokens } from '@rosen-bridge/tokens';
|
|
5
5
|
import { AbstractLogger } from '@rosen-bridge/abstract-logger';
|
|
6
6
|
export declare class BitcoinEsploraRosenExtractor extends AbstractRosenDataExtractor<BitcoinEsploraTransaction> {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
readonly chain = 'bitcoin';
|
|
8
|
+
protected lockScriptPubKey: string;
|
|
9
|
+
constructor(
|
|
10
|
+
lockAddress: string,
|
|
11
|
+
tokens: RosenTokens,
|
|
12
|
+
logger?: AbstractLogger
|
|
13
|
+
);
|
|
14
|
+
/**
|
|
15
|
+
* extracts RosenData from given lock transaction in Esplora format
|
|
16
|
+
* @param transaction the lock transaction in Esplora format
|
|
17
|
+
*/
|
|
18
|
+
extractRawData: (
|
|
19
|
+
transaction: BitcoinEsploraTransaction
|
|
20
|
+
) => RosenData | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* extracts and builds token transformation from UTXO and tokenMap
|
|
23
|
+
* @param box transaction output
|
|
24
|
+
* @param toChain event target chain
|
|
25
|
+
*/
|
|
26
|
+
getAssetTransformation: (
|
|
27
|
+
box: EsploraTxOutput,
|
|
28
|
+
toChain: string
|
|
29
|
+
) => TokenTransformation | undefined;
|
|
21
30
|
}
|
|
22
|
-
//# sourceMappingURL=BitcoinEsploraRosenExtractor.d.ts.map
|
|
31
|
+
//# sourceMappingURL=BitcoinEsploraRosenExtractor.d.ts.map
|
|
@@ -4,19 +4,26 @@ import { BitcoinTxOutput } from './types';
|
|
|
4
4
|
import { RosenTokens } from '@rosen-bridge/tokens';
|
|
5
5
|
import { AbstractLogger } from '@rosen-bridge/abstract-logger';
|
|
6
6
|
export declare class BitcoinRosenExtractor extends AbstractRosenDataExtractor<string> {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
readonly chain = 'bitcoin';
|
|
8
|
+
protected lockScriptPubKey: string;
|
|
9
|
+
constructor(
|
|
10
|
+
lockAddress: string,
|
|
11
|
+
tokens: RosenTokens,
|
|
12
|
+
logger?: AbstractLogger
|
|
13
|
+
);
|
|
14
|
+
/**
|
|
15
|
+
* extracts RosenData from given lock transaction in BitcoinTx format
|
|
16
|
+
* @param serializedTransaction stringified transaction in BitcoinTx format
|
|
17
|
+
*/
|
|
18
|
+
extractRawData: (serializedTransaction: string) => RosenData | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* extracts and builds token transformation from UTXO and tokenMap
|
|
21
|
+
* @param box transaction output
|
|
22
|
+
* @param toChain event target chain
|
|
23
|
+
*/
|
|
24
|
+
getAssetTransformation: (
|
|
25
|
+
box: BitcoinTxOutput,
|
|
26
|
+
toChain: string
|
|
27
|
+
) => TokenTransformation | undefined;
|
|
21
28
|
}
|
|
22
|
-
//# sourceMappingURL=BitcoinRosenExtractor.d.ts.map
|
|
29
|
+
//# sourceMappingURL=BitcoinRosenExtractor.d.ts.map
|
|
@@ -4,19 +4,26 @@ import { BitcoinRpcTransaction, BitcoinRpcTxOutput } from './types';
|
|
|
4
4
|
import { RosenTokens } from '@rosen-bridge/tokens';
|
|
5
5
|
import { AbstractLogger } from '@rosen-bridge/abstract-logger';
|
|
6
6
|
export declare class BitcoinRpcRosenExtractor extends AbstractRosenDataExtractor<BitcoinRpcTransaction> {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
readonly chain = 'bitcoin';
|
|
8
|
+
protected lockScriptPubKey: string;
|
|
9
|
+
constructor(
|
|
10
|
+
lockAddress: string,
|
|
11
|
+
tokens: RosenTokens,
|
|
12
|
+
logger?: AbstractLogger
|
|
13
|
+
);
|
|
14
|
+
/**
|
|
15
|
+
* extracts RosenData from given lock transaction in Rpc format
|
|
16
|
+
* @param transaction the lock transaction in Rpc format
|
|
17
|
+
*/
|
|
18
|
+
extractRawData: (transaction: BitcoinRpcTransaction) => RosenData | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* extracts and builds token transformation from UTXO and tokenMap
|
|
21
|
+
* @param box transaction output
|
|
22
|
+
* @param toChain event target chain
|
|
23
|
+
*/
|
|
24
|
+
getAssetTransformation: (
|
|
25
|
+
box: BitcoinRpcTxOutput,
|
|
26
|
+
toChain: string
|
|
27
|
+
) => TokenTransformation | undefined;
|
|
21
28
|
}
|
|
22
|
-
//# sourceMappingURL=BitcoinRpcRosenExtractor.d.ts.map
|
|
29
|
+
//# sourceMappingURL=BitcoinRpcRosenExtractor.d.ts.map
|
|
@@ -1,89 +1,89 @@
|
|
|
1
1
|
export interface OpReturnData {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
toChain: string;
|
|
3
|
+
toAddress: string;
|
|
4
|
+
bridgeFee: string;
|
|
5
|
+
networkFee: string;
|
|
6
6
|
}
|
|
7
7
|
export interface EsploraTxInput {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
scriptpubkey: string;
|
|
12
|
-
scriptpubkey_asm: string;
|
|
13
|
-
scriptpubkey_type: string;
|
|
14
|
-
scriptpubkey_address: string;
|
|
15
|
-
value: number;
|
|
16
|
-
};
|
|
17
|
-
scriptsig: string;
|
|
18
|
-
scriptsig_asm: string;
|
|
19
|
-
is_coinbase: false;
|
|
20
|
-
sequence: number;
|
|
21
|
-
}
|
|
22
|
-
export interface EsploraTxOutput {
|
|
8
|
+
txid: string;
|
|
9
|
+
vout: number;
|
|
10
|
+
prevout: {
|
|
23
11
|
scriptpubkey: string;
|
|
24
12
|
scriptpubkey_asm: string;
|
|
25
13
|
scriptpubkey_type: string;
|
|
26
14
|
scriptpubkey_address: string;
|
|
27
15
|
value: number;
|
|
16
|
+
};
|
|
17
|
+
scriptsig: string;
|
|
18
|
+
scriptsig_asm: string;
|
|
19
|
+
is_coinbase: false;
|
|
20
|
+
sequence: number;
|
|
21
|
+
}
|
|
22
|
+
export interface EsploraTxOutput {
|
|
23
|
+
scriptpubkey: string;
|
|
24
|
+
scriptpubkey_asm: string;
|
|
25
|
+
scriptpubkey_type: string;
|
|
26
|
+
scriptpubkey_address: string;
|
|
27
|
+
value: number;
|
|
28
28
|
}
|
|
29
29
|
export interface BitcoinEsploraTransaction {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
txid: string;
|
|
31
|
+
version: number;
|
|
32
|
+
locktime: number;
|
|
33
|
+
vin: Array<EsploraTxInput>;
|
|
34
|
+
vout: Array<EsploraTxOutput>;
|
|
35
|
+
size: number;
|
|
36
|
+
weight: number;
|
|
37
|
+
fee: number;
|
|
38
|
+
status: {
|
|
39
|
+
confirmed: true;
|
|
40
|
+
block_height: number;
|
|
41
|
+
block_hash: string;
|
|
42
|
+
block_time: number;
|
|
43
|
+
};
|
|
44
44
|
}
|
|
45
45
|
export interface BitcoinTxInput {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
txId: string;
|
|
47
|
+
index: number;
|
|
48
|
+
scriptPubKey: string;
|
|
49
49
|
}
|
|
50
50
|
export interface BitcoinTxOutput {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
scriptPubKey: string;
|
|
52
|
+
value: bigint;
|
|
53
53
|
}
|
|
54
54
|
export interface BitcoinTx {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
id: string;
|
|
56
|
+
inputs: BitcoinTxInput[];
|
|
57
|
+
outputs: BitcoinTxOutput[];
|
|
58
58
|
}
|
|
59
59
|
export interface BitcoinRpcTxInput {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
txid: string;
|
|
61
|
+
vout: number;
|
|
62
|
+
scriptSig: {
|
|
63
|
+
asm: string;
|
|
64
|
+
hex: string;
|
|
65
|
+
};
|
|
66
|
+
txinwitness: Array<string>;
|
|
67
|
+
sequence: number;
|
|
68
68
|
}
|
|
69
69
|
export interface BitcoinRpcTxOutput {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
value: number;
|
|
71
|
+
n: number;
|
|
72
|
+
scriptPubKey: {
|
|
73
|
+
asm: string;
|
|
74
|
+
hex: string;
|
|
75
|
+
};
|
|
76
76
|
}
|
|
77
77
|
export interface BitcoinRpcTransaction {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
78
|
+
txid: string;
|
|
79
|
+
hash: string;
|
|
80
|
+
version: number;
|
|
81
|
+
size: number;
|
|
82
|
+
vsize: number;
|
|
83
|
+
weight: number;
|
|
84
|
+
locktime: number;
|
|
85
|
+
vin: Array<BitcoinRpcTxInput>;
|
|
86
|
+
vout: Array<BitcoinRpcTxOutput>;
|
|
87
|
+
hex: string;
|
|
88
88
|
}
|
|
89
|
-
//# sourceMappingURL=types.d.ts.map
|
|
89
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -2,17 +2,20 @@ import { RosenData, TokenTransformation } from '../abstract/types';
|
|
|
2
2
|
import AbstractRosenDataExtractor from '../abstract/AbstractRosenDataExtractor';
|
|
3
3
|
import { BlockFrostOutputBox, BlockFrostTransaction } from './types';
|
|
4
4
|
export declare class CardanoBlockFrostRosenExtractor extends AbstractRosenDataExtractor<BlockFrostTransaction> {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
readonly chain = 'cardano';
|
|
6
|
+
/**
|
|
7
|
+
* extracts RosenData from given lock transaction in blockfrost format
|
|
8
|
+
* @param transaction the lock transaction in blockfrost format
|
|
9
|
+
*/
|
|
10
|
+
extractRawData: (transaction: BlockFrostTransaction) => RosenData | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* extracts and builds token transformation from UTXO and tokenMap
|
|
13
|
+
* @param box transaction output
|
|
14
|
+
* @param toChain event target chain
|
|
15
|
+
*/
|
|
16
|
+
getAssetTransformation: (
|
|
17
|
+
box: BlockFrostOutputBox,
|
|
18
|
+
toChain: string
|
|
19
|
+
) => TokenTransformation | undefined;
|
|
17
20
|
}
|
|
18
|
-
//# sourceMappingURL=CardanoBlockFrostRosenExtractor.d.ts.map
|
|
21
|
+
//# sourceMappingURL=CardanoBlockFrostRosenExtractor.d.ts.map
|
|
@@ -2,17 +2,20 @@ import { RosenData, TokenTransformation } from '../abstract/types';
|
|
|
2
2
|
import AbstractRosenDataExtractor from '../abstract/AbstractRosenDataExtractor';
|
|
3
3
|
import { GraphQLTransaction, GraphQLTxOutput } from './types';
|
|
4
4
|
export declare class CardanoGraphQLRosenExtractor extends AbstractRosenDataExtractor<GraphQLTransaction> {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
readonly chain = 'cardano';
|
|
6
|
+
/**
|
|
7
|
+
* extracts RosenData from given lock transaction in graphql format
|
|
8
|
+
* @param transaction the lock transaction in graphql format
|
|
9
|
+
*/
|
|
10
|
+
extractRawData: (transaction: GraphQLTransaction) => RosenData | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* extracts and builds token transformation from UTXO and tokenMap
|
|
13
|
+
* @param box transaction output
|
|
14
|
+
* @param toChain event target chain
|
|
15
|
+
*/
|
|
16
|
+
getAssetTransformation: (
|
|
17
|
+
box: GraphQLTxOutput,
|
|
18
|
+
toChain: string
|
|
19
|
+
) => TokenTransformation | undefined;
|
|
17
20
|
}
|
|
18
|
-
//# sourceMappingURL=CardanoGraphQLRosenExtractor.d.ts.map
|
|
21
|
+
//# sourceMappingURL=CardanoGraphQLRosenExtractor.d.ts.map
|
|
@@ -2,17 +2,20 @@ import { RosenData, TokenTransformation } from '../abstract/types';
|
|
|
2
2
|
import AbstractRosenDataExtractor from '../abstract/AbstractRosenDataExtractor';
|
|
3
3
|
import { KoiosTransaction, Utxo } from './types';
|
|
4
4
|
export declare class CardanoKoiosRosenExtractor extends AbstractRosenDataExtractor<KoiosTransaction> {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
readonly chain = 'cardano';
|
|
6
|
+
/**
|
|
7
|
+
* extracts RosenData from given lock transaction in Koios format
|
|
8
|
+
* @param transaction the lock transaction in Koios format
|
|
9
|
+
*/
|
|
10
|
+
extractRawData: (transaction: KoiosTransaction) => RosenData | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* extracts and builds token transformation from UTXO and tokenMap
|
|
13
|
+
* @param box transaction output
|
|
14
|
+
* @param toChain event target chain
|
|
15
|
+
*/
|
|
16
|
+
getAssetTransformation: (
|
|
17
|
+
box: Utxo,
|
|
18
|
+
toChain: string
|
|
19
|
+
) => TokenTransformation | undefined;
|
|
17
20
|
}
|
|
18
|
-
//# sourceMappingURL=CardanoKoiosRosenExtractor.d.ts.map
|
|
21
|
+
//# sourceMappingURL=CardanoKoiosRosenExtractor.d.ts.map
|