@effect-blockchain/solana 0.0.0-stage → 0.2.0

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.
Files changed (58) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -2
  3. package/dist/SolanaAddress.d.ts +21 -0
  4. package/dist/SolanaAddress.d.ts.map +1 -0
  5. package/dist/SolanaAddress.js +33 -0
  6. package/dist/SolanaAddress.js.map +1 -0
  7. package/dist/SolanaIndexer.d.ts +198 -0
  8. package/dist/SolanaIndexer.d.ts.map +1 -0
  9. package/dist/SolanaIndexer.js +344 -0
  10. package/dist/SolanaIndexer.js.map +1 -0
  11. package/dist/SolanaNetwork.d.ts +64 -0
  12. package/dist/SolanaNetwork.d.ts.map +1 -0
  13. package/dist/SolanaNetwork.js +84 -0
  14. package/dist/SolanaNetwork.js.map +1 -0
  15. package/dist/SolanaRelayer.d.ts +207 -0
  16. package/dist/SolanaRelayer.d.ts.map +1 -0
  17. package/dist/SolanaRelayer.js +377 -0
  18. package/dist/SolanaRelayer.js.map +1 -0
  19. package/dist/SolanaRpc.d.ts +427 -0
  20. package/dist/SolanaRpc.d.ts.map +1 -0
  21. package/dist/SolanaRpc.js +216 -0
  22. package/dist/SolanaRpc.js.map +1 -0
  23. package/dist/SolanaSigner.d.ts +49 -0
  24. package/dist/SolanaSigner.d.ts.map +1 -0
  25. package/dist/SolanaSigner.js +82 -0
  26. package/dist/SolanaSigner.js.map +1 -0
  27. package/dist/SolanaTransactionHash.d.ts +14 -0
  28. package/dist/SolanaTransactionHash.d.ts.map +1 -0
  29. package/dist/SolanaTransactionHash.js +34 -0
  30. package/dist/SolanaTransactionHash.js.map +1 -0
  31. package/dist/index.d.ts +32 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +33 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/internal/bigIntJson.d.ts +2 -0
  36. package/dist/internal/bigIntJson.d.ts.map +1 -0
  37. package/dist/internal/bigIntJson.js +9 -0
  38. package/dist/internal/bigIntJson.js.map +1 -0
  39. package/dist/internal/confirmations.d.ts +2 -0
  40. package/dist/internal/confirmations.d.ts.map +1 -0
  41. package/dist/internal/confirmations.js +15 -0
  42. package/dist/internal/confirmations.js.map +1 -0
  43. package/dist/internal/rpcMethods.d.ts +2 -0
  44. package/dist/internal/rpcMethods.d.ts.map +1 -0
  45. package/dist/internal/rpcMethods.js +223 -0
  46. package/dist/internal/rpcMethods.js.map +1 -0
  47. package/package.json +66 -3
  48. package/src/SolanaAddress.ts +40 -0
  49. package/src/SolanaIndexer.ts +552 -0
  50. package/src/SolanaNetwork.ts +105 -0
  51. package/src/SolanaRelayer.ts +493 -0
  52. package/src/SolanaRpc.ts +595 -0
  53. package/src/SolanaSigner.ts +98 -0
  54. package/src/SolanaTransactionHash.ts +41 -0
  55. package/src/index.ts +40 -0
  56. package/src/internal/bigIntJson.ts +18 -0
  57. package/src/internal/confirmations.ts +17 -0
  58. package/src/internal/rpcMethods.ts +260 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolanaIndexer.js","names":[],"sources":["../src/SolanaIndexer.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,OAAO,KAAK,OAAO,MAAM,iCAAiC;AAC1D,OAAO,KAAK,GAAG,MAAM,cAAc;AACnC,OAAO,KAAK,OAAO,MAAM,eAAe;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe;AACvC,OAAO,KAAK,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAK,QAAQ,MAAM,iBAAiB;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc;AACrC,OAAO,KAAK,MAAM,MAAM,eAAe;AACvC,OAAO,KAAK,QAAQ,MAAM,iBAAiB;AAE3C,OAAO,KAAK,MAAM,MAAM,eAAe;AACvC,OAAO,KAAK,aAAa,MAAM,6B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,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ import * as Schema from "effect/Schema";
