sudt: {
    issueToken: ((txSkeleton, fromInfo, amount, capacity?, tipHeader?, options?) => Promise<TransactionSkeletonType>);
    ownerForSudt: ((fromInfo, options?) => Token);
    packAmount: ((amount) => HexString);
    transfer: ((txSkeleton, fromInfos, sudtToken, toAddress, amount, changeAddress?, capacity?, tipHeader?, options?) => Promise<TransactionSkeletonType>);
    unpackAmount: ((data) => BI);
}

Type declaration

  • issueToken: ((txSkeleton, fromInfo, amount, capacity?, tipHeader?, options?) => Promise<TransactionSkeletonType>)
  • ownerForSudt: ((fromInfo, options?) => Token)
      • (fromInfo, options?): Token
      • Compute sudt token by owner from info.

        Parameters

        Returns Token

  • packAmount: ((amount) => HexString)
  • transfer: ((txSkeleton, fromInfos, sudtToken, toAddress, amount, changeAddress?, capacity?, tipHeader?, options?) => Promise<TransactionSkeletonType>)
      • (txSkeleton, fromInfos, sudtToken, toAddress, amount, changeAddress?, capacity?, tipHeader?, options?): Promise<TransactionSkeletonType>
      • Parameters

        • txSkeleton: TransactionSkeletonType
        • fromInfos: FromInfo[]
        • sudtToken: string
        • toAddress: string
        • amount: BIish
        • Optional changeAddress: string

          if not provided, will use first fromInfo

        • Optional capacity: BIish
        • Optional tipHeader: Header
        • options: Options & {
              LocktimePoolCellCollector?: any;
              splitChangeCell?: boolean;
          } = {}

          When splitChangeCell = true && change amount > 0 && change capacity >= minimalCellCapacity(change cell with sudt) + minimalCellCapacity(change cell without sudt), change cell will split to two change cells, one with sudt and one without.

        Returns Promise<TransactionSkeletonType>

  • unpackAmount: ((data) => BI)

Generated using TypeDoc