Skip to main content

Rosetta ステーキングのチュートリアル

このドキュメントでは、Rosetta API に関する Internet Computer の実装を使用して Neuron を作成する手順を説明します。ガバナンス Canister への資金移動、 Neuron を作成し、新しく作成された Neuron を設定します。

前提知識

チュートリアルを完了するには、以下のものが必要です:

  1. 稼働中の Rosetta ノード、https://hub.docker.com/r/dfinity/rosetta-api から最新の docker イメージを使用できるようにします。このチュートリアルでは、Rosetta ノードが localhost:8080 というアドレスで動作していることを想定しています。

  2. curl

  3. ed25519 キーと、そのキーを使ってメッセージに署名するためのお気に入りのツール。

  4. あなたのキーで管理される台帳アカウントの少なくとも 2 ICP (Compute the ledger account for staking のセクションを参照してください)。

概要

Internet Computer から見ると、 Neuron を作るのは多段階の操作になります。

  1. 台帳 Canister を呼び出して、ステークのためにガバナンス Canister にトークンを送金します。

  2. ガバナンスに送金を通知します。このステップで、ガバナンス Canister は新しい Neuron を割り当てます。

  3. 新しく作成された Neuron に対して、溶解遅延と溶解を開始する設定を行います。

Rosetta API では、これらのステップをトランザクションの operation として表現しています。これらの操作の実行は、Construction API flow に従わなければなりません。

アカウント識別子を導出する

ステーキングには、ガバナンス Canister のサブアカウントへのトークンの送金が必要です。送金を完了するには、台帳のアカウント識別子(送金元)とガバナンスサブアカウント(送金先)のアカウント識別子の両方を知っておく必要があります。

エンドポイント /construction/derive を呼び出し、あなたの公開鍵で管理されているデフォルトの台帳アカウントと、その鍵で管理されている Neuron のアカウントを取得します。

ソース台帳アカウントを計算する

note

以下のリクエストの hex_bytes をあなたの公開鍵のバイトに置き換えてください。

curl -0 -X POST http://localhost:8080/construction/derive \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- <<EOF
{
"network_identifier": { "blockchain": "Internet Computer", "network": "00000000000000020101" },
"public_key": {
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
}
}
EOF

期待されるレスポンスは次のようなものです:

{
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
}
}

ステーキングのための台帳アカウントを計算する

note

以下のリクエストの hex_bytes をあなたの公開鍵のバイトに置き換えてください。

curl -0 -X POST http://localhost:8080/construction/derive \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- <<EOF
{
"network_identifier": { "blockchain": "Internet Computer", "network": "00000000000000020101" },
"public_key": {
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
},
"metadata": {
"account_type": "neuron",
"neuron_index": 0
}
}
note

リクエストのメタデータで account_typeneuron に設定し、Rosetta ノードにステーキング用のアカウントを取得したいことを伝えます。neuron_indexパラメータは、呼び出し側が Neuron を識別するために選択した任意の64ビット符号なし整数です。一人のユーザーが複数の Neuron を制御することができ、neuron_index に異なる値を指定することでそれらを区別することができます。neuron_index はオプションで、デフォルトでは 0 に設定されています。

以下のようなレスポンスがあるはずです:

{
"account_identifier": {
"address": "92bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc6"
}
}

署名するペイロードを取得する

以下の点を注意してください:

  • 以下の address フィールドは、前のステップで取得したアドレスに置き換えてください。2 番目の TRANSACTION オペレーション(下のスニペットではインデックス 1) Nueron の台帳アドレスを使用する必要があります。それ以外の操作では、 Nueron のコントローラーの台帳アドレスを使用します。

  • TRANSACTION オペレーションの中の金額は、あなたがステークした金額です。この例では、金額は 1 ICP です。

  • SET_DISSOLVE_TIMESTAMP オペレーションの dissolve_time_utc_seconds メタデータフィールドを調整します。現在のタイムスタンプに31,557,600秒を加えたものが、1年分のステーキングに相当します。

  • すべての Nueron 管理操作は、オプションで neuron_index メタデータフィールドをサポートしています。neuron_indexには、Compute the ledger account for staking のステップで指定した値と同じ値を使用する必要があります。

