메소드 | 설명 | |
---|---|---|
Script ( |
Construct a Script using the given network parameters and a range of the programBytes array.
|
|
ToString ( ) : string |
Returns the program opcodes as a string, for example "[1234] DUP HAHS160"
|
메소드 | 설명 | |
---|---|---|
CreateInputScript ( byte signature, byte pubkey ) : byte[] | ||
CreateOutputScript ( |
||
CreateOutputScript ( byte pubkey ) : byte[] |
Create a script that sends coins directly to the given public key (eg in a coinbase transaction).
|
|
GetData ( int len ) : byte[] | ||
Parse ( byte programBytes, int offset, int length ) : void |
To run a script, first we parse it which breaks it up into chunks representing pushes of data or logical opcodes. Then we can run the parsed chunks. The reason for this split, instead of just interpreting directly, is to make it easier to reach into a programs structure and pull out bits of data without having to run it. This is necessary to render the to/from addresses of transactions in a user interface. The official client does something similar. |
|
ReadByte ( ) : byte | ||
WriteBytes ( Stream os, byte buf ) : void |
Writes out the given byte buffer to the output stream with the correct opcode prefix
|
public Script ( |
||
@params | ||
programBytes | byte | Array of program bytes from a transaction. |
offset | int | How many bytes into programBytes to start reading from. |
length | int | How many bytes to read. |
리턴 | System |