mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
add Arweave/Ipfs/Smartcontract data types (#1612)
This commit is contained in:
parent
192e0a736d
commit
b6c9af9dae
@ -1,3 +1,4 @@
|
|||||||
|
import { AbiItem } from 'web3-utils'
|
||||||
export interface UrlFile {
|
export interface UrlFile {
|
||||||
type: 'url'
|
type: 'url'
|
||||||
|
|
||||||
@ -41,8 +42,50 @@ export interface GraphqlQuery {
|
|||||||
query: string
|
query: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Arweave {
|
||||||
|
type: 'arweave'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* transactionId
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
transactionId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Ipfs {
|
||||||
|
type: 'ipfs'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hash
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
hash: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Smartcontract {
|
||||||
|
type: 'smartcontract'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Smartcontract address
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
address: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ChainId
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
chainId: number
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function ABI (not the entire smartcontract abi)
|
||||||
|
* @type {AbiItem}
|
||||||
|
*/
|
||||||
|
abi: AbiItem
|
||||||
|
}
|
||||||
|
|
||||||
export interface Files {
|
export interface Files {
|
||||||
nftAddress: string
|
nftAddress: string
|
||||||
datatokenAddress: string
|
datatokenAddress: string
|
||||||
files: UrlFile[] | GraphqlQuery[]
|
files: UrlFile[] | GraphqlQuery[] | Arweave[] | Smartcontract[] | Ipfs[]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user