New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@0xcert/scaffold

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xcert/scaffold - npm Package Compare versions

Comparing version 2.0.0-alpha1 to 2.0.0-alpha10

.nyc_output/6d52d37b-3b57-45b1-9eae-739990c4ab56.json

4

CHANGELOG.json

@@ -5,4 +5,4 @@ {

{
"version": "2.0.0-alpha1",
"tag": "@0xcert/scaffold_v2.0.0-alpha1",
"version": "2.0.0-alpha10",
"tag": "@0xcert/scaffold_v2.0.0-alpha10",
"date": "Wed, 19 Jun 2019 10:31:05 GMT",

@@ -9,0 +9,0 @@ "comments": {}

@@ -5,3 +5,3 @@ # Change Log - @0xcert/scaffold

## 2.0.0-alpha1
## 2.0.0-alpha10
Wed, 19 Jun 2019 10:31:05 GMT

@@ -8,0 +8,0 @@

@@ -5,12 +5,13 @@ import { GatewayBase } from './gateway';

export declare enum GeneralAssetLedgerAbility {
CREATE_ASSET = 2,
REVOKE_ASSET = 4,
TOGGLE_TRANSFERS = 8,
UPDATE_ASSET = 16,
ALLOW_CREATE_ASSET = 32,
UPDATE_URI_BASE = 64,
ALLOW_UPDATE_ASSET_IMPRINT = 128
CREATE_ASSET = 16,
REVOKE_ASSET = 32,
TOGGLE_TRANSFERS = 64,
UPDATE_ASSET = 128,
UPDATE_URI_BASE = 256,
ALLOW_CREATE_ASSET = 512,
ALLOW_UPDATE_ASSET_IMPRINT = 1024
}
export declare enum SuperAssetLedgerAbility {
MANAGE_ABILITIES = 1
MANAGE_ABILITIES = 1,
ALLOW_MANAGE_ABILITIES = 2
}

@@ -53,3 +54,4 @@ export declare enum AssetLedgerCapability {

symbol: string;
uriBase: string;
uriPrefix: string;
uriPostfix: string;
schemaId: string;

@@ -66,3 +68,4 @@ capabilities?: AssetLedgerCapability[];

symbol: string;
uriBase: string;
uriPrefix: string;
uriPostfix: string;
schemaId: string;

@@ -86,3 +89,4 @@ supply: string;

export interface AssetLedgerUpdateRecipe {
uriBase: string;
uriPrefix: string;
uriPostfix: string;
}

@@ -5,9 +5,9 @@ "use strict";

(function (GeneralAssetLedgerAbility) {
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["CREATE_ASSET"] = 2] = "CREATE_ASSET";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["REVOKE_ASSET"] = 4] = "REVOKE_ASSET";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["TOGGLE_TRANSFERS"] = 8] = "TOGGLE_TRANSFERS";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["UPDATE_ASSET"] = 16] = "UPDATE_ASSET";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["ALLOW_CREATE_ASSET"] = 32] = "ALLOW_CREATE_ASSET";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["UPDATE_URI_BASE"] = 64] = "UPDATE_URI_BASE";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["ALLOW_UPDATE_ASSET_IMPRINT"] = 128] = "ALLOW_UPDATE_ASSET_IMPRINT";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["CREATE_ASSET"] = 16] = "CREATE_ASSET";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["REVOKE_ASSET"] = 32] = "REVOKE_ASSET";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["TOGGLE_TRANSFERS"] = 64] = "TOGGLE_TRANSFERS";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["UPDATE_ASSET"] = 128] = "UPDATE_ASSET";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["UPDATE_URI_BASE"] = 256] = "UPDATE_URI_BASE";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["ALLOW_CREATE_ASSET"] = 512] = "ALLOW_CREATE_ASSET";
GeneralAssetLedgerAbility[GeneralAssetLedgerAbility["ALLOW_UPDATE_ASSET_IMPRINT"] = 1024] = "ALLOW_UPDATE_ASSET_IMPRINT";
})(GeneralAssetLedgerAbility = exports.GeneralAssetLedgerAbility || (exports.GeneralAssetLedgerAbility = {}));

