@atomiqlabs/chain-solana 10.0.0-dev.7 → 10.0.0-dev.9

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.
@@ -39,6 +39,7 @@ export declare class SolanaChainInterface implements ChainInterface<SolanaTx, So
39
39
  constructor(connection: Connection, retryPolicy?: SolanaRetryPolicy, solanaFeeEstimator?: SolanaFees);
40
40
  getBalance(signer: string, tokenAddress: string): Promise<bigint>;
41
41
  isValidAddress(address: string): boolean;
42
+ normalizeAddress(address: string): string;
42
43
  getNativeCurrencyAddress(): string;
43
44
  txsTransfer(signer: string, token: string, amount: bigint, dstAddress: string, feeRate?: string): Promise<SolanaTx[]>;
44
45
  transfer(signer: SolanaSigner, token: string, amount: bigint, dstAddress: string, txOptions?: TransactionConfirmationOptions): Promise<string>;
@@ -45,6 +45,9 @@ class SolanaChainInterface {
45
45
  isValidAddress(address) {
46
46
  return SolanaAddresses_1.SolanaAddresses.isValidAddress(address);
47
47
  }
48
+ normalizeAddress(address) {
49
+ return address;
50
+ }
48
51
  getNativeCurrencyAddress() {
49
52
  return this.Tokens.getNativeCurrencyAddress().toString();
50
53
  }
@@ -2,6 +2,7 @@ import { Wallet } from "@coral-xyz/anchor/dist/cjs/provider";
2
2
  import { AbstractSigner } from "@atomiqlabs/base";
3
3
  import { PublicKey, Signer } from "@solana/web3.js";
4
4
  export declare class SolanaSigner implements AbstractSigner {
5
+ type: "AtomiqAbstractSigner";
5
6
  wallet: Wallet;
6
7
  keypair?: Signer;
7
8
  constructor(wallet: Wallet, keypair?: Signer);
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SolanaSigner = void 0;
4
4
  class SolanaSigner {
5
5
  constructor(wallet, keypair) {
6
+ this.type = "AtomiqAbstractSigner";
6
7
  this.wallet = wallet;
7
8
  this.keypair = keypair;
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/chain-solana",
3
- "version": "10.0.0-dev.7",
3
+ "version": "10.0.0-dev.9",
4
4
  "description": "Solana specific base implementation",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "author": "adambor",
23
23
  "license": "ISC",
24
24
  "dependencies": {
25
- "@atomiqlabs/base": "^10.0.0-dev.15",
25
+ "@atomiqlabs/base": "^10.0.0-dev.18",
26
26
  "@noble/hashes": "^1.7.1",
27
27
  "bn.js": "5.2.1",
28
28
  "bs58": "4.0.1",
@@ -80,6 +80,10 @@ export class SolanaChainInterface implements ChainInterface<
80
80
  return SolanaAddresses.isValidAddress(address);
81
81
  }
82
82
 
83
+ normalizeAddress(address: string): string {
84
+ return address;
85
+ }
86
+
83
87
  getNativeCurrencyAddress(): string {
84
88
  return this.Tokens.getNativeCurrencyAddress().toString();
85
89
  }
@@ -3,6 +3,7 @@ import {AbstractSigner} from "@atomiqlabs/base";
3
3
  import {PublicKey, Signer} from "@solana/web3.js";
4
4
 
5
5
  export class SolanaSigner implements AbstractSigner {
6
+ type = "AtomiqAbstractSigner" as const;
6
7
 
7
8
  wallet: Wallet;
8
9
  keypair?: Signer;