@n1xyz/nord-ts 0.0.4 → 0.0.7

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 (306) hide show
  1. package/dist/bridge/client.d.ts +4 -4
  2. package/dist/bridge/client.js +4 -4
  3. package/dist/bridge/const.d.ts +2 -2
  4. package/dist/bridge/const.js +22 -22
  5. package/dist/bridge/index.d.ts +4 -4
  6. package/dist/bridge/types.d.ts +3 -3
  7. package/dist/bridge/utils.d.ts +4 -4
  8. package/dist/bridge/utils.js +10 -10
  9. package/dist/const.d.ts +1 -1
  10. package/dist/const.js +17 -17
  11. package/dist/gen/nord.d.ts +1 -4
  12. package/dist/idl/bridge.d.ts +1 -1
  13. package/dist/idl/bridge.js +185 -185
  14. package/dist/index.d.ts +8 -8
  15. package/dist/nord/api/actions.d.ts +3 -3
  16. package/dist/nord/api/actions.js +21 -21
  17. package/dist/nord/api/core.d.ts +3 -3
  18. package/dist/nord/api/core.js +12 -12
  19. package/dist/nord/api/market.d.ts +1 -1
  20. package/dist/nord/api/market.js +12 -12
  21. package/dist/nord/api/metrics.d.ts +1 -1
  22. package/dist/nord/api/metrics.js +6 -6
  23. package/dist/nord/api/queries.d.ts +1 -1
  24. package/dist/nord/api/queries.js +9 -9
  25. package/dist/nord/client/Nord.d.ts +4 -4
  26. package/dist/nord/client/Nord.js +18 -18
  27. package/dist/nord/client/NordUser.d.ts +7 -7
  28. package/dist/nord/client/NordUser.js +45 -49
  29. package/dist/nord/index.d.ts +9 -9
  30. package/dist/nord/models/Subscriber.d.ts +6 -6
  31. package/dist/nord/models/Subscriber.js +1 -5
  32. package/dist/nord/utils/NordError.js +2 -2
  33. package/dist/types.d.ts +1 -1
  34. package/dist/types.js +1 -1
  35. package/dist/utils.d.ts +6 -6
  36. package/dist/utils.js +8 -8
  37. package/dist/websocket/NordWebSocketClient.d.ts +2 -2
  38. package/dist/websocket/NordWebSocketClient.js +38 -38
  39. package/dist/websocket/events.d.ts +1 -1
  40. package/dist/websocket/index.d.ts +2 -2
  41. package/docs/assets/hierarchy.js +1 -0
  42. package/docs/assets/highlight.css +16 -16
  43. package/docs/assets/icons.js +17 -14
  44. package/docs/assets/icons.svg +1 -1
  45. package/docs/assets/main.js +5 -4
  46. package/docs/assets/navigation.js +1 -1
  47. package/docs/assets/search.js +1 -1
  48. package/docs/assets/style.css +1423 -1227
  49. package/docs/classes/Nord.html +190 -31
  50. package/docs/classes/NordError.html +24 -0
  51. package/docs/classes/NordUser.html +120 -35
  52. package/docs/classes/NordWebSocketClient.html +335 -0
  53. package/docs/classes/SolanaBridgeClient.html +86 -0
  54. package/docs/classes/Subscriber.html +10 -0
  55. package/docs/enums/FillMode.html +5 -5
  56. package/docs/enums/KeyType.html +4 -4
  57. package/docs/enums/MetricPeriod.html +9 -0
  58. package/docs/enums/PdaSeedType.html +9 -0
  59. package/docs/enums/PeakTpsPeriodUnit.html +7 -7
  60. package/docs/enums/Side.html +3 -3
  61. package/docs/enums/WebSocketMessageType.html +7 -0
  62. package/docs/functions/actionQueryRollman.html +6 -0
  63. package/docs/functions/actionsQueryRollman.html +6 -0
  64. package/docs/functions/aggregateMetrics-1.html +7 -0
  65. package/docs/functions/assert.html +1 -1
  66. package/docs/functions/bigIntToProtoU128.html +3 -3
  67. package/docs/functions/blockQueryRollman.html +6 -0
  68. package/docs/functions/blockSummaryQueryRollman.html +6 -0
  69. package/docs/functions/bridgeToBN.html +5 -0
  70. package/docs/functions/bufferToHex.html +4 -0
  71. package/docs/functions/cancelOrder.html +1 -0
  72. package/docs/functions/checkPubKeyLength.html +1 -1
  73. package/docs/functions/checkedFetch.html +4 -4
  74. package/docs/functions/createSession.html +1 -0
  75. package/docs/functions/decodeLengthDelimited.html +7 -6
  76. package/docs/functions/encodeLengthDelimited.html +4 -4
  77. package/docs/functions/fillModeToProtoFillMode.html +4 -4
  78. package/docs/functions/findMarket.html +1 -1
  79. package/docs/functions/findPda.html +6 -0
  80. package/docs/functions/findToken.html +1 -1
  81. package/docs/functions/fromBN.html +5 -0
  82. package/docs/functions/getAccount.html +6 -0
  83. package/docs/functions/getActionNonce.html +5 -0
  84. package/docs/functions/getCurrentTps.html +6 -0
  85. package/docs/functions/getInfo.html +5 -0
  86. package/docs/functions/getMedianLatency.html +6 -0
  87. package/docs/functions/getOrderbook.html +6 -0
  88. package/docs/functions/getPeakTps.html +6 -0
  89. package/docs/functions/getTimestamp.html +5 -0
  90. package/docs/functions/getTotalTransactions.html +5 -0
  91. package/docs/functions/getTrades.html +6 -0
  92. package/docs/functions/getUserAccountIds.html +6 -0
  93. package/docs/functions/hexToBuffer.html +4 -0
  94. package/docs/functions/initWebSocketClient.html +12 -0
  95. package/docs/functions/keypairFromPrivateKey.html +4 -0
  96. package/docs/functions/makeSigningFunction.html +4 -0
  97. package/docs/functions/makeWalletSignFn.html +5 -5
  98. package/docs/functions/marketsStats.html +5 -0
  99. package/docs/functions/optExpect.html +4 -4
  100. package/docs/functions/optMap.html +5 -5
  101. package/docs/functions/optUnwrap.html +2 -2
  102. package/docs/functions/panic.html +1 -1
  103. package/docs/functions/placeOrder.html +1 -0
  104. package/docs/functions/queryAction.html +6 -0
  105. package/docs/functions/queryBlock.html +6 -0
  106. package/docs/functions/queryLastNBlocks.html +5 -0
  107. package/docs/functions/queryPrometheus.html +6 -0
  108. package/docs/functions/queryRecentActions.html +6 -0
  109. package/docs/functions/queryRecentBlocks.html +6 -0
  110. package/docs/functions/revokeSession.html +1 -0
  111. package/docs/functions/shortenPublicKey.html +5 -0
  112. package/docs/functions/signAction.html +2 -2
  113. package/docs/functions/toBN.html +5 -0
  114. package/docs/functions/toScaledU128.html +5 -5
  115. package/docs/functions/toScaledU64.html +5 -5
  116. package/docs/functions/transfer.html +1 -0
  117. package/docs/functions/withdraw.html +1 -0
  118. package/docs/hierarchy.html +1 -0
  119. package/docs/index.html +39 -20
  120. package/docs/interfaces/Account.html +8 -8
  121. package/docs/interfaces/ActionInfo.html +8 -8
  122. package/docs/interfaces/ActionNonceResponse.html +3 -0
  123. package/docs/interfaces/ActionQuery.html +4 -4
  124. package/docs/interfaces/ActionResponse.html +8 -8
  125. package/docs/interfaces/ActionsExtendedInfo.html +10 -10
  126. package/docs/interfaces/ActionsQuery.html +5 -5
  127. package/docs/interfaces/ActionsResponse.html +6 -6
  128. package/docs/interfaces/AggregateMetrics.html +12 -12
  129. package/docs/interfaces/BlockFacts.html +10 -0
  130. package/docs/interfaces/BlockQuery.html +6 -6
  131. package/docs/interfaces/BlockResponse.html +6 -6
  132. package/docs/interfaces/BlockSummary.html +8 -8
  133. package/docs/interfaces/BlockSummaryResponse.html +6 -6
  134. package/docs/interfaces/DeltaEvent.html +6 -6
  135. package/docs/interfaces/DepositSplParams.html +10 -0
  136. package/docs/interfaces/Info.html +3 -3
  137. package/docs/interfaces/Market.html +8 -6
  138. package/docs/interfaces/MarketStats.html +7 -7
  139. package/docs/interfaces/MarketsStatsResponse.html +2 -2
  140. package/docs/interfaces/NordConfig.html +14 -5
  141. package/docs/interfaces/NordWebSocketClientEvents.html +4 -0
  142. package/docs/interfaces/NordWebSocketEvents.html +8 -0
  143. package/docs/interfaces/Order.html +6 -6
  144. package/docs/interfaces/OrderInfo.html +6 -6
  145. package/docs/interfaces/OrderbookEntry.html +4 -0
  146. package/docs/interfaces/OrderbookQuery.html +6 -0
  147. package/docs/interfaces/OrderbookResponse.html +6 -0
  148. package/docs/interfaces/OrderbookSubscription.html +159 -0
  149. package/docs/interfaces/PerpMarketStats.html +5 -5
  150. package/docs/interfaces/RollmanActionExtendedInfo.html +4 -4
  151. package/docs/interfaces/RollmanActionInfo.html +4 -4
  152. package/docs/interfaces/RollmanActionResponse.html +4 -4
  153. package/docs/interfaces/RollmanActionsResponse.html +2 -2
  154. package/docs/interfaces/RollmanBlockResponse.html +3 -3
  155. package/docs/interfaces/SPLTokenInfo.html +10 -0
  156. package/docs/interfaces/SolanaBridgeConfig.html +10 -0
  157. package/docs/interfaces/StateFacts.html +10 -0
  158. package/docs/interfaces/SubscriberConfig.html +3 -3
  159. package/docs/interfaces/TimestampResponse.html +3 -0
  160. package/docs/interfaces/Token.html +5 -5
  161. package/docs/interfaces/TokenInfo.html +5 -0
  162. package/docs/interfaces/Trade.html +5 -5
  163. package/docs/interfaces/TradeSubscription.html +159 -0
  164. package/docs/interfaces/Trades.html +5 -5
  165. package/docs/interfaces/TradesQuery.html +6 -0
  166. package/docs/interfaces/TradesResponse.html +7 -0
  167. package/docs/interfaces/TransferParams.html +8 -0
  168. package/docs/interfaces/UserAccountIdsQuery.html +3 -0
  169. package/docs/interfaces/UserAccountIdsResponse.html +3 -0
  170. package/docs/interfaces/WebSocketDeltaUpdate.html +9 -0
  171. package/docs/interfaces/WebSocketSubscription.html +4 -0
  172. package/docs/interfaces/WebSocketTradeUpdate.html +6 -0
  173. package/docs/interfaces/WebSocketUserUpdate.html +6 -0
  174. package/docs/interfaces/WithdrawalClaim.html +14 -0
  175. package/docs/interfaces/WithdrawalParams.html +8 -0
  176. package/docs/modules.html +1 -70
  177. package/docs/types/BigIntValue.html +2 -2
  178. package/docs/types/WebSocketMessage.html +1 -0
  179. package/docs/variables/DEBUG_KEYS.html +1 -1
  180. package/docs/variables/DEFAULT_FUNDING_AMOUNTS.html +1 -1
  181. package/docs/variables/DEV_TOKEN_INFOS.html +1 -1
  182. package/docs/variables/DEV_URL.html +1 -1
  183. package/docs/variables/MAX_BUFFER_LEN.html +1 -1
  184. package/docs/variables/SESSION_TTL.html +1 -1
  185. package/docs/variables/WEBSERVER_DEV_URL.html +1 -1
  186. package/docs/variables/ZERO_DECIMAL.html +1 -1
  187. package/docs/variables/_private.html +2 -0
  188. package/eslint.config.mjs +66 -0
  189. package/package.json +12 -13
  190. package/src/bridge/client.ts +10 -10
  191. package/src/bridge/const.ts +24 -24
  192. package/src/bridge/index.ts +4 -4
  193. package/src/bridge/types.ts +10 -10
  194. package/src/bridge/utils.ts +14 -14
  195. package/src/const.ts +18 -18
  196. package/src/gen/nord.ts +1 -4
  197. package/src/idl/bridge.ts +186 -186
  198. package/src/index.ts +8 -8
  199. package/src/nord/api/actions.ts +25 -25
  200. package/src/nord/api/core.ts +16 -16
  201. package/src/nord/api/market.ts +15 -15
  202. package/src/nord/api/metrics.ts +129 -22
  203. package/src/nord/api/queries.ts +12 -12
  204. package/src/nord/client/Nord.ts +27 -27
  205. package/src/nord/client/NordUser.ts +59 -63
  206. package/src/nord/index.ts +9 -9
  207. package/src/nord/models/Subscriber.ts +11 -12
  208. package/src/nord/utils/NordError.ts +2 -2
  209. package/src/types.ts +12 -12
  210. package/src/utils.ts +20 -20
  211. package/src/websocket/NordWebSocketClient.ts +42 -42
  212. package/src/websocket/events.ts +1 -1
  213. package/src/websocket/index.ts +2 -2
  214. package/tests/utils.spec.ts +24 -24
  215. package/tsconfig.eslint.json +12 -0
  216. package/.eslintignore +0 -1
  217. package/.eslintrc.js +0 -31
  218. package/dist/abis/ERC20_ABI.d.ts +0 -39
  219. package/dist/abis/ERC20_ABI.js +0 -313
  220. package/dist/abis/NORD_GETTERS_FACET_ABI.d.ts +0 -34
  221. package/dist/abis/NORD_GETTERS_FACET_ABI.js +0 -195
  222. package/dist/abis/NORD_RAMP_FACET_ABI.d.ts +0 -35
  223. package/dist/abis/NORD_RAMP_FACET_ABI.js +0 -144
  224. package/dist/abis/index.d.ts +0 -3
  225. package/dist/abis/index.js +0 -9
  226. package/dist/bridge/NordUser.d.ts +0 -78
  227. package/dist/bridge/NordUser.js +0 -196
  228. package/dist/client.d.ts +0 -70
  229. package/dist/client.js +0 -129
  230. package/dist/constants/endpoints.d.ts +0 -65
  231. package/dist/constants/endpoints.js +0 -68
  232. package/dist/models/account.d.ts +0 -58
  233. package/dist/models/account.js +0 -6
  234. package/dist/models/index.d.ts +0 -8
  235. package/dist/models/index.js +0 -28
  236. package/dist/models/market.d.ts +0 -137
  237. package/dist/models/market.js +0 -6
  238. package/dist/models/order.d.ts +0 -211
  239. package/dist/models/order.js +0 -6
  240. package/dist/models/token.d.ts +0 -50
  241. package/dist/models/token.js +0 -6
  242. package/dist/nord/Nord.d.ts +0 -249
  243. package/dist/nord/Nord.js +0 -388
  244. package/dist/nord/NordError.d.ts +0 -23
  245. package/dist/nord/NordError.js +0 -48
  246. package/dist/nord/NordImpl.d.ts +0 -11
  247. package/dist/nord/NordImpl.js +0 -26
  248. package/dist/nord/NordUser.d.ts +0 -243
  249. package/dist/nord/NordUser.js +0 -481
  250. package/dist/nord/Subscriber.d.ts +0 -37
  251. package/dist/nord/Subscriber.js +0 -29
  252. package/dist/nord/actions.d.ts +0 -101
  253. package/dist/nord/actions.js +0 -254
  254. package/dist/nord/api/index.d.ts +0 -1
  255. package/dist/nord/api/index.js +0 -17
  256. package/dist/nord/api/orderFunctions.d.ts +0 -168
  257. package/dist/nord/api/orderFunctions.js +0 -133
  258. package/dist/nord/core.d.ts +0 -48
  259. package/dist/nord/core.js +0 -97
  260. package/dist/nord/market.d.ts +0 -36
  261. package/dist/nord/market.js +0 -90
  262. package/dist/nord/metrics.d.ts +0 -67
  263. package/dist/nord/metrics.js +0 -124
  264. package/dist/nord/queries.d.ts +0 -81
  265. package/dist/nord/queries.js +0 -181
  266. package/dist/nord/types.d.ts +0 -88
  267. package/dist/nord/types.js +0 -2
  268. package/dist/nord/websocket.d.ts +0 -49
  269. package/dist/nord/websocket.js +0 -107
  270. package/dist/operations/account.d.ts +0 -58
  271. package/dist/operations/account.js +0 -112
  272. package/dist/operations/market.d.ts +0 -65
  273. package/dist/operations/market.js +0 -131
  274. package/dist/operations/orders.d.ts +0 -57
  275. package/dist/operations/orders.js +0 -129
  276. package/dist/solana/NordUser.d.ts +0 -78
  277. package/dist/solana/NordUser.js +0 -196
  278. package/dist/solana/client.d.ts +0 -139
  279. package/dist/solana/client.js +0 -360
  280. package/dist/solana/const.d.ts +0 -23
  281. package/dist/solana/const.js +0 -47
  282. package/dist/solana/index.d.ts +0 -5
  283. package/dist/solana/index.js +0 -23
  284. package/dist/solana/types.d.ts +0 -118
  285. package/dist/solana/types.js +0 -16
  286. package/dist/solana/utils.d.ts +0 -64
  287. package/dist/solana/utils.js +0 -131
  288. package/dist/types/api.d.ts +0 -152
  289. package/dist/types/api.js +0 -6
  290. package/dist/types/config.d.ts +0 -34
  291. package/dist/types/config.js +0 -6
  292. package/dist/utils/errors.d.ts +0 -96
  293. package/dist/utils/errors.js +0 -132
  294. package/dist/utils/http.d.ts +0 -35
  295. package/dist/utils/http.js +0 -105
  296. package/dist/websocket/client.d.ts +0 -93
  297. package/dist/websocket/client.js +0 -222
  298. package/dist/websocket.d.ts +0 -55
  299. package/dist/websocket.js +0 -211
  300. package/docs/interfaces/ERC20TokenInfo.html +0 -5
  301. package/docs/variables/DEV_CONTRACT_ADDRESS.html +0 -1
  302. package/docs/variables/ERC20_ABI.html +0 -1
  303. package/docs/variables/EVM_DEV_URL.html +0 -1
  304. package/docs/variables/FAUCET_PRIVATE_ADDRESS.html +0 -1
  305. package/docs/variables/NORD_GETTERS_FACET_ABI.html +0 -1
  306. package/docs/variables/NORD_RAMP_FACET_ABI.html +0 -1
