@n1xyz/nord-ts 0.0.4 → 0.0.5

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 +16 -16
  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
@@ -2,72 +2,72 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BRIDGE_IDL = void 0;
4
4
  exports.BRIDGE_IDL = {
5
- address: '',
5
+ address: "",
6
6
  metadata: {
7
- name: 'bridge',
8
- version: '0.1.0',
9
- spec: '0.1.0',
10
- description: 'Created with Anchor',
7
+ name: "bridge",
8
+ version: "0.1.0",
9
+ spec: "0.1.0",
10
+ description: "Created with Anchor",
11
11
  },
12
12
  instructions: [
13
13
  {
14
- name: 'deposit_spl',
14
+ name: "deposit_spl",
15
15
  discriminator: [224, 0, 198, 175, 198, 47, 105, 204],
16
16
  accounts: [
17
17
  {
18
- name: 'depositor',
18
+ name: "depositor",
19
19
  writable: true,
20
20
  signer: true,
21
21
  },
22
22
  {
23
- name: 'deposit',
23
+ name: "deposit",
24
24
  writable: true,
25
25
  },
26
26
  {
27
- name: 'prev_deposit',
27
+ name: "prev_deposit",
28
28
  optional: true,
29
29
  pda: {
30
30
  seeds: [
31
31
  {
32
- kind: 'const',
32
+ kind: "const",
33
33
  value: [
34
34
  100, 101, 112, 111, 115, 105, 116, 95, 115, 116, 111, 114, 97,
35
35
  103, 101,
36
36
  ],
37
37
  },
38
38
  {
39
- kind: 'account',
40
- path: 'contract_storage.last_deposit_index',
41
- account: 'ContractStorage',
39
+ kind: "account",
40
+ path: "contract_storage.last_deposit_index",
41
+ account: "ContractStorage",
42
42
  },
43
43
  ],
44
44
  },
45
45
  },
46
46
  {
47
- name: 'asset_whitelisted',
47
+ name: "asset_whitelisted",
48
48
  pda: {
49
49
  seeds: [
50
50
  {
51
- kind: 'const',
51
+ kind: "const",
52
52
  value: [
53
53
  97, 115, 115, 101, 116, 95, 119, 104, 105, 116, 101, 108, 105,
54
54
  115, 116, 101, 100,
55
55
  ],
56
56
  },
57
57
  {
58
- kind: 'account',
59
- path: 'from_account.mint',
58
+ kind: "account",
59
+ path: "from_account.mint",
60
60
  },
61
61
  ],
62
62
  },
63
63
  },
64
64
  {
65
- name: 'contract_storage',
65
+ name: "contract_storage",
66
66
  writable: true,
67
67
  pda: {
68
68
  seeds: [
69
69
  {
70
- kind: 'const',
70
+ kind: "const",
71
71
  value: [
72
72
  99, 111, 110, 116, 114, 97, 99, 116, 95, 115, 116, 111, 114,
73
73
  97, 103, 101,
@@ -77,62 +77,62 @@ exports.BRIDGE_IDL = {
77
77
  },
78
78
  },
79
79
  {
80
- name: 'from_account',
80
+ name: "from_account",
81
81
  writable: true,
82
82
  },
83
83
  {
84
- name: 'to_account',
84
+ name: "to_account",
85
85
  writable: true,
86
86
  },
87
87
  {
88
- name: 'token_program',
88
+ name: "token_program",
89
89
  },
90
90
  {
91
- name: 'system_program',
92
- address: '11111111111111111111111111111111',
91
+ name: "system_program",
92
+ address: "11111111111111111111111111111111",
93
93
  },
94
94
  ],
95
95
  args: [
96
96
  {
97
- name: 'amount',
98
- type: 'u64',
97
+ name: "amount",
98
+ type: "u64",
99
99
  },
100
100
  ],
101
101
  },
102
102
  {
103
- name: 'finalize_block',
103
+ name: "finalize_block",
104
104
  discriminator: [63, 101, 92, 132, 135, 251, 98, 177],
105
105
  accounts: [
106
106
  {
107
- name: 'payer',
107
+ name: "payer",
108
108
  writable: true,
109
109
  signer: true,
110
110
  },
111
111
  {
112
- name: 'block',
112
+ name: "block",
113
113
  writable: true,
114
114
  pda: {
115
115
  seeds: [
116
116
  {
117
- kind: 'const',
117
+ kind: "const",
118
118
  value: [
119
119
  98, 108, 111, 99, 107, 95, 115, 116, 111, 114, 97, 103, 101,
120
120
  ],
121
121
  },
122
122
  {
123
- kind: 'arg',
124
- path: 'block_id',
123
+ kind: "arg",
124
+ path: "block_id",
125
125
  },
126
126
  ],
127
127
  },
128
128
  },
129
129
  {
130
- name: 'contract_storage',
130
+ name: "contract_storage",
131
131
  writable: true,
132
132
  pda: {
133
133
  seeds: [
134
134
  {
135
- kind: 'const',
135
+ kind: "const",
136
136
  value: [
137
137
  99, 111, 110, 116, 114, 97, 99, 116, 95, 115, 116, 111, 114,
138
138
  97, 103, 101,
@@ -142,80 +142,80 @@ exports.BRIDGE_IDL = {
142
142
  },
143
143
  },
144
144
  {
145
- name: 'system_program',
146
- address: '11111111111111111111111111111111',
145
+ name: "system_program",
146
+ address: "11111111111111111111111111111111",
147
147
  },
148
148
  ],
149
149
  args: [
150
150
  {
151
- name: 'state_update_id',
152
- type: 'u64',
151
+ name: "state_update_id",
152
+ type: "u64",
153
153
  },
154
154
  ],
155
155
  },
156
156
  {
157
- name: 'finalize_da_fact',
157
+ name: "finalize_da_fact",
158
158
  discriminator: [6, 135, 30, 141, 5, 246, 223, 58],
159
159
  accounts: [
160
160
  {
161
- name: 'payer',
161
+ name: "payer",
162
162
  writable: true,
163
163
  signer: true,
164
164
  },
165
165
  {
166
- name: 'fact_state_storage',
166
+ name: "fact_state_storage",
167
167
  writable: true,
168
168
  pda: {
169
169
  seeds: [
170
170
  {
171
- kind: 'const',
171
+ kind: "const",
172
172
  value: [
173
173
  100, 97, 95, 102, 97, 99, 116, 95, 115, 116, 111, 114, 97,
174
174
  103, 101,
175
175
  ],
176
176
  },
177
177
  {
178
- kind: 'arg',
179
- path: 'fact',
178
+ kind: "arg",
179
+ path: "fact",
180
180
  },
181
181
  ],
182
182
  },
183
183
  },
184
184
  {
185
- name: 'system_program',
186
- address: '11111111111111111111111111111111',
185
+ name: "system_program",
186
+ address: "11111111111111111111111111111111",
187
187
  },
188
188
  ],
189
189
  args: [
190
190
  {
191
- name: 'fact',
191
+ name: "fact",
192
192
  type: {
193
- array: ['u8', 32],
193
+ array: ["u8", 32],
194
194
  },
195
195
  },
196
196
  ],
197
197
  },
198
198
  {
199
- name: 'initialize',
199
+ name: "initialize",
200
200
  discriminator: [175, 175, 109, 31, 13, 152, 155, 237],
201
201
  accounts: [
202
202
  {
203
- name: 'payer',
203
+ name: "payer",
204
204
  writable: true,
205
205
  signer: true,
206
206
  },
207
207
  {
208
- name: 'program',
208
+ name: "program",
209
209
  signer: true,
210
- address: 'CVDFLCAjXhVWiPXH9nTCTpCgVzmDVoiPzNJYuccr1dqB',
210
+ address: "CVDFLCAjXhVWiPXH9nTCTpCgVzmDVoiPzNJYuccr1dqB",
211
211
  },
212
212
  {
213
- name: 'contract_storage',
213
+ name: "contract_storage",
214
214
  writable: true,
215
215
  pda: {
216
216
  seeds: [
217
217
  {
218
- kind: 'const',
218
+ kind: "const",
219
219
  value: [
220
220
  99, 111, 110, 116, 114, 97, 99, 116, 95, 115, 116, 111, 114,
221
221
  97, 103, 101,
@@ -225,65 +225,65 @@ exports.BRIDGE_IDL = {
225
225
  },
226
226
  },
227
227
  {
228
- name: 'system_program',
229
- address: '11111111111111111111111111111111',
228
+ name: "system_program",
229
+ address: "11111111111111111111111111111111",
230
230
  },
231
231
  ],
232
232
  args: [
233
233
  {
234
- name: 'operator',
235
- type: 'pubkey',
234
+ name: "operator",
235
+ type: "pubkey",
236
236
  },
237
237
  {
238
- name: 'initial_app_state_commitment',
238
+ name: "initial_app_state_commitment",
239
239
  type: {
240
- array: ['u8', 32],
240
+ array: ["u8", 32],
241
241
  },
242
242
  },
243
243
  ],
244
244
  },
245
245
  {
246
- name: 'propose_block',
246
+ name: "propose_block",
247
247
  discriminator: [147, 21, 105, 53, 152, 116, 128, 187],
248
248
  accounts: [
249
249
  {
250
- name: 'operator',
250
+ name: "operator",
251
251
  writable: true,
252
252
  signer: true,
253
253
  },
254
254
  {
255
- name: 'block',
255
+ name: "block",
256
256
  writable: true,
257
257
  },
258
258
  {
259
- name: 'last_deposit',
259
+ name: "last_deposit",
260
260
  optional: true,
261
261
  pda: {
262
262
  seeds: [
263
263
  {
264
- kind: 'const',
264
+ kind: "const",
265
265
  value: [
266
266
  100, 101, 112, 111, 115, 105, 116, 95, 115, 116, 111, 114, 97,
267
267
  103, 101,
268
268
  ],
269
269
  },
270
270
  {
271
- kind: 'arg',
272
- path: 'facts.next_state_facts.last_deposit_index',
271
+ kind: "arg",
272
+ path: "facts.next_state_facts.last_deposit_index",
273
273
  },
274
274
  ],
275
275
  },
276
276
  },
277
277
  {
278
- name: 'da_fact_state',
278
+ name: "da_fact_state",
279
279
  },
280
280
  {
281
- name: 'contract_storage',
281
+ name: "contract_storage",
282
282
  writable: true,
283
283
  pda: {
284
284
  seeds: [
285
285
  {
286
- kind: 'const',
286
+ kind: "const",
287
287
  value: [
288
288
  99, 111, 110, 116, 114, 97, 99, 116, 95, 115, 116, 111, 114,
289
289
  97, 103, 101,
@@ -293,36 +293,36 @@ exports.BRIDGE_IDL = {
293
293
  },
294
294
  },
295
295
  {
296
- name: 'system_program',
297
- address: '11111111111111111111111111111111',
296
+ name: "system_program",
297
+ address: "11111111111111111111111111111111",
298
298
  },
299
299
  ],
300
300
  args: [
301
301
  {
302
- name: 'facts',
302
+ name: "facts",
303
303
  type: {
304
304
  defined: {
305
- name: 'BlockFacts',
305
+ name: "BlockFacts",
306
306
  },
307
307
  },
308
308
  },
309
309
  ],
310
310
  },
311
311
  {
312
- name: 'whitelist_asset',
312
+ name: "whitelist_asset",
313
313
  discriminator: [113, 64, 172, 191, 33, 33, 57, 18],
314
314
  accounts: [
315
315
  {
316
- name: 'operator',
316
+ name: "operator",
317
317
  writable: true,
318
318
  signer: true,
319
319
  },
320
320
  {
321
- name: 'contract_storage',
321
+ name: "contract_storage",
322
322
  pda: {
323
323
  seeds: [
324
324
  {
325
- kind: 'const',
325
+ kind: "const",
326
326
  value: [
327
327
  99, 111, 110, 116, 114, 97, 99, 116, 95, 115, 116, 111, 114,
328
328
  97, 103, 101,
@@ -332,118 +332,118 @@ exports.BRIDGE_IDL = {
332
332
  },
333
333
  },
334
334
  {
335
- name: 'asset_whitelisted',
335
+ name: "asset_whitelisted",
336
336
  writable: true,
337
337
  pda: {
338
338
  seeds: [
339
339
  {
340
- kind: 'const',
340
+ kind: "const",
341
341
  value: [
342
342
  97, 115, 115, 101, 116, 95, 119, 104, 105, 116, 101, 108, 105,
343
343
  115, 116, 101, 100,
344
344
  ],
345
345
  },
346
346
  {
347
- kind: 'arg',
348
- path: 'asset',
347
+ kind: "arg",
348
+ path: "asset",
349
349
  },
350
350
  ],
351
351
  },
352
352
  },
353
353
  {
354
- name: 'system_program',
355
- address: '11111111111111111111111111111111',
354
+ name: "system_program",
355
+ address: "11111111111111111111111111111111",
356
356
  },
357
357
  ],
358
358
  args: [
359
359
  {
360
- name: 'asset',
361
- type: 'pubkey',
360
+ name: "asset",
361
+ type: "pubkey",
362
362
  },
363
363
  ],
364
364
  },
365
365
  {
366
- name: 'withdraw',
366
+ name: "withdraw",
367
367
  discriminator: [183, 18, 70, 156, 148, 109, 161, 34],
368
368
  accounts: [
369
369
  {
370
- name: 'payer',
370
+ name: "payer",
371
371
  writable: true,
372
372
  signer: true,
373
373
  },
374
374
  {
375
- name: 'state_update',
375
+ name: "state_update",
376
376
  pda: {
377
377
  seeds: [
378
378
  {
379
- kind: 'const',
379
+ kind: "const",
380
380
  value: [
381
381
  98, 108, 111, 99, 107, 95, 115, 116, 111, 114, 97, 103, 101,
382
382
  ],
383
383
  },
384
384
  {
385
- kind: 'arg',
386
- path: 'claim.block_id',
385
+ kind: "arg",
386
+ path: "claim.block_id",
387
387
  },
388
388
  ],
389
389
  },
390
390
  },
391
391
  {
392
- name: 'withdrawal_nullifier',
392
+ name: "withdrawal_nullifier",
393
393
  writable: true,
394
394
  pda: {
395
395
  seeds: [
396
396
  {
397
- kind: 'const',
397
+ kind: "const",
398
398
  value: [
399
399
  119, 105, 116, 104, 100, 114, 97, 119, 97, 108, 95, 110, 117,
400
400
  108, 108, 105, 102, 105, 101, 114,
401
401
  ],
402
402
  },
403
403
  {
404
- kind: 'arg',
405
- path: 'claim.block_id',
404
+ kind: "arg",
405
+ path: "claim.block_id",
406
406
  },
407
407
  {
408
- kind: 'arg',
409
- path: 'claim.leaf_index',
408
+ kind: "arg",
409
+ path: "claim.leaf_index",
410
410
  },
411
411
  ],
412
412
  },
413
413
  },
414
414
  {
415
- name: 'from_account',
415
+ name: "from_account",
416
416
  writable: true,
417
417
  },
418
418
  {
419
- name: 'to_account',
419
+ name: "to_account",
420
420
  writable: true,
421
421
  },
422
422
  {
423
- name: 'authority',
423
+ name: "authority",
424
424
  pda: {
425
425
  seeds: [
426
426
  {
427
- kind: 'const',
427
+ kind: "const",
428
428
  value: [97, 117, 116, 104, 111, 114, 105, 116, 121],
429
429
  },
430
430
  ],
431
431
  },
432
432
  },
433
433
  {
434
- name: 'token_program',
434
+ name: "token_program",
435
435
  },
436
436
  {
437
- name: 'system_program',
438
- address: '11111111111111111111111111111111',
437
+ name: "system_program",
438
+ address: "11111111111111111111111111111111",
439
439
  },
440
440
  ],
441
441
  args: [
442
442
  {
443
- name: 'claim',
443
+ name: "claim",
444
444
  type: {
445
445
  defined: {
446
- name: 'WithdrawalClaim',
446
+ name: "WithdrawalClaim",
447
447
  },
448
448
  },
449
449
  },
@@ -452,120 +452,120 @@ exports.BRIDGE_IDL = {
452
452
  ],
453
453
  accounts: [
454
454
  {
455
- name: 'AssetWhitelisted',
455
+ name: "AssetWhitelisted",
456
456
  discriminator: [170, 42, 144, 120, 189, 54, 255, 166],
457
457
  },
458
458
  {
459
- name: 'Block',
459
+ name: "Block",
460
460
  discriminator: [12, 72, 207, 108, 1, 228, 167, 221],
461
461
  },
462
462
  {
463
- name: 'ContractStorage',
463
+ name: "ContractStorage",
464
464
  discriminator: [25, 54, 49, 22, 181, 75, 2, 133],
465
465
  },
466
466
  {
467
- name: 'Deposit',
467
+ name: "Deposit",
468
468
  discriminator: [148, 146, 121, 66, 207, 173, 21, 227],
469
469
  },
470
470
  {
471
- name: 'FactStateStorage',
471
+ name: "FactStateStorage",
472
472
  discriminator: [98, 222, 3, 112, 154, 244, 201, 242],
473
473
  },
474
474
  {
475
- name: 'WithdrawalNullifier',
475
+ name: "WithdrawalNullifier",
476
476
  discriminator: [38, 166, 12, 163, 155, 29, 202, 100],
477
477
  },
478
478
  ],
479
479
  types: [
480
480
  {
481
- name: 'AssetWhitelisted',
481
+ name: "AssetWhitelisted",
482
482
  type: {
483
- kind: 'struct',
483
+ kind: "struct",
484
484
  fields: [],
485
485
  },
486
486
  },
487
487
  {
488
- name: 'Block',
488
+ name: "Block",
489
489
  type: {
490
- kind: 'struct',
490
+ kind: "struct",
491
491
  fields: [
492
492
  {
493
- name: 'facts',
493
+ name: "facts",
494
494
  type: {
495
495
  defined: {
496
- name: 'BlockFacts',
496
+ name: "BlockFacts",
497
497
  },
498
498
  },
499
499
  },
500
500
  {
501
- name: 'finalized',
502
- type: 'bool',
501
+ name: "finalized",
502
+ type: "bool",
503
503
  },
504
504
  ],
505
505
  },
506
506
  },
507
507
  {
508
- name: 'BlockFacts',
508
+ name: "BlockFacts",
509
509
  type: {
510
- kind: 'struct',
510
+ kind: "struct",
511
511
  fields: [
512
512
  {
513
- name: 'prev_state_facts',
513
+ name: "prev_state_facts",
514
514
  type: {
515
515
  defined: {
516
- name: 'StateFacts',
516
+ name: "StateFacts",
517
517
  },
518
518
  },
519
519
  },
520
520
  {
521
- name: 'next_state_facts',
521
+ name: "next_state_facts",
522
522
  type: {
523
523
  defined: {
524
- name: 'StateFacts',
524
+ name: "StateFacts",
525
525
  },
526
526
  },
527
527
  },
528
528
  {
529
- name: 'da_commitment',
529
+ name: "da_commitment",
530
530
  type: {
531
- array: ['u8', 32],
531
+ array: ["u8", 32],
532
532
  },
533
533
  },
534
534
  {
535
- name: 'withdrawal_root',
535
+ name: "withdrawal_root",
536
536
  type: {
537
- array: ['u8', 32],
537
+ array: ["u8", 32],
538
538
  },
539
539
  },
540
540
  ],
541
541
  },
542
542
  },
543
543
  {
544
- name: 'ContractStorage',
544
+ name: "ContractStorage",
545
545
  type: {
546
- kind: 'struct',
546
+ kind: "struct",
547
547
  fields: [
548
548
  {
549
- name: 'operator',
550
- type: 'pubkey',
549
+ name: "operator",
550
+ type: "pubkey",
551
551
  },
552
552
  {
553
- name: 'last_block_id',
554
- type: 'u64',
553
+ name: "last_block_id",
554
+ type: "u64",
555
555
  },
556
556
  {
557
- name: 'last_deposit_index',
558
- type: 'u64',
557
+ name: "last_deposit_index",
558
+ type: "u64",
559
559
  },
560
560
  {
561
- name: 'fina_block_id',
562
- type: 'u64',
561
+ name: "fina_block_id",
562
+ type: "u64",
563
563
  },
564
564
  {
565
- name: 'fina_state_facts',
565
+ name: "fina_state_facts",
566
566
  type: {
567
567
  defined: {
568
- name: 'StateFacts',
568
+ name: "StateFacts",
569
569
  },
570
570
  },
571
571
  },
@@ -573,51 +573,51 @@ exports.BRIDGE_IDL = {
573
573
  },
574
574
  },
575
575
  {
576
- name: 'Deposit',
576
+ name: "Deposit",
577
577
  type: {
578
- kind: 'struct',
578
+ kind: "struct",
579
579
  fields: [
580
580
  {
581
- name: 'transfer',
581
+ name: "transfer",
582
582
  type: {
583
583
  defined: {
584
- name: 'TransferParams',
584
+ name: "TransferParams",
585
585
  },
586
586
  },
587
587
  },
588
588
  {
589
- name: 'prev_deposit_root',
589
+ name: "prev_deposit_root",
590
590
  type: {
591
- array: ['u8', 32],
591
+ array: ["u8", 32],
592
592
  },
593
593
  },
594
594
  ],
595
595
  },
596
596
  },
597
597
  {
598
- name: 'FactState',
598
+ name: "FactState",
599
599
  type: {
600
- kind: 'enum',
600
+ kind: "enum",
601
601
  variants: [
602
602
  {
603
- name: 'Pending',
603
+ name: "Pending",
604
604
  },
605
605
  {
606
- name: 'Finalized',
606
+ name: "Finalized",
607
607
  },
608
608
  ],
609
609
  },
610
610
  },
611
611
  {
612
- name: 'FactStateStorage',
612
+ name: "FactStateStorage",
613
613
  type: {
614
- kind: 'struct',
614
+ kind: "struct",
615
615
  fields: [
616
616
  {
617
- name: 'state',
617
+ name: "state",
618
618
  type: {
619
619
  defined: {
620
- name: 'FactState',
620
+ name: "FactState",
621
621
  },
622
622
  },
623
623
  },
@@ -625,77 +625,77 @@ exports.BRIDGE_IDL = {
625
625
  },
626
626
  },
627
627
  {
628
- name: 'StateFacts',
628
+ name: "StateFacts",
629
629
  type: {
630
- kind: 'struct',
630
+ kind: "struct",
631
631
  fields: [
632
632
  {
633
- name: 'app_state_commitment',
633
+ name: "app_state_commitment",
634
634
  type: {
635
- array: ['u8', 32],
635
+ array: ["u8", 32],
636
636
  },
637
637
  },
638
638
  {
639
- name: 'deposit_root',
639
+ name: "deposit_root",
640
640
  type: {
641
- array: ['u8', 32],
641
+ array: ["u8", 32],
642
642
  },
643
643
  },
644
644
  {
645
- name: 'last_deposit_index',
646
- type: 'u64',
645
+ name: "last_deposit_index",
646
+ type: "u64",
647
647
  },
648
648
  {
649
- name: 'last_action_id',
650
- type: 'u64',
649
+ name: "last_action_id",
650
+ type: "u64",
651
651
  },
652
652
  ],
653
653
  },
654
654
  },
655
655
  {
656
- name: 'TransferParams',
656
+ name: "TransferParams",
657
657
  type: {
658
- kind: 'struct',
658
+ kind: "struct",
659
659
  fields: [
660
660
  {
661
- name: 'user',
662
- type: 'pubkey',
661
+ name: "user",
662
+ type: "pubkey",
663
663
  },
664
664
  {
665
- name: 'mint',
666
- type: 'pubkey',
665
+ name: "mint",
666
+ type: "pubkey",
667
667
  },
668
668
  {
669
- name: 'amount',
670
- type: 'u64',
669
+ name: "amount",
670
+ type: "u64",
671
671
  },
672
672
  ],
673
673
  },
674
674
  },
675
675
  {
676
- name: 'WithdrawalClaim',
676
+ name: "WithdrawalClaim",
677
677
  type: {
678
- kind: 'struct',
678
+ kind: "struct",
679
679
  fields: [
680
680
  {
681
- name: 'user',
682
- type: 'pubkey',
681
+ name: "user",
682
+ type: "pubkey",
683
683
  },
684
684
  {
685
- name: 'amount',
686
- type: 'u64',
685
+ name: "amount",
686
+ type: "u64",
687
687
  },
688
688
  {
689
- name: 'block_id',
690
- type: 'u64',
689
+ name: "block_id",
690
+ type: "u64",
691
691
  },
692
692
  ],
693
693
  },
694
694
  },
695
695
  {
696
- name: 'WithdrawalNullifier',
696
+ name: "WithdrawalNullifier",
697
697
  type: {
698
- kind: 'struct',
698
+ kind: "struct",
699
699
  fields: [],
700
700
  },
701
701
  },