Options
All
  • Public
  • Public/Protected
  • All
Menu

pocket-universe-js

Index

Type aliases

ERC1155

ERC1155: { from: string; id: string; operator: string; to: string; type: "transferSingle"; value: string } | { from: string; id: string[]; operator: string; to: string; type: "transferBatch"; value: string[] } | { approved: boolean; from: string; to: string; type: "approvalForAll" }

ERC20

ERC20: { amount: string; from: string; to: string; type: "transfer" } | { amount: string; from: string; to: string; type: "approval" }

ERC721

ERC721: { from: string; id: string; to: string; type: "transfer" } | { from: string; id: string; to: string; type: "approval" } | { approved: boolean; from: string; to: string; type: "approvalForAll" } | { from: string; from_id: string; to: string; to_id: string; type: "consecutiveTransfer" }

Metadata

Metadata: { erc20: Record<string, TokenMetadataResponse>; nft: Record<string, NftMetadata> }

Type declaration

  • erc20: Record<string, TokenMetadataResponse>

    Mapping from contract address in hex to token metadata.

    should exist for all ERC20 contracts that appear in the Simulation. Calling code needs to prepare for it not existing due to metadata retrieval failures.

  • nft: Record<string, NftMetadata>

    Mapping from contract address in hex to nft metadata.

    Same as above, this should exist for all erc721/1155.

NftMetadata

NftMetadata: { contract: NftContract; nfts: Record<string, Nft> }

Metadata containing both contract information and token information.

Type declaration

  • contract: NftContract

    Information about this contract.

  • nfts: Record<string, Nft>

    Mapping of token id in hex to token metadata.

Result

Result: { metadata?: Metadata; simulation: Simulation }

Result of a simulation that optionally includes metadata. The Metadata can be undefined if 1: we did not request metadata. 2. the metadata retrieval failed.

Caller code needs to handle cases where Metadata fails with placeholder images.

Type declaration

  • Optional metadata?: Metadata

    Optional metadata.

  • simulation: Simulation

    Simulation that ran.

SimulateOptions

SimulateOptions: { metadata: boolean }

Type declaration

  • metadata: boolean

Simulation

Simulation: { message?: string | null; type: "revert" } | { erc1155: {}; erc20: {}; erc721: {}; native: Native[]; type: "success" }

This file was automatically generated by json-schema-to-typescript. DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, and run json-schema-to-typescript to regenerate this file. This file was automatically generated by json-schema-to-typescript. DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, and run json-schema-to-typescript to regenerate this file.

Object literals

Const OPTIONS_DEFAULTS

OPTIONS_DEFAULTS: object

metadata

metadata: true = true

Generated using TypeDoc