🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

@waves/node-api-js

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waves/node-api-js - npm Package Compare versions

Comparing version

to
1.3.10-beta.1

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ "use strict";

import { TLong } from '../../interface';
import { DataTransactionEntry } from '@waves/ts-types';
export declare function fetchDataKey(base: string, address: string, key: string, options?: RequestInit): Promise<DataTransactionEntry<TLong>>;
export declare function fetchScriptInfo(base: string, address: string, options?: RequestInit): Promise<IScriptInfo<TLong>>;
export declare function fetchScriptInfoMeta(base: string, address: string): Promise<IScriptInfoMetaResponse>;
export declare function fetchBalanceDetails(base: string, address: string, options?: RequestInit): Promise<IBalanceDetails<TLong>>;
export declare function fetchBalanceConfirmations(base: string, address: string, confirmations: number, options?: RequestInit): Promise<IBalanceConfirmations<TLong>>;
export declare function fetchScriptInfo(base: string, address: string, options?: RequestInit): Promise<IScriptInfo<TLong>>;
export declare function data(base: string, address: string, params?: IDataQueryParams, options?: RequestInit): Promise<Array<DataTransactionEntry<TLong>>>;

@@ -9,0 +9,0 @@ export declare function fetchValidate(base: string, address: string): Promise<IValidateResponse>;

@@ -36,3 +36,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchAddresses = exports.fetchPublicKey = exports.fetchSeed = exports.fetchSeq = exports.fetchEffectiveBalance = exports.fetchEffectiveBalanceConfirmations = exports.deleteAddressFromWallet = exports.fetchMultipleBalance = exports.fetchBalance = exports.fetchValidate = exports.data = exports.fetchScriptInfo = exports.fetchBalanceConfirmations = exports.fetchBalanceDetails = exports.fetchScriptInfoMeta = exports.fetchDataKey = void 0;
exports.fetchAddresses = exports.fetchPublicKey = exports.fetchSeed = exports.fetchSeq = exports.fetchEffectiveBalance = exports.fetchEffectiveBalanceConfirmations = exports.deleteAddressFromWallet = exports.fetchMultipleBalance = exports.fetchBalance = exports.fetchValidate = exports.data = exports.fetchBalanceConfirmations = exports.fetchBalanceDetails = exports.fetchScriptInfoMeta = exports.fetchScriptInfo = exports.fetchDataKey = void 0;
var request_1 = __importStar(require("../../tools/request"));

@@ -49,2 +49,11 @@ var query_1 = __importDefault(require("../../tools/query"));

