@yoroi/types
Version:
The Yoroi Types package of Yoroi SDK
112 lines (109 loc) • 3.69 kB
Flow
/**
* Flowtype definitions for cardano
* Generated by Flowgen from a Typescript Definition
* Flowgen v1.21.0
*/
export type ApiMetadataFile = {
name?: string,
mediaType: string,
src: string | Array<string>,
[key: string]: mixed,
};export type ApiNftMetadata = {
name: string,
image: string | Array<string>,
mediaType?: string,
description?: string | Array<string>,
files?: Array<ApiMetadataFile>,
[key: string]: mixed,
};export type ApiFtMetadata = {
name: string,
description?: string | Array<string>,
policy?: string,
logo?: string | Array<string>,
decimals?: number,
ticker?: string,
url?: string,
[key: string]: mixed,
};export type ApiMetadataVersion = {
version?: string,...
};export type ApiTokenId = undefined: /* NO PRINT IMPLEMENTED: TemplateLiteralType */ any;export type ApiFutureTokenRecords = {
[tokenId: string]: ApiFutureToken,
};export type ApiFutureToken = {
supply: ApiTokenSupplyRecord,
offChain: ApiOffChainMetadataRecord,
onChain: ApiOnChainMetadataRecord,...
};export type ApiOffChainMetadataRequest = $ReadOnlyArray<ApiTokenId>;export type ApiOffChainMetadataResponse = {
[tokenId: ApiTokenId]: ApiOffChainMetadataRecord,
};export type ApiOffChainMetadataRecord = {
tokenRegistry: {[key: string]: mixed, ...} | void,
isValid: false,...
} | {
tokenRegistry: ApiTokenRegistryEntry,
isValid: true,...
};export type ApiTokenRegistryEntry = {
subject: string,
name: ApiTokenRegistryProperty<string>,
description?: ApiTokenRegistryProperty<string>,
policy?: string,
logo?: ApiTokenRegistryProperty<string>,
ticker?: ApiTokenRegistryProperty<string>,
url?: ApiTokenRegistryProperty<string>,
decimals?: ApiTokenRegistryProperty<number>,...
};declare type ApiTokenRegistrySignature = {
publicKey: string,
signature: string,...
};export type ApiTokenRegistryProperty<T> = {
signatures: Array<ApiTokenRegistrySignature>,
sequenceNumber: number,
value?: T,...
};export type ApiOnChainMetadataRequest = $ReadOnlyArray<ApiTokenId>;export type ApiOnChainMetadataResponse = {
[tokenId: ApiTokenId]: ApiOnChainMetadataRecord,
};export type ApiOnChainMetadataRecord = { ...ApiOnChainFtMetadataResult,...ApiOnChainNftMetadataResult };export type ApiOnChainFtMetadataResult = {
mintFtMetadata: ApiFtMetadataRecord,
mintFtRecordSelected: ApiFtMetadata,...
} | {
mintFtMetadata: {[key: string]: mixed, ...} | void,
mintFtRecordSelected: void,...
};export type ApiOnChainNftMetadataResult = {
mintNftMetadata: ApiNftMetadataRecord,
mintNftRecordSelected: ApiNftMetadata,...
} | {
mintNftMetadata: {[key: string]: mixed, ...} | void,
mintNftRecordSelected: void,...
};export type ApiMetadataRecord = ApiFtMetadataRecord | ApiNftMetadataRecord;export interface ApiNftRecords {
[policyId: string]: {
[assetName: string]: ApiNftMetadata,
},
} export type ApiNftMetadataRecord = {
key: "721",
metadata: { ...ApiMetadataVersion,...ApiNftRecords },...
};export interface ApiFtRecords {
[policyId: string]: {
[assetName: string]: ApiFtMetadata,
},
} export type ApiFtMetadataRecord = {
key: "20",
metadata: { ...ApiMetadataVersion,...ApiFtRecords },...
};export type ApiTokeSupplyRequest = $ReadOnlyArray<ApiTokenId>;export type ApiTokenSupplyResponse = {
[tokenId: ApiTokenId]: ApiTokenSupplyRecord,
};export type ApiTokenSupplyRecord = string | null;export type ApiTokenIdentity = {
policyId: string,
name: string,
nameHex: string,...
};export type ApiUtxoDataRequest = {
txHash: string,
txIndex: number,...
};export type ApiUtxoDataAsset = {
assetId: string,
policyId: string,
name: string,
amount: string,...
};export type ApiUtxoData = {
output: {
address: string,
amount: string,
dataHash: string | null,
assets: Array<ApiUtxoDataAsset>,...
},
spendingTxHash: string | null,...
};