@neo-one/client-common
Advanced tools
Comparing version 3.8.3 to 3.9.1
@@ -5,2 +5,32 @@ { | ||
{ | ||
"version": "3.9.1", | ||
"tag": "@neo-one/client-common_v3.9.1", | ||
"date": "Wed, 03 Nov 2021 23:01:17 GMT", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "Update neo-one deps" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "3.9.0", | ||
"tag": "@neo-one/client-common_v3.9.0", | ||
"date": "Wed, 03 Nov 2021 22:49:14 GMT", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"comment": "Update nef model and types" | ||
}, | ||
{ | ||
"comment": "Updates for policy and vote changes and more" | ||
}, | ||
{ | ||
"comment": "Cleanup execution data type/converter" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "3.8.3", | ||
@@ -7,0 +37,0 @@ "tag": "@neo-one/client-common_v3.8.3", |
# Change Log - @neo-one/client-common | ||
This log was last generated on Sat, 09 Oct 2021 23:05:48 GMT and should not be manually modified. | ||
This log was last generated on Wed, 03 Nov 2021 23:01:17 GMT and should not be manually modified. | ||
## 3.9.1 | ||
Wed, 03 Nov 2021 23:01:17 GMT | ||
### Patches | ||
- Update neo-one deps | ||
## 3.9.0 | ||
Wed, 03 Nov 2021 22:49:14 GMT | ||
### Minor changes | ||
- Update nef model and types | ||
- Updates for policy and vote changes and more | ||
- Cleanup execution data type/converter | ||
## 3.8.3 | ||
@@ -6,0 +22,0 @@ Sat, 09 Oct 2021 23:05:48 GMT |
@@ -191,2 +191,13 @@ /// <reference types="node" /> | ||
}; | ||
export declare const InvalidDesignationRoleError: { | ||
new (type: number): { | ||
readonly name: string; | ||
readonly code: string; | ||
message: string; | ||
stack?: string | undefined; | ||
}; | ||
captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; | ||
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; | ||
stackTraceLimit: number; | ||
}; | ||
export declare const InvalidContractParameterTypeJSONError: { | ||
@@ -193,0 +204,0 @@ new (value: string): { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.InvalidScriptError = exports.InvalidJumpError = exports.InvalidBIP32SerializePrivateNodeError = exports.InvalidBIP32HardenedError = exports.InvalidBIP32ChildIndexError = exports.InvalidBIP32ExtendedKeyError = exports.InvalidBIP32VersionError = exports.InvalidSignaturesError = exports.InvalidVMByteCodeError = exports.InvalidTransactionTypeError = exports.InvalidAttributeUsageJSONError = exports.InvalidAttributeUsageError = exports.InvalidOracleResponseCodeError = exports.InvalidAttributeTypeError = exports.InvalidAttributeTypeJSONError = exports.InvalidWitnessScopeError = exports.InvalidWitnessScopeJSONError = exports.InvalidContractParameterTypeError = exports.InvalidContractParameterTypeJSONError = exports.InvalidVerifyResultJSONError = exports.InvalidVerifyResultError = exports.InvalidStorageFlagsError = exports.InvalidStorageFlagsJSONError = exports.InvalidAssetTypeError = exports.InvalidAssetTypeJSONError = exports.InvalidParamError = exports.InvalidVMStateError = exports.InvalidSysCallError = exports.InvalidSignatureError = exports.InvalidPrivateKeyError = exports.InvalidNumberOfKeysError = exports.TooManyPublicKeysError = exports.InvalidAddressError = exports.Base58CheckError = exports.InvalidContractParameterError = exports.UnknownOpError = void 0; | ||
exports.InvalidScriptError = exports.InvalidJumpError = exports.InvalidBIP32SerializePrivateNodeError = exports.InvalidBIP32HardenedError = exports.InvalidBIP32ChildIndexError = exports.InvalidBIP32ExtendedKeyError = exports.InvalidBIP32VersionError = exports.InvalidSignaturesError = exports.InvalidVMByteCodeError = exports.InvalidTransactionTypeError = exports.InvalidAttributeUsageJSONError = exports.InvalidAttributeUsageError = exports.InvalidOracleResponseCodeError = exports.InvalidAttributeTypeError = exports.InvalidAttributeTypeJSONError = exports.InvalidWitnessScopeError = exports.InvalidWitnessScopeJSONError = exports.InvalidContractParameterTypeError = exports.InvalidContractParameterTypeJSONError = exports.InvalidDesignationRoleError = exports.InvalidVerifyResultJSONError = exports.InvalidVerifyResultError = exports.InvalidStorageFlagsError = exports.InvalidStorageFlagsJSONError = exports.InvalidAssetTypeError = exports.InvalidAssetTypeJSONError = exports.InvalidParamError = exports.InvalidVMStateError = exports.InvalidSysCallError = exports.InvalidSignatureError = exports.InvalidPrivateKeyError = exports.InvalidNumberOfKeysError = exports.TooManyPublicKeysError = exports.InvalidAddressError = exports.Base58CheckError = exports.InvalidContractParameterError = exports.UnknownOpError = void 0; | ||
const utils_1 = require("@neo-one/utils"); | ||
@@ -23,2 +23,3 @@ const common_1 = require("./common"); | ||
exports.InvalidVerifyResultJSONError = utils_1.makeErrorWithCode('INVALID_RELAY_RESULT_REASON_JSON', (value) => `Invalid VerifyResult: ${value}`); | ||
exports.InvalidDesignationRoleError = utils_1.makeErrorWithCode('INVALID_DESIGNATION_ROLE', (type) => `Expected designation role, found: ${type}`); | ||
exports.InvalidContractParameterTypeJSONError = utils_1.makeErrorWithCode('INVALID_CONTRACT_PARAMETER_TYPE_JSON', (value) => `Invalid ContractParameterType: ${value}`); | ||
@@ -25,0 +26,0 @@ exports.InvalidContractParameterTypeError = utils_1.makeErrorWithCode('INVALID_CONTRACT_PARAMETER_TYPE', (contractParameterType) => `Expected contract parameter type, found: ${contractParameterType.toString(16)}`); |
@@ -22,1 +22,2 @@ export * from './BinaryWriter'; | ||
export * from './Instruction'; | ||
export * from './DesignationRole'; |
@@ -25,3 +25,4 @@ "use strict"; | ||
tslib_1.__exportStar(require("./Instruction"), exports); | ||
tslib_1.__exportStar(require("./DesignationRole"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -8,2 +8,3 @@ /// <reference types="node" /> | ||
readonly compiler: string; | ||
readonly source: string; | ||
readonly tokens: readonly MethodTokenModel[]; | ||
@@ -17,2 +18,3 @@ readonly script: Buffer; | ||
readonly compiler: string; | ||
readonly source: string; | ||
readonly tokens: readonly MethodTokenModel[]; | ||
@@ -25,3 +27,3 @@ readonly script: Buffer; | ||
private readonly sizeInternal; | ||
constructor({ compiler, tokens, script, checkSum }: NefFileAdd); | ||
constructor({ compiler, source, tokens, script, checkSum }: NefFileAdd); | ||
serializeHeader(writer: BinaryWriter): void; | ||
@@ -28,0 +30,0 @@ serializeForChecksumBase(writer: BinaryWriter): void; |
@@ -10,3 +10,3 @@ "use strict"; | ||
class NefFileModel { | ||
constructor({ compiler, tokens, script, checkSum }) { | ||
constructor({ compiler, source, tokens, script, checkSum }) { | ||
this.serializeWire = Serializable_1.createSerializeWire(this.serializeWireBase.bind(this)); | ||
@@ -16,3 +16,4 @@ this.serializeForChecksum = Serializable_1.createSerializeWire(this.serializeForChecksumBase.bind(this)); | ||
this.sizeInternal = utils_1.utils.lazy(() => this.headerSize() + | ||
IOHelper_1.IOHelper.sizeOfUInt16LE + | ||
IOHelper_1.IOHelper.sizeOfVarString(this.source) + | ||
IOHelper_1.IOHelper.sizeOfUInt8 + | ||
IOHelper_1.IOHelper.sizeOfArray(this.tokens, (token) => token.size) + | ||
@@ -23,2 +24,3 @@ IOHelper_1.IOHelper.sizeOfUInt16LE + | ||
this.compiler = compiler; | ||
this.source = source; | ||
this.tokens = tokens; | ||
@@ -37,3 +39,4 @@ this.script = script; | ||
this.serializeHeader(writer); | ||
writer.writeUInt16LE(0); | ||
writer.writeVarString(this.source, 256); | ||
writer.writeUInt8(0); | ||
writer.writeArray(this.tokens, (token) => token.serializeWireBase(writer)); | ||
@@ -51,2 +54,3 @@ writer.writeUInt16LE(0); | ||
compiler: this.compiler, | ||
source: this.source, | ||
tokens: this.tokens.map((token) => token.serializeJSON()), | ||
@@ -53,0 +57,0 @@ script: JSONHelper_1.JSONHelper.writeBase64Buffer(this.script), |
import { JSONObject } from '@neo-one/utils'; | ||
import { UInt256Hex } from '../common'; | ||
import { DesignationRoleJSON } from '../DesignationRole'; | ||
import { UserAccount } from '../types'; | ||
@@ -171,3 +172,3 @@ import { ContractParameterTypeModel } from './ContractParameterTypeModel'; | ||
readonly gasconsumed: string; | ||
readonly exception?: string; | ||
readonly exception: string | null; | ||
readonly stack: readonly ContractParameterJSON[] | string; | ||
@@ -212,2 +213,4 @@ readonly notifications: readonly NotificationJSON[]; | ||
export interface TransactionDataJSON extends TransactionReceiptJSON { | ||
readonly votes: readonly VoteJSON[]; | ||
readonly policyChanges: readonly PolicyChangeJSON[]; | ||
readonly deletedContractHashes: readonly string[]; | ||
@@ -285,2 +288,3 @@ readonly deployedContracts: readonly ContractJSON[]; | ||
readonly compiler: string; | ||
readonly source: string; | ||
readonly tokens: readonly MethodTokenJSON[]; | ||
@@ -329,2 +333,60 @@ readonly script: string; | ||
} | ||
export interface FailedTransactionJSON { | ||
readonly hash: string; | ||
readonly blockIndex: number; | ||
readonly message: string; | ||
} | ||
export interface VoteJSON { | ||
readonly account: string; | ||
readonly voteTo: string | null; | ||
readonly balance: string; | ||
readonly index: string; | ||
} | ||
export interface PolicyChangeJSONBase { | ||
readonly type: PolicyChangeJSON['type']; | ||
readonly index: string; | ||
} | ||
interface IntegerTypePolicyChangeJSON { | ||
readonly value: string; | ||
} | ||
interface BasicTypePolicyChangeJSON { | ||
readonly value: string; | ||
} | ||
export interface GasPerBlockPolicyChangeJSON extends PolicyChangeJSONBase, IntegerTypePolicyChangeJSON { | ||
readonly type: 'GasPerBlock'; | ||
} | ||
export interface RegisterPricePolicyChangeJSON extends PolicyChangeJSONBase, IntegerTypePolicyChangeJSON { | ||
readonly type: 'RegisterPrice'; | ||
} | ||
export interface FeePerBytePolicyChangeJSON extends PolicyChangeJSONBase, IntegerTypePolicyChangeJSON { | ||
readonly type: 'FeePerByte'; | ||
} | ||
export interface ExecFeeFactorPolicyChangeJSON extends PolicyChangeJSONBase { | ||
readonly type: 'ExecFeeFactor'; | ||
readonly value: number; | ||
} | ||
export interface StoragePricePolicyChangeJSON extends PolicyChangeJSONBase { | ||
readonly type: 'StoragePrice'; | ||
readonly value: number; | ||
} | ||
export interface MinimumDeploymentFeePolicyChangeJSON extends PolicyChangeJSONBase, IntegerTypePolicyChangeJSON { | ||
readonly type: 'MinimumDeploymentFee'; | ||
} | ||
export interface UnregisterCandidatePolicyChangeJSON extends PolicyChangeJSONBase, BasicTypePolicyChangeJSON { | ||
readonly type: 'UnregisterCandidate'; | ||
} | ||
export interface RegisterCandidatePolicyChangeJSON extends PolicyChangeJSONBase, BasicTypePolicyChangeJSON { | ||
readonly type: 'RegisterCandidate'; | ||
} | ||
export interface RoleDesignationPolicyChangeJSON extends PolicyChangeJSONBase { | ||
readonly type: 'RoleDesignation'; | ||
readonly value: DesignationRoleJSON; | ||
} | ||
export interface BlockAccountPolicyChangeJSON extends PolicyChangeJSONBase, BasicTypePolicyChangeJSON { | ||
readonly type: 'BlockAccount'; | ||
} | ||
export interface UnblockAccountPolicyChangeJSON extends PolicyChangeJSONBase, BasicTypePolicyChangeJSON { | ||
readonly type: 'UnblockAccount'; | ||
} | ||
export declare type PolicyChangeJSON = GasPerBlockPolicyChangeJSON | RegisterPricePolicyChangeJSON | FeePerBytePolicyChangeJSON | ExecFeeFactorPolicyChangeJSON | StoragePricePolicyChangeJSON | MinimumDeploymentFeePolicyChangeJSON | UnregisterCandidatePolicyChangeJSON | RegisterCandidatePolicyChangeJSON | RoleDesignationPolicyChangeJSON | BlockAccountPolicyChangeJSON | UnblockAccountPolicyChangeJSON; | ||
export interface HeaderJSON { | ||
@@ -420,3 +482,2 @@ readonly hash: string; | ||
export interface VersionJSON { | ||
readonly network: number; | ||
readonly tcpport: number; | ||
@@ -426,2 +487,13 @@ readonly wsport: number; | ||
readonly useragent: string; | ||
readonly protocol: { | ||
readonly addressversion: number; | ||
readonly network: number; | ||
readonly validatorscount: number; | ||
readonly msperblock: number; | ||
readonly maxtraceableblocks: number; | ||
readonly maxvaliduntilblockincrement: number; | ||
readonly maxtransactionsperblock: number; | ||
readonly memorypoolmaxtransactions: number; | ||
readonly initialgasdistribution: number; | ||
}; | ||
} | ||
@@ -435,1 +507,2 @@ export interface VerificationCostJSON { | ||
} | ||
export {}; |
@@ -80,3 +80,60 @@ /// <reference types="node" /> | ||
} | ||
export interface RawVote { | ||
readonly account: AddressString; | ||
readonly voteTo?: PublicKeyString; | ||
readonly balance: BigNumber; | ||
readonly index: BigNumber; | ||
} | ||
export interface RawPolicyChangeBase { | ||
readonly type: RawPolicyChange['type']; | ||
readonly index: BigNumber; | ||
} | ||
export interface RawGasPerBlockPolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'GasPerBlock'; | ||
readonly value: BigNumber; | ||
} | ||
export interface RawRegisterPricePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'RegisterPrice'; | ||
readonly value: BigNumber; | ||
} | ||
export interface RawUnregisterCandidatePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'UnregisterCandidate'; | ||
readonly value: PublicKeyString; | ||
} | ||
export interface RawRegisterCandidatePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'RegisterCandidate'; | ||
readonly value: PublicKeyString; | ||
} | ||
export interface RawRoleDesignationPolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'RoleDesignation'; | ||
readonly value: 'StateValidator' | 'Oracle' | 'NeoFSAlphabetNode'; | ||
} | ||
export interface RawFeePerBytePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'FeePerByte'; | ||
readonly value: BigNumber; | ||
} | ||
export interface RawExecFeeFactorPolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'ExecFeeFactor'; | ||
readonly value: number; | ||
} | ||
export interface RawStoragePricePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'StoragePrice'; | ||
readonly value: number; | ||
} | ||
export interface RawBlockAccountPolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'BlockAccount'; | ||
readonly value: AddressString; | ||
} | ||
export interface RawUnblockAccountPolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'UnblockAccount'; | ||
readonly value: AddressString; | ||
} | ||
export interface RawMinimumDeploymentFeePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'MinimumDeploymentFee'; | ||
readonly value: BigNumber; | ||
} | ||
export declare type RawPolicyChange = RawGasPerBlockPolicyChange | RawRegisterPricePolicyChange | RawUnregisterCandidatePolicyChange | RawRegisterCandidatePolicyChange | RawRoleDesignationPolicyChange | RawFeePerBytePolicyChange | RawExecFeeFactorPolicyChange | RawStoragePricePolicyChange | RawBlockAccountPolicyChange | RawUnblockAccountPolicyChange | RawMinimumDeploymentFeePolicyChange; | ||
export interface RawTransactionData extends TransactionReceipt { | ||
readonly votes: readonly RawVote[]; | ||
readonly policyChanges: readonly RawPolicyChange[]; | ||
readonly deletedContractHashes: readonly UInt160Hex[]; | ||
@@ -148,2 +205,3 @@ readonly deployedContracts: readonly Contract[]; | ||
readonly claim: (options?: TransactionOptions) => Promise<TransactionResult>; | ||
readonly vote: (publicKey: PublicKeyString, options?: TransactionOptions) => Promise<TransactionResult>; | ||
readonly invoke: (contract: AddressString, method: string, params: ReadonlyArray<ScriptBuilderParam | undefined>, paramsZipped: ReadonlyArray<readonly [string, Param | undefined]>, verify: boolean, options?: TransactionOptions, sourceMaps?: SourceMaps) => Promise<TransactionResult<RawInvokeReceipt>>; | ||
@@ -470,2 +528,3 @@ readonly call: (network: NetworkType, contract: AddressString, method: string, params: ReadonlyArray<ScriptBuilderParam | undefined>) => Promise<RawCallReceipt>; | ||
readonly compiler: string; | ||
readonly source: string; | ||
readonly script: BufferString; | ||
@@ -665,2 +724,3 @@ readonly tokens: readonly MethodToken[]; | ||
readonly vmState: 'HALT' | 'FAULT'; | ||
readonly exception?: string; | ||
readonly gasConsumed: BigNumber; | ||
@@ -667,0 +727,0 @@ readonly stack: readonly ContractParameter[] | string; |
@@ -191,2 +191,13 @@ /// <reference types="node" /> | ||
}; | ||
export declare const InvalidDesignationRoleError: { | ||
new (type: number): { | ||
readonly name: string; | ||
readonly code: string; | ||
message: string; | ||
stack?: string | undefined; | ||
}; | ||
captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; | ||
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; | ||
stackTraceLimit: number; | ||
}; | ||
export declare const InvalidContractParameterTypeJSONError: { | ||
@@ -193,0 +204,0 @@ new (value: string): { |
@@ -20,2 +20,3 @@ import { makeErrorWithCode } from '@neo-one/utils'; | ||
export const InvalidVerifyResultJSONError = makeErrorWithCode('INVALID_RELAY_RESULT_REASON_JSON', (value) => `Invalid VerifyResult: ${value}`); | ||
export const InvalidDesignationRoleError = makeErrorWithCode('INVALID_DESIGNATION_ROLE', (type) => `Expected designation role, found: ${type}`); | ||
export const InvalidContractParameterTypeJSONError = makeErrorWithCode('INVALID_CONTRACT_PARAMETER_TYPE_JSON', (value) => `Invalid ContractParameterType: ${value}`); | ||
@@ -22,0 +23,0 @@ export const InvalidContractParameterTypeError = makeErrorWithCode('INVALID_CONTRACT_PARAMETER_TYPE', (contractParameterType) => `Expected contract parameter type, found: ${contractParameterType.toString(16)}`); |
@@ -22,1 +22,2 @@ export * from './BinaryWriter'; | ||
export * from './Instruction'; | ||
export * from './DesignationRole'; |
@@ -22,3 +22,4 @@ export * from './BinaryWriter'; | ||
export * from './Instruction'; | ||
export * from './DesignationRole'; | ||
//# sourceMappingURL=index.js.map |
@@ -8,2 +8,3 @@ /// <reference types="node" /> | ||
readonly compiler: string; | ||
readonly source: string; | ||
readonly tokens: readonly MethodTokenModel[]; | ||
@@ -17,2 +18,3 @@ readonly script: Buffer; | ||
readonly compiler: string; | ||
readonly source: string; | ||
readonly tokens: readonly MethodTokenModel[]; | ||
@@ -25,3 +27,3 @@ readonly script: Buffer; | ||
private readonly sizeInternal; | ||
constructor({ compiler, tokens, script, checkSum }: NefFileAdd); | ||
constructor({ compiler, source, tokens, script, checkSum }: NefFileAdd); | ||
serializeHeader(writer: BinaryWriter): void; | ||
@@ -28,0 +30,0 @@ serializeForChecksumBase(writer: BinaryWriter): void; |
@@ -7,3 +7,3 @@ import { crypto } from '../crypto'; | ||
export class NefFileModel { | ||
constructor({ compiler, tokens, script, checkSum }) { | ||
constructor({ compiler, source, tokens, script, checkSum }) { | ||
this.serializeWire = createSerializeWire(this.serializeWireBase.bind(this)); | ||
@@ -13,3 +13,4 @@ this.serializeForChecksum = createSerializeWire(this.serializeForChecksumBase.bind(this)); | ||
this.sizeInternal = utils.lazy(() => this.headerSize() + | ||
IOHelper.sizeOfUInt16LE + | ||
IOHelper.sizeOfVarString(this.source) + | ||
IOHelper.sizeOfUInt8 + | ||
IOHelper.sizeOfArray(this.tokens, (token) => token.size) + | ||
@@ -20,2 +21,3 @@ IOHelper.sizeOfUInt16LE + | ||
this.compiler = compiler; | ||
this.source = source; | ||
this.tokens = tokens; | ||
@@ -34,3 +36,4 @@ this.script = script; | ||
this.serializeHeader(writer); | ||
writer.writeUInt16LE(0); | ||
writer.writeVarString(this.source, 256); | ||
writer.writeUInt8(0); | ||
writer.writeArray(this.tokens, (token) => token.serializeWireBase(writer)); | ||
@@ -48,2 +51,3 @@ writer.writeUInt16LE(0); | ||
compiler: this.compiler, | ||
source: this.source, | ||
tokens: this.tokens.map((token) => token.serializeJSON()), | ||
@@ -50,0 +54,0 @@ script: JSONHelper.writeBase64Buffer(this.script), |
import { JSONObject } from '@neo-one/utils'; | ||
import { UInt256Hex } from '../common'; | ||
import { DesignationRoleJSON } from '../DesignationRole'; | ||
import { UserAccount } from '../types'; | ||
@@ -171,3 +172,3 @@ import { ContractParameterTypeModel } from './ContractParameterTypeModel'; | ||
readonly gasconsumed: string; | ||
readonly exception?: string; | ||
readonly exception: string | null; | ||
readonly stack: readonly ContractParameterJSON[] | string; | ||
@@ -212,2 +213,4 @@ readonly notifications: readonly NotificationJSON[]; | ||
export interface TransactionDataJSON extends TransactionReceiptJSON { | ||
readonly votes: readonly VoteJSON[]; | ||
readonly policyChanges: readonly PolicyChangeJSON[]; | ||
readonly deletedContractHashes: readonly string[]; | ||
@@ -285,2 +288,3 @@ readonly deployedContracts: readonly ContractJSON[]; | ||
readonly compiler: string; | ||
readonly source: string; | ||
readonly tokens: readonly MethodTokenJSON[]; | ||
@@ -329,2 +333,60 @@ readonly script: string; | ||
} | ||
export interface FailedTransactionJSON { | ||
readonly hash: string; | ||
readonly blockIndex: number; | ||
readonly message: string; | ||
} | ||
export interface VoteJSON { | ||
readonly account: string; | ||
readonly voteTo: string | null; | ||
readonly balance: string; | ||
readonly index: string; | ||
} | ||
export interface PolicyChangeJSONBase { | ||
readonly type: PolicyChangeJSON['type']; | ||
readonly index: string; | ||
} | ||
interface IntegerTypePolicyChangeJSON { | ||
readonly value: string; | ||
} | ||
interface BasicTypePolicyChangeJSON { | ||
readonly value: string; | ||
} | ||
export interface GasPerBlockPolicyChangeJSON extends PolicyChangeJSONBase, IntegerTypePolicyChangeJSON { | ||
readonly type: 'GasPerBlock'; | ||
} | ||
export interface RegisterPricePolicyChangeJSON extends PolicyChangeJSONBase, IntegerTypePolicyChangeJSON { | ||
readonly type: 'RegisterPrice'; | ||
} | ||
export interface FeePerBytePolicyChangeJSON extends PolicyChangeJSONBase, IntegerTypePolicyChangeJSON { | ||
readonly type: 'FeePerByte'; | ||
} | ||
export interface ExecFeeFactorPolicyChangeJSON extends PolicyChangeJSONBase { | ||
readonly type: 'ExecFeeFactor'; | ||
readonly value: number; | ||
} | ||
export interface StoragePricePolicyChangeJSON extends PolicyChangeJSONBase { | ||
readonly type: 'StoragePrice'; | ||
readonly value: number; | ||
} | ||
export interface MinimumDeploymentFeePolicyChangeJSON extends PolicyChangeJSONBase, IntegerTypePolicyChangeJSON { | ||
readonly type: 'MinimumDeploymentFee'; | ||
} | ||
export interface UnregisterCandidatePolicyChangeJSON extends PolicyChangeJSONBase, BasicTypePolicyChangeJSON { | ||
readonly type: 'UnregisterCandidate'; | ||
} | ||
export interface RegisterCandidatePolicyChangeJSON extends PolicyChangeJSONBase, BasicTypePolicyChangeJSON { | ||
readonly type: 'RegisterCandidate'; | ||
} | ||
export interface RoleDesignationPolicyChangeJSON extends PolicyChangeJSONBase { | ||
readonly type: 'RoleDesignation'; | ||
readonly value: DesignationRoleJSON; | ||
} | ||
export interface BlockAccountPolicyChangeJSON extends PolicyChangeJSONBase, BasicTypePolicyChangeJSON { | ||
readonly type: 'BlockAccount'; | ||
} | ||
export interface UnblockAccountPolicyChangeJSON extends PolicyChangeJSONBase, BasicTypePolicyChangeJSON { | ||
readonly type: 'UnblockAccount'; | ||
} | ||
export declare type PolicyChangeJSON = GasPerBlockPolicyChangeJSON | RegisterPricePolicyChangeJSON | FeePerBytePolicyChangeJSON | ExecFeeFactorPolicyChangeJSON | StoragePricePolicyChangeJSON | MinimumDeploymentFeePolicyChangeJSON | UnregisterCandidatePolicyChangeJSON | RegisterCandidatePolicyChangeJSON | RoleDesignationPolicyChangeJSON | BlockAccountPolicyChangeJSON | UnblockAccountPolicyChangeJSON; | ||
export interface HeaderJSON { | ||
@@ -420,3 +482,2 @@ readonly hash: string; | ||
export interface VersionJSON { | ||
readonly network: number; | ||
readonly tcpport: number; | ||
@@ -426,2 +487,13 @@ readonly wsport: number; | ||
readonly useragent: string; | ||
readonly protocol: { | ||
readonly addressversion: number; | ||
readonly network: number; | ||
readonly validatorscount: number; | ||
readonly msperblock: number; | ||
readonly maxtraceableblocks: number; | ||
readonly maxvaliduntilblockincrement: number; | ||
readonly maxtransactionsperblock: number; | ||
readonly memorypoolmaxtransactions: number; | ||
readonly initialgasdistribution: number; | ||
}; | ||
} | ||
@@ -435,1 +507,2 @@ export interface VerificationCostJSON { | ||
} | ||
export {}; |
@@ -80,3 +80,60 @@ /// <reference types="node" /> | ||
} | ||
export interface RawVote { | ||
readonly account: AddressString; | ||
readonly voteTo?: PublicKeyString; | ||
readonly balance: BigNumber; | ||
readonly index: BigNumber; | ||
} | ||
export interface RawPolicyChangeBase { | ||
readonly type: RawPolicyChange['type']; | ||
readonly index: BigNumber; | ||
} | ||
export interface RawGasPerBlockPolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'GasPerBlock'; | ||
readonly value: BigNumber; | ||
} | ||
export interface RawRegisterPricePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'RegisterPrice'; | ||
readonly value: BigNumber; | ||
} | ||
export interface RawUnregisterCandidatePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'UnregisterCandidate'; | ||
readonly value: PublicKeyString; | ||
} | ||
export interface RawRegisterCandidatePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'RegisterCandidate'; | ||
readonly value: PublicKeyString; | ||
} | ||
export interface RawRoleDesignationPolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'RoleDesignation'; | ||
readonly value: 'StateValidator' | 'Oracle' | 'NeoFSAlphabetNode'; | ||
} | ||
export interface RawFeePerBytePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'FeePerByte'; | ||
readonly value: BigNumber; | ||
} | ||
export interface RawExecFeeFactorPolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'ExecFeeFactor'; | ||
readonly value: number; | ||
} | ||
export interface RawStoragePricePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'StoragePrice'; | ||
readonly value: number; | ||
} | ||
export interface RawBlockAccountPolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'BlockAccount'; | ||
readonly value: AddressString; | ||
} | ||
export interface RawUnblockAccountPolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'UnblockAccount'; | ||
readonly value: AddressString; | ||
} | ||
export interface RawMinimumDeploymentFeePolicyChange extends RawPolicyChangeBase { | ||
readonly type: 'MinimumDeploymentFee'; | ||
readonly value: BigNumber; | ||
} | ||
export declare type RawPolicyChange = RawGasPerBlockPolicyChange | RawRegisterPricePolicyChange | RawUnregisterCandidatePolicyChange | RawRegisterCandidatePolicyChange | RawRoleDesignationPolicyChange | RawFeePerBytePolicyChange | RawExecFeeFactorPolicyChange | RawStoragePricePolicyChange | RawBlockAccountPolicyChange | RawUnblockAccountPolicyChange | RawMinimumDeploymentFeePolicyChange; | ||
export interface RawTransactionData extends TransactionReceipt { | ||
readonly votes: readonly RawVote[]; | ||
readonly policyChanges: readonly RawPolicyChange[]; | ||
readonly deletedContractHashes: readonly UInt160Hex[]; | ||
@@ -148,2 +205,3 @@ readonly deployedContracts: readonly Contract[]; | ||
readonly claim: (options?: TransactionOptions) => Promise<TransactionResult>; | ||
readonly vote: (publicKey: PublicKeyString, options?: TransactionOptions) => Promise<TransactionResult>; | ||
readonly invoke: (contract: AddressString, method: string, params: ReadonlyArray<ScriptBuilderParam | undefined>, paramsZipped: ReadonlyArray<readonly [string, Param | undefined]>, verify: boolean, options?: TransactionOptions, sourceMaps?: SourceMaps) => Promise<TransactionResult<RawInvokeReceipt>>; | ||
@@ -470,2 +528,3 @@ readonly call: (network: NetworkType, contract: AddressString, method: string, params: ReadonlyArray<ScriptBuilderParam | undefined>) => Promise<RawCallReceipt>; | ||
readonly compiler: string; | ||
readonly source: string; | ||
readonly script: BufferString; | ||
@@ -665,2 +724,3 @@ readonly tokens: readonly MethodToken[]; | ||
readonly vmState: 'HALT' | 'FAULT'; | ||
readonly exception?: string; | ||
readonly gasConsumed: BigNumber; | ||
@@ -667,0 +727,0 @@ readonly stack: readonly ContractParameter[] | string; |
{ | ||
"name": "@neo-one/client-common", | ||
"version": "3.8.3", | ||
"version": "3.9.1", | ||
"description": "NEO•ONE client common code.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index", |
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
784996
217
18375