@pepu-chain/sdk 0.2.0 → 0.2.1
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 +25 -0
- package/dist/aa/kernel.cjs +1 -0
- package/dist/aa/kernel.guard.js +15 -0
- package/dist/aa/react-direct.cjs +4 -3
- package/dist/aa/react-direct.guard.js +15 -0
- package/dist/aa/react-direct.js +2 -2
- package/dist/aa/react.cjs +4 -3
- package/dist/aa/react.d.cts +1 -1
- package/dist/aa/react.d.ts +1 -1
- package/dist/aa/react.guard.js +15 -0
- package/dist/aa/react.js +2 -2
- package/dist/aa.cjs +9 -9
- package/dist/aa.d.cts +1 -1
- package/dist/aa.d.ts +1 -1
- package/dist/aa.js +2 -2
- package/dist/{chunk-MBA4CLA5.js → chunk-7PVR7QSE.js} +3 -3
- package/dist/{chunk-MBA4CLA5.js.map → chunk-7PVR7QSE.js.map} +1 -1
- package/dist/{chunk-SLW7FRTL.cjs → chunk-BGALSKAF.cjs} +50 -20
- package/dist/chunk-BGALSKAF.cjs.map +1 -0
- package/dist/{chunk-KIIFL4VM.js → chunk-F2R473FR.js} +41 -11
- package/dist/chunk-F2R473FR.js.map +1 -0
- package/dist/{chunk-TIEAZYHF.cjs → chunk-K7JSQPZO.cjs} +8 -2
- package/dist/chunk-K7JSQPZO.cjs.map +1 -0
- package/dist/{chunk-FCXSP2YF.js → chunk-KJYNF5KH.js} +8 -3
- package/dist/chunk-KJYNF5KH.js.map +1 -0
- package/dist/{chunk-ET3P6TX6.cjs → chunk-RCMKPJZO.cjs} +4 -4
- package/dist/{chunk-ET3P6TX6.cjs.map → chunk-RCMKPJZO.cjs.map} +1 -1
- package/dist/combo/react.cjs +1 -0
- package/dist/combo/react.guard.js +15 -0
- package/dist/combo.cjs +4 -3
- package/dist/combo.guard.js +15 -0
- package/dist/combo.js +2 -2
- package/dist/index.cjs +26 -22
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/paymaster.cjs +2 -2
- package/dist/paymaster.js +1 -1
- package/dist/privy/react.cjs +1 -0
- package/dist/privy/react.guard.js +15 -0
- package/dist/privy/server.cjs +1 -0
- package/dist/privy/server.guard.js +15 -0
- package/dist/privy/wagmi.guard.js +15 -0
- package/dist/react.cjs +4 -3
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.guard.js +15 -0
- package/dist/react.js +2 -2
- package/dist/session/kernel.cjs +1 -0
- package/dist/session/kernel.guard.js +15 -0
- package/dist/session/react.cjs +1 -0
- package/dist/session/react.guard.js +15 -0
- package/dist/session/server.cjs +1 -0
- package/dist/session/server.guard.js +15 -0
- package/dist/{status-DwkkOrGQ.d.ts → status-Dx9zAFo9.d.ts} +42 -10
- package/dist/{status-CmOsyPmO.d.cts → status-wgTM26V7.d.cts} +42 -10
- package/package.json +38 -2
- package/dist/chunk-FCXSP2YF.js.map +0 -1
- package/dist/chunk-KIIFL4VM.js.map +0 -1
- package/dist/chunk-SLW7FRTL.cjs.map +0 -1
- package/dist/chunk-TIEAZYHF.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkRCMKPJZO_cjs = require('./chunk-RCMKPJZO.cjs');
|
|
4
|
+
var chunkBGALSKAF_cjs = require('./chunk-BGALSKAF.cjs');
|
|
5
5
|
require('./chunk-WANILJZQ.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkK7JSQPZO_cjs = require('./chunk-K7JSQPZO.cjs');
|
|
7
7
|
var chunkC7IC36XS_cjs = require('./chunk-C7IC36XS.cjs');
|
|
8
8
|
var chunk4GINFJO6_cjs = require('./chunk-4GINFJO6.cjs');
|
|
9
9
|
var chunkVF3D6KLQ_cjs = require('./chunk-VF3D6KLQ.cjs');
|
|
@@ -435,8 +435,8 @@ function assertNotCanonicalMulticall3(address) {
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
function getMulticall3(chainId = chunkDPCZJLB3_cjs.pepuMainnet.id) {
|
|
438
|
-
const entry =
|
|
439
|
-
if (!
|
|
438
|
+
const entry = chunkK7JSQPZO_cjs.getContract(chainId, "multicall3");
|
|
439
|
+
if (!chunkK7JSQPZO_cjs.isDeployed(entry)) {
|
|
440
440
|
throw new chunkYQL7NISX_cjs.PepuChainError("UNKNOWN", "Multicall3 is not deployed on the requested chain.");
|
|
441
441
|
}
|
|
442
442
|
assertNotCanonicalMulticall3(entry.address);
|
|
@@ -476,8 +476,8 @@ function decodeAggregate3Result(data) {
|
|
|
476
476
|
|
|
477
477
|
// src/permit2.ts
|
|
478
478
|
function getPermit2(chainId = chunkDPCZJLB3_cjs.pepuMainnet.id) {
|
|
479
|
-
const entry =
|
|
480
|
-
if (!
|
|
479
|
+
const entry = chunkK7JSQPZO_cjs.getContract(chainId, "permit2");
|
|
480
|
+
if (!chunkK7JSQPZO_cjs.isDeployed(entry)) {
|
|
481
481
|
throw new chunkYQL7NISX_cjs.PepuChainError("UNKNOWN", "Permit2 is not deployed on the requested chain.");
|
|
482
482
|
}
|
|
483
483
|
return entry;
|
|
@@ -554,63 +554,67 @@ async function readPermit2Allowance(client, o) {
|
|
|
554
554
|
|
|
555
555
|
Object.defineProperty(exports, "buildPaymasterContext", {
|
|
556
556
|
enumerable: true,
|
|
557
|
-
get: function () { return
|
|
557
|
+
get: function () { return chunkRCMKPJZO_cjs.buildPaymasterContext; }
|
|
558
558
|
});
|
|
559
559
|
Object.defineProperty(exports, "buildPaymasterDataRequest", {
|
|
560
560
|
enumerable: true,
|
|
561
|
-
get: function () { return
|
|
561
|
+
get: function () { return chunkRCMKPJZO_cjs.buildPaymasterDataRequest; }
|
|
562
562
|
});
|
|
563
563
|
Object.defineProperty(exports, "buildPaymasterStubDataRequest", {
|
|
564
564
|
enumerable: true,
|
|
565
|
-
get: function () { return
|
|
565
|
+
get: function () { return chunkRCMKPJZO_cjs.buildPaymasterStubDataRequest; }
|
|
566
566
|
});
|
|
567
567
|
Object.defineProperty(exports, "KERNEL_V3_1_IMPLEMENTATION_ADDRESS", {
|
|
568
568
|
enumerable: true,
|
|
569
|
-
get: function () { return
|
|
569
|
+
get: function () { return chunkBGALSKAF_cjs.KERNEL_V3_1_IMPLEMENTATION_ADDRESS; }
|
|
570
570
|
});
|
|
571
571
|
Object.defineProperty(exports, "checkSponsorship", {
|
|
572
572
|
enumerable: true,
|
|
573
|
-
get: function () { return
|
|
573
|
+
get: function () { return chunkBGALSKAF_cjs.checkSponsorship; }
|
|
574
574
|
});
|
|
575
575
|
Object.defineProperty(exports, "entryPointV07Abi", {
|
|
576
576
|
enumerable: true,
|
|
577
|
-
get: function () { return
|
|
577
|
+
get: function () { return chunkBGALSKAF_cjs.entryPointV07Abi; }
|
|
578
578
|
});
|
|
579
579
|
Object.defineProperty(exports, "getKernelAccountAddress", {
|
|
580
580
|
enumerable: true,
|
|
581
|
-
get: function () { return
|
|
581
|
+
get: function () { return chunkBGALSKAF_cjs.getKernelAccountAddress; }
|
|
582
582
|
});
|
|
583
583
|
Object.defineProperty(exports, "getPepuKernelStack", {
|
|
584
584
|
enumerable: true,
|
|
585
|
-
get: function () { return
|
|
585
|
+
get: function () { return chunkBGALSKAF_cjs.getPepuKernelStack; }
|
|
586
586
|
});
|
|
587
587
|
Object.defineProperty(exports, "getSponsorshipStatus", {
|
|
588
588
|
enumerable: true,
|
|
589
|
-
get: function () { return
|
|
589
|
+
get: function () { return chunkBGALSKAF_cjs.getSponsorshipStatus; }
|
|
590
590
|
});
|
|
591
591
|
Object.defineProperty(exports, "kernelFactoryAbi", {
|
|
592
592
|
enumerable: true,
|
|
593
|
-
get: function () { return
|
|
593
|
+
get: function () { return chunkBGALSKAF_cjs.kernelFactoryAbi; }
|
|
594
594
|
});
|
|
595
595
|
Object.defineProperty(exports, "getContract", {
|
|
596
596
|
enumerable: true,
|
|
597
|
-
get: function () { return
|
|
597
|
+
get: function () { return chunkK7JSQPZO_cjs.getContract; }
|
|
598
|
+
});
|
|
599
|
+
Object.defineProperty(exports, "getPepuAddressMap", {
|
|
600
|
+
enumerable: true,
|
|
601
|
+
get: function () { return chunkK7JSQPZO_cjs.getPepuAddressMap; }
|
|
598
602
|
});
|
|
599
603
|
Object.defineProperty(exports, "getPepuAddresses", {
|
|
600
604
|
enumerable: true,
|
|
601
|
-
get: function () { return
|
|
605
|
+
get: function () { return chunkK7JSQPZO_cjs.getPepuAddresses; }
|
|
602
606
|
});
|
|
603
607
|
Object.defineProperty(exports, "isDeployed", {
|
|
604
608
|
enumerable: true,
|
|
605
|
-
get: function () { return
|
|
609
|
+
get: function () { return chunkK7JSQPZO_cjs.isDeployed; }
|
|
606
610
|
});
|
|
607
611
|
Object.defineProperty(exports, "listContracts", {
|
|
608
612
|
enumerable: true,
|
|
609
|
-
get: function () { return
|
|
613
|
+
get: function () { return chunkK7JSQPZO_cjs.listContracts; }
|
|
610
614
|
});
|
|
611
615
|
Object.defineProperty(exports, "pepuContracts", {
|
|
612
616
|
enumerable: true,
|
|
613
|
-
get: function () { return
|
|
617
|
+
get: function () { return chunkK7JSQPZO_cjs.pepuContracts; }
|
|
614
618
|
});
|
|
615
619
|
Object.defineProperty(exports, "getPublicClient", {
|
|
616
620
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P as PepuChain } from './chains-DK13zGIp.cjs';
|
|
2
2
|
export { a as PepuChainId, i as isPepuChain, p as pepuChains, b as pepuMainnet, c as pepuTestnet } from './chains-DK13zGIp.cjs';
|
|
3
|
-
import { j as ContractEntry, D as DeployedContract } from './status-
|
|
4
|
-
export { C as CheckSponsorshipOptions, G as GetSponsorshipStatusOptions, k as PendingContract, l as PepuAddressRow, m as PepuContractName, n as PepuContractRegistry, a as PepuKernelStack, S as SponsorshipReport, c as SponsorshipStatus, d as checkSponsorship, o as getContract, g as getKernelAccountAddress, q as getPepuAddresses, f as getPepuKernelStack, h as getSponsorshipStatus,
|
|
3
|
+
import { j as ContractEntry, D as DeployedContract } from './status-wgTM26V7.cjs';
|
|
4
|
+
export { C as CheckSponsorshipOptions, G as GetSponsorshipStatusOptions, k as PendingContract, l as PepuAddressRow, m as PepuContractName, n as PepuContractRegistry, a as PepuKernelStack, S as SponsorshipReport, c as SponsorshipStatus, d as checkSponsorship, o as getContract, g as getKernelAccountAddress, q as getPepuAddressMap, r as getPepuAddresses, f as getPepuKernelStack, h as getSponsorshipStatus, s as isDeployed, t as listContracts, u as pepuContracts } from './status-wgTM26V7.cjs';
|
|
5
5
|
import { Address, Transport, PublicClient, Abi, EIP1193Provider, AddEthereumChainParameter, TransactionRequest, Hex, ContractFunctionParameters, MulticallReturnType, TypedDataDomain } from 'viem';
|
|
6
6
|
export { erc20Abi, erc721Abi } from 'viem';
|
|
7
7
|
export { B as BuildPaymasterRequestOptions, E as Erc7677UserOperation, P as PaymasterContext, a as PaymasterDataRequest, b as PaymasterDataResult, c as PaymasterRpcError, d as PaymasterRpcParams, e as PaymasterRpcResponse, f as PaymasterStubDataRequest, g as PaymasterStubDataResult, h as buildPaymasterContext, i as buildPaymasterDataRequest, j as buildPaymasterStubDataRequest } from './erc7677-DOW58QBE.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P as PepuChain } from './chains-DK13zGIp.js';
|
|
2
2
|
export { a as PepuChainId, i as isPepuChain, p as pepuChains, b as pepuMainnet, c as pepuTestnet } from './chains-DK13zGIp.js';
|
|
3
|
-
import { j as ContractEntry, D as DeployedContract } from './status-
|
|
4
|
-
export { C as CheckSponsorshipOptions, G as GetSponsorshipStatusOptions, k as PendingContract, l as PepuAddressRow, m as PepuContractName, n as PepuContractRegistry, a as PepuKernelStack, S as SponsorshipReport, c as SponsorshipStatus, d as checkSponsorship, o as getContract, g as getKernelAccountAddress, q as getPepuAddresses, f as getPepuKernelStack, h as getSponsorshipStatus,
|
|
3
|
+
import { j as ContractEntry, D as DeployedContract } from './status-Dx9zAFo9.js';
|
|
4
|
+
export { C as CheckSponsorshipOptions, G as GetSponsorshipStatusOptions, k as PendingContract, l as PepuAddressRow, m as PepuContractName, n as PepuContractRegistry, a as PepuKernelStack, S as SponsorshipReport, c as SponsorshipStatus, d as checkSponsorship, o as getContract, g as getKernelAccountAddress, q as getPepuAddressMap, r as getPepuAddresses, f as getPepuKernelStack, h as getSponsorshipStatus, s as isDeployed, t as listContracts, u as pepuContracts } from './status-Dx9zAFo9.js';
|
|
5
5
|
import { Address, Transport, PublicClient, Abi, EIP1193Provider, AddEthereumChainParameter, TransactionRequest, Hex, ContractFunctionParameters, MulticallReturnType, TypedDataDomain } from 'viem';
|
|
6
6
|
export { erc20Abi, erc721Abi } from 'viem';
|
|
7
7
|
export { B as BuildPaymasterRequestOptions, E as Erc7677UserOperation, P as PaymasterContext, a as PaymasterDataRequest, b as PaymasterDataResult, c as PaymasterRpcError, d as PaymasterRpcParams, e as PaymasterRpcResponse, f as PaymasterStubDataRequest, g as PaymasterStubDataResult, h as buildPaymasterContext, i as buildPaymasterDataRequest, j as buildPaymasterStubDataRequest } from './erc7677-DOW58QBE.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { buildPaymasterContext, buildPaymasterDataRequest, buildPaymasterStubDataRequest } from './chunk-
|
|
2
|
-
export { KERNEL_V3_1_IMPLEMENTATION_ADDRESS, checkSponsorship, entryPointV07Abi, getKernelAccountAddress, getPepuKernelStack, getSponsorshipStatus, kernelFactoryAbi } from './chunk-
|
|
1
|
+
export { buildPaymasterContext, buildPaymasterDataRequest, buildPaymasterStubDataRequest } from './chunk-7PVR7QSE.js';
|
|
2
|
+
export { KERNEL_V3_1_IMPLEMENTATION_ADDRESS, checkSponsorship, entryPointV07Abi, getKernelAccountAddress, getPepuKernelStack, getSponsorshipStatus, kernelFactoryAbi } from './chunk-F2R473FR.js';
|
|
3
3
|
import './chunk-D52PADVY.js';
|
|
4
|
-
import { getContract, isDeployed } from './chunk-
|
|
5
|
-
export { getContract, getPepuAddresses, isDeployed, listContracts, pepuContracts } from './chunk-
|
|
4
|
+
import { getContract, isDeployed } from './chunk-KJYNF5KH.js';
|
|
5
|
+
export { getContract, getPepuAddressMap, getPepuAddresses, isDeployed, listContracts, pepuContracts } from './chunk-KJYNF5KH.js';
|
|
6
6
|
export { getPublicClient } from './chunk-OH3QMAIB.js';
|
|
7
7
|
export { addressUrl, blockUrl, explorerLinks, explorerUrl, tokenUrl, txUrl } from './chunk-J6UXXHBE.js';
|
|
8
8
|
export { PEPU_ENV, PEPU_HOSTED, PEPU_PUBLIC_ENV, hostedFreeTierUrl, isHostedSponsorshipLive, paymasterBaseOf, resolvePepuEndpoints } from './chunk-XC4IBCI2.js';
|
package/dist/paymaster.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkA5LP2UCS_cjs = require('./chunk-A5LP2UCS.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkK7JSQPZO_cjs = require('./chunk-K7JSQPZO.cjs');
|
|
5
5
|
require('./chunk-VF3D6KLQ.cjs');
|
|
6
6
|
var chunkDPCZJLB3_cjs = require('./chunk-DPCZJLB3.cjs');
|
|
7
7
|
var chunkYQL7NISX_cjs = require('./chunk-YQL7NISX.cjs');
|
|
@@ -17,7 +17,7 @@ function resolvePaymasterV2Address(explicit) {
|
|
|
17
17
|
}
|
|
18
18
|
return viem.getAddress(explicit);
|
|
19
19
|
}
|
|
20
|
-
const entry =
|
|
20
|
+
const entry = chunkK7JSQPZO_cjs.getContract(chunkDPCZJLB3_cjs.pepuMainnet.id, "paymasterV2");
|
|
21
21
|
if (entry?.status === "deployed") return entry.address;
|
|
22
22
|
throw new chunkYQL7NISX_cjs.PepuConfigError(
|
|
23
23
|
"CONFIG_MISSING_ENV",
|
package/dist/paymaster.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pepuSponsoredPaymasterV2Abi } from './chunk-IY3ALPUJ.js';
|
|
2
2
|
export { PAYMASTER_DENIAL_REASONS, PAYMASTER_REASON_CODES, assertApproved, buildErc7677Url, createPaymasterApi, credentialKind, decodePaymasterRevert, hostedErc7677Url, mapPaymasterReason, paymasterReasonToError, pepuSponsoredPaymasterV2Abi, serializeAttestation } from './chunk-IY3ALPUJ.js';
|
|
3
|
-
import { getContract } from './chunk-
|
|
3
|
+
import { getContract } from './chunk-KJYNF5KH.js';
|
|
4
4
|
import './chunk-XC4IBCI2.js';
|
|
5
5
|
import { pepuMainnet } from './chunk-VTQIHMF3.js';
|
|
6
6
|
import { PepuConfigError, PepuPaymasterError } from './chunk-6DSZ4Z2N.js';
|
package/dist/privy/react.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
/* @pepu-chain/peer-guard */(function(){var p=["react","@privy-io/react-auth"];for(var i=0;i<p.length;i++){try{require.resolve(p[i])}catch(e){if(e&&e.code==="MODULE_NOT_FOUND"){var m="@pepu-chain/sdk/privy/react needs peer packages that are not installed: react @privy-io/react-auth. Install with: npm i react @privy-io/react-auth (or let create-pepu-app scaffold everything).";var x=new Error(m);x.code="PEPU_MISSING_PEER";throw x}}}})();
|
|
2
3
|
|
|
3
4
|
var chunkDH6BFNVJ_cjs = require('../chunk-DH6BFNVJ.cjs');
|
|
4
5
|
require('../chunk-NE3QKDOB.cjs');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by scripts/guard-peers.mjs. Used only under the "node" export condition.
|
|
2
|
+
const peers = ["react","@privy-io/react-auth"];
|
|
3
|
+
for (const peer of peers) {
|
|
4
|
+
try {
|
|
5
|
+
import.meta.resolve?.(peer);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
if (e && e.code === "ERR_MODULE_NOT_FOUND") {
|
|
8
|
+
const err = new Error("@pepu-chain/sdk/privy/react needs peer packages that are not installed: react @privy-io/react-auth. Install with: npm i react @privy-io/react-auth (or let create-pepu-app scaffold everything).");
|
|
9
|
+
err.code = "PEPU_MISSING_PEER";
|
|
10
|
+
throw err;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const mod = await import("./react.js");
|
|
15
|
+
export const { PepuPrivyProvider, WalletGate, composeProviders, requestEnsureWallet, shouldPinEmbeddedWallet, useEmbeddedWallet, useEnsureWallet, usePepuAuthFetch, usePinEmbeddedWallet } = mod;
|
package/dist/privy/server.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
/* @pepu-chain/peer-guard */(function(){var p=["@privy-io/node"];for(var i=0;i<p.length;i++){try{require.resolve(p[i])}catch(e){if(e&&e.code==="MODULE_NOT_FOUND"){var m="@pepu-chain/sdk/privy/server needs a peer package that is not installed: @privy-io/node. Install with: npm i @privy-io/node (or let create-pepu-app scaffold everything).";var x=new Error(m);x.code="PEPU_MISSING_PEER";throw x}}}})();
|
|
2
3
|
|
|
3
4
|
var chunk45KSZH26_cjs = require('../chunk-45KSZH26.cjs');
|
|
4
5
|
require('../chunk-SVWRRALU.cjs');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by scripts/guard-peers.mjs. Used only under the "node" export condition.
|
|
2
|
+
const peers = ["@privy-io/node"];
|
|
3
|
+
for (const peer of peers) {
|
|
4
|
+
try {
|
|
5
|
+
import.meta.resolve?.(peer);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
if (e && e.code === "ERR_MODULE_NOT_FOUND") {
|
|
8
|
+
const err = new Error("@pepu-chain/sdk/privy/server needs a peer package that is not installed: @privy-io/node. Install with: npm i @privy-io/node (or let create-pepu-app scaffold everything).");
|
|
9
|
+
err.code = "PEPU_MISSING_PEER";
|
|
10
|
+
throw err;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const mod = await import("./server.js");
|
|
15
|
+
export const { createEnsureWalletRoute, createPrivyServer, findDelegatedEthereumWallet, findEmbeddedEthereumWallet, privyEnvVar, readPrivyServerEnv, requireUser, verifyRequestUser } = mod;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by scripts/guard-peers.mjs. Used only under the "node" export condition.
|
|
2
|
+
const peers = ["react","@privy-io/react-auth","@privy-io/wagmi","wagmi","@tanstack/react-query"];
|
|
3
|
+
for (const peer of peers) {
|
|
4
|
+
try {
|
|
5
|
+
import.meta.resolve?.(peer);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
if (e && e.code === "ERR_MODULE_NOT_FOUND") {
|
|
8
|
+
const err = new Error("@pepu-chain/sdk/privy/wagmi needs peer packages that are not installed: react @privy-io/react-auth @privy-io/wagmi wagmi @tanstack/react-query. Install with: npm i react @privy-io/react-auth @privy-io/wagmi wagmi @tanstack/react-query (or let create-pepu-app scaffold everything).");
|
|
9
|
+
err.code = "PEPU_MISSING_PEER";
|
|
10
|
+
throw err;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const mod = await import("./wagmi.js");
|
|
15
|
+
export const { EMBEDDED_WALLET_IS_ACTIVE_BY_DEFAULT, PepuPrivyWagmiProvider, pepuWagmiConfig, useActiveWalletPin } = mod;
|
package/dist/react.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
/* @pepu-chain/peer-guard */(function(){var p=["react"];for(var i=0;i<p.length;i++){try{require.resolve(p[i])}catch(e){if(e&&e.code==="MODULE_NOT_FOUND"){var m="@pepu-chain/sdk/react needs a peer package that is not installed: react. Install with: npm i react (or let create-pepu-app scaffold everything).";var x=new Error(m);x.code="PEPU_MISSING_PEER";throw x}}}})();
|
|
2
3
|
|
|
3
|
-
var
|
|
4
|
+
var chunkBGALSKAF_cjs = require('./chunk-BGALSKAF.cjs');
|
|
4
5
|
require('./chunk-WANILJZQ.cjs');
|
|
5
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-K7JSQPZO.cjs');
|
|
6
7
|
require('./chunk-VF3D6KLQ.cjs');
|
|
7
8
|
var chunkDPCZJLB3_cjs = require('./chunk-DPCZJLB3.cjs');
|
|
8
9
|
require('./chunk-YQL7NISX.cjs');
|
|
@@ -60,7 +61,7 @@ function usePepuChain(chainId) {
|
|
|
60
61
|
function useSponsorshipStatus(options) {
|
|
61
62
|
const bundlerUrl = options?.bundlerUrl;
|
|
62
63
|
return react.useMemo(
|
|
63
|
-
() =>
|
|
64
|
+
() => chunkBGALSKAF_cjs.getSponsorshipStatus(bundlerUrl === void 0 ? void 0 : { bundlerUrl }),
|
|
64
65
|
[bundlerUrl]
|
|
65
66
|
);
|
|
66
67
|
}
|
package/dist/react.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Address, PublicClient, Transport } from 'viem';
|
|
2
2
|
import { P as PepuChain } from './chains-DK13zGIp.cjs';
|
|
3
|
-
import { G as GetSponsorshipStatusOptions, c as SponsorshipStatus } from './status-
|
|
3
|
+
import { G as GetSponsorshipStatusOptions, c as SponsorshipStatus } from './status-wgTM26V7.cjs';
|
|
4
4
|
import './errors-CgX1vNj7.cjs';
|
|
5
5
|
|
|
6
6
|
/** Options for {@link usePepuBalance}. */
|
package/dist/react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Address, PublicClient, Transport } from 'viem';
|
|
2
2
|
import { P as PepuChain } from './chains-DK13zGIp.js';
|
|
3
|
-
import { G as GetSponsorshipStatusOptions, c as SponsorshipStatus } from './status-
|
|
3
|
+
import { G as GetSponsorshipStatusOptions, c as SponsorshipStatus } from './status-Dx9zAFo9.js';
|
|
4
4
|
import './errors-CgX1vNj7.js';
|
|
5
5
|
|
|
6
6
|
/** Options for {@link usePepuBalance}. */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by scripts/guard-peers.mjs. Used only under the "node" export condition.
|
|
2
|
+
const peers = ["react"];
|
|
3
|
+
for (const peer of peers) {
|
|
4
|
+
try {
|
|
5
|
+
import.meta.resolve?.(peer);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
if (e && e.code === "ERR_MODULE_NOT_FOUND") {
|
|
8
|
+
const err = new Error("@pepu-chain/sdk/react needs a peer package that is not installed: react. Install with: npm i react (or let create-pepu-app scaffold everything).");
|
|
9
|
+
err.code = "PEPU_MISSING_PEER";
|
|
10
|
+
throw err;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const mod = await import("./react.js");
|
|
15
|
+
export const { usePepuBalance, usePepuChain, useSponsorshipStatus } = mod;
|
package/dist/react.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getSponsorshipStatus } from './chunk-
|
|
1
|
+
import { getSponsorshipStatus } from './chunk-F2R473FR.js';
|
|
2
2
|
import './chunk-D52PADVY.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-KJYNF5KH.js';
|
|
4
4
|
import './chunk-XC4IBCI2.js';
|
|
5
5
|
import { pepuChains } from './chunk-VTQIHMF3.js';
|
|
6
6
|
import './chunk-6DSZ4Z2N.js';
|
package/dist/session/kernel.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
/* @pepu-chain/peer-guard */(function(){var p=["@zerodev/sdk","@zerodev/permissions","@zerodev/ecdsa-validator"];for(var i=0;i<p.length;i++){try{require.resolve(p[i])}catch(e){if(e&&e.code==="MODULE_NOT_FOUND"){var m="@pepu-chain/sdk/session/kernel needs peer packages that are not installed: @zerodev/sdk @zerodev/permissions @zerodev/ecdsa-validator. Install with: npm i @zerodev/sdk @zerodev/permissions @zerodev/ecdsa-validator (or let create-pepu-app scaffold everything).";var x=new Error(m);x.code="PEPU_MISSING_PEER";throw x}}}})();
|
|
2
3
|
|
|
3
4
|
var chunkPHM3ZORG_cjs = require('../chunk-PHM3ZORG.cjs');
|
|
4
5
|
var chunkNVOPDXTA_cjs = require('../chunk-NVOPDXTA.cjs');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by scripts/guard-peers.mjs. Used only under the "node" export condition.
|
|
2
|
+
const peers = ["@zerodev/sdk","@zerodev/permissions","@zerodev/ecdsa-validator"];
|
|
3
|
+
for (const peer of peers) {
|
|
4
|
+
try {
|
|
5
|
+
import.meta.resolve?.(peer);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
if (e && e.code === "ERR_MODULE_NOT_FOUND") {
|
|
8
|
+
const err = new Error("@pepu-chain/sdk/session/kernel needs peer packages that are not installed: @zerodev/sdk @zerodev/permissions @zerodev/ecdsa-validator. Install with: npm i @zerodev/sdk @zerodev/permissions @zerodev/ecdsa-validator (or let create-pepu-app scaffold everything).");
|
|
9
|
+
err.code = "PEPU_MISSING_PEER";
|
|
10
|
+
throw err;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const mod = await import("./kernel.js");
|
|
15
|
+
export const { CALL_POLICY_V0_0_4_ADDRESS, SESSION_GAS_RESERVATION_PEPU, TIMESTAMP_POLICY_ADDRESS, approveKernelSession, buildKernelSessionPolicies, createMemoryStore, expectedPermissionId, generateSessionKey, isLive, loadKernelSessionAccount, KERNEL_VERSION, getKernelAddress, checkApproval, describeKernelSessionScope, isCallInScope, parseApproval } = mod;
|
package/dist/session/react.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
/* @pepu-chain/peer-guard */(function(){var p=["react","@privy-io/react-auth"];for(var i=0;i<p.length;i++){try{require.resolve(p[i])}catch(e){if(e&&e.code==="MODULE_NOT_FOUND"){var m="@pepu-chain/sdk/session/react needs peer packages that are not installed: react @privy-io/react-auth. Install with: npm i react @privy-io/react-auth (or let create-pepu-app scaffold everything).";var x=new Error(m);x.code="PEPU_MISSING_PEER";throw x}}}})();
|
|
2
3
|
|
|
3
4
|
var chunkR5PXQNO3_cjs = require('../chunk-R5PXQNO3.cjs');
|
|
4
5
|
require('../chunk-DH6BFNVJ.cjs');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by scripts/guard-peers.mjs. Used only under the "node" export condition.
|
|
2
|
+
const peers = ["react","@privy-io/react-auth"];
|
|
3
|
+
for (const peer of peers) {
|
|
4
|
+
try {
|
|
5
|
+
import.meta.resolve?.(peer);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
if (e && e.code === "ERR_MODULE_NOT_FOUND") {
|
|
8
|
+
const err = new Error("@pepu-chain/sdk/session/react needs peer packages that are not installed: react @privy-io/react-auth. Install with: npm i react @privy-io/react-auth (or let create-pepu-app scaffold everything).");
|
|
9
|
+
err.code = "PEPU_MISSING_PEER";
|
|
10
|
+
throw err;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const mod = await import("./react.js");
|
|
15
|
+
export const { deriveSessionState, errorFromResponse, useSessionAct, useSessionGrant, useSessionRevoke, useSessionStatus } = mod;
|
package/dist/session/server.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
/* @pepu-chain/peer-guard */(function(){var p=["@privy-io/node"];for(var i=0;i<p.length;i++){try{require.resolve(p[i])}catch(e){if(e&&e.code==="MODULE_NOT_FOUND"){var m="@pepu-chain/sdk/session/server needs a peer package that is not installed: @privy-io/node. Install with: npm i @privy-io/node (or let create-pepu-app scaffold everything).";var x=new Error(m);x.code="PEPU_MISSING_PEER";throw x}}}})();
|
|
2
3
|
|
|
3
4
|
var chunkC7IC36XS_cjs = require('../chunk-C7IC36XS.cjs');
|
|
4
5
|
var chunk4GINFJO6_cjs = require('../chunk-4GINFJO6.cjs');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by scripts/guard-peers.mjs. Used only under the "node" export condition.
|
|
2
|
+
const peers = ["@privy-io/node"];
|
|
3
|
+
for (const peer of peers) {
|
|
4
|
+
try {
|
|
5
|
+
import.meta.resolve?.(peer);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
if (e && e.code === "ERR_MODULE_NOT_FOUND") {
|
|
8
|
+
const err = new Error("@pepu-chain/sdk/session/server needs a peer package that is not installed: @privy-io/node. Install with: npm i @privy-io/node (or let create-pepu-app scaffold everything).");
|
|
9
|
+
err.code = "PEPU_MISSING_PEER";
|
|
10
|
+
throw err;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const mod = await import("./server.js");
|
|
15
|
+
export const { broadcastSignedTransaction, signAndBroadcast, withGasLimitBuffer, createSessionActionRoute, createSessionRoutes, privySessionSigner } = mod;
|
|
@@ -13,8 +13,15 @@ interface BundlerProbeResult {
|
|
|
13
13
|
ok: boolean;
|
|
14
14
|
chainId?: number;
|
|
15
15
|
entryPoints?: Address[];
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* `true` when the method exists. Each method is called with deliberately empty
|
|
18
|
+
* (invalid) params, so nothing is ever sent on-chain: an "invalid params" or
|
|
19
|
+
* validation answer means the method exists, a "method not found" answer
|
|
20
|
+
* (including Alto's "Invalid discriminator value") means it does not.
|
|
21
|
+
*/
|
|
17
22
|
supportedMethods?: Record<string, boolean>;
|
|
23
|
+
/** Required methods (see `REQUIRED_BUNDLER_METHODS`) the bundler lacks. Empty when all are present. */
|
|
24
|
+
missingRequiredMethods?: string[];
|
|
18
25
|
latencyMs: number;
|
|
19
26
|
error?: PepuBundlerError;
|
|
20
27
|
}
|
|
@@ -25,12 +32,19 @@ interface PaymasterProbeResult {
|
|
|
25
32
|
/** Body of `GET <origin>/v2/free-tier` when the service exposes it. */
|
|
26
33
|
freeTier?: unknown;
|
|
27
34
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* credential, so
|
|
35
|
+
* `true` when the URL answered `pm_getPaymasterStubData` with a stub result,
|
|
36
|
+
* `false` when it did not answer JSON-RPC at all. A JSON-RPC denial (no
|
|
37
|
+
* credential, unknown sender) leaves it `undefined`: the endpoint speaks
|
|
38
|
+
* ERC-7677 but the probe has no credential, so a stub cannot be judged. Read
|
|
39
|
+
* `erc7677` for the three-way answer.
|
|
32
40
|
*/
|
|
33
41
|
erc7677StubOk?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* `"stub-ok"`: a stub came back. `"needs-credential"`: the endpoint speaks ERC-7677
|
|
44
|
+
* JSON-RPC and answered with an error (no credential, unknown sender), so the stub
|
|
45
|
+
* check is not applicable without a client token. `"not-responding"`: no JSON-RPC answer.
|
|
46
|
+
*/
|
|
47
|
+
erc7677?: "stub-ok" | "needs-credential" | "not-responding";
|
|
34
48
|
latencyMs: number;
|
|
35
49
|
error?: PepuBundlerError;
|
|
36
50
|
}
|
|
@@ -50,8 +64,10 @@ declare function probeBundler(url: string, o?: ProbeOptions): Promise<BundlerPro
|
|
|
50
64
|
* Probe a paymaster URL: the service base (`https://paymaster.pepeunchained.com`) or the ERC-7677 endpoint
|
|
51
65
|
* (`https://host/v2/paymaster/<token>`).
|
|
52
66
|
* Checks `GET <origin>/health`, `GET <origin>/v2/free-tier`, and whether the URL
|
|
53
|
-
* answers JSON-RPC `pm_getPaymasterStubData
|
|
54
|
-
*
|
|
67
|
+
* answers JSON-RPC `pm_getPaymasterStubData` (`erc7677`: without a client token a
|
|
68
|
+
* JSON-RPC denial is reported as `"needs-credential"`, not as a failure). `ok` means
|
|
69
|
+
* every capability that could be checked is fine: `/health` did not fail and the URL
|
|
70
|
+
* spoke ERC-7677 JSON-RPC. The URL (which can embed a
|
|
55
71
|
* token) never appears in the returned error.
|
|
56
72
|
*
|
|
57
73
|
* @example
|
|
@@ -153,15 +169,31 @@ interface PepuAddressRow {
|
|
|
153
169
|
}
|
|
154
170
|
/**
|
|
155
171
|
* The full supporting-contract table for a chain, flattened for docs and
|
|
156
|
-
* MCP rendering.
|
|
172
|
+
* MCP rendering. **Returns an ARRAY of rows** (one {@link PepuAddressRow} per
|
|
173
|
+
* contract, each carrying its own `key`), not an object keyed by contract name:
|
|
174
|
+
* `getPepuAddresses().paymaster` is `undefined`. To look one contract up by name use
|
|
175
|
+
* {@link getContract}, or {@link getPepuAddressMap} for the same rows keyed by name.
|
|
176
|
+
* Pending entries carry no `address`.
|
|
157
177
|
*
|
|
158
178
|
* @example
|
|
159
179
|
* ```ts
|
|
160
|
-
* const rows = getPepuAddresses(); // mainnet by default
|
|
180
|
+
* const rows = getPepuAddresses(); // PepuAddressRow[], mainnet by default
|
|
161
181
|
* const live = rows.filter((r) => r.status === "deployed");
|
|
182
|
+
* const paymaster = rows.find((r) => r.key === "paymaster");
|
|
162
183
|
* ```
|
|
163
184
|
*/
|
|
164
185
|
declare function getPepuAddresses(chainId?: number): readonly PepuAddressRow[];
|
|
186
|
+
/**
|
|
187
|
+
* The same rows as {@link getPepuAddresses}, keyed by contract name instead of
|
|
188
|
+
* returned as an array. An unknown chain yields an empty object.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```ts
|
|
192
|
+
* const map = getPepuAddressMap();
|
|
193
|
+
* map.paymaster?.address; // Address | undefined
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
declare function getPepuAddressMap(chainId?: number): Partial<Record<PepuContractName, PepuAddressRow>>;
|
|
165
197
|
|
|
166
198
|
/**
|
|
167
199
|
* The account-abstraction contracts a Kernel v3 smart account needs,
|
|
@@ -292,4 +324,4 @@ interface CheckSponsorshipOptions {
|
|
|
292
324
|
*/
|
|
293
325
|
declare function checkSponsorship(options?: CheckSponsorshipOptions): Promise<SponsorshipReport>;
|
|
294
326
|
|
|
295
|
-
export { type BundlerProbeResult as B, type CheckSponsorshipOptions as C, type DeployedContract as D, type FetchLike as F, type GetSponsorshipStatusOptions as G, type PaymasterProbeResult as P, type SponsorshipReport as S, type PepuKernelStack as a, type ProbeOptions as b, type SponsorshipStatus as c, checkSponsorship as d, getPaymasterDeposit as e, getPepuKernelStack as f, getKernelAccountAddress as g, getSponsorshipStatus as h, probePaymaster as i, type ContractEntry as j, type PendingContract as k, type PepuAddressRow as l, type PepuContractName as m, type PepuContractRegistry as n, getContract as o, probeBundler as p,
|
|
327
|
+
export { type BundlerProbeResult as B, type CheckSponsorshipOptions as C, type DeployedContract as D, type FetchLike as F, type GetSponsorshipStatusOptions as G, type PaymasterProbeResult as P, type SponsorshipReport as S, type PepuKernelStack as a, type ProbeOptions as b, type SponsorshipStatus as c, checkSponsorship as d, getPaymasterDeposit as e, getPepuKernelStack as f, getKernelAccountAddress as g, getSponsorshipStatus as h, probePaymaster as i, type ContractEntry as j, type PendingContract as k, type PepuAddressRow as l, type PepuContractName as m, type PepuContractRegistry as n, getContract as o, probeBundler as p, getPepuAddressMap as q, getPepuAddresses as r, isDeployed as s, listContracts as t, pepuContracts as u };
|
|
@@ -13,8 +13,15 @@ interface BundlerProbeResult {
|
|
|
13
13
|
ok: boolean;
|
|
14
14
|
chainId?: number;
|
|
15
15
|
entryPoints?: Address[];
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* `true` when the method exists. Each method is called with deliberately empty
|
|
18
|
+
* (invalid) params, so nothing is ever sent on-chain: an "invalid params" or
|
|
19
|
+
* validation answer means the method exists, a "method not found" answer
|
|
20
|
+
* (including Alto's "Invalid discriminator value") means it does not.
|
|
21
|
+
*/
|
|
17
22
|
supportedMethods?: Record<string, boolean>;
|
|
23
|
+
/** Required methods (see `REQUIRED_BUNDLER_METHODS`) the bundler lacks. Empty when all are present. */
|
|
24
|
+
missingRequiredMethods?: string[];
|
|
18
25
|
latencyMs: number;
|
|
19
26
|
error?: PepuBundlerError;
|
|
20
27
|
}
|
|
@@ -25,12 +32,19 @@ interface PaymasterProbeResult {
|
|
|
25
32
|
/** Body of `GET <origin>/v2/free-tier` when the service exposes it. */
|
|
26
33
|
freeTier?: unknown;
|
|
27
34
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* credential, so
|
|
35
|
+
* `true` when the URL answered `pm_getPaymasterStubData` with a stub result,
|
|
36
|
+
* `false` when it did not answer JSON-RPC at all. A JSON-RPC denial (no
|
|
37
|
+
* credential, unknown sender) leaves it `undefined`: the endpoint speaks
|
|
38
|
+
* ERC-7677 but the probe has no credential, so a stub cannot be judged. Read
|
|
39
|
+
* `erc7677` for the three-way answer.
|
|
32
40
|
*/
|
|
33
41
|
erc7677StubOk?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* `"stub-ok"`: a stub came back. `"needs-credential"`: the endpoint speaks ERC-7677
|
|
44
|
+
* JSON-RPC and answered with an error (no credential, unknown sender), so the stub
|
|
45
|
+
* check is not applicable without a client token. `"not-responding"`: no JSON-RPC answer.
|
|
46
|
+
*/
|
|
47
|
+
erc7677?: "stub-ok" | "needs-credential" | "not-responding";
|
|
34
48
|
latencyMs: number;
|
|
35
49
|
error?: PepuBundlerError;
|
|
36
50
|
}
|
|
@@ -50,8 +64,10 @@ declare function probeBundler(url: string, o?: ProbeOptions): Promise<BundlerPro
|
|
|
50
64
|
* Probe a paymaster URL: the service base (`https://paymaster.pepeunchained.com`) or the ERC-7677 endpoint
|
|
51
65
|
* (`https://host/v2/paymaster/<token>`).
|
|
52
66
|
* Checks `GET <origin>/health`, `GET <origin>/v2/free-tier`, and whether the URL
|
|
53
|
-
* answers JSON-RPC `pm_getPaymasterStubData
|
|
54
|
-
*
|
|
67
|
+
* answers JSON-RPC `pm_getPaymasterStubData` (`erc7677`: without a client token a
|
|
68
|
+
* JSON-RPC denial is reported as `"needs-credential"`, not as a failure). `ok` means
|
|
69
|
+
* every capability that could be checked is fine: `/health` did not fail and the URL
|
|
70
|
+
* spoke ERC-7677 JSON-RPC. The URL (which can embed a
|
|
55
71
|
* token) never appears in the returned error.
|
|
56
72
|
*
|
|
57
73
|
* @example
|
|
@@ -153,15 +169,31 @@ interface PepuAddressRow {
|
|
|
153
169
|
}
|
|
154
170
|
/**
|
|
155
171
|
* The full supporting-contract table for a chain, flattened for docs and
|
|
156
|
-
* MCP rendering.
|
|
172
|
+
* MCP rendering. **Returns an ARRAY of rows** (one {@link PepuAddressRow} per
|
|
173
|
+
* contract, each carrying its own `key`), not an object keyed by contract name:
|
|
174
|
+
* `getPepuAddresses().paymaster` is `undefined`. To look one contract up by name use
|
|
175
|
+
* {@link getContract}, or {@link getPepuAddressMap} for the same rows keyed by name.
|
|
176
|
+
* Pending entries carry no `address`.
|
|
157
177
|
*
|
|
158
178
|
* @example
|
|
159
179
|
* ```ts
|
|
160
|
-
* const rows = getPepuAddresses(); // mainnet by default
|
|
180
|
+
* const rows = getPepuAddresses(); // PepuAddressRow[], mainnet by default
|
|
161
181
|
* const live = rows.filter((r) => r.status === "deployed");
|
|
182
|
+
* const paymaster = rows.find((r) => r.key === "paymaster");
|
|
162
183
|
* ```
|
|
163
184
|
*/
|
|
164
185
|
declare function getPepuAddresses(chainId?: number): readonly PepuAddressRow[];
|
|
186
|
+
/**
|
|
187
|
+
* The same rows as {@link getPepuAddresses}, keyed by contract name instead of
|
|
188
|
+
* returned as an array. An unknown chain yields an empty object.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```ts
|
|
192
|
+
* const map = getPepuAddressMap();
|
|
193
|
+
* map.paymaster?.address; // Address | undefined
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
declare function getPepuAddressMap(chainId?: number): Partial<Record<PepuContractName, PepuAddressRow>>;
|
|
165
197
|
|
|
166
198
|
/**
|
|
167
199
|
* The account-abstraction contracts a Kernel v3 smart account needs,
|
|
@@ -292,4 +324,4 @@ interface CheckSponsorshipOptions {
|
|
|
292
324
|
*/
|
|
293
325
|
declare function checkSponsorship(options?: CheckSponsorshipOptions): Promise<SponsorshipReport>;
|
|
294
326
|
|
|
295
|
-
export { type BundlerProbeResult as B, type CheckSponsorshipOptions as C, type DeployedContract as D, type FetchLike as F, type GetSponsorshipStatusOptions as G, type PaymasterProbeResult as P, type SponsorshipReport as S, type PepuKernelStack as a, type ProbeOptions as b, type SponsorshipStatus as c, checkSponsorship as d, getPaymasterDeposit as e, getPepuKernelStack as f, getKernelAccountAddress as g, getSponsorshipStatus as h, probePaymaster as i, type ContractEntry as j, type PendingContract as k, type PepuAddressRow as l, type PepuContractName as m, type PepuContractRegistry as n, getContract as o, probeBundler as p,
|
|
327
|
+
export { type BundlerProbeResult as B, type CheckSponsorshipOptions as C, type DeployedContract as D, type FetchLike as F, type GetSponsorshipStatusOptions as G, type PaymasterProbeResult as P, type SponsorshipReport as S, type PepuKernelStack as a, type ProbeOptions as b, type SponsorshipStatus as c, checkSponsorship as d, getPaymasterDeposit as e, getPepuKernelStack as f, getKernelAccountAddress as g, getSponsorshipStatus as h, probePaymaster as i, type ContractEntry as j, type PendingContract as k, type PepuAddressRow as l, type PepuContractName as m, type PepuContractRegistry as n, getContract as o, probeBundler as p, getPepuAddressMap as q, getPepuAddresses as r, isDeployed as s, listContracts as t, pepuContracts as u };
|