Skip to content
This repository was archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
fix: put imports from utils/tradetrust/ to tradetrust/
Browse files Browse the repository at this point in the history
  • Loading branch information
MinHtet-O committed May 28, 2024
1 parent 54e3e16 commit 19e7b28
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 38 deletions.
40 changes: 37 additions & 3 deletions src/tradetrust/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,29 @@ import {
isSchemaValidationError,
wrapDocuments as wrapDocumentsV2,
__unsafe__use__it__at__your__own__risks__wrapDocuments as wrapDocumentsV3,
utils,
} from '@tradetrust-tt/tradetrust'

// Re-export everything
export type { WrappedDocument, SignedWrappedDocument }
import type { DiagnoseError } from '@tradetrust-tt/tradetrust/dist/types/shared/utils'

const {
isTransferableAsset,
getAssetId,
isWrappedV2Document,
isSignedWrappedV2Document,
isWrappedV3Document,
isSignedWrappedV3Document,
isRawV2Document,
isRawV3Document,
isObfuscated,
getDocumentData,
getIssuerAddress,
diagnose,
} = utils

export type { WrappedDocument, SignedWrappedDocument, OpenAttestationDocument }
export {
validateSchema,
OpenAttestationDocument,
obfuscateDocument,
verifySignature,
signDocument,
Expand All @@ -34,3 +50,21 @@ export {
SchemaId,
SUPPORTED_SIGNING_ALGORITHM,
}

// utils
export {
isTransferableAsset,
getAssetId,
isWrappedV2Document,
isSignedWrappedV2Document,
isWrappedV3Document,
isSignedWrappedV3Document,
isRawV2Document,
isRawV3Document,
isObfuscated,
getDocumentData,
getIssuerAddress,
diagnose,
}

export type { DiagnoseError }
1 change: 0 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export * from './fragement'
export * from './analytics'
export * from './constants/supportedChains'
export * from './provider/provider'
export * from './tradetrust'
export * from './wallet'

export { CONSTANTS }
34 changes: 0 additions & 34 deletions src/utils/tradetrust/index.ts

This file was deleted.

0 comments on commit 19e7b28

Please sign in to comment.