@@ -17,2 +17,3 @@ var SuperAssetLedgerAbility;

SuperAssetLedgerAbility[SuperAssetLedgerAbility["MANAGE_ABILITIES"] = 1] = "MANAGE_ABILITIES";
SuperAssetLedgerAbility[SuperAssetLedgerAbility["ALLOW_MANAGE_ABILITIES"] = 2] = "ALLOW_MANAGE_ABILITIES";
})(SuperAssetLedgerAbility = exports.SuperAssetLedgerAbility || (exports.SuperAssetLedgerAbility = {}));

@@ -19,0 +20,0 @@ var AssetLedgerCapability;

@@ -1,24 +0,34 @@

import { AssetLedgerCapability } from './asset-ledger';
import { AssetLedgerAbility, AssetLedgerCapability } from './asset-ledger';
import { MutationBase } from './mutation';
export declare enum MultiOrderActionKind {
export declare enum ActionsOrderActionKind {
CREATE_ASSET = 1,
TRANSFER_ASSET = 2,
TRANSFER_VALUE = 3,
UPDATE_ASSET_IMPRINT = 4
UPDATE_ASSET_IMPRINT = 4,
SET_ABILITIES = 5
}
export interface GatewayBase {
claim(order: Order): Promise<string>;
perform(order: Order, claim: string): Promise<MutationBase>;
perform(order: Order, claim: string | string[]): Promise<MutationBase>;
cancel(order: Order): Promise<MutationBase>;
}
export declare type MultiOrderAction = MultiOrderActionCreateAsset | MultiOrderActionTransferAsset | MultiOrderActionTransferValue | MultiOrderActionUpdateAssetImprint;
export interface MultiOrderActionCreateAsset {
kind: MultiOrderActionKind.CREATE_ASSET;
export declare type ActionsOrderAction = DynamicActionsOrderAction | FixedActionsOrderAction;
export declare type DynamicActionsOrderAction = DynamicActionsOrderActionCreateAsset | DynamicActionsOrderActionTransferAsset | DynamicActionsOrderActionTransferValue | DynamicActionsOrderActionUpdateAssetImprint | DynamicActionsOrderActionSetAbilities;
export interface DynamicActionsOrderActionSetAbilities {
kind: ActionsOrderActionKind.SET_ABILITIES;
ledgerId: string;
senderId?: string;
receiverId?: string;
abilities: AssetLedgerAbility[];
}
export interface DynamicActionsOrderActionCreateAsset {
kind: ActionsOrderActionKind.CREATE_ASSET;
ledgerId: string;
senderId?: string;
receiverId?: string;
assetId: string;
assetImprint: string;
}
export interface MultiOrderActionTransferAsset {
kind: MultiOrderActionKind.TRANSFER_ASSET;
export interface DynamicActionsOrderActionTransferAsset {
kind: ActionsOrderActionKind.TRANSFER_ASSET;
ledgerId: string;

@@ -29,10 +39,11 @@ senderId?: string;

}
export interface MultiOrderActionUpdateAssetImprint {
kind: MultiOrderActionKind.UPDATE_ASSET_IMPRINT;
export interface DynamicActionsOrderActionUpdateAssetImprint {
kind: ActionsOrderActionKind.UPDATE_ASSET_IMPRINT;
ledgerId: string;
senderId?: string;
assetImprint: string;
assetId: string;
}
export interface MultiOrderActionTransferValue {
kind: MultiOrderActionKind.TRANSFER_VALUE;
export interface DynamicActionsOrderActionTransferValue {
kind: ActionsOrderActionKind.TRANSFER_VALUE;
ledgerId: string;

@@ -43,16 +54,77 @@ senderId?: string;

}
export declare type Order = MultiOrder | AssetLedgerDeployOrder | ValueLedgerDeployOrder;
export declare type FixedActionsOrderAction = FixedActionsOrderActionCreateAsset | FixedActionsOrderActionTransferAsset | FixedActionsOrderActionTransferValue | FixedActionsOrderActionUpdateAssetImprint | FixedActionsOrderActionSetAbilities;
export interface FixedActionsOrderActionSetAbilities {
kind: ActionsOrderActionKind.SET_ABILITIES;
ledgerId: string;
senderId?: string;
receiverId: string;
abilities: AssetLedgerAbility[];
}
export interface FixedActionsOrderActionCreateAsset {
kind: ActionsOrderActionKind.CREATE_ASSET;
ledgerId: string;
senderId?: string;
receiverId: string;
assetId: string;
assetImprint: string;
}
export interface FixedActionsOrderActionTransferAsset {
kind: ActionsOrderActionKind.TRANSFER_ASSET;
ledgerId: string;
senderId: string;
receiverId: string;
assetId: string;
}
export interface FixedActionsOrderActionUpdateAssetImprint {
kind: ActionsOrderActionKind.UPDATE_ASSET_IMPRINT;
ledgerId: string;
senderId?: string;
assetImprint: string;
assetId: string;
}
export interface FixedActionsOrderActionTransferValue {
kind: ActionsOrderActionKind.TRANSFER_VALUE;
ledgerId: string;
senderId: string;
receiverId: string;
value: string;
}
export declare type ActionsOrder = FixedActionsOrder | SignedFixedActionsOrder | SignedDynamicActionsOrder | DynamicActionsOrder;
export declare type Order = AssetLedgerDeployOrder | ValueLedgerDeployOrder | ActionsOrder;
export declare enum OrderKind {
MULTI_ORDER = 1,
ASSET_LEDGER_DEPLOY_ORDER = 2,
VALUE_LEDGER_DEPLOY_ORDER = 3
ASSET_LEDGER_DEPLOY_ORDER = 1,
VALUE_LEDGER_DEPLOY_ORDER = 2,
FIXED_ACTIONS_ORDER = 3,
DYNAMIC_ACTIONS_ORDER = 4,
SIGNED_FIXED_ACTIONS_ORDER = 5,
SIGNED_DYNAMIC_ACTIONS_ORDER = 6
}
export declare class MultiOrder {
kind: OrderKind.MULTI_ORDER;
makerId: string;
takerId?: string;
actions: MultiOrderAction[];
export declare class DynamicActionsOrder {
kind: OrderKind.DYNAMIC_ACTIONS_ORDER;
signers: string[];
actions: DynamicActionsOrderAction[];
seed: number;
expiration: number;
}
export declare class SignedDynamicActionsOrder {
kind: OrderKind.SIGNED_DYNAMIC_ACTIONS_ORDER;
signers: string[];
actions: DynamicActionsOrderAction[];
seed: number;
expiration: number;
}
export declare class FixedActionsOrder {
kind: OrderKind.FIXED_ACTIONS_ORDER;
signers: string[];
actions: FixedActionsOrderAction[];
seed: number;
expiration: number;
}
export declare class SignedFixedActionsOrder {
kind: OrderKind.SIGNED_FIXED_ACTIONS_ORDER;
signers: string[];
actions: FixedActionsOrderAction[];
seed: number;
expiration: number;
}
export declare class AssetLedgerDeployOrder {

@@ -79,6 +151,7 @@ kind: OrderKind.ASSET_LEDGER_DEPLOY_ORDER;

symbol: string;
uriBase: string;
uriPrefix: string;
uriPostfix: string;
schemaId: string;
capabilities?: AssetLedgerCapability[];
owner: string;
ownerId: string;
}

@@ -90,3 +163,3 @@ export interface ValueLedgerData {

decimals: string;
owner: string;
ownerId: string;
}

@@ -93,0 +166,0 @@ export interface TokenTransferData {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MultiOrderActionKind;
(function (MultiOrderActionKind) {
MultiOrderActionKind[MultiOrderActionKind["CREATE_ASSET"] = 1] = "CREATE_ASSET";
MultiOrderActionKind[MultiOrderActionKind["TRANSFER_ASSET"] = 2] = "TRANSFER_ASSET";
MultiOrderActionKind[MultiOrderActionKind["TRANSFER_VALUE"] = 3] = "TRANSFER_VALUE";
MultiOrderActionKind[MultiOrderActionKind["UPDATE_ASSET_IMPRINT"] = 4] = "UPDATE_ASSET_IMPRINT";
})(MultiOrderActionKind = exports.MultiOrderActionKind || (exports.MultiOrderActionKind = {}));
var ActionsOrderActionKind;
(function (ActionsOrderActionKind) {
ActionsOrderActionKind[ActionsOrderActionKind["CREATE_ASSET"] = 1] = "CREATE_ASSET";
ActionsOrderActionKind[ActionsOrderActionKind["TRANSFER_ASSET"] = 2] = "TRANSFER_ASSET";
ActionsOrderActionKind[ActionsOrderActionKind["TRANSFER_VALUE"] = 3] = "TRANSFER_VALUE";
ActionsOrderActionKind[ActionsOrderActionKind["UPDATE_ASSET_IMPRINT"] = 4] = "UPDATE_ASSET_IMPRINT";
ActionsOrderActionKind[ActionsOrderActionKind["SET_ABILITIES"] = 5] = "SET_ABILITIES";
})(ActionsOrderActionKind = exports.ActionsOrderActionKind || (exports.ActionsOrderActionKind = {}));
var OrderKind;
(function (OrderKind) {
OrderKind[OrderKind["MULTI_ORDER"] = 1] = "MULTI_ORDER";
OrderKind[OrderKind["ASSET_LEDGER_DEPLOY_ORDER"] = 2] = "ASSET_LEDGER_DEPLOY_ORDER";
OrderKind[OrderKind["VALUE_LEDGER_DEPLOY_ORDER"] = 3] = "VALUE_LEDGER_DEPLOY_ORDER";
OrderKind[OrderKind["ASSET_LEDGER_DEPLOY_ORDER"] = 1] = "ASSET_LEDGER_DEPLOY_ORDER";
OrderKind[OrderKind["VALUE_LEDGER_DEPLOY_ORDER"] = 2] = "VALUE_LEDGER_DEPLOY_ORDER";
OrderKind[OrderKind["FIXED_ACTIONS_ORDER"] = 3] = "FIXED_ACTIONS_ORDER";
OrderKind[OrderKind["DYNAMIC_ACTIONS_ORDER"] = 4] = "DYNAMIC_ACTIONS_ORDER";
OrderKind[OrderKind["SIGNED_FIXED_ACTIONS_ORDER"] = 5] = "SIGNED_FIXED_ACTIONS_ORDER";
OrderKind[OrderKind["SIGNED_DYNAMIC_ACTIONS_ORDER"] = 6] = "SIGNED_DYNAMIC_ACTIONS_ORDER";
})(OrderKind = exports.OrderKind || (exports.OrderKind = {}));
class MultiOrder {
class DynamicActionsOrder {
}
exports.MultiOrder = MultiOrder;
exports.DynamicActionsOrder = DynamicActionsOrder;
class SignedDynamicActionsOrder {
}
exports.SignedDynamicActionsOrder = SignedDynamicActionsOrder;
class FixedActionsOrder {
}
exports.FixedActionsOrder = FixedActionsOrder;
class SignedFixedActionsOrder {
}
exports.SignedFixedActionsOrder = SignedFixedActionsOrder;
class AssetLedgerDeployOrder {

@@ -20,0 +33,0 @@ }

@@ -0,1 +1,2 @@

import { AssetLedgerBase, GatewayBase, ValueLedgerBase } from '..';
export declare enum MutationEvent {

@@ -6,2 +7,3 @@ COMPLETE = "complete",

}
export declare type MutationContext = AssetLedgerBase | ValueLedgerBase | GatewayBase;
export interface MutationBase {

@@ -12,2 +14,3 @@ id: string;

receiverId: string;
logs: any[];
isPending(): boolean;

@@ -26,3 +29,4 @@ isCompleted(): boolean;

complete(): Promise<this>;
resolve(): Promise<this>;
forget(): this;
}
{
"name": "@0xcert/scaffold",
"version": "2.0.0-alpha1",
"version": "2.0.0-alpha10",
"description": "Overarching module with types, enums, and interfaces for easier development of interoperable modules.",

@@ -67,10 +67,10 @@ "main": "./dist/index.js",

"devDependencies": {
"@hayspec/cli": "^0.8.3",
"@hayspec/spec": "^0.8.3",
"@types/node": "^10.12.24",
"nyc": "^13.1.0",
"ts-node": "^7.0.1",
"tslint": "^5.12.1",
"typescript": "^3.1.1"
"@hayspec/cli": "0.9.0",
"@hayspec/spec": "0.9.0",
"@types/node": "12.7.8",
"nyc": "14.1.1",
"ts-node": "8.4.1",
"tslint": "5.20.0",
"typescript": "3.6.3"
}
}

@@ -11,9 +11,9 @@ import { GatewayBase } from './gateway';

export enum GeneralAssetLedgerAbility {
CREATE_ASSET = 2,
REVOKE_ASSET = 4,
TOGGLE_TRANSFERS = 8,
UPDATE_ASSET = 16,
ALLOW_CREATE_ASSET = 32,
UPDATE_URI_BASE = 64,
ALLOW_UPDATE_ASSET_IMPRINT = 128,
CREATE_ASSET = 16,
REVOKE_ASSET = 32,
TOGGLE_TRANSFERS = 64,
UPDATE_ASSET = 128,
UPDATE_URI_BASE = 256,
ALLOW_CREATE_ASSET = 512,
ALLOW_UPDATE_ASSET_IMPRINT = 1024,
}

@@ -27,2 +27,3 @@

MANAGE_ABILITIES = 1,
ALLOW_MANAGE_ABILITIES = 2,
}

@@ -140,3 +141,3 @@

/**
* Gets information about the asset ledger (name, symbol, uriBase, schemaId, supply).
* Gets information about the asset ledger (name, symbol, uriPrefix, schemaId, supply).
*/

@@ -214,9 +215,16 @@ getInfo(): Promise<AssetLedgerInfo>;

/**
* Uri base for metadata URI-s. At the end of the base the assetId is automatically appended foo each asset.
* Uri prefix for metadata URI-s. At the end of the prefix the assetId is automatically appended for each asset.
* Example: https://example.com/id/
* Asset 1 URI will become: https://example.com/id/1
* Asset 1 URI will become: https://example.com/id/1 + postfix
*/
uriBase: string;
uriPrefix: string;
/**
* URI postfix for metadata URIs. After uriPrefix and assetId, postfix is automatically appended for each asset..
* Example: .json
* Asset 1 URI will become: uriPrefix + 1.json
*/
uriPostfix: string;
/**
* Hashed representation of JSON schema defining this object.

@@ -269,9 +277,16 @@ */

/**
* Uri base for metadata URI-s. At the end of the base the assetId is automatically appended foo each asset.
* Uri prefix for metadata URI-s. At the end of the prefix the assetId is automatically appended for each asset.
* Example: https://example.com/id/
* Asset 1 URI will become: https://example.com/id/1
* Asset 1 URI will become: https://example.com/id/1 + postfix
*/
uriBase: string;
uriPrefix: string;
/**
* URI postfix for metadata URIs. After uriPrefix and assetId, postfix is automatically appended for each asset..
* Example: .json
* Asset 1 URI will become: uriPrefix + 1.json
*/
uriPostfix: string;
/**
* Hashed representation of JSON schema defining this object.

@@ -351,7 +366,14 @@ */

/**
* Uri base for metadata URI-s. At the end of the base the assetId is automatically appended foo each asset.
* Uri prefix for metadata URI-s. At the end of the prefix the assetId is automatically appended for each asset.
* Example: https://example.com/id/
* Asset 1 URI will become: https://example.com/id/1
* Asset 1 URI will become: https://example.com/id/1 + postfix
*/
uriBase: string;
uriPrefix: string;
/**
* URI postfix for metadata URIs. After uriPrefix and assetId, postfix is automatically appended for each asset..
* Example: .json
* Asset 1 URI will become: uriPrefix + 1.json
*/
uriPostfix: string;
}

@@ -1,2 +0,2 @@

import { AssetLedgerCapability } from './asset-ledger';
import { AssetLedgerAbility, AssetLedgerCapability } from './asset-ledger';
import { MutationBase } from './mutation';

@@ -7,3 +7,3 @@

*/
export enum MultiOrderActionKind {
export enum ActionsOrderActionKind {
CREATE_ASSET = 1,

@@ -13,2 +13,3 @@ TRANSFER_ASSET = 2,

UPDATE_ASSET_IMPRINT = 4,
SET_ABILITIES = 5,
}

@@ -32,3 +33,3 @@

*/
perform(order: Order, claim: string): Promise<MutationBase>;
perform(order: Order, claim: string | string[]): Promise<MutationBase>;

@@ -45,9 +46,14 @@ /**

*/
export type MultiOrderAction = MultiOrderActionCreateAsset | MultiOrderActionTransferAsset
| MultiOrderActionTransferValue | MultiOrderActionUpdateAssetImprint;
export type ActionsOrderAction = DynamicActionsOrderAction | FixedActionsOrderAction;
/**
* Different dynamic order actions.
*/
export type DynamicActionsOrderAction = DynamicActionsOrderActionCreateAsset | DynamicActionsOrderActionTransferAsset
| DynamicActionsOrderActionTransferValue | DynamicActionsOrderActionUpdateAssetImprint | DynamicActionsOrderActionSetAbilities;
/**
* Order create asset data definitio.
*/
export interface MultiOrderActionCreateAsset {
export interface DynamicActionsOrderActionSetAbilities {

@@ -57,3 +63,3 @@ /**

*/
kind: MultiOrderActionKind.CREATE_ASSET;
kind: ActionsOrderActionKind.SET_ABILITIES;

@@ -66,2 +72,38 @@ /**

/**
* Id (address) of the sender - setter of abilitites.
*/
senderId?: string;
/**
* Id (address) of account we are setting abilitites to.
*/
receiverId?: string;
/**
* Abilities we want to set.
*/
abilities: AssetLedgerAbility[];
}
/**
* Order create asset data definitio.
*/
export interface DynamicActionsOrderActionCreateAsset {
/**
* Type od order action.
*/
kind: ActionsOrderActionKind.CREATE_ASSET;
/**
* Id (address) of the smart contract that represents the assetLedger.
*/
ledgerId: string;
/**
* Id (address) of the sender - creator.
*/
senderId?: string;
/**
* Id (address) of the receiver.

@@ -85,3 +127,3 @@ */

*/
export interface MultiOrderActionTransferAsset {
export interface DynamicActionsOrderActionTransferAsset {

@@ -91,3 +133,3 @@ /**

*/
kind: MultiOrderActionKind.TRANSFER_ASSET;
kind: ActionsOrderActionKind.TRANSFER_ASSET;

@@ -118,3 +160,3 @@ /**

*/
export interface MultiOrderActionUpdateAssetImprint {
export interface DynamicActionsOrderActionUpdateAssetImprint {

@@ -124,3 +166,3 @@ /**

*/
kind: MultiOrderActionKind.UPDATE_ASSET_IMPRINT;
kind: ActionsOrderActionKind.UPDATE_ASSET_IMPRINT;

@@ -133,2 +175,7 @@ /**

/**
* Id (address) of the sender - updator.
*/
senderId?: string;
/**
* Merkle tree root of asset proof.

@@ -147,3 +194,3 @@ */

*/
export interface MultiOrderActionTransferValue {
export interface DynamicActionsOrderActionTransferValue {

@@ -153,3 +200,3 @@ /**

*/
kind: MultiOrderActionKind.TRANSFER_VALUE;
kind: ActionsOrderActionKind.TRANSFER_VALUE;

@@ -178,5 +225,174 @@ /**

/**
* Different fixed order actions.
*/
export type FixedActionsOrderAction = FixedActionsOrderActionCreateAsset | FixedActionsOrderActionTransferAsset
| FixedActionsOrderActionTransferValue | FixedActionsOrderActionUpdateAssetImprint | FixedActionsOrderActionSetAbilities;
/**
* Order create asset data definitio.
*/
export interface FixedActionsOrderActionSetAbilities {
/**
* Type od order action.
*/
kind: ActionsOrderActionKind.SET_ABILITIES;
/**
* Id (address) of the smart contract that represents the assetLedger.
*/
ledgerId: string;
/**
* Id (address) of the sender - setter of abilitites.
*/
senderId?: string;
/**
* Id (address) of account we are setting abilitites to.
*/
receiverId: string;
/**
* Abilities we want to set.
*/
abilities: AssetLedgerAbility[];
}
/**
* Order create asset data definitio.
*/
export interface FixedActionsOrderActionCreateAsset {
/**
* Type od order action.
*/
kind: ActionsOrderActionKind.CREATE_ASSET;
/**
* Id (address) of the smart contract that represents the assetLedger.
*/
ledgerId: string;
/**
* Id (address) of the sender - creator.
*/
senderId?: string;
/**
* Id (address) of the receiver.
*/
receiverId: string;
/**
* Unique asset Id.
*/
assetId: string;
/**
* Merkle tree root of asset proof.
*/
assetImprint: string;
}
/**
* Order transfer asset data definition.
*/
export interface FixedActionsOrderActionTransferAsset {
/**
* Type od order action.
*/
kind: ActionsOrderActionKind.TRANSFER_ASSET;
/**
* Id (address) of the smart contract that represents the assetLedger.
*/
ledgerId: string;
/**
* Id (address) of the sender.
*/
senderId: string;
/**
* Id (address) of the receiver.
*/
receiverId: string;
/**
* Unique asset Id.
*/
assetId: string;
}
/**
* Order transfer asset data definition.
*/
export interface FixedActionsOrderActionUpdateAssetImprint {
/**
* Type od order action.
*/
kind: ActionsOrderActionKind.UPDATE_ASSET_IMPRINT;
/**
* Id (address) of the smart contract that represents the assetLedger.
*/
ledgerId: string;
/**
* Id (address) of the sender - updator.
*/
senderId?: string;
/**
* Merkle tree root of asset proof.
*/
assetImprint: string;
/**
* Unique asset Id.
*/
assetId: string;
}
/**
* Order transfer value data definition.
*/
export interface FixedActionsOrderActionTransferValue {
/**
* Type od order action.
*/
kind: ActionsOrderActionKind.TRANSFER_VALUE;
/**
* Id (address) of the smart contract that represents the assetLedger.
*/
ledgerId: string;
/**
* Id (address) of the sender.
*/
senderId: string;
/**
* Id (address) of the receiver.
*/
receiverId: string;
/**
* The amount of value(erc20 tokens).
*/
value: string; // TODO BN.js
}
export type ActionsOrder = FixedActionsOrder | SignedFixedActionsOrder |
SignedDynamicActionsOrder | DynamicActionsOrder;
/**
* Different order actions.
*/
export type Order = MultiOrder | AssetLedgerDeployOrder | ValueLedgerDeployOrder;
export type Order = AssetLedgerDeployOrder | ValueLedgerDeployOrder | ActionsOrder;

@@ -187,5 +403,8 @@ /**

export enum OrderKind {
MULTI_ORDER = 1,
ASSET_LEDGER_DEPLOY_ORDER = 2,
VALUE_LEDGER_DEPLOY_ORDER = 3,
ASSET_LEDGER_DEPLOY_ORDER = 1,
VALUE_LEDGER_DEPLOY_ORDER = 2,
FIXED_ACTIONS_ORDER = 3,
DYNAMIC_ACTIONS_ORDER = 4,
SIGNED_FIXED_ACTIONS_ORDER = 5,
SIGNED_DYNAMIC_ACTIONS_ORDER = 6,
}

@@ -196,3 +415,3 @@

*/
export class MultiOrder {
export class DynamicActionsOrder {

@@ -202,18 +421,44 @@ /**

*/
public kind: OrderKind.MULTI_ORDER;
public kind: OrderKind.DYNAMIC_ACTIONS_ORDER;
/**
* Address of the order maker.
* Array of order signers.
*/
public makerId: string;
public signers: string[];
/**
* Address of the order taker.
* Array of actions that will execute in this order.
*/
public takerId?: string;
public actions: DynamicActionsOrderAction[];
/**
* Nonce for hash generation - usually current timestamp.
*/
public seed: number;
/**
* Timestamp of order expiration.
*/
public expiration: number;
}
/**
* Order definition.
*/
export class SignedDynamicActionsOrder {
/**
* Type of order.
*/
public kind: OrderKind.SIGNED_DYNAMIC_ACTIONS_ORDER;
/**
* Array of order signers.
*/
public signers: string[];
/**
* Array of actions that will execute in this order.
*/
public actions: MultiOrderAction[];
public actions: DynamicActionsOrderAction[];

@@ -232,2 +477,64 @@ /**

/**
* Order definition.
*/
export class FixedActionsOrder {
/**
* Type of order.
*/
public kind: OrderKind.FIXED_ACTIONS_ORDER;
/**
* Array of order signers.
*/
public signers: string[];
/**
* Array of actions that will execute in this order.
*/
public actions: FixedActionsOrderAction[];
/**
* Nonce for hash generation - usually current timestamp.
*/
public seed: number;
/**
* Timestamp of order expiration.
*/
public expiration: number;
}
/**
* Order definition.
*/
export class SignedFixedActionsOrder {
/**
* Type of order.
*/
public kind: OrderKind.SIGNED_FIXED_ACTIONS_ORDER;
/**
* Array of order signers.
*/
public signers: string[];
/**
* Array of actions that will execute in this order.
*/
public actions: FixedActionsOrderAction[];
/**
* Nonce for hash generation - usually current timestamp.
*/
public seed: number;
/**
* Timestamp of order expiration.
*/
public expiration: number;
}
/**
* Asset ledger deploy definition.

@@ -330,9 +637,16 @@ */

/**
* Uri base for metadata URI-s. At the end of the base the assetId is automatically appended foo each asset.
* Uri prefix for metadata URI-s. At the end of the prefix the assetId is automatically appended for each asset.
* Example: https://example.com/id/
* Asset 1 URI will become: https://example.com/id/1
* Asset 1 URI will become: https://example.com/id/1 + postfix
*/
uriBase: string;
uriPrefix: string;
/**
* URI postfix for metadata URIs. After uriPrefix and assetId, postfix is automatically appended for each asset..
* Example: .json
* Asset 1 URI will become: uriPrefix + 1.json
*/
uriPostfix: string;
/**
* Hashed representation of JSON schema defining this object.

@@ -350,3 +664,3 @@ */

*/
owner: string;
ownerId: string;
}

@@ -382,3 +696,3 @@

*/
owner: string;
ownerId: string;
}

@@ -385,0 +699,0 @@

@@ -0,1 +1,3 @@

import { AssetLedgerBase, GatewayBase, ValueLedgerBase } from '..';
/**

@@ -11,2 +13,7 @@ * Mutation event kinds.

/**
* Mutation context base.
*/
export type MutationContext = AssetLedgerBase | ValueLedgerBase | GatewayBase;
/**
* Mutation interface.

@@ -37,2 +44,7 @@ */

/**
* Mutation logs.
*/
logs: any[];
/**
* Checks if mutation in pending.

@@ -79,2 +91,7 @@ */

/**
* Resolves current mutation status.
*/
resolve(): Promise<this>;
/**
* Stops listening for confirmations.

@@ -81,0 +98,0 @@ */

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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