Skip to content

Commit

Permalink
add Arweave/Ipfs/Smartcontract data types (#1612)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcos20 authored Sep 20, 2022
1 parent 192e0a7 commit b6c9af9
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion src/@types/File.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AbiItem } from 'web3-utils'
export interface UrlFile {
type: 'url'

Expand Down Expand Up @@ -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[]
}

0 comments on commit b6c9af9

Please sign in to comment.