@0xsequence/metadata
Advanced tools
Comparing version 1.10.0 to 1.10.1
@@ -21,3 +21,3 @@ 'use strict'; | ||
/* eslint-disable */ | ||
// sequence-metadata v0.4.0 594e38ba9f35eba08aac88087660d5f424b6dbda | ||
// sequence-metadata v0.4.0 16b30ae85e42fc4c25342f7c43e04d7070597f21 | ||
// -- | ||
@@ -35,3 +35,3 @@ // Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT. | ||
// Schema hash generated from your RIDL schema | ||
const WebRPCSchemaHash = '594e38ba9f35eba08aac88087660d5f424b6dbda'; | ||
const WebRPCSchemaHash = '16b30ae85e42fc4c25342f7c43e04d7070597f21'; | ||
@@ -317,7 +317,8 @@ // | ||
}; | ||
this.addContractsToTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.searchTokens = (args, headers, signal) => { | ||
return this.fetch(this.url('SearchTokens'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
tokenMetadata: _data.tokenMetadata, | ||
nextPage: _data.nextPage | ||
}; | ||
@@ -331,7 +332,8 @@ }); | ||
}; | ||
this.removeContractsFromTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractsFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.searchContracts = (args, headers, signal) => { | ||
return this.fetch(this.url('SearchContracts'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
contractInfo: _data.contractInfo, | ||
nextPage: _data.nextPage | ||
}; | ||
@@ -345,7 +347,7 @@ }); | ||
}; | ||
this.modifyFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('ModifyFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.getNiftyswapTokenQuantity = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
quantity: _data.quantity | ||
}; | ||
@@ -359,7 +361,7 @@ }); | ||
}; | ||
this.getFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('GetFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.getNiftyswapUnitPrices = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
featured: _data.featured | ||
prices: _data.prices | ||
}; | ||
@@ -373,8 +375,7 @@ }); | ||
}; | ||
this.listTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('ListTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.getNiftyswapUnitPricesWithQuantities = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
page: _data.page, | ||
contracts: _data.contracts | ||
prices: _data.prices | ||
}; | ||
@@ -388,7 +389,7 @@ }); | ||
}; | ||
this.getNiftyswapTokenQuantity = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.addContractToMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractToMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
quantity: _data.quantity | ||
ok: _data.ok | ||
}; | ||
@@ -402,7 +403,7 @@ }); | ||
}; | ||
this.getNiftyswapUnitPrices = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.removeContractFromMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractFromMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
prices: _data.prices | ||
ok: _data.ok | ||
}; | ||
@@ -416,7 +417,7 @@ }); | ||
}; | ||
this.getNiftyswapUnitPricesWithQuantities = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.mintMonitorJobStatus = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorJobStatus'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
prices: _data.prices | ||
task: _data.task | ||
}; | ||
@@ -430,4 +431,4 @@ }); | ||
}; | ||
this.addContractToMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractToMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.mintMonitorTriggerJob = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorTriggerJob'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
@@ -444,6 +445,19 @@ return { | ||
}; | ||
this.removeContractFromMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractFromMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.syncContractTokens = (args, headers, signal) => { | ||
return this.fetch(this.url('SyncContractTokens'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
taskID: _data.taskID | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.abortContractSync = (args, headers, signal) => { | ||
return this.fetch(this.url('AbortContractSync'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
@@ -458,7 +472,8 @@ }; | ||
}; | ||
this.mintMonitorJobStatus = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorJobStatus'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.contractSyncJobStatus = (args, headers, signal) => { | ||
return this.fetch(this.url('ContractSyncJobStatus'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
task: _data.task | ||
refreshTask: _data.refreshTask, | ||
syncTask: _data.syncTask | ||
}; | ||
@@ -472,7 +487,7 @@ }); | ||
}; | ||
this.mintMonitorTriggerJob = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorTriggerJob'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.directoryGetNetworks = (args, headers, signal) => { | ||
return this.fetch(this.url('DirectoryGetNetworks'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
networks: _data.networks | ||
}; | ||
@@ -486,2 +501,30 @@ }); | ||
}; | ||
this.directoryGetCollections = (args, headers, signal) => { | ||
return this.fetch(this.url('DirectoryGetCollections'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
collections: _data.collections, | ||
page: _data.page | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.directorySearchCollections = (args, headers, signal) => { | ||
return this.fetch(this.url('DirectorySearchCollections'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
collections: _data.collections, | ||
page: _data.page | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.hostname = hostname; | ||
@@ -731,2 +774,80 @@ this.fetch = (input, init) => fetch(input, init); | ||
} | ||
class Admin { | ||
constructor(hostname, fetch) { | ||
this.hostname = void 0; | ||
this.fetch = void 0; | ||
this.path = '/rpc/Admin/'; | ||
this.addContractsToTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.removeContractsFromTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractsFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.modifyFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('ModifyFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.getFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('GetFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
featured: _data.featured | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.listTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('ListTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
page: _data.page, | ||
contracts: _data.contracts | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.hostname = hostname; | ||
this.fetch = (input, init) => fetch(input, init); | ||
} | ||
url(name) { | ||
return this.hostname + this.path + name; | ||
} | ||
} | ||
const createHTTPRequest = (body = {}, headers = {}, signal = null) => { | ||
@@ -899,2 +1020,8 @@ return { | ||
} | ||
class GeoblockedError extends WebrpcError { | ||
constructor(name = 'Geoblocked', code = 1006, message = 'Geoblocked region', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, GeoblockedError.prototype); | ||
} | ||
} | ||
class TimeoutError extends WebrpcError { | ||
@@ -918,2 +1045,20 @@ constructor(name = 'Timeout', code = 2000, message = 'Request timed out', status = 0, cause) { | ||
} | ||
class QueryFailedError extends WebrpcError { | ||
constructor(name = 'QueryFailed', code = 2003, message = 'Query failed', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, QueryFailedError.prototype); | ||
} | ||
} | ||
class ValidationFailedError extends WebrpcError { | ||
constructor(name = 'ValidationFailed', code = 2004, message = 'Validation failed', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, ValidationFailedError.prototype); | ||
} | ||
} | ||
class RateLimitedError extends WebrpcError { | ||
constructor(name = 'RateLimited', code = 2005, message = 'Rate limited', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, RateLimitedError.prototype); | ||
} | ||
} | ||
class NotFoundError extends WebrpcError { | ||
@@ -937,2 +1082,8 @@ constructor(name = 'NotFound', code = 3000, message = 'Resource not found', status = 0, cause) { | ||
} | ||
class TokenDirectoryDisabledError extends WebrpcError { | ||
constructor(name = 'TokenDirectoryDisabled', code = 4001, message = 'Token Directory is disabled', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, TokenDirectoryDisabledError.prototype); | ||
} | ||
} | ||
let errors = /*#__PURE__*/function (errors) { | ||
@@ -956,8 +1107,13 @@ errors["WebrpcEndpoint"] = "WebrpcEndpoint"; | ||
errors["Fail"] = "Fail"; | ||
errors["Geoblocked"] = "Geoblocked"; | ||
errors["Timeout"] = "Timeout"; | ||
errors["InvalidArgument"] = "InvalidArgument"; | ||
errors["RequiredArgument"] = "RequiredArgument"; | ||
errors["QueryFailed"] = "QueryFailed"; | ||
errors["ValidationFailed"] = "ValidationFailed"; | ||
errors["RateLimited"] = "RateLimited"; | ||
errors["NotFound"] = "NotFound"; | ||
errors["ProjectNotFound"] = "ProjectNotFound"; | ||
errors["ChainNotFound"] = "ChainNotFound"; | ||
errors["TokenDirectoryDisabled"] = "TokenDirectoryDisabled"; | ||
return errors; | ||
@@ -983,8 +1139,13 @@ }({}); | ||
[1005]: FailError, | ||
[1006]: GeoblockedError, | ||
[2000]: TimeoutError, | ||
[2001]: InvalidArgumentError, | ||
[2002]: RequiredArgumentError, | ||
[2003]: QueryFailedError, | ||
[2004]: ValidationFailedError, | ||
[2005]: RateLimitedError, | ||
[3000]: NotFoundError, | ||
[3002]: ProjectNotFoundError, | ||
[3003]: ChainNotFoundError | ||
[3003]: ChainNotFoundError, | ||
[4001]: TokenDirectoryDisabledError | ||
}; | ||
@@ -1042,2 +1203,3 @@ | ||
exports.Admin = Admin; | ||
exports.ChainNotFoundError = ChainNotFoundError; | ||
@@ -1047,2 +1209,3 @@ exports.Collections = Collections; | ||
exports.FailError = FailError; | ||
exports.GeoblockedError = GeoblockedError; | ||
exports.InvalidArgumentError = InvalidArgumentError; | ||
@@ -1055,2 +1218,4 @@ exports.Metadata = Metadata; | ||
exports.PropertyType = PropertyType; | ||
exports.QueryFailedError = QueryFailedError; | ||
exports.RateLimitedError = RateLimitedError; | ||
exports.RequestConflictError = RequestConflictError; | ||
@@ -1064,3 +1229,5 @@ exports.RequiredArgumentError = RequiredArgumentError; | ||
exports.TimeoutError = TimeoutError; | ||
exports.TokenDirectoryDisabledError = TokenDirectoryDisabledError; | ||
exports.UnauthorizedError = UnauthorizedError; | ||
exports.ValidationFailedError = ValidationFailedError; | ||
exports.WebRPCSchemaHash = WebRPCSchemaHash; | ||
@@ -1067,0 +1234,0 @@ exports.WebRPCSchemaVersion = WebRPCSchemaVersion; |
@@ -21,3 +21,3 @@ 'use strict'; | ||
/* eslint-disable */ | ||
// sequence-metadata v0.4.0 594e38ba9f35eba08aac88087660d5f424b6dbda | ||
// sequence-metadata v0.4.0 16b30ae85e42fc4c25342f7c43e04d7070597f21 | ||
// -- | ||
@@ -35,3 +35,3 @@ // Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT. | ||
// Schema hash generated from your RIDL schema | ||
const WebRPCSchemaHash = '594e38ba9f35eba08aac88087660d5f424b6dbda'; | ||
const WebRPCSchemaHash = '16b30ae85e42fc4c25342f7c43e04d7070597f21'; | ||
@@ -317,7 +317,8 @@ // | ||
}; | ||
this.addContractsToTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.searchTokens = (args, headers, signal) => { | ||
return this.fetch(this.url('SearchTokens'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
tokenMetadata: _data.tokenMetadata, | ||
nextPage: _data.nextPage | ||
}; | ||
@@ -331,7 +332,8 @@ }); | ||
}; | ||
this.removeContractsFromTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractsFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.searchContracts = (args, headers, signal) => { | ||
return this.fetch(this.url('SearchContracts'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
contractInfo: _data.contractInfo, | ||
nextPage: _data.nextPage | ||
}; | ||
@@ -345,7 +347,7 @@ }); | ||
}; | ||
this.modifyFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('ModifyFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.getNiftyswapTokenQuantity = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
quantity: _data.quantity | ||
}; | ||
@@ -359,7 +361,7 @@ }); | ||
}; | ||
this.getFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('GetFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.getNiftyswapUnitPrices = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
featured: _data.featured | ||
prices: _data.prices | ||
}; | ||
@@ -373,8 +375,7 @@ }); | ||
}; | ||
this.listTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('ListTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.getNiftyswapUnitPricesWithQuantities = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
page: _data.page, | ||
contracts: _data.contracts | ||
prices: _data.prices | ||
}; | ||
@@ -388,7 +389,7 @@ }); | ||
}; | ||
this.getNiftyswapTokenQuantity = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.addContractToMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractToMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
quantity: _data.quantity | ||
ok: _data.ok | ||
}; | ||
@@ -402,7 +403,7 @@ }); | ||
}; | ||
this.getNiftyswapUnitPrices = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.removeContractFromMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractFromMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
prices: _data.prices | ||
ok: _data.ok | ||
}; | ||
@@ -416,7 +417,7 @@ }); | ||
}; | ||
this.getNiftyswapUnitPricesWithQuantities = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.mintMonitorJobStatus = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorJobStatus'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
prices: _data.prices | ||
task: _data.task | ||
}; | ||
@@ -430,4 +431,4 @@ }); | ||
}; | ||
this.addContractToMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractToMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.mintMonitorTriggerJob = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorTriggerJob'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
@@ -444,6 +445,19 @@ return { | ||
}; | ||
this.removeContractFromMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractFromMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.syncContractTokens = (args, headers, signal) => { | ||
return this.fetch(this.url('SyncContractTokens'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
taskID: _data.taskID | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.abortContractSync = (args, headers, signal) => { | ||
return this.fetch(this.url('AbortContractSync'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
@@ -458,7 +472,8 @@ }; | ||
}; | ||
this.mintMonitorJobStatus = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorJobStatus'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.contractSyncJobStatus = (args, headers, signal) => { | ||
return this.fetch(this.url('ContractSyncJobStatus'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
task: _data.task | ||
refreshTask: _data.refreshTask, | ||
syncTask: _data.syncTask | ||
}; | ||
@@ -472,7 +487,7 @@ }); | ||
}; | ||
this.mintMonitorTriggerJob = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorTriggerJob'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.directoryGetNetworks = (args, headers, signal) => { | ||
return this.fetch(this.url('DirectoryGetNetworks'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
networks: _data.networks | ||
}; | ||
@@ -486,2 +501,30 @@ }); | ||
}; | ||
this.directoryGetCollections = (args, headers, signal) => { | ||
return this.fetch(this.url('DirectoryGetCollections'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
collections: _data.collections, | ||
page: _data.page | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.directorySearchCollections = (args, headers, signal) => { | ||
return this.fetch(this.url('DirectorySearchCollections'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
collections: _data.collections, | ||
page: _data.page | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.hostname = hostname; | ||
@@ -731,2 +774,80 @@ this.fetch = (input, init) => fetch(input, init); | ||
} | ||
class Admin { | ||
constructor(hostname, fetch) { | ||
this.hostname = void 0; | ||
this.fetch = void 0; | ||
this.path = '/rpc/Admin/'; | ||
this.addContractsToTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.removeContractsFromTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractsFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.modifyFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('ModifyFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.getFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('GetFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
featured: _data.featured | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.listTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('ListTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
page: _data.page, | ||
contracts: _data.contracts | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.hostname = hostname; | ||
this.fetch = (input, init) => fetch(input, init); | ||
} | ||
url(name) { | ||
return this.hostname + this.path + name; | ||
} | ||
} | ||
const createHTTPRequest = (body = {}, headers = {}, signal = null) => { | ||
@@ -899,2 +1020,8 @@ return { | ||
} | ||
class GeoblockedError extends WebrpcError { | ||
constructor(name = 'Geoblocked', code = 1006, message = 'Geoblocked region', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, GeoblockedError.prototype); | ||
} | ||
} | ||
class TimeoutError extends WebrpcError { | ||
@@ -918,2 +1045,20 @@ constructor(name = 'Timeout', code = 2000, message = 'Request timed out', status = 0, cause) { | ||
} | ||
class QueryFailedError extends WebrpcError { | ||
constructor(name = 'QueryFailed', code = 2003, message = 'Query failed', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, QueryFailedError.prototype); | ||
} | ||
} | ||
class ValidationFailedError extends WebrpcError { | ||
constructor(name = 'ValidationFailed', code = 2004, message = 'Validation failed', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, ValidationFailedError.prototype); | ||
} | ||
} | ||
class RateLimitedError extends WebrpcError { | ||
constructor(name = 'RateLimited', code = 2005, message = 'Rate limited', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, RateLimitedError.prototype); | ||
} | ||
} | ||
class NotFoundError extends WebrpcError { | ||
@@ -937,2 +1082,8 @@ constructor(name = 'NotFound', code = 3000, message = 'Resource not found', status = 0, cause) { | ||
} | ||
class TokenDirectoryDisabledError extends WebrpcError { | ||
constructor(name = 'TokenDirectoryDisabled', code = 4001, message = 'Token Directory is disabled', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, TokenDirectoryDisabledError.prototype); | ||
} | ||
} | ||
let errors = /*#__PURE__*/function (errors) { | ||
@@ -956,8 +1107,13 @@ errors["WebrpcEndpoint"] = "WebrpcEndpoint"; | ||
errors["Fail"] = "Fail"; | ||
errors["Geoblocked"] = "Geoblocked"; | ||
errors["Timeout"] = "Timeout"; | ||
errors["InvalidArgument"] = "InvalidArgument"; | ||
errors["RequiredArgument"] = "RequiredArgument"; | ||
errors["QueryFailed"] = "QueryFailed"; | ||
errors["ValidationFailed"] = "ValidationFailed"; | ||
errors["RateLimited"] = "RateLimited"; | ||
errors["NotFound"] = "NotFound"; | ||
errors["ProjectNotFound"] = "ProjectNotFound"; | ||
errors["ChainNotFound"] = "ChainNotFound"; | ||
errors["TokenDirectoryDisabled"] = "TokenDirectoryDisabled"; | ||
return errors; | ||
@@ -983,8 +1139,13 @@ }({}); | ||
[1005]: FailError, | ||
[1006]: GeoblockedError, | ||
[2000]: TimeoutError, | ||
[2001]: InvalidArgumentError, | ||
[2002]: RequiredArgumentError, | ||
[2003]: QueryFailedError, | ||
[2004]: ValidationFailedError, | ||
[2005]: RateLimitedError, | ||
[3000]: NotFoundError, | ||
[3002]: ProjectNotFoundError, | ||
[3003]: ChainNotFoundError | ||
[3003]: ChainNotFoundError, | ||
[4001]: TokenDirectoryDisabledError | ||
}; | ||
@@ -1042,2 +1203,3 @@ | ||
exports.Admin = Admin; | ||
exports.ChainNotFoundError = ChainNotFoundError; | ||
@@ -1047,2 +1209,3 @@ exports.Collections = Collections; | ||
exports.FailError = FailError; | ||
exports.GeoblockedError = GeoblockedError; | ||
exports.InvalidArgumentError = InvalidArgumentError; | ||
@@ -1055,2 +1218,4 @@ exports.Metadata = Metadata; | ||
exports.PropertyType = PropertyType; | ||
exports.QueryFailedError = QueryFailedError; | ||
exports.RateLimitedError = RateLimitedError; | ||
exports.RequestConflictError = RequestConflictError; | ||
@@ -1064,3 +1229,5 @@ exports.RequiredArgumentError = RequiredArgumentError; | ||
exports.TimeoutError = TimeoutError; | ||
exports.TokenDirectoryDisabledError = TokenDirectoryDisabledError; | ||
exports.UnauthorizedError = UnauthorizedError; | ||
exports.ValidationFailedError = ValidationFailedError; | ||
exports.WebRPCSchemaHash = WebRPCSchemaHash; | ||
@@ -1067,0 +1234,0 @@ exports.WebRPCSchemaVersion = WebRPCSchemaVersion; |
@@ -17,3 +17,3 @@ function _extends() { | ||
/* eslint-disable */ | ||
// sequence-metadata v0.4.0 594e38ba9f35eba08aac88087660d5f424b6dbda | ||
// sequence-metadata v0.4.0 16b30ae85e42fc4c25342f7c43e04d7070597f21 | ||
// -- | ||
@@ -31,3 +31,3 @@ // Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT. | ||
// Schema hash generated from your RIDL schema | ||
const WebRPCSchemaHash = '594e38ba9f35eba08aac88087660d5f424b6dbda'; | ||
const WebRPCSchemaHash = '16b30ae85e42fc4c25342f7c43e04d7070597f21'; | ||
@@ -313,7 +313,8 @@ // | ||
}; | ||
this.addContractsToTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.searchTokens = (args, headers, signal) => { | ||
return this.fetch(this.url('SearchTokens'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
tokenMetadata: _data.tokenMetadata, | ||
nextPage: _data.nextPage | ||
}; | ||
@@ -327,7 +328,8 @@ }); | ||
}; | ||
this.removeContractsFromTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractsFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.searchContracts = (args, headers, signal) => { | ||
return this.fetch(this.url('SearchContracts'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
contractInfo: _data.contractInfo, | ||
nextPage: _data.nextPage | ||
}; | ||
@@ -341,7 +343,7 @@ }); | ||
}; | ||
this.modifyFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('ModifyFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.getNiftyswapTokenQuantity = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
quantity: _data.quantity | ||
}; | ||
@@ -355,7 +357,7 @@ }); | ||
}; | ||
this.getFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('GetFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.getNiftyswapUnitPrices = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
featured: _data.featured | ||
prices: _data.prices | ||
}; | ||
@@ -369,8 +371,7 @@ }); | ||
}; | ||
this.listTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('ListTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.getNiftyswapUnitPricesWithQuantities = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
page: _data.page, | ||
contracts: _data.contracts | ||
prices: _data.prices | ||
}; | ||
@@ -384,7 +385,7 @@ }); | ||
}; | ||
this.getNiftyswapTokenQuantity = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.addContractToMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractToMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
quantity: _data.quantity | ||
ok: _data.ok | ||
}; | ||
@@ -398,7 +399,7 @@ }); | ||
}; | ||
this.getNiftyswapUnitPrices = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.removeContractFromMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractFromMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
prices: _data.prices | ||
ok: _data.ok | ||
}; | ||
@@ -412,7 +413,7 @@ }); | ||
}; | ||
this.getNiftyswapUnitPricesWithQuantities = (args, headers, signal) => { | ||
return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.mintMonitorJobStatus = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorJobStatus'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
prices: _data.prices | ||
task: _data.task | ||
}; | ||
@@ -426,4 +427,4 @@ }); | ||
}; | ||
this.addContractToMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractToMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.mintMonitorTriggerJob = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorTriggerJob'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
@@ -440,6 +441,19 @@ return { | ||
}; | ||
this.removeContractFromMintMonitor = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractFromMintMonitor'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.syncContractTokens = (args, headers, signal) => { | ||
return this.fetch(this.url('SyncContractTokens'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
taskID: _data.taskID | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.abortContractSync = (args, headers, signal) => { | ||
return this.fetch(this.url('AbortContractSync'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
@@ -454,7 +468,8 @@ }; | ||
}; | ||
this.mintMonitorJobStatus = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorJobStatus'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.contractSyncJobStatus = (args, headers, signal) => { | ||
return this.fetch(this.url('ContractSyncJobStatus'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
task: _data.task | ||
refreshTask: _data.refreshTask, | ||
syncTask: _data.syncTask | ||
}; | ||
@@ -468,7 +483,7 @@ }); | ||
}; | ||
this.mintMonitorTriggerJob = (args, headers, signal) => { | ||
return this.fetch(this.url('MintMonitorTriggerJob'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.directoryGetNetworks = (args, headers, signal) => { | ||
return this.fetch(this.url('DirectoryGetNetworks'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
networks: _data.networks | ||
}; | ||
@@ -482,2 +497,30 @@ }); | ||
}; | ||
this.directoryGetCollections = (args, headers, signal) => { | ||
return this.fetch(this.url('DirectoryGetCollections'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
collections: _data.collections, | ||
page: _data.page | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.directorySearchCollections = (args, headers, signal) => { | ||
return this.fetch(this.url('DirectorySearchCollections'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
collections: _data.collections, | ||
page: _data.page | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.hostname = hostname; | ||
@@ -727,2 +770,80 @@ this.fetch = (input, init) => fetch(input, init); | ||
} | ||
class Admin { | ||
constructor(hostname, fetch) { | ||
this.hostname = void 0; | ||
this.fetch = void 0; | ||
this.path = '/rpc/Admin/'; | ||
this.addContractsToTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.removeContractsFromTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('RemoveContractsFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.modifyFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('ModifyFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.getFeatureIndex = (args, headers, signal) => { | ||
return this.fetch(this.url('GetFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
featured: _data.featured | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.listTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('ListTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
page: _data.page, | ||
contracts: _data.contracts | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.hostname = hostname; | ||
this.fetch = (input, init) => fetch(input, init); | ||
} | ||
url(name) { | ||
return this.hostname + this.path + name; | ||
} | ||
} | ||
const createHTTPRequest = (body = {}, headers = {}, signal = null) => { | ||
@@ -895,2 +1016,8 @@ return { | ||
} | ||
class GeoblockedError extends WebrpcError { | ||
constructor(name = 'Geoblocked', code = 1006, message = 'Geoblocked region', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, GeoblockedError.prototype); | ||
} | ||
} | ||
class TimeoutError extends WebrpcError { | ||
@@ -914,2 +1041,20 @@ constructor(name = 'Timeout', code = 2000, message = 'Request timed out', status = 0, cause) { | ||
} | ||
class QueryFailedError extends WebrpcError { | ||
constructor(name = 'QueryFailed', code = 2003, message = 'Query failed', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, QueryFailedError.prototype); | ||
} | ||
} | ||
class ValidationFailedError extends WebrpcError { | ||
constructor(name = 'ValidationFailed', code = 2004, message = 'Validation failed', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, ValidationFailedError.prototype); | ||
} | ||
} | ||
class RateLimitedError extends WebrpcError { | ||
constructor(name = 'RateLimited', code = 2005, message = 'Rate limited', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, RateLimitedError.prototype); | ||
} | ||
} | ||
class NotFoundError extends WebrpcError { | ||
@@ -933,2 +1078,8 @@ constructor(name = 'NotFound', code = 3000, message = 'Resource not found', status = 0, cause) { | ||
} | ||
class TokenDirectoryDisabledError extends WebrpcError { | ||
constructor(name = 'TokenDirectoryDisabled', code = 4001, message = 'Token Directory is disabled', status = 0, cause) { | ||
super(name, code, message, status, cause); | ||
Object.setPrototypeOf(this, TokenDirectoryDisabledError.prototype); | ||
} | ||
} | ||
let errors = /*#__PURE__*/function (errors) { | ||
@@ -952,8 +1103,13 @@ errors["WebrpcEndpoint"] = "WebrpcEndpoint"; | ||
errors["Fail"] = "Fail"; | ||
errors["Geoblocked"] = "Geoblocked"; | ||
errors["Timeout"] = "Timeout"; | ||
errors["InvalidArgument"] = "InvalidArgument"; | ||
errors["RequiredArgument"] = "RequiredArgument"; | ||
errors["QueryFailed"] = "QueryFailed"; | ||
errors["ValidationFailed"] = "ValidationFailed"; | ||
errors["RateLimited"] = "RateLimited"; | ||
errors["NotFound"] = "NotFound"; | ||
errors["ProjectNotFound"] = "ProjectNotFound"; | ||
errors["ChainNotFound"] = "ChainNotFound"; | ||
errors["TokenDirectoryDisabled"] = "TokenDirectoryDisabled"; | ||
return errors; | ||
@@ -979,8 +1135,13 @@ }({}); | ||
[1005]: FailError, | ||
[1006]: GeoblockedError, | ||
[2000]: TimeoutError, | ||
[2001]: InvalidArgumentError, | ||
[2002]: RequiredArgumentError, | ||
[2003]: QueryFailedError, | ||
[2004]: ValidationFailedError, | ||
[2005]: RateLimitedError, | ||
[3000]: NotFoundError, | ||
[3002]: ProjectNotFoundError, | ||
[3003]: ChainNotFoundError | ||
[3003]: ChainNotFoundError, | ||
[4001]: TokenDirectoryDisabledError | ||
}; | ||
@@ -1038,2 +1199,2 @@ | ||
export { ChainNotFoundError, Collections, ContractType, FailError, InvalidArgumentError, Metadata, MethodNotFoundError, NotFoundError, PermissionDeniedError, ProjectNotFoundError, PropertyType, RequestConflictError, RequiredArgumentError, SequenceCollections, SequenceMetadata, SessionExpiredError, SwapType, TaskStatus, TimeoutError, UnauthorizedError, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors }; | ||
export { Admin, ChainNotFoundError, Collections, ContractType, FailError, GeoblockedError, InvalidArgumentError, Metadata, MethodNotFoundError, NotFoundError, PermissionDeniedError, ProjectNotFoundError, PropertyType, QueryFailedError, RateLimitedError, RequestConflictError, RequiredArgumentError, SequenceCollections, SequenceMetadata, SessionExpiredError, SwapType, TaskStatus, TimeoutError, TokenDirectoryDisabledError, UnauthorizedError, ValidationFailedError, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors }; |
export declare const WebRPCVersion = "v1"; | ||
export declare const WebRPCSchemaVersion = "v0.4.0"; | ||
export declare const WebRPCSchemaHash = "594e38ba9f35eba08aac88087660d5f424b6dbda"; | ||
export declare const WebRPCSchemaHash = "16b30ae85e42fc4c25342f7c43e04d7070597f21"; | ||
export declare enum ContractType { | ||
@@ -229,7 +229,4 @@ UNKNOWN = "UNKNOWN", | ||
searchMetadata(args: SearchMetadataArgs, headers?: object, signal?: AbortSignal): Promise<SearchMetadataReturn>; | ||
addContractsToTokenDirectory(args: AddContractsToTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<AddContractsToTokenDirectoryReturn>; | ||
removeContractsFromTokenDirectory(args: RemoveContractsFromTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<RemoveContractsFromTokenDirectoryReturn>; | ||
modifyFeatureIndex(args: ModifyFeatureIndexArgs, headers?: object, signal?: AbortSignal): Promise<ModifyFeatureIndexReturn>; | ||
getFeatureIndex(args: GetFeatureIndexArgs, headers?: object, signal?: AbortSignal): Promise<GetFeatureIndexReturn>; | ||
listTokenDirectory(args: ListTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<ListTokenDirectoryReturn>; | ||
searchTokens(args: SearchTokensArgs, headers?: object, signal?: AbortSignal): Promise<SearchTokensReturn>; | ||
searchContracts(args: SearchContractsArgs, headers?: object, signal?: AbortSignal): Promise<SearchContractsReturn>; | ||
getNiftyswapTokenQuantity(args: GetNiftyswapTokenQuantityArgs, headers?: object, signal?: AbortSignal): Promise<GetNiftyswapTokenQuantityReturn>; | ||
@@ -242,2 +239,8 @@ getNiftyswapUnitPrices(args: GetNiftyswapUnitPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetNiftyswapUnitPricesReturn>; | ||
mintMonitorTriggerJob(args: MintMonitorTriggerJobArgs, headers?: object, signal?: AbortSignal): Promise<MintMonitorTriggerJobReturn>; | ||
syncContractTokens(args: SyncContractTokensArgs, headers?: object, signal?: AbortSignal): Promise<SyncContractTokensReturn>; | ||
abortContractSync(args: AbortContractSyncArgs, headers?: object, signal?: AbortSignal): Promise<AbortContractSyncReturn>; | ||
contractSyncJobStatus(args: ContractSyncJobStatusArgs, headers?: object, signal?: AbortSignal): Promise<ContractSyncJobStatusReturn>; | ||
directoryGetNetworks(args: DirectoryGetNetworksArgs, headers?: object, signal?: AbortSignal): Promise<DirectoryGetNetworksReturn>; | ||
directoryGetCollections(args: DirectoryGetCollectionsArgs, headers?: object, signal?: AbortSignal): Promise<DirectoryGetCollectionsReturn>; | ||
directorySearchCollections(args: DirectorySearchCollectionsArgs, headers?: object, signal?: AbortSignal): Promise<DirectorySearchCollectionsReturn>; | ||
} | ||
@@ -387,37 +390,20 @@ export interface PingArgs { | ||
} | ||
export interface AddContractsToTokenDirectoryArgs { | ||
contracts: Array<ContractInfo>; | ||
export interface SearchTokensArgs { | ||
q: string; | ||
chainID?: string; | ||
page?: Page; | ||
} | ||
export interface AddContractsToTokenDirectoryReturn { | ||
ok: boolean; | ||
export interface SearchTokensReturn { | ||
tokenMetadata: Array<TokenMetadata>; | ||
nextPage: Page; | ||
} | ||
export interface RemoveContractsFromTokenDirectoryArgs { | ||
chainHandle: string; | ||
contracts: Array<string>; | ||
} | ||
export interface RemoveContractsFromTokenDirectoryReturn { | ||
ok: boolean; | ||
} | ||
export interface ModifyFeatureIndexArgs { | ||
chainHandle: string; | ||
contractAddress: string; | ||
featured: number; | ||
} | ||
export interface ModifyFeatureIndexReturn { | ||
ok: boolean; | ||
} | ||
export interface GetFeatureIndexArgs { | ||
chainHandle: string; | ||
contractAddress: string; | ||
} | ||
export interface GetFeatureIndexReturn { | ||
featured: number; | ||
} | ||
export interface ListTokenDirectoryArgs { | ||
export interface SearchContractsArgs { | ||
q: string; | ||
chainID?: string; | ||
types?: Array<ContractType>; | ||
page?: Page; | ||
} | ||
export interface ListTokenDirectoryReturn { | ||
page: Page; | ||
contracts: Array<ContractInfo>; | ||
export interface SearchContractsReturn { | ||
contractInfo: Array<ContractInfo>; | ||
nextPage: Page; | ||
} | ||
@@ -484,2 +470,50 @@ export interface GetNiftyswapTokenQuantityArgs { | ||
} | ||
export interface SyncContractTokensArgs { | ||
chainID: string; | ||
contractAddress: string; | ||
} | ||
export interface SyncContractTokensReturn { | ||
taskID: number; | ||
} | ||
export interface AbortContractSyncArgs { | ||
taskID: number; | ||
} | ||
export interface AbortContractSyncReturn { | ||
ok: boolean; | ||
} | ||
export interface ContractSyncJobStatusArgs { | ||
taskID: number; | ||
} | ||
export interface ContractSyncJobStatusReturn { | ||
refreshTask: Task; | ||
syncTask: Task; | ||
} | ||
export interface DirectoryGetNetworksArgs { | ||
includeTestnets?: boolean; | ||
onlyFeatured?: boolean; | ||
} | ||
export interface DirectoryGetNetworksReturn { | ||
networks: Array<number>; | ||
} | ||
export interface DirectoryGetCollectionsArgs { | ||
chainId?: number; | ||
includeTestnets?: boolean; | ||
onlyFeatured?: boolean; | ||
page?: Page; | ||
} | ||
export interface DirectoryGetCollectionsReturn { | ||
collections: Array<ContractInfo>; | ||
page: Page; | ||
} | ||
export interface DirectorySearchCollectionsArgs { | ||
query: string; | ||
chainId?: number; | ||
includeTestnets?: boolean; | ||
onlyFeatured?: boolean; | ||
page?: Page; | ||
} | ||
export interface DirectorySearchCollectionsReturn { | ||
collections: Array<ContractInfo>; | ||
page: Page; | ||
} | ||
export interface Collections { | ||
@@ -561,2 +595,3 @@ createCollection(args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise<CreateCollectionReturn>; | ||
contractType: ContractType; | ||
featured: number; | ||
} | ||
@@ -640,2 +675,46 @@ export interface AddDeployedCollectionToTokenDirectoryReturn { | ||
} | ||
export interface Admin { | ||
addContractsToTokenDirectory(args: AddContractsToTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<AddContractsToTokenDirectoryReturn>; | ||
removeContractsFromTokenDirectory(args: RemoveContractsFromTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<RemoveContractsFromTokenDirectoryReturn>; | ||
modifyFeatureIndex(args: ModifyFeatureIndexArgs, headers?: object, signal?: AbortSignal): Promise<ModifyFeatureIndexReturn>; | ||
getFeatureIndex(args: GetFeatureIndexArgs, headers?: object, signal?: AbortSignal): Promise<GetFeatureIndexReturn>; | ||
listTokenDirectory(args: ListTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<ListTokenDirectoryReturn>; | ||
} | ||
export interface AddContractsToTokenDirectoryArgs { | ||
contracts: Array<ContractInfo>; | ||
featureIndexes: Array<number>; | ||
} | ||
export interface AddContractsToTokenDirectoryReturn { | ||
ok: boolean; | ||
} | ||
export interface RemoveContractsFromTokenDirectoryArgs { | ||
chainHandle: string; | ||
contracts: Array<string>; | ||
} | ||
export interface RemoveContractsFromTokenDirectoryReturn { | ||
ok: boolean; | ||
} | ||
export interface ModifyFeatureIndexArgs { | ||
chainHandle: string; | ||
contractAddress: string; | ||
featured: number; | ||
} | ||
export interface ModifyFeatureIndexReturn { | ||
ok: boolean; | ||
} | ||
export interface GetFeatureIndexArgs { | ||
chainHandle: string; | ||
contractAddress: string; | ||
} | ||
export interface GetFeatureIndexReturn { | ||
featured: number; | ||
} | ||
export interface ListTokenDirectoryArgs { | ||
chainID?: string; | ||
page?: Page; | ||
} | ||
export interface ListTokenDirectoryReturn { | ||
page: Page; | ||
contracts: Array<ContractInfo>; | ||
} | ||
export declare class Metadata implements Metadata { | ||
@@ -665,7 +744,4 @@ protected hostname: string; | ||
searchMetadata: (args: SearchMetadataArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<SearchMetadataReturn>; | ||
addContractsToTokenDirectory: (args: AddContractsToTokenDirectoryArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<AddContractsToTokenDirectoryReturn>; | ||
removeContractsFromTokenDirectory: (args: RemoveContractsFromTokenDirectoryArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<RemoveContractsFromTokenDirectoryReturn>; | ||
modifyFeatureIndex: (args: ModifyFeatureIndexArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ModifyFeatureIndexReturn>; | ||
getFeatureIndex: (args: GetFeatureIndexArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetFeatureIndexReturn>; | ||
listTokenDirectory: (args: ListTokenDirectoryArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ListTokenDirectoryReturn>; | ||
searchTokens: (args: SearchTokensArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<SearchTokensReturn>; | ||
searchContracts: (args: SearchContractsArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<SearchContractsReturn>; | ||
getNiftyswapTokenQuantity: (args: GetNiftyswapTokenQuantityArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetNiftyswapTokenQuantityReturn>; | ||
@@ -678,2 +754,8 @@ getNiftyswapUnitPrices: (args: GetNiftyswapUnitPricesArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetNiftyswapUnitPricesReturn>; | ||
mintMonitorTriggerJob: (args: MintMonitorTriggerJobArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<MintMonitorTriggerJobReturn>; | ||
syncContractTokens: (args: SyncContractTokensArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<SyncContractTokensReturn>; | ||
abortContractSync: (args: AbortContractSyncArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<AbortContractSyncReturn>; | ||
contractSyncJobStatus: (args: ContractSyncJobStatusArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ContractSyncJobStatusReturn>; | ||
directoryGetNetworks: (args: DirectoryGetNetworksArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<DirectoryGetNetworksReturn>; | ||
directoryGetCollections: (args: DirectoryGetCollectionsArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<DirectoryGetCollectionsReturn>; | ||
directorySearchCollections: (args: DirectorySearchCollectionsArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<DirectorySearchCollectionsReturn>; | ||
} | ||
@@ -704,2 +786,14 @@ export declare class Collections implements Collections { | ||
} | ||
export declare class Admin implements Admin { | ||
protected hostname: string; | ||
protected fetch: Fetch; | ||
protected path: string; | ||
constructor(hostname: string, fetch: Fetch); | ||
private url; | ||
addContractsToTokenDirectory: (args: AddContractsToTokenDirectoryArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<AddContractsToTokenDirectoryReturn>; | ||
removeContractsFromTokenDirectory: (args: RemoveContractsFromTokenDirectoryArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<RemoveContractsFromTokenDirectoryReturn>; | ||
modifyFeatureIndex: (args: ModifyFeatureIndexArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ModifyFeatureIndexReturn>; | ||
getFeatureIndex: (args: GetFeatureIndexArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetFeatureIndexReturn>; | ||
listTokenDirectory: (args: ListTokenDirectoryArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ListTokenDirectoryReturn>; | ||
} | ||
export declare class WebrpcError extends Error { | ||
@@ -767,2 +861,5 @@ name: string; | ||
} | ||
export declare class GeoblockedError extends WebrpcError { | ||
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string); | ||
} | ||
export declare class TimeoutError extends WebrpcError { | ||
@@ -777,2 +874,11 @@ constructor(name?: string, code?: number, message?: string, status?: number, cause?: string); | ||
} | ||
export declare class QueryFailedError extends WebrpcError { | ||
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string); | ||
} | ||
export declare class ValidationFailedError extends WebrpcError { | ||
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string); | ||
} | ||
export declare class RateLimitedError extends WebrpcError { | ||
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string); | ||
} | ||
export declare class NotFoundError extends WebrpcError { | ||
@@ -787,2 +893,5 @@ constructor(name?: string, code?: number, message?: string, status?: number, cause?: string); | ||
} | ||
export declare class TokenDirectoryDisabledError extends WebrpcError { | ||
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string); | ||
} | ||
export declare enum errors { | ||
@@ -806,9 +915,14 @@ WebrpcEndpoint = "WebrpcEndpoint", | ||
Fail = "Fail", | ||
Geoblocked = "Geoblocked", | ||
Timeout = "Timeout", | ||
InvalidArgument = "InvalidArgument", | ||
RequiredArgument = "RequiredArgument", | ||
QueryFailed = "QueryFailed", | ||
ValidationFailed = "ValidationFailed", | ||
RateLimited = "RateLimited", | ||
NotFound = "NotFound", | ||
ProjectNotFound = "ProjectNotFound", | ||
ChainNotFound = "ChainNotFound" | ||
ChainNotFound = "ChainNotFound", | ||
TokenDirectoryDisabled = "TokenDirectoryDisabled" | ||
} | ||
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>; |
{ | ||
"name": "@0xsequence/metadata", | ||
"version": "1.10.0", | ||
"version": "1.10.1", | ||
"description": "metadata sub-package for Sequence", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/metadata", |
Sorry, the diff of this file is too big to display
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
248153
6728
21