@greymass/eosio
Advanced tools
Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "@greymass/eosio", | ||
"description": "Library for working with EOSIO blockchains", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"homepage": "https://github.com/greymass/eosio-core", | ||
@@ -6,0 +6,0 @@ "license": "BSD-3-Clause", |
@@ -6,2 +6,3 @@ import {abiEncode} from '../serializer/encoder' | ||
ABISerializableConstructor, | ||
ABISerializableObject, | ||
ABISerializableType, | ||
@@ -41,3 +42,3 @@ } from '../serializer/serializable' | ||
export interface AnyAction extends ActionBase { | ||
data: BytesType | ABISerializable | ||
data: BytesType | ABISerializableObject | Record<string, any> | ||
} | ||
@@ -44,0 +45,0 @@ |
@@ -331,2 +331,10 @@ import BN from 'bn.js' | ||
[Symbol.toPrimitive](type: string) { | ||
if (type === 'number') { | ||
return this.toNumber() | ||
} else { | ||
return this.toString() | ||
} | ||
} | ||
toABI(encoder: ABIEncoder) { | ||
@@ -333,0 +341,0 @@ encoder.writeArray(this.byteArray) |
@@ -18,5 +18,13 @@ import {ABISerializableObject} from '../serializer/serializable' | ||
/** The raw representation of the name. */ | ||
rawValue: UInt64 | ||
/** The numeric representation of the name. */ | ||
value: UInt64 | ||
/** | ||
* The raw representation of the name. | ||
* @deprecated Use value instead. | ||
*/ | ||
get rawValue(): UInt64 { | ||
return this.value | ||
} | ||
/** Create a new Name instance from any of its representing types. */ | ||
@@ -39,4 +47,4 @@ static from(value: NameType): Name { | ||
constructor(rawValue: UInt64) { | ||
this.rawValue = rawValue | ||
constructor(value: UInt64) { | ||
this.value = value | ||
} | ||
@@ -46,3 +54,3 @@ | ||
equals(other: NameType) { | ||
return this.rawValue.equals(Name.from(other).rawValue) | ||
return this.value.equals(Name.from(other).value) | ||
} | ||
@@ -52,7 +60,7 @@ | ||
toString() { | ||
return nameToString(this.rawValue) | ||
return nameToString(this.value) | ||
} | ||
toABI(encoder: ABIEncoder) { | ||
this.rawValue.toABI(encoder) | ||
this.value.toABI(encoder) | ||
} | ||
@@ -59,0 +67,0 @@ |
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 not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
742282
14803