@pafi-dev/core 0.7.10 → 0.8.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/abi/index.cjs +5 -3
- package/dist/abi/index.cjs.map +1 -1
- package/dist/abi/index.d.cts +451 -2
- package/dist/abi/index.d.ts +451 -2
- package/dist/abi/index.js +4 -2
- package/dist/chunk-644KZUKR.cjs +519 -0
- package/dist/chunk-644KZUKR.cjs.map +1 -0
- package/dist/{chunk-6CXTFOIH.js → chunk-ABNM6LMP.js} +266 -1
- package/dist/chunk-ABNM6LMP.js.map +1 -0
- package/dist/{chunk-4QRHSZZQ.cjs → chunk-ACQHZWHP.cjs} +3 -3
- package/dist/{chunk-4QRHSZZQ.cjs.map → chunk-ACQHZWHP.cjs.map} +1 -1
- package/dist/{chunk-QL5COJQI.js → chunk-BB5YW57R.js} +2 -2
- package/dist/chunk-CUVUSVWR.js +519 -0
- package/dist/chunk-CUVUSVWR.js.map +1 -0
- package/dist/{chunk-Q6WCDZXI.cjs → chunk-RFANYF24.cjs} +267 -2
- package/dist/chunk-RFANYF24.cjs.map +1 -0
- package/dist/{chunk-AEYEFV5G.js → chunk-Y4CFC4OC.js} +2 -2
- package/dist/{chunk-REUEMYWB.cjs → chunk-YCY7MBSJ.cjs} +9 -9
- package/dist/{chunk-REUEMYWB.cjs.map → chunk-YCY7MBSJ.cjs.map} +1 -1
- package/dist/contract/index.cjs +3 -3
- package/dist/contract/index.d.cts +1 -1
- package/dist/contract/index.d.ts +1 -1
- package/dist/contract/index.js +2 -2
- package/dist/eip712/index.cjs +3 -3
- package/dist/eip712/index.d.cts +1 -1
- package/dist/eip712/index.d.ts +1 -1
- package/dist/eip712/index.js +2 -2
- package/dist/index.cjs +88 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -5
- package/dist/index.d.ts +39 -5
- package/dist/index.js +50 -6
- package/dist/index.js.map +1 -1
- package/dist/{types-CCvAk-ma.d.ts → types-BS4kpO4Z.d.cts} +8 -11
- package/dist/{types-CCvAk-ma.d.cts → types-BS4kpO4Z.d.ts} +8 -11
- package/package.json +1 -1
- package/dist/chunk-6CXTFOIH.js.map +0 -1
- package/dist/chunk-6WWSKC3Z.cjs +0 -1097
- package/dist/chunk-6WWSKC3Z.cjs.map +0 -1
- package/dist/chunk-Q6WCDZXI.cjs.map +0 -1
- package/dist/chunk-SZMSKZHY.js +0 -1097
- package/dist/chunk-SZMSKZHY.js.map +0 -1
- /package/dist/{chunk-QL5COJQI.js.map → chunk-BB5YW57R.js.map} +0 -0
- /package/dist/{chunk-AEYEFV5G.js.map → chunk-Y4CFC4OC.js.map} +0 -0
package/dist/eip712/index.js
CHANGED
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
verifyBurnRequest,
|
|
12
12
|
verifyMintRequest,
|
|
13
13
|
verifyReceiverConsent
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-BB5YW57R.js";
|
|
15
|
+
import "../chunk-CUVUSVWR.js";
|
|
16
16
|
import "../chunk-DGUM43GV.js";
|
|
17
17
|
export {
|
|
18
18
|
Eip712DomainMismatchError,
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
var _chunkRFANYF24cjs = require('./chunk-RFANYF24.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
@@ -34,7 +35,7 @@ var _chunk75JWR5SAcjs = require('./chunk-75JWR5SA.cjs');
|
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
|
|
37
|
-
var
|
|
38
|
+
var _chunkYCY7MBSJcjs = require('./chunk-YCY7MBSJ.cjs');
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
|
|
@@ -64,16 +65,32 @@ var _chunkJEWSN7Q3cjs = require('./chunk-JEWSN7Q3.cjs');
|
|
|
64
65
|
|
|
65
66
|
|
|
66
67
|
|
|
67
|
-
var
|
|
68
|
+
var _chunkACQHZWHPcjs = require('./chunk-ACQHZWHP.cjs');
|
|
68
69
|
|
|
69
70
|
|
|
70
|
-
var
|
|
71
|
+
var _chunk644KZUKRcjs = require('./chunk-644KZUKR.cjs');
|
|
71
72
|
require('./chunk-JEQ2X3Z6.cjs');
|
|
72
73
|
|
|
73
74
|
// src/index.ts
|
|
74
75
|
var _viem = require('viem');
|
|
75
76
|
|
|
76
77
|
// src/errors.ts
|
|
78
|
+
var SDK_ERROR_HTTP_STATUS_CODE = {
|
|
79
|
+
not_found: 404,
|
|
80
|
+
forbidden: 403,
|
|
81
|
+
unprocessable: 422,
|
|
82
|
+
service_unavailable: 503
|
|
83
|
+
};
|
|
84
|
+
function defaultErrorTypeForStatus(status) {
|
|
85
|
+
if (status === 400) return "validation_error";
|
|
86
|
+
if (status === 401) return "authentication_error";
|
|
87
|
+
if (status === 403) return "authorization_error";
|
|
88
|
+
if (status === 404) return "not_found_error";
|
|
89
|
+
if (status === 422) return "business_logic_error";
|
|
90
|
+
if (status === 429) return "rate_limit_error";
|
|
91
|
+
if (status === 503) return "service_unavailable_error";
|
|
92
|
+
return "server_error";
|
|
93
|
+
}
|
|
77
94
|
var PafiSdkError = (_class = class extends Error {
|
|
78
95
|
/**
|
|
79
96
|
* `true` when the FE should consider a retry safe — typically because
|
|
@@ -81,6 +98,24 @@ var PafiSdkError = (_class = class extends Error {
|
|
|
81
98
|
*/
|
|
82
99
|
__init() {this.safeToRetry = false}
|
|
83
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Optional Stripe-style taxonomy override. Defaults to the type
|
|
103
|
+
* implied by `httpStatus` (forbidden→authorization_error,
|
|
104
|
+
* unprocessable→business_logic_error, etc).
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Optional name of the request field that triggered the error (e.g.
|
|
109
|
+
* `"amount"`, `"chainId"`). Surfaced on validation failures so the
|
|
110
|
+
* client can highlight the offending field.
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Optional structured context (e.g. `{ available, requested }` for a
|
|
115
|
+
* cap denial). Distinct from `details` — `metadata` is meant for
|
|
116
|
+
* UI consumption; `details` carries raw debug info.
|
|
117
|
+
*/
|
|
118
|
+
|
|
84
119
|
constructor(message) {
|
|
85
120
|
super(message);_class.prototype.__init.call(this);;
|
|
86
121
|
this.name = new.target.name;
|
|
@@ -135,12 +170,18 @@ var OracleStaleError = (_class2 = class extends PafiSdkError {
|
|
|
135
170
|
}, _class2);
|
|
136
171
|
var ValidationError = (_class3 = class extends PafiSdkError {
|
|
137
172
|
__init4() {this.httpStatus = "unprocessable"}
|
|
173
|
+
__init5() {this.type = "validation_error"}
|
|
138
174
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
super(message);_class3.prototype.__init4.call(this);;
|
|
175
|
+
constructor(code, message, details, options) {
|
|
176
|
+
super(message);_class3.prototype.__init4.call(this);_class3.prototype.__init5.call(this);;
|
|
142
177
|
this.code = code;
|
|
143
178
|
this.details = details;
|
|
179
|
+
if (_optionalChain([options, 'optionalAccess', _ => _.param])) {
|
|
180
|
+
this.param = options.param;
|
|
181
|
+
}
|
|
182
|
+
if (_optionalChain([options, 'optionalAccess', _2 => _2.metadata])) {
|
|
183
|
+
this.metadata = options.metadata;
|
|
184
|
+
}
|
|
144
185
|
}
|
|
145
186
|
}, _class3);
|
|
146
187
|
|
|
@@ -318,11 +359,11 @@ function buildPartialUserOperation(params) {
|
|
|
318
359
|
sender: params.sender,
|
|
319
360
|
nonce: params.nonce,
|
|
320
361
|
callData: encodeBatchExecute(params.operations),
|
|
321
|
-
callGasLimit: _nullishCoalesce(_optionalChain([params, 'access',
|
|
322
|
-
verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access',
|
|
323
|
-
preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access',
|
|
324
|
-
maxFeePerGas: _nullishCoalesce(_optionalChain([params, 'access',
|
|
325
|
-
maxPriorityFeePerGas: _nullishCoalesce(_optionalChain([params, 'access',
|
|
362
|
+
callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _3 => _3.gasLimits, 'optionalAccess', _4 => _4.callGasLimit]), () => ( DEFAULT_CALL_GAS_LIMIT)),
|
|
363
|
+
verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _5 => _5.gasLimits, 'optionalAccess', _6 => _6.verificationGasLimit]), () => ( DEFAULT_VERIFICATION_GAS_LIMIT)),
|
|
364
|
+
preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _7 => _7.gasLimits, 'optionalAccess', _8 => _8.preVerificationGas]), () => ( DEFAULT_PRE_VERIFICATION_GAS)),
|
|
365
|
+
maxFeePerGas: _nullishCoalesce(_optionalChain([params, 'access', _9 => _9.feeOverrides, 'optionalAccess', _10 => _10.maxFeePerGas]), () => ( 0n)),
|
|
366
|
+
maxPriorityFeePerGas: _nullishCoalesce(_optionalChain([params, 'access', _11 => _11.feeOverrides, 'optionalAccess', _12 => _12.maxPriorityFeePerGas]), () => ( 0n))
|
|
326
367
|
};
|
|
327
368
|
}
|
|
328
369
|
function assembleUserOperation(partial, paymaster, signature) {
|
|
@@ -377,9 +418,9 @@ function buildPerpDepositWithGasDeduction(params) {
|
|
|
377
418
|
nonce: params.aaNonce,
|
|
378
419
|
operations,
|
|
379
420
|
gasLimits: {
|
|
380
|
-
callGasLimit: _nullishCoalesce(_optionalChain([params, 'access',
|
|
381
|
-
verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access',
|
|
382
|
-
preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access',
|
|
421
|
+
callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _13 => _13.gasLimits, 'optionalAccess', _14 => _14.callGasLimit]), () => ( 800000n)),
|
|
422
|
+
verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _15 => _15.gasLimits, 'optionalAccess', _16 => _16.verificationGasLimit]), () => ( 150000n)),
|
|
423
|
+
preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _17 => _17.gasLimits, 'optionalAccess', _18 => _18.preVerificationGas]), () => ( 50000n))
|
|
383
424
|
}
|
|
384
425
|
});
|
|
385
426
|
}
|
|
@@ -477,9 +518,9 @@ function buildPerpDepositViaRelay(params) {
|
|
|
477
518
|
nonce: params.aaNonce,
|
|
478
519
|
operations,
|
|
479
520
|
gasLimits: {
|
|
480
|
-
callGasLimit: _nullishCoalesce(_optionalChain([params, 'access',
|
|
481
|
-
verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access',
|
|
482
|
-
preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access',
|
|
521
|
+
callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _19 => _19.gasLimits, 'optionalAccess', _20 => _20.callGasLimit]), () => ( 800000n)),
|
|
522
|
+
verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _21 => _21.gasLimits, 'optionalAccess', _22 => _22.verificationGasLimit]), () => ( 150000n)),
|
|
523
|
+
preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _23 => _23.gasLimits, 'optionalAccess', _24 => _24.preVerificationGas]), () => ( 50000n))
|
|
483
524
|
}
|
|
484
525
|
});
|
|
485
526
|
}
|
|
@@ -545,7 +586,7 @@ function buildUserOpTypedData(userOp, chainId) {
|
|
|
545
586
|
name: "ERC4337",
|
|
546
587
|
version: "1",
|
|
547
588
|
chainId,
|
|
548
|
-
verifyingContract:
|
|
589
|
+
verifyingContract: _chunkACQHZWHPcjs.ENTRY_POINT_V08
|
|
549
590
|
},
|
|
550
591
|
types: PACKED_USER_OPERATION_TYPES,
|
|
551
592
|
primaryType: "PackedUserOperation",
|
|
@@ -676,9 +717,9 @@ function buildDelegationUserOp(params) {
|
|
|
676
717
|
}
|
|
677
718
|
],
|
|
678
719
|
gasLimits: {
|
|
679
|
-
callGasLimit: _nullishCoalesce(_optionalChain([params, 'access',
|
|
680
|
-
verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access',
|
|
681
|
-
preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access',
|
|
720
|
+
callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _25 => _25.gasLimits, 'optionalAccess', _26 => _26.callGasLimit]), () => ( 50000n)),
|
|
721
|
+
verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _27 => _27.gasLimits, 'optionalAccess', _28 => _28.verificationGasLimit]), () => ( 150000n)),
|
|
722
|
+
preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _29 => _29.gasLimits, 'optionalAccess', _30 => _30.preVerificationGas]), () => ( 50000n))
|
|
682
723
|
}
|
|
683
724
|
});
|
|
684
725
|
}
|
|
@@ -696,7 +737,7 @@ async function getAaNonce(client, userAddress) {
|
|
|
696
737
|
}
|
|
697
738
|
];
|
|
698
739
|
return client.readContract({
|
|
699
|
-
address:
|
|
740
|
+
address: _chunkACQHZWHPcjs.ENTRY_POINT_V08,
|
|
700
741
|
abi: NONCE_ABI,
|
|
701
742
|
functionName: "getNonce",
|
|
702
743
|
args: [userAddress, 0n]
|
|
@@ -886,7 +927,7 @@ async function delegateDirect(params) {
|
|
|
886
927
|
hash: txHash
|
|
887
928
|
});
|
|
888
929
|
} catch (err) {
|
|
889
|
-
_optionalChain([params, 'access',
|
|
930
|
+
_optionalChain([params, 'access', _31 => _31.onWarning, 'optionalCall', _32 => _32(
|
|
890
931
|
`delegateDirect: tx ${txHash} sent but receipt fetch failed: ${err instanceof Error ? err.message : String(err)}`
|
|
891
932
|
)]);
|
|
892
933
|
}
|
|
@@ -914,7 +955,7 @@ function createPafiProxyTransport(params) {
|
|
|
914
955
|
// fetchFn intercepts every fetch call the viem http transport makes,
|
|
915
956
|
// injecting the auth headers before the request leaves the browser.
|
|
916
957
|
fetchFn: (input, init) => {
|
|
917
|
-
const headers = new Headers(_optionalChain([init, 'optionalAccess',
|
|
958
|
+
const headers = new Headers(_optionalChain([init, 'optionalAccess', _33 => _33.headers]));
|
|
918
959
|
const token = getIdentityToken();
|
|
919
960
|
if (token) {
|
|
920
961
|
headers.set("authorization", `Bearer ${token}`);
|
|
@@ -938,7 +979,7 @@ var PAYMASTER_PATTERNS = [
|
|
|
938
979
|
function isPaymasterError(err) {
|
|
939
980
|
if (err == null || typeof err !== "object") return false;
|
|
940
981
|
const e = err;
|
|
941
|
-
const status = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.status, () => ( e.statusCode)), () => ( _optionalChain([e, 'access',
|
|
982
|
+
const status = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.status, () => ( e.statusCode)), () => ( _optionalChain([e, 'access', _34 => _34.response, 'optionalAccess', _35 => _35.status]))), () => ( _optionalChain([e, 'access', _36 => _36.cause, 'optionalAccess', _37 => _37.status])));
|
|
942
983
|
if (typeof status === "number" && PAYMASTER_HTTP_STATUSES.has(status)) {
|
|
943
984
|
return true;
|
|
944
985
|
}
|
|
@@ -951,8 +992,8 @@ async function sendWithPaymasterFallback(params) {
|
|
|
951
992
|
return await primaryClient.sendTransaction(txParams);
|
|
952
993
|
} catch (err) {
|
|
953
994
|
if (isPaymasterError(err) && fallbackClient) {
|
|
954
|
-
const msg = _nullishCoalesce(_optionalChain([err, 'optionalAccess',
|
|
955
|
-
_optionalChain([onFallback, 'optionalCall',
|
|
995
|
+
const msg = _nullishCoalesce(_optionalChain([err, 'optionalAccess', _38 => _38.message]), () => ( String(err)));
|
|
996
|
+
_optionalChain([onFallback, 'optionalCall', _39 => _39(msg)]);
|
|
956
997
|
return await fallbackClient.sendTransaction(_nullishCoalesce(txParamsFallback, () => ( txParams)));
|
|
957
998
|
}
|
|
958
999
|
throw err;
|
|
@@ -1010,7 +1051,7 @@ async function fetchPafiPools(_chainId, pointTokenAddress, subgraphUrl = PAFI_SU
|
|
|
1010
1051
|
);
|
|
1011
1052
|
return [];
|
|
1012
1053
|
}
|
|
1013
|
-
const pool = _optionalChain([json, 'access',
|
|
1054
|
+
const pool = _optionalChain([json, 'access', _40 => _40.data, 'optionalAccess', _41 => _41.pafiToken, 'optionalAccess', _42 => _42.pool]);
|
|
1014
1055
|
if (!pool) return [];
|
|
1015
1056
|
if (!_viem.isAddress.call(void 0, pool.hooks) || !_viem.isAddress.call(void 0, pool.token0.id) || !_viem.isAddress.call(void 0, pool.token1.id) || !Number.isFinite(Number(pool.feeTier)) || !Number.isFinite(Number(pool.tickSpacing))) {
|
|
1016
1057
|
console.error("[fetchPafiPools] invalid pool data in subgraph response \u2014 skipping");
|
|
@@ -1159,10 +1200,10 @@ async function getPtPerUsdt18dec(fetchImpl, subgraphUrl, pointTokenAddress, fall
|
|
|
1159
1200
|
});
|
|
1160
1201
|
if (!response.ok) throw new Error(`subgraph HTTP ${response.status}`);
|
|
1161
1202
|
const json = await response.json();
|
|
1162
|
-
if (_optionalChain([json, 'access',
|
|
1203
|
+
if (_optionalChain([json, 'access', _43 => _43.errors, 'optionalAccess', _44 => _44.length])) {
|
|
1163
1204
|
throw new Error(json.errors.map((e) => e.message).join("; "));
|
|
1164
1205
|
}
|
|
1165
|
-
const pool = _optionalChain([json, 'access',
|
|
1206
|
+
const pool = _optionalChain([json, 'access', _45 => _45.data, 'optionalAccess', _46 => _46.pafiToken, 'optionalAccess', _47 => _47.pool]);
|
|
1166
1207
|
if (!pool) throw new Error("pafiToken or pool not found");
|
|
1167
1208
|
const isPtToken0 = pool.token0.id.toLowerCase() === pointTokenAddress.toLowerCase();
|
|
1168
1209
|
const priceStr = isPtToken0 ? pool.token0Price : pool.token1Price;
|
|
@@ -1242,8 +1283,8 @@ function openWebPopup(url, options = {}) {
|
|
|
1242
1283
|
const width = _nullishCoalesce(options.width, () => ( DEFAULT_WIDTH));
|
|
1243
1284
|
const height = _nullishCoalesce(options.height, () => ( DEFAULT_HEIGHT));
|
|
1244
1285
|
const name = _nullishCoalesce(options.windowName, () => ( DEFAULT_NAME));
|
|
1245
|
-
const screenW = _nullishCoalesce(_optionalChain([window, 'access',
|
|
1246
|
-
const screenH = _nullishCoalesce(_optionalChain([window, 'access',
|
|
1286
|
+
const screenW = _nullishCoalesce(_optionalChain([window, 'access', _48 => _48.screen, 'optionalAccess', _49 => _49.availWidth]), () => ( window.innerWidth));
|
|
1287
|
+
const screenH = _nullishCoalesce(_optionalChain([window, 'access', _50 => _50.screen, 'optionalAccess', _51 => _51.availHeight]), () => ( window.innerHeight));
|
|
1247
1288
|
const left = Math.max(0, Math.floor((screenW - width) / 2));
|
|
1248
1289
|
const top = Math.max(0, Math.floor((screenH - height) / 2));
|
|
1249
1290
|
const features = [
|
|
@@ -1276,7 +1317,7 @@ function openWebPopup(url, options = {}) {
|
|
|
1276
1317
|
window.removeEventListener("message", messageListener);
|
|
1277
1318
|
messageListener = null;
|
|
1278
1319
|
}
|
|
1279
|
-
_optionalChain([options, 'access',
|
|
1320
|
+
_optionalChain([options, 'access', _52 => _52.onClose, 'optionalCall', _53 => _53()]);
|
|
1280
1321
|
};
|
|
1281
1322
|
pollId = setInterval(() => {
|
|
1282
1323
|
if (popup.closed) {
|
|
@@ -1443,7 +1484,7 @@ var PafiSDK = class {
|
|
|
1443
1484
|
const provider = this.requireProvider();
|
|
1444
1485
|
const pointToken = this.requirePointToken();
|
|
1445
1486
|
const chainId = this.requireChainId();
|
|
1446
|
-
const name = await
|
|
1487
|
+
const name = await _chunkYCY7MBSJcjs.getTokenName.call(void 0, provider, pointToken);
|
|
1447
1488
|
return { name, verifyingContract: pointToken, chainId };
|
|
1448
1489
|
}
|
|
1449
1490
|
// -------------------------------------------------------------------------
|
|
@@ -1451,40 +1492,40 @@ var PafiSDK = class {
|
|
|
1451
1492
|
// -------------------------------------------------------------------------
|
|
1452
1493
|
async buildMintRequestTypedData(message) {
|
|
1453
1494
|
const domain = await this.getDomain();
|
|
1454
|
-
return
|
|
1495
|
+
return _chunkACQHZWHPcjs.buildMintRequestTypedData.call(void 0, domain, message);
|
|
1455
1496
|
}
|
|
1456
1497
|
async buildReceiverConsentTypedData(message) {
|
|
1457
1498
|
const domain = await this.getDomain();
|
|
1458
|
-
return
|
|
1499
|
+
return _chunkACQHZWHPcjs.buildReceiverConsentTypedData.call(void 0, domain, message);
|
|
1459
1500
|
}
|
|
1460
1501
|
async signMintRequest(message) {
|
|
1461
1502
|
const domain = await this.getDomain();
|
|
1462
|
-
return
|
|
1503
|
+
return _chunkACQHZWHPcjs.signMintRequest.call(void 0, this.requireSigner(), domain, message);
|
|
1463
1504
|
}
|
|
1464
1505
|
async verifyMintRequest(message, signature, expectedMinter) {
|
|
1465
1506
|
const domain = await this.getDomain();
|
|
1466
|
-
return
|
|
1507
|
+
return _chunkACQHZWHPcjs.verifyMintRequest.call(void 0, domain, message, signature, expectedMinter);
|
|
1467
1508
|
}
|
|
1468
1509
|
async signReceiverConsent(message) {
|
|
1469
1510
|
const domain = await this.getDomain();
|
|
1470
|
-
return
|
|
1511
|
+
return _chunkACQHZWHPcjs.signReceiverConsent.call(void 0, this.requireSigner(), domain, message);
|
|
1471
1512
|
}
|
|
1472
1513
|
async verifyReceiverConsent(message, signature, expectedReceiver) {
|
|
1473
1514
|
const domain = await this.getDomain();
|
|
1474
|
-
return
|
|
1515
|
+
return _chunkACQHZWHPcjs.verifyReceiverConsent.call(void 0, domain, message, signature, expectedReceiver);
|
|
1475
1516
|
}
|
|
1476
1517
|
// -------------------------------------------------------------------------
|
|
1477
1518
|
// Contract reads
|
|
1478
1519
|
// -------------------------------------------------------------------------
|
|
1479
1520
|
async getMintRequestNonce(receiver) {
|
|
1480
|
-
return
|
|
1521
|
+
return _chunkYCY7MBSJcjs.getMintRequestNonce.call(void 0,
|
|
1481
1522
|
this.requireProvider(),
|
|
1482
1523
|
this.requirePointToken(),
|
|
1483
1524
|
receiver
|
|
1484
1525
|
);
|
|
1485
1526
|
}
|
|
1486
1527
|
async getReceiverConsentNonce(receiver) {
|
|
1487
|
-
return
|
|
1528
|
+
return _chunkYCY7MBSJcjs.getReceiverConsentNonce.call(void 0,
|
|
1488
1529
|
this.requireProvider(),
|
|
1489
1530
|
this.requirePointToken(),
|
|
1490
1531
|
receiver
|
|
@@ -1643,5 +1684,8 @@ var PafiSDK = class {
|
|
|
1643
1684
|
|
|
1644
1685
|
|
|
1645
1686
|
|
|
1646
|
-
|
|
1687
|
+
|
|
1688
|
+
|
|
1689
|
+
|
|
1690
|
+
exports.ApiError = ApiError; exports.BATCH_EXECUTOR_7702_IMPL = BATCH_EXECUTOR_7702_IMPL; exports.BATCH_EXECUTOR_ABI = BATCH_EXECUTOR_ABI; exports.BATCH_EXECUTOR_ADDRESS_BASE_MAINNET = BATCH_EXECUTOR_ADDRESS_BASE_MAINNET; exports.BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA = BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA; exports.BROKER_HASHES = BROKER_HASHES; exports.COMMON_POOLS = _chunkACQHZWHPcjs.COMMON_POOLS; exports.COMMON_TOKENS = _chunkACQHZWHPcjs.COMMON_TOKENS; exports.CONTRACT_ADDRESSES = CONTRACT_ADDRESSES; exports.ConfigurationError = ConfigurationError; exports.DUMMY_SIGNATURE_V07 = DUMMY_SIGNATURE_V07; exports.ENTRY_POINT_V07 = _chunkACQHZWHPcjs.ENTRY_POINT_V07; exports.ENTRY_POINT_V08 = _chunkACQHZWHPcjs.ENTRY_POINT_V08; exports.Eip712DomainMismatchError = _chunkACQHZWHPcjs.Eip712DomainMismatchError; exports.ORDERLY_RELAY_ABI = ORDERLY_RELAY_ABI; exports.ORDERLY_VAULT_ABI = ORDERLY_VAULT_ABI; exports.ORDERLY_VAULT_ADDRESSES = ORDERLY_VAULT_ADDRESSES; exports.ORDERLY_VAULT_BASE_MAINNET = ORDERLY_VAULT_BASE_MAINNET; exports.OracleStaleError = OracleStaleError; exports.PAFI_SERVICE_URLS = PAFI_SERVICE_URLS; exports.PAFI_SUBGRAPH_URL = PAFI_SUBGRAPH_URL; exports.PERMIT2_ADDRESS = _chunkACQHZWHPcjs.PERMIT2_ADDRESS; exports.POINT_TOKEN_FACTORY_ADDRESSES = POINT_TOKEN_FACTORY_ADDRESSES; exports.POINT_TOKEN_IMPL_ADDRESSES = POINT_TOKEN_IMPL_ADDRESSES; exports.POINT_TOKEN_POOLS = _chunkACQHZWHPcjs.POINT_TOKEN_POOLS; exports.POINT_TOKEN_V2_ABI = _chunk644KZUKRcjs.pointTokenAbi; exports.PafiSDK = PafiSDK; exports.PafiSDKError = PafiSDKError; exports.PafiSdkError = PafiSdkError; exports.SDK_ERROR_HTTP_STATUS_CODE = SDK_ERROR_HTTP_STATUS_CODE; exports.SIMPLE_7702_IMPL_BASE_MAINNET = SIMPLE_7702_IMPL_BASE_MAINNET; exports.SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET = _chunk75JWR5SAcjs.SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET; exports.SPONSOR_AUTH_DOMAIN_NAME = _chunk75JWR5SAcjs.SPONSOR_AUTH_DOMAIN_NAME; exports.SPONSOR_AUTH_TYPES = _chunk75JWR5SAcjs.SPONSOR_AUTH_TYPES; exports.SUPPORTED_CHAINS = _chunkACQHZWHPcjs.SUPPORTED_CHAINS; exports.SigningError = SigningError; exports.SimulationError = SimulationError; exports.TOKEN_HASHES = TOKEN_HASHES; exports.UNIVERSAL_ROUTER_ADDRESSES = _chunkACQHZWHPcjs.UNIVERSAL_ROUTER_ADDRESSES; exports.V4_QUOTER_ADDRESSES = _chunkACQHZWHPcjs.V4_QUOTER_ADDRESSES; exports.ValidationError = ValidationError; exports.ZERO_VALUE = ZERO_VALUE; exports._resetPaymasterConfigForTests = _resetPaymasterConfigForTests; exports.assembleUserOperation = assembleUserOperation; exports.assertDomainMatchesContract = _chunkACQHZWHPcjs.assertDomainMatchesContract; exports.buildAndSignSponsorAuth = _chunk75JWR5SAcjs.buildAndSignSponsorAuth; exports.buildBurnRequestTypedData = _chunkACQHZWHPcjs.buildBurnRequestTypedData; exports.buildDelegationUserOp = buildDelegationUserOp; exports.buildDomain = _chunkACQHZWHPcjs.buildDomain; exports.buildEip7702Authorization = buildEip7702Authorization; exports.buildMintRequestTypedData = _chunkACQHZWHPcjs.buildMintRequestTypedData; exports.buildPartialUserOperation = buildPartialUserOperation; exports.buildPerpDepositViaRelay = buildPerpDepositViaRelay; exports.buildPerpDepositWithGasDeduction = buildPerpDepositWithGasDeduction; exports.buildReceiverConsentTypedData = _chunkACQHZWHPcjs.buildReceiverConsentTypedData; exports.buildSponsorAuthDomain = _chunk75JWR5SAcjs.buildSponsorAuthDomain; exports.buildSponsorAuthTypedData = _chunk75JWR5SAcjs.buildSponsorAuthTypedData; exports.buildUserOpTypedData = buildUserOpTypedData; exports.burnRequestTypes = _chunkACQHZWHPcjs.burnRequestTypes; exports.checkDelegation = checkDelegation; exports.checkEthAndBranch = checkEthAndBranch; exports.computeAccountId = computeAccountId; exports.computeAuthorizationHash = computeAuthorizationHash; exports.computeCallDataHash = _chunk75JWR5SAcjs.computeCallDataHash; exports.computeUserOpHash = computeUserOpHash; exports.createLoginMessage = _chunk75JWR5SAcjs.createLoginMessage; exports.createPafiProxyTransport = createPafiProxyTransport; exports.decodeBatchExecuteCalls = decodeBatchExecuteCalls; exports.defaultErrorTypeForStatus = defaultErrorTypeForStatus; exports.delegateDirect = delegateDirect; exports.detectDelegateImpl = detectDelegateImpl; exports.encodeBatchExecute = encodeBatchExecute; exports.erc20Abi = _chunkRFANYF24cjs.erc20Abi; exports.erc20ApproveOp = erc20ApproveOp; exports.erc20BurnOp = erc20BurnOp; exports.erc20TransferOp = erc20TransferOp; exports.fetchPafiPools = fetchPafiPools; exports.generateSponsorAuthNonce = _chunk75JWR5SAcjs.generateSponsorAuthNonce; exports.getAaNonce = getAaNonce; exports.getBurnRequestNonce = _chunkYCY7MBSJcjs.getBurnRequestNonce; exports.getContractAddresses = getContractAddresses; exports.getDummySignatureFor7702 = getDummySignatureFor7702; exports.getIssuer = _chunkYCY7MBSJcjs.getIssuer2; exports.getMintRequestNonce = _chunkYCY7MBSJcjs.getMintRequestNonce; exports.getPafiServiceUrls = getPafiServiceUrls; exports.getPafiWebModalAdapter = getPafiWebModalAdapter; exports.getPaymasterConfig = getPaymasterConfig; exports.getPointTokenBalance = _chunkYCY7MBSJcjs.getPointTokenBalance; exports.getPointTokenIssuer = _chunkYCY7MBSJcjs.getPointTokenIssuer; exports.getPointTokenIssuerAddress = _chunkYCY7MBSJcjs.getIssuer; exports.getReceiverConsentNonce = _chunkYCY7MBSJcjs.getReceiverConsentNonce; exports.getSponsorAuthDomainAnchor = _chunk75JWR5SAcjs.getSponsorAuthDomainAnchor; exports.getTokenName = _chunkYCY7MBSJcjs.getTokenName; exports.isActiveIssuer = _chunkYCY7MBSJcjs.isActiveIssuer; exports.isDelegatedTo = isDelegatedTo; exports.isDelegatedToTarget = isDelegatedToTarget; exports.isMinter = _chunkYCY7MBSJcjs.isMinter; exports.isPaymasterConfigured = isPaymasterConfigured; exports.isPaymasterError = isPaymasterError; exports.issuerRegistryAbi = _chunkJEWSN7Q3cjs.issuerRegistryAbi; exports.issuerRegistryGetIssuerFlatAbi = _chunkYCY7MBSJcjs.issuerRegistryGetIssuerFlatAbi; exports.mintFeeWrapperAbi = _chunkRFANYF24cjs.mintFeeWrapperAbi; exports.mintRequestTypes = _chunkACQHZWHPcjs.mintRequestTypes; exports.mintingOracleAbi = _chunkJEWSN7Q3cjs.mintingOracleAbi; exports.openPafiWebModal = openPafiWebModal; exports.openWebPopup = openWebPopup; exports.parseEip7702DelegatedAddress = parseEip7702DelegatedAddress; exports.parseLoginMessage = _chunk75JWR5SAcjs.parseLoginMessage; exports.permit2Abi = _chunkRFANYF24cjs.permit2Abi; exports.pointTokenAbi = _chunk644KZUKRcjs.pointTokenAbi; exports.pointTokenFactoryAbi = _chunkRFANYF24cjs.pointTokenFactoryAbi; exports.quoteOperatorFeePt = quoteOperatorFeePt; exports.quoteOperatorFeeUsdt = quoteOperatorFeeUsdt; exports.rawCallOp = rawCallOp; exports.receiverConsentTypes = _chunkACQHZWHPcjs.receiverConsentTypes; exports.sendWithPaymasterFallback = sendWithPaymasterFallback; exports.serializeUserOpToJsonRpc = serializeUserOpToJsonRpc; exports.setPafiWebModalAdapter = setPafiWebModalAdapter; exports.setPaymasterConfig = setPaymasterConfig; exports.signBurnRequest = _chunkACQHZWHPcjs.signBurnRequest; exports.signMintRequest = _chunkACQHZWHPcjs.signMintRequest; exports.signReceiverConsent = _chunkACQHZWHPcjs.signReceiverConsent; exports.signSponsorAuth = _chunk75JWR5SAcjs.signSponsorAuth; exports.splitAuthorizationSig = splitAuthorizationSig; exports.universalRouterAbi = _chunkRFANYF24cjs.universalRouterAbi; exports.v4QuoterAbi = _chunkRFANYF24cjs.v4QuoterAbi; exports.verifyBurnRequest = _chunkACQHZWHPcjs.verifyBurnRequest; exports.verifyLoginMessage = _chunk75JWR5SAcjs.verifyLoginMessage; exports.verifyMintCap = _chunkYCY7MBSJcjs.verifyMintCap; exports.verifyMintRequest = _chunkACQHZWHPcjs.verifyMintRequest; exports.verifyReceiverConsent = _chunkACQHZWHPcjs.verifyReceiverConsent; exports.verifySponsorAuth = _chunk75JWR5SAcjs.verifySponsorAuth; exports.webPopupAdapter = webPopupAdapter;
|
|
1647
1691
|
//# sourceMappingURL=index.cjs.map
|