Skip to main content

Blockchain authentication of Directory Chain operations

Blockchain authentication allows you to authenticate your provider operations through a transaction on another blockchain using ICCF.

Enabling blockchain-based provider authentication

The add_provider_blockchain_auth operation enables the use of another blockchain for authentication. You sign the initial transaction, but you do not need to sign subsequent operations.

warning

After enabling blockchain authentication, you will not be able to sign transactions in the usual manner. Be careful not to lock yourself out.

Parameters

NameTypeDescription
my_pubkeybyte_arrayYour public key.
blockchain_ridbyte_arrayThe identifier (RID) of the blockchain whose transaction will be used for authentication.

Disabling blockchain-based provider authentication

The remove_provider_blockchain_auth operation revokes your ability to use blockchain-based authentication and re-enables standard signing.

General workflow

  1. You initiate authentication using an external blockchain by calling add_provider_blockchain_auth.
  2. You sign the initial transaction, linking to the specified blockchain.
  3. Subsequent authentication relies on the external blockchain, without requiring you to sign each operation individually.
  4. If you want to stop using the external blockchain for authentication, you call remove_provider_blockchain_auth_iccf.

Available operations

The following operations are available for blockchain authentication in Directory Chain:

  • remove_provider_blockchain_auth_iccf
  • propose_blockchain_iccf
  • propose_blockchain_action_iccf
  • propose_configuration_iccf
  • propose_forced_configuration_iccf
  • propose_blockchain_rename_iccf

These operations share the same parameters:

ParameterTypeDescription
tx_to_provegtx_transactionThe transaction from the external blockchain that proves authentication.
op_indexintegerThe index of the relevant operation within the external transaction.
my_pubkeypubkeyYour public key.

Each operation requires an ICCF proof of tx_to_prove to be included in the transaction.

External blockchain transaction requirements

The transaction from the external blockchain must include an operation with the same name but different parameters. The operations on the external blockchain will have parameters similar to the corresponding non-ICCF operations on Directory Chain (excluding my_pubkey and description):

  • operation remove_provider_blockchain_auth_iccf()
  • operation propose_blockchain_iccf(config_data: byte_array, bc_name: text, container_name: text)
  • operation propose_blockchain_action_iccf(blockchain_rid: byte_array, action: blockchain_action)
  • operation propose_configuration_iccf(blockchain_rid: byte_array, config_data: byte_array)
  • operation propose_forced_configuration_iccf(blockchain_rid: byte_array, config_data: byte_array, height: integer)
  • operation propose_blockchain_rename_iccf(blockchain_rid: byte_array, name)