exports.fetchDataKey = fetchDataKey;
function fetchScriptInfo(base, address, options) {
if (options === void 0) { options = Object.create(null); }
return request_1.default({
base: base,
url: "/addresses/scriptInfo/" + address,
options: options
});
}
exports.fetchScriptInfo = fetchScriptInfo;
function fetchScriptInfoMeta(base, address) {

@@ -75,11 +84,2 @@ return request_1.default({

exports.fetchBalanceConfirmations = fetchBalanceConfirmations;
function fetchScriptInfo(base, address, options) {
if (options === void 0) { options = Object.create(null); }
return request_1.default({
base: base,
url: "/addresses/scriptInfo/" + address,
options: options
});
}
exports.fetchScriptInfo = fetchScriptInfo;
function data(base, address, params, options) {

@@ -86,0 +86,0 @@ if (params === void 0) { params = Object.create(null); }

@@ -0,0 +0,0 @@ export declare function fetchByAlias(base: string, alias: string): Promise<IByAlias>;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ "use strict";

@@ -117,3 +117,3 @@ import { TLong } from '../../interface';

reference: string;
features: Array<string>;
features: Array<number>;
totalFee: TLong;

@@ -128,2 +128,14 @@ desiredReward: number;

};
stateHash?: string;
rewardShares?: {
[key: string]: TLong;
};
challengedHeader?: {
headerSignature: string;
features: Array<string>;
generator: string;
generatorPublicKey: string;
desiredReward: TLong;
stateHash: string;
};
}

@@ -130,0 +142,0 @@ export interface IBlock extends IBlockHeader {

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ "use strict";

import { TAssetDetails } from "../assets";
export declare function fetchEthAssetDetails(base: string, ethAssetId: string, options?: RequestInit): Promise<TAssetDetails>;
export declare function fetchEthAssetDetails(base: string, ethAssetId: Array<string>, options?: RequestInit): Promise<Array<TAssetDetails>>;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ export declare function fetchNodeStatus(base: string, options?: RequestInit): Promise<INodeStatus>;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TLong } from "../../interface";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TTransactionStatuses } from '../../constants';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { Transaction, WithApiMixin } from '@waves/ts-types';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ export declare const TYPE_MAP: {

@@ -0,0 +0,0 @@ "use strict";

@@ -35,3 +35,2 @@ "use strict";

var aliasModule = __importStar(require("./api-node/alias"));
var consensusModule = __importStar(require("./api-node/consensus"));
var activationModule = __importStar(require("./api-node/activation"));

@@ -65,3 +64,2 @@ var nodeModule = __importStar(require("./api-node/node"));

var alias = wrapRecord(base, aliasModule);
var consensus = wrapRecord(base, consensusModule);
var activation = wrapRecord(base, activationModule);

@@ -104,3 +102,2 @@ var node = wrapRecord(base, nodeModule);

alias: alias,
consensus: consensus,
activation: activation,

@@ -107,0 +104,0 @@ node: node,

@@ -0,0 +0,0 @@ import wavesAddress2eth from "./tools/adresses/wavesAddress2eth";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { IScriptInfoMeta, TCallableFuncArguments, TCallableFuncArgumentsArray } from './api-node/addresses';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

export default function ethAddress2waves(ethAddress: string, chainId: number): string;

@@ -0,0 +0,0 @@ "use strict";

import { Transaction, TransactionFromNode } from '@waves/ts-types';
export default function (tx: Array<Transaction> | Transaction | TransactionFromNode | TransactionFromNode[]): Array<string>;

@@ -0,0 +0,0 @@ "use strict";

import { TAssetDetails } from '../../api-node/assets';
import { Transaction, TransactionFromNode } from '@waves/ts-types';
export default function (base: string, tx: Array<Transaction> | Transaction | TransactionFromNode | TransactionFromNode[]): Promise<Record<string, TAssetDetails>>;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TAssetDetails } from '../../api-node/assets';

@@ -0,0 +0,0 @@ import { Transaction, WithApiMixin } from '@waves/ts-types';

@@ -0,0 +0,0 @@ "use strict";

export default function wavesAddress2eth(wavesAddress: string): string;

@@ -0,0 +0,0 @@ "use strict";

export default function wavesAsset2Eth(wavesAsset: string): string;

@@ -0,0 +0,0 @@ "use strict";

export default function (base: string): Promise<number>;

@@ -0,0 +0,0 @@ "use strict";

export default function (base: string): Promise<number>;

@@ -0,0 +0,0 @@ "use strict";

export default function (base: string): Promise<string>;

@@ -0,0 +0,0 @@ "use strict";

export default function (base: string, current?: number): Promise<{
height: number;
}>;

@@ -0,0 +0,0 @@ "use strict";

export default function (json: string): any;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ export default function <T extends Record<string, any>>(params: T, evolver?: TEvolver<T>): string;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ export default function <T>(params: IRequestParams<T>): Promise<T>;

@@ -0,0 +0,0 @@ "use strict";

export default function (path: string, base: string): string;

@@ -0,0 +0,0 @@ "use strict";

export default function <T extends Record<string, any>>(data: T): string;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ "use strict";

export default function ethTxId2waves(ethTxId: string): string;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TransactionMap, Transaction } from '@waves/ts-types';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ import request from '../../tools/request';

import { TLong } from '../../interface';
import { DataTransactionEntry } from '@waves/ts-types';
export declare function fetchDataKey(base: string, address: string, key: string, options?: RequestInit): Promise<DataTransactionEntry<TLong>>;
export declare function fetchScriptInfo(base: string, address: string, options?: RequestInit): Promise<IScriptInfo<TLong>>;
export declare function fetchScriptInfoMeta(base: string, address: string): Promise<IScriptInfoMetaResponse>;
export declare function fetchBalanceDetails(base: string, address: string, options?: RequestInit): Promise<IBalanceDetails<TLong>>;
export declare function fetchBalanceConfirmations(base: string, address: string, confirmations: number, options?: RequestInit): Promise<IBalanceConfirmations<TLong>>;
export declare function fetchScriptInfo(base: string, address: string, options?: RequestInit): Promise<IScriptInfo<TLong>>;
export declare function data(base: string, address: string, params?: IDataQueryParams, options?: RequestInit): Promise<Array<DataTransactionEntry<TLong>>>;

@@ -9,0 +9,0 @@ export declare function fetchValidate(base: string, address: string): Promise<IValidateResponse>;

