@0xsequence/metadata
Advanced tools
Comparing version 0.0.0-20240718140827 to 0.0.0-20240807210827
@@ -21,3 +21,3 @@ 'use strict'; | ||
/* eslint-disable */ | ||
// sequence-metadata v0.4.0 594e38ba9f35eba08aac88087660d5f424b6dbda | ||
// sequence-metadata v0.4.0 7c434e9c7faba707ea4d030621fb145e47531281 | ||
// -- | ||
@@ -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 = '7c434e9c7faba707ea4d030621fb145e47531281'; | ||
@@ -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; | ||
@@ -591,6 +634,46 @@ this.fetch = (input, init) => fetch(input, init); | ||
}; | ||
this.addDeployedCollectionToTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('AddDeployedCollectionToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.createContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('CreateContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
contractCollection: _data.contractCollection | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.getContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('GetContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
contractCollection: _data.contractCollection | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.listContractCollections = (args, headers, signal) => { | ||
return this.fetch(this.url('ListContractCollections'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
contractCollections: _data.contractCollections, | ||
page: _data.page | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.updateContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('UpdateContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
@@ -605,2 +688,15 @@ }; | ||
}; | ||
this.deleteContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('DeleteContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.createToken = (args, headers, signal) => { | ||
@@ -733,2 +829,80 @@ return this.fetch(this.url('CreateToken'), createHTTPRequest(args, headers, signal)).then(res => { | ||
} | ||
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, | ||
collections: _data.collections | ||
}; | ||
}); | ||
}, 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) => { | ||
@@ -901,2 +1075,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 { | ||
@@ -920,2 +1100,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 { | ||
@@ -939,2 +1137,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) { | ||
@@ -958,8 +1162,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; | ||
@@ -985,11 +1194,16 @@ }({}); | ||
[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 | ||
}; | ||
const fetch = typeof global === 'object' ? global.fetch : window.fetch; | ||
const fetch = globalThis.fetch; | ||
class SequenceMetadata extends Metadata { | ||
@@ -1044,2 +1258,3 @@ constructor(hostname = 'https://metadata.sequence.app', projectAccessKey, jwtAuth) { | ||
exports.Admin = Admin; | ||
exports.ChainNotFoundError = ChainNotFoundError; | ||
@@ -1049,2 +1264,3 @@ exports.Collections = Collections; | ||
exports.FailError = FailError; | ||
exports.GeoblockedError = GeoblockedError; | ||
exports.InvalidArgumentError = InvalidArgumentError; | ||
@@ -1057,2 +1273,4 @@ exports.Metadata = Metadata; | ||
exports.PropertyType = PropertyType; | ||
exports.QueryFailedError = QueryFailedError; | ||
exports.RateLimitedError = RateLimitedError; | ||
exports.RequestConflictError = RequestConflictError; | ||
@@ -1066,3 +1284,5 @@ exports.RequiredArgumentError = RequiredArgumentError; | ||
exports.TimeoutError = TimeoutError; | ||
exports.TokenDirectoryDisabledError = TokenDirectoryDisabledError; | ||
exports.UnauthorizedError = UnauthorizedError; | ||
exports.ValidationFailedError = ValidationFailedError; | ||
exports.WebRPCSchemaHash = WebRPCSchemaHash; | ||
@@ -1069,0 +1289,0 @@ exports.WebRPCSchemaVersion = WebRPCSchemaVersion; |
@@ -21,3 +21,3 @@ 'use strict'; | ||
/* eslint-disable */ | ||
// sequence-metadata v0.4.0 594e38ba9f35eba08aac88087660d5f424b6dbda | ||
// sequence-metadata v0.4.0 7c434e9c7faba707ea4d030621fb145e47531281 | ||
// -- | ||
@@ -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 = '7c434e9c7faba707ea4d030621fb145e47531281'; | ||
@@ -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; | ||
@@ -591,6 +634,46 @@ this.fetch = (input, init) => fetch(input, init); | ||
}; | ||
this.addDeployedCollectionToTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('AddDeployedCollectionToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.createContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('CreateContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
contractCollection: _data.contractCollection | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.getContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('GetContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
contractCollection: _data.contractCollection | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.listContractCollections = (args, headers, signal) => { | ||
return this.fetch(this.url('ListContractCollections'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
contractCollections: _data.contractCollections, | ||
page: _data.page | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.updateContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('UpdateContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
@@ -605,2 +688,15 @@ }; | ||
}; | ||
this.deleteContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('DeleteContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.createToken = (args, headers, signal) => { | ||
@@ -733,2 +829,80 @@ return this.fetch(this.url('CreateToken'), createHTTPRequest(args, headers, signal)).then(res => { | ||
} | ||
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, | ||
collections: _data.collections | ||
}; | ||
}); | ||
}, 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) => { | ||
@@ -901,2 +1075,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 { | ||
@@ -920,2 +1100,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 { | ||
@@ -939,2 +1137,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) { | ||
@@ -958,8 +1162,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; | ||
@@ -985,11 +1194,16 @@ }({}); | ||
[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 | ||
}; | ||
const fetch = typeof global === 'object' ? global.fetch : window.fetch; | ||
const fetch = globalThis.fetch; | ||
class SequenceMetadata extends Metadata { | ||
@@ -1044,2 +1258,3 @@ constructor(hostname = 'https://metadata.sequence.app', projectAccessKey, jwtAuth) { | ||
exports.Admin = Admin; | ||
exports.ChainNotFoundError = ChainNotFoundError; | ||
@@ -1049,2 +1264,3 @@ exports.Collections = Collections; | ||
exports.FailError = FailError; | ||
exports.GeoblockedError = GeoblockedError; | ||
exports.InvalidArgumentError = InvalidArgumentError; | ||
@@ -1057,2 +1273,4 @@ exports.Metadata = Metadata; | ||
exports.PropertyType = PropertyType; | ||
exports.QueryFailedError = QueryFailedError; | ||
exports.RateLimitedError = RateLimitedError; | ||
exports.RequestConflictError = RequestConflictError; | ||
@@ -1066,3 +1284,5 @@ exports.RequiredArgumentError = RequiredArgumentError; | ||
exports.TimeoutError = TimeoutError; | ||
exports.TokenDirectoryDisabledError = TokenDirectoryDisabledError; | ||
exports.UnauthorizedError = UnauthorizedError; | ||
exports.ValidationFailedError = ValidationFailedError; | ||
exports.WebRPCSchemaHash = WebRPCSchemaHash; | ||
@@ -1069,0 +1289,0 @@ exports.WebRPCSchemaVersion = WebRPCSchemaVersion; |
@@ -17,3 +17,3 @@ function _extends() { | ||
/* eslint-disable */ | ||
// sequence-metadata v0.4.0 594e38ba9f35eba08aac88087660d5f424b6dbda | ||
// sequence-metadata v0.4.0 7c434e9c7faba707ea4d030621fb145e47531281 | ||
// -- | ||
@@ -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 = '7c434e9c7faba707ea4d030621fb145e47531281'; | ||
@@ -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; | ||
@@ -587,6 +630,46 @@ this.fetch = (input, init) => fetch(input, init); | ||
}; | ||
this.addDeployedCollectionToTokenDirectory = (args, headers, signal) => { | ||
return this.fetch(this.url('AddDeployedCollectionToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => { | ||
this.createContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('CreateContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
contractCollection: _data.contractCollection | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.getContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('GetContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
contractCollection: _data.contractCollection | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.listContractCollections = (args, headers, signal) => { | ||
return this.fetch(this.url('ListContractCollections'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
contractCollections: _data.contractCollections, | ||
page: _data.page | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.updateContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('UpdateContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
@@ -601,2 +684,15 @@ }; | ||
}; | ||
this.deleteContractCollection = (args, headers, signal) => { | ||
return this.fetch(this.url('DeleteContractCollection'), createHTTPRequest(args, headers, signal)).then(res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: _data.ok | ||
}; | ||
}); | ||
}, error => { | ||
throw WebrpcRequestFailedError.new({ | ||
cause: `fetch(): ${error.message || ''}` | ||
}); | ||
}); | ||
}; | ||
this.createToken = (args, headers, signal) => { | ||
@@ -729,2 +825,80 @@ return this.fetch(this.url('CreateToken'), createHTTPRequest(args, headers, signal)).then(res => { | ||
} | ||
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, | ||
collections: _data.collections | ||
}; | ||
}); | ||
}, 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) => { | ||
@@ -897,2 +1071,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 { | ||
@@ -916,2 +1096,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 { | ||
@@ -935,2 +1133,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) { | ||
@@ -954,8 +1158,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; | ||
@@ -981,11 +1190,16 @@ }({}); | ||
[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 | ||
}; | ||
const fetch = typeof global === 'object' ? global.fetch : window.fetch; | ||
const fetch = globalThis.fetch; | ||
class SequenceMetadata extends Metadata { | ||
@@ -1040,2 +1254,2 @@ constructor(hostname = 'https://metadata.sequence.app', projectAccessKey, jwtAuth) { | ||
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 = "7c434e9c7faba707ea4d030621fb145e47531281"; | ||
export declare enum ContractType { | ||
@@ -46,3 +46,2 @@ UNKNOWN = "UNKNOWN", | ||
export interface ContractIndex { | ||
collectionId?: number; | ||
chainId: number; | ||
@@ -157,2 +156,8 @@ address: string; | ||
} | ||
export interface ContractCollection { | ||
id: number; | ||
chainId: number; | ||
contractAddress: string; | ||
collectionId: number; | ||
} | ||
export interface Asset { | ||
@@ -231,7 +236,4 @@ id: number; | ||
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>; | ||
@@ -244,2 +246,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>; | ||
} | ||
@@ -389,37 +397,21 @@ 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; | ||
chainIDs?: Array<string>; | ||
types?: Array<ContractType>; | ||
page?: Page; | ||
} | ||
export interface ListTokenDirectoryReturn { | ||
page: Page; | ||
contracts: Array<ContractInfo>; | ||
export interface SearchContractsReturn { | ||
contractInfo: Array<ContractInfo>; | ||
nextPage: Page; | ||
} | ||
@@ -486,2 +478,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 { | ||
@@ -495,3 +535,7 @@ createCollection(args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise<CreateCollectionReturn>; | ||
unpublishCollection(args: UnpublishCollectionArgs, headers?: object, signal?: AbortSignal): Promise<UnpublishCollectionReturn>; | ||
addDeployedCollectionToTokenDirectory(args: AddDeployedCollectionToTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<AddDeployedCollectionToTokenDirectoryReturn>; | ||
createContractCollection(args: CreateContractCollectionArgs, headers?: object, signal?: AbortSignal): Promise<CreateContractCollectionReturn>; | ||
getContractCollection(args: GetContractCollectionArgs, headers?: object, signal?: AbortSignal): Promise<GetContractCollectionReturn>; | ||
listContractCollections(args: ListContractCollectionsArgs, headers?: object, signal?: AbortSignal): Promise<ListContractCollectionsReturn>; | ||
updateContractCollection(args: UpdateContractCollectionArgs, headers?: object, signal?: AbortSignal): Promise<UpdateContractCollectionReturn>; | ||
deleteContractCollection(args: DeleteContractCollectionArgs, headers?: object, signal?: AbortSignal): Promise<DeleteContractCollectionReturn>; | ||
createToken(args: CreateTokenArgs, headers?: object, signal?: AbortSignal): Promise<CreateTokenReturn>; | ||
@@ -558,12 +602,41 @@ getToken(args: GetTokenArgs, headers?: object, signal?: AbortSignal): Promise<GetTokenReturn>; | ||
} | ||
export interface AddDeployedCollectionToTokenDirectoryArgs { | ||
projectId?: number; | ||
collectionId: number; | ||
chainHandle: string; | ||
export interface CreateContractCollectionArgs { | ||
projectId: number; | ||
contractCollection: ContractCollection; | ||
} | ||
export interface CreateContractCollectionReturn { | ||
contractCollection: ContractCollection; | ||
} | ||
export interface GetContractCollectionArgs { | ||
projectId: number; | ||
chainId: number; | ||
contractAddress: string; | ||
contractType: ContractType; | ||
} | ||
export interface AddDeployedCollectionToTokenDirectoryReturn { | ||
export interface GetContractCollectionReturn { | ||
contractCollection: ContractCollection; | ||
} | ||
export interface ListContractCollectionsArgs { | ||
projectId: number; | ||
collectionId?: number; | ||
page?: Page; | ||
} | ||
export interface ListContractCollectionsReturn { | ||
contractCollections: Array<ContractCollection>; | ||
page: Page; | ||
} | ||
export interface UpdateContractCollectionArgs { | ||
projectId: number; | ||
contractCollection: ContractCollection; | ||
} | ||
export interface UpdateContractCollectionReturn { | ||
ok: boolean; | ||
} | ||
export interface DeleteContractCollectionArgs { | ||
projectId: number; | ||
chainId: number; | ||
contractAddress: string; | ||
} | ||
export interface DeleteContractCollectionReturn { | ||
ok: boolean; | ||
} | ||
export interface CreateTokenArgs { | ||
@@ -643,2 +716,48 @@ projectId?: number; | ||
} | ||
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?: number; | ||
includeTestnets?: boolean; | ||
onlyFeatured?: boolean; | ||
page?: Page; | ||
} | ||
export interface ListTokenDirectoryReturn { | ||
page: Page; | ||
collections: Array<ContractInfo>; | ||
} | ||
export declare class Metadata implements Metadata { | ||
@@ -668,7 +787,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>; | ||
@@ -681,2 +797,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>; | ||
} | ||
@@ -696,3 +818,7 @@ export declare class Collections implements Collections { | ||
unpublishCollection: (args: UnpublishCollectionArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<UnpublishCollectionReturn>; | ||
addDeployedCollectionToTokenDirectory: (args: AddDeployedCollectionToTokenDirectoryArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<AddDeployedCollectionToTokenDirectoryReturn>; | ||
createContractCollection: (args: CreateContractCollectionArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<CreateContractCollectionReturn>; | ||
getContractCollection: (args: GetContractCollectionArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetContractCollectionReturn>; | ||
listContractCollections: (args: ListContractCollectionsArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ListContractCollectionsReturn>; | ||
updateContractCollection: (args: UpdateContractCollectionArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<UpdateContractCollectionReturn>; | ||
deleteContractCollection: (args: DeleteContractCollectionArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<DeleteContractCollectionReturn>; | ||
createToken: (args: CreateTokenArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<CreateTokenReturn>; | ||
@@ -708,2 +834,14 @@ getToken: (args: GetTokenArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetTokenReturn>; | ||
} | ||
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 { | ||
@@ -771,2 +909,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 { | ||
@@ -781,2 +922,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 { | ||
@@ -791,2 +941,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 { | ||
@@ -810,9 +963,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": "0.0.0-20240718140827", | ||
"version": "0.0.0-20240807210827", | ||
"description": "metadata sub-package for Sequence", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/metadata", |
@@ -5,3 +5,3 @@ export * from './metadata.gen' | ||
const fetch = typeof global === 'object' ? global.fetch : window.fetch | ||
const fetch = globalThis.fetch | ||
@@ -8,0 +8,0 @@ export class SequenceMetadata extends MetadataRpc { |
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
259569
7060
21