package/src/idl/bridge.ts CHANGED
@@ -1,72 +1,72 @@
1
- import { Idl } from '@coral-xyz/anchor';
1
+ import { Idl } from "@coral-xyz/anchor";
2
2
 
3
3
  export const BRIDGE_IDL: Idl = {
4
- address: '',
4
+ address: "",
5
5
  metadata: {
6
- name: 'bridge',
7
- version: '0.1.0',
8
- spec: '0.1.0',
9
- description: 'Created with Anchor',
6
+ name: "bridge",
7
+ version: "0.1.0",
8
+ spec: "0.1.0",
9
+ description: "Created with Anchor",
10
10
  },
11
11
  instructions: [
12
12
  {
13
- name: 'deposit_spl',
13
+ name: "deposit_spl",
14
14
  discriminator: [224, 0, 198, 175, 198, 47, 105, 204],
15
15
  accounts: [
16
16
  {
17
- name: 'depositor',
17
+ name: "depositor",
18
18
  writable: true,
19
19
  signer: true,
20
20
  },
21
21
  {
22
- name: 'deposit',
22
+ name: "deposit",
23
23
  writable: true,
24
24
  },
25
25
  {
26
- name: 'prev_deposit',
26
+ name: "prev_deposit",
27
27
  optional: true,
28
28
  pda: {
29
29
  seeds: [
30
30
  {
31
- kind: 'const',
31
+ kind: "const",
32
32
  value: [
33
33
  100, 101, 112, 111, 115, 105, 116, 95, 115, 116, 111, 114, 97,
34
34
  103, 101,
35
35
  ],
36
36
  },
37
37
  {
38
- kind: 'account',
39
- path: 'contract_storage.last_deposit_index',
40
- account: 'ContractStorage',
38
+ kind: "account",
39
+ path: "contract_storage.last_deposit_index",
40
+ account: "ContractStorage",
41
41
  },
42
42
  ],
43
43
  },
44
44
  },
45
45
  {
46
- name: 'asset_whitelisted',
46
+ name: "asset_whitelisted",
47
47
  pda: {
48
48
  seeds: [
49
49
  {
50
- kind: 'const',
50
+ kind: "const",
51
51
  value: [
52
52
  97, 115, 115, 101, 116, 95, 119, 104, 105, 116, 101, 108, 105,
53
53
  115, 116, 101, 100,
54
54
  ],
55
55
  },
56
56
  {
57
- kind: 'account',
58
- path: 'from_account.mint',
57
+ kind: "account",
58
+ path: "from_account.mint",
59
59
  },
60
60
  ],
61
61
  },
62
62
  },
63
63
  {
64
- name: 'contract_storage',
64
+ name: "contract_storage",
65
65
  writable: true,
66
66
  pda: {
67
67
  seeds: [
68
68
  {
69
- kind: 'const',
69
+ kind: "const",
70
70
  value: [
71
71
  99, 111, 110, 116, 114, 97, 99, 116, 95, 115, 116, 111, 114,
72
72
  97, 103, 101,
@@ -76,62 +76,62 @@ export const BRIDGE_IDL: Idl = {
76
76
  },
77
77
  },
78
78
  {
79
- name: 'from_account',
79
+ name: "from_account",
80
80
  writable: true,
81
81
  },
82
82
  {
83
- name: 'to_account',
83
+ name: "to_account",
84
84
  writable: true,
85
85
  },
86
86
  {
87
- name: 'token_program',
87
+ name: "token_program",
88
88
  },
89
89
  {
90
- name: 'system_program',
91
- address: '11111111111111111111111111111111',
90
+ name: "system_program",
91
+ address: "11111111111111111111111111111111",
92
92
  },
93
93
  ],
94
94
  args: [
95
95
  {
96
- name: 'amount',
97
- type: 'u64',
96
+ name: "amount",
97
+ type: "u64",
98
98
  },
99
99
  ],
100
100
  },
101
101
  {
102
- name: 'finalize_block',
102
+ name: "finalize_block",
103
103
  discriminator: [63, 101, 92, 132, 135, 251, 98, 177],
104
104
  accounts: [
105
105
  {
106
- name: 'payer',
106
+ name: "payer",
107
107
  writable: true,
108
108
  signer: true,
109
109
  },
110
110
  {
111
- name: 'block',
111
+ name: "block",
112
112
  writable: true,
113
113
  pda: {
114
114
  seeds: [
115
115
  {
116
- kind: 'const',
116
+ kind: "const",
117
117
  value: [
118
118
  98, 108, 111, 99, 107, 95, 115, 116, 111, 114, 97, 103, 101,
119
119
  ],
120
120
  },
121
121
  {
122
- kind: 'arg',
123
- path: 'block_id',
122
+ kind: "arg",
123
+ path: "block_id",
124
124
  },
125
125
  ],
126
126
  },
127
127
  },
128
128
  {
129
- name: 'contract_storage',
129
+ name: "contract_storage",
130
130
  writable: true,
131
131
  pda: {
132
132
  seeds: [
133
133
  {
134
- kind: 'const',
134
+ kind: "const",
135
135
  value: [
136
136
  99, 111, 110, 116, 114, 97, 99, 116, 95, 115, 116, 111, 114,
137
137
  97, 103, 101,
@@ -141,80 +141,80 @@ export const BRIDGE_IDL: Idl = {
141
141
  },
142
142
  },
143
143
  {
144
- name: 'system_program',
145
- address: '11111111111111111111111111111111',
144
+ name: "system_program",
145
+ address: "11111111111111111111111111111111",
146
146
  },
147
147
  ],
148
148
  args: [
149
149
  {
150
- name: 'state_update_id',
151
- type: 'u64',
150
+ name: "state_update_id",
151
+ type: "u64",
152
152
  },
153
153
  ],
154
154
  },
155
155
  {
156
- name: 'finalize_da_fact',
156
+ name: "finalize_da_fact",
157
157
  discriminator: [6, 135, 30, 141, 5, 246, 223, 58],
158
158
  accounts: [
159
159
  {
160
- name: 'payer',
160
+ name: "payer",
161
161
  writable: true,
162
162
  signer: true,
163
163
  },
164
164
  {
165
- name: 'fact_state_storage',
165
+ name: "fact_state_storage",
166
166
  writable: true,
167
167
  pda: {
168
168
  seeds: [
169
169
  {
170
- kind: 'const',
170
+ kind: "const",
171
171
  value: [
172
172
  100, 97, 95, 102, 97, 99, 116, 95, 115, 116, 111, 114, 97,
173
173
  103, 101,
174
174
  ],
175
175
  },
176
176
  {
177
- kind: 'arg',
178
- path: 'fact',
177
+ kind: "arg",
178
+ path: "fact",
179
179
  },
180
180
  ],
181
181
  },
182
182
  },
183
183
  {
184
- name: 'system_program',
185
- address: '11111111111111111111111111111111',
184
+ name: "system_program",
185
+ address: "11111111111111111111111111111111",
186
186
  },
187
187
  ],
188
188
  args: [
189
189
  {
190
- name: 'fact',
190
+ name: "fact",
191
191
  type: {
192
- array: ['u8', 32],
192
+ array: ["u8", 32],
193
193
  },
194
194
  },
195
195
  ],
196
196
  },
197
197
  {
198
- name: 'initialize',
198
+ name: "initialize",
199
199
  discriminator: [175, 175, 109, 31, 13, 152, 155, 237],
200
200
  accounts: [
201
201
  {
202
- name: 'payer',
202
+ name: "payer",
203
203
  writable: true,
204
204
  signer: true,
205
205
  },
206
206
  {
207
- name: 'program',
207
+ name: "program",
208
208
  signer: true,
209
- address: 'CVDFLCAjXhVWiPXH9nTCTpCgVzmDVoiPzNJYuccr1dqB',
209
+ address: "CVDFLCAjXhVWiPXH9nTCTpCgVzmDVoiPzNJYuccr1dqB",
210
210
  },
211
211
  {
212
- name: 'contract_storage',
212
+ name: "contract_storage",
213
213
  writable: true,
214
214
  pda: {
215
215
  seeds: [
216
216
  {
217
- kind: 'const',
217
+ kind: "const",
218
218
  value: [
219
219
  99, 111, 110, 116, 114, 97, 99, 116, 95, 115, 116, 111, 114,
220
220
  97, 103, 101,
@@ -224,65 +224,65 @@ export const BRIDGE_IDL: Idl = {
224
224
  },
225
225
  },
226
226
  {
227
- name: 'system_program',
228
- address: '11111111111111111111111111111111',
227
+ name: "system_program",
228
+ address: "11111111111111111111111111111111",
229
229
  },
230
230
  ],
231
231
  args: [
232
232
  {
233
- name: 'operator',
234
- type: 'pubkey',
233
+ name: "operator",
234
+ type: "pubkey",
235
235
  },
236
236
  {
237
- name: 'initial_app_state_commitment',
237
+ name: "initial_app_state_commitment",
238
238
  type: {
239
- array: ['u8', 32],
239
+ array: ["u8", 32],
240
240
  },
241
241
  },
242
242
  ],
243
243
  },
244
244
  {
245
- name: 'propose_block',
245
+ name: "propose_block",
246
246
  discriminator: [147, 21, 105, 53, 152, 116, 128, 187],
247
247
  accounts: [
248
248
  {
249
- name: 'operator',
249
+ name: "operator",
250
250
  writable: true,
251
251
  signer: true,
252
252
  },
253
253
  {
254
- name: 'block',
254
+ name: "block",
255
255
  writable: true,
256
256
  },
257
257
  {
258
- name: 'last_deposit',
258
+ name: "last_deposit",
259
259
  optional: true,
260
260
  pda: {
261
261
  seeds: [
262
262
  {
263
- kind: 'const',
263
+ kind: "const",
264
264
  value: [
265
265
  100, 101, 112, 111, 115, 105, 116, 95, 115, 116, 111, 114, 97,
266
266
  103, 101,
267
267
  ],
268
268
  },
269
269
  {
270
- kind: 'arg',
271
- path: 'facts.next_state_facts.last_deposit_index',
270
+ kind: "arg",
271
+ path: "facts.next_state_facts.last_deposit_index",
272
272
  },
273
273
  ],
274
274
  },
275
275
  },
276
276
  {
277
- name: 'da_fact_state',
277
+ name: "da_fact_state",
278
278
  },
279
279
  {
280
- name: 'contract_storage',
280
+ name: "contract_storage",
281
281
  writable: true,
282
282
  pda: {
283
283
  seeds: [
284
284
  {
285
- kind: 'const',
285
+ kind: "const",
286
286
  value: [
287
287
  99, 111, 110, 116, 114, 97, 99, 116, 95, 115, 116, 111, 114,
288
288
  97, 103, 101,
@@ -292,36 +292,36 @@ export const BRIDGE_IDL: Idl = {
292
292
  },
293
293
  },
294
294
  {
295
- name: 'system_program',
296
- address: '11111111111111111111111111111111',
295
+ name: "system_program",
296
+ address: "11111111111111111111111111111111",
297
297
  },
298
298
  ],
299
299
  args: [
300
300
  {
301
- name: 'facts',
301
+ name: "facts",
302
302
  type: {
303
303
  defined: {
304
- name: 'BlockFacts',
304
+ name: "BlockFacts",
305
305
  },
306
306
  },
307
307
  },
308
308
  ],
309
309
  },
310
310
  {
311
- name: 'whitelist_asset',
311
+ name: "whitelist_asset",
312
312
  discriminator: [113, 64, 172, 191, 33, 33, 57, 18],
313
313
  accounts: [
314
314
  {
315
- name: 'operator',
315
+ name: "operator",
316
316
  writable: true,
317
317
  signer: true,
318
318
  },
319
319
  {
320
- name: 'contract_storage',
320
+ name: "contract_storage",
321
321
  pda: {
322
322
  seeds: [
323
323
  {
324
- kind: 'const',
324
+ kind: "const",
325
325
  value: [
326
326
  99, 111, 110, 116, 114, 97, 99, 116, 95, 115, 116, 111, 114,
327
327
  97, 103, 101,
@@ -331,118 +331,118 @@ export const BRIDGE_IDL: Idl = {
331
331
  },
332
332
  },
333
333
  {
334
- name: 'asset_whitelisted',
334
+ name: "asset_whitelisted",
335
335
  writable: true,
336
336
  pda: {
337
337
  seeds: [
338
338
  {
339
- kind: 'const',
339
+ kind: "const",
340
340
  value: [
341
341
  97, 115, 115, 101, 116, 95, 119, 104, 105, 116, 101, 108, 105,
342
342
  115, 116, 101, 100,
343
343
  ],
344
344
  },
345
345
  {
346
- kind: 'arg',
347
- path: 'asset',
346
+ kind: "arg",
347
+ path: "asset",
348
348
  },
349
349
  ],
350
350
  },
351
351
  },
352
352
  {
353
- name: 'system_program',
354
- address: '11111111111111111111111111111111',
353
+ name: "system_program",
354
+ address: "11111111111111111111111111111111",
355
355
  },
356
356
  ],
357
357
  args: [
358
358
  {
359
- name: 'asset',
360
- type: 'pubkey',
359
+ name: "asset",
360
+ type: "pubkey",
361
361
  },
362
362
  ],
363
363
  },
364
364
  {
365
- name: 'withdraw',
365
+ name: "withdraw",
366
366
  discriminator: [183, 18, 70, 156, 148, 109, 161, 34],
367
367
  accounts: [
368
368
  {
369
- name: 'payer',
369
+ name: "payer",
370
370
  writable: true,
371
371
  signer: true,
372
372
  },
373
373
  {
374
- name: 'state_update',
374
+ name: "state_update",
375
375
  pda: {
376
376
  seeds: [
377
377
  {
378
- kind: 'const',
378
+ kind: "const",
379
379
  value: [
380
380
  98, 108, 111, 99, 107, 95, 115, 116, 111, 114, 97, 103, 101,
381
381
  ],
382
382
  },
383
383
  {
384
- kind: 'arg',
385
- path: 'claim.block_id',
384
+ kind: "arg",
385
+ path: "claim.block_id",
386
386
  },
387
387
  ],
388
388
  },
389
389
  },
390
390
  {
391
- name: 'withdrawal_nullifier',
391
+ name: "withdrawal_nullifier",
392
392
  writable: true,
393
393
  pda: {
394
394
  seeds: [
395
395
  {
396
- kind: 'const',
396
+ kind: "const",
397
397
  value: [
398
398
  119, 105, 116, 104, 100, 114, 97, 119, 97, 108, 95, 110, 117,
399
399
  108, 108, 105, 102, 105, 101, 114,
400
400
  ],
401
401
  },
402
402
  {
403
- kind: 'arg',
404
- path: 'claim.block_id',
403
+ kind: "arg",
404
+ path: "claim.block_id",
405
405
  },
406
406
  {
407
- kind: 'arg',
408
- path: 'claim.leaf_index',
407
+ kind: "arg",
408
+ path: "claim.leaf_index",
409
409
  },
410
410
  ],
411
411
  },
412
412
  },
413
413
  {
414
- name: 'from_account',
414
+ name: "from_account",
415
415
  writable: true,
416
416
  },
417
417
  {
418
- name: 'to_account',
418
+ name: "to_account",
419
419
  writable: true,
420
420
  },
421
421
  {
422
- name: 'authority',
422
+ name: "authority",
423
423
  pda: {
424
424
  seeds: [
425
425
  {
426
- kind: 'const',
426
+ kind: "const",
427
427
  value: [97, 117, 116, 104, 111, 114, 105, 116, 121],
428
428
  },
429
429
  ],
430
430
  },
431
431
  },
432
432
  {
433
- name: 'token_program',
433
+ name: "token_program",
434
434
  },
435
435
  {
436
- name: 'system_program',
437
- address: '11111111111111111111111111111111',
436
+ name: "system_program",
437
+ address: "11111111111111111111111111111111",
438
438
  },
439
439
  ],
440
440
  args: [
441
441
  {
442
- name: 'claim',
442
+ name: "claim",
443
443
  type: {
444
444
  defined: {
445
- name: 'WithdrawalClaim',
445
+ name: "WithdrawalClaim",
446
446
  },
447
447
  },
448
448
  },
@@ -451,120 +451,120 @@ export const BRIDGE_IDL: Idl = {
451
451
  ],
452
452
  accounts: [
453
453
  {
454
- name: 'AssetWhitelisted',
454
+ name: "AssetWhitelisted",
455
455
  discriminator: [170, 42, 144, 120, 189, 54, 255, 166],
456
456
  },
457
457
  {
458
- name: 'Block',
458
+ name: "Block",
459
459
  discriminator: [12, 72, 207, 108, 1, 228, 167, 221],
460
460
  },
461
461
  {
462
- name: 'ContractStorage',
462
+ name: "ContractStorage",
463
463
  discriminator: [25, 54, 49, 22, 181, 75, 2, 133],
464
464
  },
465
465
  {
466
- name: 'Deposit',
466
+ name: "Deposit",
467
467
  discriminator: [148, 146, 121, 66, 207, 173, 21, 227],
468
468
  },
469
469
  {
470
- name: 'FactStateStorage',
470
+ name: "FactStateStorage",
471
471
  discriminator: [98, 222, 3, 112, 154, 244, 201, 242],
472
472
  },
473
473
  {
474
- name: 'WithdrawalNullifier',
474
+ name: "WithdrawalNullifier",
475
475
  discriminator: [38, 166, 12, 163, 155, 29, 202, 100],
476
476
  },
477
477
  ],
478
478
  types: [
479
479
  {
480
- name: 'AssetWhitelisted',
480
+ name: "AssetWhitelisted",
481
481
  type: {
482
- kind: 'struct',
482
+ kind: "struct",
483
483
  fields: [],
484
484
  },
485
485
  },
486
486
  {
487
- name: 'Block',
487
+ name: "Block",
488
488
  type: {
489
- kind: 'struct',
489
+ kind: "struct",
490
490
  fields: [
491
491
  {
492
- name: 'facts',
492
+ name: "facts",
493
493
  type: {
494
494
  defined: {
495
- name: 'BlockFacts',
495
+ name: "BlockFacts",
496
496
  },
497
497
  },
498
498
  },
499
499
  {
500
- name: 'finalized',
501
- type: 'bool',
500
+ name: "finalized",
501
+ type: "bool",
502
502
  },
503
503
  ],
504
504
  },
505
505
  },
506
506
  {
507
- name: 'BlockFacts',
507
+ name: "BlockFacts",
508
508
  type: {
509
- kind: 'struct',
509
+ kind: "struct",
510
510
  fields: [
511
511
  {
512
- name: 'prev_state_facts',
512
+ name: "prev_state_facts",
513
513
  type: {
514
514
  defined: {
515
- name: 'StateFacts',
515
+ name: "StateFacts",
516
516
  },
517
517
  },
518
518
  },
519
519
  {
520
- name: 'next_state_facts',
520
+ name: "next_state_facts",
521
521
  type: {
522
522
  defined: {
523
- name: 'StateFacts',
523
+ name: "StateFacts",
524
524
  },
525
525
  },
526
526
  },
527
527
  {
528
- name: 'da_commitment',
528
+ name: "da_commitment",
529
529
  type: {
530
- array: ['u8', 32],
530
+ array: ["u8", 32],
531
531
  },
532
532
  },
533
533
  {
534
- name: 'withdrawal_root',
534
+ name: "withdrawal_root",
535
535
  type: {
536
- array: ['u8', 32],
536
+ array: ["u8", 32],
537
537
  },
538
538
  },
539
539
  ],
540
540
  },
541
541
  },
542
542
  {
543
- name: 'ContractStorage',
543
+ name: "ContractStorage",
544
544
  type: {
545
- kind: 'struct',
545
+ kind: "struct",
546
546
  fields: [
547
547
  {
548
- name: 'operator',
549
- type: 'pubkey',
548
+ name: "operator",
549
+ type: "pubkey",
550
550
  },
551
551
  {
552
- name: 'last_block_id',
553
- type: 'u64',
552
+ name: "last_block_id",
553
+ type: "u64",
554
554
  },
555
555
  {
556
- name: 'last_deposit_index',
557
- type: 'u64',
556
+ name: "last_deposit_index",
557
+ type: "u64",
558
558
  },
559
559
  {
560
- name: 'fina_block_id',
561
- type: 'u64',
560
+ name: "fina_block_id",
561
+ type: "u64",
562
562
  },
563
563
  {
564
- name: 'fina_state_facts',
564
+ name: "fina_state_facts",
565
565
  type: {
566
566
  defined: {
567
- name: 'StateFacts',
567
+ name: "StateFacts",
568
568
  },
569
569
  },
570
570
  },
@@ -572,51 +572,51 @@ export const BRIDGE_IDL: Idl = {
572
572
  },
573
573
  },
574
574
  {
575
- name: 'Deposit',
575
+ name: "Deposit",
576
576
  type: {
577
- kind: 'struct',
577
+ kind: "struct",
578
578
  fields: [
579
579
  {
580
- name: 'transfer',
580
+ name: "transfer",
581
581
  type: {
582
582
  defined: {
583
- name: 'TransferParams',
583
+ name: "TransferParams",
584
584
  },
585
585
  },
586
586
  },
587
587
  {
588
- name: 'prev_deposit_root',
588
+ name: "prev_deposit_root",
589
589
  type: {
590
- array: ['u8', 32],
590
+ array: ["u8", 32],
591
591
  },
592
592
  },
593
593
  ],
594
594
  },
595
595
  },
596
596
  {
597
- name: 'FactState',
597
+ name: "FactState",
598
598
  type: {
599
- kind: 'enum',
599
+ kind: "enum",
600
600
  variants: [
601
601
  {
602
- name: 'Pending',
602
+ name: "Pending",
603
603
  },
604
604
  {
605
- name: 'Finalized',
605
+ name: "Finalized",
606
606
  },
607
607
  ],
608
608
  },
609
609
  },
610
610
  {
611
- name: 'FactStateStorage',
611
+ name: "FactStateStorage",
612
612
  type: {
613
- kind: 'struct',
613
+ kind: "struct",
614
614
  fields: [
615
615
  {
616
- name: 'state',
616
+ name: "state",
617
617
  type: {
618
618
  defined: {
619
- name: 'FactState',
619
+ name: "FactState",
620
620
  },
621
621
  },
622
622
  },
@@ -624,77 +624,77 @@ export const BRIDGE_IDL: Idl = {
624
624
  },
625
625
  },
626
626
  {
627
- name: 'StateFacts',
627
+ name: "StateFacts",
628
628
  type: {
629
- kind: 'struct',
629
+ kind: "struct",
630
630
  fields: [
631
631
  {
632
- name: 'app_state_commitment',
632
+ name: "app_state_commitment",
633
633
  type: {
634
- array: ['u8', 32],
634
+ array: ["u8", 32],
635
635
  },
636
636
  },
637
637
  {
638
- name: 'deposit_root',
638
+ name: "deposit_root",
639
639
  type: {
640
- array: ['u8', 32],
640
+ array: ["u8", 32],
641
641
  },
642
642
  },
643
643
  {
644
- name: 'last_deposit_index',
645
- type: 'u64',
644
+ name: "last_deposit_index",
645
+ type: "u64",
646
646
  },
647
647
  {
648
- name: 'last_action_id',
649
- type: 'u64',
648
+ name: "last_action_id",
649
+ type: "u64",
650
650
  },
651
651
  ],
652
652
  },
653
653
  },
654
654
  {
655
- name: 'TransferParams',
655
+ name: "TransferParams",
656
656
  type: {
657
- kind: 'struct',
657
+ kind: "struct",
658
658
  fields: [
659
659
  {
660
- name: 'user',
661
- type: 'pubkey',
660
+ name: "user",
661
+ type: "pubkey",
662
662
  },
663
663
  {
664
- name: 'mint',
665
- type: 'pubkey',
664
+ name: "mint",
665
+ type: "pubkey",
666
666
  },
667
667
  {
668
- name: 'amount',
669
- type: 'u64',
668
+ name: "amount",
669
+ type: "u64",
670
670
  },
671
671
  ],
672
672
  },
673
673
  },
674
674
  {
675
- name: 'WithdrawalClaim',
675
+ name: "WithdrawalClaim",
676
676
  type: {
677
- kind: 'struct',
677
+ kind: "struct",
678
678
  fields: [
679
679
  {
680
- name: 'user',
681
- type: 'pubkey',
680
+ name: "user",
681
+ type: "pubkey",
682
682
  },
683
683
  {
684
- name: 'amount',
685
- type: 'u64',
684
+ name: "amount",
685
+ type: "u64",
686
686
  },
687
687
  {
688
- name: 'block_id',
689
- type: 'u64',
688
+ name: "block_id",
689
+ type: "u64",
690
690
  },
691
691
  ],
692
692
  },
693
693
  },
694
694
  {
695
- name: 'WithdrawalNullifier',
695
+ name: "WithdrawalNullifier",
696
696
  type: {
697
- kind: 'struct',
697
+ kind: "struct",
698
698
  fields: [],
699
699
  },
700
700
  },