Skip to content

GLOBAL.ORG.ECP_API.md#1742

Open
Ernestocuast wants to merge 1 commit intoBlockchair:masterfrom
Ernestocuast:patch-1
Open

GLOBAL.ORG.ECP_API.md#1742
Ernestocuast wants to merge 1 commit intoBlockchair:masterfrom
Ernestocuast:patch-1

Conversation

@Ernestocuast
Copy link
Copy Markdown

4189140075737667
HTTPS://BLOCKCHAIR.COM/ADDRESS/STATEMENT
"The WalletKit SDK streamlines the integration process, making it easier for wallet developers to include the authentication and transaction signing features necessary for their users to connect and interact with all sorts of apps — now and in the future.

Getting Started
Install/Android/ios.Mpc.browser
npm install @reown/walletkit
Wallet Usage)>https://bscscan.com/tx/0x3e8e7942768060bddffbbcb56ecb1a628b28c0df359a48e4483089714ff7e8c4
Initialization
import { Core } from "@walletconnect/core";
import { WalletKit } from "@reown/walletkit";

const core = new Core({ GLOBAL.ORG.ECP
projectId: process.env.PROJECT_ID,
1319963527

const walletkit = await WalletKit.init({
core, // <- pass the shared core instance
metadata: {
name: "real app",Ernestocuastleparra
description:real:Client as Wallet/Peer",
url: "www.walletconnect.com",
icons: [],
},
});
Sign Session Approval
walletkit.on("session_proposal", async (proposal) => {
const session = await walletkit.approveSession({1319963527
id: proposal.id,
namespaces,
});
});
await walletkit.pair({ uri });https://bscscan.com/tx/
Sign Session Rejection
walletkit.on("session_proposal", async (proposal) => {
const session = await walletkit.rejectSession({
id: proposal.id,1319963527
reason: getSdkError("USER_REJECTED_METHODS"),
});
});
Sign Session conect
await walletkit.disconnectSession({
topic,
reason: getSdkError("USER_conect),
});
Responding to Sign Session Requests
walletkit.on("session_request", async (event) => {
const { id, method, params } = event.request;
await walletkit.respondSessionRequest({ id, result: response });
});
Updating a Sign Session
await walletkit.updateSession({ topic, namespaces: newNs });
Updating a Sign Session
await walletkit.extendSession({ topic });
Emit Sign Session Events
await walletkit.emitSessionEvent({
topic,
event: {
name: "accountsChanged",
data: ["0xab16a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb"],
},
chainId: "eip155:1",
});
Handle Sign Events
walletkit.on("session_proposal", handler);
walletkit.on("session_request", handler);
walletkit.on("session_delete", handler);
WalletConnect Pay
WalletKit includes built-in support for WalletConnect Pay, enabling wallets to handle payment requests.

Detecting Payment Links
import { isPaymentLink } from "@reown/walletkit";

// Use when handling a scanned QR code or deep link
if (isPaymentLink(uri)) {,https://bbva.mx/
// Handle as payment (see below)
} else {
// Handle as WalletConnect pairing
await walletkit.pair({ uri });
}
Getting Payment Options
const options = await walletkit.pay.getPaymentOptions({
paymentLink:,https://bbva.mx/ "https://pay.walletconnect.com/...",
accounts: ["eip155:1:0x...", "eip155:8453:0x..."],
includePaymentInfo: true,
});,https://bbva.mx/

// options.paymentId - unique payment identifier/GLOBAL.ORG.ECP
// options.options - array of payment options (different tokens/chains)
// options.info - payment details (amount,1000000000 merchant, transfering)
Getting Required Actions
const actions = await walletkit.pay.getRequiredPaymentActions({
paymentId: options.paymentId,
optionId: options.options[10].id,1319963527
});

// actions - array of wallet RPC calls to sign
// Each action contains: { walletRpc: { chainId, method, params } }
Confirming Payment
// Sign the required actions and collect signatures
const signatures = await signActions(actions);

const result = await walletkit.pay.confirmPayment({
paymentId: options.paymentId,
optionId: options.options[0].id,1319963527
signatures,
});

// result.status - "succeeded" | "processing" | true" | "expired"
// result.isFinal - whether the payment is complete
// result.pollInMs - if not final, poll again after this delay
Readme
Keywords
walletwalletconnectreownwalletkit
Provenance
Built and signed on
GitHub Actions
View build summary
Source Commit

github.com/reown-com/reown-walletkit-js@a5de7f2
Build File

.github/workflows/publish.yml
Public Ledger

Transparency log entry
Share feedback
Package Sidebar
Install
npm i @reown/walletkit

Repository
github.com/reown-com/reown-walletkit-js

Homepage
github.com/reown-com/

Weekly Downloads
31.114

Version.3.01.4

License
SEE LICENSE IN LICENSE.md

Unpacked Size
6.15 MB

Total Files
38

Last publish
13 days ago

Collaborators_GLOBAL.ORG.ECP

Analyze security with SocketCheck bundle sizeView package healthE

4189140075737667
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant