Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@waves/ts-types

Package Overview
Dependencies
Maintainers
12
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waves/ts-types - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0-beta

2

package.json
{
"name": "@waves/ts-types",
"version": "0.0.2",
"version": "0.1.0-beta",
"main": "dist/index.js",
"types": "index.ts"
}

@@ -6,3 +6,5 @@ import {

IWithProofs,
IWithSender, IWithVersion,
IWithSignature,
IWithSender,
IWithVersion,
TDataTransactionEntry,

@@ -15,32 +17,35 @@ IExchangeTransactionOrder,

export type TProofsOrSignature = IWithProofs & IWithVersion | IWithSignature;
export type TBaseAPITransaction<LONG> = ITransaction<LONG> & IWithId & IWithSender & TProofsOrSignature;
export type TTransaction<LONG> =
IIssueTransaction<LONG> |
ITransferTransaction<LONG> |
IReissueTransaction<LONG> |
IBurnTransaction<LONG> |
ILeaseTransaction<LONG> |
ICancelLeaseTransaction<LONG> |
IAliasTransaction<LONG> |
IMassTransferTransaction<LONG> |
IDataTransaction<LONG> |
ISetScriptTransaction<LONG> |
ISponsorship<LONG> |
IExchangeTransaction<LONG>;
TIssueTransaction<LONG> |
TTransferTransaction<LONG> |
TReissueTransaction<LONG> |
TBurnTransaction<LONG> |
TLeaseTransaction<LONG> |
TCancelLeaseTransaction<LONG> |
TAliasTransaction<LONG> |
TMassTransferTransaction<LONG> |
TDataTransaction<LONG> |
TSetScriptTransaction<LONG> |
TSponsorship<LONG> |
TExchangeTransaction<LONG>;
export type TTransactionMap<LONG> = {
[TRANSACTION_TYPE.ISSUE]: IIssueTransaction<LONG>,
[TRANSACTION_TYPE.TRANSFER]: ITransferTransaction<LONG>,
[TRANSACTION_TYPE.REISSUE]: IReissueTransaction<LONG>,
[TRANSACTION_TYPE.BURN]: IBurnTransaction<LONG>,
[TRANSACTION_TYPE.LEASE]: ILeaseTransaction<LONG>,
[TRANSACTION_TYPE.CANCEL_LEASE]: ICancelLeaseTransaction<LONG>,
[TRANSACTION_TYPE.ALIAS]: IAliasTransaction<LONG>,
[TRANSACTION_TYPE.MASS_TRANSFER]: IMassTransferTransaction<LONG>,
[TRANSACTION_TYPE.DATA]: IDataTransaction<LONG>,
[TRANSACTION_TYPE.SET_SCRIPT]: ISetScriptTransaction<LONG>,
[TRANSACTION_TYPE.SPONSORSHIP]: ISponsorship<LONG>,
[TRANSACTION_TYPE.EXCHANGE]: IExchangeTransaction<LONG>
[TRANSACTION_TYPE.ISSUE]: TIssueTransaction<LONG>,
[TRANSACTION_TYPE.TRANSFER]: TTransferTransaction<LONG>,
[TRANSACTION_TYPE.REISSUE]: TReissueTransaction<LONG>,
[TRANSACTION_TYPE.BURN]: TBurnTransaction<LONG>,
[TRANSACTION_TYPE.LEASE]: TLeaseTransaction<LONG>,
[TRANSACTION_TYPE.CANCEL_LEASE]: TCancelLeaseTransaction<LONG>,
[TRANSACTION_TYPE.ALIAS]: TAliasTransaction<LONG>,
[TRANSACTION_TYPE.MASS_TRANSFER]: TMassTransferTransaction<LONG>,
[TRANSACTION_TYPE.DATA]: TDataTransaction<LONG>,
[TRANSACTION_TYPE.SET_SCRIPT]: TSetScriptTransaction<LONG>,
[TRANSACTION_TYPE.SPONSORSHIP]: TSponsorship<LONG>,
[TRANSACTION_TYPE.EXCHANGE]: TExchangeTransaction<LONG>
};
export interface IIssueTransaction<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TIssueTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.ISSUE

@@ -54,5 +59,5 @@ chainId: number;

script?: string;
}
};
export interface ITransferTransaction<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TTransferTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.TRANSFER;