@@ -10,2 +10,9 @@ import request, { parseResponse } from '../../tools/request';

}
export function fetchScriptInfo(base, address, options = Object.create(null)) {
return request({
base,
url: `/addresses/scriptInfo/${address}`,
options
});
}
export function fetchScriptInfoMeta(base, address) {

@@ -31,9 +38,2 @@ return request({

}
export function fetchScriptInfo(base, address, options = Object.create(null)) {
return request({
base,
url: `/addresses/scriptInfo/${address}`,
options
});
}
export function data(base, address, params = Object.create(null), options = Object.create(null)) {

@@ -40,0 +40,0 @@ return request({

@@ -0,0 +0,0 @@ export declare function fetchByAlias(base: string, alias: string): Promise<IByAlias>;

@@ -0,0 +0,0 @@ import request from '../../tools/request';

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -117,3 +117,3 @@ import { TLong } from '../../interface';

reference: string;
features: Array<string>;
features: Array<number>;
totalFee: TLong;

@@ -128,2 +128,14 @@ desiredReward: number;

};
stateHash?: string;
rewardShares?: {
[key: string]: TLong;
};
challengedHeader?: {
headerSignature: string;
features: Array<string>;
generator: string;
generatorPublicKey: string;
desiredReward: TLong;
stateHash: string;
};
}

@@ -130,0 +142,0 @@ export interface IBlock extends IBlockHeader {

@@ -0,0 +0,0 @@ import request from '../../tools/request';

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ import request from '../../tools/request';

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ import request, { parseResponse } from '../../tools/request';

import { TAssetDetails } from "../assets";
export declare function fetchEthAssetDetails(base: string, ethAssetId: string, options?: RequestInit): Promise<TAssetDetails>;
export declare function fetchEthAssetDetails(base: string, ethAssetId: Array<string>, options?: RequestInit): Promise<Array<TAssetDetails>>;

@@ -0,0 +0,0 @@ import request from "../../tools/request";

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ import request from '../../tools/request';

@@ -0,0 +0,0 @@ export declare function fetchNodeStatus(base: string, options?: RequestInit): Promise<INodeStatus>;

@@ -0,0 +0,0 @@ import request from '../../tools/request';

@@ -0,0 +0,0 @@ import { TLong } from "../../interface";

@@ -0,0 +0,0 @@ import request from '../../tools/request';

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ import request from '../../tools/request';

@@ -0,0 +0,0 @@ import { TTransactionStatuses } from '../../constants';

@@ -0,0 +0,0 @@ import { TRANSACTION_STATUSES } from '../../constants';

@@ -0,0 +0,0 @@ import { Transaction, WithApiMixin } from '@waves/ts-types';

@@ -0,0 +0,0 @@ import request from '../../tools/request';

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ export declare const TYPE_MAP: {

@@ -0,0 +0,0 @@ export const TYPE_MAP = {

@@ -10,3 +10,2 @@ import * as addressesModule from './api-node/addresses';

import * as aliasModule from './api-node/alias';
import * as consensusModule from './api-node/consensus';
import * as activationModule from './api-node/activation';

@@ -40,3 +39,2 @@ import * as nodeModule from './api-node/node';

const alias = wrapRecord(base, aliasModule);
const consensus = wrapRecord(base, consensusModule);
const activation = wrapRecord(base, activationModule);

@@ -79,3 +77,2 @@ const node = wrapRecord(base, nodeModule);

alias,
consensus,
activation,

@@ -82,0 +79,0 @@ node,

@@ -0,0 +0,0 @@ import wavesAddress2eth from "./tools/adresses/wavesAddress2eth";

@@ -0,0 +0,0 @@ import wavesAddress2eth from "./tools/adresses/wavesAddress2eth";

@@ -0,0 +0,0 @@ import { IScriptInfoMeta, TCallableFuncArguments, TCallableFuncArgumentsArray } from './api-node/addresses';

export const isCallableFuncArrayArguments = (scriptInfoMeta) => !!scriptInfoMeta.isArrayArguments;
export const isCallableFuncRecordArguments = (scriptInfoMeta) => !scriptInfoMeta.isArrayArguments;
//# sourceMappingURL=interface.js.map

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ import { BigNumber } from '@waves/bignumber';

export default function ethAddress2waves(ethAddress: string, chainId: number): string;

@@ -0,0 +0,0 @@ import { keccak, blake2b, base58Encode, base16Decode } from '@waves/ts-lib-crypto';

import { Transaction, TransactionFromNode } from '@waves/ts-types';
export default function (tx: Array<Transaction> | Transaction | TransactionFromNode | TransactionFromNode[]): Array<string>;

@@ -0,0 +0,0 @@ import { prop, switchTransactionByType, toArray } from '../utils';

import { TAssetDetails } from '../../api-node/assets';
import { Transaction, TransactionFromNode } from '@waves/ts-types';
export default function (base: string, tx: Array<Transaction> | Transaction | TransactionFromNode | TransactionFromNode[]): Promise<Record<string, TAssetDetails>>;

@@ -0,0 +0,0 @@ import { fetchDetails } from '../../api-node/assets';

@@ -0,0 +0,0 @@ import { TAssetDetails } from '../../api-node/assets';

@@ -0,0 +0,0 @@ import { fetchTransactions } from '../../api-node/transactions';

@@ -0,0 +0,0 @@ import { Transaction, WithApiMixin } from '@waves/ts-types';

@@ -0,0 +0,0 @@ import { fetchTransactions } from '../../api-node/transactions';

export default function wavesAddress2eth(wavesAddress: string): string;

@@ -0,0 +0,0 @@ import { base16Encode, base58Decode } from '@waves/ts-lib-crypto';

export default function wavesAsset2Eth(wavesAsset: string): string;

@@ -0,0 +0,0 @@ import { base16Encode, base58Decode } from '@waves/ts-lib-crypto';

export default function (base: string): Promise<number>;

@@ -0,0 +0,0 @@ import { fetchHeadersAt, fetchHeadersLast } from '../../api-node/blocks';

export default function (base: string): Promise<number>;

@@ -0,0 +0,0 @@ import { fetchHeadersLast } from '../../api-node/blocks';

export default function (base: string): Promise<string>;

@@ -0,0 +0,0 @@ import getNetworkByte from './getNetworkByte';

export default function (base: string, current?: number): Promise<{
height: number;
}>;

@@ -0,0 +0,0 @@ import { fetchHeadersLast, fetchHeight } from '../../api-node/blocks';

export default function (json: string): any;

@@ -0,0 +0,0 @@ const reg = new RegExp('((?!\\\\)"\\w+"):\\s*(-?[\\d|\\.]{14,})', 'g');

@@ -0,0 +0,0 @@ export default function <T extends Record<string, any>>(params: T, evolver?: TEvolver<T>): string;

@@ -0,0 +0,0 @@ import { toArray } from "./utils";

@@ -0,0 +0,0 @@ export default function <T>(params: IRequestParams<T>): Promise<T>;

@@ -0,0 +0,0 @@ import resolve from './resolve';

export default function (path: string, base: string): string;

@@ -0,0 +0,0 @@ export default function (path, base) {

export default function <T extends Record<string, any>>(data: T): string;

@@ -0,0 +0,0 @@ const FIELDS = ['amount', 'matcherFee', 'price', 'minSponsoredAssetFee', 'fee', 'quantity', 'sellMatcherFee', 'buyMatcherFee'];

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ import { broadcast } from '../../api-node/transactions';

export default function ethTxId2waves(ethTxId: string): string;

@@ -0,0 +0,0 @@ import { base16Decode, base58Encode } from '@waves/ts-lib-crypto';

@@ -0,0 +0,0 @@ import { TLong } from '../../interface';

@@ -0,0 +0,0 @@ import { head, indexBy, prop, toArray, wait } from '../utils';

@@ -0,0 +0,0 @@ import { TransactionMap, Transaction } from '@waves/ts-types';

@@ -0,0 +0,0 @@ export function isObject(obj) {

{
"name": "@waves/node-api-js",
"version": "1.3.0",
"version": "1.3.10-beta.1",
"main": "cjs/index.js",

@@ -15,3 +15,3 @@ "types": "cjs/index.d.ts",

"@waves/bignumber": "^1.1.1",
"@waves/ts-types": "^1.0.12",
"@waves/ts-types": "1.2.0-beta.2",
"node-fetch": "^2.6.7",

@@ -59,3 +59,3 @@ "typed-ts-events": "^1.1.1"

"@waves/node-state": "0.1.0",
"@waves/waves-transactions": "^4.2.4",
"@waves/waves-transactions": "4.3.10-beta.1",
"jest": "^26.6.3",

@@ -62,0 +62,0 @@ "ts-jest": "^26.5.6",

# Library for Waves Node Rest API

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

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