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

@waves/ts-types

Package Overview
Dependencies
Maintainers
13
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.1.0-beta-1 to 0.1.0-beta-2

34

index.ts
export * from './transactions/general';
export enum TRANSACTION_TYPE {
GENESIS = 1,
PAYMENT = 2,
ISSUE = 3,
TRANSFER = 4,
REISSUE = 5,
BURN = 6,
EXCHANGE = 7,
LEASE = 8,
CANCEL_LEASE = 9,
ALIAS = 10,
MASS_TRANSFER = 11,
DATA = 12,
SET_SCRIPT = 13,
SPONSORSHIP = 14,
SET_ASSET_SCRIPT = 15
}
export const TRANSACTION_TYPE = {
GENESIS: 1 as 1,
PAYMENT: 2 as 2,
ISSUE: 3 as 3,
TRANSFER: 4 as 4,
REISSUE: 5 as 5,
BURN: 6 as 6,
EXCHANGE: 7 as 7,
LEASE: 8 as 8,
CANCEL_LEASE: 9 as 9,
ALIAS: 10 as 10,
MASS_TRANSFER: 11 as 11,
DATA: 12 as 12,
SET_SCRIPT: 13 as 13,
SPONSORSHIP: 14 as 14,
SET_ASSET_SCRIPT: 15 as 15
};

@@ -22,0 +22,0 @@ export enum DATA_FIELD_TYPE {

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

@@ -34,18 +34,18 @@ import {

export type TTransactionMap<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>
3: TIssueTransaction<LONG>,
4: TTransferTransaction<LONG>,
5: TReissueTransaction<LONG>,
6: TBurnTransaction<LONG>,
7: TLeaseTransaction<LONG>,
8: TCancelLeaseTransaction<LONG>,
9: TAliasTransaction<LONG>,
10: TMassTransferTransaction<LONG>,
11: TDataTransaction<LONG>,
12: TSetScriptTransaction<LONG>,
13: TSponsorship<LONG>,
14: TExchangeTransaction<LONG>
};
export type TIssueTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.ISSUE
type: typeof TRANSACTION_TYPE.ISSUE
chainId: number;

@@ -61,3 +61,3 @@ name: string;

export type TTransferTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.TRANSFER;
type: typeof TRANSACTION_TYPE.TRANSFER;
recipient: string;

@@ -71,3 +71,3 @@ amount: LONG;

export type TReissueTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.REISSUE;
type: typeof TRANSACTION_TYPE.REISSUE;
chainId: number;

@@ -80,3 +80,3 @@ assetId: string;

export type TBurnTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.BURN;
type: typeof TRANSACTION_TYPE.BURN;
chainId: number;

@@ -88,3 +88,3 @@ assetId: string;

export type TLeaseTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.LEASE;
type: typeof TRANSACTION_TYPE.LEASE;
amount: LONG;

@@ -95,3 +95,3 @@ recipient: string;

export type TCancelLeaseTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.CANCEL_LEASE;
type: typeof TRANSACTION_TYPE.CANCEL_LEASE;
chainId: number;

@@ -102,3 +102,3 @@ leaseId: string;

export type TAliasTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.ALIAS;
type: typeof TRANSACTION_TYPE.ALIAS;
alias: string;

@@ -108,3 +108,3 @@ }

export type TMassTransferTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.MASS_TRANSFER;
type: typeof TRANSACTION_TYPE.MASS_TRANSFER;
transfers: IMassTransferItem<LONG>;

@@ -116,3 +116,3 @@ assetId: string;

export type TDataTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.DATA;
type: typeof TRANSACTION_TYPE.DATA;
data: Array<TDataTransactionEntry<LONG>>;

@@ -122,3 +122,3 @@ }

export type TSetScriptTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.SET_SCRIPT;
type: typeof TRANSACTION_TYPE.SET_SCRIPT;
chainId: number;

@@ -129,3 +129,3 @@ script: string | null; //base64

export type TSponsorship<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.SPONSORSHIP;
type: typeof TRANSACTION_TYPE.SPONSORSHIP;
chainId: number;

@@ -137,3 +137,3 @@ assetId: string;

export type TExchangeTransaction<LONG> = TBaseAPITransaction<LONG> & {
type: TRANSACTION_TYPE.EXCHANGE;
type: typeof TRANSACTION_TYPE.EXCHANGE;
sender: string;

@@ -140,0 +140,0 @@ price: LONG;

@@ -6,2 +6,4 @@ export * from './sign';

export type TDataEntryFieldType = 'integer' | 'boolean' | 'string' | 'binary';
export interface IWithId {

@@ -122,3 +124,3 @@ id: string;

export interface IIssueTransaction<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.ISSUE
type: typeof TRANSACTION_TYPE.ISSUE;
name: string;

@@ -134,3 +136,3 @@ description: string;

export interface ITransferTransaction<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.TRANSFER;
type: typeof TRANSACTION_TYPE.TRANSFER;
recipient: string;

@@ -144,3 +146,3 @@ amount: LONG;

export interface IReissueTransaction<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.REISSUE;
type: typeof TRANSACTION_TYPE.REISSUE;
assetId: string;

@@ -152,3 +154,3 @@ quantity: LONG;

export interface IBurnTransaction<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.BURN;
type: typeof TRANSACTION_TYPE.BURN;
assetId: string;

@@ -159,3 +161,3 @@ quantity: LONG;

export interface ILeaseTransaction<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.LEASE;
type: typeof TRANSACTION_TYPE.LEASE;
amount: LONG;

@@ -166,3 +168,3 @@ recipient: string;

export interface ICancelLeaseTransaction<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.CANCEL_LEASE;
type: typeof TRANSACTION_TYPE.CANCEL_LEASE;
leaseId: string;

@@ -172,3 +174,3 @@ }

export interface IAliasTransaction<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.ALIAS;
type: typeof TRANSACTION_TYPE.ALIAS;
alias: string;

@@ -178,3 +180,3 @@ }

