New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@metaplex-foundation/mpl-bubblegum

Package Overview
Dependencies
Maintainers
5
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metaplex-foundation/mpl-bubblegum - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

6

dist/src/getAssetWithProof.d.ts

@@ -18,4 +18,8 @@ import { Context, PublicKey } from '@metaplex-foundation/umi';

};
declare type GetAssetWithProofOptions = {
truncateCanopy?: boolean;
};
export declare const getAssetWithProof: (context: Pick<Context, 'rpc'> & {
rpc: DasApiInterface;
}, assetId: PublicKey) => Promise<AssetWithProof>;
}, assetId: PublicKey, options?: GetAssetWithProofOptions | undefined) => Promise<AssetWithProof>;
export {};

10

dist/src/getAssetWithProof.js

@@ -6,3 +6,3 @@ "use strict";

const generated_1 = require("./generated");
const getAssetWithProof = async (context, assetId) => {
const getAssetWithProof = async (context, assetId, options) => {
const [rpcAsset, rpcAssetProof] = await Promise.all([

@@ -12,2 +12,8 @@ context.rpc.getAsset(assetId),

]);
let { proof } = rpcAssetProof;
if (options?.truncateCanopy) {
const merkleTreeAccount = await (0, generated_1.fetchMerkleTree)(context, rpcAssetProof.tree_id);
const canopyDepth = Math.log2(merkleTreeAccount.canopy.length + 2) - 1;
proof = rpcAssetProof.proof.slice(0, canopyDepth === 0 ? undefined : -canopyDepth);
}
const collectionString = (rpcAsset.grouping ?? []).find((group) => group.group_key === 'collection')?.group_value;

@@ -41,3 +47,3 @@ const metadata = {

index: rpcAssetProof.node_index - 2 ** rpcAssetProof.proof.length,
proof: rpcAssetProof.proof,
proof,
metadata,

@@ -44,0 +50,0 @@ rpcAsset,

{
"name": "@metaplex-foundation/mpl-bubblegum",
"version": "4.1.0",
"version": "4.2.0",
"description": "Create and interact with compressed Metaplex NFTs",

@@ -20,3 +20,3 @@ "main": "dist/src/index.js",

"@metaplex-foundation/mpl-token-metadata": "3.0.0-alpha.27",
"@metaplex-foundation/digital-asset-standard-api": "^1.0.0-alpha.0",
"@metaplex-foundation/digital-asset-standard-api": "^1.0.4",
"@metaplex-foundation/mpl-toolbox": "^0.9.0",

@@ -23,0 +23,0 @@ "@noble/hashes": "^1.3.1",

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