signet.js 0.0.12-beta.1 → 0.0.12-beta.10
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.
- package/browser/index.browser.cjs +2 -2
- package/browser/index.browser.cjs.map +1 -1
- package/browser/index.browser.js +2 -2
- package/browser/index.browser.js.map +1 -1
- package/node/index.node.cjs +2 -2
- package/node/index.node.cjs.map +1 -1
- package/node/index.node.js +2 -2
- package/node/index.node.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.cts +14 -8
- package/types/index.d.ts +14 -8
package/package.json
CHANGED
package/types/index.d.cts
CHANGED
|
@@ -2,14 +2,14 @@ import BN from 'bn.js';
|
|
|
2
2
|
import { TransactionRequest, Address, SignableMessage, TypedDataDefinition, Hex, PublicClient, Hash, TransactionReceipt, WalletClient } from 'viem';
|
|
3
3
|
import * as bitcoin from 'bitcoinjs-lib';
|
|
4
4
|
import { EncodeObject } from '@cosmjs/proto-signing';
|
|
5
|
-
import { TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx';
|
|
5
|
+
import { TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx.js';
|
|
6
6
|
import { KeyPair } from '@near-js/crypto';
|
|
7
7
|
import { Action as Action$1 } from '@near-js/transactions';
|
|
8
8
|
import { TxExecutionStatus } from '@near-js/types';
|
|
9
9
|
import { NetworkId, Action, FinalExecutionOutcome } from '@near-wallet-selector/core';
|
|
10
10
|
import { KeyPair as KeyPair$1 } from 'near-api-js';
|
|
11
11
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
12
|
-
import { PublicKey, AccountMeta, TransactionInstruction } from '@solana/web3.js';
|
|
12
|
+
import { PublicKey, AccountMeta, TransactionInstruction, Signer } from '@solana/web3.js';
|
|
13
13
|
import { AnchorProvider } from '@coral-xyz/anchor';
|
|
14
14
|
|
|
15
15
|
interface SignArgs {
|
|
@@ -1126,7 +1126,7 @@ declare class ChainSignatureContract extends ChainSignatureContract$3 {
|
|
|
1126
1126
|
}): Promise<UncompressedPubKeySEC1>;
|
|
1127
1127
|
getPublicKey(): Promise<UncompressedPubKeySEC1>;
|
|
1128
1128
|
getSignRequestInstruction(args: SignArgs, options?: Pick<SignOptions, 'sign'> & {
|
|
1129
|
-
remainingAccounts?:
|
|
1129
|
+
remainingAccounts?: AccountMeta[];
|
|
1130
1130
|
}): Promise<TransactionInstruction>;
|
|
1131
1131
|
/**
|
|
1132
1132
|
* Sends a transaction to the program to request a signature, then
|
|
@@ -1134,19 +1134,25 @@ declare class ChainSignatureContract extends ChainSignatureContract$3 {
|
|
|
1134
1134
|
* parameters, it will throw an error.
|
|
1135
1135
|
*/
|
|
1136
1136
|
sign(args: SignArgs, options?: Partial<SignOptions> & {
|
|
1137
|
-
remainingAccounts?:
|
|
1137
|
+
remainingAccounts?: AccountMeta[];
|
|
1138
|
+
remainingSigners?: Signer[];
|
|
1138
1139
|
}): Promise<RSVSignature>;
|
|
1140
|
+
private sendAndConfirmWithoutWebSocket;
|
|
1139
1141
|
/**
|
|
1140
|
-
*
|
|
1141
|
-
*
|
|
1142
|
-
* either a valid signature or an error is received.
|
|
1142
|
+
* Polls for signature or error events matching the given requestId starting from the solana transaction with signature afterSignature.
|
|
1143
|
+
* Returns a signature, error data, or undefined if nothing is found.
|
|
1143
1144
|
*/
|
|
1144
|
-
|
|
1145
|
+
pollForRequestId({ requestId, payload, path, afterSignature, options, }: {
|
|
1145
1146
|
requestId: string;
|
|
1146
1147
|
payload: number[];
|
|
1147
1148
|
path: string;
|
|
1149
|
+
afterSignature: string;
|
|
1148
1150
|
options?: RetryOptions;
|
|
1149
1151
|
}): Promise<RSVSignature | SignatureErrorData | undefined>;
|
|
1152
|
+
/**
|
|
1153
|
+
* Parses transaction logs for signature or error events.
|
|
1154
|
+
*/
|
|
1155
|
+
private parseLogsForEvents;
|
|
1150
1156
|
/**
|
|
1151
1157
|
* Generates the request ID for a signature request allowing to track the response.
|
|
1152
1158
|
*/
|
package/types/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import BN from 'bn.js';
|
|
|
2
2
|
import { TransactionRequest, Address, SignableMessage, TypedDataDefinition, Hex, PublicClient, Hash, TransactionReceipt, WalletClient } from 'viem';
|
|
3
3
|
import * as bitcoin from 'bitcoinjs-lib';
|
|
4
4
|
import { EncodeObject } from '@cosmjs/proto-signing';
|
|
5
|
-
import { TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx';
|
|
5
|
+
import { TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx.js';
|
|
6
6
|
import { KeyPair } from '@near-js/crypto';
|
|
7
7
|
import { Action as Action$1 } from '@near-js/transactions';
|
|
8
8
|
import { TxExecutionStatus } from '@near-js/types';
|
|
9
9
|
import { NetworkId, Action, FinalExecutionOutcome } from '@near-wallet-selector/core';
|
|
10
10
|
import { KeyPair as KeyPair$1 } from 'near-api-js';
|
|
11
11
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
12
|
-
import { PublicKey, AccountMeta, TransactionInstruction } from '@solana/web3.js';
|
|
12
|
+
import { PublicKey, AccountMeta, TransactionInstruction, Signer } from '@solana/web3.js';
|
|
13
13
|
import { AnchorProvider } from '@coral-xyz/anchor';
|
|
14
14
|
|
|
15
15
|
interface SignArgs {
|
|
@@ -1126,7 +1126,7 @@ declare class ChainSignatureContract extends ChainSignatureContract$3 {
|
|
|
1126
1126
|
}): Promise<UncompressedPubKeySEC1>;
|
|
1127
1127
|
getPublicKey(): Promise<UncompressedPubKeySEC1>;
|
|
1128
1128
|
getSignRequestInstruction(args: SignArgs, options?: Pick<SignOptions, 'sign'> & {
|
|
1129
|
-
remainingAccounts?:
|
|
1129
|
+
remainingAccounts?: AccountMeta[];
|
|
1130
1130
|
}): Promise<TransactionInstruction>;
|
|
1131
1131
|
/**
|
|
1132
1132
|
* Sends a transaction to the program to request a signature, then
|
|
@@ -1134,19 +1134,25 @@ declare class ChainSignatureContract extends ChainSignatureContract$3 {
|
|
|
1134
1134
|
* parameters, it will throw an error.
|
|
1135
1135
|
*/
|
|
1136
1136
|
sign(args: SignArgs, options?: Partial<SignOptions> & {
|
|
1137
|
-
remainingAccounts?:
|
|
1137
|
+
remainingAccounts?: AccountMeta[];
|
|
1138
|
+
remainingSigners?: Signer[];
|
|
1138
1139
|
}): Promise<RSVSignature>;
|
|
1140
|
+
private sendAndConfirmWithoutWebSocket;
|
|
1139
1141
|
/**
|
|
1140
|
-
*
|
|
1141
|
-
*
|
|
1142
|
-
* either a valid signature or an error is received.
|
|
1142
|
+
* Polls for signature or error events matching the given requestId starting from the solana transaction with signature afterSignature.
|
|
1143
|
+
* Returns a signature, error data, or undefined if nothing is found.
|
|
1143
1144
|
*/
|
|
1144
|
-
|
|
1145
|
+
pollForRequestId({ requestId, payload, path, afterSignature, options, }: {
|
|
1145
1146
|
requestId: string;
|
|
1146
1147
|
payload: number[];
|
|
1147
1148
|
path: string;
|
|
1149
|
+
afterSignature: string;
|
|
1148
1150
|
options?: RetryOptions;
|
|
1149
1151
|
}): Promise<RSVSignature | SignatureErrorData | undefined>;
|
|
1152
|
+
/**
|
|
1153
|
+
* Parses transaction logs for signature or error events.
|
|
1154
|
+
*/
|
|
1155
|
+
private parseLogsForEvents;
|
|
1150
1156
|
/**
|
|
1151
1157
|
* Generates the request ID for a signature request allowing to track the response.
|
|
1152
1158
|
*/
|