@block52/poker-vm-sdk 1.2.15 → 1.2.16
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/index.d.ts +9 -2
- package/dist/index.esm.js +18 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/signingClient.d.ts +9 -2
- package/dist/signingClient.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -46446,9 +46446,16 @@ declare class SigningCosmosClient extends CosmosClient {
|
|
|
46446
46446
|
*/
|
|
46447
46447
|
joinGame(gameId: string, seat: number, buyInAmount: bigint): Promise<string>;
|
|
46448
46448
|
/**
|
|
46449
|
-
* Leave a poker game
|
|
46449
|
+
* Leave a poker game (signs AND broadcasts MsgLeaveGame directly).
|
|
46450
|
+
*
|
|
46451
|
+
* @param gameId the game to leave / claim from.
|
|
46452
|
+
* @param finishingOrder place-1-first player addresses for an SNG that
|
|
46453
|
+
* finalized off-chain (WS-first) — lets the chain recompute payouts when
|
|
46454
|
+
* its Results are empty. Defaults to `[]` (cash games / already-finalized
|
|
46455
|
+
* SNGs, where the chain settles from its own state). Broadcast counterpart
|
|
46456
|
+
* of {@link signLeaveGame}.
|
|
46450
46457
|
*/
|
|
46451
|
-
leaveGame(gameId: string): Promise<string>;
|
|
46458
|
+
leaveGame(gameId: string, finishingOrder?: string[]): Promise<string>;
|
|
46452
46459
|
/**
|
|
46453
46460
|
* Record a hand-end game-state snapshot on the chain (pokerchain#239).
|
|
46454
46461
|
*
|
package/dist/index.esm.js
CHANGED
|
@@ -61053,19 +61053,33 @@ class SigningCosmosClient extends CosmosClient {
|
|
|
61053
61053
|
}
|
|
61054
61054
|
}
|
|
61055
61055
|
/**
|
|
61056
|
-
* Leave a poker game
|
|
61056
|
+
* Leave a poker game (signs AND broadcasts MsgLeaveGame directly).
|
|
61057
|
+
*
|
|
61058
|
+
* @param gameId the game to leave / claim from.
|
|
61059
|
+
* @param finishingOrder place-1-first player addresses for an SNG that
|
|
61060
|
+
* finalized off-chain (WS-first) — lets the chain recompute payouts when
|
|
61061
|
+
* its Results are empty. Defaults to `[]` (cash games / already-finalized
|
|
61062
|
+
* SNGs, where the chain settles from its own state). Broadcast counterpart
|
|
61063
|
+
* of {@link signLeaveGame}.
|
|
61057
61064
|
*/
|
|
61058
|
-
async leaveGame(gameId) {
|
|
61065
|
+
async leaveGame(gameId, finishingOrder = []) {
|
|
61059
61066
|
await this.initializeSigningClient();
|
|
61060
61067
|
if (!this.signingClient || !this.wallet) {
|
|
61061
61068
|
throw new Error("Signing client not initialized");
|
|
61062
61069
|
}
|
|
61063
61070
|
const [account] = await this.wallet.getAccounts();
|
|
61064
61071
|
const creator = account.address;
|
|
61065
|
-
// Create the message object
|
|
61072
|
+
// Create the message object.
|
|
61073
|
+
//
|
|
61074
|
+
// finishingOrder (place-1-first player addresses) is for an SNG that
|
|
61075
|
+
// finalized off-chain (WS-first): the chain's Results may be empty, so
|
|
61076
|
+
// the message supplies the ORDER and the chain recomputes payouts from
|
|
61077
|
+
// its own prize-pool math — never an amount. Empty for cash games and
|
|
61078
|
+
// for SNGs the chain already finalized. Mirrors signLeaveGame. (pokerchain#229)
|
|
61066
61079
|
const msgLeaveGame = {
|
|
61067
61080
|
creator,
|
|
61068
|
-
gameId
|
|
61081
|
+
gameId,
|
|
61082
|
+
finishingOrder
|
|
61069
61083
|
};
|
|
61070
61084
|
// Create the transaction message
|
|
61071
61085
|
const msg = {
|