@carrot-protocol/http-client 0.2.19-dummy-provider-dev-2ccafd3 → 0.2.19-dummy-provider-dev-d678c83
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/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ exports.isValidVaultHistoricalApyInterval = isValidVaultHistoricalApyInterval;
|
|
|
31
31
|
exports.prepareUnsignedTx = prepareUnsignedTx;
|
|
32
32
|
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
33
33
|
const anchor = __importStar(require("@coral-xyz/anchor"));
|
|
34
|
+
const anchor_1 = require("@coral-xyz/anchor");
|
|
34
35
|
const bs58_1 = require("bs58");
|
|
35
36
|
class Client {
|
|
36
37
|
constructor(baseUrl, provider) {
|
|
@@ -40,7 +41,8 @@ class Client {
|
|
|
40
41
|
this.provider = provider;
|
|
41
42
|
}
|
|
42
43
|
else {
|
|
43
|
-
const
|
|
44
|
+
const kp = anchor.web3.Keypair.generate();
|
|
45
|
+
const wallet = new anchor_1.Wallet(kp);
|
|
44
46
|
const connection = new anchor.web3.Connection("http://localhost:8899", "processed");
|
|
45
47
|
// if no provider is passed in, create a dummy provider, aka read only mode
|
|
46
48
|
this.provider = new anchor.AnchorProvider(connection, wallet, {});
|