Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@codama/nodes-from-anchor

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codama/nodes-from-anchor - npm Package Compare versions

Comparing version
1.3.1
to
1.3.2
+3
-1
dist/index.browser.cjs

@@ -827,4 +827,6 @@ "use strict";

}
const isBorshString = (0, import_nodes37.isNode)(argumentNode.type, "sizePrefixTypeNode") && (0, import_nodes37.isNode)(argumentNode.type.type, "stringTypeNode") && argumentNode.type.type.encoding === "utf8" && (0, import_nodes37.isNode)(argumentNode.type.prefix, "numberTypeNode") && argumentNode.type.prefix.format === "u32";
const argumentType = isBorshString ? (0, import_nodes37.stringTypeNode)("utf8") : argumentNode.type;
return {
definition: (0, import_nodes37.variablePdaSeedNode)(argumentName, argumentNode.type),
definition: (0, import_nodes37.variablePdaSeedNode)(argumentName, argumentType),
value: (0, import_nodes37.pdaSeedValueNode)(argumentName, (0, import_nodes37.argumentValueNode)(argumentName))

@@ -831,0 +833,0 @@ };

@@ -813,3 +813,3 @@ // src/index.ts

instructionAccountNode as instructionAccountNode2,
isNode,
isNode as isNode2,
pdaNode as pdaNode2,

@@ -830,4 +830,6 @@ pdaValueNode,

constantPdaSeedNodeFromBytes,
isNode,
pdaSeedValueNode,
publicKeyTypeNode as publicKeyTypeNode3,
stringTypeNode as stringTypeNode4,
variablePdaSeedNode as variablePdaSeedNode2

@@ -856,4 +858,6 @@ } from "@codama/nodes";

}
const isBorshString = isNode(argumentNode.type, "sizePrefixTypeNode") && isNode(argumentNode.type.type, "stringTypeNode") && argumentNode.type.type.encoding === "utf8" && isNode(argumentNode.type.prefix, "numberTypeNode") && argumentNode.type.prefix.format === "u32";
const argumentType = isBorshString ? stringTypeNode4("utf8") : argumentNode.type;
return {
definition: variablePdaSeedNode2(argumentName, argumentNode.type),
definition: variablePdaSeedNode2(argumentName, argumentType),
value: pdaSeedValueNode(argumentName, argumentValueNode(argumentName))

@@ -896,5 +900,5 @@ };

const { definition, value } = pdaSeedNodeFromAnchorV01(idl.pda.program, instructionArguments);
if (isNode(definition, "constantPdaSeedNode") && isNode(definition.value, "bytesValueNode") && definition.value.encoding === "base58") {
if (isNode2(definition, "constantPdaSeedNode") && isNode2(definition.value, "bytesValueNode") && definition.value.encoding === "base58") {
programId = definition.value.data;
} else if (value && isNode(value.value, ["accountValueNode", "argumentValueNode"])) {
} else if (value && isNode2(value.value, ["accountValueNode", "argumentValueNode"])) {
programIdValue = value.value;

@@ -901,0 +905,0 @@ }

@@ -827,4 +827,6 @@ "use strict";

}
const isBorshString = (0, import_nodes37.isNode)(argumentNode.type, "sizePrefixTypeNode") && (0, import_nodes37.isNode)(argumentNode.type.type, "stringTypeNode") && argumentNode.type.type.encoding === "utf8" && (0, import_nodes37.isNode)(argumentNode.type.prefix, "numberTypeNode") && argumentNode.type.prefix.format === "u32";
const argumentType = isBorshString ? (0, import_nodes37.stringTypeNode)("utf8") : argumentNode.type;
return {
definition: (0, import_nodes37.variablePdaSeedNode)(argumentName, argumentNode.type),
definition: (0, import_nodes37.variablePdaSeedNode)(argumentName, argumentType),
value: (0, import_nodes37.pdaSeedValueNode)(argumentName, (0, import_nodes37.argumentValueNode)(argumentName))

@@ -831,0 +833,0 @@ };

@@ -813,3 +813,3 @@ // src/index.ts

instructionAccountNode as instructionAccountNode2,
isNode,
isNode as isNode2,
pdaNode as pdaNode2,

@@ -830,4 +830,6 @@ pdaValueNode,

constantPdaSeedNodeFromBytes,
isNode,
pdaSeedValueNode,
publicKeyTypeNode as publicKeyTypeNode3,
stringTypeNode as stringTypeNode4,
variablePdaSeedNode as variablePdaSeedNode2

