js-stellar-base/src/numbers/uint256.js

  1. import { LargeInt } from '@stellar/js-xdr';
  2. export class Uint256 extends LargeInt {
  3. /**
  4. * Construct an unsigned 256-bit integer that can be XDR-encoded.
  5. *
  6. * @param {Array<number|bigint|string>} args - one or more slices to encode
  7. * in big-endian format (i.e. earlier elements are higher bits)
  8. */
  9. constructor(...args) {
  10. super(args);
  11. }
  12. get unsigned() {
  13. return true;
  14. }
  15. get size() {
  16. return 256;
  17. }
  18. }
  19. Uint256.defineIntBoundaries();