-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New transaction build, view and sign commands. New change key and addresses commands.
- Loading branch information
1 parent
13a1478
commit 0961a2e
Showing
41 changed files
with
2,957 additions
and
161 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
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 |
---|---|---|
@@ -1,15 +1,53 @@ | ||
namespace Cscli.ConsoleTool; | ||
|
||
public record struct Utxo(string TxHash, int OutputIndex, TokenBundle TokenBundle); | ||
public record struct NativeAssetValue(string PolicyId, string AssetName, ulong Quantity); | ||
|
||
public record struct TokenBundle(long LovelaceValue, NativeAssetValue[] NativeAssets); | ||
public record struct Balance(ulong Lovelaces, NativeAssetValue[] NativeAssets); | ||
|
||
public record struct NativeAssetValue(string PolicyId, string AssetNameHex, long Quantity); | ||
public record struct PendingTransactionOutput(string Address, Balance Value); | ||
|
||
public record WalletInfo(AccountInfo[] Accounts); | ||
public record UnspentTransactionOutput(string TxHash, uint OutputIndex, Balance Value) | ||
{ | ||
public override int GetHashCode() => ToString().GetHashCode(); | ||
public override string ToString() => $"{TxHash}_{OutputIndex}"; | ||
bool IEquatable<UnspentTransactionOutput>.Equals(UnspentTransactionOutput? other) | ||
=> other is not null && TxHash == other.TxHash && OutputIndex == other.OutputIndex; | ||
public ulong Lovelaces => Value.Lovelaces; | ||
} | ||
|
||
public record AccountInfo(string StakeAddress, string PaymentAddress, Utxo[] Utxos); | ||
public record TextEnvelope(string? Type, string? Description, string? CborHex); | ||
|
||
public record AddressInfo(string PaymentAddress, string? StakeAddress, Utxo[] Utxos); | ||
public record Tx( | ||
string Id, | ||
bool IsValid, | ||
TxBody TransactionBody, | ||
TxWitnessSet? TransactionWitnessSet, | ||
TxAuxData AuxiliaryData); | ||
|
||
public record TxBody( | ||
IEnumerable<TxIn> Inputs, | ||
IEnumerable<TxOut> Outputs, | ||
IEnumerable<NativeAssetValue> Mint, | ||
ulong Fee, | ||
uint? Ttl, | ||
string? AuxiliaryDataHash, | ||
uint? TransactionStartInterval); | ||
|
||
public record TxIn( | ||
string TransactionId, | ||
uint TransactionIndex); | ||
|
||
public record TxOut( | ||
string Address, | ||
Balance Value); | ||
|
||
public record TxWitnessSet( | ||
IEnumerable<TxVKeyWitness> VKeyWitnesses, | ||
IEnumerable<TxNativeScript> NativeScripts); | ||
|
||
public record TxVKeyWitness(string Verificationkey, string Signature); | ||
|
||
public record TxNativeScript(string Type); | ||
|
||
public record TxAuxData(Dictionary<int, object> Metadata); | ||
|
||
public record TextEnvelope(string? Type, string? Description, string? CborHex); |
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,7 +1,8 @@ | ||
{ | ||
"profiles": { | ||
"Cscli.ConsoleTool": { | ||
"commandName": "Project" | ||
"commandName": "Project", | ||
"commandLineArgs": " query info account --network testnet --address addr_test1qq4qw3s2p5q0ttfucewkttnz795ujue9jd7ruxrpsa05f47cq54ahxv48q2ja88q22f3t9s3gd3napuy9ausj7wdantsvjsd9s" | ||
} | ||
} | ||
} |
Oops, something went wrong.