@helium/spl-utils
Advanced tools
Comparing version 0.0.30 to 0.0.31
@@ -58,4 +58,6 @@ "use strict"; | ||
function toAsset(result) { | ||
var _a, _b, _c, _d, _e; | ||
return Object.assign(Object.assign({}, result), { id: new web3_js_1.PublicKey(result.id), grouping: result.grouping && new web3_js_1.PublicKey(result.grouping), compression: Object.assign(Object.assign({}, result.compression), { leafId: result.compression.leaf_id, dataHash: (_a = result.compression.data_hash) !== null && _a !== void 0 ? _a : bs58_1.default.decode(result.compression.data_hash), creatorHash: (_b = result.compression.creator_hash) !== null && _b !== void 0 ? _b : bs58_1.default.decode(result.compression.creator_hash), assetHash: (_c = result.compression.asset_hash) !== null && _c !== void 0 ? _c : bs58_1.default.decode(result.compression.asset_hash), tree: (_d = result.compression.tree) !== null && _d !== void 0 ? _d : new web3_js_1.PublicKey(result.compression.tree) }), ownership: Object.assign(Object.assign({}, result.ownership), { owner: (_e = result.ownership.owner) !== null && _e !== void 0 ? _e : new web3_js_1.PublicKey(result.ownership.owner) }) }); | ||
return Object.assign(Object.assign({}, result), { id: new web3_js_1.PublicKey(result.id), grouping: result.grouping && new web3_js_1.PublicKey(result.grouping), compression: Object.assign(Object.assign({}, result.compression), { leafId: result.compression.leaf_id, dataHash: result.compression.data_hash && | ||
bs58_1.default.decode(result.compression.data_hash), creatorHash: result.compression.creator_hash && | ||
bs58_1.default.decode(result.compression.creator_hash), assetHash: result.compression.asset_hash && | ||
bs58_1.default.decode(result.compression.asset_hash), tree: result.compression.tree && new web3_js_1.PublicKey(result.compression.tree) }), ownership: Object.assign(Object.assign({}, result.ownership), { delegate: result.ownership.delegate && new web3_js_1.PublicKey(result.ownership.delegate), owner: result.ownership.owner && new web3_js_1.PublicKey(result.ownership.owner) }) }); | ||
} | ||
@@ -62,0 +64,0 @@ function getAssetProof(url, assetId) { |
@@ -36,13 +36,14 @@ import { PublicKey } from "@solana/web3.js"; | ||
leafId: result.compression.leaf_id, | ||
dataHash: result.compression.data_hash ?? | ||
dataHash: result.compression.data_hash && | ||
base58.decode(result.compression.data_hash), | ||
creatorHash: result.compression.creator_hash ?? | ||
creatorHash: result.compression.creator_hash && | ||
base58.decode(result.compression.creator_hash), | ||
assetHash: result.compression.asset_hash ?? | ||
assetHash: result.compression.asset_hash && | ||
base58.decode(result.compression.asset_hash), | ||
tree: result.compression.tree ?? new PublicKey(result.compression.tree), | ||
tree: result.compression.tree && new PublicKey(result.compression.tree), | ||
}, | ||
ownership: { | ||
...result.ownership, | ||
owner: result.ownership.owner ?? new PublicKey(result.ownership.owner), | ||
delegate: result.ownership.delegate && new PublicKey(result.ownership.delegate), | ||
owner: result.ownership.owner && new PublicKey(result.ownership.owner), | ||
}, | ||
@@ -49,0 +50,0 @@ }; |
@@ -25,2 +25,3 @@ /// <reference types="node" /> | ||
owner: PublicKey; | ||
delegate: PublicKey; | ||
}; | ||
@@ -27,0 +28,0 @@ royalty: { |
{ | ||
"name": "@helium/spl-utils", | ||
"version": "0.0.30", | ||
"version": "0.0.31", | ||
"description": "Utils shared across spl suite", | ||
@@ -48,3 +48,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "d7921f5fcf8642d94af3d01b45ecca3c304413e8" | ||
"gitHead": "47999852972a20d9095860384d2c8b6ee4cad7dd" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
452765
4312
5
118