@sudobility/contracts 1.17.17 → 1.17.19

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.
Files changed (2) hide show
  1. package/README.md +8 -5
  2. package/package.json +2 -3
package/README.md CHANGED
@@ -122,13 +122,16 @@ await client.claimRevenue();
122
122
  ### Solana
123
123
 
124
124
  ```typescript
125
- import { OnchainMailerClient } from '@johnqh/mail_box_contracts';
126
- import { Keypair } from '@solana/web3.js';
127
- import { Wallet } from '@coral-xyz/anchor';
125
+ import { OnchainMailerClient, Wallet } from '@johnqh/mail_box_contracts';
126
+ import { Keypair, Transaction } from '@solana/web3.js';
128
127
 
129
- // The unified client automatically detects Solana wallets
128
+ // Create a wallet from keypair
130
129
  const keypair = Keypair.generate();
131
- const wallet = new Wallet(keypair);
130
+ const wallet: Wallet = {
131
+ publicKey: keypair.publicKey,
132
+ signTransaction: async (tx) => { tx.partialSign(keypair); return tx; },
133
+ signAllTransactions: async (txs) => { txs.forEach(tx => tx.partialSign(keypair)); return txs; },
134
+ };
132
135
 
133
136
  const client = new OnchainMailerClient(wallet, SOLANA_CHAIN_CONFIG);
134
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudobility/contracts",
3
- "version": "1.17.17",
3
+ "version": "1.17.19",
4
4
  "type": "module",
5
5
  "main": "dist/unified/src/unified/index.js",
6
6
  "types": "dist/unified/src/unified/index.d.ts",
@@ -200,7 +200,6 @@
200
200
  "registry": "https://registry.npmjs.org"
201
201
  },
202
202
  "devDependencies": {
203
- "@coral-xyz/anchor": "^0.32.1",
204
203
  "@nomicfoundation/hardhat-chai-matchers": "^2.0.0",
205
204
  "@nomicfoundation/hardhat-verify": "^2.0.0",
206
205
  "@nomicfoundation/hardhat-viem": "^2.0.0",
@@ -234,7 +233,7 @@
234
233
  "viem": "^2.38.4"
235
234
  },
236
235
  "dependencies": {
237
- "@sudobility/configs": "^0.0.32",
236
+ "@sudobility/configs": "^0.0.34",
238
237
  "@sudobility/types": "^1.9.18"
239
238
  },
240
239
  "overrides": {