2
+ /**
3
+ * @since 0.1.0
4
+ * @category constants
5
+ */
6
+ export declare const mainnets: readonly ["Solana"];
7
+ /**
8
+ * @since 0.1.0
9
+ * @category constants
10
+ */
11
+ export declare const testnets: readonly ["SolanaDevnet", "SolanaTestnet"];
12
+ /**
13
+ * Every supported network, mainnets first.
14
+ *
15
+ * @since 0.1.0
16
+ * @category constants
17
+ */
18
+ export declare const networks: readonly ["Solana", "SolanaDevnet", "SolanaTestnet"];
19
+ /**
20
+ * A named Solana cluster.
21
+ *
22
+ * @since 0.1.0
23
+ * @category schemas
24
+ */
25
+ export declare const SolanaNetwork: Schema.Literals<readonly ["Solana", "SolanaDevnet", "SolanaTestnet"]>;
26
+ /**
27
+ * @since 0.1.0
28
+ * @category models
29
+ */
30
+ export type SolanaNetwork = typeof SolanaNetwork.Type;
31
+ /**
32
+ * A Solana genesis hash: a base58-encoded 32-byte hash, validated with `@solana/kit`.
33
+ *
34
+ * @since 0.1.0
35
+ * @category schemas
36
+ */
37
+ export declare const SolanaGenesisHash: Schema.brand<Schema.String, "SolanaGenesisHash">;
38
+ /**
39
+ * @since 0.1.0
40
+ * @category models
41
+ */
42
+ export type SolanaGenesisHash = typeof SolanaGenesisHash.Type;
43
+ /**
44
+ * The cluster's genesis hash, reported by `getGenesisHash`.
45
+ *
46
+ * @since 0.1.0
47
+ * @category conversions
48
+ */
49
+ export declare const toGenesisHash: (network: SolanaNetwork) => SolanaGenesisHash;
50
+ /**
51
+ * @since 0.1.0
52
+ * @category predicates
53
+ */
54
+ export declare const isTestnet: (network: SolanaNetwork) => boolean;
55
+ /**
56
+ * Default number of slots `SolanaIndexer` stays behind the head: 0 on every network. The indexer reads at `finalized`
57
+ * commitment, and a block is finalized once 31+ confirmed blocks are built on top of it
58
+ * (https://docs.anza.xyz/consensus/commitments), so the finalized slot needs no further margin.
59
+ *
60
+ * @since 0.1.0
61
+ * @category getters
62
+ */
63
+ export declare const defaultConfirmations: (_network: SolanaNetwork) => number;
64
+ //# sourceMappingURL=SolanaNetwork.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolanaNetwork.d.ts","sourceRoot":"","sources":["../src/SolanaNetwork.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC;;;GAGG;AACH,eAAO,MAAM,QAAQ,YAAI,QAAQ,CAAU,CAAA;AAE3C;;;GAGG;AACH,eAAO,MAAM,QAAQ,YAAI,cAAc,EAAE,eAAe,CAAU,CAAA;AAElE;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,sDAAsC,CAAA;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,aAAa,uEAIxB,CAAA;AAEF;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAKrD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,kDAW7B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAS7D;;;;;GAKG;AACH,eAAO,MAAM,aAAa,YAAa,aAAa,KAAG,iBAA2C,CAAA;AAElG;;;GAGG;AACH,eAAO,MAAM,SAAS,YAAa,aAAa,KAAG,OACW,CAAA;AAE9D;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,aAAc,aAAa,KAAG,MAAW,CAAA"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Named Solana clusters and their genesis hashes.
3
+ *
4
+ * @since 0.1.0
5
+ */
6
+ import { isBlockhash } from "@solana/kit";
7
+ import * as Schema from "effect/Schema";
8
+ /**
9
+ * @since 0.1.0
10
+ * @category constants
11
+ */
12
+ export const mainnets = ["Solana"];
13
+ /**
14
+ * @since 0.1.0
15
+ * @category constants
16
+ */
17
+ export const testnets = ["SolanaDevnet", "SolanaTestnet"];
18
+ /**
19
+ * Every supported network, mainnets first.
20
+ *
21
+ * @since 0.1.0
22
+ * @category constants
23
+ */
24
+ export const networks = [...mainnets, ...testnets];
25
+ /**
26
+ * A named Solana cluster.
27
+ *
28
+ * @since 0.1.0
29
+ * @category schemas
30
+ */
31
+ export const SolanaNetwork = /*#__PURE__*/Schema.Literals(networks).annotate({
32
+ identifier: "SolanaNetwork",
33
+ title: "Solana network",
34
+ description: "a named Solana cluster: Solana (mainnet-beta), SolanaDevnet or SolanaTestnet"
35
+ });
36
+ // like `SolanaAddress`: always 32 bytes once decoded
37
+ const solanaGenesisHashPattern = "^[2-9A-H][1-9A-HJ-NP-Za-km-z]{43}$";
38
+ /**
39
+ * A Solana genesis hash: a base58-encoded 32-byte hash, validated with `@solana/kit`.
40
+ *
41
+ * @since 0.1.0
42
+ * @category schemas
43
+ */
44
+ export const SolanaGenesisHash = /*#__PURE__*/Schema.String.annotate({
45
+ title: "Solana genesis hash",
46
+ description: "a valid Solana genesis hash (base58-encoded 32-byte hash)"
47
+ }).pipe(/*#__PURE__*/Schema.check(/*#__PURE__*/Schema.makeFilter(s => isBlockhash(s) || `${s} is not a valid Solana genesis hash`, {
48
+ arbitraryConstraint: {
49
+ patterns: [{
50
+ source: solanaGenesisHashPattern,
51
+ flags: ""
52
+ }]
53
+ }
54
+ })), /*#__PURE__*/Schema.brand("SolanaGenesisHash"), /*#__PURE__*/Schema.annotate({
55
+ identifier: "SolanaGenesisHash"
56
+ }));
57
+ // `--expected-genesis-hash` of each cluster, https://docs.anza.xyz/clusters/available
58
+ const genesisHashes = {
59
+ Solana: /*#__PURE__*/SolanaGenesisHash.make("5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"),
60
+ SolanaDevnet: /*#__PURE__*/SolanaGenesisHash.make("EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG"),
61
+ SolanaTestnet: /*#__PURE__*/SolanaGenesisHash.make("4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY")
62
+ };
63
+ /**
64
+ * The cluster's genesis hash, reported by `getGenesisHash`.
65
+ *
66
+ * @since 0.1.0
67
+ * @category conversions
68
+ */
69
+ export const toGenesisHash = network => genesisHashes[network];
70
+ /**
71
+ * @since 0.1.0
72
+ * @category predicates
73
+ */
74
+ export const isTestnet = network => testnets.includes(network);
75
+ /**
76
+ * Default number of slots `SolanaIndexer` stays behind the head: 0 on every network. The indexer reads at `finalized`
77
+ * commitment, and a block is finalized once 31+ confirmed blocks are built on top of it
78
+ * (https://docs.anza.xyz/consensus/commitments), so the finalized slot needs no further margin.
79
+ *
80
+ * @since 0.1.0
81
+ * @category getters
82
+ */
83
+ export const defaultConfirmations = _network => 0;
84
+ //# sourceMappingURL=SolanaNetwork.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolanaNetwork.js","names":[],"sources":["../src/SolanaNetwork.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAKA,SAAS,WAAW,QAAQ,aAAa;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe;AAEvC;;;;AAIA,OAAO,MAAM,QAAQ,GAAG,CAAC,QAAQ,CAAU;AAE3C;;;;AAIA,OAAO,MAAM,QAAQ,GAAG,CAAC,cAAc,EAAE,eAAe,CAAU;AAElE;;;;;;AAMA,OAAO,MAAM,QAAQ,GAAG,CAAC,GAAG,QAAQ,EAAE,GAAG,QAAQ,CAAU;AAE3D;;;;;;AAMA,OAAO,MAAM,aAAa,gBAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;EAC9D,UAAU,EAAE,eAAe;EAC3B,KAAK,EAAE,gBAAgB;EACvB,WAAW,EAAE;CACd,CAAC;AAQF;AACA,MAAM,wBAAwB,GAAG,oCAAoC;AAErE;;;;;;AAMA,OAAO,MAAM,iBAAiB,gBAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;EACtD,KAAK,EAAE,qBAAqB;EAC5B,WAAW,EAAE;CACd,CAAC,CAAC,IAAI,cACL,MAAM,CAAC,KAAK,cACV,MAAM,CAAC,UAAU,CAAE,CAAS,IAAK,WAAW,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,qCAAqC,EAAE;EAC5F,mBAAmB,EAAE;IAAE,QAAQ,EAAE,CAAC;MAAE,MAAM,EAAE,wBAAwB;MAAE,KAAK,EAAE;IAAE,CAAE;EAAC;CACnF,CAAC,CACH,eACD,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,eACjC,MAAM,CAAC,QAAQ,CAAC;EAAE,UAAU,EAAE;AAAmB,CAAE,CAAC,CACrD;AAQD;AACA,MAAM,aAAa,GAA6C;EAC9D,MAAM,eAAE,iBAAiB,CAAC,IAAI,CAAC,8CAA8C,CAAC;EAC9E,YAAY,eAAE,iBAAiB,CAAC,IAAI,CAAC,8CAA8C,CAAC;EACpF,aAAa,eAAE,iBAAiB,CAAC,IAAI,CAAC,8CAA8C;CACrF;AAED;;;;;;AAMA,OAAO,MAAM,aAAa,GAAI,OAAsB,IAAwB,aAAa,CAAC,OAAO,CAAC;AAElG;;;;AAIA,OAAO,MAAM,SAAS,GAAI,OAAsB,IAC7C,QAAyC,CAAC,QAAQ,CAAC,OAAO,CAAC;AAE9D;;;;;;;;AAQA,OAAO,MAAM,oBAAoB,GAAI,QAAuB,IAAa,CAAC","ignoreList":[]}
@@ -0,0 +1,207 @@
1
+ import * as Context from "effect/Context";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Layer from "effect/Layer";
4
+ import * as Schedule from "effect/Schedule";
5
+ import * as Schema from "effect/Schema";
6
+ import { SolanaAddress } from "./SolanaAddress.ts";
7
+ import * as SolanaRpc from "./SolanaRpc.ts";
8
+ import { type SolanaSigner, SolanaSignerError } from "./SolanaSigner.ts";
9
+ import { SolanaTransactionHash } from "./SolanaTransactionHash.ts";
10
+ /**
11
+ * Where a transaction stands, by `_tag`: see the module's table. `block` is the slot holding it, and `reason` the
12
+ * transaction error as the node returns it.
13
+ *
14
+ * @since 0.2.0
15
+ * @category models
16
+ */
17
+ export type SolanaTransactionStatus = {
18
+ readonly _tag: "Pending";
19
+ } | {
20
+ readonly _tag: "Included";
21
+ readonly block: bigint;
22
+ } | {
23
+ readonly _tag: "Confirmed";
24
+ readonly block: bigint;
25
+ } | {
26
+ readonly _tag: "Failed";
27
+ readonly block: bigint;
28
+ readonly reason: SolanaRpc.SolanaTransactionError;
29
+ } | {
30
+ readonly _tag: "Expired";
31
+ } | {
32
+ readonly _tag: "NotFound";
33
+ };
34
+ /**
35
+ * The transaction to look up: its `hash` (its first signature) and the `lastValidBlockHeight` returned with its
36
+ * recent blockhash. Without `lastValidBlockHeight`, an unknown transaction is `NotFound`, never `Expired`.
37
+ *
38
+ * @since 0.2.0
39
+ * @category models
40
+ */
41
+ export interface SolanaTransactionStatusOptions {
42
+ readonly hash: SolanaTransactionHash;
43
+ readonly lastValidBlockHeight?: bigint | undefined;
44
+ }
45
+ /**
46
+ * An account an instruction reads, `writable` when the instruction changes it and `signer` when it must sign the
47
+ * transaction.
48
+ *
49
+ * @since 0.2.0
50
+ * @category models
51
+ */
52
+ export interface SolanaAccountMeta {
53
+ readonly address: SolanaAddress;
54
+ readonly signer?: boolean | undefined;
55
+ readonly writable?: boolean | undefined;
56
+ }
57
+ /**
58
+ * An instruction of a transaction: the program to call, the accounts it takes, in the program's order, and its `data`
59
+ * as the program encodes it.
60
+ *
61
+ * @since 0.2.0
62
+ * @category models
63
+ */
64
+ export interface SolanaInstruction {
65
+ readonly programAddress: SolanaAddress;
66
+ readonly accounts?: ReadonlyArray<SolanaAccountMeta> | undefined;
67
+ readonly data?: Uint8Array | undefined;
68
+ }
69
+ /**
70
+ * A transaction signed by {@link SolanaRelayer.sign}: `signed` is the base64 wire transaction `broadcast` takes,
71
+ * `hash` the fee payer's signature and `lastValidBlockHeight` the last block height it can land at.
72
+ *
73
+ * @since 0.2.0
74
+ * @category models
75
+ */
76
+ export interface SolanaSignedTransaction {
77
+ readonly hash: SolanaTransactionHash;
78
+ readonly signed: string;
79
+ readonly lastValidBlockHeight: bigint;
80
+ }
81
+ declare const BlockhashNotFound_base: Schema.Class<BlockhashNotFound, Schema.TaggedStruct<"BlockhashNotFound", {}>, import("effect/Cause").YieldableError>;
82
+ /**
83
+ * The node does not know the transaction's blockhash: it has expired, or the node is behind the one that returned
84
+ * it. Past `lastValidBlockHeight`, sign the transaction again.
85
+ *
86
+ * @since 0.2.0
87
+ * @category reasons
88
+ */
89
+ export declare class BlockhashNotFound extends BlockhashNotFound_base {
90
+ }
91
+ declare const InsufficientFundsForFee_base: Schema.Class<InsufficientFundsForFee, Schema.TaggedStruct<"InsufficientFundsForFee", {}>, import("effect/Cause").YieldableError>;
92
+ /**
93
+ * The fee payer cannot pay the transaction fee: its balance is too low, or it holds no account.
94
+ *
95
+ * @since 0.2.0
96
+ * @category reasons
97
+ */
98
+ export declare class InsufficientFundsForFee extends InsufficientFundsForFee_base {
99
+ }
100
+ declare const SimulationFailed_base: Schema.Class<SimulationFailed, Schema.TaggedStruct<"SimulationFailed", {
101
+ readonly error: Schema.Codec<SolanaRpc.SolanaTransactionError, SolanaRpc.SolanaTransactionError, never, never>;
102
+ readonly logs: Schema.$Array<Schema.String>;
103
+ }>, import("effect/Cause").YieldableError>;
104
+ /**
105
+ * The node simulated the transaction and it failed: `error` is the transaction error and `logs` the program logs up
106
+ * to it. {@link SolanaRelayer.sign} fails with it when it estimates the compute unit limit.
107
+ *
108
+ * @since 0.2.0
109
+ * @category reasons
110
+ */
111
+ export declare class SimulationFailed extends SimulationFailed_base {
112
+ }
113
+ /**
114
+ * Why a node refused a transaction, the `reason` of a {@link SolanaBroadcastError}, matched with `Effect.catchReason`.
115
+ *
116
+ * @since 0.2.0
117
+ * @category reasons
118
+ */
119
+ export declare const SolanaBroadcastReason: Schema.Union<readonly [typeof BlockhashNotFound, typeof InsufficientFundsForFee, typeof SimulationFailed]>;
120
+ /**
121
+ * @since 0.2.0
122
+ * @category reasons
123
+ */
124
+ export type SolanaBroadcastReason = typeof SolanaBroadcastReason.Type;
125
+ declare const SolanaBroadcastError_base: Schema.Class<SolanaBroadcastError, Schema.TaggedStruct<"SolanaBroadcastError", {
126
+ readonly reason: Schema.Union<readonly [typeof BlockhashNotFound, typeof InsufficientFundsForFee, typeof SimulationFailed]>;
127
+ readonly cause: Schema.Defect;
128
+ }>, import("effect/Cause").YieldableError>;
129
+ /**
130
+ * A node refused the transaction at its preflight simulation for a `reason` the sender can act on: `cause` is the
131
+ * {@link SolanaRpc.SolanaRpcError} holding the node's message. Any other refusal stays a `SolanaRpcError`.
132
+ *
133
+ * @since 0.2.0
134
+ * @category errors
135
+ */
136
+ export declare class SolanaBroadcastError extends SolanaBroadcastError_base {
137
+ }
138
+ declare const SolanaRelayer_base: Context.ServiceClass<SolanaRelayer, "@effect-blockchain/solana/SolanaRelayer", {
139
+ /**
140
+ * Signs a v0 transaction of `instructions` paid by `feePayer` without sending it. `signers` are the other accounts
141
+ * the instructions mark as signer. A missing `blockhash` is the latest one at `confirmed` commitment, a missing
142
+ * `computeUnitLimit` is the units a simulation consumed times the layer's `computeUnitMultiplier` (a transaction
143
+ * that would fail fails with `SimulationFailed`), and a missing `computeUnitPrice`, in micro-lamports, comes from
144
+ * the layer's fee strategy.
145
+ */
146
+ readonly sign: (options: {
147
+ readonly feePayer: SolanaSigner;
148
+ readonly signers?: ReadonlyArray<SolanaSigner> | undefined;
149
+ readonly instructions: ReadonlyArray<SolanaInstruction>;
150
+ readonly blockhash?: Pick<SolanaRpc.SolanaLatestBlockhash, "blockhash" | "lastValidBlockHeight"> | undefined;
151
+ readonly computeUnitLimit?: number | undefined;
152
+ readonly computeUnitPrice?: bigint | undefined;
153
+ }) => Effect.Effect<SolanaSignedTransaction, SolanaRpc.SolanaRpcError | SolanaSignerError | SimulationFailed>;
154
+ /**
155
+ * Sends a signed transaction with `sendTransaction` and returns its hash. The node simulates it first at
156
+ * `confirmed` commitment, then rebroadcasts it to the leaders until its blockhash expires (the node's default
157
+ * `maxRetries`). Sending the same bytes again is safe: a node answering that it has already processed the
158
+ * transaction is a success.
159
+ */
160
+ readonly broadcast: (options: {
161
+ readonly signed: string;
162
+ }) => Effect.Effect<SolanaTransactionHash, SolanaBroadcastError | SolanaRpc.SolanaRpcError>;
163
+ /**
164
+ * The status of the transaction as the answering endpoint sees it. An endpoint behind the head, or one that never
165
+ * received the transaction, answers `NotFound`, or `Expired` when `lastValidBlockHeight` has passed, for a
166
+ * transaction another one has in a block.
167
+ */
168
+ readonly fetchTransactionStatus: (options: SolanaTransactionStatusOptions) => Effect.Effect<SolanaTransactionStatus, SolanaRpc.SolanaRpcError>;
169
+ /**
170
+ * Reads {@link fetchTransactionStatus} on `poll` (`Schedule.spaced(SolanaIndexer.DEFAULT_POLL_INTERVAL)` by
171
+ * default) until it is `Confirmed`, `Failed` or `Expired`, and returns it. `NotFound` keeps polling, so bound the
172
+ * wait with a timeout. A `poll` that ends first returns the last status read.
173
+ */
174
+ readonly awaitConfirmation: (options: SolanaTransactionStatusOptions & {
175
+ readonly poll?: Schedule.Schedule<unknown> | undefined;
176
+ }) => Effect.Effect<SolanaTransactionStatus, SolanaRpc.SolanaRpcError>;
177
+ }>;
178
+ /**
179
+ * @since 0.2.0
180
+ * @category services
181
+ */
182
+ export declare class SolanaRelayer extends SolanaRelayer_base {
183
+ }
184
+ /**
185
+ * The library's fee strategy: the compute unit price is the 75th percentile of the recent slots' prioritization fees,
186
+ * at least 1 micro-lamport.
187
+ *
188
+ * @since 0.2.0
189
+ * @category fees
190
+ */
191
+ export declare const defaultFees: (fees: ReadonlyArray<SolanaRpc.SolanaPrioritizationFee>) => bigint;
192
+ /**
193
+ * Builds a {@link SolanaRelayer} over the provided {@link SolanaRpc.SolanaRpc}. `confirmations` overrides the
194
+ * network's default, as in `SolanaIndexer.layer`: both agree on the last confirmed slot. `fees` (default
195
+ * {@link defaultFees}) prices the transactions signed without a compute unit price, and `computeUnitMultiplier`
196
+ * (default 1.2) is the margin applied to a simulated compute unit limit.
197
+ *
198
+ * @since 0.2.0
199
+ * @category layers
200
+ */
201
+ export declare const layer: (options?: {
202
+ readonly confirmations?: number | undefined;
203
+ readonly fees?: ((fees: ReadonlyArray<SolanaRpc.SolanaPrioritizationFee>) => bigint) | undefined;
204
+ readonly computeUnitMultiplier?: number | undefined;
205
+ }) => Layer.Layer<SolanaRelayer, never, SolanaRpc.SolanaRpc>;
206
+ export {};
207
+ //# sourceMappingURL=SolanaRelayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolanaRelayer.d.ts","sourceRoot":"","sources":["../src/SolanaRelayer.ts"],"names":[],"mappings":"AA0FA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,KAAK,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAElE;;;;;;GAMG;AACH,MAAM,MAAM,uBAAuB,GAC/B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,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