rain-sdk-v2 1.2.1 → 2.0.0

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
@@ -26,7 +26,7 @@ export declare class Rain {
26
26
  buildAddLiquidityTx(params: AddLiquidityTxParams & {
27
27
  walletAddress: `0x${string}`;
28
28
  }): Promise<RawTransaction[]>;
29
- buildRemoveLiquidityTx(params: RemoveLiquidityTxParams): RawTransaction;
29
+ buildRemoveLiquidityTx(params: RemoveLiquidityTxParams): Promise<RawTransaction>;
30
30
  getUserOptionLPShares(params: {
31
31
  marketContractAddress: `0x${string}`;
32
32
  option: bigint;
@@ -44,6 +44,11 @@ export declare class Rain {
44
44
  optionSide: number;
45
45
  userAddress: `0x${string}`;
46
46
  }): Promise<bigint>;
47
+ getOptionClaimed(params: {
48
+ marketContractAddress: `0x${string}`;
49
+ option: bigint;
50
+ userAddress: `0x${string}`;
51
+ }): Promise<boolean>;
47
52
  getDynamicPayout(params: {
48
53
  marketContractAddress: `0x${string}`;
49
54
  userAddress: `0x${string}`;
package/dist/Rain.js CHANGED
@@ -18,6 +18,7 @@ import { getUserOptionLPShares } from './markets/getUserOptionLPShares.js';
18
18
  import { getUserOptionShares } from './markets/getUserOptionShares.js';
19
19
  import { getDynamicPayout } from './markets/getDynamicPayout.js';
20
20
  import { getUserSharesInEscrow } from './markets/getUserSharesInEscrow.js';
21
+ import { getOptionClaimed } from './markets/getOptionClaimed.js';
21
22
  import { createPublicClient, http, parseAbi } from 'viem';
22
23
  import { arbitrum } from 'viem/chains';
23
24
  import * as usersApi from './api/users.js';
@@ -106,8 +107,8 @@ export class Rain {
106
107
  async buildAddLiquidityTx(params) {
107
108
  return buildAddLiquidityRawTx({ ...params, rpcUrl: this.rpcUrl });
108
109
  }
109
- buildRemoveLiquidityTx(params) {
110
- return buildRemoveLiquidityRawTx(params);
110
+ async buildRemoveLiquidityTx(params) {
111
+ return buildRemoveLiquidityRawTx({ ...params, rpcUrl: this.rpcUrl });
111
112
  }
112
113
  async getUserOptionLPShares(params) {
113
114
  return getUserOptionLPShares({ ...params, rpcUrl: this.rpcUrl });
@@ -118,6 +119,9 @@ export class Rain {
118
119
  async getUserSharesInEscrow(params) {
119
120
  return getUserSharesInEscrow({ ...params, rpcUrl: this.rpcUrl });
120
121
  }
122
+ async getOptionClaimed(params) {
123
+ return getOptionClaimed({ ...params, rpcUrl: this.rpcUrl });
124
+ }
121
125
  async getDynamicPayout(params) {
122
126
  return getDynamicPayout({ ...params, rpcUrl: this.rpcUrl });
123
127
  }