@wharfkit/antelope
Advanced tools
Comparing version 0.10.0-rc1 to 0.10.0
{ | ||
"name": "@wharfkit/antelope", | ||
"description": "Library for working with Antelope powered blockchains.", | ||
"version": "0.10.0-rc1", | ||
"version": "0.10.0", | ||
"homepage": "https://github.com/wharfkit/antelope", | ||
@@ -6,0 +6,0 @@ "license": "BSD-3-Clause-No-Military-License", |
@@ -27,2 +27,4 @@ import {isInstanceOf} from '../utils' | ||
ricardian_clauses: ABI.Clause[] | ||
/// Action Results | ||
action_results: ABI.ActionResult[] | ||
@@ -37,2 +39,3 @@ constructor(args: Partial<ABI.Def>) { | ||
this.ricardian_clauses = args.ricardian_clauses || [] | ||
this.action_results = args.action_results || [] | ||
} | ||
@@ -134,2 +137,11 @@ | ||
} | ||
const action_results: ABI.ActionResult[] = [] | ||
if (decoder.canRead()) { | ||
const numActionResults = decoder.readVaruint32() | ||
for (let i = 0; i < numActionResults; i++) { | ||
const name = Name.fromABI(decoder) | ||
const result_type = decoder.readString() | ||
action_results.push({name, result_type}) | ||
} | ||
} | ||
return new ABI({ | ||
@@ -143,2 +155,3 @@ version, | ||
variants, | ||
action_results, | ||
}) | ||
@@ -199,2 +212,7 @@ } | ||
} | ||
encoder.writeVaruint32(this.action_results.length) | ||
for (const result of this.action_results) { | ||
Name.from(result.name).toABI(encoder) | ||
encoder.writeString(result.result_type) | ||
} | ||
} | ||
@@ -280,3 +298,4 @@ | ||
this.ricardian_clauses.length != o.ricardian_clauses.length || | ||
this.variants.length != o.variants.length | ||
this.variants.length != o.variants.length || | ||
this.action_results.length != o.action_results.length | ||
) { | ||
@@ -299,2 +318,3 @@ return false | ||
variants: this.variants, | ||
action_results: this.action_results, | ||
} | ||
@@ -346,3 +366,8 @@ } | ||
ricardian_clauses: Clause[] | ||
action_results: ActionResult[] | ||
} | ||
export interface ActionResult { | ||
name: NameType | ||
result_type: string | ||
} | ||
export class ResolvedType { | ||
@@ -349,0 +374,0 @@ name: string |
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
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
1130492
20601