default: {
    anyoneCanPay: {
        CellCollector: CellCollectorConstructor;
        injectCapacity: ((cellCollector, txSkeleton, outputIndex, capacity, __namedParameters?) => Promise<TransactionSkeletonType>);
        prepareSigningEntries: ((txSkeleton, __namedParameters?) => TransactionSkeletonType);
        setupInputCell: ((txSkeleton, inputCell, _fromInfo?, __namedParameters?) => Promise<TransactionSkeletonType>);
        setupOutputCell: ((txSkeleton, outputCell, __namedParameters?) => Promise<TransactionSkeletonType>);
        withdraw: ((txSkeleton, fromInput, toAddress, capacity, __namedParameters?) => Promise<TransactionSkeletonType>);
    };
    common: {
        __tests__: {
            _commonTransfer: ((txSkeleton, fromInfos, amount, minimalChangeCapacity, __namedParameters?) => Promise<{
                capacity: bigint;
                changeCapacity: bigint;
                txSkeleton: TransactionSkeletonType;
            }>);
            calculateFee: ((size, feeRate) => bigint);
            calculateFeeCompatible: ((size, feeRate) => BI);
            generateLockScriptInfos: ((__namedParameters?) => void);
            getLockScriptInfos: (() => LockScriptInfosType);
            getTransactionSize: ((txSkeleton) => number);
            getTransactionSizeByTx: ((tx) => number);
            resetLockScriptInfos: (() => void);
        };
        injectCapacity: ((txSkeleton, fromInfos, amount, changeAddress?, tipHeader?, __namedParameters?) => Promise<TransactionSkeletonType>);
        payFee: ((txSkeleton, fromInfos, amount, tipHeader?, __namedParameters?) => Promise<TransactionSkeletonType>);
        payFeeByFeeRate: ((txSkeleton, fromInfos, feeRate, tipHeader?, __namedParameters?) => Promise<TransactionSkeletonType>);
        prepareSigningEntries: ((txSkeleton, __namedParameters?) => TransactionSkeletonType);
        registerCustomLockScriptInfos: ((infos) => void);
        setupInputCell: ((txSkeleton, inputCell, fromInfo?, options?) => Promise<TransactionSkeletonType>);
        transfer: ((txSkeleton, fromInfos, toAddress, amount, changeAddress?, tipHeader?, options?) => Promise<TransactionSkeletonType>);
    };
    dao: {
        CellCollector: typeof CellCollector;
        calculateDaoEarliestSince: ((depositBlockHeaderEpoch, withdrawBlockHeaderEpoch) => bigint);
        calculateDaoEarliestSinceCompatible: ((depositBlockHeaderEpoch, withdrawBlockHeaderEpoch) => BI);
        calculateMaximumWithdraw: ((withdrawCell, depositDao, withdrawDao) => bigint);
        calculateMaximumWithdrawCompatible: ((withdrawCell, depositDao, withdrawDao) => BI);
        deposit: ((txSkeleton, fromInfo, toAddress, amount, options?) => Promise<TransactionSkeletonType>);
        listDaoCells: ((cellProvider, fromAddress, cellType, options?) => AsyncIterator<Cell>);
        unlock: ((txSkeleton, depositInput, withdrawInput, toAddress, fromInfo, options?) => Promise<TransactionSkeletonType>);
        withdraw: ((txSkeleton, fromInput, fromInfo?, options?) => Promise<TransactionSkeletonType>);
    };
    locktimePool: {
        CellCollector: CellCollectorConstructor;
        injectCapacity: ((txSkeleton, outputIndex, fromInfos, tipHeader, __namedParameters?) => Promise<TransactionSkeletonType>);
        injectCapacityWithoutChange: ((txSkeleton, fromInfos, amount, tipHeader, minimalChangeCapacity, __namedParameters) => Promise<{
            capacity: bigint;
            changeCapacity: bigint;
            txSkeleton: TransactionSkeletonType;
        }>);
        injectCapacityWithoutChangeCompatible: ((txSkeleton, fromInfos, amount, tipHeader, minimalChangeCapacity, __namedParameters) => Promise<{
            capacity: BI;
            changeCapacity: BI;
            txSkeleton: TransactionSkeletonType;
        }>);
        payFee: ((txSkeleton, fromInfos, amount, tipHeader, __namedParameters?) => Promise<TransactionSkeletonType>);
        prepareSigningEntries: ((txSkeleton, __namedParameters?) => TransactionSkeletonType);
        setupInputCell: ((txSkeleton, inputCell, fromInfo?, __namedParameters?) => Promise<TransactionSkeletonType>);
        transfer: {
            (txSkeleton, fromInfos, toAddress, amount, tipHeader, __namedParameters): Promise<TransactionSkeletonType>;
            (txSkeleton, fromInfos, toAddress, amount, tipHeader, __namedParameters): Promise<[TransactionSkeletonType, bigint]>;
        };
        transferCompatible: {
            (txSkeleton, fromInfos, toAddress, amount, tipHeader, __namedParameters): Promise<TransactionSkeletonType>;
            (txSkeleton, fromInfos, toAddress, amount, tipHeader, __namedParameters): Promise<[TransactionSkeletonType, BI]>;
        };
    };
    secp256k1Blake160: {
        CellCollector: CellCollectorConstructor;
        injectCapacity: ((txSkeleton, outputIndex, fromAddress, options?) => Promise<TransactionSkeletonType>);
        payFee: ((txSkeleton, fromAddress, amount, options?) => Promise<TransactionSkeletonType>);
        prepareSigningEntries: ((txSkeleton, options?) => TransactionSkeletonType);
        setupInputCell: ((txSkeleton, inputCell, _fromInfo?, options?) => Promise<TransactionSkeletonType>);
        transfer: {
            (txSkeleton, fromAddress, toAddress, amount, options?): Promise<TransactionSkeletonType>;
            (txSkeleton, fromAddress, toAddress, amount, options): Promise<[TransactionSkeletonType, bigint]>;
        };
        transferCompatible: {
            (txSkeleton, fromAddress, toAddress, amount, options?): Promise<TransactionSkeletonType>;
            (txSkeleton, fromAddress, toAddress, amount, options): Promise<[TransactionSkeletonType, BI]>;
        };
    };
    secp256k1Blake160Multisig: {
        CellCollector: CellCollectorConstructor;
        injectCapacity: ((txSkeleton, outputIndex, fromInfo, options?) => Promise<TransactionSkeletonType>);
        multisigArgs: ((serializedMultisigScript, since?) => HexString);
        payFee: ((txSkeleton, fromInfo, amount, options?) => Promise<TransactionSkeletonType>);
        prepareSigningEntries: ((txSkeleton, options?) => TransactionSkeletonType);
        serializeMultisigScript: ((params) => HexString);
        setupInputCell: ((txSkeleton, inputCell, fromInfo?, options?) => Promise<TransactionSkeletonType>);
        transfer: {
            (txSkeleton, fromInfo, toAddress, amount, options?): Promise<TransactionSkeletonType>;
            (txSkeleton, fromInfo, toAddress, amount, options): Promise<[TransactionSkeletonType, bigint]>;
        };
        transferCompatible: {
            (txSkeleton, fromInfo, toAddress, amount, options?): Promise<TransactionSkeletonType>;
            (txSkeleton, fromInfo, toAddress, amount, options): Promise<[TransactionSkeletonType, BI]>;
        };
    };
    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

  • anyoneCanPay: {
        CellCollector: CellCollectorConstructor;
        injectCapacity: ((cellCollector, txSkeleton, outputIndex, capacity, __namedParameters?) => Promise<TransactionSkeletonType>);
        prepareSigningEntries: ((txSkeleton, __namedParameters?) => TransactionSkeletonType);
        setupInputCell: ((txSkeleton, inputCell, _fromInfo?, __namedParameters?) => Promise<TransactionSkeletonType>);
        setupOutputCell: ((txSkeleton, outputCell, __namedParameters?) => Promise<TransactionSkeletonType>);
        withdraw: ((txSkeleton, fromInput, toAddress, capacity, __namedParameters?) => Promise<TransactionSkeletonType>);
    }
  • common: {
        __tests__: {
            _commonTransfer: ((txSkeleton, fromInfos, amount, minimalChangeCapacity, __namedParameters?) => Promise<{
                capacity: bigint;
                changeCapacity: bigint;
                txSkeleton: TransactionSkeletonType;
            }>);
            calculateFee: ((size, feeRate) => bigint);
            calculateFeeCompatible: ((size, feeRate) => BI);
            generateLockScriptInfos: ((__namedParameters?) => void);
            getLockScriptInfos: (() => LockScriptInfosType);
            getTransactionSize: ((txSkeleton) => number);
            getTransactionSizeByTx: ((tx) => number);
            resetLockScriptInfos: (() => void);
        };
        injectCapacity: ((txSkeleton, fromInfos, amount, changeAddress?, tipHeader?, __namedParameters?) => Promise<TransactionSkeletonType>);
        payFee: ((txSkeleton, fromInfos, amount, tipHeader?, __namedParameters?) => Promise<TransactionSkeletonType>);
        payFeeByFeeRate: ((txSkeleton, fromInfos, feeRate, tipHeader?, __namedParameters?) => Promise<TransactionSkeletonType>);
        prepareSigningEntries: ((txSkeleton, __namedParameters?) => TransactionSkeletonType);
        registerCustomLockScriptInfos: ((infos) => void);
        setupInputCell: ((txSkeleton, inputCell, fromInfo?, options?) => Promise<TransactionSkeletonType>);
        transfer: ((txSkeleton, fromInfos, toAddress, amount, changeAddress?, tipHeader?, options?) => Promise<TransactionSkeletonType>);
    }
    • __tests__: {
          _commonTransfer: ((txSkeleton, fromInfos, amount, minimalChangeCapacity, __namedParameters?) => Promise<{
              capacity: bigint;
              changeCapacity: bigint;
              txSkeleton: TransactionSkeletonType;
          }>);
          calculateFee: ((size, feeRate) => bigint);
          calculateFeeCompatible: ((size, feeRate) => BI);
          generateLockScriptInfos: ((__namedParameters?) => void);
          getLockScriptInfos: (() => LockScriptInfosType);
          getTransactionSize: ((txSkeleton) => number);
          getTransactionSizeByTx: ((tx) => number);
          resetLockScriptInfos: (() => void);
      }
      • _commonTransfer: ((txSkeleton, fromInfos, amount, minimalChangeCapacity, __namedParameters?) => Promise<{
            capacity: bigint;
            changeCapacity: bigint;
            txSkeleton: TransactionSkeletonType;
        }>)
          • (txSkeleton, fromInfos, amount, minimalChangeCapacity, __namedParameters?): Promise<{
                capacity: bigint;
                changeCapacity: bigint;
                txSkeleton: TransactionSkeletonType;
            }>
          • Parameters

            Returns Promise<{
                capacity: bigint;
                changeCapacity: bigint;
                txSkeleton: TransactionSkeletonType;
            }>

      • calculateFee: ((size, feeRate) => bigint)
          • (size, feeRate): bigint
          • Parameters

            • size: number
            • feeRate: bigint

            Returns bigint

      • calculateFeeCompatible: ((size, feeRate) => BI)
          • (size, feeRate): BI
          • Parameters

            • size: number
            • feeRate: BIish

            Returns BI

      • generateLockScriptInfos: ((__namedParameters?) => void)
          • (__namedParameters?): void
          • Parameters

            Returns void

      • getLockScriptInfos: (() => LockScriptInfosType)
          • (): LockScriptInfosType
          • Returns LockScriptInfosType

      • getTransactionSize: ((txSkeleton) => number)
      • getTransactionSizeByTx: ((tx) => number)
          • (tx): number
          • Parameters

            Returns number

      • resetLockScriptInfos: (() => void)
          • (): void
          • Returns void

    • injectCapacity: ((txSkeleton, fromInfos, amount, changeAddress?, tipHeader?, __namedParameters?) => Promise<TransactionSkeletonType>)
    • payFee: ((txSkeleton, fromInfos, amount, tipHeader?, __namedParameters?) => Promise<TransactionSkeletonType>)
    • payFeeByFeeRate: ((txSkeleton, fromInfos, feeRate, tipHeader?, __namedParameters?) => Promise<TransactionSkeletonType>)
    • prepareSigningEntries: ((txSkeleton, __namedParameters?) => TransactionSkeletonType)
    • registerCustomLockScriptInfos: ((infos) => void)
        • (infos): void
        • Registers LockScriptInfo for custom scripts.

          Parameters

          Returns void

    • setupInputCell: ((txSkeleton, inputCell, fromInfo?, options?) => Promise<TransactionSkeletonType>)
        • (txSkeleton, inputCell, fromInfo?, options?): Promise<TransactionSkeletonType>
        • A function to transfer input to output, and add input & output to txSkeleton. And it will deal with cell deps and witnesses too. (Add the input required cell deps and witnesses.) It should be noted that the output must be added to the end of txSkeleton.get("outputs").

          Parameters

          Returns Promise<TransactionSkeletonType>

    • transfer: ((txSkeleton, fromInfos, toAddress, amount, changeAddress?, tipHeader?, options?) => Promise<TransactionSkeletonType>)
  • dao: {
        CellCollector: typeof CellCollector;
        calculateDaoEarliestSince: ((depositBlockHeaderEpoch, withdrawBlockHeaderEpoch) => bigint);
        calculateDaoEarliestSinceCompatible: ((depositBlockHeaderEpoch, withdrawBlockHeaderEpoch) => BI);
        calculateMaximumWithdraw: ((withdrawCell, depositDao, withdrawDao) => bigint);
        calculateMaximumWithdrawCompatible: ((withdrawCell, depositDao, withdrawDao) => BI);
        deposit: ((txSkeleton, fromInfo, toAddress, amount, options?) => Promise<TransactionSkeletonType>);
        listDaoCells: ((cellProvider, fromAddress, cellType, options?) => AsyncIterator<Cell>);
        unlock: ((txSkeleton, depositInput, withdrawInput, toAddress, fromInfo, options?) => Promise<TransactionSkeletonType>);
        withdraw: ((txSkeleton, fromInput, fromInfo?, options?) => Promise<TransactionSkeletonType>);
    }
    • CellCollector: typeof CellCollector
    • calculateDaoEarliestSince: ((depositBlockHeaderEpoch, withdrawBlockHeaderEpoch) => bigint)
        • (depositBlockHeaderEpoch, withdrawBlockHeaderEpoch): bigint
        • calculate a withdraw dao cell minimal unlock since

          Parameters

          • depositBlockHeaderEpoch: string

            depositBlockHeader.epoch

          • withdrawBlockHeaderEpoch: string

            withdrawBlockHeader.epoch

          Returns bigint

    • calculateDaoEarliestSinceCompatible: ((depositBlockHeaderEpoch, withdrawBlockHeaderEpoch) => BI)
        • (depositBlockHeaderEpoch, withdrawBlockHeaderEpoch): BI
        • calculate a withdraw dao cell minimal unlock since

          Parameters

          • depositBlockHeaderEpoch: string

            depositBlockHeader.epoch

          • withdrawBlockHeaderEpoch: string

            withdrawBlockHeader.epoch

          Returns BI

    • calculateMaximumWithdraw: ((withdrawCell, depositDao, withdrawDao) => bigint)
        • (withdrawCell, depositDao, withdrawDao): bigint
        • calculate maximum withdraw capacity when unlock

          Parameters

          • withdrawCell: Cell

            withdrawCell or depositCell

          • depositDao: string

            depositBlockHeader.dao

          • withdrawDao: string

            withdrawBlockHeader.dao

          Returns bigint

    • calculateMaximumWithdrawCompatible: ((withdrawCell, depositDao, withdrawDao) => BI)
        • (withdrawCell, depositDao, withdrawDao): BI
        • calculate maximum withdraw capacity when unlock

          Parameters

          • withdrawCell: Cell

            withdrawCell or depositCell

          • depositDao: string

            depositBlockHeader.dao

          • withdrawDao: string

            withdrawBlockHeader.dao

          Returns BI

    • deposit: ((txSkeleton, fromInfo, toAddress, amount, options?) => Promise<TransactionSkeletonType>)
    • listDaoCells: ((cellProvider, fromAddress, cellType, options?) => AsyncIterator<Cell>)
        • (cellProvider, fromAddress, cellType, options?): AsyncIterator<Cell>
        • list DAO cells,

          Parameters

          • cellProvider: CellProvider
          • fromAddress: string
          • cellType: "all" | "deposit" | "withdraw"
          • options: Options = {}

          Returns AsyncIterator<Cell>

    • unlock: ((txSkeleton, depositInput, withdrawInput, toAddress, fromInfo, options?) => Promise<TransactionSkeletonType>)
    • withdraw: ((txSkeleton, fromInput, fromInfo?, options?) => Promise<TransactionSkeletonType>)
  • locktimePool: {
        CellCollector: CellCollectorConstructor;
        injectCapacity: ((txSkeleton, outputIndex, fromInfos, tipHeader, __namedParameters?) => Promise<TransactionSkeletonType>);
        injectCapacityWithoutChange: ((txSkeleton, fromInfos, amount, tipHeader, minimalChangeCapacity, __namedParameters) => Promise<{
            capacity: bigint;
            changeCapacity: bigint;
            txSkeleton: TransactionSkeletonType;
        }>);
        injectCapacityWithoutChangeCompatible: ((txSkeleton, fromInfos, amount, tipHeader, minimalChangeCapacity, __namedParameters) => Promise<{
            capacity: BI;
            changeCapacity: BI;
            txSkeleton: TransactionSkeletonType;
        }>);
        payFee: ((txSkeleton, fromInfos, amount, tipHeader, __namedParameters?) => Promise<TransactionSkeletonType>);
        prepareSigningEntries: ((txSkeleton, __namedParameters?) => TransactionSkeletonType);
        setupInputCell: ((txSkeleton, inputCell, fromInfo?, __namedParameters?) => Promise<TransactionSkeletonType>);
        transfer: {
            (txSkeleton, fromInfos, toAddress, amount, tipHeader, __namedParameters): Promise<TransactionSkeletonType>;
            (txSkeleton, fromInfos, toAddress, amount, tipHeader, __namedParameters): Promise<[TransactionSkeletonType, bigint]>;
        };
        transferCompatible: {
            (txSkeleton, fromInfos, toAddress, amount, tipHeader, __namedParameters): Promise<TransactionSkeletonType>;
            (txSkeleton, fromInfos, toAddress, amount, tipHeader, __namedParameters): Promise<[TransactionSkeletonType, BI]>;
        };
    }
  • secp256k1Blake160: {
        CellCollector: CellCollectorConstructor;
        injectCapacity: ((txSkeleton, outputIndex, fromAddress, options?) => Promise<TransactionSkeletonType>);
        payFee: ((txSkeleton, fromAddress, amount, options?) => Promise<TransactionSkeletonType>);
        prepareSigningEntries: ((txSkeleton, options?) => TransactionSkeletonType);
        setupInputCell: ((txSkeleton, inputCell, _fromInfo?, options?) => Promise<TransactionSkeletonType>);
        transfer: {
            (txSkeleton, fromAddress, toAddress, amount, options?): Promise<TransactionSkeletonType>;
            (txSkeleton, fromAddress, toAddress, amount, options): Promise<[TransactionSkeletonType, bigint]>;
        };
        transferCompatible: {
            (txSkeleton, fromAddress, toAddress, amount, options?): Promise<TransactionSkeletonType>;
            (txSkeleton, fromAddress, toAddress, amount, options): Promise<[TransactionSkeletonType, BI]>;
        };
    }
  • secp256k1Blake160Multisig: {
        CellCollector: CellCollectorConstructor;
        injectCapacity: ((txSkeleton, outputIndex, fromInfo, options?) => Promise<TransactionSkeletonType>);
        multisigArgs: ((serializedMultisigScript, since?) => HexString);
        payFee: ((txSkeleton, fromInfo, amount, options?) => Promise<TransactionSkeletonType>);
        prepareSigningEntries: ((txSkeleton, options?) => TransactionSkeletonType);
        serializeMultisigScript: ((params) => HexString);
        setupInputCell: ((txSkeleton, inputCell, fromInfo?, options?) => Promise<TransactionSkeletonType>);
        transfer: {
            (txSkeleton, fromInfo, toAddress, amount, options?): Promise<TransactionSkeletonType>;
            (txSkeleton, fromInfo, toAddress, amount, options): Promise<[TransactionSkeletonType, bigint]>;
        };
        transferCompatible: {
            (txSkeleton, fromInfo, toAddress, amount, options?): Promise<TransactionSkeletonType>;
            (txSkeleton, fromInfo, toAddress, amount, options): Promise<[TransactionSkeletonType, BI]>;
        };
    }
  • 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);
    }
    • 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