curl -0 -X POST http://localhost:8080/construction/payloads \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- <<EOF
{
"network_identifier": { "blockchain": "Internet Computer", "network": "00000000000000020101" },
"operations": [
{
"operation_identifier": { "index": 0 },
"type": "TRANSACTION",
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"amount": {
"value": "-100000000",
"currency": { "symbol": "ICP", "decimals": 8 }
}
},
{
"operation_identifier": { "index": 1 },
"type": "TRANSACTION",
"account": {
"address": "92bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc6"
},
"amount": {
"value": "100000000",
"currency": { "symbol": "ICP", "decimals": 8 }
}
},
{
"operation_identifier": { "index": 2 },
"type": "FEE",
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"amount": {
"value": "-10000",
"currency": { "symbol": "ICP", "decimals": 8 }
}
},
{
"operation_identifier": { "index": 3 },
"type": "STAKE",
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"neuron_index": 0
}
},
{
"operation_identifier": { "index": 4 },
"type": "SET_DISSOLVE_TIMESTAMP",
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"neuron_index": 0,
"dissolve_time_utc_seconds": 1879939507
}
},
{
"operation_identifier": { "index": 5 },
"type": "START_DISSOLVE",
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"neuron_index": 0
}
}
],
"public_keys": [
{
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
}
]
}
EOF

以下のようなレスポンスがあるはずです:

{
"unsigned_transaction": "a2677570646174657384826b5452414e53414354494f4ea56b63616e69737465725f69644a000000000000000201016b6d6574686f645f6e616d656773656e645f706263617267584b0a0b089a8fa881d7d8b4b0c50112070a050880c2d72f1a0308904e2a220a2092bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc63a0a08a8edf6e0fd928cdf166673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972790082a1655354414b45a1716e6575726f6e5f6964656e74696669657200a66b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d657824636c61696d5f6f725f726566726573685f6e6575726f6e5f66726f6d5f6163636f756e7463617267581f4449444c026c029cb1fa2501ba89e5c204786e6801000000000000000000006673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f65787069727900656e6f6e63654f4449444c000178000000000000000082a1765345545f444953534f4c56455f54494d455354414d50a1716e6575726f6e5f6964656e74696669657200a66b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902bc4449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d3080201000001040106b3990d70000000000100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f65787069727900656e6f6e63654f4449444c000178000000000000000082a16e53544152545f444953534f4c5645a1716e6575726f6e5f6964656e74696669657200a66b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902b44449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d30802010000010401030100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f65787069727900656e6f6e63654f4449444c000178000000000000000070696e67726573735f6578706972696573811b16be30cfbd3b16a8",
"payloads": [
{
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d72657175657374e5f2ad1ffc1c7136c7dc59a183b9dc85af38c620d46492676eb016bb2c7b9a56",
"signature_type": "ed25519"
},
{
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d726571756573742eae2f191b885b6ed7238b2e67001569ce1f789873ebf312e84a8e5dbc9a38d0",
"signature_type": "ed25519"
},
{
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d72657175657374788935ee98703620ec63813b2036daa46989ead54a6b940264d44a9fc0241fae",
"signature_type": "ed25519"
},
{
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d7265717565737463166a6d97d170f9a4a49c779cc032b376b441bbb56346730ec92e3033eebe9f",
"signature_type": "ed25519"
},
{
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d726571756573743652695a86832a2bb361f3ba21418f461ca5f604c2d43b47d05eeb5ba77f114f",
"signature_type": "ed25519"
},
{
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d72657175657374f80fa04953de2944d8d8a0c1ec24fd43008f9636ccb2eaa3e4163145a4071e60",
"signature_type": "ed25519"
},
{
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d72657175657374f79dc941816eb5744a48e0ba6ed493442c4089ac5430de5b3e11d925db436a20",
"signature_type": "ed25519"
},
{
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d726571756573748a67e5347e053335269988ff1a00b19b426ea389ad1b9f17e38a698b21f9884a",
"signature_type": "ed25519"
}
]
}
note

レスポンスの payloads フィールドは、トランザクションを送信する前に署名される必要があるペイロードのリストを含みます。

note

Rosetta API 仕様書(Flow of Operations)によると、クライアントは /construction/preprocess/construction/metadata をコールしてから /construction/payloads をコールすべきです。これは、ペイロードリクエストに添付すべきメタデータがある可能性があるためです。現在のところ、ICP Rosetta ノードの実装ではこれを行う必要がないため、これらの不要なステップをスキップしています。

署名しようとするトランザクションの内容を確認する

トランザクションの内容をデコードするために /construction/parse エンドポイントを呼び出します。

note

下の transaction フィールドの値を、前のステップで取得した unsigned_transaction フィールドの値で置き換えます。signed フィールドは false に設定されていることに注意してください。

