1
0
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:
Alex Coseru 2022-09-20 10:52:38 +03:00 committed by GitHub
parent 192e0a736d
commit b6c9af9dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
import { AbiItem } from 'web3-utils'
export interface UrlFile {
type: 'url'
@ -41,8 +42,50 @@ export interface GraphqlQuery {
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 {
nftAddress: string
datatokenAddress: string
files: UrlFile[] | GraphqlQuery[]
files: UrlFile[] | GraphqlQuery[] | Arweave[] | Smartcontract[] | Ipfs[]
}