static constructAttestation (
    recipientEthAddress,
    tokenAmount,
    transferId,
    oracleAddress
  ) {
    const encoder = new TextEncoder()
    const userBytes = SolanaUtils.ethAddressToArray(recipientEthAddress)
    const transferIdBytes = encoder.encode(transferId)
    const amountBytes = padBNToUint8Array(tokenAmount)
    const items = oracleAddress
      ? [userBytes, amountBytes, transferIdBytes, SolanaUtils.ethAddressToArray(oracleAddress)]
      : [userBytes, amountBytes, transferIdBytes]
    const sep = encoder.encode('_')
    const res = items.slice(1).reduce((prev, cur, i) => {
      return Uint8Array.of(...prev, ...sep, ...cur)
    }, Uint8Array.from(items[0]))
    return res
  }
/**
   * Constructs an attestation from inputs.
   *
   * @param {string} recipientEthAddress
   * @param {BN} tokenAmount
   * @param {string} transferId
   * @param {string} [oracleAddress] optional oracle address, only used for DN attestations
   * @returns {Uint8Array}
   */
Constructs an attestation from inputs.
Constructs an attestation from inputs .
static constructAttestation (
    recipientEthAddress,
    tokenAmount,
    transferId,
    oracleAddress
  ) {
    const encoder = new TextEncoder()
    const userBytes = SolanaUtils.ethAddressToArray(recipientEthAddress)
    const transferIdBytes = encoder.encode(transferId)
    const amountBytes = padBNToUint8Array(tokenAmount)
    const items = oracleAddress
      ? [userBytes, amountBytes, transferIdBytes, SolanaUtils.ethAddressToArray(oracleAddress)]
      : [userBytes, amountBytes, transferIdBytes]
    const sep = encoder.encode('_')
    const res = items.slice(1).reduce((prev, cur, i) => {
      return Uint8Array.of(...prev, ...sep, ...cur)
    }, Uint8Array.from(items[0]))
    return res
  }
static constructAttestation ( recipientEthAddress , tokenAmount , transferId , oracleAddress ) { const encoder = new TextEncoder ( ) const userBytes = SolanaUtils . ethAddressToArray ( recipientEthAddress ) const transferIdBytes = encoder . encode ( transferId ) const amountBytes = padBNToUint8Array ( tokenAmount ) const items = oracleAddress ? [ userBytes , amountBytes , transferIdBytes , SolanaUtils . ethAddressToArray ( oracleAddress ) ] : [ userBytes , amountBytes , transferIdBytes ] const sep = encoder . encode ( '_' ) const res = items . slice ( 1 ) . reduce ( ( prev , cur , i ) => { return Uint8Array . of ( ... prev , ... sep , ... cur ) } , Uint8Array . from ( items [ 0 ] ) ) return res }
Constructs an attestation from inputs.
Constructs an attestation from inputs .