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

@wharfkit/contract

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wharfkit/contract - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

4

lib/contract.d.ts

@@ -136,3 +136,3 @@ import { API, ABIDef, APIClient, ABI, NameType, Name, BytesType, ABISerializableObject, PermissionLevelType, Action } from '@greymass/eosio';

*/
static from(tableParams: TableParams): Table<any>;
static from<RowType = any>(tableParams: TableParams): Table<RowType>;
/**

@@ -211,3 +211,3 @@ * Retrieves the rows from the table that match the given parameters.

hasTable(name: NameType): boolean;
table(name: NameType): Table<any>;
table<RowType = any>(name: NameType, rowType?: any): Table<RowType>;
get actionNames(): string[];

@@ -214,0 +214,0 @@ hasAction(name: NameType): boolean;

@@ -271,3 +271,3 @@ 'use strict';

}
table(name) {
table(name, rowType) {
if (!this.hasTable(name)) {

@@ -281,2 +281,3 @@ throw new Error(`Contract (${this.account}) does not have a table named (${name})`);

name,
rowType,
});

@@ -283,0 +284,0 @@ }

@@ -244,3 +244,3 @@ import { isInstanceOf, UInt128, UInt64, Float64, Checksum256, Checksum160, Name, ABI, Serializer, PermissionLevel, Action } from '@greymass/eosio';

}
table(name) {
table(name, rowType) {
if (!this.hasTable(name)) {

@@ -254,2 +254,3 @@ throw new Error(`Contract (${this.account}) does not have a table named (${name})`);

name,
rowType,
});

@@ -256,0 +257,0 @@ }

{
"name": "@wharfkit/contract",
"description": "ContractKit for Wharf",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://github.com/wharfkit/contract",

@@ -6,0 +6,0 @@ "license": "BSD-3-Clause",

@@ -65,7 +65,7 @@ import {

public table(name: NameType) {
public table<RowType = any>(name: NameType, rowType?): Table<RowType> {
if (!this.hasTable(name)) {
throw new Error(`Contract (${this.account}) does not have a table named (${name})`)
}
return Table.from({
return Table.from<RowType>({
abi: this.abi,

@@ -75,2 +75,3 @@ account: this.account,

name,
rowType,
})

@@ -77,0 +78,0 @@ }

@@ -93,4 +93,4 @@ import {ABI, ABIDef, API, APIClient, Name, NameType, Serializer} from '@greymass/eosio'

*/
static from(tableParams: TableParams) {
return new Table(tableParams)
static from<RowType = any>(tableParams: TableParams): Table<RowType> {
return new Table<RowType>(tableParams)
}

@@ -97,0 +97,0 @@

Sorry, the diff of this file is not supported yet

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