A method of transaction between a first cryptocurrency transacted based on a first blockchain and a second cryptocurrency transacted based on a second blockchain, the method comprising:
- obtaining first transaction information with respect to first basic transaction information in which the first cryptocurrency is transmitted from an account of a first user to an account of a second user, and second transaction information with respect to second basic transaction information accompanying the first basic transaction information and in which the second cryptocurrency is received from the account of the second user to the account of the first user account;
- in response to the first transaction information satisfies terms of agreement between the first user and the second user, adding first condition information to the first transaction information, the first condition information depending on validity of the second transaction information and activating the first basic transaction information of the first cryptocurrency;
- in response to the second transaction information satisfies terms of agreement between the first user and the second user, adding second condition information to the second transaction information, the second condition information depending on validity of the first transaction information and activating the second basic transaction information of the second cryptocurrency;
- and
- digitally signing the first transaction information having (i) the first basic transaction information and (ii) the first condition information, to prove the terms of agreement, and transmitting the first transaction information to a node on a network of the first blockchain and the second transaction information having (i) the second basic transaction information and (ii) the second condition information, to prove the terms of agreement, and transmitting the second transaction information to a node on a network of the second blockchain,
- wherein the digitally signing of the first transaction information having (i) the first basic transaction information and (ii) the first condition information, to prove the terms of agreement, and transmitting of the first transaction information to the node on the network of the first blockchain and the second transaction information having (i) the second basic transaction information and (ii) the second condition information, to prove the terms of agreement, and transmitting the second transaction information to a node on a network of the second blockchain, comprises:
- calculating a first hash value by applying a hash function to the first transaction information having (i) the first basic transaction information and (ii) the first condition information and a second hash value by applying a hash function to the second transaction information having (i) the second basic transaction information and (ii) the second condition information;
- generating a first cryptogram indicating a digital signature of the first transaction information by encrypting the first hash value using a private key of the first user and a private key of the second user and a second cryptogram indicating a digital signature of the second transaction information by encrypting the second hash value using a private key of the first user and a private key of the second user;
- and
- transmitting, to the node on the network of the first blockchain, first integration transaction information including (i) the first cryptogram and (ii) the first transaction information, the first transaction information having the first basic transaction information and the first condition information and to the node on the network of the second blockchain, second integration transaction information including (i) the second cryptogram and (ii) the second transaction information, the second transaction information having the second basic transaction information and the second condition information.