@getpara/core-sdk 2.0.0-alpha.26 → 2.0.0-alpha.28

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.
@@ -1704,7 +1704,7 @@ const _ParaCore = class _ParaCore {
1704
1704
  return __async(this, null, function* () {
1705
1705
  var _l = _k, {
1706
1706
  method,
1707
- deeplinkUrl,
1707
+ appScheme,
1708
1708
  isCanceled = () => false,
1709
1709
  onCancel,
1710
1710
  onPoll,
@@ -1712,7 +1712,7 @@ const _ParaCore = class _ParaCore {
1712
1712
  isLinkAccount
1713
1713
  } = _l, urlOptions = __objRest(_l, [
1714
1714
  "method",
1715
- "deeplinkUrl",
1715
+ "appScheme",
1716
1716
  "isCanceled",
1717
1717
  "onCancel",
1718
1718
  "onPoll",
@@ -1727,7 +1727,7 @@ const _ParaCore = class _ParaCore {
1727
1727
  } else {
1728
1728
  sessionLookupId = yield __privateMethod(this, _ParaCore_instances, prepareLogin_fn).call(this);
1729
1729
  }
1730
- const oAuthUrl = yield __privateMethod(this, _ParaCore_instances, getOAuthUrl_fn).call(this, { method, deeplinkUrl, sessionLookupId, accountLinkInProgress });
1730
+ const oAuthUrl = yield __privateMethod(this, _ParaCore_instances, getOAuthUrl_fn).call(this, { method, appScheme, sessionLookupId, accountLinkInProgress });
1731
1731
  onOAuthUrl(oAuthUrl);
1732
1732
  } else {
1733
1733
  ({ sessionLookupId } = yield this.touchSession());
@@ -3142,11 +3142,11 @@ getOAuthUrl_fn = function(_i) {
3142
3142
  return __async(this, null, function* () {
3143
3143
  var _j = _i, {
3144
3144
  method,
3145
- deeplinkUrl,
3145
+ appScheme,
3146
3146
  accountLinkInProgress
3147
3147
  } = _j, params = __objRest(_j, [
3148
3148
  "method",
3149
- "deeplinkUrl",
3149
+ "appScheme",
3150
3150
  "accountLinkInProgress"
3151
3151
  ]);
3152
3152
  var _a;
@@ -3157,7 +3157,7 @@ getOAuthUrl_fn = function(_i) {
3157
3157
  params: __spreadValues({
3158
3158
  apiKey: this.ctx.apiKey,
3159
3159
  sessionLookupId,
3160
- deeplinkUrl
3160
+ appScheme
3161
3161
  }, accountLinkInProgress ? {
3162
3162
  linkedAccountId: this.accountLinkInProgress.id
3163
3163
  } : {})
@@ -40,7 +40,7 @@ __export(constants_exports, {
40
40
  SHORT_POLLING_INTERVAL_MS: () => SHORT_POLLING_INTERVAL_MS
41
41
  });
42
42
  module.exports = __toCommonJS(constants_exports);
43
- const PARA_CORE_VERSION = "2.0.0-alpha.25";
43
+ const PARA_CORE_VERSION = "2.0.0-alpha.28";
44
44
  const PREFIX = "@CAPSULE/";
45
45
  const LOCAL_STORAGE_AUTH_INFO = `${PREFIX}authInfo`;
46
46
  const LOCAL_STORAGE_EMAIL = `${PREFIX}e-mail`;
@@ -1670,7 +1670,7 @@ const _ParaCore = class _ParaCore {
1670
1670
  return __async(this, null, function* () {
1671
1671
  var _l = _k, {
1672
1672
  method,
1673
- deeplinkUrl,
1673
+ appScheme,
1674
1674
  isCanceled = () => false,
1675
1675
  onCancel,
1676
1676
  onPoll,
@@ -1678,7 +1678,7 @@ const _ParaCore = class _ParaCore {
1678
1678
  isLinkAccount
1679
1679
  } = _l, urlOptions = __objRest(_l, [
1680
1680
  "method",
1681
- "deeplinkUrl",
1681
+ "appScheme",
1682
1682
  "isCanceled",
1683
1683
  "onCancel",
1684
1684
  "onPoll",
@@ -1693,7 +1693,7 @@ const _ParaCore = class _ParaCore {
1693
1693
  } else {
1694
1694
  sessionLookupId = yield __privateMethod(this, _ParaCore_instances, prepareLogin_fn).call(this);
1695
1695
  }
1696
- const oAuthUrl = yield __privateMethod(this, _ParaCore_instances, getOAuthUrl_fn).call(this, { method, deeplinkUrl, sessionLookupId, accountLinkInProgress });
1696
+ const oAuthUrl = yield __privateMethod(this, _ParaCore_instances, getOAuthUrl_fn).call(this, { method, appScheme, sessionLookupId, accountLinkInProgress });
1697
1697
  onOAuthUrl(oAuthUrl);
1698
1698
  } else {
1699
1699
  ({ sessionLookupId } = yield this.touchSession());
@@ -3108,11 +3108,11 @@ getOAuthUrl_fn = function(_i) {
3108
3108
  return __async(this, null, function* () {
3109
3109
  var _j = _i, {
3110
3110
  method,
3111
- deeplinkUrl,
3111
+ appScheme,
3112
3112
  accountLinkInProgress
3113
3113
  } = _j, params = __objRest(_j, [
3114
3114
  "method",
3115
- "deeplinkUrl",
3115
+ "appScheme",
3116
3116
  "accountLinkInProgress"
3117
3117
  ]);
3118
3118
  var _a;
@@ -3123,7 +3123,7 @@ getOAuthUrl_fn = function(_i) {
3123
3123
  params: __spreadValues({
3124
3124
  apiKey: this.ctx.apiKey,
3125
3125
  sessionLookupId,
3126
- deeplinkUrl
3126
+ appScheme
3127
3127
  }, accountLinkInProgress ? {
3128
3128
  linkedAccountId: this.accountLinkInProgress.id
3129
3129
  } : {})
@@ -1,5 +1,5 @@
1
1
  import "./chunk-7B52C2XE.js";
2
- const PARA_CORE_VERSION = "2.0.0-alpha.25";
2
+ const PARA_CORE_VERSION = "2.0.0-alpha.28";
3
3
  const PREFIX = "@CAPSULE/";
4
4
  const LOCAL_STORAGE_AUTH_INFO = `${PREFIX}authInfo`;
5
5
  const LOCAL_STORAGE_EMAIL = `${PREFIX}e-mail`;
@@ -140,7 +140,7 @@ export declare abstract class ParaCore implements CoreInterface {
140
140
  * Remove all local storage and prefixed session storage.
141
141
  * @param {'local' | 'session' | 'secure' | 'all'} type - Type of storage to clear. Defaults to 'all'.
142
142
  */
143
- clearStorage: (type?: CoreMethodParams<'clearStorage'>) => CoreMethodResponse<'clearStorage'>;
143
+ clearStorage: (type?: CoreMethodParams<"clearStorage">) => CoreMethodResponse<"clearStorage">;
144
144
  private convertBigInt;
145
145
  private convertEncryptionKeyPair;
146
146
  private isPortal;
@@ -308,7 +308,7 @@ export declare abstract class ParaCore implements CoreInterface {
308
308
  */
309
309
  findWalletByAddress(address: string, filter?: WalletFilters | undefined): any;
310
310
  findWallet(idOrAddress?: string, overrideType?: TWalletType, filter?: WalletFilters): Omit<Wallet, 'signer'> | undefined;
311
- get availableWallets(): Pick<Wallet, 'id' | 'type' | 'name' | 'address' | 'isExternal' | 'externalProviderId'>[];
311
+ get availableWallets(): Pick<Wallet, 'id' | 'type' | 'name' | 'address' | 'isExternal' | 'externalProviderId' | 'isExternalConnectionOnly'>[];
312
312
  /**
313
313
  * Retrieves all usable wallets with the provided type (`'EVM' | 'COSMOS' | 'SOLANA'`)
314
314
  * @param {string} type the wallet type to filter by.
@@ -498,7 +498,7 @@ export declare abstract class ParaCore implements CoreInterface {
498
498
  *
499
499
  * @deprecated alias for `createWalletPerType`
500
500
  **/
501
- createWalletPerMissingType: ({ skipDistribute, types, }?: CoreMethodParams<'createWalletPerType'>) => CoreMethodResponse<'createWalletPerType'>;
501
+ createWalletPerMissingType: ({ skipDistribute, types, }?: CoreMethodParams<"createWalletPerType">) => CoreMethodResponse<"createWalletPerType">;
502
502
  /**
503
503
  * Creates several new wallets with the desired types. If no types are provided, this method
504
504
  * will create one for each of the non-optional types specified in the instance's `supportedWalletTypes`
@@ -590,7 +590,7 @@ export declare abstract class ParaCore implements CoreInterface {
590
590
  setUserShare(base64Wallets: CoreMethodParams<'setUserShare'>): CoreMethodResponse<'setUserShare'>;
591
591
  private getTransactionReviewUrl;
592
592
  private getOnRampTransactionUrl;
593
- getWalletBalance: ({ walletId, rpcUrl, }: CoreMethodParams<'getWalletBalance'>) => CoreMethodResponse<'getWalletBalance'>;
593
+ getWalletBalance: ({ walletId, rpcUrl, }: CoreMethodParams<"getWalletBalance">) => CoreMethodResponse<"getWalletBalance">;
594
594
  /**
595
595
  * Signs a message using one of the current wallets.
596
596
  *
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { BackupKitEmailProps, TPregenIdentifierType, TWalletType, SDKType } from '@getpara/user-management-client';
4
2
  import { Ctx, PopupType, SignatureRes } from './types/index.js';
5
3
  import { StorageUtils } from './StorageUtils.js';
@@ -1,19 +1,19 @@
1
1
  export declare const PARA_CORE_VERSION: string;
2
2
  export declare const PREFIX = "@CAPSULE/";
3
- export declare const LOCAL_STORAGE_AUTH_INFO: string;
4
- export declare const LOCAL_STORAGE_EMAIL: string;
5
- export declare const LOCAL_STORAGE_PHONE: string;
6
- export declare const LOCAL_STORAGE_COUNTRY_CODE: string;
7
- export declare const LOCAL_STORAGE_FARCASTER_USERNAME: string;
8
- export declare const LOCAL_STORAGE_TELEGRAM_USER_ID: string;
9
- export declare const LOCAL_STORAGE_EXTERNAL_WALLET_USER_ID: string;
10
- export declare const LOCAL_STORAGE_USER_ID: string;
11
- export declare const LOCAL_STORAGE_ED25519_WALLETS: string;
12
- export declare const LOCAL_STORAGE_WALLETS: string;
13
- export declare const LOCAL_STORAGE_EXTERNAL_WALLETS: string;
14
- export declare const LOCAL_STORAGE_CURRENT_WALLET_IDS: string;
15
- export declare const LOCAL_STORAGE_SESSION_COOKIE: string;
16
- export declare const SESSION_STORAGE_LOGIN_ENCRYPTION_KEY_PAIR: string;
3
+ export declare const LOCAL_STORAGE_AUTH_INFO = "@CAPSULE/authInfo";
4
+ export declare const LOCAL_STORAGE_EMAIL = "@CAPSULE/e-mail";
5
+ export declare const LOCAL_STORAGE_PHONE = "@CAPSULE/phone";
6
+ export declare const LOCAL_STORAGE_COUNTRY_CODE = "@CAPSULE/countryCode";
7
+ export declare const LOCAL_STORAGE_FARCASTER_USERNAME = "@CAPSULE/farcasterUsername";
8
+ export declare const LOCAL_STORAGE_TELEGRAM_USER_ID = "@CAPSULE/telegramUserId";
9
+ export declare const LOCAL_STORAGE_EXTERNAL_WALLET_USER_ID = "@CAPSULE/externalWalletUserId";
10
+ export declare const LOCAL_STORAGE_USER_ID = "@CAPSULE/userId";
11
+ export declare const LOCAL_STORAGE_ED25519_WALLETS = "@CAPSULE/ed25519Wallets";
12
+ export declare const LOCAL_STORAGE_WALLETS = "@CAPSULE/wallets";
13
+ export declare const LOCAL_STORAGE_EXTERNAL_WALLETS = "@CAPSULE/externalWallets";
14
+ export declare const LOCAL_STORAGE_CURRENT_WALLET_IDS = "@CAPSULE/currentWalletIds";
15
+ export declare const LOCAL_STORAGE_SESSION_COOKIE = "@CAPSULE/sessionCookie";
16
+ export declare const SESSION_STORAGE_LOGIN_ENCRYPTION_KEY_PAIR = "@CAPSULE/loginEncryptionKeyPair";
17
17
  export declare const POLLING_INTERVAL_MS = 2000;
18
18
  export declare const SHORT_POLLING_INTERVAL_MS = 1000;
19
19
  export declare const POLLING_TIMEOUT_MS = 300000;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  export declare class KeyContainer {
4
2
  walletId: string;
5
3
  keyshare: string;
@@ -98,9 +98,9 @@ export type OAuthUrlParams = {
98
98
  */
99
99
  method: Exclude<TOAuthMethod, 'TELEGRAM' | 'FARCASTER'>;
100
100
  /**
101
- * The deeplink URL to redirect to after OAuth is complete.
101
+ * The app scheme to redirect to after OAuth is complete.
102
102
  */
103
- deeplinkUrl?: string;
103
+ appScheme?: string;
104
104
  };
105
105
  export type OAuthParams = OAuthUrlParams & PollParams & {
106
106
  /**
package/package.json CHANGED
@@ -1,39 +1,21 @@
1
1
  {
2
2
  "name": "@getpara/core-sdk",
3
- "version": "2.0.0-alpha.26",
4
- "main": "dist/cjs/index.js",
5
- "module": "dist/esm/index.js",
6
- "types": "dist/types/index.d.ts",
7
- "typings": "dist/types/index.d.ts",
8
- "sideEffects": false,
3
+ "version": "2.0.0-alpha.28",
9
4
  "dependencies": {
10
5
  "@celo/utils": "^8.0.2",
11
6
  "@cosmjs/encoding": "^0.32.4",
12
7
  "@ethereumjs/util": "^9.1.0",
13
- "@getpara/user-management-client": "2.0.0-alpha.26",
8
+ "@getpara/user-management-client": "2.0.0-alpha.28",
14
9
  "@noble/hashes": "^1.5.0",
15
10
  "base64url": "^3.0.1",
16
- "libphonenumber-js": "1.11.2",
11
+ "libphonenumber-js": "^1.11.7",
17
12
  "node-forge": "^1.3.1",
18
13
  "uuid": "^11.1.0"
19
14
  },
20
- "scripts": {
21
- "build": "rm -rf dist && node ./scripts/build.mjs && yarn build:types",
22
- "old-build": "yarn build:cjs && yarn build:esm && yarn build:types; yarn post-build",
23
- "post-build": "./scripts/set-version.sh",
24
- "build:cjs": "rm -rf dist/cjs && tsc --module commonjs --outDir dist/cjs && printf '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
25
- "build:esm": "rm -rf dist/esm && tsc --module es6 --outDir dist/esm && printf '{\"type\":\"module\",\"sideEffects\":false}' > dist/esm/package.json",
26
- "build:types": "rm -rf dist/types && tsc --module es6 --declarationDir dist/types --emitDeclarationOnly --declaration",
27
- "test": "vitest run --coverage"
28
- },
29
15
  "devDependencies": {
30
16
  "@faker-js/faker": "^9.5.1",
31
- "typescript": "5.1.6"
17
+ "typescript": "^5.8.3"
32
18
  },
33
- "files": [
34
- "dist",
35
- "package.json"
36
- ],
37
19
  "exports": {
38
20
  ".": {
39
21
  "types": "./dist/types/index.d.ts",
@@ -41,5 +23,23 @@
41
23
  "require": "./dist/cjs/index.js"
42
24
  }
43
25
  },
44
- "gitHead": "c97be88dd7414041f25d6f4b9758ea26dcfb2694"
26
+ "files": [
27
+ "dist",
28
+ "package.json"
29
+ ],
30
+ "gitHead": "1da9f8663f58015a70686f45741fb76ddc671ac7",
31
+ "main": "dist/cjs/index.js",
32
+ "module": "dist/esm/index.js",
33
+ "scripts": {
34
+ "build": "rm -rf dist && node ./scripts/build.mjs && yarn build:types",
35
+ "build:cjs": "rm -rf dist/cjs && tsc --module commonjs --outDir dist/cjs && printf '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
36
+ "build:esm": "rm -rf dist/esm && tsc --module es6 --outDir dist/esm && printf '{\"type\":\"module\",\"sideEffects\":false}' > dist/esm/package.json",
37
+ "build:types": "rm -rf dist/types && tsc --module es6 --declarationDir dist/types --emitDeclarationOnly --declaration",
38
+ "old-build": "yarn build:cjs && yarn build:esm && yarn build:types; yarn post-build",
39
+ "post-build": "./scripts/set-version.sh",
40
+ "test": "vitest run --coverage"
41
+ },
42
+ "sideEffects": false,
43
+ "types": "dist/types/index.d.ts",
44
+ "typings": "dist/types/index.d.ts"
45
45
  }