@rarible/types
Advanced tools
Comparing version 0.9.6 to 0.10.0-alpha.0
@@ -1,4 +0,4 @@ | ||
export declare type ActivityId = string & { | ||
export type ActivityId = string & { | ||
"__IS_ACTIVITY_ID__": true; | ||
}; | ||
export declare function toActivityId(value: string): ActivityId; |
@@ -1,2 +0,2 @@ | ||
export declare type Address = string & { | ||
export type Address = string & { | ||
"__IS_ADDRESS__": true; | ||
@@ -3,0 +3,0 @@ }; |
@@ -15,6 +15,6 @@ "use strict"; | ||
if (re.test(hex)) { | ||
return "0x" + hex; | ||
return "0x".concat(hex); | ||
} | ||
else { | ||
throw new Error("not an address: " + value); | ||
throw new Error("not an address: ".concat(value)); | ||
} | ||
@@ -21,0 +21,0 @@ } |
@@ -1,4 +0,4 @@ | ||
export declare type AuctionId = string & { | ||
export type AuctionId = string & { | ||
"__IS_AUCTION_ID__": true; | ||
}; | ||
export declare function toAuctionId(value: string): AuctionId; |
@@ -7,3 +7,3 @@ "use strict"; | ||
if (!(0, blockchains_1.isRealBlockchainSpecified)(value)) { | ||
throw new Error("Not an AuctionId: " + value); | ||
throw new Error("Not an AuctionId: ".concat(value)); | ||
} | ||
@@ -10,0 +10,0 @@ return value; |
@@ -1,2 +0,2 @@ | ||
export declare type BigNumber = string & { | ||
export type BigNumber = string & { | ||
"__IS_BIG_NUMBER__": true; | ||
@@ -3,0 +3,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
export declare type Binary = string & { | ||
export type Binary = string & { | ||
"__IS_BINARY__": true; | ||
@@ -3,0 +3,0 @@ }; |
@@ -14,12 +14,12 @@ "use strict"; | ||
if (re.test(hex)) { | ||
return "0x" + hex; | ||
return "0x".concat(hex); | ||
} | ||
throw new Error("not a binary: " + value); | ||
throw new Error("not a binary: ".concat(value)); | ||
} | ||
exports.toBinary = toBinary; | ||
function randomBinary(size) { | ||
return "0x" + Array.from(new Array(size * 2)) | ||
return "0x".concat(Array.from(new Array(size * 2)) | ||
.map(function () { return Math.floor(Math.random() * 16).toString(16); }) | ||
.join(""); | ||
.join("")); | ||
} | ||
exports.randomBinary = randomBinary; |
@@ -21,3 +21,3 @@ "use strict"; | ||
var blockchain = blockchains_1[_i]; | ||
if (value.startsWith(blockchain + ":")) { | ||
if (value.startsWith("".concat(blockchain, ":"))) { | ||
return true; | ||
@@ -32,3 +32,3 @@ } | ||
var blockchain = realBlockchains_1[_i]; | ||
if (value.startsWith(blockchain + ":")) { | ||
if (value.startsWith("".concat(blockchain, ":"))) { | ||
return true; | ||
@@ -35,0 +35,0 @@ } |
@@ -1,4 +0,4 @@ | ||
export declare type CollectionId = string & { | ||
export type CollectionId = string & { | ||
"__IS_COLLECTION_ID__": true; | ||
}; | ||
export declare function toCollectionId(value: string): CollectionId; |
@@ -7,3 +7,3 @@ "use strict"; | ||
if (!(0, blockchains_1.isRealBlockchainSpecified)(value)) { | ||
throw new Error("Not an CurrencyId: " + value); | ||
throw new Error("Not an CurrencyId: ".concat(value)); | ||
} | ||
@@ -10,0 +10,0 @@ return value; |
@@ -1,4 +0,4 @@ | ||
export declare type ContractAddress = string & { | ||
export type ContractAddress = string & { | ||
"__IS_CONTRACT_ADDRESS__": true; | ||
}; | ||
export declare function toContractAddress(value: string): ContractAddress; |
@@ -7,3 +7,3 @@ "use strict"; | ||
if (!(0, blockchains_1.isRealBlockchainSpecified)(value)) { | ||
throw new Error("Not a ContractAddress: " + value); | ||
throw new Error("Not a ContractAddress: ".concat(value)); | ||
} | ||
@@ -10,0 +10,0 @@ return value; |
@@ -1,4 +0,4 @@ | ||
export declare type CurrencyId = string & { | ||
export type CurrencyId = string & { | ||
"__IS_CURRENCY_ID__": true; | ||
}; | ||
export declare function toCurrencyId(value: string): CurrencyId; |
@@ -7,3 +7,3 @@ "use strict"; | ||
if (!(0, blockchains_1.isRealBlockchainSpecified)(value)) { | ||
throw new Error("Not an CurrencyId: " + value); | ||
throw new Error("Not an CurrencyId: ".concat(value)); | ||
} | ||
@@ -10,0 +10,0 @@ return value; |
@@ -1,2 +0,2 @@ | ||
export declare type FlowAddress = string & { | ||
export type FlowAddress = string & { | ||
"__IS_FLOW_ADDRESS__": true; | ||
@@ -3,0 +3,0 @@ }; |
@@ -15,6 +15,6 @@ "use strict"; | ||
if (re.test(hex)) { | ||
return "0x" + hex; | ||
return "0x".concat(hex); | ||
} | ||
else { | ||
throw new Error("not an flow address: " + value); | ||
throw new Error("not an flow address: ".concat(value)); | ||
} | ||
@@ -21,0 +21,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare type FlowContractAddress = string & { | ||
export type FlowContractAddress = string & { | ||
__IS_FLOW_CONTRACT_ADDRESS__: true; | ||
@@ -3,0 +3,0 @@ }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
(0, tslib_1.__exportStar)(require("./address"), exports); | ||
(0, tslib_1.__exportStar)(require("./word"), exports); | ||
(0, tslib_1.__exportStar)(require("./binary"), exports); | ||
(0, tslib_1.__exportStar)(require("./big-number"), exports); | ||
(0, tslib_1.__exportStar)(require("./activity-id"), exports); | ||
(0, tslib_1.__exportStar)(require("./item-id"), exports); | ||
(0, tslib_1.__exportStar)(require("./order-id"), exports); | ||
(0, tslib_1.__exportStar)(require("./auction-id"), exports); | ||
(0, tslib_1.__exportStar)(require("./ownership-id"), exports); | ||
(0, tslib_1.__exportStar)(require("./flow-address"), exports); | ||
(0, tslib_1.__exportStar)(require("./flow-contract-address"), exports); | ||
(0, tslib_1.__exportStar)(require("./union-address"), exports); | ||
(0, tslib_1.__exportStar)(require("./contract-address"), exports); | ||
(0, tslib_1.__exportStar)(require("./currency-id"), exports); | ||
(0, tslib_1.__exportStar)(require("./collection-id"), exports); | ||
(0, tslib_1.__exportStar)(require("./maybe"), exports); | ||
tslib_1.__exportStar(require("./address"), exports); | ||
tslib_1.__exportStar(require("./word"), exports); | ||
tslib_1.__exportStar(require("./binary"), exports); | ||
tslib_1.__exportStar(require("./big-number"), exports); | ||
tslib_1.__exportStar(require("./activity-id"), exports); | ||
tslib_1.__exportStar(require("./item-id"), exports); | ||
tslib_1.__exportStar(require("./order-id"), exports); | ||
tslib_1.__exportStar(require("./auction-id"), exports); | ||
tslib_1.__exportStar(require("./ownership-id"), exports); | ||
tslib_1.__exportStar(require("./flow-address"), exports); | ||
tslib_1.__exportStar(require("./flow-contract-address"), exports); | ||
tslib_1.__exportStar(require("./union-address"), exports); | ||
tslib_1.__exportStar(require("./contract-address"), exports); | ||
tslib_1.__exportStar(require("./currency-id"), exports); | ||
tslib_1.__exportStar(require("./collection-id"), exports); | ||
tslib_1.__exportStar(require("./maybe"), exports); |
@@ -1,4 +0,4 @@ | ||
export declare type ItemId = string & { | ||
export type ItemId = string & { | ||
"__IS_ITEM_ID__": true; | ||
}; | ||
export declare function toItemId(value: string): ItemId; |
@@ -7,3 +7,3 @@ "use strict"; | ||
if (!(0, blockchains_1.isRealBlockchainSpecified)(value)) { | ||
throw new Error("Not an ItemId: " + value); | ||
throw new Error("Not an ItemId: ".concat(value)); | ||
} | ||
@@ -10,0 +10,0 @@ return value; |
@@ -1,1 +0,1 @@ | ||
export declare type Maybe<T> = T | undefined; | ||
export type Maybe<T> = T | undefined; |
@@ -1,4 +0,4 @@ | ||
export declare type OrderId = string & { | ||
export type OrderId = string & { | ||
"__IS_ORDER_ID__": true; | ||
}; | ||
export declare function toOrderId(value: string): OrderId; |
@@ -7,3 +7,3 @@ "use strict"; | ||
if (!(0, blockchains_1.isRealBlockchainSpecified)(value)) { | ||
throw new Error("Not an OrderId: " + value); | ||
throw new Error("Not an OrderId: ".concat(value)); | ||
} | ||
@@ -10,0 +10,0 @@ return value; |
@@ -1,4 +0,4 @@ | ||
export declare type OwnershipId = string & { | ||
export type OwnershipId = string & { | ||
"__IS_OWNERSHIP_ID__": true; | ||
}; | ||
export declare function toOwnershipId(value: string): OwnershipId; |
@@ -7,3 +7,3 @@ "use strict"; | ||
if (!(0, blockchains_1.isRealBlockchainSpecified)(value)) { | ||
throw new Error("Not an OwnershipId: " + value); | ||
throw new Error("Not an OwnershipId: ".concat(value)); | ||
} | ||
@@ -10,0 +10,0 @@ return value; |
@@ -1,4 +0,4 @@ | ||
export declare type UnionAddress = string & { | ||
export type UnionAddress = string & { | ||
"__IS_UNION_ADDRESS__": true; | ||
}; | ||
export declare function toUnionAddress(value: string): UnionAddress; |
@@ -7,3 +7,3 @@ "use strict"; | ||
if (!(0, blockchains_1.isBlockchainSpecified)(value)) { | ||
throw new Error("Not a UnionAddress: " + value); | ||
throw new Error("Not a UnionAddress: ".concat(value)); | ||
} | ||
@@ -10,0 +10,0 @@ return value; |
@@ -1,2 +0,2 @@ | ||
export declare type Word = string & { | ||
export type Word = string & { | ||
"__IS_WORD__": true; | ||
@@ -3,0 +3,0 @@ }; |
@@ -15,6 +15,6 @@ "use strict"; | ||
if (re.test(hex)) { | ||
return "0x" + hex; | ||
return "0x".concat(hex); | ||
} | ||
else { | ||
throw new Error("not a word: " + value); | ||
throw new Error("not a word: ".concat(value)); | ||
} | ||
@@ -21,0 +21,0 @@ } |
{ | ||
"name": "@rarible/types", | ||
"version": "0.9.6", | ||
"version": "0.10.0-alpha.0", | ||
"keywords": [ | ||
@@ -25,8 +25,2 @@ "rarible", | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^27.0.2", | ||
"jest": "^27.3.1", | ||
"ts-jest": "^27.0.7", | ||
"typescript": "^4.4.4" | ||
}, | ||
"peerDependencies": { | ||
@@ -39,3 +33,3 @@ "tslib": "^2.3.1" | ||
}, | ||
"gitHead": "3d5b61601d9e766d54990d211dd482fd607b26fc" | ||
"gitHead": "cf8991ba75fcbd09c8a423cc1ddeab172348fd49" | ||
} |
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
44210
0