@zebec-network/zebec-stream-sdk 1.7.0 → 1.7.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.
@@ -1,17 +1,17 @@
1
- import { Address, AnchorProvider, web3 } from "@coral-xyz/anchor";
2
- import { ConfirmOptions, PublicKey } from "@solana/web3.js";
1
+ import { Address, AnchorProvider } from "@coral-xyz/anchor";
2
+ import { ConfirmOptions, Connection, PublicKey, Transaction, VersionedTransaction } from "@solana/web3.js";
3
3
  export declare class ReadonlyProvider {
4
- readonly connection: web3.Connection;
4
+ readonly connection: Connection;
5
5
  readonly walletAddress?: PublicKey;
6
- constructor(connection: web3.Connection, walletAddress?: Address);
6
+ constructor(connection: Connection, walletAddress?: Address);
7
7
  }
8
- export declare function createReadonlyProvider(connection: web3.Connection, walletAddress?: Address): ReadonlyProvider;
8
+ export declare function createReadonlyProvider(connection: Connection, walletAddress?: Address): ReadonlyProvider;
9
9
  /**
10
10
  * Wallet interface used by Anchor Framework
11
11
  */
12
12
  export interface AnchorWallet {
13
- signTransaction: <T extends web3.Transaction | web3.VersionedTransaction>(tx: T) => Promise<T>;
14
- signAllTransactions: <T extends web3.Transaction | web3.VersionedTransaction>(txs: T[]) => Promise<T[]>;
13
+ signTransaction: <T extends Transaction | VersionedTransaction>(tx: T) => Promise<T>;
14
+ signAllTransactions: <T extends Transaction | VersionedTransaction>(txs: T[]) => Promise<T[]>;
15
15
  publicKey: PublicKey;
16
16
  }
17
- export declare function createAnchorProvider(connection: web3.Connection, wallet: AnchorWallet, options?: ConfirmOptions): AnchorProvider;
17
+ export declare function createAnchorProvider(connection: Connection, wallet: AnchorWallet, options?: ConfirmOptions): AnchorProvider;
@@ -1,5 +1,5 @@
1
- import { Address, BN, Program, Provider, web3 } from "@coral-xyz/anchor";
2
- import { Commitment, Keypair, PublicKey, TransactionInstruction } from "@solana/web3.js";
1
+ import { Address, BN, Program, Provider } from "@coral-xyz/anchor";
2
+ import { Commitment, Connection, Keypair, PublicKey, TransactionInstruction } from "@solana/web3.js";
3
3
  import { TransactionPayload } from "@zebec-network/solana-common";
4
4
  import { ZebecStreamIdl } from "../artifacts";
5
5
  import { Numeric, StreamConfigInfo, StreamMetadataInfo, TokenMetadata } from "../types";
@@ -10,7 +10,7 @@ export declare class ZebecStreamService {
10
10
  constructor(provider: Provider, network: "mainnet-beta" | "devnet", program: Program<ZebecStreamIdl>);
11
11
  static create(provider: Provider, network: "mainnet-beta" | "devnet"): ZebecStreamService;
12
12
  private _createPayload;
13
- get connection(): web3.Connection;
13
+ get connection(): Connection;
14
14
  get programId(): PublicKey;
15
15
  getInitializeStreamConfigInstruction(admin: PublicKey, config: {
16
16
  baseFee: BN;
@@ -433,7 +433,7 @@ class ZebecStreamService {
433
433
  isPausable: Boolean(metadataInfo.permissions.isPausable),
434
434
  rateUpdatable: Boolean(metadataInfo.permissions.rateUpdatable),
435
435
  },
436
- streamName: anchor_1.utils.bytes.utf8.decode(Uint8Array.from(metadataInfo.streamName)),
436
+ streamName: anchor_1.utils.bytes.utf8.decode(Uint8Array.from(metadataInfo.streamName).filter((byte) => byte !== 0)), // Remove padding zeros
437
437
  };
438
438
  }
439
439
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zebec-network/zebec-stream-sdk",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "This is an SDK for interacting with ZEBEC Stream Program in solana",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,17 +14,17 @@
14
14
  "clean": "rimraf ./dist",
15
15
  "format": "prettier --write .",
16
16
  "start": "ts-node src/index.ts",
17
- "test": "ts-mocha -p ./tsconfig.json -t 1000000000 test/**/*.spec.ts",
17
+ "test": "ts-mocha -p ./tsconfig.json -t 1000000000 test/**/*.test.ts",
18
18
  "test:single": "ts-mocha -p ./tsconfig.json -t 1000000000"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/bn.js": "^5.2.0",
22
22
  "@types/mocha": "^10.0.10",
23
23
  "@types/node": "^24.3.1",
24
- "dotenv": "^17.2.2",
25
- "mocha": "^11.7.2",
26
- "prettier": "^3.6.2",
27
- "rimraf": "^6.0.1",
24
+ "dotenv": "^17.2.3",
25
+ "mocha": "^11.7.5",
26
+ "prettier": "^3.7.4",
27
+ "rimraf": "^6.1.2",
28
28
  "ts-mocha": "^11.1.0",
29
29
  "ts-node": "^10.9.2",
30
30
  "typescript": "^5.9.2"
@@ -36,9 +36,9 @@
36
36
  "@metaplex-foundation/umi-bundle-defaults": "^1.4.1",
37
37
  "@metaplex-foundation/umi-web3js-adapters": "^1.4.1",
38
38
  "@solana/spl-token": "^0.4.14",
39
- "@solana/web3.js": "^1.98.4",
39
+ "@solana/web3.js": "^1.98.2",
40
40
  "@zebec-network/core-utils": "^1.1.1",
41
- "@zebec-network/solana-common": "^2.1.1",
41
+ "@zebec-network/solana-common": "^2.2.0",
42
42
  "bignumber.js": "^9.3.1"
43
43
  }
44
44
  }