src/Transactions/Deserializers/MultiPayment.php
public function deserialize(): object
    {
        $this->buffer->position($this->assetOffset / 2);

        $this->transaction->asset = ['payments' => []];

        $count = $this->buffer->readUInt16() & 0xff;
        $offset = $this->assetOffset / 2 + 1;

        for ($i = 0; $i < $count; $i++) {
            $this->transaction->asset['payments'][] = [
                'amount'      => $this->buffer->readUInt64(),
                'recipientId' => Base58::encodeCheck(new Buffer(hex2bin($this->buffer->readHex(21)))),
            ];

            $offset += 22;
        }

        $this->transaction->amount = array_sum(array_column($this->transaction->asset['payments'], 'amount'));

        return $this->parseSignatures($offset * 2);
    }
public function deserialize(): object
    {
        $this->buffer->position($this->assetOffset / 2);

        $this->transaction->asset = ['payments' => []];

        $count = $this->buffer->readUInt16() & 0xff;
        $offset = $this->assetOffset / 2 + 1;

        for ($i = 0; $i < $count; $i++) {
            $this->transaction->asset['payments'][] = [
                'amount'      => $this->buffer->readUInt64(),
                'recipientId' => Base58::encodeCheck(new Buffer(hex2bin($this->buffer->readHex(21)))),
            ];

            $offset += 22;
        }

        $this->transaction->amount = array_sum(array_column($this->transaction->asset['payments'], 'amount'));

        return $this->parseSignatures($offset * 2);
    }
public function deserialize ( ) : object { $ this -> buffer -> position ( $ this -> assetOffset / 2 ) ; $ this -> transaction -> asset = [ 'payments' => [ ] ] ; $ count = $ this -> buffer -> readUInt16 ( ) & 0xff ; $ offset = $ this -> assetOffset / 2 + 1 ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ this -> transaction -> asset [ 'payments' ] [ ] = [ 'amount' => $ this -> buffer -> readUInt64 ( ) , 'recipientId' => Base58 :: encodeCheck ( new Buffer ( hex2bin ( $ this -> buffer -> readHex ( 21 ) ) ) ) , ] ; $ offset += 22 ; } $ this -> transaction -> amount = array_sum ( array_column ( $ this -> transaction -> asset [ 'payments' ] , 'amount' ) ) ; return $ this -> parseSignatures ( $ offset * 2 ) ; }
Handle the deserialization of "multi payment" data.

@return object
Handle the deserialization of multi payment data .