Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Core

Hierarchy

  • Core

Index

Constructors

constructor

  • new Core(params: object): Core

Properties

classes

classes: object = Core.classes

Type declaration

Methods

createAssetOutPoint

  • Parameters

    • params: object
      • assetType: H160Value
      • index: number
      • quantity: U64Value
      • shardId: number
      • tracker: H256Value

    Returns AssetOutPoint

createAssetScheme

  • Creates asset's scheme.

    throws

    Given string for approver is invalid for converting it to paltform account

    throws

    Given string for registrar is invalid for converting it to paltform account

    Parameters

    • params: object
      • Optional allowedScriptHashes?: H160[]
      • Optional approver?: PlatformAddressValue

        Platform account or null. If account is present, the tx that includes AssetTransferTransaction of this asset must be signed by the approver account.

      • metadata: string | object

        Any string that describing the asset. For example, stringified JSON containing properties.

      • Optional pool?: object[]
      • Optional registrar?: PlatformAddressValue

        Platform account or null. The registrar can transfer the asset without unlocking.

      • shardId: number
      • supply: U64Value

        Total supply of this asset

    Returns AssetScheme

createAssetTransferInput

createAssetTransferOutput

createChangeAssetSchemeTransaction

createCreateShardTransaction

  • createCreateShardTransaction(params: object): CreateShard
  • Creates CreateShard type which can create new shard

    Parameters

    • params: object
      • users: Array<PlatformAddressValue>

    Returns CreateShard

createCustomTransaction

  • createCustomTransaction(params: object): Custom
  • Creates Custom type that will be handled by a specified type handler

    throws

    Given number for handlerId is invalid for converting it to U64

    Parameters

    • params: object
      • bytes: Buffer

        A custom transaction body

      • handlerId: number

        An Id of an type handler which will handle a custom transaction

    Returns Custom

createIncreaseAssetSupplyTransaction

  • Parameters

    • params: object
      • Optional approvals?: string[]
      • assetType: H160Value
      • recipient: AssetAddressValue
      • shardId: number
      • Optional supply?: U64Value

    Returns IncreaseAssetSupply

createMintAssetTransaction

  • createMintAssetTransaction(params: object): MintAsset

createOrder

  • createOrder(params: object & object | object & __type | object | object): Order
  • Parameters

    • params: object & object | object & __type | object | object

    Returns Order

createOrderOnTransfer

createPayTransaction

  • createPayTransaction(params: object): Pay
  • Creates Pay type which pays the value quantity of CCC(CodeChain Coin) from the tx signer to the recipient. Who is signing the tx will pay.

    throws

    Given string for recipient is invalid for converting it to PlatformAddress

    throws

    Given number or string for quantity is invalid for converting it to U64

    Parameters

    • params: object
      • quantity: U64Value

        quantity of CCC to pay

      • recipient: PlatformAddressValue

        The platform account who receives CCC

    Returns Pay

createRemoveTransaction

  • createRemoveTransaction(params: object | object): Remove
  • Creates Remove type which remove the text from the chain.

    throws

    Given string for hash or secret is invalid for converting it to H256

    Parameters

    • params: object | object

    Returns Remove

createSetRegularKeyTransaction

  • Creates SetRegularKey type which sets the regular key of the tx signer.

    throws

    Given string for key is invalid for converting it to H512

    Parameters

    • params: object
      • key: H512Value

        The public key of a regular key

    Returns SetRegularKey

createSetShardOwnersTransaction

createSetShardUsersTransaction

  • Create SetShardUser type which can change shard users

    Parameters

    • params: object
      • shardId: number
      • users: Array<PlatformAddressValue>

    Returns SetShardUsers

createStoreTransaction

  • createStoreTransaction(params: object | object): Store
  • Creates Store type which store content with certifier on chain.

    throws

    Given string for secret is invalid for converting it to H256

    Parameters

    • params: object | object

    Returns Store

createTransferAssetTransaction

  • createTransferAssetTransaction(params?: undefined | object): TransferAsset

createUnwrapCCCTransaction

  • createUnwrapCCCTransaction(params: object): UnwrapCCC

createWrapCCCTransaction

  • createWrapCCCTransaction(params: object | object): WrapCCC
  • Creates Wrap CCC type which wraps the value quantity of CCC(CodeChain Coin) in a wrapped CCC asset. Who is signing the tx will pay.

    throws

    Given string for a lock script hash is invalid for converting it to H160

    throws

    Given number or string for quantity is invalid for converting it to U64

    Parameters

    • params: object | object

    Returns WrapCCC

Object literals

Static classes

classes: object

Asset

Asset: Asset

AssetAddress

AssetAddress: AssetAddress

AssetOutPoint

AssetOutPoint: AssetOutPoint

AssetScheme

AssetScheme: AssetScheme

AssetTransferInput

AssetTransferInput: AssetTransferInput

AssetTransferOutput

AssetTransferOutput: AssetTransferOutput

Block

Block: Block

CreateShard

CreateShard: CreateShard

Custom

Custom: Custom

H128

H128: H128

H160

H160: H160

H256

H256: H256

H512

H512: H512

Pay

Pay: Pay

PlatformAddress

PlatformAddress: PlatformAddress

Remove

Remove: Remove

Script

Script: Script

SetRegularKey

SetRegularKey: SetRegularKey

SetShardOwners

SetShardOwners: SetShardOwners

SetShardUsers

SetShardUsers: SetShardUsers

SignedTransaction

SignedTransaction: SignedTransaction

Store

Store: Store

Transaction

Transaction: Transaction

U256

U256: U256

U64

U64: U64

WrapCCC

WrapCCC: WrapCCC

Generated using TypeDoc