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.
After enabling blockchain authentication, you will not be able to sign transactions in the usual manner. Be careful not to lock yourself out.
Parameters
Name | Type | Description |
---|---|---|
my_pubkey | byte_array | Your public key. |
blockchain_rid | byte_array | The 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
- You initiate authentication using an external blockchain by calling
add_provider_blockchain_auth
. - You sign the initial transaction, linking to the specified blockchain.
- Subsequent authentication relies on the external blockchain, without requiring you to sign each operation individually.
- 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:
Parameter | Type | Description |
---|---|---|
tx_to_prove | gtx_transaction | The transaction from the external blockchain that proves authentication. |
op_index | integer | The index of the relevant operation within the external transaction. |
my_pubkey | pubkey | Your 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)