Skip to content

Commit

Permalink
A bit of cleanup
Browse files Browse the repository at this point in the history
There's still a lot of work to do here.
  • Loading branch information
segfaultxavi committed Dec 23, 2020
1 parent 097fa15 commit 5631d6a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
14 changes: 7 additions & 7 deletions source/guides/transfer/signing-transaction-offline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ On your offline workstation, open up your terminal and type:

.. code-block:: bash
`symbol-cli account generate --network TEST_NET --generation-hash 4009619EB7A9F824C5D0EE0E164E0F99CCD7906A475D7768FD60B452204BD0A2 --namespace-id symbol.xym --divisibility 6 --url http://api-01-ap-northeast-1`
symbol-cli account generate --network TEST_NET --generation-hash 4009619EB7A9F824C5D0EE0E164E0F99CCD7906A475D7768FD60B452204BD0A2 --namespace-id symbol.xym --divisibility 6 --url http://api-01-ap-northeast-1
But replace the "generation hash" and node "url" to match the information on your CLI.

Expand All @@ -58,7 +58,7 @@ On your offline workstation, open up your terminal and type:

.. code-block:: bash
`symbol-cli transaction transfer`
symbol-cli transaction transfer
Enter your wallet password and the details of your transfer transaction.

Expand All @@ -83,7 +83,7 @@ Open a text editor and set up the following typescript file to generate a URI:
:start-after: /* start block 01 */
:end-before: /* end block 01 */
Make sure you replace the transaction payload provided in the example with your own from step 1.
Make sure you replace the transaction payload provided in the example with your own from step 2.

Save the typescript file.

Expand All @@ -95,14 +95,14 @@ Run the file from step 2 in your terminal.

.. code-block:: bash
`tsc transaction-uri.ts`
`node transaction-uri.js`
tsc transaction-uri.ts
node transaction-uri.js
When executed successfully, your terminal should return the URI of your transaction.

.. code-block:: bash
`web+symbol://transaction?data=BC00000000000000E103B81AF5C9B507AEA2D9F72A5F34C24174C57A36C6E118D520FF2B12E681C3C7B90E7EB37F06CE313466EF96A850E7845ECBF84FCD48D0DEB22A618FE7750BC0D6111B2AC378C69A4C71D013D3C4A748BE4EE48635EB79FC3B4696157BF6320000000001985441A0860100000000007044243C04000000988F2D81D729AC69B750A50E315D3C9070B4410F6D1E73834D010C0000000000EEAFF441BA994BE7C0D454070000000000496D2074686520626F7373&generationHash=test&nodeUrl=http://localhost:3000&webhookUrl=http://myapp.local/id`
web+symbol://transaction?data=BC00000000000000E103B81AF5C9B507AEA2D9F72A5F34C24174C57A36C6E118D520FF2B12E681C3C7B90E7EB37F06CE313466EF96A850E7845ECBF84FCD48D0DEB22A618FE7750BC0D6111B2AC378C69A4C71D013D3C4A748BE4EE48635EB79FC3B4696157BF6320000000001985441A0860100000000007044243C04000000988F2D81D729AC69B750A50E315D3C9070B4410F6D1E73834D010C0000000000EEAFF441BA994BE7C0D454070000000000496D2074686520626F7373&generationHash=test&nodeUrl=http://localhost:3000&webhookUrl=http://myapp.local/id
Save the URI of your transaction.

Expand All @@ -116,7 +116,7 @@ Navigate to announce the transaction in the Symbol-CLI.

.. code-block:: bash
`symbol-cli transaction uri`
symbol-cli transaction uri
After you enter your wallet password, enter the transaction URI obtained from step 3.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
// transaction-uri.ts

/* start block 01 */
import { TransactionURI } from '../node_modules/symbol-uri-scheme/dist/src/uris/TransactionURI';
// replace with your transaction payload from step 1
const serializedTransaction = 'C400000000000000955D258534DE29AC7F111A3E201C35779619EFC13EC3A3097AC8721A55799FF43C173EA4A6BC3174847086D28F0257FBE6E771C798A1A5D22BF64E3C0F358001C0D6111B2AC378C69A4C71D013D3C4A748BE4EE48635EB79FC3B4696157BF6320000000001985441A08601000000000049D4EB3A04000000988F2D81D729AC69B750A50E315D3C9070B4410F6D1E73834D01140000000000EEAFF441BA994BE74054890000000000006F66666C696E65207472616E73616374696F6E';

// Replace with your transaction payload from step 2
const serializedTransaction =
'C400000000000000955D258534DE29AC7F111A3E201C35779619EFC13EC3A309' +
'7AC8721A55799FF43C173EA4A6BC3174847086D28F0257FBE6E771C798A1A5D2' +
'2BF64E3C0F358001C0D6111B2AC378C69A4C71D013D3C4A748BE4EE48635EB79' +
'FC3B4696157BF6320000000001985441A08601000000000049D4EB3A04000000' +
'988F2D81D729AC69B750A50E315D3C9070B4410F6D1E73834D01140000000000' +
'EEAFF441BA994BE74054890000000000006F66666C696E65207472616E736163' +
'74696F6E';

const URI = 'web+symbol://transaction?data=' + serializedTransaction + '&generationHash=test' +
'&nodeUrl=http://localhost:3000&webhookUrl=http://myapp.local/id';

console.log(URI);

/* end block 01 */

0 comments on commit 5631d6a

Please sign in to comment.