New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stellar-base

Package Overview
Dependencies
Maintainers
9
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stellar-base - npm Package Compare versions

Comparing version 8.2.2-soroban.11 to 8.2.2-soroban.12

47

lib/address.js

@@ -85,3 +85,3 @@ 'use strict';

value: function toScVal() {
return _xdr2.default.ScVal.scvObject(_xdr2.default.ScObject.scoAddress(this.toScAddress()));
return _xdr2.default.ScVal.scvAddress(this.toScAddress());
}

@@ -107,2 +107,14 @@

}
/**
* Return the raw public key bytes for this address.
*
* @returns {Buffer}
*/
}, {
key: 'toBuffer',
value: function toBuffer() {
return this._key;
}
}], [{

@@ -139,2 +151,35 @@ key: 'fromString',

}
/**
* Convert this from an xdr.ScVal type
*
* @param {xdr.ScVal} scVal - The xdr.ScVal type to parse
* @returns {Address}
*/
}, {
key: 'fromScVal',
value: function fromScVal(scVal) {
return Address.fromScAddress(scVal.address());
}
/**
* Convert this from an xdr.ScAddress type
*
* @param {xdr.ScAddress} scAddress - The xdr.ScAddress type to parse
* @returns {Address}
*/
}, {
key: 'fromScAddress',
value: function fromScAddress(scAddress) {
switch (scAddress.switch()) {
case _xdr2.default.ScAddressType.scAddressTypeAccount():
return Address.account(scAddress.accountId().ed25519());
case _xdr2.default.ScAddressType.scAddressTypeContract():
return Address.contract(scAddress.contractId());
default:
throw new Error('Unsupported address type');
}
}
}]);

@@ -141,0 +186,0 @@

4

lib/contract.js

@@ -71,3 +71,3 @@ 'use strict';

return _operation.Operation.invokeHostFunction({
function: _xdr2.default.HostFunction.hostFunctionTypeInvokeContract([_xdr2.default.ScVal.scvObject(_xdr2.default.ScObject.scoBytes(contractId)), _xdr2.default.ScVal.scvSymbol(method)].concat(params)),
function: _xdr2.default.HostFunction.hostFunctionTypeInvokeContract([_xdr2.default.ScVal.scvBytes(contractId), _xdr2.default.ScVal.scvSymbol(method)].concat(params)),
// TODO: Figure out how to calculate this or get it from the user?

@@ -77,3 +77,3 @@ footprint: new _xdr2.default.LedgerFootprint({

contractId: contractId,
key: _xdr2.default.ScVal.scvStatic(_xdr2.default.ScStatic.scsLedgerKeyContractCode())
key: _xdr2.default.ScVal.scvLedgerKeyContractExecutable()
}))],

@@ -80,0 +80,0 @@ readWrite: []

{
"name": "stellar-base",
"version": "8.2.2-soroban.11",
"version": "8.2.2-soroban.12",
"description": "Low level stellar support library",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -20,5 +20,8 @@ // TypeScript Version: 2.9

static contract(buffer: Buffer): Address;
static fromScVal(scVal: xdr.ScVal): Address;
static fromScAddress(scAddress: xdr.ScAddress): Address;
toString(): string;
toScVal(): xdr.ScVal;
toScAddress(): xdr.ScAddress;
toBuffer(): Buffer;
}

@@ -25,0 +28,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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