curl -0 -X POST http://localhost:8080/construction/parse \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- <<EOF
{
"network_identifier": { "blockchain": "Internet Computer", "network": "00000000000000020101" },
"signed": false,
"transaction": "a2677570646174657384826b5452414e53414354494f4ea56b63616e69737465725f69644a000000000000000201016b6d6574686f645f6e616d656773656e645f706263617267584b0a0b089a8fa881d7d8b4b0c50112070a050880c2d72f1a0308904e2a220a2092bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc63a0a08a8edf6e0fd928cdf166673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972790082a1655354414b45a1716e6575726f6e5f6964656e74696669657200a66b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d657824636c61696d5f6f725f726566726573685f6e6575726f6e5f66726f6d5f6163636f756e7463617267581f4449444c026c029cb1fa2501ba89e5c204786e6801000000000000000000006673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f65787069727900656e6f6e63654f4449444c000178000000000000000082a1765345545f444953534f4c56455f54494d455354414d50a1716e6575726f6e5f6964656e74696669657200a66b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902bc4449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d3080201000001040106b3990d70000000000100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f65787069727900656e6f6e63654f4449444c000178000000000000000082a16e53544152545f444953534f4c5645a1716e6575726f6e5f6964656e74696669657200a66b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902b44449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d30802010000010401030100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f65787069727900656e6f6e63654f4449444c000178000000000000000070696e67726573735f6578706972696573811b16be30cfbd3b16a8"
}
EOF

レスポンスはトランザクションの意図と一致する必要があります。

{
"operations": [
{
"operation_identifier": {"index": 0},
"type": "TRANSACTION",
"status": null,
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"amount": {
"value": "-100000000",
"currency": {"symbol": "ICP", "decimals": 8}
}
},
{
"operation_identifier": {"index": 1},
"type": "TRANSACTION",
"status": null,
"account": {
"address": "92bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc6"
},
"amount": {
"value": "100000000",
"currency": {"symbol": "ICP", "decimals": 8}
}
},
{
"operation_identifier": {"index": 2},
"type": "FEE",
"status": null,
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"amount": {
"value": "-10000",
"currency": {"symbol": "ICP", "decimals": 8}
}
},
{
"operation_identifier": {"index": 3},
"type": "STAKE",
"status": null,
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"neuron_index": 0
}
},
{
"operation_identifier": {"index": 4},
"type": "SET_DISSOLVE_TIMESTAMP",
"status": null,
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"dissolve_time_utc_seconds": 1879939507,
"neuron_index": 0
}
},
{
"operation_identifier": {"index": 5},
"type": "START_DISSOLVE",
"status": null,
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"neuron_index": 0
}
}
],
"account_identifier_signers": []
}

ペイロードに署名し、署名付きトランザクションを構築する

お好きなツールを使って、 /construction/payloads レスポンスにあるペイロードに署名してください。以下のコマンドで示すように、署名を /construction/combine リクエストに含めます。

