@@ -16,22 +16,27 @@ declare interface CardanoApi {
1616 objectType : string ;
1717
1818 /**
19- * Create a new unsigned transaction in the current era (currently Conway).
20- * @returns A promise that resolves to a new `UnsignedTx` object.
19+ * Methods for creating unsigned transactions.
2120 */
22- newTx ( ) : Promise < UnsignedTx > ;
23-
24- /**
25- * Create a new unsigned transaction in the current experimental era (currently unavailable).
26- * @returns A promise that resolves to a new `UnsignedTx` object.
27- */
28- newExperimentalEraTx ( ) : Promise < UnsignedTx > ;
29-
30- /**
31- * Create a new unsigned transaction in the Conway era.
32- * @returns A promise that resolves to a new `UnsignedTx` object.
33- */
34- newConwayTx ( ) : Promise < UnsignedTx > ;
21+ tx : {
22+ /**
23+ * Create a new unsigned transaction in the current era (currently Conway).
24+ * @returns A promise that resolves to a new `UnsignedTx` object.
25+ */
26+ newTx ( ) : Promise < UnsignedTx > ;
27+
28+ /**
29+ * Create a new unsigned transaction in the current experimental era (currently unavailable).
30+ * @returns A promise that resolves to a new `UnsignedTx` object.
31+ */
32+ newExperimentalEraTx ( ) : Promise < UnsignedTx > ;
33+
34+ /**
35+ * Create a new unsigned transaction in the Conway era.
36+ * @returns A promise that resolves to a new `UnsignedTx` object.
37+ */
38+ newConwayTx ( ) : Promise < UnsignedTx > ;
39+ }
3540
3641 /**
3742 * Create a new client connection for communicating with a Cardano node through gRPC-web.
@@ -41,62 +46,77 @@ declare interface CardanoApi {
4146 newGrpcConnection ( webGrpcUrl : string ) : Promise < GrpcConnection > ;
4247
4348 /**
44- * Generate a simple payment wallet for mainnet.
45- * @returns A promise that resolves to a new `Wallet` object.
46- */
47- generatePaymentWallet ( ) : Promise < Wallet > ;
48-
49- /**
50- * Generate a stake wallet for mainnet.
51- * @returns A promise that resolves to a new `Wallet` object.
52- */
53- generateStakeWallet ( ) : Promise < Wallet > ;
54-
55- /**
56- * Restore a mainnet payment wallet from a Bech32 encoded signing key.
57- * @param signingKeyBech32 The Bech32 encoded signing key.
58- * @returns A promise that resolves to a new `Wallet` object.
59- */
60- restorePaymentWalletFromSigningKeyBech32 ( signingKeyBech32 : string ) : Promise < Wallet > ;
61-
62- /**
63- * Restore a mainnet stake wallet from Bech32 encoded signing keys.
64- * @param paymentSigningKeyBech32 The Bech32 encoded payment signing key.
65- * @param stakeSigningKeyBech32 The Bech32 encoded stake signing key.
66- * @returns A promise that resolves to a new `Wallet` object.
67- */
68- restoreStakeWalletFromSigningKeyBech32 ( paymentSigningKeyBech32 : string , stakeSigningKeyBech32 : string ) : Promise < Wallet > ;
69-
70- /**
71- * Generate a simple payment wallet for testnet, given the testnet's network magic.
72- * @param networkMagic The network magic for the testnet.
73- * @returns A promise that resolves to a new `Wallet` object.
74- */
75- generateTestnetPaymentWallet ( networkMagic : number ) : Promise < Wallet > ;
76-
77- /**
78- * Generate a stake wallet for testnet, given the testnet's network magic.
79- * @param networkMagic The network magic for the testnet.
80- * @returns A promise that resolves to a new `Wallet` object.
81- */
82- generateTestnetStakeWallet ( networkMagic : number ) : Promise < Wallet > ;
83-
84- /**
85- * Restore a testnet payment wallet from a Bech32 encoded signing key.
86- * @param networkMagic The network magic for the testnet.
87- * @param signingKeyBech32 The Bech32 encoded signing key.
88- * @returns A promise that resolves to a new `Wallet` object.
89- */
90- restoreTestnetPaymentWalletFromSigningKeyBech32 ( networkMagic : number , signingKeyBech32 : string ) : Promise < Wallet > ;
91-
92- /**
93- * Restore a testnet stake wallet from Bech32 encoded signing keys.
94- * @param networkMagic The network magic for the testnet.
95- * @param paymentSigningKeyBech32 The Bech32 encoded payment signing key.
96- * @param stakeSigningKeyBech32 The Bech32 encoded stake signing key.
97- * @returns A promise that resolves to a new `Wallet` object.
49+ * Methods for generating and restoring wallets.
9850 */
99- restoreTestnetStakeWalletFromSigningKeyBech32 ( networkMagic : number , paymentSigningKeyBech32 : string , stakeSigningKeyBech32 : string ) : Promise < Wallet > ;
51+ wallet : {
52+ /**
53+ * Methods for mainnet wallets.
54+ */
55+ mainnet : {
56+ /**
57+ * Generate a simple payment wallet for mainnet.
58+ * @returns A promise that resolves to a new `Wallet` object.
59+ */
60+ generatePaymentWallet ( ) : Promise < Wallet > ;
61+
62+ /**
63+ * Generate a stake wallet for mainnet.
64+ * @returns A promise that resolves to a new `Wallet` object.
65+ */
66+ generateStakeWallet ( ) : Promise < Wallet > ;
67+
68+ /**
69+ * Restore a mainnet payment wallet from a Bech32 encoded signing key.
70+ * @param signingKeyBech32 The Bech32 encoded signing key.
71+ * @returns A promise that resolves to a new `Wallet` object.
72+ */
73+ restorePaymentWalletFromSigningKeyBech32 ( signingKeyBech32 : string ) : Promise < Wallet > ;
74+
75+ /**
76+ * Restore a mainnet stake wallet from Bech32 encoded signing keys.
77+ * @param paymentSigningKeyBech32 The Bech32 encoded payment signing key.
78+ * @param stakeSigningKeyBech32 The Bech32 encoded stake signing key.
79+ * @returns A promise that resolves to a new `Wallet` object.
80+ */
81+ restoreStakeWalletFromSigningKeyBech32 ( paymentSigningKeyBech32 : string , stakeSigningKeyBech32 : string ) : Promise < Wallet > ;
82+ }
83+
84+ /**
85+ * Methods for wallets in other networks.
86+ */
87+ testnet : {
88+ /**
89+ * Generate a simple payment wallet for testnet, given the testnet's network magic.
90+ * @param networkMagic The network magic for the testnet.
91+ * @returns A promise that resolves to a new `Wallet` object.
92+ */
93+ generateTestnetPaymentWallet ( networkMagic : number ) : Promise < Wallet > ;
94+
95+ /**
96+ * Generate a stake wallet for testnet, given the testnet's network magic.
97+ * @param networkMagic The network magic for the testnet.
98+ * @returns A promise that resolves to a new `Wallet` object.
99+ */
100+ generateTestnetStakeWallet ( networkMagic : number ) : Promise < Wallet > ;
101+
102+ /**
103+ * Restore a testnet payment wallet from a Bech32 encoded signing key.
104+ * @param networkMagic The network magic for the testnet.
105+ * @param signingKeyBech32 The Bech32 encoded signing key.
106+ * @returns A promise that resolves to a new `Wallet` object.
107+ */
108+ restoreTestnetPaymentWalletFromSigningKeyBech32 ( networkMagic : number , signingKeyBech32 : string ) : Promise < Wallet > ;
109+
110+ /**
111+ * Restore a testnet stake wallet from Bech32 encoded signing keys.
112+ * @param networkMagic The network magic for the testnet.
113+ * @param paymentSigningKeyBech32 The Bech32 encoded payment signing key.
114+ * @param stakeSigningKeyBech32 The Bech32 encoded stake signing key.
115+ * @returns A promise that resolves to a new `Wallet` object.
116+ */
117+ restoreTestnetStakeWalletFromSigningKeyBech32 ( networkMagic : number , paymentSigningKeyBech32 : string , stakeSigningKeyBech32 : string ) : Promise < Wallet > ;
118+ }
119+ }
100120}
101121
102122/**
0 commit comments