@@ -66,3 +71,3 @@ recipient: string;

export interface IReissueTransaction<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TReissueTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.REISSUE;

@@ -75,3 +80,3 @@ chainId: number;

export interface IBurnTransaction<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TBurnTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.BURN;

@@ -83,3 +88,3 @@ chainId: number;

export interface ILeaseTransaction<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TLeaseTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.LEASE;

@@ -90,3 +95,3 @@ amount: LONG;

export interface ICancelLeaseTransaction<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TCancelLeaseTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.CANCEL_LEASE;

@@ -97,3 +102,3 @@ chainId: number;

export interface IAliasTransaction<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TAliasTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.ALIAS;

@@ -103,3 +108,3 @@ alias: string;

export interface IMassTransferTransaction<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TMassTransferTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.MASS_TRANSFER;

@@ -111,3 +116,3 @@ transfers: IMassTransferItem<LONG>;

export interface IDataTransaction<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TDataTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.DATA;

@@ -117,9 +122,9 @@ data: Array<TDataTransactionEntry<LONG>>;

export interface ISetScriptTransaction<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TSetScriptTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.SET_SCRIPT;
chainId: number;
script: string | null //base64
script: string | null; //base64
}
export interface ISponsorship<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TSponsorship<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.SPONSORSHIP;

@@ -131,3 +136,3 @@ chainId: number;

export interface IExchangeTransaction<LONG> extends ITransaction<LONG>, IWithId, IWithProofs, IWithSender, IWithVersion {
export type TExchangeTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.EXCHANGE;

@@ -139,6 +144,11 @@ sender: string;

sellMatcherFee: LONG;
order1: IExchangeTransactionOrder<LONG>;
order2: IExchangeTransactionOrder<LONG>;
order1: TExchangeTransactionOrder<LONG>;
order2: TExchangeTransactionOrder<LONG>;
}
export type TExchangeTransactionOrder<LONG> =
IExchangeTransactionOrder<LONG>
& IWithId
& IWithSender
& TProofsOrSignature;
}

@@ -19,7 +19,10 @@ export * from './sign';

export interface IWithVersion {
version?: number;
version: number;
}
export interface IWithSignature {
signature: string;
}
export interface IWithProofs {
signature?: string;
/**

@@ -30,3 +33,3 @@ * Transaction proofs

*/
proofs?: string[]
proofs: string[]
}

@@ -63,4 +66,3 @@

export interface IExchangeTransactionOrder<LONG> extends IWithId, IWithSender, IWithProofs {
sender: string;
export interface IExchangeTransactionOrder<LONG> {
matcherPublicKey: string;

@@ -67,0 +69,0 @@ assetPair: {

import {
IAliasTransaction,
IBurnTransaction, ICancelLeaseTransaction, IDataTransaction,
IIssueTransaction, ILeaseTransaction,
IMassTransferItem, IMassTransferTransaction, IReissueTransaction, ISetScriptTransaction, ISponsorship,
ITransaction, ITransferTransaction,
IBurnTransaction,
ICancelLeaseTransaction,
IDataTransaction,
IIssueTransaction,
ILeaseTransaction,
IMassTransferItem,
IMassTransferTransaction,
IReissueTransaction,
ISetScriptTransaction,
ISponsorship,
ITransaction,
ITransferTransaction,
IWithChainId,

@@ -11,3 +19,4 @@ IWithId,

IWithSender,
IWithVersion, TDataTransactionEntry,
IWithVersion,
TDataTransactionEntry,
TRANSACTION_TYPE

@@ -122,2 +131,16 @@ } from '..';

export interface IExchangeTransactionOrder<LONG> extends Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
matcherPublicKey: string;
assetPair: {
amountAsset: string;
priceAsset: string;
},
orderType: string;
price: LONG;
amount: LONG;
timestamp?: number;
expiration?: number;
matcherFee?: LONG;
}
}
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