@ardrive/turbo-sdk 1.27.0-alpha.1 → 1.27.0-alpha.2

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.
@@ -314072,7 +314072,7 @@ var import_winston = __toESM(require_winston(), 1);
314072
314072
  init_dirname();
314073
314073
  init_buffer2();
314074
314074
  init_process2();
314075
- var version16 = "1.26.0";
314075
+ var version16 = "1.27.0-alpha.1";
314076
314076
 
314077
314077
  // src/common/logger.ts
314078
314078
  var TurboWinstonLogger = class _TurboWinstonLogger {
@@ -368145,15 +368145,24 @@ var TurboBaseFactory = class {
368145
368145
  token = token === "pol" ? "matic" : token;
368146
368146
  if (!token) {
368147
368147
  if (providedSigner) {
368148
- if (providedSigner instanceof EthereumSigner) {
368149
- token = "ethereum";
368150
- } else if (providedSigner instanceof HexSolanaSigner2) {
368151
- token = "solana";
368152
- } else {
368153
- token = "arweave";
368148
+ switch (providedSigner.signatureType) {
368149
+ case SignatureConfig.ETHEREUM:
368150
+ case SignatureConfig.TYPEDETHEREUM:
368151
+ token = "ethereum";
368152
+ break;
368153
+ case SignatureConfig.SOLANA:
368154
+ case SignatureConfig.ED25519:
368155
+ token = "solana";
368156
+ break;
368157
+ case SignatureConfig.ARWEAVE:
368158
+ token = "arweave";
368159
+ break;
368160
+ case SignatureConfig.KYVE:
368161
+ token = "kyve";
368162
+ break;
368163
+ default:
368164
+ break;
368154
368165
  }
368155
- } else {
368156
- token = "arweave";
368157
368166
  }
368158
368167
  }
368159
368168
  token ??= "arweave";
@@ -55,18 +55,24 @@ class TurboBaseFactory {
55
55
  if (!token) {
56
56
  if (providedSigner) {
57
57
  // Derive token from signer if not provided
58
- if (providedSigner instanceof arbundles_1.EthereumSigner) {
59
- token = 'ethereum';
58
+ switch (providedSigner.signatureType) {
59
+ case arbundles_1.SignatureConfig.ETHEREUM:
60
+ case arbundles_1.SignatureConfig.TYPEDETHEREUM:
61
+ token = 'ethereum';
62
+ break;
63
+ case arbundles_1.SignatureConfig.SOLANA:
64
+ case arbundles_1.SignatureConfig.ED25519:
65
+ token = 'solana';
66
+ break;
67
+ case arbundles_1.SignatureConfig.ARWEAVE:
68
+ token = 'arweave';
69
+ break;
70
+ case arbundles_1.SignatureConfig.KYVE:
71
+ token = 'kyve';
72
+ break;
73
+ default:
74
+ break;
60
75
  }
61
- else if (providedSigner instanceof arbundles_1.HexSolanaSigner) {
62
- token = 'solana';
63
- }
64
- else {
65
- token = 'arweave';
66
- }
67
- }
68
- else {
69
- token = 'arweave';
70
76
  }
71
77
  }
72
78
  token ??= 'arweave'; // default to arweave if token is not provided
@@ -17,4 +17,4 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.version = void 0;
19
19
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
20
- exports.version = '1.27.0-alpha.1';
20
+ exports.version = '1.27.0-alpha.2';
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { EthereumSigner, HexInjectedSolanaSigner, HexSolanaSigner, InjectedEthereumSigner, } from '@dha-team/arbundles';
16
+ import { HexInjectedSolanaSigner, InjectedEthereumSigner, SignatureConfig, } from '@dha-team/arbundles';
17
17
  import { isEthereumWalletAdapter, isSolanaWalletAdapter, } from '../types.js';
18
18
  import { TurboWinstonLogger } from './logger.js';
19
19
  import { TurboAuthenticatedPaymentService, TurboUnauthenticatedPaymentService, } from './payment.js';
@@ -52,18 +52,24 @@ export class TurboBaseFactory {
52
52
  if (!token) {
53
53
  if (providedSigner) {
54
54
  // Derive token from signer if not provided
55
- if (providedSigner instanceof EthereumSigner) {
56
- token = 'ethereum';
55
+ switch (providedSigner.signatureType) {
56
+ case SignatureConfig.ETHEREUM:
57
+ case SignatureConfig.TYPEDETHEREUM:
58
+ token = 'ethereum';
59
+ break;
60
+ case SignatureConfig.SOLANA:
61
+ case SignatureConfig.ED25519:
62
+ token = 'solana';
63
+ break;
64
+ case SignatureConfig.ARWEAVE:
65
+ token = 'arweave';
66
+ break;
67
+ case SignatureConfig.KYVE:
68
+ token = 'kyve';
69
+ break;
70
+ default:
71
+ break;
57
72
  }
58
- else if (providedSigner instanceof HexSolanaSigner) {
59
- token = 'solana';
60
- }
61
- else {
62
- token = 'arweave';
63
- }
64
- }
65
- else {
66
- token = 'arweave';
67
73
  }
68
74
  }
69
75
  token ??= 'arweave'; // default to arweave if token is not provided
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
17
- export const version = '1.27.0-alpha.1';
17
+ export const version = '1.27.0-alpha.2';
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/common/factory.ts"],"names":[],"mappings":"AAsBA,OAAO,EACL,oBAAoB,EAEpB,+BAA+B,EAC/B,4CAA4C,EAC5C,wCAAwC,EACxC,iCAAiC,EAIlC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAKjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAGpB,8BAAsB,gBAAgB;IACpC,SAAS,CAAC,MAAM,CAAC,MAAM,qBAA8B;IAGrD,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM;IAKhC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM;IAIlC,MAAM,CAAC,eAAe,CAAC,EACrB,oBAAyB,EACzB,mBAAwB,EACxB,KAAK,GACN,GAAE,iCAAsC;IAqBzC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,EAC3B,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,MAAM,EACN,KAAK,GACN,EAAE,oBAAoB,GAAG,2BAA2B;IAErD,SAAS,CAAC,QAAQ,CAAC,6BAA6B,CAC9C,MAAM,EAA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AAyB,EACzB,mBAAwB,EACxB,KAAK,EACL,UAAU,EACV,QAAQ,EACR,UAAU,EACV,MAAM,EACN,aAAa,EACb,SAAS,EACT,KAAK,GACN,EAAE,+BAA+B,GAAG;QAAE,MAAM,EAAE,kBAAkB,CAAA;KAAE;IA4EnE,OAAO,CAAC,iBAAiB;CAuB1B"}
@@ -13,5 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "1.26.0";
16
+ export declare const version = "1.27.0-alpha.1";
17
17
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ardrive/turbo-sdk",
3
- "version": "1.27.0-alpha.1",
3
+ "version": "1.27.0-alpha.2",
4
4
  "main": "./lib/cjs/node/index.js",
5
5
  "types": "./lib/types/node/index.d.ts",
6
6
  "module": "./lib/esm/node/index.js",