@@ -856,4 +858,6 @@ } from "@codama/nodes";

}
const isBorshString = isNode(argumentNode.type, "sizePrefixTypeNode") && isNode(argumentNode.type.type, "stringTypeNode") && argumentNode.type.type.encoding === "utf8" && isNode(argumentNode.type.prefix, "numberTypeNode") && argumentNode.type.prefix.format === "u32";
const argumentType = isBorshString ? stringTypeNode4("utf8") : argumentNode.type;
return {
definition: variablePdaSeedNode2(argumentName, argumentNode.type),
definition: variablePdaSeedNode2(argumentName, argumentType),
value: pdaSeedValueNode(argumentName, argumentValueNode(argumentName))

@@ -896,5 +900,5 @@ };

const { definition, value } = pdaSeedNodeFromAnchorV01(idl.pda.program, instructionArguments);
if (isNode(definition, "constantPdaSeedNode") && isNode(definition.value, "bytesValueNode") && definition.value.encoding === "base58") {
if (isNode2(definition, "constantPdaSeedNode") && isNode2(definition.value, "bytesValueNode") && definition.value.encoding === "base58") {
programId = definition.value.data;
} else if (value && isNode(value.value, ["accountValueNode", "argumentValueNode"])) {
} else if (value && isNode2(value.value, ["accountValueNode", "argumentValueNode"])) {
programIdValue = value.value;

@@ -901,0 +905,0 @@ }

@@ -813,3 +813,3 @@ // src/index.ts

instructionAccountNode as instructionAccountNode2,
isNode,
isNode as isNode2,
pdaNode as pdaNode2,

@@ -830,4 +830,6 @@ pdaValueNode,

constantPdaSeedNodeFromBytes,
isNode,
pdaSeedValueNode,
publicKeyTypeNode as publicKeyTypeNode3,
stringTypeNode as stringTypeNode4,
variablePdaSeedNode as variablePdaSeedNode2

@@ -856,4 +858,6 @@ } from "@codama/nodes";

}
const isBorshString = isNode(argumentNode.type, "sizePrefixTypeNode") && isNode(argumentNode.type.type, "stringTypeNode") && argumentNode.type.type.encoding === "utf8" && isNode(argumentNode.type.prefix, "numberTypeNode") && argumentNode.type.prefix.format === "u32";
const argumentType = isBorshString ? stringTypeNode4("utf8") : argumentNode.type;
return {
definition: variablePdaSeedNode2(argumentName, argumentNode.type),
definition: variablePdaSeedNode2(argumentName, argumentType),
value: pdaSeedValueNode(argumentName, argumentValueNode(argumentName))

@@ -896,5 +900,5 @@ };

const { definition, value } = pdaSeedNodeFromAnchorV01(idl.pda.program, instructionArguments);
if (isNode(definition, "constantPdaSeedNode") && isNode(definition.value, "bytesValueNode") && definition.value.encoding === "base58") {
if (isNode2(definition, "constantPdaSeedNode") && isNode2(definition.value, "bytesValueNode") && definition.value.encoding === "base58") {
programId = definition.value.data;
} else if (value && isNode(value.value, ["accountValueNode", "argumentValueNode"])) {
} else if (value && isNode2(value.value, ["accountValueNode", "argumentValueNode"])) {
programIdValue = value.value;

@@ -901,0 +905,0 @@ }

@@ -1,1 +0,1 @@

{"version":3,"file":"PdaSeedNode.d.ts","sourceRoot":"","sources":["../../../src/v01/PdaSeedNode.ts"],"names":[],"mappings":"AAKA,OAAO,EAIH,uBAAuB,EACvB,WAAW,EACX,gBAAgB,EAInB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,wBAAgB,wBAAwB,CACpC,IAAI,EAAE,UAAU,EAChB,oBAAoB,EAAE,uBAAuB,EAAE,GAChD,QAAQ,CAAC;IAAE,UAAU,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAC,CA+BjE"}
{"version":3,"file":"PdaSeedNode.d.ts","sourceRoot":"","sources":["../../../src/v01/PdaSeedNode.ts"],"names":[],"mappings":"AAKA,OAAO,EAIH,uBAAuB,EAEvB,WAAW,EACX,gBAAgB,EAKnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,wBAAgB,wBAAwB,CACpC,IAAI,EAAE,UAAU,EAChB,oBAAoB,EAAE,uBAAuB,EAAE,GAChD,QAAQ,CAAC;IAAE,UAAU,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAC,CA2CjE"}
{
"name": "@codama/nodes-from-anchor",
"version": "1.3.1",
"version": "1.3.2",
"description": "Node specifications and helpers for the Codama standard",

@@ -41,4 +41,4 @@ "exports": {

"@codama/errors": "1.4.1",
"@codama/nodes": "1.4.1",
"@codama/visitors": "1.4.1"
"@codama/visitors": "1.4.1",
"@codama/nodes": "1.4.1"
},

@@ -45,0 +45,0 @@ "license": "MIT",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display