![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@rholabs/rho-sdk
Advanced tools
npm install @rholabs/rho-sdk
Create Rho SDK with testnet configuration:
import RhoSDK from '@rholabs/rho-sdk';
const rhoSDK = new RhoSDK({ network: 'testnet' });
RhoSDKParams: Object
(optional)
export type RhoSDKNetwork = 'mainnet' | 'testnet' | 'custom'
export interface RhoSDKParams {
network?: RhoSDKNetwork
routerAddress?: string
viewAddress?: string
quoterAddress?: string
rpcUrl?: string
oracleServiceUrl?: string
privateKey?: string
provider?: JsonRpcProvider | BrowserProvider
signer?: JsonRpcSigner
}
getActiveMarketIds(offset, limit)
Get active market ids
Parameters
offset
- Number
(optional)limit
- Number
(optional)Returns
String[]
getActiveMarkets({ oraclePackages, offset, limit })
Get active markets
Parameters
oraclePackages
- OraclePackages[]
(optional)offset
- Number
(optional)limit
- Number
(optional)Returns
MarketInfo[]
getPortfolio({ userAddress, oraclePackages, offset, limit })
Get user portfolio
Parameters
userAddress
- String
oraclePackages
- OraclePackages[]
(optional)offset
- Number
(optional)limit
- Number
(optional)Returns
MarketPortfolio[]
getTradeQuote({ marketId, futureId, notional, userAddress, oraclePackages? })
Get trade quote
Parameters
marketId
- String
futureId
- String
notional
- BigInt
userAddress
- String
oraclePackages
- OraclePackages[]
(optional)Returns
TradeQuote
getLiquidityProvisionQuote({ marketId, futureId, notional, operation, lowerBound, upperBound, userAddress, oraclePackages? })
Get liquidity provision quote
Parameters
marketId
- String
futureId
- String
notional
- BigInt
operation
- LiquidityOperation
lowerBound
- String
upperBound
- String
userAddress
- String
oraclePackages
- OraclePackages[]
(optional)Returns
LiquidityQuote
executeTrade({ marketId, futureId, notional, riskDirection, futureRateLimit, collateral, deadlineTimestamp, settleMaturedPositions?, oraclePackages? })
Execute trade
Parameters
marketId
- String
futureId
- String
notional
- BigInt
riskDirection
- RiskDirection
futureRateLimit
- BigInt
collateral
- BigInt
deadline
- Number
(optional, Date.now() + 5 _ 60 _ 1000)settleMaturedPositions
- Boolean
(optional, true)oraclePackages
- OraclePackages[]
(optional)Returns
TransactionReceipt
deposit({ marketId, recipientAddress, amount, settleMaturedPositions?, oraclePackages? })
Deposit
Parameters
marketId
- String
recipientAddress
- String
amount
- BigInt
settleMaturedPositions
- Boolean
(optional)oraclePackages
- OraclePackages[]
(optional)Returns
TransactionReceipt
withdraw({ marketId, amount, settleMaturedPositions?, oraclePackages? })
Withdraw
Parameters
marketId
- String
amount
- BigInt
settleMaturedPositions
- Boolean
(optional, true)oraclePackages
- OraclePackages[]
(optional)Returns
TransactionReceipt
provideLiquidity({ marketId, futureId, notional, collateral, lowerBound, upperBound, deadlineTimestamp?, settleMaturedPositions?, oraclePackages? })
Provide liquidity
Parameters
marketId
- String
futureId
- String
notional
- BigInt
collateral
- BigInt
lowerBound
- String
upperBound
- String
deadline
- Number
(optional, Date.now() + 5 _ 60 _ 1000)settleMaturedPositions
- Boolean
(optional, true)oraclePackages
- OraclePackages[]
(optional)Returns
TransactionReceipt
removeLiquidity({ marketId, futureId, notional, collateral, lowerBound, upperBound, deadlineTimestamp?, settleMaturedPositions?, oraclePackages? })
Remove liquidity
Parameters
marketId
- String
futureId
- String
notional
- BigInt
collateral
- BigInt
lowerBound
- String
upperBound
- String
deadline
- Number
settleMaturedPositions
- Boolean
(optional, Date.now() + 5 _ 60 _ 1000)oraclePackages
- OraclePackages[]
(optional)Returns
TransactionReceipt
import RhoSDK from '@rholabs/rho-sdk';
const rhoSDK = new RhoSDK({ network: 'testnet' })
import RhoSDK from '@rholabs/rho-sdk';
const rhoSDK = new RhoSDK({
network: 'testnet',
privateKey: '<PRIVATE_KEY>'
})
if (window.ethereum) {
const provider = new ethers.BrowserProvider(window.ethereum)
await provider.send("eth_requestAccounts", [])
const signer = await provider.getSigner()
const sdk = new RhoSDK({ network: 'testnet', signer })
const markets = await sdk.getActiveMarkets()
}
Create .env
file:
TEST_PRIVATE_KEY=12345
and run the tests:
yarn test
npm login
yarn build
npm publish --access public
FAQs
Rho Protocol SDK
The npm package @rholabs/rho-sdk receives a total of 16 weekly downloads. As such, @rholabs/rho-sdk popularity was classified as not popular.
We found that @rholabs/rho-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.