-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update metadata package with new token directory changes (#537)
- Loading branch information
1 parent
171c488
commit d555965
Showing
1 changed file
with
184 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* eslint-disable */ | ||
// sequence-metadata v0.4.0 beba38a03448af4673d6c6d02364dca15197c8b5 | ||
// sequence-metadata v0.4.0 594e38ba9f35eba08aac88087660d5f424b6dbda | ||
// -- | ||
// Code generated by [email protected] with typescript generator. DO NOT EDIT. | ||
// | ||
|
@@ -12,7 +12,7 @@ export const WebRPCVersion = 'v1' | |
export const WebRPCSchemaVersion = 'v0.4.0' | ||
|
||
// Schema hash generated from your RIDL schema | ||
export const WebRPCSchemaHash = 'beba38a03448af4673d6c6d02364dca15197c8b5' | ||
export const WebRPCSchemaHash = '594e38ba9f35eba08aac88087660d5f424b6dbda' | ||
|
||
// | ||
// Types | ||
|
@@ -113,6 +113,7 @@ export interface ContractInfoExtensions { | |
blacklist: boolean | ||
verified: boolean | ||
verifiedBy: string | ||
featured: boolean | ||
} | ||
|
||
export interface TokenMetadata { | ||
|
@@ -285,6 +286,19 @@ export interface Metadata { | |
signal?: AbortSignal | ||
): Promise<SearchContractInfoBatchReturn> | ||
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> | ||
getNiftyswapTokenQuantity( | ||
args: GetNiftyswapTokenQuantityArgs, | ||
headers?: object, | ||
|
@@ -468,6 +482,47 @@ export interface SearchMetadataReturn { | |
tokenMetadata: Array<TokenMetadata> | ||
contractInfo: Array<ContractInfo> | ||
} | ||
export interface AddContractsToTokenDirectoryArgs { | ||
contracts: Array<ContractInfo> | ||
} | ||
|
||
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 interface GetNiftyswapTokenQuantityArgs { | ||
chainID: string | ||
contractAddress: string | ||
|
@@ -538,6 +593,11 @@ export interface Collections { | |
deleteCollection(args: DeleteCollectionArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCollectionReturn> | ||
publishCollection(args: PublishCollectionArgs, headers?: object, signal?: AbortSignal): Promise<PublishCollectionReturn> | ||
unpublishCollection(args: UnpublishCollectionArgs, headers?: object, signal?: AbortSignal): Promise<UnpublishCollectionReturn> | ||
addDeployedCollectionToTokenDirectory( | ||
args: AddDeployedCollectionToTokenDirectoryArgs, | ||
headers?: object, | ||
signal?: AbortSignal | ||
): Promise<AddDeployedCollectionToTokenDirectoryReturn> | ||
createToken(args: CreateTokenArgs, headers?: object, signal?: AbortSignal): Promise<CreateTokenReturn> | ||
getToken(args: GetTokenArgs, headers?: object, signal?: AbortSignal): Promise<GetTokenReturn> | ||
listTokens(args: ListTokensArgs, headers?: object, signal?: AbortSignal): Promise<ListTokensReturn> | ||
|
@@ -607,6 +667,17 @@ export interface UnpublishCollectionArgs { | |
export interface UnpublishCollectionReturn { | ||
collection: Collection | ||
} | ||
export interface AddDeployedCollectionToTokenDirectoryArgs { | ||
projectId?: number | ||
collectionId: number | ||
chainHandle: string | ||
contractAddress: string | ||
contractType: ContractType | ||
} | ||
|
||
export interface AddDeployedCollectionToTokenDirectoryReturn { | ||
ok: boolean | ||
} | ||
export interface CreateTokenArgs { | ||
projectId?: number | ||
collectionId: number | ||
|
@@ -1023,6 +1094,98 @@ export class Metadata implements Metadata { | |
) | ||
} | ||
|
||
addContractsToTokenDirectory = ( | ||
args: AddContractsToTokenDirectoryArgs, | ||
headers?: object, | ||
signal?: AbortSignal | ||
): Promise<AddContractsToTokenDirectoryReturn> => { | ||
return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then( | ||
res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: <boolean>_data.ok | ||
} | ||
}) | ||
}, | ||
error => { | ||
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) | ||
} | ||
) | ||
} | ||
|
||
removeContractsFromTokenDirectory = ( | ||
args: RemoveContractsFromTokenDirectoryArgs, | ||
headers?: object, | ||
signal?: AbortSignal | ||
): Promise<RemoveContractsFromTokenDirectoryReturn> => { | ||
return this.fetch(this.url('RemoveContractsFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then( | ||
res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: <boolean>_data.ok | ||
} | ||
}) | ||
}, | ||
error => { | ||
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) | ||
} | ||
) | ||
} | ||
|
||
modifyFeatureIndex = ( | ||
args: ModifyFeatureIndexArgs, | ||
headers?: object, | ||
signal?: AbortSignal | ||
): Promise<ModifyFeatureIndexReturn> => { | ||
return this.fetch(this.url('ModifyFeatureIndex'), createHTTPRequest(args, headers, signal)).then( | ||
res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: <boolean>_data.ok | ||
} | ||
}) | ||
}, | ||
error => { | ||
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) | ||
} | ||
) | ||
} | ||
|
||
getFeatureIndex = (args: GetFeatureIndexArgs, headers?: object, signal?: AbortSignal): Promise<GetFeatureIndexReturn> => { | ||
return this.fetch(this.url('GetFeatureIndex'), createHTTPRequest(args, headers, signal)).then( | ||
res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
featured: <number>_data.featured | ||
} | ||
}) | ||
}, | ||
error => { | ||
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) | ||
} | ||
) | ||
} | ||
|
||
listTokenDirectory = ( | ||
args: ListTokenDirectoryArgs, | ||
headers?: object, | ||
signal?: AbortSignal | ||
): Promise<ListTokenDirectoryReturn> => { | ||
return this.fetch(this.url('ListTokenDirectory'), createHTTPRequest(args, headers, signal)).then( | ||
res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
page: <Page>_data.page, | ||
contracts: <Array<ContractInfo>>_data.contracts | ||
} | ||
}) | ||
}, | ||
error => { | ||
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) | ||
} | ||
) | ||
} | ||
|
||
getNiftyswapTokenQuantity = ( | ||
args: GetNiftyswapTokenQuantityArgs, | ||
headers?: object, | ||
|
@@ -1280,6 +1443,25 @@ export class Collections implements Collections { | |
) | ||
} | ||
|
||
addDeployedCollectionToTokenDirectory = ( | ||
args: AddDeployedCollectionToTokenDirectoryArgs, | ||
headers?: object, | ||
signal?: AbortSignal | ||
): Promise<AddDeployedCollectionToTokenDirectoryReturn> => { | ||
return this.fetch(this.url('AddDeployedCollectionToTokenDirectory'), createHTTPRequest(args, headers, signal)).then( | ||
res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
ok: <boolean>_data.ok | ||
} | ||
}) | ||
}, | ||
error => { | ||
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) | ||
} | ||
) | ||
} | ||
|
||
createToken = (args: CreateTokenArgs, headers?: object, signal?: AbortSignal): Promise<CreateTokenReturn> => { | ||
return this.fetch(this.url('CreateToken'), createHTTPRequest(args, headers, signal)).then( | ||
res => { | ||
|