PHP WebShell

Текущая директория: /opt/BitGoJS/modules/sdk-coin-xrp/test/unit

Просмотр файла: xrpToken.ts

import 'should';

import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test';
import { BitGoAPI } from '@bitgo/sdk-api';
import { XrpToken } from '../../src';

describe('Xrp Tokens', function () {
  let bitgo: TestBitGoAPI;
  let xrpTokenCoin;
  const tokenName = 'txrp:rlusd';

  before(function () {
    bitgo = TestBitGo.decorate(BitGoAPI, { env: 'test' });
    XrpToken.createTokenConstructors().forEach(({ name, coinConstructor }) => {
      bitgo.safeRegister(name, coinConstructor);
    });
    bitgo.initializeTestVars();
    xrpTokenCoin = bitgo.coin(tokenName);
  });

  it('should return constants', function () {
    xrpTokenCoin.getChain().should.equal(tokenName);
    xrpTokenCoin.getBaseChain().should.equal('txrp');
    xrpTokenCoin.getFullName().should.equal('Xrp Token');
    xrpTokenCoin.getBaseFactor().should.equal(1000000000000000);
    xrpTokenCoin.type.should.equal(tokenName);
    xrpTokenCoin.name.should.equal('RLUSD');
    xrpTokenCoin.coin.should.equal('txrp');
    xrpTokenCoin.network.should.equal('Testnet');
    xrpTokenCoin.decimalPlaces.should.equal(15);
    xrpTokenCoin.contractAddress.should.equal(
      'rQhWct2fv4Vc4KRjRgMrxa8xPN9Zx9iLKV::524C555344000000000000000000000000000000'
    );
    xrpTokenCoin.issuerAddress.should.equal('rQhWct2fv4Vc4KRjRgMrxa8xPN9Zx9iLKV');
    xrpTokenCoin.currencyCode.should.equal('524C555344000000000000000000000000000000');
  });
});

Выполнить команду


Для локальной разработки. Не используйте в интернете!