Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@coinbase/coinbase-sdk

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coinbase/coinbase-sdk - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

2

dist/coinbase/address/wallet_address.js

@@ -89,4 +89,4 @@ "use strict";

let transfer = transfer_1.Transfer.fromModel(response.data);
const wallet = new ethers_1.ethers.Wallet(this.key.privateKey);
if (!coinbase_1.Coinbase.useServerSigner) {
const wallet = new ethers_1.ethers.Wallet(this.key.privateKey);
const transaction = transfer.getTransaction();

@@ -93,0 +93,0 @@ let signedPayload = await wallet.signTransaction(transaction);

@@ -191,2 +191,3 @@ "use strict";

coinbase_1.Coinbase.apiClients.transfer = utils_1.transfersApiMock;
coinbase_1.Coinbase.useServerSigner = false;
});

@@ -234,2 +235,20 @@ it("should successfully create and complete a transfer", async () => {

});
it("it should successfully create and complete a transfer if using signer and key is not loaded", async () => {
coinbase_1.Coinbase.apiClients.transfer.createTransfer = (0, utils_1.mockReturnValue)(utils_1.VALID_TRANSFER_MODEL);
coinbase_1.Coinbase.apiClients.transfer.getTransfer = (0, utils_1.mockReturnValue)({
...utils_1.VALID_TRANSFER_MODEL,
status: types_1.TransferStatus.COMPLETE,
});
coinbase_1.Coinbase.useServerSigner = true;
const addressWithoutKey = new wallet_address_1.WalletAddress(utils_1.VALID_ADDRESS_MODEL, null);
await addressWithoutKey.createTransfer({
amount: weiAmount,
assetId: coinbase_1.Coinbase.assets.Wei,
destination,
timeoutSeconds,
intervalSeconds,
});
expect(coinbase_1.Coinbase.apiClients.transfer.createTransfer).toHaveBeenCalledTimes(1);
expect(coinbase_1.Coinbase.apiClients.transfer.getTransfer).toHaveBeenCalledTimes(1);
});
it("should throw an ArgumentError if the Wallet Network ID does not match the Address Network ID", async () => {

@@ -236,0 +255,0 @@ coinbase_1.Coinbase.apiClients.wallet = utils_1.walletsApiMock;

@@ -7,3 +7,3 @@ {

"repository": "https://github.com/coinbase/coinbase-sdk-nodejs",
"version": "0.0.10",
"version": "0.0.11",
"main": "dist/index.js",

@@ -10,0 +10,0 @@ "types": "dist/index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc