@replicode/parallax
Advanced tools
Comparing version 1.1.59 to 1.1.60
@@ -5,11 +5,3 @@ import { ParallaxModule } from './parallax.module'; | ||
import { Parallax } from './parallax.model'; | ||
import { APIKey } from './entities/api_key'; | ||
import { Project } from './entities/project'; | ||
import { Collection } from './entities/collection'; | ||
import { Txn } from './entities/txn'; | ||
import { TxnERC20 } from './entities/txn_erc20'; | ||
import { TxnERC721 } from './entities/txn_erc721'; | ||
import { TxnInternal } from './entities/txn_internal'; | ||
import { Wallet } from './entities/wallet'; | ||
export { ParallaxModule, ParallaxService, ParallaxOptions, Parallax, APIKey, Project, Collection, Txn, TxnERC20, TxnERC721, TxnInternal, Wallet }; | ||
export { ParallaxModule, ParallaxService, ParallaxOptions, Parallax }; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,3 +0,124 @@ | ||
import { Collection } from './entities/collection'; | ||
export declare namespace Parallax { | ||
interface APIKey { | ||
id: string; | ||
hash: string; | ||
project: Project; | ||
} | ||
interface Collection { | ||
id: string; | ||
lastUpdated: number; | ||
blockchain: string; | ||
network: string; | ||
contractAddress: string; | ||
slug: string; | ||
name: string; | ||
imageURL: string; | ||
isVerified: boolean; | ||
} | ||
interface Project { | ||
id: string; | ||
name: string; | ||
description: string; | ||
api_keys: APIKey[]; | ||
} | ||
interface Txn { | ||
hash: string; | ||
block: string; | ||
blockHash: string; | ||
timestamp: number; | ||
nonce: string; | ||
index: string; | ||
from: string; | ||
to: string; | ||
value: string; | ||
gas: string; | ||
gasPrice: string; | ||
gasUsed: string; | ||
cumulativeGasUsed: string; | ||
isError: string; | ||
status: string; | ||
contract: string; | ||
confirmations: string; | ||
internal?: TxnInternal[]; | ||
erc20?: TxnERC20[]; | ||
erc721?: TxnERC721[]; | ||
} | ||
interface TxnERC20 { | ||
id: string; | ||
hash: string; | ||
timestamp: number; | ||
block: string; | ||
blockHash: string; | ||
nonce: string; | ||
from: string; | ||
to: string; | ||
value: string; | ||
contract: string; | ||
tokenName: string; | ||
tokenSymbol: string; | ||
tokenDecimal: string; | ||
transactionIndex: string; | ||
gas: string; | ||
gasPrice: string; | ||
gasUsed: string; | ||
cumulativeGasUsed: string; | ||
confirmations: string; | ||
txn: Txn; | ||
txns_erc721: TxnERC721[]; | ||
} | ||
interface TxnERC721 { | ||
id: string; | ||
hash: string; | ||
block: string; | ||
timestamp: number; | ||
nonce: string; | ||
blockHash: string; | ||
from: string; | ||
to: string; | ||
contract: string; | ||
tokenID: string; | ||
tokenName: string; | ||
tokenSymbol: string; | ||
tokenDecimal: string; | ||
transactionIndex: string; | ||
gas: string; | ||
gasPrice: string; | ||
gasUsed: string; | ||
cumulativeGasUsed: string; | ||
input: string; | ||
confirmations: string; | ||
txn: Txn; | ||
txns_internal?: TxnInternal[]; | ||
txns_erc20?: TxnERC20[]; | ||
} | ||
interface TxnInternal { | ||
id: string; | ||
hash: string; | ||
block: string; | ||
timestamp: number; | ||
from: string; | ||
to: string; | ||
value: string; | ||
contract: string; | ||
input: string; | ||
type: string; | ||
gas: string; | ||
gasUsed: string; | ||
traceId: string; | ||
isError: string; | ||
errCode: string; | ||
txn: Txn; | ||
txns_erc721: TxnERC721[]; | ||
} | ||
interface Wallet { | ||
id: string; | ||
blockchain: string; | ||
network: string; | ||
address: string; | ||
lastSynced: number; | ||
lastSyncedBlock: number; | ||
lastSyncedBlockERC721: number; | ||
lastSyncedBlockERC20: number; | ||
lastSyncedBlockInternal: number; | ||
} | ||
interface NFTTransfer { | ||
@@ -4,0 +125,0 @@ block_number: string; |
import { ParallaxOptions } from './parallax.options'; | ||
import { Parallax } from './parallax.model'; | ||
import { Collection } from './entities/collection'; | ||
import { TxnERC721 } from './entities/txn_erc721'; | ||
import { Wallet } from './entities/wallet'; | ||
export declare class ParallaxService { | ||
@@ -12,9 +9,9 @@ private options; | ||
searchNFT(query: string): Promise<Parallax.NFTRecord[]>; | ||
userWallets(userID: string): Promise<Wallet[]>; | ||
userWallets(userID: string): Promise<Parallax.Wallet[]>; | ||
removeWallet(userID: string, chain: string, address: string): Promise<Boolean>; | ||
removeAllWallets(userID: string): Promise<Boolean>; | ||
collection(collectionID: string): Promise<Collection>; | ||
collection(collectionID: string): Promise<Parallax.Collection>; | ||
addWallet(blockchain: string, network: string, address: string): Promise<boolean>; | ||
getWalletNFTTxns(walletID: string): Promise<TxnERC721[]>; | ||
getWalletNFTTxns(walletID: string): Promise<Parallax.TxnERC721[]>; | ||
} | ||
//# sourceMappingURL=parallax.service.d.ts.map |
{ | ||
"name": "@replicode/parallax", | ||
"version": "1.1.59", | ||
"version": "1.1.60", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
@@ -5,10 +5,2 @@ import { ParallaxModule } from './parallax.module'; | ||
import { Parallax } from './parallax.model'; | ||
import { APIKey } from './entities/api_key'; | ||
import { Project } from './entities/project'; | ||
import { Collection } from './entities/collection'; | ||
import { Txn } from './entities/txn'; | ||
import { TxnERC20 } from './entities/txn_erc20'; | ||
import { TxnERC721 } from './entities/txn_erc721'; | ||
import { TxnInternal } from './entities/txn_internal'; | ||
import { Wallet } from './entities/wallet'; | ||
@@ -20,11 +12,3 @@ | ||
ParallaxOptions, | ||
Parallax, | ||
APIKey, | ||
Project, | ||
Collection, | ||
Txn, | ||
TxnERC20, | ||
TxnERC721, | ||
TxnInternal, | ||
Wallet | ||
Parallax | ||
}; |
@@ -1,5 +0,134 @@ | ||
import { Collection } from './entities/collection'; | ||
export namespace Parallax { | ||
export interface APIKey { | ||
id: string | ||
hash: string | ||
project: Project | ||
} | ||
export interface Collection { | ||
id: string | ||
lastUpdated: number | ||
blockchain: string | ||
network: string | ||
contractAddress: string | ||
slug: string | ||
name: string | ||
imageURL: string | ||
isVerified: boolean | ||
} | ||
export interface Project { | ||
id: string | ||
name: string | ||
description:string | ||
api_keys: APIKey[] | ||
} | ||
export interface Txn { | ||
hash: string | ||
block: string | ||
blockHash: string | ||
timestamp: number | ||
nonce: string | ||
index: string | ||
from: string | ||
to: string | ||
value: string | ||
gas: string | ||
gasPrice: string | ||
gasUsed: string | ||
cumulativeGasUsed: string | ||
isError: string | ||
status: string | ||
contract: string | ||
confirmations: string | ||
internal?: TxnInternal[] | ||
erc20?: TxnERC20[] | ||
erc721?: TxnERC721[] | ||
} | ||
export interface TxnERC20 { | ||
id: string | ||
hash: string | ||
timestamp: number | ||
block: string | ||
blockHash: string | ||
nonce: string | ||
from: string | ||
to: string | ||
value: string | ||
contract: string | ||
tokenName: string | ||
tokenSymbol: string | ||
tokenDecimal: string | ||
transactionIndex: string | ||
gas: string | ||
gasPrice: string | ||
gasUsed: string | ||
cumulativeGasUsed: string | ||
confirmations: string | ||
txn: Txn, | ||
txns_erc721: TxnERC721[] | ||
} | ||
export interface TxnERC721 { | ||
id: string | ||
hash: string | ||
block: string | ||
timestamp: number | ||
nonce: string | ||
blockHash: string | ||
from: string | ||
to: string | ||
contract: string | ||
tokenID: string | ||
tokenName: string | ||
tokenSymbol: string | ||
tokenDecimal: string | ||
transactionIndex: string | ||
gas: string | ||
gasPrice: string | ||
gasUsed: string | ||
cumulativeGasUsed: string | ||
input: string | ||
confirmations: string | ||
txn: Txn | ||
txns_internal?: TxnInternal[] | ||
txns_erc20?: TxnERC20[] | ||
} | ||
export interface TxnInternal { | ||
id: string | ||
hash: string | ||
block: string | ||
timestamp: number | ||
from: string | ||
to: string | ||
value: string | ||
contract: string | ||
input: string | ||
type: string | ||
gas: string | ||
gasUsed: string | ||
traceId: string | ||
isError: string | ||
errCode: string | ||
txn: Txn | ||
txns_erc721: TxnERC721[] | ||
} | ||
export interface Wallet { | ||
id: string | ||
blockchain: string | ||
network: string | ||
address: string | ||
lastSynced: number | ||
lastSyncedBlock: number | ||
lastSyncedBlockERC721: number | ||
lastSyncedBlockERC20: number | ||
lastSyncedBlockInternal: number | ||
} | ||
export interface NFTTransfer { | ||
@@ -6,0 +135,0 @@ block_number: string |
@@ -8,5 +8,2 @@ import { Injectable, Logger } from '@nestjs/common'; | ||
import { Parallax } from './parallax.model'; | ||
import { Collection } from './entities/collection'; | ||
import { TxnERC721 } from './entities/txn_erc721'; | ||
import { Wallet } from './entities/wallet'; | ||
@@ -93,3 +90,3 @@ const HEADER_API_KEY = 'X-API-KEY'; | ||
async userWallets(userID:string):Promise<Wallet[]> { | ||
async userWallets(userID:string):Promise<Parallax.Wallet[]> { | ||
let route = `/user/wallet`; | ||
@@ -104,3 +101,3 @@ const headers = {}; | ||
}); | ||
let wallets:Wallet[] = response.data as Wallet[]; | ||
let wallets:Parallax.Wallet[] = response.data as Parallax.Wallet[]; | ||
return wallets; | ||
@@ -154,3 +151,3 @@ | ||
async collection(collectionID:string):Promise<Collection> { | ||
async collection(collectionID:string):Promise<Parallax.Collection> { | ||
@@ -161,3 +158,3 @@ let route = `/nft/collection/${collectionID}`; | ||
let response:AxiosResponse = await this.client.get(route); | ||
let data: Collection = response.data as Collection; | ||
let data: Parallax.Collection = response.data as Parallax.Collection; | ||
return data; | ||
@@ -204,3 +201,3 @@ | ||
async getWalletNFTTxns(walletID: string):Promise<TxnERC721[]> { | ||
async getWalletNFTTxns(walletID: string):Promise<Parallax.TxnERC721[]> { | ||
@@ -211,3 +208,3 @@ let route = `/wallet/${walletID}/nfttxns`; | ||
let response:AxiosResponse = await this.client.get(route); | ||
let txns: TxnERC721[] = response.data as TxnERC721[]; | ||
let txns: Parallax.TxnERC721[] = response.data as Parallax.TxnERC721[]; | ||
return txns; | ||
@@ -214,0 +211,0 @@ } catch (e) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
41544
27
969