@solana/web3.js 1.12.1 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.browser.esm.js +9 -6
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +9 -6
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +17 -7
- package/lib/index.esm.js +9 -6
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +9 -6
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +1 -1
- package/lib/index.iife.min.js.map +1 -1
- package/module.flow.js +17 -6
- package/package.json +6 -6
- package/src/connection.ts +4 -6
- package/src/keypair.ts +21 -7
- package/src/publickey.ts +2 -16
- package/src/stake-program.ts +2 -7
package/lib/index.iife.js
CHANGED
|
@@ -20856,14 +20856,17 @@ var solanaWeb3 = (function (exports) {
|
|
|
20856
20856
|
*/
|
|
20857
20857
|
class Keypair {
|
|
20858
20858
|
/**
|
|
20859
|
-
*
|
|
20860
|
-
*
|
|
20861
|
-
* Create a new keypair instance from a {@link SignKeyPair}.
|
|
20859
|
+
* Create a new keypair instance.
|
|
20860
|
+
* Generate random keypair if no {@link Ed25519Keypair} is provided.
|
|
20862
20861
|
*
|
|
20863
20862
|
* @param keypair ed25519 keypair
|
|
20864
20863
|
*/
|
|
20865
20864
|
constructor(keypair) {
|
|
20866
|
-
|
|
20865
|
+
if (keypair) {
|
|
20866
|
+
this._keypair = keypair;
|
|
20867
|
+
} else {
|
|
20868
|
+
this._keypair = naclFast.exports.sign.keyPair();
|
|
20869
|
+
}
|
|
20867
20870
|
}
|
|
20868
20871
|
/**
|
|
20869
20872
|
* Generate a new random keypair
|
|
@@ -20918,7 +20921,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20918
20921
|
|
|
20919
20922
|
|
|
20920
20923
|
get publicKey() {
|
|
20921
|
-
return new PublicKey(this.
|
|
20924
|
+
return new PublicKey(this._keypair.publicKey);
|
|
20922
20925
|
}
|
|
20923
20926
|
/**
|
|
20924
20927
|
* The raw secret key for this keypair
|
|
@@ -20926,7 +20929,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20926
20929
|
|
|
20927
20930
|
|
|
20928
20931
|
get secretKey() {
|
|
20929
|
-
return this.
|
|
20932
|
+
return this._keypair.secretKey;
|
|
20930
20933
|
}
|
|
20931
20934
|
|
|
20932
20935
|
}
|