@cardano-sdk/core 0.8.0 → 0.9.0-nightly.1
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/cjs/Cardano/types/Asset.d.ts.map +1 -1
- package/dist/cjs/Cardano/types/Asset.js +4 -24
- package/dist/cjs/Cardano/types/Asset.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/Cardano/types/Asset.d.ts.map +1 -1
- package/dist/esm/Cardano/types/Asset.js +2 -2
- package/dist/esm/Cardano/types/Asset.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Asset.d.ts","sourceRoot":"","sources":["../../../../src/Cardano/types/Asset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Asset.d.ts","sourceRoot":"","sources":["../../../../src/Cardano/types/Asset.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAAkC,MAAM,mBAAmB,CAAC;AAGrG,oBAAY,OAAO,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;AAK9C,oBAAY,SAAS,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;AAClD,eAAO,MAAM,SAAS,UAAW,MAAM,cAQtC,CAAC;AAMF,eAAO,MAAM,OAAO,UAAW,MAAM,YAMpC,CAAC;AAKF,oBAAY,QAAQ,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;AAChD,eAAO,MAAM,QAAQ,UAAW,MAAM,aAA6D,CAAC;AAMpG,oBAAY,gBAAgB,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;AAChE,eAAO,MAAM,gBAAgB;YAAW,MAAM;;CAAsD,CAAC"}
|
|
@@ -1,32 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
25
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
6
|
exports.AssetFingerprint = exports.PolicyId = exports.AssetId = exports.AssetName = void 0;
|
|
27
|
-
const cip14 = __importStar(require("@emurgo/cip14-js"));
|
|
28
7
|
const crypto_1 = require("@cardano-sdk/crypto");
|
|
29
8
|
const util_1 = require("@cardano-sdk/util");
|
|
9
|
+
const cip14_js_1 = __importDefault(require("@emurgo/cip14-js"));
|
|
30
10
|
const AssetName = (value) => {
|
|
31
11
|
if (value.length > 0) {
|
|
32
12
|
(0, util_1.assertIsHexString)(value);
|
|
@@ -52,7 +32,7 @@ exports.PolicyId = PolicyId;
|
|
|
52
32
|
const AssetFingerprint = (value) => (0, util_1.typedBech32)(value, 'asset', 32);
|
|
53
33
|
exports.AssetFingerprint = AssetFingerprint;
|
|
54
34
|
exports.AssetFingerprint.fromParts = (policyId, assetName) => {
|
|
55
|
-
const cip14Fingerprint =
|
|
35
|
+
const cip14Fingerprint = cip14_js_1.default.fromParts(Buffer.from(policyId.toString(), 'hex'), Buffer.from(assetName.toString(), 'hex'));
|
|
56
36
|
return (0, exports.AssetFingerprint)(cip14Fingerprint.fingerprint());
|
|
57
37
|
};
|
|
58
38
|
//# sourceMappingURL=Asset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Asset.js","sourceRoot":"","sources":["../../../../src/Cardano/types/Asset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Asset.js","sourceRoot":"","sources":["../../../../src/Cardano/types/Asset.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuD;AACvD,4CAAqG;AACrG,gEAAqC;AAQ9B,MAAM,SAAS,GAAG,CAAC,KAAa,EAAa,EAAE;IACpD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,IAAA,wBAAiB,EAAC,KAAK,CAAC,CAAC;QACzB,IAAI,KAAK,CAAC,MAAM,GAAG,EAAE,EAAE;YACrB,MAAM,IAAI,yBAAkB,CAAC,UAAU,CAAC,CAAC;SAC1C;KACF;IACD,OAAO,KAAK,CAAC,WAAW,EAA0B,CAAC;AACrD,CAAC,CAAC;AARW,QAAA,SAAS,aAQpB;AAMK,MAAM,OAAO,GAAG,CAAC,KAAa,EAAW,EAAE;IAChD,MAAM,eAAe,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClD,IAAA,wBAAiB,EAAC,eAAe,CAAC,CAAC;IACnC,IAAI,eAAe,CAAC,MAAM,GAAG,GAAG;QAAE,MAAM,IAAI,yBAAkB,CAAC,UAAU,CAAC,CAAC;IAC3E,IAAI,eAAe,CAAC,MAAM,GAAG,EAAE;QAAE,MAAM,IAAI,yBAAkB,CAAC,WAAW,C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