Socket
Socket
Sign inDemoInstall

@neo-one/smart-contract

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neo-one/smart-contract - npm Package Compare versions

Comparing version 1.0.0-alpha.28 to 1.0.0-alpha.29

2

package.json
{
"name": "@neo-one/smart-contract",
"version": "1.0.0-alpha.28",
"version": "1.0.0-alpha.29",
"author": "Alex DiCarlo <alexdicarlo@gmail.com>",

@@ -5,0 +5,0 @@ "description": "NEO•ONE smart contract apis.",

@@ -116,2 +116,9 @@ // tslint:disable

readonly toInteger: () => number;
/**
* Returns a section of a buffer.
* @param start The beginning of the specified portion of the buffer.
* @param end The end of the specified portion of the buffer.
*/
readonly slice: (start?: number, end?: number) => Buffer;
readonly [n: number]: number;
readonly [one0]: unique symbol;

@@ -118,0 +125,0 @@ }

@@ -1011,26 +1011,2 @@ // tslint:disable

export interface SmartContractValueArray extends Array<SmartContractValue> {}
type SmartContractValue =
| void
| null
| undefined
| number
| Fixed<any>
| string
| boolean
| Buffer
| Address
| Hash256
| PublicKey
| SmartContractValueArray;
type Parameters<T extends Function> = T extends (...args: infer U) => any ? U : never;
type ReturnType<T extends Function> = T extends (...args: any[]) => infer R ? R : never;
type IsValidSmartContract<T> = {
[K in keyof T]: T[K] extends Function
? Parameters<T[K]> extends SmartContractValue[]
? ReturnType<T[K]> extends SmartContractValue ? T[K] : never
: never
: T[K] extends SmartContractValue ? T[K] : never
};
export function createEventNotifier(name: string): () => void;

@@ -1100,3 +1076,57 @@ export function createEventNotifier<A0>(name: string, arg0Name: string): (arg0: A0) => void;

export interface ForwardValue {
readonly asString: () => string;
readonly asStringNullable: () => string | undefined;
readonly asNumber: () => number;
readonly asNumberNullable: () => number | undefined;
readonly asBoolean: () => boolean;
readonly asBuffer: () => Buffer;
readonly asBufferNullable: () => Buffer | undefined;
readonly asAddress: () => Address;
readonly asAddressNullable: () => Address | undefined;
readonly asHash256: () => Hash256;
readonly asHash256Nullable: () => Hash256 | undefined;
readonly asPublicKey: () => PublicKey;
readonly asPublicKeyNullable: () => PublicKey | undefined;
readonly asArray: () => Array<ForwardValue>;
readonly asArrayNullable: () => Array<ForwardValue> | undefined;
readonly [OpaqueTagSymbol0]: unique symbol;
}
export interface ForwardValueConstructor {
readonly [OpaqueTagSymbol0]: unique symbol;
}
export const ForwardValue: ForwardValueConstructor;
interface ForwardedValueTag<T extends SmartContractValue> {}
/**
* Marks a parameter or return type of a public `SmartContract` method as expecting a forwarded value.
*/
export type ForwardedValue<T extends SmartContractValue> = T | (T & ForwardedValueTag<T>);
interface SmartContractValueArray extends Array<SmartContractValue> {}
interface SmartContractValueReadonlyArray extends ReadonlyArray<SmartContractValue> {}
type SmartContractValue =
| void
| null
| undefined
| number
| Fixed<any>
| string
| boolean
| Buffer
| Address
| Hash256
| PublicKey
| SmartContractValueArray
| SmartContractValueReadonlyArray;
type SmartContractArg = SmartContractValue | ForwardValue;
type Parameters<T extends Function> = T extends (...args: infer U) => any ? U : never;
type ReturnType<T extends Function> = T extends (...args: any[]) => infer R ? R : never;
type IsValidSmartContract<T> = {
[K in keyof T]: T[K] extends Function
? Parameters<T[K]> extends SmartContractArg[] ? (ReturnType<T[K]> extends SmartContractArg ? T[K] : never) : never
: T[K] extends SmartContractValue ? T[K] : never
};
/**
* Marks a class as a `SmartContract`.

@@ -1103,0 +1133,0 @@ */

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