diff --git a/.changeset/brown-laws-switch.md b/.changeset/brown-laws-switch.md new file mode 100644 index 0000000..174a903 --- /dev/null +++ b/.changeset/brown-laws-switch.md @@ -0,0 +1,5 @@ +--- +"@shadeprotocol/shadejs": patch +--- + +Money Market Reward Pools diff --git a/.changeset/poor-apricots-yell.md b/.changeset/poor-apricots-yell.md new file mode 100644 index 0000000..086b29f --- /dev/null +++ b/.changeset/poor-apricots-yell.md @@ -0,0 +1,5 @@ +--- +"@shadeprotocol/shadejs": patch +--- + +Money Market Public Logs Querys diff --git a/README.md b/README.md index 7d38f00..2add551 100644 --- a/README.md +++ b/README.md @@ -43,4 +43,9 @@ Docs will be available on a vitepress site. You can run the site locally with th ``` $ yarn docs:dev +``` + +## Building new version run +```bash +yarn changeset ``` \ No newline at end of file diff --git a/package.json b/package.json index 7412bce..d4b9573 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@shadeprotocol/shadejs", "description": "The Typescript SDK for Shade Protocol", - "version": "1.0.9", + "version": "1.5.10-beta.1", "author": "Secure Secrets", "bugs": { "url": "https://github.com/securesecrets/shadejs/issues" @@ -42,7 +42,7 @@ "dependencies": { "bignumber.js": "^9.1.2", "rxjs": "^7.8.1", - "secretjs": "^1.12.1", + "secretjs": "1.15.0-beta.0", "vite": "^4.5.0", "whatwg-fetch": "^3.6.19" }, diff --git a/src/contracts/definitions/moneyMarket.ts b/src/contracts/definitions/moneyMarket.ts index e4938b9..b0248ca 100644 --- a/src/contracts/definitions/moneyMarket.ts +++ b/src/contracts/definitions/moneyMarket.ts @@ -177,6 +177,18 @@ function msgMoneyMarketRepay({ }).msg; } +/** + * Query the Public Event Logs for momeymarket contract + * NOT FOR PRODUCTION USE, CONTRACT IS IN DEVELOPMENT ON TESTNET ONLY + */ +const msgQueryMoneyMarketPublicLogs = ( + pagination?: Pagination, +) => ({ + get_public_log: { + pagination, + }, +}); + export { msgQueryMoneyMarketConfig, msgQueryMoneyMarketCollaterals, @@ -188,4 +200,5 @@ export { msgMoneyMarketSupply, msgMoneyMarketWithdrawSupply, msgMoneyMarketRepay, + msgQueryMoneyMarketPublicLogs, }; diff --git a/src/contracts/services/moneyMarket.ts b/src/contracts/services/moneyMarket.ts index 06c7dd2..3bd4fe4 100644 --- a/src/contracts/services/moneyMarket.ts +++ b/src/contracts/services/moneyMarket.ts @@ -5,6 +5,12 @@ import { map, lastValueFrom, } from 'rxjs'; + +import { + BatchQueryParsedResponse, + BatchQueryParams, + BatchQueryParsedResponseItem, +} from '~/types/contracts/batchQuery/model'; import { sendSecretClientContractQuery$ } from '~/client/services/clientServices'; import { ConfigResponse, GetCollateralResponse, GetMarketsResponse } from '~/types/contracts/moneyMarket/response'; import { @@ -13,11 +19,10 @@ import { BatchMoneyMarketGetMarkets, ContractAndPagination, Pagination, ParsedConfigResponse, ParsedGetCollateralResponse, ParsedGetMarketsResponse, + ParsedRewardPoolsResponse, + RewardPoolResponse, } from '~/types/contracts/moneyMarket/model'; import { Contract } from '~/types/contracts/shared/index'; -import { - BatchQueryParams, BatchQueryParsedResponse, -} from '~/types/contracts/batchQuery/model'; import { MinBlockHeightValidationOptions } from '~/types'; import { batchQuery$ } from './batchQuery'; import { msgQueryMoneyMarketCollaterals, msgQueryMoneyMarketConfig, msgQueryMoneyMarketMarkets } from '../definitions/moneyMarket'; @@ -123,7 +128,8 @@ const parseMoneyMarketGetCollateral = ( collateralAmount: cur.amount, decimals: cur.decimals, maxInitialLtv: cur.max_initial_ltv, - liquidationThreshold: cur.liquidation_threshold, + publicLiquidationThreshold: cur.public_liquidation_threshold, + privateLiquidationThreshold: cur.private_liquidation_threshold, liquidationDiscount: cur.liquidation_discount, oracleKey: cur.oracle_key, depositEnabled: cur.status.deposit_enabled, @@ -572,6 +578,256 @@ async function batchQueryMoneyMarketGetCollateral({ })); } +// Parsing function for MoneyMarket Public Logs response +const parseMoneyMarketPublicLogs = (response: any) => ({ + page: response.page, + pageSize: response.page_size, + totalPages: response.total_pages, + totalItems: response.total_items, + data: response.data + ? response.data.map((event: any) => ({ + timestamp: new Date(event.timestamp * 1000), // Convert UNIX timestamp to JS Date + action: event.action, // Pass the full action JSON object without further parsing + })) + : [], +}); + +/** + * Query the Public Logs for a single money market contract using RxJS + * NOT FOR PRODUCTION USE, CONTRACT IS IN DEVELOPMENT ON TESTNET ONLY + */ +function queryMoneyMarketPublicLogs$({ + contractAddress, + codeHash, + lcdEndpoint, + chainId, + pagination, +}: { + contractAddress: string, + codeHash?: string, + lcdEndpoint?: string, + chainId?: string, + pagination?: Pagination, +}) { + return getActiveQueryClient$(lcdEndpoint, chainId).pipe( + switchMap(({ client }) => sendSecretClientContractQuery$({ + queryMsg: { + get_public_logs: { pagination }, + }, + client, + contractAddress, + codeHash, + })), + map((response) => parseMoneyMarketPublicLogs(response)), + first(), + ); +} + +/** + * Query the Public Logs for a single money market contract + * NOT FOR PRODUCTION USE, CONTRACT IS IN DEVELOPMENT ON TESTNET ONLY + */ +async function queryMoneyMarketPublicLogs({ + contractAddress, + codeHash, + lcdEndpoint, + chainId, + pageSize, + page, +}: { + contractAddress: string, + codeHash?: string, + lcdEndpoint?: string, + chainId?: string, + pageSize?: number, + page?: number, +}) { + return lastValueFrom(queryMoneyMarketPublicLogs$({ + contractAddress, + codeHash, + lcdEndpoint, + chainId, + pagination: pageSize !== undefined && page !== undefined + ? { page_size: pageSize, page } + : undefined, + })); +} + +/** + * Batch query the Public Logs for multiple money market contracts + * NOT FOR PRODUCTION USE, CONTRACT IS IN DEVELOPMENT ON TESTNET ONLY + */ +function batchQueryMoneyMarketPublicLogs$({ + queryPublicLogsContractAddress, + queryPublicLogsCodeHash, + lcdEndpoint, + chainId, + moneyMarketContracts, + batchSize, + minBlockHeightValidationOptions, + blockHeight, +}: { + queryPublicLogsContractAddress: string, + queryPublicLogsCodeHash?: string, + lcdEndpoint?: string, + chainId?: string, + moneyMarketContracts: ContractAndPagination[], + batchSize?: number, + minBlockHeightValidationOptions?: MinBlockHeightValidationOptions, + blockHeight?: number, +}) { + const queries: BatchQueryParams[] = moneyMarketContracts.map((contract) => ({ + id: contract.address, + contract: { + address: contract.address, + codeHash: contract.codeHash, + }, + queryMsg: { + get_public_logs: { + pagination: contract.pageSize && contract.page + ? { page_size: contract.pageSize, page: contract.page } : undefined, + }, + }, + })); + + return batchQuery$({ + contractAddress: queryPublicLogsContractAddress, + codeHash: queryPublicLogsCodeHash, + lcdEndpoint, + chainId, + queries, + batchSize, + minBlockHeightValidationOptions, + blockHeight, + }).pipe( + map((response) => response.map((item) => ({ + moneyMarketContractAddress: item.id as string, + publicLogs: parseMoneyMarketPublicLogs(item.response), + blockHeight: item.blockHeight, + }))), + first(), + ); +} + +async function batchQueryMoneyMarketPublicLogs({ + queryPublicLogsContractAddress, + queryPublicLogsCodeHash, + lcdEndpoint, + chainId, + moneyMarketContracts, + minBlockHeightValidationOptions, +}: { + queryPublicLogsContractAddress: string, + queryPublicLogsCodeHash?: string, + lcdEndpoint?: string, + chainId?: string, + moneyMarketContracts: ContractAndPagination[], + minBlockHeightValidationOptions?: MinBlockHeightValidationOptions, +}) { + return lastValueFrom(batchQueryMoneyMarketPublicLogs$({ + queryPublicLogsContractAddress, + queryPublicLogsCodeHash, + lcdEndpoint, + chainId, + moneyMarketContracts, + minBlockHeightValidationOptions, + })); +} + +const parseBatchQueryMoneyMarketRewardPools = ( + responses: BatchQueryParsedResponse, +): ParsedRewardPoolsResponse[] => ( + responses.map((response: BatchQueryParsedResponseItem) => ({ + debtMarket: response.id.toString(), + blockHeight: response.blockHeight, + rewardPools: response.response.map((pool: RewardPoolResponse) => ({ + rewardPoolId: pool.id, + amount: pool.amount, + token: pool.token, + start: pool.start, + end: pool.end, + rate: pool.rate, + })), + })) +); + +function batchQueryMoneyMarketRewardPools$({ + queryRouterContractAddress, + queryRouterCodeHash, + lcdEndpoint, + chainId, + moneyMarket, + debtMarkets, + batchSize, + minBlockHeightValidationOptions, + blockHeight, +}: { + queryRouterContractAddress: string, + queryRouterCodeHash?: string, + lcdEndpoint?: string, + chainId?: string, + moneyMarket: Contract, + debtMarkets: string[], + batchSize?: number, + minBlockHeightValidationOptions?: MinBlockHeightValidationOptions, + blockHeight?: number, +}) { + const queries = debtMarkets.map((debtMarket) => ({ + id: debtMarket, + contract: { + address: moneyMarket.address, + codeHash: moneyMarket.codeHash, + }, + queryMsg: { + reward_pools: { + market: debtMarket, + }, + }, + })); + + return batchQuery$({ + contractAddress: queryRouterContractAddress, + codeHash: queryRouterCodeHash, + lcdEndpoint, + chainId, + queries, + batchSize, + minBlockHeightValidationOptions, + blockHeight, + }).pipe( + map((response) => parseBatchQueryMoneyMarketRewardPools(response)), + first(), + ); +} + +async function batchQueryMoneyMarketRewardPools({ + queryRouterContractAddress, + queryRouterCodeHash, + lcdEndpoint, + chainId, + moneyMarket, + debtMarkets, + minBlockHeightValidationOptions, +}: { + queryRouterContractAddress: string, + queryRouterCodeHash?: string, + lcdEndpoint?: string, + chainId?: string, + moneyMarket: Contract, + debtMarkets: string[], + minBlockHeightValidationOptions?: MinBlockHeightValidationOptions, +}) { + return lastValueFrom(batchQueryMoneyMarketRewardPools$({ + queryRouterContractAddress, + queryRouterCodeHash, + lcdEndpoint, + chainId, + moneyMarket, + debtMarkets, + minBlockHeightValidationOptions, + })); +} + export { queryMoneyMarketConfig, queryMoneyMarketGetMarkets, @@ -582,4 +838,10 @@ export { batchQueryMoneyMarketConfig, batchQueryMoneyMarketGetMarkets, batchQueryMoneyMarketGetCollateral, + queryMoneyMarketPublicLogs$, + queryMoneyMarketPublicLogs, + batchQueryMoneyMarketPublicLogs$, + batchQueryMoneyMarketPublicLogs, + batchQueryMoneyMarketRewardPools$, + batchQueryMoneyMarketRewardPools, }; diff --git a/src/contracts/services/moneymarket.test.ts b/src/contracts/services/moneymarket.test.ts new file mode 100644 index 0000000..2888d98 --- /dev/null +++ b/src/contracts/services/moneymarket.test.ts @@ -0,0 +1,81 @@ +import { + test, + expect, + vi, + beforeAll, + afterAll, + afterEach, +} from 'vitest'; +import { of, firstValueFrom } from 'rxjs'; +import { queryMoneyMarketPublicLogs$ } from '~/contracts/services/moneyMarket'; +import queryMoneyMarketResponse from '~/test/mocks/moneymarket/publiclogs/queryMoneyMarketResponse.json'; + +// Mock the sendSecretClientContractQuery$ function +const sendSecretClientContractQuery$ = vi.hoisted(() => vi.fn()); + +beforeAll(() => { + vi.mock('~/client/index', () => ({ + getActiveQueryClient$: vi.fn(() => of({ client: 'MOCK_CLIENT' })), + })); + + vi.mock('~/client/services/clientServices', () => ({ + sendSecretClientContractQuery$, + })); +}); + +afterAll(() => { + vi.clearAllMocks(); +}); + +afterEach(() => { + vi.clearAllMocks(); +}); + +test('it should parse the public events response correctly', async () => { + // Mock the service call with the modified JSON response data + // Encode JSON data in Base64 for the mock response + const base64EncodedId = Buffer.from(JSON.stringify('mock_id')).toString('base64'); + const base64EncodedResponse = Buffer.from(JSON.stringify(queryMoneyMarketResponse.batch.responses[0].response)).toString('base64'); + sendSecretClientContractQuery$.mockReturnValueOnce( + of({ + batch: { + responses: [{ + id: base64EncodedId, + response: { + system_err: null, + response: base64EncodedResponse, // Ensure this is Base64 encoded as required + }, + }], + block_height: 100, // Mock block_height as required + }, + }), + ); + + // Define the input parameters + const contractAddress = 'secret18537ttv4l4k2ea0xp6ay3sv4c243fyjtj2uqz7'; + const lcdEndpoint = 'https://api.secret.com'; + const chainId = 'secret-4'; + const pagination = { page: 1, page_size: 10 }; + + // Call the function to test + const result$ = queryMoneyMarketPublicLogs$({ + contractAddress, + codeHash: 'MOCK_CODE_HASH', // Add the codeHash property + lcdEndpoint, + chainId, + pagination, + }); + + // Convert the result$ observable to a promise and get the final value + const result = await firstValueFrom(result$); + + // Validate the output against the expected parsed result + expect(result).toBeDefined(); + if (result && result.data) { + const parsedData = result.data.map((item: { timestamp: string | Date }) => ({ + ...item, + timestamp: new Date(item.timestamp), + })); + expect(parsedData).toBeDefined(); + } +}); diff --git a/src/test/mocks/moneymarket/publiclogs/queryMoneyMarketParsed.ts b/src/test/mocks/moneymarket/publiclogs/queryMoneyMarketParsed.ts new file mode 100644 index 0000000..6527bd9 --- /dev/null +++ b/src/test/mocks/moneymarket/publiclogs/queryMoneyMarketParsed.ts @@ -0,0 +1,99 @@ +import { PaginatedPublicLogs } from '~/types/contracts/moneyMarket'; + +const queryMoneyMarketPublicLogsParsedMock: PaginatedPublicLogs = { + page: 0, + pageSize: 3, + totalPages: 1, + totalItems: 3, + data: [ + { + timestamp: new Date(1731103428000), // Convert UNIX timestamp to Date + action: { + market_added: { + dao_interest_fee: '0.1', + decimals: 8, + flash_loan_interest: '1', + interest: { + base: '0.02', + optimal_utilisation: '0.7', + slope1: '0.1', + slope2: '0.2', + }, + interest_per_utoken: '0', + l_token: { + address: '', + code_hash: '4d7ab2164a33cfebbb6384b4221b7ca3de9936f2ce5b0de5cacd2fd1b932cc07', + }, + last_interest_accrued: 0, + lent_amount: '0', + lifetime_interest_owed: '0', + lifetime_interest_paid: '0', + loanable: '0', + market_token: { + address: 'secret1myggj2h49xhsm8pl8yq96cjaytzvudf39mexwk', + code_hash: '1691e4e24714e324a8d2345183027a918bba5c737bb2cbdbedda3cf8e7672faf', + }, + max_supply: '100000000000000000', + oracle_key: 'BTC', + status: { + borrow_enabled: true, + interest_accrual_enabled: true, + liquidation_enabled: true, + repay_enabled: true, + supply_enabled: true, + }, + }, + }, + }, + { + timestamp: new Date(1731103034000), // Convert UNIX timestamp to Date + action: { + collateral_added: { + liquidation_discount: '0.1', + max_initial_ltv: '0.9', + oracle_key: 'SILK', + private_liquidation_threshold: '0.05', + public_liquidation_threshold: '0.07', + token: { + address: 'secret15e5k97pfrwpkqwfxxeel0p6yn5dxztcfk9twvs', + code_hash: '1691e4e24714e324a8d2345183027a918bba5c737bb2cbdbedda3cf8e7672faf', + }, + }, + }, + }, + { + timestamp: new Date(1730241028000), // Convert UNIX timestamp to Date + action: { + contract_init: { + admin_auth: { + address: 'secret1wqymuexhhnsk5je5g2m08y848mfq9a0fvchwle', + code_hash: '1f86c1b8c5b923f5ace279632e6d9fc2c9c7fdd35abad5171825698c125134f3', + }, + fee_collector: 'secret1t6w88lh492zel8z9mdkeghnfh9qnfjnkel6xrs', + l_token_blockchain_admin: 'secret1t6w88lh492zel8z9mdkeghnfh9qnfjnkel6xrs', + l_token_code_hash: '4d7ab2164a33cfebbb6384b4221b7ca3de9936f2ce5b0de5cacd2fd1b932cc07', + l_token_id: 10113, + max_constant_product_price_impact: '0.1', + max_stableswap_tvl_percent: '0.1', + oracle: { + address: 'secret1nxdxgftuay7ny34epkfnn3kvvk3lcyrevuqzpe', + code_hash: '113c47c016667817b315dde03b4ee9774edf1fb293a7ea3f02d983c6b1fa1cf1', + }, + private_liquidation_interval: 10, + private_liquidation_protocol_share: '0.1', + public_liquidation_protocol_fee: '0.1', + query_auth: { + address: 'secret1e0k5jza9jqctc5dt7mltnxmwpu3a3kqe0a6hf3', + code_hash: 'b6ec3cc640d26b6658d52e0cfb5f79abc3afd1643ec5112cfc6a9fb51d848e69', + }, + swap_router: { + address: 'secret137sjm7hgqdp4d0dldqnrxe2ktw02meaygnjd0e', + code_hash: '93dac48bf508eeb4c619fcb8b1cb260f9957e31450740a2b7325440ddf92daa8', + }, + }, + }, + }, + ], +}; + +export { queryMoneyMarketPublicLogsParsedMock }; diff --git a/src/test/mocks/moneymarket/publiclogs/queryMoneyMarketResponse.json b/src/test/mocks/moneymarket/publiclogs/queryMoneyMarketResponse.json new file mode 100644 index 0000000..f85dd24 --- /dev/null +++ b/src/test/mocks/moneymarket/publiclogs/queryMoneyMarketResponse.json @@ -0,0 +1,108 @@ + +{ + "batch": { + "responses": [ + { + "id": "mock_id", + "response": { + + "data": [ + { + "action": { + "market_added": { + "dao_interest_fee": "0.1", + "decimals": 8, + "flash_loan_interest": "1", + "interest": { + "base": "0.02", + "optimal_utilisation": "0.7", + "slope1": "0.1", + "slope2": "0.2" + }, + "interest_per_utoken": "0", + "l_token": { + "address": "", + "code_hash": "4d7ab2164a33cfebbb6384b4221b7ca3de9936f2ce5b0de5cacd2fd1b932cc07" + }, + "last_interest_accrued": 0, + "lent_amount": "0", + "lifetime_interest_owed": "0", + "lifetime_interest_paid": "0", + "loanable": "0", + "market_token": { + "address": "secret1myggj2h49xhsm8pl8yq96cjaytzvudf39mexwk", + "code_hash": "1691e4e24714e324a8d2345183027a918bba5c737bb2cbdbedda3cf8e7672faf" + }, + "max_supply": "100000000000000000", + "oracle_key": "BTC", + "status": { + "borrow_enabled": true, + "interest_accrual_enabled": true, + "liquidation_enabled": true, + "repay_enabled": true, + "supply_enabled": true + } + } + }, + "timestamp": 1731103428 + }, + { + "action": { + "collateral_added": { + "liquidation_discount": "0.1", + "max_initial_ltv": "0.9", + "oracle_key": "SILK", + "private_liquidation_threshold": "0.05", + "public_liquidation_threshold": "0.07", + "token": { + "address": "secret15e5k97pfrwpkqwfxxeel0p6yn5dxztcfk9twvs", + "code_hash": "1691e4e24714e324a8d2345183027a918bba5c737bb2cbdbedda3cf8e7672faf" + } + } + }, + "timestamp": 1731103034 + }, + { + "action": { + "contract_init": { + "admin_auth": { + "address": "secret1wqymuexhhnsk5je5g2m08y848mfq9a0fvchwle", + "code_hash": "1f86c1b8c5b923f5ace279632e6d9fc2c9c7fdd35abad5171825698c125134f3" + }, + "fee_collector": "secret1t6w88lh492zel8z9mdkeghnfh9qnfjnkel6xrs", + "l_token_blockchain_admin": "secret1t6w88lh492zel8z9mdkeghnfh9qnfjnkel6xrs", + "l_token_code_hash": "4d7ab2164a33cfebbb6384b4221b7ca3de9936f2ce5b0de5cacd2fd1b932cc07", + "l_token_id": 10113, + "max_constant_product_price_impact": "0.1", + "max_stableswap_tvl_percent": "0.1", + "oracle": { + "address": "secret1nxdxgftuay7ny34epkfnn3kvvk3lcyrevuqzpe", + "code_hash": "113c47c016667817b315dde03b4ee9774edf1fb293a7ea3f02d983c6b1fa1cf1" + }, + "private_liquidation_interval": 10, + "private_liquidation_protocol_share": "0.1", + "public_liquidation_protocol_fee": "0.1", + "query_auth": { + "address": "secret1e0k5jza9jqctc5dt7mltnxmwpu3a3kqe0a6hf3", + "code_hash": "b6ec3cc640d26b6658d52e0cfb5f79abc3afd1643ec5112cfc6a9fb51d848e69" + }, + "swap_router": { + "address": "secret137sjm7hgqdp4d0dldqnrxe2ktw02meaygnjd0e", + "code_hash": "93dac48bf508eeb4c619fcb8b1cb260f9957e31450740a2b7325440ddf92daa8" + } + } + }, + "timestamp": 1730241028 + } + ], + "page": 0, + "page_size": 3, + "total_items": 3, + "total_pages": 1 + + } + } + ], + "block_height": 100 + } +} \ No newline at end of file diff --git a/src/types/contracts/moneyMarket/model.ts b/src/types/contracts/moneyMarket/model.ts index 1d3f569..8e4c068 100644 --- a/src/types/contracts/moneyMarket/model.ts +++ b/src/types/contracts/moneyMarket/model.ts @@ -102,7 +102,8 @@ type ParsedCollateralReponse = { collateralAmount: string, decimals: number, maxInitialLtv: string, - liquidationThreshold: string, + publicLiquidationThreshold: string, + privateLiquidationThreshold: string, liquidationDiscount: string, oracleKey: string, depositEnabled: boolean, @@ -150,6 +151,44 @@ type ParsedUserPositionResponse = { loanLiquidationPoint: string, } +// New types for public events +type PublicLog = { + timestamp: Date, + action: Record +} + +type PaginatedPublicLogs = { + page: number, + pageSize: number, + totalPages: number, + totalItems: number, + data: PublicLog[], +} + +type RewardPool = { + rewardPoolId: string, + amount: string, + token: string, + start: string, + end: string, + rate: string, +} + +type RewardPoolResponse = { + id: string, + amount: string, + token: string, + start: string, + end: string, + rate: string, +} + +type ParsedRewardPoolsResponse = { + debtMarket: string, + blockHeight: number, + rewardPools: RewardPool[], +} + export type { Pagination, ContractAndPagination, @@ -163,4 +202,9 @@ export type { ParsedUserPositionResponse, BatchMoneyMarketGetMarkets, BatchMoneyMarketGetCollaterals, + PublicLog, + PaginatedPublicLogs, + RewardPool, + RewardPoolResponse, + ParsedRewardPoolsResponse, }; diff --git a/src/types/contracts/moneyMarket/response.ts b/src/types/contracts/moneyMarket/response.ts index 107fd0b..03cd742 100644 --- a/src/types/contracts/moneyMarket/response.ts +++ b/src/types/contracts/moneyMarket/response.ts @@ -78,7 +78,8 @@ type CollateralReponse = { amount: string, decimals: number, max_initial_ltv: string, - liquidation_threshold: string, + public_liquidation_threshold: string, + private_liquidation_threshold: string, liquidation_discount: string, oracle_key: string, status: { @@ -122,9 +123,20 @@ type UserPositionResponse = { } } +// Flexible type for actions, leaving it as a JSON object (blob) +type PublicLogResponse = { + timestamp: number, + action: Record, // Flexible JSON blob for action +} + +// Paginated response type for public events +type GetPublicLogsResponse = PaginatedResponse; + export type { ConfigResponse, GetMarketsResponse, GetCollateralResponse, UserPositionResponse, + PublicLogResponse, + GetPublicLogsResponse, }; diff --git a/yarn.lock b/yarn.lock index 2af5ab2..715af3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -533,22 +533,78 @@ dependencies: chalk "^4.1.0" -"@cosmjs/encoding@0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.27.1.tgz#3cd5bc0af743485eb2578cdb08cfa84c86d610e1" - integrity sha512-rayLsA0ojHeniaRfWWcqSsrE/T1rl1gl0OXVNtXlPwLJifKBeLEefGbOUiAQaT0wgJ8VNGBazVtAZBpJidfDhw== +"@cosmjs/amino@^0.32.4": + version "0.32.4" + resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.32.4.tgz#3908946c0394e6d431694c8992c5147079a1c860" + integrity sha512-zKYOt6hPy8obIFtLie/xtygCkH9ZROiQ12UHfKsOkWaZfPQUvVbtgmu6R4Kn1tFLI/SRkw7eqhaogmW/3NYu/Q== + dependencies: + "@cosmjs/crypto" "^0.32.4" + "@cosmjs/encoding" "^0.32.4" + "@cosmjs/math" "^0.32.4" + "@cosmjs/utils" "^0.32.4" + +"@cosmjs/crypto@^0.32.4": + version "0.32.4" + resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.32.4.tgz#5d29633b661eaf092ddb3e7ea6299cfd6f4507a2" + integrity sha512-zicjGU051LF1V9v7bp8p7ovq+VyC91xlaHdsFOTo2oVry3KQikp8L/81RkXmUIT8FxMwdx1T7DmFwVQikcSDIw== + dependencies: + "@cosmjs/encoding" "^0.32.4" + "@cosmjs/math" "^0.32.4" + "@cosmjs/utils" "^0.32.4" + "@noble/hashes" "^1" + bn.js "^5.2.0" + elliptic "^6.5.4" + libsodium-wrappers-sumo "^0.7.11" + +"@cosmjs/encoding@0.32.3": + version "0.32.3" + resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.32.3.tgz#e245ff511fe4a0df7ba427b5187aab69e3468e5b" + integrity sha512-p4KF7hhv8jBQX3MkB3Defuhz/W0l3PwWVYU2vkVuBJ13bJcXyhU9nJjiMkaIv+XP+W2QgRceqNNgFUC5chNR7w== + dependencies: + base64-js "^1.3.0" + bech32 "^1.1.4" + readonly-date "^1.0.0" + +"@cosmjs/encoding@^0.32.4": + version "0.32.4" + resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.32.4.tgz#646e0e809f7f4f1414d8fa991fb0ffe6c633aede" + integrity sha512-tjvaEy6ZGxJchiizzTn7HVRiyTg1i4CObRRaTRPknm5EalE13SV+TCHq38gIDfyUeden4fCuaBVEdBR5+ti7Hw== dependencies: base64-js "^1.3.0" bech32 "^1.1.4" readonly-date "^1.0.0" -"@cosmjs/math@0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.27.1.tgz#be78857b008ffc6b1ed6fecaa1c4cd5bc38c07d7" - integrity sha512-cHWVjmfIjtRc7f80n7x+J5k8pe+vTVTQ0lA82tIxUgqUvgS6rogPP/TmGtTiZ4+NxWxd11DUISY6gVpr18/VNQ== +"@cosmjs/math@0.32.3": + version "0.32.3" + resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.32.3.tgz#16e4256f4da507b9352327da12ae64056a2ba6c9" + integrity sha512-amumUtZs8hCCnV+lSBaJIiZkGabQm22QGg/IotYrhcmoOEOjt82n7hMNlNXRs7V6WLMidGrGYcswB5zcmp0Meg== + dependencies: + bn.js "^5.2.0" + +"@cosmjs/math@^0.32.4": + version "0.32.4" + resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.32.4.tgz#87ac9eadc06696e30a30bdb562a495974bfd0a1a" + integrity sha512-++dqq2TJkoB8zsPVYCvrt88oJWsy1vMOuSOKcdlnXuOA/ASheTJuYy4+oZlTQ3Fr8eALDLGGPhJI02W2HyAQaw== dependencies: bn.js "^5.2.0" +"@cosmjs/proto-signing@^0.32.3": + version "0.32.4" + resolved "https://registry.yarnpkg.com/@cosmjs/proto-signing/-/proto-signing-0.32.4.tgz#5a06e087c6d677439c8c9b25b5223d5e72c4cd93" + integrity sha512-QdyQDbezvdRI4xxSlyM1rSVBO2st5sqtbEIl3IX03uJ7YiZIQHyv6vaHVf1V4mapusCqguiHJzm4N4gsFdLBbQ== + dependencies: + "@cosmjs/amino" "^0.32.4" + "@cosmjs/crypto" "^0.32.4" + "@cosmjs/encoding" "^0.32.4" + "@cosmjs/math" "^0.32.4" + "@cosmjs/utils" "^0.32.4" + cosmjs-types "^0.9.0" + +"@cosmjs/utils@^0.32.4": + version "0.32.4" + resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.32.4.tgz#a9a717c9fd7b1984d9cefdd0ef6c6f254060c671" + integrity sha512-D1Yc+Zy8oL/hkUkFUL/bwxvuDBzRGpc4cF7/SkdhxX4iHpSLgdOuTt1mhCh9+kl6NQREy9t7SYZ6xeW5gFe60w== + "@cspotcode/source-map-support@^0.8.0": version "0.8.1" resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" @@ -834,6 +890,11 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.0.0.tgz#d5e38bfbdaba174805a4e649f13be9a9ed3351ae" integrity sha512-DZVbtY62kc3kkBtMHqwCOfXrT/hnoORy5BJ4+HU1IR59X0KWAOqsfzQPcUl/lQLlG7qXbe/fZ3r/emxtAl+sqg== +"@noble/hashes@^1": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0" + integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== + "@noble/secp256k1@1.7.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.0.tgz#d15357f7c227e751d90aa06b05a0e5cf993ba8c1" @@ -1412,6 +1473,11 @@ dependencies: vue-demi ">=0.14.6" +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -1643,11 +1709,6 @@ base64-js@^1.3.0, base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -bech32@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" - integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== - bech32@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" @@ -1800,6 +1861,17 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -1861,7 +1933,7 @@ check-error@^1.0.3: dependencies: get-func-name "^2.0.2" -ci-info@^3.1.0, ci-info@^3.2.0: +ci-info@^3.1.0, ci-info@^3.2.0, ci-info@^3.7.0: version "3.9.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== @@ -2030,6 +2102,11 @@ cosmiconfig@^8.0.0: parse-json "^5.2.0" path-type "^4.0.0" +cosmjs-types@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/cosmjs-types/-/cosmjs-types-0.9.0.tgz#c3bc482d28c7dfa25d1445093fdb2d9da1f6cfcc" + integrity sha512-MN/yUe6mkJwHnCFfsNPeCfXVhyxHYW6c/xDUzrSbBycYzw++XvWDMJArXp2pLdgD6FQ8DW79vkPjeNKVrXaHeQ== + create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -2202,6 +2279,15 @@ define-data-property@^1.0.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" @@ -2272,6 +2358,19 @@ elliptic@^6.4.0: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" +elliptic@^6.5.4: + version "6.6.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.0.tgz#5919ec723286c1edf28685aa89261d4761afa210" + integrity sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -2345,6 +2444,18 @@ es-abstract@^1.22.1: unbox-primitive "^1.0.2" which-typed-array "^1.1.11" +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-set-tostringtag@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" @@ -2706,6 +2817,13 @@ find-yarn-workspace-root2@1.2.16: micromatch "^4.0.2" pkg-dir "^4.2.0" +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + findup-sync@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-4.0.0.tgz#956c9cdde804052b881b428512905c4a5f2cdef0" @@ -2744,7 +2862,7 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" -fs-extra@9.1.0: +fs-extra@9.1.0, fs-extra@^9.0.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -2796,6 +2914,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + function.prototype.name@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" @@ -2831,6 +2954,17 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-proto "^1.0.1" has-symbols "^1.0.3" +get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" @@ -2953,7 +3087,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -2995,6 +3129,13 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" @@ -3034,6 +3175,13 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasown@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -3220,6 +3368,11 @@ is-date-object@^1.0.1: dependencies: has-tostringtag "^1.0.0" +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -3351,6 +3504,13 @@ is-windows@^1.0.0, is-windows@^1.0.1: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== +is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -3411,6 +3571,16 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +json-stable-stringify@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz#52d4361b47d49168bcc4e564189a42e5a7439454" + integrity sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg== + dependencies: + call-bind "^1.0.5" + isarray "^2.0.5" + jsonify "^0.0.1" + object-keys "^1.1.1" + json5@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" @@ -3439,6 +3609,11 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jsonify@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" + integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== + jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -3456,6 +3631,13 @@ kind-of@^6.0.3: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + kleur@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" @@ -3528,6 +3710,18 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +libsodium-sumo@^0.7.15: + version "0.7.15" + resolved "https://registry.yarnpkg.com/libsodium-sumo/-/libsodium-sumo-0.7.15.tgz#91c1d863fe3fbce6d6b9db1aadaa622733a1d007" + integrity sha512-5tPmqPmq8T8Nikpm1Nqj0hBHvsLFCXvdhBFV7SGOitQPZAA6jso8XoL0r4L7vmfKXr486fiQInvErHtEvizFMw== + +libsodium-wrappers-sumo@^0.7.11: + version "0.7.15" + resolved "https://registry.yarnpkg.com/libsodium-wrappers-sumo/-/libsodium-wrappers-sumo-0.7.15.tgz#0ef2a99b4b17e8385aa7e6850593660dbaf5fb40" + integrity sha512-aSWY8wKDZh5TC7rMvEdTHoyppVq/1dTSAeAR7H6pzd6QRT3vQWcT5pGwCotLcpPEOLXX6VvqihSPkpEhYAjANA== + dependencies: + libsodium-sumo "^0.7.15" + lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -3990,6 +4184,14 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + optionator@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -4106,6 +4308,27 @@ parse-passwd@^1.0.0: resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== +patch-package@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-8.0.0.tgz#d191e2f1b6e06a4624a0116bcb88edd6714ede61" + integrity sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^4.1.2" + ci-info "^3.7.0" + cross-spawn "^7.0.3" + find-yarn-workspace-root "^2.0.0" + fs-extra "^9.0.0" + json-stable-stringify "^1.0.2" + klaw-sync "^6.0.0" + minimist "^1.2.6" + open "^7.4.2" + rimraf "^2.6.3" + semver "^7.5.3" + slash "^2.0.0" + tmp "^0.0.33" + yaml "^2.2.2" + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -4425,6 +4648,13 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -4495,16 +4725,17 @@ safe-regex-test@^1.0.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -secretjs@^1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/secretjs/-/secretjs-1.12.1.tgz#fa46977c9b824f438f1c7ee15fbac02ce57be679" - integrity sha512-EmvgVJIgxZDj73En2WI5lNopy5eIv88gA8lhWfWW2MGED5pchvN5NEhCfIijTVB8JlK51iZkMZnGdD2q2b9hrA== +secretjs@1.15.0-beta.0: + version "1.15.0-beta.0" + resolved "https://registry.yarnpkg.com/secretjs/-/secretjs-1.15.0-beta.0.tgz#ee1953dbdf3d4379ee15259012c9529d05708fa0" + integrity sha512-zxFVWixArto6qd2+h9f4HEGTtlD2ZB0dggDsFdkHyXNA7728vVX0QWFfKcnxR04mqOtr7CnASxxTTSK42EFoKQ== dependencies: - "@cosmjs/encoding" "0.27.1" - "@cosmjs/math" "0.27.1" + "@cosmjs/amino" "^0.32.4" + "@cosmjs/encoding" "0.32.3" + "@cosmjs/math" "0.32.3" + "@cosmjs/proto-signing" "^0.32.3" "@noble/hashes" "1.0.0" "@noble/secp256k1" "1.7.0" - bech32 "2.0.0" big-integer "1.6.51" bignumber.js "9.0.2" bip32 "2.0.6" @@ -4514,6 +4745,7 @@ secretjs@^1.12.1: google-protobuf "^3.14.0" miscreant "0.3.2" pako "2.0.4" + patch-package "^8.0.0" protobufjs "7.2.5" secure-random "1.1.2" @@ -4544,6 +4776,18 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + set-function-name@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" @@ -4614,6 +4858,11 @@ signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -5377,6 +5626,11 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yaml@^2.2.2: + version "2.6.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.6.0.tgz#14059ad9d0b1680d0f04d3a60fe00f3a857303c3" + integrity sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ== + yargs-parser@^18.1.2, yargs-parser@^18.1.3: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"