Constructor
# new ProgramBindings(program_id) → {ProgramBindings}
Creates a new ProgramBindings
Parameters:
Name | Type | Description |
---|---|---|
program_id |
string
|
A program identifier, this is usually the given name of the program |
A new instance of ProgramBindings
Example
const bindings = new ProgramBindings("simple_program");
Classes
Methods
# add_input_party(name, id)
Bind an input party with a name
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
Name of the input party |
id |
string
|
Identifier of the party |
Example
bindings.add_input_party("Party1", "12D3KooWKbs29XBmtXZEFZwHBr39BsgbysPAmAS3RWWdtBBc7joH");
# add_output_party(name, id)
Bind an output party with a name
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
Name of the input party |
id |
string
|
Identifier of the party |
Example
bindings.add_output_party("Party2", "12D3KooWKbs29XBmtXZEFZwHBr39BsgbysPAmAS3RWWdtBBc7joH");