curl -0 -X POST http://localhost:8080/construction/combine \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- <<EOF
{
"network_identifier": { "blockchain": "Internet Computer", "network": "00000000000000020101" },
"signatures": [
{
"signing_payload": {
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d72657175657374e5f2ad1ffc1c7136c7dc59a183b9dc85af38c620d46492676eb016bb2c7b9a56",
"signature_type": "ed25519"
},
"public_key": {
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
},
"signature_type": "ed25519",
"hex_bytes": "5a5297f7555df2d98bd945ecff7afb11456164621da2439f665900abaaa17655e2e4801284c458639fc0e648037cc70116bfafe0315338897f63f9c3bb8b150b"
},
{
"signing_payload": {
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d726571756573742eae2f191b885b6ed7238b2e67001569ce1f789873ebf312e84a8e5dbc9a38d0",
"signature_type": "ed25519"
},
"public_key": {
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
},
"signature_type": "ed25519",
"hex_bytes": "ab973292cdcbe1c3f54d07a7a822d3c48616abfd9067987e105d8901d0ab946a4b2b6ea038a28e4c8af66e4aecaf503909d67c8dd4153625a5dd121ea45fa301"
},
{
"signing_payload": {
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d72657175657374788935ee98703620ec63813b2036daa46989ead54a6b940264d44a9fc0241fae",
"signature_type": "ed25519"
},
"public_key": {
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
},
"signature_type": "ed25519",
"hex_bytes": "adc30181799a4474ad03c3a909dcd1d8ee08fe9d23f74314a031ebeb69a340a87680d9549ed6632956130d9e62ee3fa487402c7ab1dd3497aeaf83d36bedec05"
},
{
"signing_payload": {
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d7265717565737463166a6d97d170f9a4a49c779cc032b376b441bbb56346730ec92e3033eebe9f",
"signature_type": "ed25519"
},
"public_key": {
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
},
"signature_type": "ed25519",
"hex_bytes": "e5a4c7bdd8a17e6581f05c25d9532fd322ea18b1fdd03b06ea40f886c50a74e6adfa530dc9a5a6a0754535004eaa4cf2dbf3fab9684e0d495f3b4eb4ff449b0e"
},
{
"signing_payload": {
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d726571756573743652695a86832a2bb361f3ba21418f461ca5f604c2d43b47d05eeb5ba77f114f",
"signature_type": "ed25519"
},
"public_key": {
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
},
"signature_type": "ed25519",
"hex_bytes": "e2ada2cf653ebbba2a93d1b013415c5102881ae6a5c58e9abf8683a33aa624e404d2958e1b47e0e98f9e37092221fd816fc13b965ca98fc1e61c4653a279640f"
},
{
"signing_payload": {
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d72657175657374f80fa04953de2944d8d8a0c1ec24fd43008f9636ccb2eaa3e4163145a4071e60",
"signature_type": "ed25519"
},
"public_key": {
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
},
"signature_type": "ed25519",
"hex_bytes": "0dc0bce4b86c0fd6a1b21ddaa5380b432a637bc5084c1b77356188308618bd9f97513ae5d351a2067c6e8ae8ce7f022ded21f21c3aaaf030a2f47040df1db90b"
},
{
"signing_payload": {
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d72657175657374f79dc941816eb5744a48e0ba6ed493442c4089ac5430de5b3e11d925db436a20",
"signature_type": "ed25519"
},
"public_key": {
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
},
"signature_type": "ed25519",
"hex_bytes": "fb216f00ff6540e9759e8b6095487a7ea258f4d3fa459f30bb58816932082a14df78c22924941ff3a1897bf3dc468ceefe0e83d94580cdd2ec21ba3a51380e05"
},
{
"signing_payload": {
"account_identifier": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"hex_bytes": "0a69632d726571756573748a67e5347e053335269988ff1a00b19b426ea389ad1b9f17e38a698b21f9884a",
"signature_type": "ed25519"
},
"public_key": {
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
},
"signature_type": "ed25519",
"hex_bytes": "b120ab9da353f23cbc854f09df28e8a59a9227a4e9d615dbe102ea0f7f6991a34f109accd03d9c8ac3e30ecf2f22fdcea2019424c851bd8a3d68bcd2dba6fc00"
}
],
"unsigned_transaction": "a2677570646174657384826b5452414e53414354494f4ea56b63616e69737465725f69644a000000000000000201016b6d6574686f645f6e616d656773656e645f706263617267584b0a0b089a8fa881d7d8b4b0c50112070a050880c2d72f1a0308904e2a220a2092bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc63a0a08a8edf6e0fd928cdf166673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972790082a1655354414b45a1716e6575726f6e5f6964656e74696669657200a66b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d657824636c61696d5f6f725f726566726573685f6e6575726f6e5f66726f6d5f6163636f756e7463617267581f4449444c026c029cb1fa2501ba89e5c204786e6801000000000000000000006673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f65787069727900656e6f6e63654f4449444c000178000000000000000082a1765345545f444953534f4c56455f54494d455354414d50a1716e6575726f6e5f6964656e74696669657200a66b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902bc4449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d3080201000001040106b3990d70000000000100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f65787069727900656e6f6e63654f4449444c000178000000000000000082a16e53544152545f444953534f4c5645a1716e6575726f6e5f6964656e74696669657200a66b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902b44449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d30802010000010401030100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f65787069727900656e6f6e63654f4449444c000178000000000000000070696e67726573735f6578706972696573811b16be30cfbd3b16a8"
}
EOF

以下のようなレスポンスがあるはずです:

