@0xsequence/metadata
Advanced tools
Comparing version 0.0.0-2021827201516 to 0.0.0-20220412184039
210
CHANGELOG.md
# @0xsequence/metadata | ||
## 0.0.0-2021827201516 | ||
## 0.0.0-20220412184039 | ||
### Patch Changes | ||
- update metadata proto | ||
## 0.36.9 | ||
### Patch Changes | ||
- minor dev xp improvements | ||
## 0.36.8 | ||
### Patch Changes | ||
- more connect options (theme, payment providers, funding currencies) | ||
## 0.36.7 | ||
### Patch Changes | ||
- fix missing break | ||
## 0.36.6 | ||
### Patch Changes | ||
- wallet_switchEthereumChain support | ||
## 0.36.5 | ||
### Patch Changes | ||
- auth: bump ethauth to 0.7.0 | ||
network, wallet: don't assume position of auth network in list | ||
api/indexer/metadata: trim trailing slash on hostname, and add endpoint urls | ||
relayer: Allow to specify local relayer transaction parameters like gas price or gas limit | ||
## 0.36.4 | ||
### Patch Changes | ||
- Updating list of chain ids to include other ethereum compatible chains | ||
## 0.36.3 | ||
### Patch Changes | ||
- provider: pass connect options to prompter methods | ||
## 0.36.2 | ||
### Patch Changes | ||
- transactions: Setting target to 0x0 when empty to during SequenceTxAbiEncode | ||
## 0.36.1 | ||
### Patch Changes | ||
- metadata: update client with more fields | ||
## 0.36.0 | ||
### Minor Changes | ||
- next release | ||
- relayer, wallet: fee quote support | ||
## 0.35.12 | ||
### Patch Changes | ||
- provider: rename wallet.commands to wallet.utils | ||
## 0.35.11 | ||
### Patch Changes | ||
- provider/utils: smoother message validation | ||
## 0.35.10 | ||
### Patch Changes | ||
- upgrade deps | ||
## 0.35.9 | ||
### Patch Changes | ||
- provider: window-transport override event handlers with new wallet instance | ||
## 0.35.8 | ||
### Patch Changes | ||
- provider: async wallet sign in improvements | ||
## 0.35.7 | ||
### Patch Changes | ||
- config: cache wallet configs | ||
## 0.35.6 | ||
### Patch Changes | ||
- provider: support async signin of wallet request handler | ||
## 0.35.5 | ||
### Patch Changes | ||
- wallet: skip threshold check during fee estimation | ||
## 0.35.4 | ||
### Patch Changes | ||
- - browser extension mode, center window | ||
## 0.35.3 | ||
### Patch Changes | ||
- - update window position when in browser extension mode | ||
## 0.35.2 | ||
### Patch Changes | ||
- - provider: WindowMessageHandler accept optional windowHref | ||
## 0.35.1 | ||
### Patch Changes | ||
- wallet: update config on undeployed too | ||
## 0.35.0 | ||
### Minor Changes | ||
- - config: add buildStubSignature | ||
- provider: add checks to signing cases for wallet deployment and config statuses | ||
- provider: add prompt for wallet deployment | ||
- relayer: add BaseRelayer.prependWalletDeploy | ||
- relayer: add Relayer.feeOptions | ||
- relayer: account for wallet deployment in fee estimation | ||
- transactions: add fromTransactionish | ||
- wallet: add Account.prependConfigUpdate | ||
- wallet: add Account.getFeeOptions | ||
## 0.34.0 | ||
### Minor Changes | ||
- - upgrade deps | ||
## 0.31.3 | ||
### Patch Changes | ||
- update metadata bindings | ||
## 0.31.0 | ||
### Minor Changes | ||
- - upgrading to ethers v5.5 | ||
## 0.30.0 | ||
### Minor Changes | ||
- - upgrade most deps | ||
## 0.29.8 | ||
### Patch Changes | ||
- update api | ||
## 0.29.1 | ||
### Patch Changes | ||
- metadata: ContractInfo.decimals is now optional, i.e. may be undefined | ||
api: new APIs for user storage and isUsingGoogleMail | ||
## 0.29.0 | ||
### Minor Changes | ||
- major architectural changes in Sequence design | ||
- only one API instance, API is no longer a per-chain service | ||
- separate per-chain indexer service, API no longer handles indexing | ||
- single contract metadata service, API no longer serves metadata | ||
chaind package has been removed, indexer and metadata packages have been added | ||
stronger typing with new explicit ChainId type | ||
multicall fixes and improvements | ||
forbid "wait" transactions in sendTransactionBatch calls |
@@ -1,1 +0,11 @@ | ||
export * from "./declarations/src/index"; | ||
// are you seeing an error that a default export doesn't exist but your source file has a default export? | ||
// you should run `yarn` or `yarn preconstruct dev` if preconstruct dev isn't in your postinstall hook | ||
// curious why you need to? | ||
// this file exists so that you can import from the entrypoint normally | ||
// except that it points to your source file and you don't need to run build constantly | ||
// which means we need to re-export all of the modules from your source file | ||
// and since export * doesn't include default exports, we need to read your source file | ||
// to check for a default export and re-export it if it exists | ||
// it's not ideal, but it works pretty well ¯\_(ツ)_/¯ | ||
export * from "../src/index"; |
@@ -1,7 +0,16 @@ | ||
'use strict'; | ||
"use strict"; | ||
// this file might look strange and you might be wondering what it's for | ||
// it's lets you import your source files by importing this entrypoint | ||
// as you would import it if it was built with preconstruct build | ||
// this file is slightly different to some others though | ||
// it has a require hook which compiles your code with Babel | ||
// this means that you don't have to set up @babel/register or anything like that | ||
// but you can still require this module and it'll be compiled | ||
if (process.env.NODE_ENV === "production") { | ||
module.exports = require("./0xsequence-metadata.cjs.prod.js"); | ||
} else { | ||
module.exports = require("./0xsequence-metadata.cjs.dev.js"); | ||
} | ||
// this bit of code imports the require hook and registers it | ||
let unregister = require("../../../node_modules/@preconstruct/hook").___internalHook(typeof __dirname === 'undefined' ? undefined : __dirname, "../../..", ".."); | ||
// this re-exports the source file | ||
module.exports = require("../src/index.ts"); | ||
unregister(); |
{ | ||
"name": "@0xsequence/metadata", | ||
"version": "0.0.0-2021827201516", | ||
"version": "0.0.0-20220412184039", | ||
"description": "metadata sub-package for Sequence", | ||
@@ -16,3 +16,3 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/metadata", | ||
"dependencies": { | ||
"cross-fetch": "^3.1.4" | ||
"cross-fetch": "^3.1.5" | ||
}, | ||
@@ -19,0 +19,0 @@ "peerDependencies": {}, |
@@ -8,5 +8,5 @@ export * from './metadata.gen' | ||
export class SequenceMetadataClient extends BaseSequenceMetadata { | ||
constructor(hostname: string) { | ||
super(hostname, fetch) | ||
constructor(hostname: string = 'https://metadata.sequence.app') { | ||
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch) | ||
} | ||
} |
/* eslint-disable */ | ||
// sequence-metadata v0.4.0 f1264bc1871ed85b966466b348374ace021d3723 | ||
// sequence-metadata v0.4.0 376fc6f21f770a4d0457a039d13b6aca6d174e3f | ||
// -- | ||
@@ -14,3 +14,3 @@ // This file has been generated by https://github.com/webrpc/webrpc using gen/typescript | ||
// Schema hash generated from your RIDL schema | ||
export const WebRPCSchemaHash = "f1264bc1871ed85b966466b348374ace021d3723" | ||
export const WebRPCSchemaHash = "376fc6f21f770a4d0457a039d13b6aca6d174e3f" | ||
@@ -21,2 +21,11 @@ | ||
// | ||
export enum ContractType { | ||
ERC20 = 'ERC20', | ||
ContractURI = 'ContractURI', | ||
OpenSea = 'OpenSea', | ||
ERC1155 = 'ERC1155', | ||
ERC721 = 'ERC721', | ||
UNKNOWN = 'UNKNOWN' | ||
} | ||
export enum SwapType { | ||
@@ -28,2 +37,7 @@ UNKNOWN = 'UNKNOWN', | ||
export enum SortOrder { | ||
DESC = 'DESC', | ||
ASC = 'ASC' | ||
} | ||
export interface Version { | ||
@@ -49,2 +63,9 @@ webrpcVersion: string | ||
export interface ContractIndex { | ||
chainId: string | ||
address: string | ||
type: ContractType | ||
metadata: {[key: string]: any} | ||
} | ||
export interface ContractInfo { | ||
@@ -56,3 +77,3 @@ chainId: number | ||
symbol: string | ||
decimals: number | ||
decimals?: number | ||
logoURI: string | ||
@@ -68,4 +89,13 @@ extensions: ContractInfoExtensions | ||
originAddress: string | ||
blacklist: boolean | ||
} | ||
export interface TokenIndex { | ||
chainId: string | ||
contractAddress: string | ||
tokenId: string | ||
metadata: {[key: string]: any} | ||
} | ||
export interface TokenMetadata { | ||
@@ -79,5 +109,8 @@ tokenId: string | ||
properties: {[key: string]: any} | ||
video: string | ||
audio: string | ||
image_data: string | ||
external_url: string | ||
background_color: string | ||
animation_url: string | ||
attributes: Array<{[key: string]: any}> | ||
@@ -92,2 +125,12 @@ } | ||
export interface Page { | ||
pageSize?: number | ||
page?: number | ||
} | ||
export interface SortBy { | ||
column: string | ||
order: SortOrder | ||
} | ||
export interface Metadata { | ||
@@ -99,2 +142,4 @@ ping(headers?: object): Promise<PingReturn> | ||
getTokenMetadataBatch(args: GetTokenMetadataBatchArgs, headers?: object): Promise<GetTokenMetadataBatchReturn> | ||
searchTokenMetadata(args: SearchTokenMetadataArgs, headers?: object): Promise<SearchTokenMetadataReturn> | ||
searchTokenIDs(args: SearchTokenIDsArgs, headers?: object): Promise<SearchTokenIDsReturn> | ||
getContractInfo(args: GetContractInfoArgs, headers?: object): Promise<GetContractInfoReturn> | ||
@@ -143,2 +188,24 @@ getContractInfoBatch(args: GetContractInfoBatchArgs, headers?: object): Promise<GetContractInfoBatchReturn> | ||
} | ||
export interface SearchTokenMetadataArgs { | ||
chainID: string | ||
contractAddress: string | ||
filter: string | ||
page?: Page | ||
} | ||
export interface SearchTokenMetadataReturn { | ||
page: Page | ||
tokenMetadata: Array<TokenMetadata> | ||
} | ||
export interface SearchTokenIDsArgs { | ||
chainID: string | ||
contractAddress: string | ||
filter: string | ||
page?: Page | ||
} | ||
export interface SearchTokenIDsReturn { | ||
page: Page | ||
tokenIds: Array<string> | ||
} | ||
export interface GetContractInfoArgs { | ||
@@ -275,2 +342,28 @@ chainID: string | ||
searchTokenMetadata = (args: SearchTokenMetadataArgs, headers?: object): Promise<SearchTokenMetadataReturn> => { | ||
return this.fetch( | ||
this.url('SearchTokenMetadata'), | ||
createHTTPRequest(args, headers)).then((res) => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
page: <Page>(_data.page), | ||
tokenMetadata: <Array<TokenMetadata>>(_data.tokenMetadata) | ||
} | ||
}) | ||
}) | ||
} | ||
searchTokenIDs = (args: SearchTokenIDsArgs, headers?: object): Promise<SearchTokenIDsReturn> => { | ||
return this.fetch( | ||
this.url('SearchTokenIDs'), | ||
createHTTPRequest(args, headers)).then((res) => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
page: <Page>(_data.page), | ||
tokenIds: <Array<string>>(_data.tokenIds) | ||
} | ||
}) | ||
}) | ||
} | ||
getContractInfo = (args: GetContractInfoArgs, headers?: object): Promise<GetContractInfoReturn> => { | ||
@@ -380,2 +473,2 @@ return this.fetch( | ||
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response> | ||
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response> |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1
1
18216
7
434
Updatedcross-fetch@^3.1.5