logic

check_program(program, args=None)

NOTE: This method is deprecated: Validation relies on metadata (langspec.json) that does not accurately represent opcode behavior across program versions. The behavior of check_program relies on langspec.json. Thus, this method is being deprecated.

Performs program checking for max length and cost

Parameters
  • program (bytes) – compiled program

  • args (list[bytes]) – args are not signed, but are checked by logic

Returns

True on success

Return type

bool

Raises

InvalidProgram – on error

read_program(program, args=None)

NOTE: This method is deprecated: Validation relies on metadata (langspec.json) that does not accurately represent opcode behavior across program versions. The behavior of read_program relies on langspec.json. Thus, this method is being deprecated.

check_int_const_block(program, pc)

NOTE: This method is deprecated

read_int_const_block(program, pc)

NOTE: This method is deprecated

check_byte_const_block(program, pc)

NOTE: This method is deprecated

read_byte_const_block(program, pc)

NOTE: This method is deprecated

check_push_int_block(program, pc)

NOTE: This method is deprecated

read_push_int_block(program, pc)

NOTE: This method is deprecated

check_push_byte_block(program, pc)

NOTE: This method is deprecated

read_push_byte_block(program, pc)

NOTE: This method is deprecated

parse_uvarint(buf)

NOTE: This method is deprecated

address(program)

Return the address of the program.

Parameters

program (bytes) – compiled program

Returns

program address

Return type

str

teal_sign(private_key, data, contract_addr)

Return the signature suitable for ed25519verify TEAL opcode

Parameters
  • private_key (str) – private key to sign with

  • data (bytes) – data to sign

  • contract_addr (str) – program hash (contract address) to sign for

Returns

signature

Return type

bytes

teal_sign_from_program(private_key, data, program)

Return the signature suitable for ed25519verify TEAL opcode

Parameters
  • private_key (str) – private key to sign with

  • data (bytes) – data to sign

  • program (bytes) – program to sign for

Returns

signature

Return type

bytes

get_application_address(appID: int) str

Return the escrow address of an application.

Parameters

appID (int) – The ID of the application.

Returns

The address corresponding to that application’s escrow account.

Return type

str