{
"signed_transaction": "84826b5452414e53414354494f4e81a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000201016b6d6574686f645f6e616d656773656e645f706263617267584b0a0b089a8fa881d7d8b4b0c50112070a050880c2d72f1a0308904e2a220a2092bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc63a0a08a8edf6e0fd928cdf166673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f73696758405a5297f7555df2d98bd945ecff7afb11456164621da2439f665900abaaa17655e2e4801284c458639fc0e648037cc70116bfafe0315338897f63f9c3bb8b150b6a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f7374617475735820e5f2ad1ffc1c7136c7dc59a183b9dc85af38c620d46492676eb016bb2c7b9a566e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840ab973292cdcbe1c3f54d07a7a822d3c48616abfd9067987e105d8901d0ab946a4b2b6ea038a28e4c8af66e4aecaf503909d67c8dd4153625a5dd121ea45fa30182a1655354414b45a1716e6575726f6e5f6964656e7469666965720081a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d657824636c61696d5f6f725f726566726573685f6e6575726f6e5f66726f6d5f6163636f756e7463617267581f4449444c026c029cb1fa2501ba89e5c204786e6801000000000000000000006673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8656e6f6e63654f4449444c0001780000000000000000ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840adc30181799a4474ad03c3a909dcd1d8ee08fe9d23f74314a031ebeb69a340a87680d9549ed6632956130d9e62ee3fa487402c7ab1dd3497aeaf83d36bedec056a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f7374617475735820788935ee98703620ec63813b2036daa46989ead54a6b940264d44a9fc0241fae6e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840e5a4c7bdd8a17e6581f05c25d9532fd322ea18b1fdd03b06ea40f886c50a74e6adfa530dc9a5a6a0754535004eaa4cf2dbf3fab9684e0d495f3b4eb4ff449b0e82a1765345545f444953534f4c56455f54494d455354414d50a1716e6575726f6e5f6964656e7469666965720081a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902bc4449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d3080201000001040106b3990d70000000000100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8656e6f6e63654f4449444c0001780000000000000000ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840e2ada2cf653ebbba2a93d1b013415c5102881ae6a5c58e9abf8683a33aa624e404d2958e1b47e0e98f9e37092221fd816fc13b965ca98fc1e61c4653a279640f6a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f73746174757358203652695a86832a2bb361f3ba21418f461ca5f604c2d43b47d05eeb5ba77f114f6e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f73696758400dc0bce4b86c0fd6a1b21ddaa5380b432a637bc5084c1b77356188308618bd9f97513ae5d351a2067c6e8ae8ce7f022ded21f21c3aaaf030a2f47040df1db90b82a16e53544152545f444953534f4c5645a1716e6575726f6e5f6964656e7469666965720081a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902b44449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d30802010000010401030100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8656e6f6e63654f4449444c0001780000000000000000ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840fb216f00ff6540e9759e8b6095487a7ea258f4d3fa459f30bb58816932082a14df78c22924941ff3a1897bf3dc468ceefe0e83d94580cdd2ec21ba3a51380e056a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f7374617475735820f79dc941816eb5744a48e0ba6ed493442c4089ac5430de5b3e11d925db436a206e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840b120ab9da353f23cbc854f09df28e8a59a9227a4e9d615dbe102ea0f7f6991a34f109accd03d9c8ac3e30ecf2f22fdcea2019424c851bd8a3d68bcd2dba6fc00"
}

送信しようとするトランザクションの内容を確認する

トランザクションの内容をデコードするために /construction/parse エンドポイントを呼び出します。

note

下の transaction フィールドの値を、前のステップで取得した signed_transaction フィールドの値で置き換えます。signed フィールドは true に設定されていることに注意してください。

curl -0 -X POST http://localhost:8080/construction/parse \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- <<EOF
{
"network_identifier": { "blockchain": "Internet Computer", "network": "00000000000000020101" },
"signed": true,
"transaction": "84826b5452414e53414354494f4e81a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000201016b6d6574686f645f6e616d656773656e645f706263617267584b0a0b089a8fa881d7d8b4b0c50112070a050880c2d72f1a0308904e2a220a2092bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc63a0a08a8edf6e0fd928cdf166673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f73696758405a5297f7555df2d98bd945ecff7afb11456164621da2439f665900abaaa17655e2e4801284c458639fc0e648037cc70116bfafe0315338897f63f9c3bb8b150b6a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f7374617475735820e5f2ad1ffc1c7136c7dc59a183b9dc85af38c620d46492676eb016bb2c7b9a566e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840ab973292cdcbe1c3f54d07a7a822d3c48616abfd9067987e105d8901d0ab946a4b2b6ea038a28e4c8af66e4aecaf503909d67c8dd4153625a5dd121ea45fa30182a1655354414b45a1716e6575726f6e5f6964656e7469666965720081a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d657824636c61696d5f6f725f726566726573685f6e6575726f6e5f66726f6d5f6163636f756e7463617267581f4449444c026c029cb1fa2501ba89e5c204786e6801000000000000000000006673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8656e6f6e63654f4449444c0001780000000000000000ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840adc30181799a4474ad03c3a909dcd1d8ee08fe9d23f74314a031ebeb69a340a87680d9549ed6632956130d9e62ee3fa487402c7ab1dd3497aeaf83d36bedec056a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f7374617475735820788935ee98703620ec63813b2036daa46989ead54a6b940264d44a9fc0241fae6e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840e5a4c7bdd8a17e6581f05c25d9532fd322ea18b1fdd03b06ea40f886c50a74e6adfa530dc9a5a6a0754535004eaa4cf2dbf3fab9684e0d495f3b4eb4ff449b0e82a1765345545f444953534f4c56455f54494d455354414d50a1716e6575726f6e5f6964656e7469666965720081a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902bc4449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d3080201000001040106b3990d70000000000100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8656e6f6e63654f4449444c0001780000000000000000ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840e2ada2cf653ebbba2a93d1b013415c5102881ae6a5c58e9abf8683a33aa624e404d2958e1b47e0e98f9e37092221fd816fc13b965ca98fc1e61c4653a279640f6a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f73746174757358203652695a86832a2bb361f3ba21418f461ca5f604c2d43b47d05eeb5ba77f114f6e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f73696758400dc0bce4b86c0fd6a1b21ddaa5380b432a637bc5084c1b77356188308618bd9f97513ae5d351a2067c6e8ae8ce7f022ded21f21c3aaaf030a2f47040df1db90b82a16e53544152545f444953534f4c5645a1716e6575726f6e5f6964656e7469666965720081a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902b44449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d30802010000010401030100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8656e6f6e63654f4449444c0001780000000000000000ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840fb216f00ff6540e9759e8b6095487a7ea258f4d3fa459f30bb58816932082a14df78c22924941ff3a1897bf3dc468ceefe0e83d94580cdd2ec21ba3a51380e056a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f7374617475735820f79dc941816eb5744a48e0ba6ed493442c4089ac5430de5b3e11d925db436a206e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840b120ab9da353f23cbc854f09df28e8a59a9227a4e9d615dbe102ea0f7f6991a34f109accd03d9c8ac3e30ecf2f22fdcea2019424c851bd8a3d68bcd2dba6fc00"
}
EOF

