From b6c9af9dae67c94cf31d2a23dea47a08d9e1b046 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Tue, 20 Sep 2022 10:52:38 +0300 Subject: [PATCH] add Arweave/Ipfs/Smartcontract data types (#1612) --- src/@types/File.ts | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/@types/File.ts b/src/@types/File.ts index 481606f7f..5895b0b56 100644 --- a/src/@types/File.ts +++ b/src/@types/File.ts @@ -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[] }