@0xcert/scaffold
Advanced tools
Comparing version 0.0.0-alpha1 to 0.0.0-alpha3
@@ -5,4 +5,4 @@ { | ||
{ | ||
"version": "0.0.0-alpha1", | ||
"tag": "@0xcert/scaffold_v0.0.0-alpha1", | ||
"version": "0.0.0-alpha3", | ||
"tag": "@0xcert/scaffold_v0.0.0-alpha3", | ||
"date": "Thu, 22 Nov 2018 00:51:03 GMT", | ||
@@ -9,0 +9,0 @@ "comments": {} |
@@ -5,3 +5,3 @@ # Change Log - @0xcert/scaffold | ||
## 0.0.0-alpha1 | ||
## 0.0.0-alpha3 | ||
Thu, 22 Nov 2018 00:51:03 GMT | ||
@@ -8,0 +8,0 @@ |
export interface ContextBase { | ||
myId: string; | ||
attach(): Promise<this>; | ||
detach(): Promise<this>; | ||
sign(data: string): Promise<string>; | ||
@@ -6,0 +4,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare enum ConnectorIssue { | ||
export declare enum GenericProviderIssue { | ||
UNHANDLED = 0, | ||
@@ -6,3 +6,2 @@ GENERAL_REVERT = 1, | ||
SIGNATURE_FAILED = 9001, | ||
INVALID_MAKER_ID = 8000, | ||
ZERO_ADDRESS = 1001, | ||
@@ -30,6 +29,6 @@ INVALID_NFT = 1002, | ||
} | ||
export declare class ConnectorError extends Error { | ||
readonly issue: ConnectorIssue; | ||
export declare class GenericProviderError extends Error { | ||
readonly issue: GenericProviderIssue; | ||
readonly original: any; | ||
constructor(issue: ConnectorIssue, original?: any); | ||
constructor(issue: GenericProviderIssue, original?: any); | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var ConnectorIssue; | ||
(function (ConnectorIssue) { | ||
ConnectorIssue[ConnectorIssue["UNHANDLED"] = 0] = "UNHANDLED"; | ||
ConnectorIssue[ConnectorIssue["GENERAL_REVERT"] = 1] = "GENERAL_REVERT"; | ||
ConnectorIssue[ConnectorIssue["SIGNATURE_UNKNOWN"] = 9000] = "SIGNATURE_UNKNOWN"; | ||
ConnectorIssue[ConnectorIssue["SIGNATURE_FAILED"] = 9001] = "SIGNATURE_FAILED"; | ||
ConnectorIssue[ConnectorIssue["INVALID_MAKER_ID"] = 8000] = "INVALID_MAKER_ID"; | ||
ConnectorIssue[ConnectorIssue["ZERO_ADDRESS"] = 1001] = "ZERO_ADDRESS"; | ||
ConnectorIssue[ConnectorIssue["INVALID_NFT"] = 1002] = "INVALID_NFT"; | ||
ConnectorIssue[ConnectorIssue["NOT_AUTHORIZED"] = 1003] = "NOT_AUTHORIZED"; | ||
ConnectorIssue[ConnectorIssue["RECEIVER_DOES_NOT_SUPPORT_NFT"] = 1004] = "RECEIVER_DOES_NOT_SUPPORT_NFT"; | ||
ConnectorIssue[ConnectorIssue["NFT_ALREADY_EXISTS"] = 1005] = "NFT_ALREADY_EXISTS"; | ||
ConnectorIssue[ConnectorIssue["INVALID_INDEX"] = 1006] = "INVALID_INDEX"; | ||
ConnectorIssue[ConnectorIssue["TRANSFERS_PAUSED"] = 1007] = "TRANSFERS_PAUSED"; | ||
ConnectorIssue[ConnectorIssue["COIN_TRANSFER_FAILED"] = 1008] = "COIN_TRANSFER_FAILED"; | ||
ConnectorIssue[ConnectorIssue["INVALID_SIGNATURE_KIND"] = 1009] = "INVALID_SIGNATURE_KIND"; | ||
ConnectorIssue[ConnectorIssue["INVALID_PROXY"] = 1010] = "INVALID_PROXY"; | ||
ConnectorIssue[ConnectorIssue["YOU_ARE_NOT_THE_TAKER"] = 1011] = "YOU_ARE_NOT_THE_TAKER"; | ||
ConnectorIssue[ConnectorIssue["SENDER_NOT_TAKER_OR_MAKER"] = 1012] = "SENDER_NOT_TAKER_OR_MAKER"; | ||
ConnectorIssue[ConnectorIssue["ORDER_EXPIRED"] = 1013] = "ORDER_EXPIRED"; | ||
ConnectorIssue[ConnectorIssue["INVALID_SIGNATURE"] = 1014] = "INVALID_SIGNATURE"; | ||
ConnectorIssue[ConnectorIssue["ORDER_CANCELED"] = 1015] = "ORDER_CANCELED"; | ||
ConnectorIssue[ConnectorIssue["ORDER_CANNOT_BE_PERFORMED_TWICE"] = 1016] = "ORDER_CANNOT_BE_PERFORMED_TWICE"; | ||
ConnectorIssue[ConnectorIssue["YOU_ARE_NOT_THE_MAKER"] = 1017] = "YOU_ARE_NOT_THE_MAKER"; | ||
ConnectorIssue[ConnectorIssue["SIGNER_NOT_AUTHORIZED"] = 1018] = "SIGNER_NOT_AUTHORIZED"; | ||
ConnectorIssue[ConnectorIssue["ONE_ZERO_ABILITY_HAS_TO_EXIST"] = 1019] = "ONE_ZERO_ABILITY_HAS_TO_EXIST"; | ||
ConnectorIssue[ConnectorIssue["TRANSATION_RESPONSE_ERROR_CHECK_PENDING_TRANSACTIONS"] = 2001] = "TRANSATION_RESPONSE_ERROR_CHECK_PENDING_TRANSACTIONS"; | ||
ConnectorIssue[ConnectorIssue["INVALID_ADDRESS"] = 2002] = "INVALID_ADDRESS"; | ||
})(ConnectorIssue = exports.ConnectorIssue || (exports.ConnectorIssue = {})); | ||
class ConnectorError extends Error { | ||
var GenericProviderIssue; | ||
(function (GenericProviderIssue) { | ||
GenericProviderIssue[GenericProviderIssue["UNHANDLED"] = 0] = "UNHANDLED"; | ||
GenericProviderIssue[GenericProviderIssue["GENERAL_REVERT"] = 1] = "GENERAL_REVERT"; | ||
GenericProviderIssue[GenericProviderIssue["SIGNATURE_UNKNOWN"] = 9000] = "SIGNATURE_UNKNOWN"; | ||
GenericProviderIssue[GenericProviderIssue["SIGNATURE_FAILED"] = 9001] = "SIGNATURE_FAILED"; | ||
GenericProviderIssue[GenericProviderIssue["ZERO_ADDRESS"] = 1001] = "ZERO_ADDRESS"; | ||
GenericProviderIssue[GenericProviderIssue["INVALID_NFT"] = 1002] = "INVALID_NFT"; | ||
GenericProviderIssue[GenericProviderIssue["NOT_AUTHORIZED"] = 1003] = "NOT_AUTHORIZED"; | ||
GenericProviderIssue[GenericProviderIssue["RECEIVER_DOES_NOT_SUPPORT_NFT"] = 1004] = "RECEIVER_DOES_NOT_SUPPORT_NFT"; | ||
GenericProviderIssue[GenericProviderIssue["NFT_ALREADY_EXISTS"] = 1005] = "NFT_ALREADY_EXISTS"; | ||
GenericProviderIssue[GenericProviderIssue["INVALID_INDEX"] = 1006] = "INVALID_INDEX"; | ||
GenericProviderIssue[GenericProviderIssue["TRANSFERS_PAUSED"] = 1007] = "TRANSFERS_PAUSED"; | ||
GenericProviderIssue[GenericProviderIssue["COIN_TRANSFER_FAILED"] = 1008] = "COIN_TRANSFER_FAILED"; | ||
GenericProviderIssue[GenericProviderIssue["INVALID_SIGNATURE_KIND"] = 1009] = "INVALID_SIGNATURE_KIND"; | ||
GenericProviderIssue[GenericProviderIssue["INVALID_PROXY"] = 1010] = "INVALID_PROXY"; | ||
GenericProviderIssue[GenericProviderIssue["YOU_ARE_NOT_THE_TAKER"] = 1011] = "YOU_ARE_NOT_THE_TAKER"; | ||
GenericProviderIssue[GenericProviderIssue["SENDER_NOT_TAKER_OR_MAKER"] = 1012] = "SENDER_NOT_TAKER_OR_MAKER"; | ||
GenericProviderIssue[GenericProviderIssue["ORDER_EXPIRED"] = 1013] = "ORDER_EXPIRED"; | ||
GenericProviderIssue[GenericProviderIssue["INVALID_SIGNATURE"] = 1014] = "INVALID_SIGNATURE"; | ||
GenericProviderIssue[GenericProviderIssue["ORDER_CANCELED"] = 1015] = "ORDER_CANCELED"; | ||
GenericProviderIssue[GenericProviderIssue["ORDER_CANNOT_BE_PERFORMED_TWICE"] = 1016] = "ORDER_CANNOT_BE_PERFORMED_TWICE"; | ||
GenericProviderIssue[GenericProviderIssue["YOU_ARE_NOT_THE_MAKER"] = 1017] = "YOU_ARE_NOT_THE_MAKER"; | ||
GenericProviderIssue[GenericProviderIssue["SIGNER_NOT_AUTHORIZED"] = 1018] = "SIGNER_NOT_AUTHORIZED"; | ||
GenericProviderIssue[GenericProviderIssue["ONE_ZERO_ABILITY_HAS_TO_EXIST"] = 1019] = "ONE_ZERO_ABILITY_HAS_TO_EXIST"; | ||
GenericProviderIssue[GenericProviderIssue["TRANSATION_RESPONSE_ERROR_CHECK_PENDING_TRANSACTIONS"] = 2001] = "TRANSATION_RESPONSE_ERROR_CHECK_PENDING_TRANSACTIONS"; | ||
GenericProviderIssue[GenericProviderIssue["INVALID_ADDRESS"] = 2002] = "INVALID_ADDRESS"; | ||
})(GenericProviderIssue = exports.GenericProviderIssue || (exports.GenericProviderIssue = {})); | ||
class GenericProviderError extends Error { | ||
constructor(issue, original) { | ||
super(); | ||
this.name = 'ConnectorError'; | ||
this.name = 'GenericProviderError'; | ||
this.issue = issue; | ||
this.original = original; | ||
this.message = `Connector error [issue: ${issue}]`; | ||
this.message = `GenericProvider error [issue: ${issue}]`; | ||
if (Error.captureStackTrace) { | ||
@@ -44,3 +43,3 @@ Error.captureStackTrace(this, this.constructor); | ||
} | ||
exports.ConnectorError = ConnectorError; | ||
exports.GenericProviderError = GenericProviderError; | ||
//# sourceMappingURL=errors.js.map |
export * from './assets/metadata'; | ||
export * from './core/connector'; | ||
export * from './core/provider'; | ||
export * from './core/asset-ledger'; | ||
export * from './core/context'; | ||
export * from './core/errors'; | ||
export * from './core/order-exchange'; | ||
export * from './core/order-gateway'; | ||
export * from './core/order'; | ||
export * from './core/value-ledger'; |
{ | ||
"files": {}, | ||
"files": { | ||
"packages/0xcert-scaffold/CHANGELOG.json": "62d2cdf768eba0f4276537b3c5ba44293225dc54", | ||
"packages/0xcert-scaffold/CHANGELOG.md": "f5c88ae691b250b1d2767a5d9c2cfbd86d128f95", | ||
"packages/0xcert-scaffold/nodemon.json": "82b893373db9861f1df4b55d8ea68a5d37b118de", | ||
"packages/0xcert-scaffold/package.json": "264b7f7c0f7b0b9702d2264109d5f50e5290b4f5", | ||
"packages/0xcert-scaffold/src/assets/metadata.ts": "1bd04e0ee8b5ab49edbd1c2ba23398b321ed0800", | ||
"packages/0xcert-scaffold/src/core/asset-ledger.ts": "ef22dec2e330785ee7140cbd3ea2c34a7c63028a", | ||
"packages/0xcert-scaffold/src/core/context.ts": "ae4f2fd2d87dc0caee1c0fe3fd0f4ddffda524f9", | ||
"packages/0xcert-scaffold/src/core/errors.ts": "c33c7d32f1da7b3273102fdd78197447ce48ed85", | ||
"packages/0xcert-scaffold/src/core/order-gateway.ts": "07782ece6576ad63debdc273763c16a30dde9b5d", | ||
"packages/0xcert-scaffold/src/core/order.ts": "f0de6eb366c8334c04974b5e7331de06ebc8dd7b", | ||
"packages/0xcert-scaffold/src/core/provider.ts": "c1a4226753a88c193cfa822de0b75d18006e20ba", | ||
"packages/0xcert-scaffold/src/core/value-ledger.ts": "b2c258fb806a2bcbbc674408941fd5ec86f1a6ff", | ||
"packages/0xcert-scaffold/src/index.ts": "e95b3d5e364766c56db328228c2ef23429fe877f", | ||
"packages/0xcert-scaffold/src/tests/.keep": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", | ||
"packages/0xcert-scaffold/tsconfig.json": "99f0fa2e7cf44aa40828236230bc6f15d8648bc6", | ||
"common/config/rush/npm-shrinkwrap.json": "9dea1ec1c34d5bcf4df825f8250513472c8f14f2" | ||
}, | ||
"arguments": "npx hayspec test " | ||
} |
{ | ||
"name": "@0xcert/scaffold", | ||
"version": "0.0.0-alpha1", | ||
"version": "0.0.0-alpha3", | ||
"description": "0xcert protocol scaffold.", | ||
@@ -8,3 +8,4 @@ "main": "./dist/index.js", | ||
"scripts": { | ||
"build": "npx tsc", | ||
"clean": "rm -Rf ./dist", | ||
"build": "npm run clean && npx tsc", | ||
"test": "npx hayspec test" | ||
@@ -11,0 +12,0 @@ }, |
@@ -6,4 +6,2 @@ /** | ||
myId: string; | ||
attach(): Promise<this>; | ||
detach(): Promise<this>; | ||
sign(data: string): Promise<string>; | ||
@@ -10,0 +8,0 @@ } |
/** | ||
* Error codes. | ||
*/ | ||
export enum ConnectorIssue { | ||
export enum GenericProviderIssue { | ||
UNHANDLED = 0, | ||
@@ -9,3 +9,2 @@ GENERAL_REVERT = 1, | ||
SIGNATURE_FAILED = 9001, | ||
INVALID_MAKER_ID = 8000, | ||
ZERO_ADDRESS = 1001, | ||
@@ -38,4 +37,4 @@ INVALID_NFT = 1002, | ||
*/ | ||
export class ConnectorError extends Error { | ||
readonly issue: ConnectorIssue; | ||
export class GenericProviderError extends Error { | ||
readonly issue: GenericProviderIssue; | ||
readonly original: any; | ||
@@ -48,9 +47,9 @@ | ||
*/ | ||
constructor(issue: ConnectorIssue, original?: any) { | ||
constructor(issue: GenericProviderIssue, original?: any) { | ||
super(); | ||
this.name = 'ConnectorError'; | ||
this.name = 'GenericProviderError'; | ||
this.issue = issue; | ||
this.original = original; | ||
this.message = `Connector error [issue: ${issue}]`; | ||
this.message = `GenericProvider error [issue: ${issue}]`; | ||
@@ -57,0 +56,0 @@ if (Error.captureStackTrace) { |
export * from './assets/metadata'; | ||
export * from './core/connector'; | ||
export * from './core/provider'; | ||
export * from './core/asset-ledger'; | ||
export * from './core/context'; | ||
export * from './core/errors'; | ||
export * from './core/order-exchange'; | ||
export * from './core/order-gateway'; | ||
export * from './core/order'; | ||
export * from './core/value-ledger'; |
Sorry, the diff of this file is not supported yet
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
21853
44
535