レスポンスはトランザクションの意図と一致する必要あります。

{
"operations": [
{
"operation_identifier": {"index": 0},
"type": "TRANSACTION",
"status": null,
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"amount": {
"value": "-100000000",
"currency": {"symbol": "ICP", "decimals": 8}
}
},
{
"operation_identifier": {"index": 1},
"type": "TRANSACTION",
"status": null,
"account": {
"address": "92bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc6"
},
"amount": {
"value": "100000000",
"currency": {"symbol": "ICP", "decimals": 8}
}
},
{
"operation_identifier": {"index": 2},
"type": "FEE",
"status": null,
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"amount": {
"value": "-10000",
"currency": {"symbol": "ICP", "decimals": 8}
}
},
{
"operation_identifier": {"index": 3},
"type": "STAKE",
"status": null,
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"neuron_index": 0
}
},
{
"operation_identifier": {"index": 4},
"type": "SET_DISSOLVE_TIMESTAMP",
"status": null,
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"dissolve_time_utc_seconds": 1879939507,
"neuron_index": 0
}
},
{
"operation_identifier": {"index": 5},
"type": "START_DISSOLVE",
"status": null,
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"neuron_index": 0
}
}
],
"account_identifier_signers": [
{
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
}
]
}

トランザクションを送信する

construction/submit エンドポイントを呼び出して、署名付きトランザクションを送信します。以下のリクエストの signed_transaction フィールドを、 /construction/combine エンドポイントから取得した signed_transaction フィールドの値で置き換えてください。