export interface IMassTransferTransaction<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.MASS_TRANSFER;
type: typeof TRANSACTION_TYPE.MASS_TRANSFER;
transfers: IMassTransferItem<LONG>;

@@ -186,3 +188,3 @@ assetId?: string;

export interface IDataTransaction<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.DATA;
type: typeof TRANSACTION_TYPE.DATA;
data: Array<TDataTransactionEntry<LONG>>;

@@ -192,7 +194,7 @@ }

export interface IExchangeTransaction<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.EXCHANGE;
type: typeof TRANSACTION_TYPE.EXCHANGE;
}
export interface ISetScriptTransaction<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.SET_SCRIPT;
type: typeof TRANSACTION_TYPE.SET_SCRIPT;
script: string | null //base64

@@ -202,3 +204,3 @@ }

export interface ISponsorship<LONG> extends ITransaction<LONG> {
type: TRANSACTION_TYPE.SPONSORSHIP;
type: typeof TRANSACTION_TYPE.SPONSORSHIP;
assetId: string;

@@ -209,5 +211,5 @@ minSponsoredAssetFee: LONG;

export interface ISetAssetScript<LONG> extends ITransaction<LONG>, IWithVersion, IWithChainId {
type: TRANSACTION_TYPE.SET_ASSET_SCRIPT;
type: typeof TRANSACTION_TYPE.SET_ASSET_SCRIPT;
assetId: string;
script: string;
}

@@ -54,3 +54,3 @@ import {

export interface IIssueTransaction<LONG> extends ITransaction<LONG>, Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
type: TRANSACTION_TYPE.ISSUE
type: typeof TRANSACTION_TYPE.ISSUE
name: string;

@@ -66,3 +66,3 @@ description: string;

export interface ITransferTransaction<LONG> extends ITransaction<LONG>, Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
type: TRANSACTION_TYPE.TRANSFER;
type: typeof TRANSACTION_TYPE.TRANSFER;
recipient: string;

@@ -76,3 +76,3 @@ amount: LONG;

export interface IReissueTransaction<LONG> extends ITransaction<LONG>, Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
type: TRANSACTION_TYPE.REISSUE;
type: typeof TRANSACTION_TYPE.REISSUE;
assetId: string;

@@ -85,3 +85,3 @@ quantity: LONG;

export interface IBurnTransaction<LONG> extends ITransaction<LONG>, Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
type: TRANSACTION_TYPE.BURN;
type: typeof TRANSACTION_TYPE.BURN;
assetId: string;

@@ -93,3 +93,3 @@ quantity: LONG;

export interface ILeaseTransaction<LONG> extends ITransaction<LONG>, Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
type: TRANSACTION_TYPE.LEASE;
type: typeof TRANSACTION_TYPE.LEASE;
amount: LONG;

@@ -100,3 +100,3 @@ recipient: string;

export interface ICancelLeaseTransaction<LONG> extends ITransaction<LONG>, Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
type: TRANSACTION_TYPE.CANCEL_LEASE;
type: typeof TRANSACTION_TYPE.CANCEL_LEASE;
leaseId: string;

@@ -107,3 +107,3 @@ chainId: number;

export interface IAliasTransaction<LONG> extends ITransaction<LONG>, Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
type: TRANSACTION_TYPE.ALIAS;
type: typeof TRANSACTION_TYPE.ALIAS;
alias: string;

@@ -113,3 +113,3 @@ }

export interface IMassTransferTransaction<LONG> extends ITransaction<LONG>, Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
type: TRANSACTION_TYPE.MASS_TRANSFER;
type: typeof TRANSACTION_TYPE.MASS_TRANSFER;
transfers: IMassTransferItem<LONG>;

@@ -121,3 +121,3 @@ assetId?: string;

export interface IDataTransaction<LONG> extends ITransaction<LONG>, Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
type: TRANSACTION_TYPE.DATA;
type: typeof TRANSACTION_TYPE.DATA;
data: Array<TDataTransactionEntry<LONG>>;

@@ -127,3 +127,3 @@ }

export interface ISetScriptTransaction<LONG> extends ITransaction<LONG>, Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
type: TRANSACTION_TYPE.SET_SCRIPT;
type: typeof TRANSACTION_TYPE.SET_SCRIPT;
chainId: number;

@@ -134,3 +134,3 @@ script: string | null //base64

export interface ISponsorship<LONG> extends ITransaction<LONG>, Partial<IWithId>, Partial<IWithProofs>, Partial<IWithSender>, Partial<IWithVersion> {
type: TRANSACTION_TYPE.SPONSORSHIP;
type: typeof TRANSACTION_TYPE.SPONSORSHIP;
chainId: number;

@@ -137,0 +137,0 @@ assetId: string;

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