@dcspark/carp-client
Advanced tools
Comparing version 2.3.1 to 2.4.0
{ | ||
"name": "@dcspark/carp-client", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"description": "Web client for the Carp server", | ||
@@ -5,0 +5,0 @@ "main": "app/index.js", |
@@ -25,2 +25,6 @@ export declare const ADDRESS_LIMIT: { | ||
}; | ||
export declare const PROJECTED_NFT_LIMIT: { | ||
SLOT_RANGE: number; | ||
SINGLE_USER_SLOT_RANGE: number; | ||
}; | ||
export declare const POOL_DELEGATION_LIMIT: { | ||
@@ -30,1 +34,4 @@ POOLS: number; | ||
}; | ||
export declare const ASSET_UTXOS_LIMIT: { | ||
ASSETS: number; | ||
}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.POOL_DELEGATION_LIMIT = exports.DEX_PRICE_LIMIT = exports.BLOCK_LIMIT = exports.CREDENTIAL_LIMIT = exports.ASSET_LIMIT = exports.UTXO_LIMIT = exports.ADDRESS_LIMIT = void 0; | ||
exports.ASSET_UTXOS_LIMIT = exports.POOL_DELEGATION_LIMIT = exports.PROJECTED_NFT_LIMIT = exports.DEX_PRICE_LIMIT = exports.BLOCK_LIMIT = exports.CREDENTIAL_LIMIT = exports.ASSET_LIMIT = exports.UTXO_LIMIT = exports.ADDRESS_LIMIT = void 0; | ||
// TODO: make these a mapping from out to object instead of standalone structs | ||
@@ -29,5 +29,12 @@ exports.ADDRESS_LIMIT = { | ||
}; | ||
exports.PROJECTED_NFT_LIMIT = { | ||
SLOT_RANGE: 100000, | ||
SINGLE_USER_SLOT_RANGE: 10000000000, | ||
}; | ||
exports.POOL_DELEGATION_LIMIT = { | ||
POOLS: 50, | ||
SLOT_RANGE: 200, | ||
SLOT_RANGE: 10000, | ||
}; | ||
exports.ASSET_UTXOS_LIMIT = { | ||
ASSETS: 50, | ||
}; |
@@ -14,3 +14,4 @@ export declare enum ErrorCodes { | ||
PoolsLimitExceeded = 11, | ||
SlotRangeLimitExceeded = 12 | ||
SlotRangeLimitExceeded = 12, | ||
AssetsLimitExceeded = 12 | ||
} | ||
@@ -120,2 +121,10 @@ export declare type ErrorShape = { | ||
}; | ||
readonly AssetsLimitExceeded: { | ||
readonly code: ErrorCodes.AssetLimitExceeded; | ||
readonly prefix: "Exceeded request native assets limit."; | ||
readonly detailsGen: (details: { | ||
limit: number; | ||
found: number; | ||
}) => string; | ||
}; | ||
}; | ||
@@ -122,0 +131,0 @@ export declare function genErrorMessage<T extends typeof Errors[keyof typeof Errors]>(type: T, details: Parameters<T["detailsGen"]>[0]): { |
@@ -21,2 +21,3 @@ "use strict"; | ||
ErrorCodes[ErrorCodes["SlotRangeLimitExceeded"] = 12] = "SlotRangeLimitExceeded"; | ||
ErrorCodes[ErrorCodes["AssetsLimitExceeded"] = 12] = "AssetsLimitExceeded"; | ||
})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {})); | ||
@@ -89,2 +90,7 @@ exports.Errors = { | ||
}, | ||
AssetsLimitExceeded: { | ||
code: ErrorCodes.AssetLimitExceeded, | ||
prefix: "Exceeded request native assets limit.", | ||
detailsGen: (details) => `Limit of ${details.limit}, found ${details.found}`, | ||
}, | ||
}; | ||
@@ -91,0 +97,0 @@ function genErrorMessage(type, details) { |
@@ -19,3 +19,10 @@ export declare type ProjectedNftRangeRequest = { | ||
}; | ||
address: string | undefined; | ||
}; | ||
export declare enum ProjectedNftStatus { | ||
Lock = "Lock", | ||
Unlocking = "Unlocking", | ||
Claim = "Claim", | ||
Invalid = "Invalid" | ||
} | ||
export declare type ProjectedNftRangeResponse = { | ||
@@ -64,9 +71,16 @@ /** | ||
/** | ||
* Asset that relates to Projected NFT event. Consists of 2 parts: PolicyId and AssetName | ||
* Asset policy id that relates to Projected NFT event | ||
* | ||
* @pattern [0-9a-fA-F]+.[0-9a-fA-F]+ | ||
* @example "96f7dc9749ede0140f042516f4b723d7261610d6b12ccb19f3475278.415045" | ||
* @pattern [0-9a-fA-F]{56} | ||
* @example "96f7dc9749ede0140f042516f4b723d7261610d6b12ccb19f3475278" | ||
*/ | ||
asset: string; | ||
policyId: string; | ||
/** | ||
* Asset name that relates to Projected NFT event | ||
* | ||
* @pattern ([0-9a-fA-F]{2}){0,32} | ||
* @example "415045" | ||
*/ | ||
assetName: string; | ||
/** | ||
* Number of assets of `asset` type used in this Projected NFT event. | ||
@@ -82,3 +96,3 @@ * | ||
*/ | ||
status: string | null; | ||
status: ProjectedNftStatus | null; | ||
/** | ||
@@ -85,0 +99,0 @@ * Projected NFT datum: serialized state of the Projected NFT |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ProjectedNftStatus = void 0; | ||
var ProjectedNftStatus; | ||
(function (ProjectedNftStatus) { | ||
ProjectedNftStatus["Lock"] = "Lock"; | ||
ProjectedNftStatus["Unlocking"] = "Unlocking"; | ||
ProjectedNftStatus["Claim"] = "Claim"; | ||
ProjectedNftStatus["Invalid"] = "Invalid"; | ||
})(ProjectedNftStatus = exports.ProjectedNftStatus || (exports.ProjectedNftStatus = {})); | ||
; |
@@ -13,2 +13,3 @@ import type { AddressUsedRequest, AddressUsedResponse } from "./models/AddressUsed"; | ||
import type { ProjectedNftRangeRequest, ProjectedNftRangeResponse } from "./models/ProjectedNftRange"; | ||
import { AssetUtxosRequest, AssetUtxosResponse } from "./models/AssetUtxos"; | ||
export declare enum Routes { | ||
@@ -26,3 +27,4 @@ transactionHistory = "transaction/history", | ||
delegationForPool = "delegation/pool", | ||
projectedNftEventsRange = "projected-nft/range" | ||
projectedNftEventsRange = "projected-nft/range", | ||
assetUtxos = "asset/utxos" | ||
} | ||
@@ -90,2 +92,7 @@ export declare type EndpointTypes = { | ||
}; | ||
[Routes.assetUtxos]: { | ||
name: typeof Routes.assetUtxos; | ||
input: AssetUtxosRequest; | ||
response: AssetUtxosResponse; | ||
}; | ||
}; |
@@ -18,2 +18,3 @@ "use strict"; | ||
Routes["projectedNftEventsRange"] = "projected-nft/range"; | ||
Routes["assetUtxos"] = "asset/utxos"; | ||
})(Routes = exports.Routes || (exports.Routes = {})); |
46716
44
1197