-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 13 additions & 2 deletions
15
source/resources/examples/typescript/transfer/SigningATransactionOffline.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */ |