@7kprotocol/sdk-ts 1.1.1 → 1.2.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/README.md CHANGED
@@ -43,6 +43,10 @@ const tx = await buildTx({
43
43
  quoteResponse,
44
44
  accountAddress: "0xSenderAddress",
45
45
  slippage: 0.01, // 1%
46
+ commission: {
47
+ partner: "<address to receive partner fee if any>",
48
+ commissionBps: 0, // 0 means no fee, 1bps = 0.01%, for example, 20bps = 0.2%
49
+ },
46
50
  });
47
51
  ```
48
52
 
@@ -59,6 +63,10 @@ await buildTx({
59
63
  quoteResponse,
60
64
  accountAddress: "0xSenderAddress",
61
65
  slippage: 0.01, // 1%
66
+ commission: {
67
+ partner: "<address to receive partner fee if any>",
68
+ commissionBps: 0, // 0 means no fee, 1bps = 0.01%, for example, 20bps = 0.2%
69
+ },
62
70
  });
63
71
  ```
64
72
 
@@ -83,6 +91,10 @@ const tx = await buildTx({
83
91
  quoteResponse,
84
92
  accountAddress: "0xSenderAddress",
85
93
  slippage: 0.01, // 1%
94
+ commission: {
95
+ partner: "<address to receive partner fee if any>",
96
+ commissionBps: 0, // 0 means no fee, 1bps = 0.01%, for example, 20bps = 0.2%
97
+ },
86
98
  });
87
99
 
88
100
  console.log(tx);
@@ -97,6 +109,10 @@ const feeInUsd = await estimateGasFee({
97
109
  quoteResponse,
98
110
  accountAddress: "0xSenderAddress",
99
111
  slippage: 0.01, // 1%
112
+ commission: {
113
+ partner: "<address to receive partner fee if any>",
114
+ commissionBps: 0, // 0 means no fee, 1bps = 0.01%, for example, 20bps = 0.2%
115
+ },
100
116
  });
101
117
  ```
102
118
 
@@ -113,6 +129,10 @@ const feeInUsd = await estimateGasFee({
113
129
  accountAddress: "0xSenderAddress",
114
130
  slippage: 0.01, // 1%
115
131
  suiPrice,
132
+ commission: {
133
+ partner: "<address to receive partner fee if any>",
134
+ commissionBps: 0, // 0 means no fee, 1bps = 0.01%, for example, 20bps = 0.2%
135
+ },
116
136
  });
117
137
  ```
118
138
 
@@ -6,7 +6,7 @@ export interface BuildTxParams {
6
6
  quoteResponse: QuoteResponse;
7
7
  accountAddress: string;
8
8
  slippage: BigNumber.Value;
9
- commission?: Commission;
9
+ commission: Commission;
10
10
  }
11
11
  export interface EstimateGasFeeParams extends BuildTxParams {
12
12
  suiPrice?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../../src/types/tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,gBAAgB,CAAC;IACtB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../../src/types/tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,gBAAgB,CAAC;IACtB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -6,7 +6,7 @@ export interface BuildTxParams {
6
6
  quoteResponse: QuoteResponse;
7
7
  accountAddress: string;
8
8
  slippage: BigNumber.Value;
9
- commission?: Commission;
9
+ commission: Commission;
10
10
  }
11
11
  export interface EstimateGasFeeParams extends BuildTxParams {
12
12
  suiPrice?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../../src/types/tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,gBAAgB,CAAC;IACtB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../../src/types/tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,gBAAgB,CAAC;IACtB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7kprotocol/sdk-ts",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {