@rainprotocolsdk/sdk 1.0.2 → 1.0.3

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/Rain.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { GetMarketsParams, Market } from './markets/types';
2
- import { ApproveTxParams, EnterOptionTxParams, RawTransaction } from './tx/types';
1
+ import { GetMarketsParams, Market } from './markets/types.js';
2
+ import { ApproveTxParams, EnterOptionTxParams, RawTransaction } from './tx/types.js';
3
3
  export declare class Rain {
4
4
  getPublicMarkets(params: GetMarketsParams): Promise<Market[]>;
5
5
  buildApprovalTx(params: ApproveTxParams): RawTransaction | Error;
package/dist/Rain.js CHANGED
@@ -1,6 +1,6 @@
1
- import { getMarkets } from './markets/getMarkets';
2
- import { buildEnterOptionRawTx } from './tx/buildRawTransactions';
3
- import { buildApproveRawTx } from './tx/buildApprovalRawTx';
1
+ import { getMarkets } from './markets/getMarkets.js';
2
+ import { buildEnterOptionRawTx } from './tx/buildRawTransactions.js';
3
+ import { buildApproveRawTx } from './tx/buildApprovalRawTx.js';
4
4
  export class Rain {
5
5
  async getPublicMarkets(params) {
6
6
  return getMarkets(params);
package/dist/RainAA.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RainConfig } from './types';
1
+ import { RainConfig } from './types.js';
2
2
  export declare class RainAA {
3
3
  private config;
4
4
  private _client;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { Rain } from './Rain';
2
- export { RainAA } from './RainAA';
3
- export * from './types';
1
+ export { Rain } from './Rain.js';
2
+ export { RainAA } from './RainAA.js';
3
+ export * from './types.js';
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Rain } from './Rain';
2
- export { RainAA } from './RainAA';
3
- export * from './types';
1
+ export { Rain } from './Rain.js';
2
+ export { RainAA } from './RainAA.js';
3
+ export * from './types.js';
@@ -1,2 +1,2 @@
1
- import { GetMarketsParams, Market } from './types';
1
+ import { GetMarketsParams, Market } from './types.js';
2
2
  export declare function getMarkets(params: GetMarketsParams): Promise<Market[]>;
@@ -1,5 +1,5 @@
1
- import { API_BASE_URL } from '../config/api';
2
- import { MARKET_SORT_BY, MARKET_STATUS } from './constants';
1
+ import { API_BASE_URL } from '../config/api.js';
2
+ import { MARKET_SORT_BY, MARKET_STATUS } from './constants.js';
3
3
  export async function getMarkets(params) {
4
4
  const query = new URLSearchParams();
5
5
  if (params?.limit)
@@ -1,2 +1,2 @@
1
- import { ApproveTxParams, RawTransaction } from "./types";
1
+ import { ApproveTxParams, RawTransaction } from "./types.js";
2
2
  export declare function buildApproveRawTx(params: ApproveTxParams): RawTransaction | Error;
@@ -1,5 +1,5 @@
1
1
  import { encodeFunctionData } from "viem";
2
- import { ERC20Abi } from "../abi/ERC20Abi";
2
+ import { ERC20Abi } from "../abi/ERC20Abi.js";
3
3
  import { ethers } from "ethers";
4
4
  const DEFAULT_APPROVE_AMOUNT = ethers.MaxUint256;
5
5
  export function buildApproveRawTx(params) {
@@ -1,2 +1,2 @@
1
- import { EnterOptionTxParams, RawTransaction } from './types';
1
+ import { EnterOptionTxParams, RawTransaction } from './types.js';
2
2
  export declare function buildEnterOptionRawTx(params: EnterOptionTxParams): RawTransaction;
@@ -1,5 +1,5 @@
1
1
  import { encodeFunctionData } from 'viem';
2
- import { TradePoolAbi } from '../abi/TradeMarketsAbi';
2
+ import { TradePoolAbi } from '../abi/TradeMarketsAbi.js';
3
3
  export function buildEnterOptionRawTx(params) {
4
4
  const { marketContractAddress, selectedOption, buyAmountInWei } = params;
5
5
  if (!marketContractAddress)
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@rainprotocolsdk/sdk",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
+ "type": "module",
4
5
  "description": "Rain SDK",
5
6
  "main": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
@@ -35,4 +36,4 @@
35
36
  "devDependencies": {
36
37
  "typescript": "^5.9.3"
37
38
  }
38
- }
39
+ }