curl -0 -X POST http://localhost:8080/construction/submit \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- <<EOF
{
"network_identifier": { "blockchain": "Internet Computer", "network": "00000000000000020101" },
"signed_transaction": "84826b5452414e53414354494f4e81a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000201016b6d6574686f645f6e616d656773656e645f706263617267584b0a0b089a8fa881d7d8b4b0c50112070a050880c2d72f1a0308904e2a220a2092bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc63a0a08a8edf6e0fd928cdf166673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f73696758405a5297f7555df2d98bd945ecff7afb11456164621da2439f665900abaaa17655e2e4801284c458639fc0e648037cc70116bfafe0315338897f63f9c3bb8b150b6a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f7374617475735820e5f2ad1ffc1c7136c7dc59a183b9dc85af38c620d46492676eb016bb2c7b9a566e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840ab973292cdcbe1c3f54d07a7a822d3c48616abfd9067987e105d8901d0ab946a4b2b6ea038a28e4c8af66e4aecaf503909d67c8dd4153625a5dd121ea45fa30182a1655354414b45a1716e6575726f6e5f6964656e7469666965720081a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d657824636c61696d5f6f725f726566726573685f6e6575726f6e5f66726f6d5f6163636f756e7463617267581f4449444c026c029cb1fa2501ba89e5c204786e6801000000000000000000006673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8656e6f6e63654f4449444c0001780000000000000000ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840adc30181799a4474ad03c3a909dcd1d8ee08fe9d23f74314a031ebeb69a340a87680d9549ed6632956130d9e62ee3fa487402c7ab1dd3497aeaf83d36bedec056a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f7374617475735820788935ee98703620ec63813b2036daa46989ead54a6b940264d44a9fc0241fae6e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840e5a4c7bdd8a17e6581f05c25d9532fd322ea18b1fdd03b06ea40f886c50a74e6adfa530dc9a5a6a0754535004eaa4cf2dbf3fab9684e0d495f3b4eb4ff449b0e82a1765345545f444953534f4c56455f54494d455354414d50a1716e6575726f6e5f6964656e7469666965720081a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902bc4449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d3080201000001040106b3990d70000000000100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8656e6f6e63654f4449444c0001780000000000000000ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840e2ada2cf653ebbba2a93d1b013415c5102881ae6a5c58e9abf8683a33aa624e404d2958e1b47e0e98f9e37092221fd816fc13b965ca98fc1e61c4653a279640f6a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f73746174757358203652695a86832a2bb361f3ba21418f461ca5f604c2d43b47d05eeb5ba77f114f6e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f73696758400dc0bce4b86c0fd6a1b21ddaa5380b432a637bc5084c1b77356188308618bd9f97513ae5d351a2067c6e8ae8ce7f022ded21f21c3aaaf030a2f47040df1db90b82a16e53544152545f444953534f4c5645a1716e6575726f6e5f6964656e7469666965720081a266757064617465a367636f6e74656e74bf6c726571756573745f747970656463616c6c6b63616e69737465725f69644a000000000000000101016b6d6574686f645f6e616d656d6d616e6167655f6e6575726f6e636172675902b44449444c3a6c03dbb70101cbe2b58b0803f1bb8b880d386e026c01dbb701786e046b0a9b9cd0a40105bab5f1a40107918bacf10208fc9fc683050ac6b3bb91060f8db2d592091691b2fab80a17e0f8fffd0b1889b8b3b30e34a3f3c0ad0f356c01dbe2be9509066e686c01b9ef938008786c02afa3bda10175c2cee0d80c096d026c01d7ab010b6e0c6b039ef5cc0f0d9992ccd0010edae1c99903786c006c029cb1fa2506ba89e5c204786c01a78882820a106e116b0796a7f71512f381d4ab0213b09b9ba4070dd0fb87af070d90f29afe0714e4ac938d0c0dc3a2f6c90e156c01f6b0989a08066c018eddc3a60d066c018dc3b2b303796c01c88ecad50a786c02ea99cff20475b2b8d4960b016c05f5bbe3900178d2bbf0d9017eb9ef93800878dbe2be950906ef9999fe09786c04efd6e4027198abec810119b6f798b2011aa696a48708716e716e1b6b09d881c9c40300d69ce79d0a1c82ffcfaa0c1ee3c3c5990e27b1a5aea10e2bf5d9d7a50e2dfad5ddf40e2edb9cebf70e30d6f4c7ff0f336c02e4d7bee905758effd6e90e1d6d7b6c03ce9ca6ce011ff382ccb30723b9ef938008786e206c02dbb701069df1afe707216e226c01cedfa0a8041d6e246b02fdf59aec0b25e3b586ff0c266c01f5bbe39001786c01a9ddf49b07216c0184aead33286d296c020075012a6c01c2cee0d80c096c01a4ccf7dd0a2c6d1e6c089eb493cf0378befa8dd40479be8fe6e30478ce89be97067886f998bc0978c5cae3d40a7893a190e00c78f5e1d0e70d786c018594e2c50b2f6d686c01f0a2cabb0b316e326b02bf80e42b20c6a6e4b90a206c0196bdb4e904716c01b99d9da50b796c02a9ddf49b0721d8a38ca80d366e376c01e0a9b302786e396b02cd8e8eb9041dcebee1d30802010000010401030100201c76a1738350f93180d6b6f170b573d0862d574d5a69ae3c0aeb74315494b3ca6673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e026e696e67726573735f6578706972791b16be30cfbd3b16a8656e6f6e63654f4449444c0001780000000000000000ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840fb216f00ff6540e9759e8b6095487a7ea258f4d3fa459f30bb58816932082a14df78c22924941ff3a1897bf3dc468ceefe0e83d94580cdd2ec21ba3a51380e056a726561645f7374617465a367636f6e74656e74bf6c726571756573745f747970656a726561645f73746174656673656e646572581d48c5a6e93d9a3d10c4ba3c7927c97c18df4b0fcdac3a38ad3f08106e0265706174687381824e726571756573745f7374617475735820f79dc941816eb5744a48e0ba6ed493442c4089ac5430de5b3e11d925db436a206e696e67726573735f6578706972791b16be30cfbd3b16a8ff6d73656e6465725f7075626b6579582c302a300506032b6570032100ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d6a73656e6465725f7369675840b120ab9da353f23cbc854f09df28e8a59a9227a4e9d615dbe102ea0f7f6991a34f109accd03d9c8ac3e30ecf2f22fdcea2019424c851bd8a3d68bcd2dba6fc00"
}
EOF

