@phantom/api-key-stamper 1.0.0 → 1.0.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.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import * as _phantom_sdk_types from '@phantom/sdk-types';
2
+ import { Stamper } from '@phantom/sdk-types';
1
3
  import { Buffer } from 'buffer';
2
- import { Stamper, Algorithm } from '@phantom/sdk-types';
3
4
 
4
5
  interface ApiKeyStamperConfig {
5
6
  apiSecretKey: string;
@@ -9,7 +10,7 @@ interface ApiKeyStamperConfig {
9
10
  * Does not manage keys - just signs with the provided secret key
10
11
  */
11
12
  declare class ApiKeyStamper implements Stamper {
12
- algorithm: Algorithm;
13
+ readonly algorithm: _phantom_sdk_types.Algorithm;
13
14
  type: "PKI" | "OIDC";
14
15
  idToken?: string;
15
16
  salt?: string;
package/dist/index.js CHANGED
@@ -36,10 +36,10 @@ module.exports = __toCommonJS(src_exports);
36
36
  var import_base64url = require("@phantom/base64url");
37
37
  var import_crypto = require("@phantom/crypto");
38
38
  var import_bs58 = __toESM(require("bs58"));
39
- var import_sdk_types = require("@phantom/sdk-types");
39
+ var import_constants = require("@phantom/constants");
40
40
  var ApiKeyStamper = class {
41
41
  constructor(config) {
42
- this.algorithm = import_sdk_types.Algorithm.ed25519;
42
+ this.algorithm = import_constants.DEFAULT_AUTHENTICATOR_ALGORITHM;
43
43
  // Use the same algorithm as the keypair
44
44
  this.type = "PKI";
45
45
  this.keypair = (0, import_crypto.createKeyPairFromSecret)(config.apiSecretKey);
package/dist/index.mjs CHANGED
@@ -2,10 +2,10 @@
2
2
  import { base64urlEncode } from "@phantom/base64url";
3
3
  import { createKeyPairFromSecret, signWithSecret } from "@phantom/crypto";
4
4
  import bs58 from "bs58";
5
- import { Algorithm } from "@phantom/sdk-types";
5
+ import { DEFAULT_AUTHENTICATOR_ALGORITHM } from "@phantom/constants";
6
6
  var ApiKeyStamper = class {
7
7
  constructor(config) {
8
- this.algorithm = Algorithm.ed25519;
8
+ this.algorithm = DEFAULT_AUTHENTICATOR_ALGORITHM;
9
9
  // Use the same algorithm as the keypair
10
10
  this.type = "PKI";
11
11
  this.keypair = createKeyPairFromSecret(config.apiSecretKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phantom/api-key-stamper",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "API key stamper for Phantom Wallet SDK",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,9 +42,10 @@
42
42
  "typescript": "^5.0.4"
43
43
  },
44
44
  "dependencies": {
45
- "@phantom/base64url": "^1.0.0",
46
- "@phantom/crypto": "^1.0.0",
47
- "@phantom/sdk-types": "^1.0.0",
45
+ "@phantom/base64url": "^1.0.3",
46
+ "@phantom/constants": "^1.0.3",
47
+ "@phantom/crypto": "^1.0.3",
48
+ "@phantom/sdk-types": "^1.0.3",
48
49
  "axios": "^1.10.0",
49
50
  "bs58": "^6.0.0",
50
51
  "buffer": "^6.0.3"