@clonegod/ttd-sui-common 1.0.11 → 1.0.13

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.
@@ -42,13 +42,7 @@ class GrpcConnection {
42
42
  this.channel = null;
43
43
  this.endpoint = grpc_endpoint;
44
44
  this.metadata = new grpc.Metadata();
45
- if (grpc_endpoint.includes('quiknode')) {
46
- this.metadata.add('authorization', `Bearer ${grpc_token}`);
47
- this.metadata.add('x-api-key', grpc_token);
48
- }
49
- else {
50
- this.metadata.add('x-token', grpc_token);
51
- }
45
+ this.metadata.add('x-token', grpc_token);
52
46
  }
53
47
  static getInstance(grpc_endpoint, grpc_token) {
54
48
  if (!GrpcConnection.instance) {
@@ -3,5 +3,5 @@ export declare class TransactionService {
3
3
  private transactionClient;
4
4
  private connection;
5
5
  constructor(connection: GrpcConnection);
6
- executeTransaction(serializedTransaction: string, signatureBytes: string, publickeyBytes: string, fields?: string[]): Promise<unknown>;
6
+ executeTransaction(transactionBytes: Uint8Array, signatureBytes: Uint8Array, fields?: string[]): Promise<unknown>;
7
7
  }
@@ -15,20 +15,21 @@ class TransactionService {
15
15
  this.connection = connection;
16
16
  this.transactionClient = connection.createServiceClient('transaction_execution_service.proto', 'TransactionExecutionService');
17
17
  }
18
- executeTransaction(serializedTransaction_1, signatureBytes_1, publickeyBytes_1) {
19
- return __awaiter(this, arguments, void 0, function* (serializedTransaction, signatureBytes, publickeyBytes, fields = ['transaction', 'finality']) {
18
+ executeTransaction(transactionBytes_1, signatureBytes_1) {
19
+ return __awaiter(this, arguments, void 0, function* (transactionBytes, signatureBytes, fields = ['transaction', 'finality', 'effects']) {
20
20
  return new Promise((resolve, reject) => {
21
21
  const request = {
22
22
  transaction: {
23
23
  bcs: {
24
- bytes: Buffer.from(serializedTransaction, 'base64')
24
+ value: transactionBytes
25
25
  }
26
26
  },
27
27
  signatures: [
28
28
  {
29
29
  scheme: 0,
30
- signature: Buffer.from(signatureBytes, 'base64'),
31
- public_key: Buffer.from(publickeyBytes, 'base64')
30
+ bcs: {
31
+ value: signatureBytes
32
+ }
32
33
  }
33
34
  ],
34
35
  read_mask: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sui-common",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Sui common library",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",