以下のようなレスポンスがあるはずです:

{
"transaction_identifier": {
"hash": "aa0de8d73d930e49f6e3fd4db66cb34360710ee57b9aef5ef66e2c1cb0513b65"
},
"metadata": {
"operations": [
{
"operation_identifier": { "index": 0 },
"status": "COMPLETED",
"type": "TRANSACTION",
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"amount": {
"value": "-100000000",
"currency": { "symbol": "ICP", "decimals": 8 }
}
},
{
"operation_identifier": { "index": 1 },
"status": "COMPLETED",
"type": "TRANSACTION",
"account": {
"address": "92bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc6"
},
"amount": {
"value": "100000000",
"currency": { "symbol": "ICP", "decimals": 8 }
}
},
{
"operation_identifier": { "index": 2 },
"status": "COMPLETED",
"type": "FEE",
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"amount": {
"value": "-10000",
"currency": { "symbol": "ICP", "decimals": 8 }
}
},
{
"operation_identifier": { "index": 3 },
"status": "COMPLETED",
"type": "STAKE",
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"neuron_index": 0,
"neuron_id": 8654960738044813476
}
},
{
"operation_identifier": { "index": 4 },
"status": "COMPLETED",
"type": "SET_DISSOLVE_TIMESTAMP",
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"neuron_index": 0,
"dissolve_time_utc_seconds": 1879939507
}
},
{
"operation_identifier": { "index": 5 },
"status": "COMPLETED",
"type": "START_DISSOLVE",
"account": {
"address": "8af54f1fa09faeca18d294e0787346264f9f1d6189ed20ff14f029a160b787e8"
},
"metadata": {
"neuron_index": 0
}
}
]
}
}
note
  • Neuron の管理操作は、Rosetta の仕様に厳密に従っているわけではありません。上のトランザクションを /block/transaction エンドポイントを使ってハッシュで調べると、台帳の送金しか含まれていないことになります。さらに、トランザクションに Nueron 管理操作しか含まれていない場合、返されるトランザクションのハッシュは台帳チェーン上に全く存在しないことになります。そのため、レスポンスの metadata フィールドには、 /block/transaction が返すのと同じフォーマットで、すべての操作のステータスが含まれます。
  • STAKE 操作は、ガバナンススマートコントラクトが作成した Nueron の一意な識別子を返します。この識別子を使用して、NNS Dapp または https://ic.rocks 上で Nueron を見つけることができます。

Neuron の状態を確認する

それでは、新しく作成された Nueron の状態を確認してみましょう。

note
  • 以下の address フィールドは、ステップ Compute the ledger account for staking で取得した Nueron のアドレスに置き換えてください。

  • public_key.hex_bytes は、あなたの公開鍵の16進数(hex)で置き換えてください。

curl -0 -X POST http://localhost:8080/account/balance \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- <<EOF
{
"network_identifier": { "blockchain": "Internet Computer", "network": "00000000000000020101" },
"account_identifier": {
"address": "92bfc8dd46076c46de4444f15afbb8f7a5050af240384a8a2d115b359f100fc6"
},
"metadata": {
"account_type": "neuron",
"neuron_index": 0,
"public_key": {
"hex_bytes": "ba5242d02642aede88a5f9fe82482a9fd0b6dc25f38c729253116c6865384a9d",
"curve_type": "edwards25519"
}
}
}
EOF

以下のようなレスポンスがあるはずです:

{
"block_identifier": {
"index": 1157,
"hash": "04012aff1447b92589ccafab3c45243db4aa4b7c36c93fc5d22a7cac15ce7797"
},
"balances": [
{
"value": "100000000",
"currency": { "symbol": "ICP", "decimals": 8 }
}
],
"metadata": {
"verified_query": false,
"retrieved_at_timestamp_seconds": 1640273314,
"state": "DISSOLVING",
"age_seconds": 0,
"dissolve_delay_seconds": 239666197,
"voting_power": 779728174,
"created_timestamp_seconds": 1638799843
}
}