@proofchain/sdk 2.11.0 → 2.12.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/index.js CHANGED
@@ -879,7 +879,7 @@ var WalletClient = class {
879
879
  /**
880
880
  * Bulk create dual wallets for multiple users
881
881
  */
882
- async createDualBulk(userIds, network = "base-sepolia") {
882
+ async createDualBulk(userIds, network = "base-mainnet") {
883
883
  return this.http.post("/wallets/dual/bulk", {
884
884
  user_ids: userIds,
885
885
  network
@@ -1274,7 +1274,7 @@ var EndUsersClient = class {
1274
1274
  * const result = await client.users.ensureWallet('user-123', 'base-mainnet');
1275
1275
  * ```
1276
1276
  */
1277
- async ensureWallet(externalId, network = "base-sepolia") {
1277
+ async ensureWallet(externalId, network = "base-mainnet") {
1278
1278
  const existingWallets = await this.http.get(
1279
1279
  `/wallets/user/${encodeURIComponent(externalId)}`
1280
1280
  );
@@ -1290,6 +1290,35 @@ var EndUsersClient = class {
1290
1290
  created: false
1291
1291
  };
1292
1292
  }
1293
+ if (eoa && !smart) {
1294
+ const smartWallet = await this.http.post("/wallets", {
1295
+ user_id: externalId,
1296
+ wallet_type: "smart",
1297
+ network: eoa.network,
1298
+ metadata: { owner_wallet_id: eoa.wallet_id }
1299
+ });
1300
+ return {
1301
+ user_id: externalId,
1302
+ asset_wallet: eoa,
1303
+ smart_wallet: smartWallet,
1304
+ network: eoa.network,
1305
+ created: true
1306
+ };
1307
+ }
1308
+ if (smart && !eoa) {
1309
+ const eoaWallet = await this.http.post("/wallets", {
1310
+ user_id: externalId,
1311
+ wallet_type: "eoa",
1312
+ network: smart.network
1313
+ });
1314
+ return {
1315
+ user_id: externalId,
1316
+ asset_wallet: eoaWallet,
1317
+ smart_wallet: smart,
1318
+ network: smart.network,
1319
+ created: true
1320
+ };
1321
+ }
1293
1322
  }
1294
1323
  const dual = await this.http.post("/wallets/dual", {
1295
1324
  user_id: externalId,
package/dist/index.mjs CHANGED
@@ -825,7 +825,7 @@ var WalletClient = class {
825
825
  /**
826
826
  * Bulk create dual wallets for multiple users
827
827
  */
828
- async createDualBulk(userIds, network = "base-sepolia") {
828
+ async createDualBulk(userIds, network = "base-mainnet") {
829
829
  return this.http.post("/wallets/dual/bulk", {
830
830
  user_ids: userIds,
831
831
  network
@@ -1220,7 +1220,7 @@ var EndUsersClient = class {
1220
1220
  * const result = await client.users.ensureWallet('user-123', 'base-mainnet');
1221
1221
  * ```
1222
1222
  */
1223
- async ensureWallet(externalId, network = "base-sepolia") {
1223
+ async ensureWallet(externalId, network = "base-mainnet") {
1224
1224
  const existingWallets = await this.http.get(
1225
1225
  `/wallets/user/${encodeURIComponent(externalId)}`
1226
1226
  );
@@ -1236,6 +1236,35 @@ var EndUsersClient = class {
1236
1236
  created: false
1237
1237
  };
1238
1238
  }
1239
+ if (eoa && !smart) {
1240
+ const smartWallet = await this.http.post("/wallets", {
1241
+ user_id: externalId,
1242
+ wallet_type: "smart",
1243
+ network: eoa.network,
1244
+ metadata: { owner_wallet_id: eoa.wallet_id }
1245
+ });
1246
+ return {
1247
+ user_id: externalId,
1248
+ asset_wallet: eoa,
1249
+ smart_wallet: smartWallet,
1250
+ network: eoa.network,
1251
+ created: true
1252
+ };
1253
+ }
1254
+ if (smart && !eoa) {
1255
+ const eoaWallet = await this.http.post("/wallets", {
1256
+ user_id: externalId,
1257
+ wallet_type: "eoa",
1258
+ network: smart.network
1259
+ });
1260
+ return {
1261
+ user_id: externalId,
1262
+ asset_wallet: eoaWallet,
1263
+ smart_wallet: smart,
1264
+ network: smart.network,
1265
+ created: true
1266
+ };
1267
+ }
1239
1268
  }
1240
1269
  const dual = await this.http.post("/wallets/dual", {
1241
1270
  user_id: externalId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proofchain/sdk",
3
- "version": "2.11.0",
3
+ "version": "2.12.0",
4
4
  "description": "Official JavaScript/TypeScript SDK for ProofChain - blockchain-anchored document attestation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",