opreturn.net


Retrieve p2shdata from transaction
Array
(
    [txid] => 46252a07be3ffe38e2009af59b8b75ce1748d89f075d193059b0e4a16fa34b91
    [coin] => grlc
    [payload] => 50325348444154412070726f746f636f6c2069732061206d6574686f6420666f7220656e636f64696e6720616e642073746f72696e672064617461206f6e2074686520426974636f696e20626c6f636b636861696e2c20657370656369616c6c792064657369676e656420666f72206c61726765722066696c657320636f6d706172656420746f20746865207374616e64617264204f505f52455455524e206d656368616e69736d2e200d0a0d0a486572652773206120627265616b646f776e206f6620686f7720503253484441544120776f726b7320746f2073617665206c61726765722066696c65733a0d0a0d0a2d2d20503253482041646472657373657320616e64205363726970742053746f726167653a205032534820285061792d746f2d5363726970742d486173682920616c6c6f777320796f7520746f2070617920746f20612068617368206f6620612073637269707420696e7374656164206f662061207075626c6963206b6579206469726563746c792e205468652061637475616c20736372697074202863616c6c6564207468652072656465656d53637269707429206973206e6f742072657665616c6564206f6e2074686520626c6f636b636861696e20756e74696c207468652066756e647320617265207370656e742e205032534844415441207574696c697a6573207468697320627920656e636f64696e67206461746120696e746f207468652072656465656d53637269707420697473656c662e0d0a0d0a2d2d204368756e6b696e67204c617267652046696c65733a20546f2073746f72652061206c61726765722066696c652c207468652050325348444154412070726f746f636f6c2073706c697473207468652066696c6520696e746f206d756c7469706c65206368756e6b732c206561636820757020746f2061206365727461696e2073697a652028652e672e2c20353030206279746573292e0d0a0d0a2d2d204465726976696e67204164647265737365732066726f6d204368756e6b733a2045616368206368756e6b206f662064617461206973207573656420746f20646572697665206120756e69717565205032534820616464726573732c20657373656e7469616c6c7920656d62656464696e6720746865206368756e6b277320696e666f726d6174696f6e2077697468696e207468652061646472657373206372656174696f6e2070726f636573732e0d0a0d0a2d2d2046756e64696e6720746865204164647265737365733a20546865736520646572697665642061646472657373657320617265207468656e2066756e6465642077697468206120736d616c6c20616d6f756e74206f6620426974636f696e20696e20746865206669727374207472616e73616374696f6e2e0d0a0d0a2d2d2052657665616c696e672074686520446174613a20496e20612073756273657175656e74207472616e73616374696f6e2c207468652066756e64732066726f6d20616c6c2074686573652061646472657373657320617265207370656e7420616e642073656e7420746f20612064657374696e6174696f6e20616464726573732e20546865206b657920746f207468697320737465702069732074686174207768656e20796f75207370656e642066756e64732066726f6d2061205032534820616464726573732c207468652072656465656d5363726970742028636f6e7461696e696e6720746865206368756e6b206f66206461746129206d7573742062652072657665616c656420746f20746865206e6574776f726b2e0d0a0d0a2d2d205265636f6e737472756374696e67207468652046696c653a20546865207365636f6e64207472616e73616374696f6e20616c736f20696e636c7564657320616e204f505f52455455524e206f757470757420776869636820636f6e7461696e73206d65746164617461206c696b652066696c656e616d652c2066696c65747970652c20616e6420612068617368206f6620746865206f726967696e616c20646174612e2054686973206d657461646174612c20636f6d62696e65642077697468207468652072657665616c65642064617461206368756e6b732066726f6d207468652072656465656d536372697074732c20656e61626c6573207265636f6e737472756374696f6e206f6620746865206f726967696e616c2066696c652e200d0a0d0a2d2d2057687920503253484441544120666f72204c61726765722046696c65733a20436f6d706172656420746f204f505f52455455524e2c207768696368207479706963616c6c792068617320616e2038302d62797465206c696d6974202874686f75676820726563656e74206368616e676573206d6967687420616c746572207468697320736c696768746c79292c205032534844415441206f66666572732061206d656368616e69736d20666f722073746f72696e67207369676e69666963616e746c79206c617267657220616d6f756e7473206f662064617461206279206c657665726167696e672074686520737472756374757265206f662050325348207472616e73616374696f6e7320616e642073706c697474696e67206461746120696e746f206d616e61676561626c65206368756e6b732e200d0a
    [filename] => P2SHDATAprotocol.asc
    [filetype] => asc
    [assembly] => 0bdc0003ec00cd6173636969
    [scriptbytes] => 11
    [script] => dc0003ec00cd6173636969
    [start] => 0
    [end] => 3
    [encode] => 00
    [encode_desc] => ascii
    [content_code] => 6173636969
    [content_desc] => ascii
    [payloadhash160] => 2a942bc4ad18b8b4710d442f1db86f69a7219599
    [op_datahash160] => 2a942bc4ad18b8b4710d442f1db86f69a7219599
)
P2SHDATA
txid: 46252a07be3ffe38e2009af59b8b75ce1748d89f075d193059b0e4a16fa34b91
P2SHDATA protocol is a method for encoding and storing data on the Bitcoin blockchain, especially designed for larger files compared to the standard OP_RETURN mechanism. 

Here's a breakdown of how P2SHDATA works to save larger files:

-- P2SH Addresses and Script Storage: P2SH (Pay-to-Script-Hash) allows you to pay to a hash of a script instead of a public key directly. The actual script (called the redeemScript) is not revealed on the blockchain until the funds are spent. P2SHDATA utilizes this by encoding data into the redeemScript itself.

-- Chunking Large Files: To store a larger file, the P2SHDATA protocol splits the file into multiple chunks, each up to a certain size (e.g., 500 bytes).

-- Deriving Addresses from Chunks: Each chunk of data is used to derive a unique P2SH address, essentially embedding the chunk's information within the address creation process.

-- Funding the Addresses: These derived addresses are then funded with a small amount of Bitcoin in the first transaction.

-- Revealing the Data: In a subsequent transaction, the funds from all these addresses are spent and sent to a destination address. The key to this step is that when you spend funds from a P2SH address, the redeemScript (containing the chunk of data) must be revealed to the network.

-- Reconstructing the File: The second transaction also includes an OP_RETURN output which contains metadata like filename, filetype, and a hash of the original data. This metadata, combined with the revealed data chunks from the redeemScripts, enables reconstruction of the original file. 

-- Why P2SHDATA for Larger Files: Compared to OP_RETURN, which typically has an 80-byte limit (though recent changes might alter this slightly), P2SHDATA offers a mechanism for storing significantly larger amounts of data by leveraging the structure of P2SH transactions and splitting data into manageable chunks. 
P2SHDATA METADATA

{
    "txid": "46252a07be3ffe38e2009af59b8b75ce1748d89f075d193059b0e4a16fa34b91",
    "coin": "grlc",
    "filename": "P2SHDATAprotocol.asc",
    "filetype": "asc",
    "assembly": "0bdc0003ec00cd6173636969",
    "scriptbytes": 11,
    "script": "dc0003ec00cd6173636969",
    "start": 0,
    "end": 3,
    "encode": "00",
    "encode_desc": "ascii",
    "content_code": "6173636969",
    "content_desc": "ascii",
    "payloadhash160": "2a942bc4ad18b8b4710d442f1db86f69a7219599",
    "op_datahash160": "2a942bc4ad18b8b4710d442f1db86f69a7219599"
}