@phantom/react-native-sdk 0.1.2 → 0.1.3

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
@@ -293,9 +293,11 @@ var import_crypto = require("@phantom/crypto");
293
293
  var import_base64url = require("@phantom/base64url");
294
294
  var import_sdk_types = require("@phantom/sdk-types");
295
295
  var ReactNativeStamper = class {
296
+ // Optional for PKI, required for OIDC
296
297
  constructor(config = {}) {
297
298
  this.keyInfo = null;
298
299
  this.algorithm = import_sdk_types.Algorithm.ed25519;
300
+ this.type = "PKI";
299
301
  this.keyPrefix = config.keyPrefix || "phantom-rn-stamper";
300
302
  this.organizationId = config.organizationId || "default";
301
303
  }
@@ -332,10 +334,10 @@ var ReactNativeStamper = class {
332
334
  }
333
335
  /**
334
336
  * Create X-Phantom-Stamp header value using stored secret key
335
- * @param data - Data to sign (Buffer)
337
+ * @param params - Parameters object with data to sign and optional override params
336
338
  * @returns Complete X-Phantom-Stamp header value
337
339
  */
338
- async stamp({ data }) {
340
+ async stamp(params) {
339
341
  if (!this.keyInfo) {
340
342
  throw new Error("Stamper not initialized. Call init() first.");
341
343
  }
@@ -344,7 +346,7 @@ var ReactNativeStamper = class {
344
346
  throw new Error("Secret key not found in secure storage");
345
347
  }
346
348
  const apiKeyStamper = new import_api_key_stamper.ApiKeyStamper({ apiSecretKey: storedSecretKey });
347
- return await apiKeyStamper.stamp({ data });
349
+ return await apiKeyStamper.stamp(params);
348
350
  }
349
351
  /**
350
352
  * Clear all stored keys from SecureStore
package/dist/index.mjs CHANGED
@@ -249,9 +249,11 @@ import { generateKeyPair } from "@phantom/crypto";
249
249
  import { base64urlEncode } from "@phantom/base64url";
250
250
  import { Algorithm } from "@phantom/sdk-types";
251
251
  var ReactNativeStamper = class {
252
+ // Optional for PKI, required for OIDC
252
253
  constructor(config = {}) {
253
254
  this.keyInfo = null;
254
255
  this.algorithm = Algorithm.ed25519;
256
+ this.type = "PKI";
255
257
  this.keyPrefix = config.keyPrefix || "phantom-rn-stamper";
256
258
  this.organizationId = config.organizationId || "default";
257
259
  }
@@ -288,10 +290,10 @@ var ReactNativeStamper = class {
288
290
  }
289
291
  /**
290
292
  * Create X-Phantom-Stamp header value using stored secret key
291
- * @param data - Data to sign (Buffer)
293
+ * @param params - Parameters object with data to sign and optional override params
292
294
  * @returns Complete X-Phantom-Stamp header value
293
295
  */
294
- async stamp({ data }) {
296
+ async stamp(params) {
295
297
  if (!this.keyInfo) {
296
298
  throw new Error("Stamper not initialized. Call init() first.");
297
299
  }
@@ -300,7 +302,7 @@ var ReactNativeStamper = class {
300
302
  throw new Error("Secret key not found in secure storage");
301
303
  }
302
304
  const apiKeyStamper = new ApiKeyStamper({ apiSecretKey: storedSecretKey });
303
- return await apiKeyStamper.stamp({ data });
305
+ return await apiKeyStamper.stamp(params);
304
306
  }
305
307
  /**
306
308
  * Clear all stored keys from SecureStore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phantom/react-native-sdk",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Phantom Wallet SDK for React Native and Expo applications",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -45,13 +45,13 @@
45
45
  "directory": "packages/react-native-sdk"
46
46
  },
47
47
  "dependencies": {
48
- "@phantom/api-key-stamper": "^0.1.3",
48
+ "@phantom/api-key-stamper": "^0.1.4",
49
49
  "@phantom/base64url": "^0.1.0",
50
- "@phantom/client": "^0.1.6",
50
+ "@phantom/client": "^0.1.7",
51
51
  "@phantom/constants": "^0.0.2",
52
52
  "@phantom/crypto": "^0.1.2",
53
- "@phantom/embedded-provider-core": "^0.1.3",
54
- "@phantom/sdk-types": "^0.1.2",
53
+ "@phantom/embedded-provider-core": "^0.1.4",
54
+ "@phantom/sdk-types": "^0.1.3",
55
55
  "@types/bs58": "^5.0.0",
56
56
  "bs58": "^6.0.0",
57
57
  "buffer": "^6.0.3"