-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update with new sdk for new 4.4.0 features (#13)
* update with new sdk for new 4.4.0 features
- Loading branch information
1 parent
b57d7c9
commit c702912
Showing
6 changed files
with
100 additions
and
55 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
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
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const program = require('commander'); | ||
const util = require('./util'); | ||
|
||
program | ||
.description('Publish a signed interchain transaction on the public network', { | ||
blockchain: "The blockchain type to set (i.e. 'bitcoin', 'ethereum', etc)", | ||
name: 'The name of the configured interchain to set as default', | ||
signedTransaction: 'The signed interchain transaction to publish (what is returned from `dctl interchain <blockchain> transaction`' | ||
}) | ||
.arguments('<blockchain> <name> <signedTransaction>') | ||
.option('-v, --verbose', '(optional) Enable STDOUT logger in your Dragonchain SDK') | ||
.option('-i, --dragonchainId [dragonchainID]', '(optional) Override the default dragonchain ID for this command') | ||
.parse(process.argv); | ||
|
||
util.wrapper(program, async client => { | ||
const [blockchain, name, signedTransaction] = program.args; | ||
if (!blockchain) throw new Error("Parameter 'blockchain' must be provided"); | ||
if (!name) throw new Error("Parameter 'name' must be provided"); | ||
if (!signedTransaction) throw new Error("Parameter 'signedTransaction' must be provided"); | ||
const response = await client.publishInterchainTransaction({ | ||
blockchain, | ||
name, | ||
signedTransaction | ||
}); | ||
console.log(JSON.stringify(response, null, 2)); | ||
}); |
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
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