@multiversx/sdk-core
Advanced tools
Comparing version 12.10.0 to 12.11.0
@@ -11,3 +11,3 @@ import { Type } from "./types"; | ||
name: string; | ||
ownerOnly?: boolean; | ||
onlyOwner?: boolean; | ||
mutability: string; | ||
@@ -22,4 +22,4 @@ payableInTokens: string[]; | ||
readonly payableInTokens: string[]; | ||
readonly ownerOnly: boolean; | ||
constructor(mutability: string, payableInTokens: string[], ownerOnly?: boolean); | ||
readonly onlyOwner: boolean; | ||
constructor(mutability: string, payableInTokens: string[], onlyOwner?: boolean); | ||
isPayableInEGLD(): boolean; | ||
@@ -29,3 +29,3 @@ isPayableInToken(token: string): boolean; | ||
isReadonly(): boolean; | ||
isOwnerOnly(): boolean; | ||
isOnlyOwner(): boolean; | ||
} | ||
@@ -32,0 +32,0 @@ export declare class EndpointParameterDefinition { |
@@ -21,3 +21,3 @@ "use strict"; | ||
json.name = json.name == null ? NamePlaceholder : json.name; | ||
json.ownerOnly = json.ownerOnly || false; | ||
json.onlyOwner = json.onlyOwner || false; | ||
json.payableInTokens = json.payableInTokens || []; | ||
@@ -28,3 +28,3 @@ json.inputs = json.inputs || []; | ||
let output = json.outputs.map(param => EndpointParameterDefinition.fromJSON(param)); | ||
let modifiers = new EndpointModifiers(json.mutability, json.payableInTokens, json.ownerOnly); | ||
let modifiers = new EndpointModifiers(json.mutability, json.payableInTokens, json.onlyOwner); | ||
return new EndpointDefinition(json.name, input, output, modifiers); | ||
@@ -35,6 +35,6 @@ } | ||
class EndpointModifiers { | ||
constructor(mutability, payableInTokens, ownerOnly) { | ||
constructor(mutability, payableInTokens, onlyOwner) { | ||
this.mutability = mutability || ""; | ||
this.payableInTokens = payableInTokens || []; | ||
this.ownerOnly = ownerOnly || false; | ||
this.onlyOwner = onlyOwner || false; | ||
} | ||
@@ -62,4 +62,4 @@ isPayableInEGLD() { | ||
} | ||
isOwnerOnly() { | ||
return this.ownerOnly; | ||
isOnlyOwner() { | ||
return this.onlyOwner; | ||
} | ||
@@ -66,0 +66,0 @@ } |
{ | ||
"name": "@multiversx/sdk-core", | ||
"version": "12.10.0", | ||
"version": "12.11.0", | ||
"description": "MultiversX SDK for JavaScript and TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "out/index.js", |