├── .gitignore ├── Anchor.toml ├── Cargo.lock ├── Cargo.toml ├── README.md ├── app └── cli │ ├── .gitignore │ ├── README.md │ ├── commands │ ├── closeConnection.ts │ ├── getAllConnections.ts │ ├── getAllConnectionsFrom.ts │ ├── getAllConnectionsTo.ts │ ├── makeConnection.ts │ └── revokeConnection.ts │ ├── index.ts │ ├── package.json │ ├── tools │ ├── logging │ │ └── winston.ts │ └── wallet.ts │ ├── tsconfig.json │ └── yarn.lock ├── license.md ├── migrations └── deploy.ts ├── package.json ├── programs └── graph_program │ ├── Cargo.toml │ ├── Xargo.toml │ └── src │ ├── constants │ ├── mod.rs │ └── seeds.rs │ ├── errors │ ├── graph_error.rs │ └── mod.rs │ ├── instructions │ ├── close_connection.rs │ ├── make_connection.rs │ ├── mod.rs │ └── revoke_connection.rs │ ├── lib.rs │ └── state │ ├── connection.rs │ └── mod.rs ├── sdk ├── .gitignore ├── README.md ├── index.ts ├── package.json ├── src │ ├── index.ts │ ├── lib │ │ └── helpers │ │ │ ├── index.ts │ │ │ ├── pda.ts │ │ │ └── string.ts │ ├── program.ts │ └── queries.ts ├── tsconfig.json └── yarn.lock ├── tests ├── graph-program.ts └── helpers │ └── string.ts ├── tsconfig.json ├── yarn-error.log └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .anchor 3 | .DS_Store 4 | target 5 | **/*.rs.bk 6 | node_modules 7 | 8 | grphSXQnjAoPXSG5p1aJ7ZFw2A1akqP3pkXvjfbSJef.json 9 | grphAFGNvCjLKHeEmPNa91eGJChcUhrdaYYharcZCTQ.json 10 | hoLa3t1FsYMyQJTiFnoJ8HWuvMhSVuR8jXtxRRsVrNp.json 11 | 12 | id.json -------------------------------------------------------------------------------- /Anchor.toml: -------------------------------------------------------------------------------- 1 | [features] 2 | seeds = true 3 | 4 | [workspace] 5 | members = ["programs/graph_program"] 6 | 7 | [programs.localnet] 8 | graph_program = "grphAFGNvCjLKHeEmPNa91eGJChcUhrdaYYharcZCTQ" 9 | 10 | [programs.devnet] 11 | graph_program = "grphAFGNvCjLKHeEmPNa91eGJChcUhrdaYYharcZCTQ" 12 | 13 | [programs.mainnet] 14 | graph_program = "grphAFGNvCjLKHeEmPNa91eGJChcUhrdaYYharcZCTQ" 15 | 16 | [registry] 17 | url = "https://anchor.projectserum.com" 18 | 19 | [provider] 20 | cluster = "localnet" 21 | wallet = "~/.config/solana/id.json" 22 | 23 | [scripts] 24 | test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" 25 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ahash" 7 | version = "0.7.6" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 10 | dependencies = [ 11 | "getrandom 0.2.4", 12 | "once_cell", 13 | "version_check", 14 | ] 15 | 16 | [[package]] 17 | name = "aho-corasick" 18 | version = "0.7.18" 19 | source = "registry+https://github.com/rust-lang/crates.io-index" 20 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 21 | dependencies = [ 22 | "memchr", 23 | ] 24 | 25 | [[package]] 26 | name = "anchor-attribute-access-control" 27 | version = "0.25.0" 28 | source = "registry+https://github.com/rust-lang/crates.io-index" 29 | checksum = "70f6ee9518f50ff4d434471ccf569186022bdd5ef65a21d14da3ea5231af944f" 30 | dependencies = [ 31 | "anchor-syn", 32 | "anyhow", 33 | "proc-macro2", 34 | "quote", 35 | "regex", 36 | "syn", 37 | ] 38 | 39 | [[package]] 40 | name = "anchor-attribute-account" 41 | version = "0.25.0" 42 | source = "registry+https://github.com/rust-lang/crates.io-index" 43 | checksum = "32c92bcf5388b52676d990f85bbfd838a8f5672393135063a50dc79b2b837c79" 44 | dependencies = [ 45 | "anchor-syn", 46 | "anyhow", 47 | "bs58 0.4.0", 48 | "proc-macro2", 49 | "quote", 50 | "rustversion", 51 | "syn", 52 | ] 53 | 54 | [[package]] 55 | name = "anchor-attribute-constant" 56 | version = "0.25.0" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | checksum = "0844974ac35e8ced62056b0d63777ebcdc5807438b8b189c881e2b647450b70a" 59 | dependencies = [ 60 | "anchor-syn", 61 | "proc-macro2", 62 | "syn", 63 | ] 64 | 65 | [[package]] 66 | name = "anchor-attribute-error" 67 | version = "0.25.0" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "0f7467345e67a6f1d4b862b9763a4160ad89d18c247b8c902807768f7b6e23df" 70 | dependencies = [ 71 | "anchor-syn", 72 | "proc-macro2", 73 | "quote", 74 | "syn", 75 | ] 76 | 77 | [[package]] 78 | name = "anchor-attribute-event" 79 | version = "0.25.0" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "8774e4c1ac71f71a5aea7e4932fb69c30e3b8155c4fa59fd69401195434528a9" 82 | dependencies = [ 83 | "anchor-syn", 84 | "anyhow", 85 | "proc-macro2", 86 | "quote", 87 | "syn", 88 | ] 89 | 90 | [[package]] 91 | name = "anchor-attribute-interface" 92 | version = "0.25.0" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | checksum = "90eeb6e1c80f9f94fcef93a52813f6472186200e275e83cb3fac92b801de92f7" 95 | dependencies = [ 96 | "anchor-syn", 97 | "anyhow", 98 | "heck", 99 | "proc-macro2", 100 | "quote", 101 | "syn", 102 | ] 103 | 104 | [[package]] 105 | name = "anchor-attribute-program" 106 | version = "0.25.0" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | checksum = "ac515a7a5a4fea7fc768b1cec40ddb948e148ea657637c75f94f283212326cb9" 109 | dependencies = [ 110 | "anchor-syn", 111 | "anyhow", 112 | "proc-macro2", 113 | "quote", 114 | "syn", 115 | ] 116 | 117 | [[package]] 118 | name = "anchor-attribute-state" 119 | version = "0.25.0" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | checksum = "43dc667b62ff71450f19dcfcc37b0c408fd4ddd89e8650368c2b0984b110603f" 122 | dependencies = [ 123 | "anchor-syn", 124 | "anyhow", 125 | "proc-macro2", 126 | "quote", 127 | "syn", 128 | ] 129 | 130 | [[package]] 131 | name = "anchor-derive-accounts" 132 | version = "0.25.0" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | checksum = "7354d583a06701d24800a8ec4c2b0491f62581a331af349205e23421e0b56643" 135 | dependencies = [ 136 | "anchor-syn", 137 | "anyhow", 138 | "proc-macro2", 139 | "quote", 140 | "syn", 141 | ] 142 | 143 | [[package]] 144 | name = "anchor-lang" 145 | version = "0.25.0" 146 | source = "registry+https://github.com/rust-lang/crates.io-index" 147 | checksum = "ff5f57ec5e12fa6874b27f3d5c1f6f44302d3ad86c1266197ff7611bf6f5d251" 148 | dependencies = [ 149 | "anchor-attribute-access-control", 150 | "anchor-attribute-account", 151 | "anchor-attribute-constant", 152 | "anchor-attribute-error", 153 | "anchor-attribute-event", 154 | "anchor-attribute-interface", 155 | "anchor-attribute-program", 156 | "anchor-attribute-state", 157 | "anchor-derive-accounts", 158 | "arrayref", 159 | "base64 0.13.0", 160 | "bincode", 161 | "borsh", 162 | "bytemuck", 163 | "solana-program", 164 | "thiserror", 165 | ] 166 | 167 | [[package]] 168 | name = "anchor-syn" 169 | version = "0.25.0" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "55aa1e680d9471342122ed5b6bc13bf5da473b0f7e4677d41a6954e5cc8ad155" 172 | dependencies = [ 173 | "anyhow", 174 | "bs58 0.3.1", 175 | "heck", 176 | "proc-macro2", 177 | "proc-macro2-diagnostics", 178 | "quote", 179 | "serde", 180 | "serde_json", 181 | "sha2 0.9.9", 182 | "syn", 183 | "thiserror", 184 | ] 185 | 186 | [[package]] 187 | name = "anyhow" 188 | version = "1.0.53" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0" 191 | 192 | [[package]] 193 | name = "arrayref" 194 | version = "0.3.6" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" 197 | 198 | [[package]] 199 | name = "arrayvec" 200 | version = "0.7.2" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" 203 | 204 | [[package]] 205 | name = "autocfg" 206 | version = "1.1.0" 207 | source = "registry+https://github.com/rust-lang/crates.io-index" 208 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 209 | 210 | [[package]] 211 | name = "base64" 212 | version = "0.12.3" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" 215 | 216 | [[package]] 217 | name = "base64" 218 | version = "0.13.0" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 221 | 222 | [[package]] 223 | name = "bincode" 224 | version = "1.3.3" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 227 | dependencies = [ 228 | "serde", 229 | ] 230 | 231 | [[package]] 232 | name = "bitflags" 233 | version = "1.3.2" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 236 | 237 | [[package]] 238 | name = "bitmaps" 239 | version = "2.1.0" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" 242 | dependencies = [ 243 | "typenum", 244 | ] 245 | 246 | [[package]] 247 | name = "blake3" 248 | version = "1.3.1" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f" 251 | dependencies = [ 252 | "arrayref", 253 | "arrayvec", 254 | "cc", 255 | "cfg-if", 256 | "constant_time_eq", 257 | "digest 0.10.3", 258 | ] 259 | 260 | [[package]] 261 | name = "block-buffer" 262 | version = "0.9.0" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 265 | dependencies = [ 266 | "generic-array", 267 | ] 268 | 269 | [[package]] 270 | name = "block-buffer" 271 | version = "0.10.2" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" 274 | dependencies = [ 275 | "generic-array", 276 | ] 277 | 278 | [[package]] 279 | name = "borsh" 280 | version = "0.9.3" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" 283 | dependencies = [ 284 | "borsh-derive", 285 | "hashbrown", 286 | ] 287 | 288 | [[package]] 289 | name = "borsh-derive" 290 | version = "0.9.3" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" 293 | dependencies = [ 294 | "borsh-derive-internal", 295 | "borsh-schema-derive-internal", 296 | "proc-macro-crate", 297 | "proc-macro2", 298 | "syn", 299 | ] 300 | 301 | [[package]] 302 | name = "borsh-derive-internal" 303 | version = "0.9.3" 304 | source = "registry+https://github.com/rust-lang/crates.io-index" 305 | checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" 306 | dependencies = [ 307 | "proc-macro2", 308 | "quote", 309 | "syn", 310 | ] 311 | 312 | [[package]] 313 | name = "borsh-schema-derive-internal" 314 | version = "0.9.3" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" 317 | dependencies = [ 318 | "proc-macro2", 319 | "quote", 320 | "syn", 321 | ] 322 | 323 | [[package]] 324 | name = "bs58" 325 | version = "0.3.1" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" 328 | 329 | [[package]] 330 | name = "bs58" 331 | version = "0.4.0" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" 334 | 335 | [[package]] 336 | name = "bumpalo" 337 | version = "3.9.1" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" 340 | 341 | [[package]] 342 | name = "bv" 343 | version = "0.11.1" 344 | source = "registry+https://github.com/rust-lang/crates.io-index" 345 | checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" 346 | dependencies = [ 347 | "feature-probe", 348 | "serde", 349 | ] 350 | 351 | [[package]] 352 | name = "bytemuck" 353 | version = "1.7.3" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | checksum = "439989e6b8c38d1b6570a384ef1e49c8848128f5a97f3914baef02920842712f" 356 | dependencies = [ 357 | "bytemuck_derive", 358 | ] 359 | 360 | [[package]] 361 | name = "bytemuck_derive" 362 | version = "1.0.1" 363 | source = "registry+https://github.com/rust-lang/crates.io-index" 364 | checksum = "8e215f8c2f9f79cb53c8335e687ffd07d5bfcb6fe5fc80723762d0be46e7cc54" 365 | dependencies = [ 366 | "proc-macro2", 367 | "quote", 368 | "syn", 369 | ] 370 | 371 | [[package]] 372 | name = "byteorder" 373 | version = "1.4.3" 374 | source = "registry+https://github.com/rust-lang/crates.io-index" 375 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 376 | 377 | [[package]] 378 | name = "cc" 379 | version = "1.0.72" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" 382 | 383 | [[package]] 384 | name = "cfg-if" 385 | version = "1.0.0" 386 | source = "registry+https://github.com/rust-lang/crates.io-index" 387 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 388 | 389 | [[package]] 390 | name = "console_error_panic_hook" 391 | version = "0.1.7" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" 394 | dependencies = [ 395 | "cfg-if", 396 | "wasm-bindgen", 397 | ] 398 | 399 | [[package]] 400 | name = "console_log" 401 | version = "0.2.0" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "501a375961cef1a0d44767200e66e4a559283097e91d0730b1d75dfb2f8a1494" 404 | dependencies = [ 405 | "log", 406 | "web-sys", 407 | ] 408 | 409 | [[package]] 410 | name = "constant_time_eq" 411 | version = "0.1.5" 412 | source = "registry+https://github.com/rust-lang/crates.io-index" 413 | checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" 414 | 415 | [[package]] 416 | name = "cpufeatures" 417 | version = "0.2.1" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" 420 | dependencies = [ 421 | "libc", 422 | ] 423 | 424 | [[package]] 425 | name = "crossbeam-channel" 426 | version = "0.5.5" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" 429 | dependencies = [ 430 | "cfg-if", 431 | "crossbeam-utils", 432 | ] 433 | 434 | [[package]] 435 | name = "crossbeam-deque" 436 | version = "0.8.1" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" 439 | dependencies = [ 440 | "cfg-if", 441 | "crossbeam-epoch", 442 | "crossbeam-utils", 443 | ] 444 | 445 | [[package]] 446 | name = "crossbeam-epoch" 447 | version = "0.9.9" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "07db9d94cbd326813772c968ccd25999e5f8ae22f4f8d1b11effa37ef6ce281d" 450 | dependencies = [ 451 | "autocfg", 452 | "cfg-if", 453 | "crossbeam-utils", 454 | "memoffset", 455 | "once_cell", 456 | "scopeguard", 457 | ] 458 | 459 | [[package]] 460 | name = "crossbeam-utils" 461 | version = "0.8.10" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "7d82ee10ce34d7bc12c2122495e7593a9c41347ecdd64185af4ecf72cb1a7f83" 464 | dependencies = [ 465 | "cfg-if", 466 | "once_cell", 467 | ] 468 | 469 | [[package]] 470 | name = "crunchy" 471 | version = "0.2.2" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 474 | 475 | [[package]] 476 | name = "crypto-common" 477 | version = "0.1.3" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" 480 | dependencies = [ 481 | "generic-array", 482 | "typenum", 483 | ] 484 | 485 | [[package]] 486 | name = "crypto-mac" 487 | version = "0.8.0" 488 | source = "registry+https://github.com/rust-lang/crates.io-index" 489 | checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" 490 | dependencies = [ 491 | "generic-array", 492 | "subtle", 493 | ] 494 | 495 | [[package]] 496 | name = "curve25519-dalek" 497 | version = "3.2.1" 498 | source = "registry+https://github.com/rust-lang/crates.io-index" 499 | checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" 500 | dependencies = [ 501 | "byteorder", 502 | "digest 0.9.0", 503 | "rand_core 0.5.1", 504 | "subtle", 505 | "zeroize", 506 | ] 507 | 508 | [[package]] 509 | name = "digest" 510 | version = "0.9.0" 511 | source = "registry+https://github.com/rust-lang/crates.io-index" 512 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 513 | dependencies = [ 514 | "generic-array", 515 | ] 516 | 517 | [[package]] 518 | name = "digest" 519 | version = "0.10.3" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" 522 | dependencies = [ 523 | "block-buffer 0.10.2", 524 | "crypto-common", 525 | "subtle", 526 | ] 527 | 528 | [[package]] 529 | name = "either" 530 | version = "1.6.1" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 533 | 534 | [[package]] 535 | name = "feature-probe" 536 | version = "0.1.1" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" 539 | 540 | [[package]] 541 | name = "generic-array" 542 | version = "0.14.5" 543 | source = "registry+https://github.com/rust-lang/crates.io-index" 544 | checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" 545 | dependencies = [ 546 | "serde", 547 | "typenum", 548 | "version_check", 549 | ] 550 | 551 | [[package]] 552 | name = "getrandom" 553 | version = "0.1.16" 554 | source = "registry+https://github.com/rust-lang/crates.io-index" 555 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 556 | dependencies = [ 557 | "cfg-if", 558 | "js-sys", 559 | "libc", 560 | "wasi 0.9.0+wasi-snapshot-preview1", 561 | "wasm-bindgen", 562 | ] 563 | 564 | [[package]] 565 | name = "getrandom" 566 | version = "0.2.4" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" 569 | dependencies = [ 570 | "cfg-if", 571 | "libc", 572 | "wasi 0.10.2+wasi-snapshot-preview1", 573 | ] 574 | 575 | [[package]] 576 | name = "graph_program" 577 | version = "0.3.0" 578 | dependencies = [ 579 | "anchor-lang", 580 | ] 581 | 582 | [[package]] 583 | name = "hashbrown" 584 | version = "0.11.2" 585 | source = "registry+https://github.com/rust-lang/crates.io-index" 586 | checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" 587 | dependencies = [ 588 | "ahash", 589 | ] 590 | 591 | [[package]] 592 | name = "heck" 593 | version = "0.3.3" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 596 | dependencies = [ 597 | "unicode-segmentation", 598 | ] 599 | 600 | [[package]] 601 | name = "hermit-abi" 602 | version = "0.1.19" 603 | source = "registry+https://github.com/rust-lang/crates.io-index" 604 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 605 | dependencies = [ 606 | "libc", 607 | ] 608 | 609 | [[package]] 610 | name = "hmac" 611 | version = "0.8.1" 612 | source = "registry+https://github.com/rust-lang/crates.io-index" 613 | checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" 614 | dependencies = [ 615 | "crypto-mac", 616 | "digest 0.9.0", 617 | ] 618 | 619 | [[package]] 620 | name = "hmac-drbg" 621 | version = "0.3.0" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" 624 | dependencies = [ 625 | "digest 0.9.0", 626 | "generic-array", 627 | "hmac", 628 | ] 629 | 630 | [[package]] 631 | name = "im" 632 | version = "15.1.0" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" 635 | dependencies = [ 636 | "bitmaps", 637 | "rand_core 0.6.3", 638 | "rand_xoshiro", 639 | "rayon", 640 | "serde", 641 | "sized-chunks", 642 | "typenum", 643 | "version_check", 644 | ] 645 | 646 | [[package]] 647 | name = "itertools" 648 | version = "0.10.3" 649 | source = "registry+https://github.com/rust-lang/crates.io-index" 650 | checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" 651 | dependencies = [ 652 | "either", 653 | ] 654 | 655 | [[package]] 656 | name = "itoa" 657 | version = "1.0.1" 658 | source = "registry+https://github.com/rust-lang/crates.io-index" 659 | checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" 660 | 661 | [[package]] 662 | name = "js-sys" 663 | version = "0.3.57" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" 666 | dependencies = [ 667 | "wasm-bindgen", 668 | ] 669 | 670 | [[package]] 671 | name = "keccak" 672 | version = "0.1.0" 673 | source = "registry+https://github.com/rust-lang/crates.io-index" 674 | checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" 675 | 676 | [[package]] 677 | name = "lazy_static" 678 | version = "1.4.0" 679 | source = "registry+https://github.com/rust-lang/crates.io-index" 680 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 681 | 682 | [[package]] 683 | name = "libc" 684 | version = "0.2.117" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c" 687 | 688 | [[package]] 689 | name = "libsecp256k1" 690 | version = "0.6.0" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" 693 | dependencies = [ 694 | "arrayref", 695 | "base64 0.12.3", 696 | "digest 0.9.0", 697 | "hmac-drbg", 698 | "libsecp256k1-core", 699 | "libsecp256k1-gen-ecmult", 700 | "libsecp256k1-gen-genmult", 701 | "rand", 702 | "serde", 703 | "sha2 0.9.9", 704 | "typenum", 705 | ] 706 | 707 | [[package]] 708 | name = "libsecp256k1-core" 709 | version = "0.2.2" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" 712 | dependencies = [ 713 | "crunchy", 714 | "digest 0.9.0", 715 | "subtle", 716 | ] 717 | 718 | [[package]] 719 | name = "libsecp256k1-gen-ecmult" 720 | version = "0.2.1" 721 | source = "registry+https://github.com/rust-lang/crates.io-index" 722 | checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" 723 | dependencies = [ 724 | "libsecp256k1-core", 725 | ] 726 | 727 | [[package]] 728 | name = "libsecp256k1-gen-genmult" 729 | version = "0.2.1" 730 | source = "registry+https://github.com/rust-lang/crates.io-index" 731 | checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" 732 | dependencies = [ 733 | "libsecp256k1-core", 734 | ] 735 | 736 | [[package]] 737 | name = "lock_api" 738 | version = "0.4.7" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" 741 | dependencies = [ 742 | "autocfg", 743 | "scopeguard", 744 | ] 745 | 746 | [[package]] 747 | name = "log" 748 | version = "0.4.14" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 751 | dependencies = [ 752 | "cfg-if", 753 | ] 754 | 755 | [[package]] 756 | name = "memchr" 757 | version = "2.4.1" 758 | source = "registry+https://github.com/rust-lang/crates.io-index" 759 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" 760 | 761 | [[package]] 762 | name = "memmap2" 763 | version = "0.5.3" 764 | source = "registry+https://github.com/rust-lang/crates.io-index" 765 | checksum = "057a3db23999c867821a7a59feb06a578fcb03685e983dff90daf9e7d24ac08f" 766 | dependencies = [ 767 | "libc", 768 | ] 769 | 770 | [[package]] 771 | name = "memoffset" 772 | version = "0.6.5" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 775 | dependencies = [ 776 | "autocfg", 777 | ] 778 | 779 | [[package]] 780 | name = "num-derive" 781 | version = "0.3.3" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" 784 | dependencies = [ 785 | "proc-macro2", 786 | "quote", 787 | "syn", 788 | ] 789 | 790 | [[package]] 791 | name = "num-traits" 792 | version = "0.2.14" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 795 | dependencies = [ 796 | "autocfg", 797 | ] 798 | 799 | [[package]] 800 | name = "num_cpus" 801 | version = "1.13.1" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" 804 | dependencies = [ 805 | "hermit-abi", 806 | "libc", 807 | ] 808 | 809 | [[package]] 810 | name = "once_cell" 811 | version = "1.9.0" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" 814 | 815 | [[package]] 816 | name = "opaque-debug" 817 | version = "0.3.0" 818 | source = "registry+https://github.com/rust-lang/crates.io-index" 819 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 820 | 821 | [[package]] 822 | name = "parking_lot" 823 | version = "0.12.1" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 826 | dependencies = [ 827 | "lock_api", 828 | "parking_lot_core", 829 | ] 830 | 831 | [[package]] 832 | name = "parking_lot_core" 833 | version = "0.9.3" 834 | source = "registry+https://github.com/rust-lang/crates.io-index" 835 | checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" 836 | dependencies = [ 837 | "cfg-if", 838 | "libc", 839 | "redox_syscall", 840 | "smallvec", 841 | "windows-sys", 842 | ] 843 | 844 | [[package]] 845 | name = "ppv-lite86" 846 | version = "0.2.16" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" 849 | 850 | [[package]] 851 | name = "proc-macro-crate" 852 | version = "0.1.5" 853 | source = "registry+https://github.com/rust-lang/crates.io-index" 854 | checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" 855 | dependencies = [ 856 | "toml", 857 | ] 858 | 859 | [[package]] 860 | name = "proc-macro2" 861 | version = "1.0.36" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" 864 | dependencies = [ 865 | "unicode-xid", 866 | ] 867 | 868 | [[package]] 869 | name = "proc-macro2-diagnostics" 870 | version = "0.9.1" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" 873 | dependencies = [ 874 | "proc-macro2", 875 | "quote", 876 | "syn", 877 | "version_check", 878 | "yansi", 879 | ] 880 | 881 | [[package]] 882 | name = "quote" 883 | version = "1.0.15" 884 | source = "registry+https://github.com/rust-lang/crates.io-index" 885 | checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" 886 | dependencies = [ 887 | "proc-macro2", 888 | ] 889 | 890 | [[package]] 891 | name = "rand" 892 | version = "0.7.3" 893 | source = "registry+https://github.com/rust-lang/crates.io-index" 894 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 895 | dependencies = [ 896 | "getrandom 0.1.16", 897 | "libc", 898 | "rand_chacha", 899 | "rand_core 0.5.1", 900 | "rand_hc", 901 | ] 902 | 903 | [[package]] 904 | name = "rand_chacha" 905 | version = "0.2.2" 906 | source = "registry+https://github.com/rust-lang/crates.io-index" 907 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 908 | dependencies = [ 909 | "ppv-lite86", 910 | "rand_core 0.5.1", 911 | ] 912 | 913 | [[package]] 914 | name = "rand_core" 915 | version = "0.5.1" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 918 | dependencies = [ 919 | "getrandom 0.1.16", 920 | ] 921 | 922 | [[package]] 923 | name = "rand_core" 924 | version = "0.6.3" 925 | source = "registry+https://github.com/rust-lang/crates.io-index" 926 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 927 | 928 | [[package]] 929 | name = "rand_hc" 930 | version = "0.2.0" 931 | source = "registry+https://github.com/rust-lang/crates.io-index" 932 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 933 | dependencies = [ 934 | "rand_core 0.5.1", 935 | ] 936 | 937 | [[package]] 938 | name = "rand_xoshiro" 939 | version = "0.6.0" 940 | source = "registry+https://github.com/rust-lang/crates.io-index" 941 | checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" 942 | dependencies = [ 943 | "rand_core 0.6.3", 944 | ] 945 | 946 | [[package]] 947 | name = "rayon" 948 | version = "1.5.3" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" 951 | dependencies = [ 952 | "autocfg", 953 | "crossbeam-deque", 954 | "either", 955 | "rayon-core", 956 | ] 957 | 958 | [[package]] 959 | name = "rayon-core" 960 | version = "1.9.3" 961 | source = "registry+https://github.com/rust-lang/crates.io-index" 962 | checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" 963 | dependencies = [ 964 | "crossbeam-channel", 965 | "crossbeam-deque", 966 | "crossbeam-utils", 967 | "num_cpus", 968 | ] 969 | 970 | [[package]] 971 | name = "redox_syscall" 972 | version = "0.2.13" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" 975 | dependencies = [ 976 | "bitflags", 977 | ] 978 | 979 | [[package]] 980 | name = "regex" 981 | version = "1.5.5" 982 | source = "registry+https://github.com/rust-lang/crates.io-index" 983 | checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" 984 | dependencies = [ 985 | "aho-corasick", 986 | "memchr", 987 | "regex-syntax", 988 | ] 989 | 990 | [[package]] 991 | name = "regex-syntax" 992 | version = "0.6.25" 993 | source = "registry+https://github.com/rust-lang/crates.io-index" 994 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 995 | 996 | [[package]] 997 | name = "rustc_version" 998 | version = "0.4.0" 999 | source = "registry+https://github.com/rust-lang/crates.io-index" 1000 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 1001 | dependencies = [ 1002 | "semver", 1003 | ] 1004 | 1005 | [[package]] 1006 | name = "rustversion" 1007 | version = "1.0.6" 1008 | source = "registry+https://github.com/rust-lang/crates.io-index" 1009 | checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" 1010 | 1011 | [[package]] 1012 | name = "ryu" 1013 | version = "1.0.9" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" 1016 | 1017 | [[package]] 1018 | name = "scopeguard" 1019 | version = "1.1.0" 1020 | source = "registry+https://github.com/rust-lang/crates.io-index" 1021 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1022 | 1023 | [[package]] 1024 | name = "semver" 1025 | version = "1.0.7" 1026 | source = "registry+https://github.com/rust-lang/crates.io-index" 1027 | checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" 1028 | 1029 | [[package]] 1030 | name = "serde" 1031 | version = "1.0.136" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" 1034 | dependencies = [ 1035 | "serde_derive", 1036 | ] 1037 | 1038 | [[package]] 1039 | name = "serde_bytes" 1040 | version = "0.11.5" 1041 | source = "registry+https://github.com/rust-lang/crates.io-index" 1042 | checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" 1043 | dependencies = [ 1044 | "serde", 1045 | ] 1046 | 1047 | [[package]] 1048 | name = "serde_derive" 1049 | version = "1.0.136" 1050 | source = "registry+https://github.com/rust-lang/crates.io-index" 1051 | checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" 1052 | dependencies = [ 1053 | "proc-macro2", 1054 | "quote", 1055 | "syn", 1056 | ] 1057 | 1058 | [[package]] 1059 | name = "serde_json" 1060 | version = "1.0.78" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085" 1063 | dependencies = [ 1064 | "itoa", 1065 | "ryu", 1066 | "serde", 1067 | ] 1068 | 1069 | [[package]] 1070 | name = "sha2" 1071 | version = "0.9.9" 1072 | source = "registry+https://github.com/rust-lang/crates.io-index" 1073 | checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" 1074 | dependencies = [ 1075 | "block-buffer 0.9.0", 1076 | "cfg-if", 1077 | "cpufeatures", 1078 | "digest 0.9.0", 1079 | "opaque-debug", 1080 | ] 1081 | 1082 | [[package]] 1083 | name = "sha2" 1084 | version = "0.10.2" 1085 | source = "registry+https://github.com/rust-lang/crates.io-index" 1086 | checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" 1087 | dependencies = [ 1088 | "cfg-if", 1089 | "cpufeatures", 1090 | "digest 0.10.3", 1091 | ] 1092 | 1093 | [[package]] 1094 | name = "sha3" 1095 | version = "0.10.1" 1096 | source = "registry+https://github.com/rust-lang/crates.io-index" 1097 | checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86" 1098 | dependencies = [ 1099 | "digest 0.10.3", 1100 | "keccak", 1101 | ] 1102 | 1103 | [[package]] 1104 | name = "sized-chunks" 1105 | version = "0.6.5" 1106 | source = "registry+https://github.com/rust-lang/crates.io-index" 1107 | checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" 1108 | dependencies = [ 1109 | "bitmaps", 1110 | "typenum", 1111 | ] 1112 | 1113 | [[package]] 1114 | name = "smallvec" 1115 | version = "1.8.0" 1116 | source = "registry+https://github.com/rust-lang/crates.io-index" 1117 | checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" 1118 | 1119 | [[package]] 1120 | name = "solana-frozen-abi" 1121 | version = "1.10.31" 1122 | source = "registry+https://github.com/rust-lang/crates.io-index" 1123 | checksum = "68f2b153f8eb8c4d22f2b739d3d31bac4122ca17376869cb717bf3a45200ea63" 1124 | dependencies = [ 1125 | "bs58 0.4.0", 1126 | "bv", 1127 | "generic-array", 1128 | "im", 1129 | "lazy_static", 1130 | "log", 1131 | "memmap2", 1132 | "rustc_version", 1133 | "serde", 1134 | "serde_bytes", 1135 | "serde_derive", 1136 | "sha2 0.10.2", 1137 | "solana-frozen-abi-macro", 1138 | "thiserror", 1139 | ] 1140 | 1141 | [[package]] 1142 | name = "solana-frozen-abi-macro" 1143 | version = "1.10.31" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "0cd23aad847403a28dd1452611490b5e8f040470ed251882cca0492c5e566280" 1146 | dependencies = [ 1147 | "proc-macro2", 1148 | "quote", 1149 | "rustc_version", 1150 | "syn", 1151 | ] 1152 | 1153 | [[package]] 1154 | name = "solana-program" 1155 | version = "1.10.31" 1156 | source = "registry+https://github.com/rust-lang/crates.io-index" 1157 | checksum = "37be82a1fe85b24aa036153650053fd9628489c07c834b6b2dc027c4052bdbe5" 1158 | dependencies = [ 1159 | "base64 0.13.0", 1160 | "bincode", 1161 | "bitflags", 1162 | "blake3", 1163 | "borsh", 1164 | "borsh-derive", 1165 | "bs58 0.4.0", 1166 | "bv", 1167 | "bytemuck", 1168 | "console_error_panic_hook", 1169 | "console_log", 1170 | "curve25519-dalek", 1171 | "getrandom 0.1.16", 1172 | "itertools", 1173 | "js-sys", 1174 | "lazy_static", 1175 | "libsecp256k1", 1176 | "log", 1177 | "num-derive", 1178 | "num-traits", 1179 | "parking_lot", 1180 | "rand", 1181 | "rustc_version", 1182 | "rustversion", 1183 | "serde", 1184 | "serde_bytes", 1185 | "serde_derive", 1186 | "sha2 0.10.2", 1187 | "sha3", 1188 | "solana-frozen-abi", 1189 | "solana-frozen-abi-macro", 1190 | "solana-sdk-macro", 1191 | "thiserror", 1192 | "wasm-bindgen", 1193 | ] 1194 | 1195 | [[package]] 1196 | name = "solana-sdk-macro" 1197 | version = "1.10.31" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "275c52edaaaa86ce649a226c03f75579d570c01880a43ee1de77a973994754ce" 1200 | dependencies = [ 1201 | "bs58 0.4.0", 1202 | "proc-macro2", 1203 | "quote", 1204 | "rustversion", 1205 | "syn", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "subtle" 1210 | version = "2.4.1" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 1213 | 1214 | [[package]] 1215 | name = "syn" 1216 | version = "1.0.86" 1217 | source = "registry+https://github.com/rust-lang/crates.io-index" 1218 | checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" 1219 | dependencies = [ 1220 | "proc-macro2", 1221 | "quote", 1222 | "unicode-xid", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "thiserror" 1227 | version = "1.0.30" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" 1230 | dependencies = [ 1231 | "thiserror-impl", 1232 | ] 1233 | 1234 | [[package]] 1235 | name = "thiserror-impl" 1236 | version = "1.0.30" 1237 | source = "registry+https://github.com/rust-lang/crates.io-index" 1238 | checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" 1239 | dependencies = [ 1240 | "proc-macro2", 1241 | "quote", 1242 | "syn", 1243 | ] 1244 | 1245 | [[package]] 1246 | name = "toml" 1247 | version = "0.5.8" 1248 | source = "registry+https://github.com/rust-lang/crates.io-index" 1249 | checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" 1250 | dependencies = [ 1251 | "serde", 1252 | ] 1253 | 1254 | [[package]] 1255 | name = "typenum" 1256 | version = "1.15.0" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" 1259 | 1260 | [[package]] 1261 | name = "unicode-segmentation" 1262 | version = "1.9.0" 1263 | source = "registry+https://github.com/rust-lang/crates.io-index" 1264 | checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" 1265 | 1266 | [[package]] 1267 | name = "unicode-xid" 1268 | version = "0.2.2" 1269 | source = "registry+https://github.com/rust-lang/crates.io-index" 1270 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 1271 | 1272 | [[package]] 1273 | name = "version_check" 1274 | version = "0.9.4" 1275 | source = "registry+https://github.com/rust-lang/crates.io-index" 1276 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1277 | 1278 | [[package]] 1279 | name = "wasi" 1280 | version = "0.9.0+wasi-snapshot-preview1" 1281 | source = "registry+https://github.com/rust-lang/crates.io-index" 1282 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 1283 | 1284 | [[package]] 1285 | name = "wasi" 1286 | version = "0.10.2+wasi-snapshot-preview1" 1287 | source = "registry+https://github.com/rust-lang/crates.io-index" 1288 | checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" 1289 | 1290 | [[package]] 1291 | name = "wasm-bindgen" 1292 | version = "0.2.80" 1293 | source = "registry+https://github.com/rust-lang/crates.io-index" 1294 | checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" 1295 | dependencies = [ 1296 | "cfg-if", 1297 | "wasm-bindgen-macro", 1298 | ] 1299 | 1300 | [[package]] 1301 | name = "wasm-bindgen-backend" 1302 | version = "0.2.80" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" 1305 | dependencies = [ 1306 | "bumpalo", 1307 | "lazy_static", 1308 | "log", 1309 | "proc-macro2", 1310 | "quote", 1311 | "syn", 1312 | "wasm-bindgen-shared", 1313 | ] 1314 | 1315 | [[package]] 1316 | name = "wasm-bindgen-macro" 1317 | version = "0.2.80" 1318 | source = "registry+https://github.com/rust-lang/crates.io-index" 1319 | checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" 1320 | dependencies = [ 1321 | "quote", 1322 | "wasm-bindgen-macro-support", 1323 | ] 1324 | 1325 | [[package]] 1326 | name = "wasm-bindgen-macro-support" 1327 | version = "0.2.80" 1328 | source = "registry+https://github.com/rust-lang/crates.io-index" 1329 | checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" 1330 | dependencies = [ 1331 | "proc-macro2", 1332 | "quote", 1333 | "syn", 1334 | "wasm-bindgen-backend", 1335 | "wasm-bindgen-shared", 1336 | ] 1337 | 1338 | [[package]] 1339 | name = "wasm-bindgen-shared" 1340 | version = "0.2.80" 1341 | source = "registry+https://github.com/rust-lang/crates.io-index" 1342 | checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" 1343 | 1344 | [[package]] 1345 | name = "web-sys" 1346 | version = "0.3.57" 1347 | source = "registry+https://github.com/rust-lang/crates.io-index" 1348 | checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283" 1349 | dependencies = [ 1350 | "js-sys", 1351 | "wasm-bindgen", 1352 | ] 1353 | 1354 | [[package]] 1355 | name = "windows-sys" 1356 | version = "0.36.1" 1357 | source = "registry+https://github.com/rust-lang/crates.io-index" 1358 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 1359 | dependencies = [ 1360 | "windows_aarch64_msvc", 1361 | "windows_i686_gnu", 1362 | "windows_i686_msvc", 1363 | "windows_x86_64_gnu", 1364 | "windows_x86_64_msvc", 1365 | ] 1366 | 1367 | [[package]] 1368 | name = "windows_aarch64_msvc" 1369 | version = "0.36.1" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 1372 | 1373 | [[package]] 1374 | name = "windows_i686_gnu" 1375 | version = "0.36.1" 1376 | source = "registry+https://github.com/rust-lang/crates.io-index" 1377 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 1378 | 1379 | [[package]] 1380 | name = "windows_i686_msvc" 1381 | version = "0.36.1" 1382 | source = "registry+https://github.com/rust-lang/crates.io-index" 1383 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 1384 | 1385 | [[package]] 1386 | name = "windows_x86_64_gnu" 1387 | version = "0.36.1" 1388 | source = "registry+https://github.com/rust-lang/crates.io-index" 1389 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 1390 | 1391 | [[package]] 1392 | name = "windows_x86_64_msvc" 1393 | version = "0.36.1" 1394 | source = "registry+https://github.com/rust-lang/crates.io-index" 1395 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 1396 | 1397 | [[package]] 1398 | name = "yansi" 1399 | version = "0.5.0" 1400 | source = "registry+https://github.com/rust-lang/crates.io-index" 1401 | checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" 1402 | 1403 | [[package]] 1404 | name = "zeroize" 1405 | version = "1.3.0" 1406 | source = "registry+https://github.com/rust-lang/crates.io-index" 1407 | checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" 1408 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/*" 4 | ] 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Graph Program 2 | 3 | ![Image](https://images.unsplash.com/photo-1594047752131-1ec0a6dfa4fc?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&h=250&w=1500) 4 | 5 | A program to connect accounts with public keys that allows for the creation of a very flexible graph structure on the blockchain. 6 | 7 | Table of contents: 8 | 9 | - [Source Code](#source-code) 10 | - [Usage](#usage) 11 | 12 | ## Source Code 13 | 14 | The `programs/graph_program/lib.rs` file acts as an entry point to the graph program. 15 | 16 | - Instructions are laid out in the `programs/graph_program/instructions` folder, which acts as a module (be sure to list each instructions in the `mod.rs` file). 17 | - Altough Solana Programs are stateless, the `"State"` structs and impls are stored in `programs/graph_program/state`, likewise list them on `mod.rs`. Here is where a lot of the business logic related to structs that are passed as accounts into the program by the instructions should live and function. 18 | - Constants are stored in the `programs/graph_program/constants` folder, here is where we store some useful constants like PDA seed parts and static pubKeys. 19 | 20 | ## Usage 21 | 22 | Docs and Sdk in the making, please refer to the `tests` folder for implementation reference. 23 | 24 | ## Questions 25 | 26 | [ksolano@holaplex.com](mailto::ksolano@holaplex.com) 27 | -------------------------------------------------------------------------------- /app/cli/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | dist 93 | 94 | # Gatsby files 95 | .cache/ 96 | # Comment in the public line in if your project uses Gatsby and not Next.js 97 | # https://nextjs.org/blog/next-9-1#public-directory-support 98 | # public 99 | 100 | # vuepress build output 101 | .vuepress/dist 102 | 103 | # vuepress v2.x temp and cache directory 104 | .temp 105 | .cache 106 | 107 | # Docusaurus cache and generated files 108 | .docusaurus 109 | 110 | # Serverless directories 111 | .serverless/ 112 | 113 | # FuseBox cache 114 | .fusebox/ 115 | 116 | # DynamoDB Local files 117 | .dynamodb/ 118 | 119 | # TernJS port file 120 | .tern-port 121 | 122 | # Stores VSCode versions used for testing VSCode extensions 123 | .vscode-test 124 | 125 | # yarn v2 126 | .yarn/cache 127 | .yarn/unplugged 128 | .yarn/build-state.yml 129 | .yarn/install-state.gz 130 | .pnp.* 131 | 132 | # TS 133 | build/ -------------------------------------------------------------------------------- /app/cli/README.md: -------------------------------------------------------------------------------- 1 | # Graph Program CLI 2 | 3 | Provides a basic cli to interact with the graph program. 4 | 5 | ## Instructions 6 | 7 | Be sure to build the @holaplex/graph-program package `cd ../../sdk/ && yarn build` and then 8 | remember to re-link it, especially if you're working on that package with: `file:../../sdk/` inside of this directory. 9 | 10 | ## How to make a connection 11 | 12 | ```bash 13 | $ node ./build/index.js make-connection \ 14 | -k ~/.config/solana/mainnet-test1.json \ 15 | -p FeikG7Kui7zw8srzShhrPv2TJgwAn61GU7m8xmaK9GnW \ 16 | -r https://psytrbhymqlkfrhudd.dev.genesysgo.net:8899/ 17 | ``` 18 | 19 | ## How to revoke a connection 20 | 21 | ```bash 22 | $ node ./build/index.js revoke-connection \ 23 | -k ~/.config/solana/mainnet-test1.json \ 24 | -p FeikG7Kui7zw8srzShhrPv2TJgwAn61GU7m8xmaK9GnW \ 25 | -r https://psytrbhymqlkfrhudd.dev.genesysgo.net:8899/ 26 | ``` 27 | 28 | ## How to query 29 | 30 | ```bash 31 | $ node ./build/index.js get-all-connections-from \ 32 | -k ~/.config/solana/mainnet-test1.json \ 33 | -r https://psytrbhymqlkfrhudd.dev.genesysgo.net:8899/ 34 | ``` 35 | 36 | ```bash 37 | $ node ./build/index.js get-all-connections-to \ 38 | -k ~/.config/solana/mainnet-test1.json \ 39 | -r https://psytrbhymqlkfrhudd.dev.genesysgo.net:8899/ 40 | ``` -------------------------------------------------------------------------------- /app/cli/commands/closeConnection.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { Program, Helpers } from "@holaplex/graph-program"; 3 | import { getWallet } from "../tools/wallet.js"; 4 | 5 | const { getConnectionPDA } = Helpers; 6 | const { getGraphProgram } = Program; 7 | 8 | type CloseConnectionCommandInput = { 9 | rpc: string; 10 | solanaKeypair: string; 11 | toPublicKey: string; 12 | fromPublicKey: string; 13 | }; 14 | 15 | export const buildCloseConnectionCommand = 16 | () => async (input: CloseConnectionCommandInput) => { 17 | const toPubkey = new anchor.web3.PublicKey(input.toPublicKey); 18 | const fromPubkey = new anchor.web3.PublicKey(input.toPublicKey); 19 | 20 | const wallet = await getWallet(input.solanaKeypair); 21 | const connection = new anchor.web3.Connection(input.rpc); 22 | 23 | const graphProgram = getGraphProgram( 24 | new anchor.AnchorProvider(connection, wallet, {}) 25 | ); 26 | 27 | const [pda, bump] = await getConnectionPDA(fromPubkey, toPubkey); 28 | 29 | const txId = await graphProgram.methods 30 | .closeConnection(bump, toPubkey) 31 | .accounts({ 32 | connection: pda, 33 | from: fromPubkey, 34 | signer: wallet.publicKey, 35 | }) 36 | .rpc(); 37 | 38 | console.log(`Transaction ID: ${txId}`); 39 | }; 40 | -------------------------------------------------------------------------------- /app/cli/commands/getAllConnections.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { getWallet } from "../tools/wallet.js"; 3 | import { Program } from "@holaplex/graph-program"; 4 | import fs from "fs/promises"; 5 | 6 | const { getGraphProgram } = Program; 7 | 8 | type GetAllConnectionsInput = { 9 | rpc: string; 10 | solanaKeypair: string; 11 | outFile: string; 12 | }; 13 | 14 | export const buildGetAllConnectionsCommand = 15 | () => async (input: GetAllConnectionsInput) => { 16 | const wallet = await getWallet(input.solanaKeypair); 17 | const connection = new anchor.web3.Connection(input.rpc); 18 | const graphProgram = getGraphProgram( 19 | new anchor.AnchorProvider(connection, wallet, {}) 20 | ); 21 | const results = await graphProgram.account.connectionV2.all(); 22 | const map = results.map(({ account: { from, to }, publicKey }) => ({ 23 | publicKey: publicKey.toBase58(), 24 | from: from.toBase58(), 25 | to: to.toBase58(), 26 | })); 27 | await fs.writeFile(input.outFile, JSON.stringify(map, null, 2)); 28 | console.log(`Wrote ${input.outFile}`); 29 | }; 30 | -------------------------------------------------------------------------------- /app/cli/commands/getAllConnectionsFrom.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { getWallet } from "../tools/wallet.js"; 3 | import { Queries, Program } from "@holaplex/graph-program"; 4 | 5 | const { getProgramAccountsFrom } = Queries; 6 | const { getGraphProgram } = Program; 7 | 8 | type GetAllConnectionsFromInput = { 9 | rpc: string; 10 | solanaKeypair: string; 11 | }; 12 | 13 | export const buildGetAllConnectionsFromCommand = 14 | () => async (input: GetAllConnectionsFromInput) => { 15 | const wallet = await getWallet(input.solanaKeypair); 16 | const connection = new anchor.web3.Connection(input.rpc); 17 | const graphProgram = getGraphProgram( 18 | new anchor.AnchorProvider(connection, wallet, {}) 19 | ); 20 | const results = await getProgramAccountsFrom( 21 | wallet.publicKey, 22 | graphProgram 23 | ); 24 | const map = results.map(({ account: { from, to }, publicKey }) => ({ 25 | publicKey: publicKey.toBase58(), 26 | from: from.toBase58(), 27 | to: to.toBase58(), 28 | })); 29 | console.log(map); 30 | }; 31 | -------------------------------------------------------------------------------- /app/cli/commands/getAllConnectionsTo.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { getWallet } from "../tools/wallet.js"; 3 | import { Queries, Program } from "@holaplex/graph-program"; 4 | 5 | const { getProgramAccountsTo } = Queries; 6 | const { getGraphProgram } = Program; 7 | 8 | type GetAllConnectionsToInput = { 9 | rpc: string; 10 | solanaKeypair: string; 11 | }; 12 | 13 | export const buildGetAllConnectionsToCommand = 14 | () => async (input: GetAllConnectionsToInput) => { 15 | const wallet = await getWallet(input.solanaKeypair); 16 | const connection = new anchor.web3.Connection(input.rpc); 17 | const graphProgram = getGraphProgram( 18 | new anchor.AnchorProvider(connection, wallet, {}) 19 | ); 20 | const results = await getProgramAccountsTo(wallet.publicKey, graphProgram); 21 | const map = results.map(({ account: { from, to }, publicKey }) => ({ 22 | publicKey: publicKey.toBase58(), 23 | from: from.toBase58(), 24 | to: to.toBase58(), 25 | })); 26 | console.log(map); 27 | }; 28 | -------------------------------------------------------------------------------- /app/cli/commands/makeConnection.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { getWallet } from "../tools/wallet.js"; 3 | import { Program } from "@holaplex/graph-program"; 4 | 5 | const { getGraphProgram } = Program; 6 | 7 | type MakeConnectionCommandInput = { 8 | rpc: string; 9 | publicKey: string; 10 | solanaKeypair: string; 11 | }; 12 | 13 | export const buildMakeConnectionCommand = 14 | () => async (input: MakeConnectionCommandInput) => { 15 | const toPubkey = new anchor.web3.PublicKey(input.publicKey); 16 | const wallet = await getWallet(input.solanaKeypair); 17 | const connection = new anchor.web3.Connection(input.rpc); 18 | const graphProgram = getGraphProgram( 19 | new anchor.AnchorProvider(connection, wallet, {}) 20 | ); 21 | const txId = await graphProgram.methods 22 | .makeConnection(toPubkey) 23 | .accounts({ from: wallet.publicKey }) 24 | .rpc(); 25 | console.log(`Transaction ID: ${txId}`); 26 | }; 27 | -------------------------------------------------------------------------------- /app/cli/commands/revokeConnection.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { Program, Helpers } from "@holaplex/graph-program"; 3 | import { getWallet } from "../tools/wallet.js"; 4 | 5 | const { getConnectionPDA } = Helpers; 6 | const { getGraphProgram } = Program; 7 | 8 | type RevokeConnectionCommandInput = { 9 | rpc: string; 10 | publicKey: string; 11 | solanaKeypair: string; 12 | }; 13 | 14 | export const buildRevokeConnectionCommand = 15 | () => async (input: RevokeConnectionCommandInput) => { 16 | const toPubkey = new anchor.web3.PublicKey(input.publicKey); 17 | const wallet = await getWallet(input.solanaKeypair); 18 | const connection = new anchor.web3.Connection(input.rpc); 19 | const graphProgram = getGraphProgram( 20 | new anchor.AnchorProvider(connection, wallet, {}) 21 | ); 22 | const [pda, bump] = await getConnectionPDA(wallet.publicKey, toPubkey); 23 | const txId = await graphProgram.methods 24 | .revokeConnection(bump, toPubkey) 25 | .accounts({ 26 | connection: pda, 27 | from: wallet.publicKey, 28 | }) 29 | .rpc(); 30 | console.log(`Transaction ID: ${txId}`); 31 | }; 32 | -------------------------------------------------------------------------------- /app/cli/index.ts: -------------------------------------------------------------------------------- 1 | import { program } from "commander"; 2 | import { buildMakeConnectionCommand } from "./commands/makeConnection.js"; 3 | import { buildRevokeConnectionCommand } from "./commands/revokeConnection.js"; 4 | import { buildGetAllConnectionsFromCommand } from "./commands/getAllConnectionsFrom.js"; 5 | import { buildGetAllConnectionsToCommand } from "./commands/getAllConnectionsTo.js"; 6 | import { buildGetAllConnectionsCommand } from "./commands/getAllConnections.js"; 7 | import { buildCloseConnectionCommand } from "./commands/closeConnection.js"; 8 | 9 | program.version("0.3.0"); 10 | 11 | program 12 | .command("make-connection") 13 | .description("Makes a connection.") 14 | .requiredOption("-k, --solana-keypair ", "Solana Keypair") 15 | .requiredOption("-p, --public-key ", "Public key to connect to") 16 | .option("-r, --rpc ", "RPC to use.", "https://api.devnet.solana.com") 17 | .action(buildMakeConnectionCommand()); 18 | 19 | program 20 | .command("revoke-connection") 21 | .description("Revokes a connection.") 22 | .requiredOption("-k, --solana-keypair ", "Solana Keypair") 23 | .requiredOption( 24 | "-p, --public-key ", 25 | "Public key to revoke connection from" 26 | ) 27 | .option("-r, --rpc ", "RPC to use.", "https://api.devnet.solana.com") 28 | .action(buildRevokeConnectionCommand()); 29 | 30 | program 31 | .command("close-connection") 32 | .description( 33 | "Closes a previously revoked connection. This is a permissionless call." 34 | ) 35 | .requiredOption("-k, --solana-keypair ", "Solana Keypair") 36 | .option("-r, --rpc ", "RPC to use.", "https://api.devnet.solana.com") 37 | .requiredOption("-t, --to-public-key ", "To Public Key") 38 | .requiredOption( 39 | "-f, --from-public-key ", 40 | "From Public Key (Usually the same as wallet)." 41 | ) 42 | .action(buildCloseConnectionCommand()); 43 | 44 | program 45 | .command("get-all-connections-to") 46 | .description("Lists connections to an account.") 47 | .requiredOption("-k, --solana-keypair ", "Solana Keypair") 48 | .option("-r, --rpc ", "RPC to use.", "https://api.devnet.solana.com") 49 | .action(buildGetAllConnectionsFromCommand()); 50 | 51 | program 52 | .command("get-all-connections") 53 | .description("Lists all program connections.") 54 | .requiredOption("-k, --solana-keypair ", "Solana Keypair") 55 | .option("-r, --rpc ", "RPC to use.", "https://api.devnet.solana.com") 56 | .option("-o, --outFile ", "Output file to write.", "./connections.json") 57 | .action(buildGetAllConnectionsCommand()); 58 | 59 | program 60 | .command("get-all-connections-from") 61 | .description("Lists connections from an account.") 62 | .requiredOption("-k, --solana-keypair ", "Solana Keypair") 63 | .option("-r, --rpc ", "RPC to use.", "https://api.devnet.solana.com") 64 | .action(buildGetAllConnectionsToCommand()); 65 | 66 | program 67 | .command("get-all-connections") 68 | .description("Lists all program connections.") 69 | .requiredOption("-k, --solana-keypair ", "Solana Keypair") 70 | .option("-r, --rpc ", "RPC to use.", "https://api.devnet.solana.com") 71 | .option( 72 | "-o, --outFile ", 73 | "Output file to write.", 74 | "./connections.json" 75 | ) 76 | .action(buildGetAllConnectionsCommand()); 77 | 78 | program.parse(process.argv); 79 | -------------------------------------------------------------------------------- /app/cli/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@holaplex/graph-program-cli", 3 | "version": "0.3.0", 4 | "description": "A program to connect accounts with public keys that allows for the creation of a very flexible graph structure on the blockchain.", 5 | "type": "module", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/holaplex/graph-program.git" 9 | }, 10 | "author": "Holaplex Maintainers ", 11 | "license": "AGPL-3.0-or-later", 12 | "private": false, 13 | "main": "./build/index.js", 14 | "declarations": "./build/index.d.ts", 15 | "files": [ 16 | "build" 17 | ], 18 | "bin": { 19 | "graph": "./build/index.js" 20 | }, 21 | "scripts": { 22 | "build": "tsc", 23 | "clean": "rimraf ./build", 24 | "prepublish": "yarn build" 25 | }, 26 | "dependencies": { 27 | "@holaplex/graph-program": "file:../../sdk/", 28 | "@project-serum/anchor": "^0.25.0", 29 | "commander": "^9.0.0", 30 | "lodash": "^4.17.21", 31 | "winston": "^3.7.2" 32 | }, 33 | "devDependencies": { 34 | "rimraf": "^3.0.2", 35 | "typescript": "^4.5.5" 36 | }, 37 | "bugs": { 38 | "url": "https://github.com/holaplex/graph-program/issues" 39 | }, 40 | "homepage": "https://github.com/holaplex/graph-program#readme", 41 | "keywords": [ 42 | "solana", 43 | "holaplex", 44 | "graph", 45 | "follower", 46 | "like" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /app/cli/tools/logging/winston.ts: -------------------------------------------------------------------------------- 1 | import winston from "winston"; 2 | 3 | export const logger = winston.createLogger({ 4 | level: "info", 5 | format: winston.format.json(), 6 | transports: [ 7 | new winston.transports.Console({ format: winston.format.timestamp() }), 8 | new winston.transports.File({ filename: "combined.log" }), 9 | ], 10 | }); 11 | -------------------------------------------------------------------------------- /app/cli/tools/wallet.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import fs from "fs/promises"; 3 | 4 | export const getWallet = async (keyPairFile: string) => { 5 | const payer = anchor.web3.Keypair.fromSecretKey( 6 | Buffer.from( 7 | JSON.parse( 8 | await fs.readFile(keyPairFile, { 9 | encoding: "utf-8", 10 | }) 11 | ) 12 | ) 13 | ); 14 | return new anchor.Wallet(payer); 15 | }; 16 | -------------------------------------------------------------------------------- /app/cli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "outDir": "./build/", 7 | "declaration": true, 8 | "declarationDir": "./build/", 9 | "esModuleInterop": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "strict": true, 12 | "skipLibCheck": true, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/cli/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5": 6 | version "7.17.2" 7 | resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941" 8 | integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw== 9 | dependencies: 10 | regenerator-runtime "^0.13.4" 11 | 12 | "@colors/colors@1.5.0": 13 | version "1.5.0" 14 | resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" 15 | integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== 16 | 17 | "@dabh/diagnostics@^2.0.2": 18 | version "2.0.3" 19 | resolved "https://registry.yarnpkg.com/@dabh/diagnostics/-/diagnostics-2.0.3.tgz#7f7e97ee9a725dffc7808d93668cc984e1dc477a" 20 | integrity sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA== 21 | dependencies: 22 | colorspace "1.1.x" 23 | enabled "2.0.x" 24 | kuler "^2.0.0" 25 | 26 | "@ethersproject/bytes@^5.5.0": 27 | version "5.5.0" 28 | resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.5.0.tgz#cb11c526de657e7b45d2e0f0246fb3b9d29a601c" 29 | integrity sha512-ABvc7BHWhZU9PNM/tANm/Qx4ostPGadAuQzWTr3doklZOhDlmcBqclrQe/ZXUIj3K8wC28oYeuRa+A37tX9kog== 30 | dependencies: 31 | "@ethersproject/logger" "^5.5.0" 32 | 33 | "@ethersproject/logger@^5.5.0": 34 | version "5.5.0" 35 | resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.5.0.tgz#0c2caebeff98e10aefa5aef27d7441c7fd18cf5d" 36 | integrity sha512-rIY/6WPm7T8n3qS2vuHTUBPdXHl+rGxWxW5okDfo9J4Z0+gRRZT0msvUdIJkE4/HS29GUMziwGaaKO2bWONBrg== 37 | 38 | "@ethersproject/sha2@^5.5.0": 39 | version "5.5.0" 40 | resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.5.0.tgz#a40a054c61f98fd9eee99af2c3cc6ff57ec24db7" 41 | integrity sha512-B5UBoglbCiHamRVPLA110J+2uqsifpZaTmid2/7W5rbtYVz6gus6/hSDieIU/6gaKIDcOj12WnOdiymEUHIAOA== 42 | dependencies: 43 | "@ethersproject/bytes" "^5.5.0" 44 | "@ethersproject/logger" "^5.5.0" 45 | hash.js "1.1.7" 46 | 47 | "@holaplex/graph-program@file:../../sdk": 48 | version "0.2.1" 49 | dependencies: 50 | "@project-serum/anchor" "^0.24.2" 51 | 52 | "@project-serum/anchor@^0.24.2": 53 | version "0.24.2" 54 | resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.24.2.tgz#a3c52a99605c80735f446ca9b3a4885034731004" 55 | integrity sha512-0/718g8/DnEuwAidUwh5wLYphUYXhUbiClkuRNhvNoa+1Y8a4g2tJyxoae+emV+PG/Gikd/QUBNMkIcimiIRTA== 56 | dependencies: 57 | "@project-serum/borsh" "^0.2.5" 58 | "@solana/web3.js" "^1.36.0" 59 | 60 | base64-js "^1.5.1" 61 | bn.js "^5.1.2" 62 | bs58 "^4.0.1" 63 | buffer-layout "^1.2.2" 64 | camelcase "^5.3.1" 65 | cross-fetch "^3.1.5" 66 | crypto-hash "^1.3.0" 67 | eventemitter3 "^4.0.7" 68 | js-sha256 "^0.9.0" 69 | pako "^2.0.3" 70 | snake-case "^3.0.4" 71 | toml "^3.0.0" 72 | 73 | "@project-serum/borsh@^0.2.5": 74 | version "0.2.5" 75 | resolved "https://registry.yarnpkg.com/@project-serum/borsh/-/borsh-0.2.5.tgz#6059287aa624ecebbfc0edd35e4c28ff987d8663" 76 | integrity sha512-UmeUkUoKdQ7rhx6Leve1SssMR/Ghv8qrEiyywyxSWg7ooV7StdpPBhciiy5eB3T0qU1BXvdRNC8TdrkxK7WC5Q== 77 | dependencies: 78 | bn.js "^5.1.2" 79 | buffer-layout "^1.2.0" 80 | 81 | "@solana/buffer-layout@^4.0.0": 82 | version "4.0.0" 83 | resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.0.tgz#75b1b11adc487234821c81dfae3119b73a5fd734" 84 | integrity sha512-lR0EMP2HC3+Mxwd4YcnZb0smnaDw7Bl2IQWZiTevRH5ZZBZn6VRWn3/92E3qdU4SSImJkA6IDHawOHAnx/qUvQ== 85 | dependencies: 86 | buffer "~6.0.3" 87 | 88 | "@solana/web3.js@^1.36.0": 89 | version "1.39.1" 90 | resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.39.1.tgz#858ecd42ff2a5bcba3a4bb642a50194d77e2a578" 91 | integrity sha512-Q7XnWTAiU7n7GcoINDAAMLO7CJHpm5kPK46HKwJi2x0cusHQ3WFa7QEp6aPzH7tuf7yl/Kw1lYitcwTVOvqARA== 92 | dependencies: 93 | "@babel/runtime" "^7.12.5" 94 | "@ethersproject/sha2" "^5.5.0" 95 | "@solana/buffer-layout" "^4.0.0" 96 | bn.js "^5.0.0" 97 | borsh "^0.7.0" 98 | bs58 "^4.0.1" 99 | buffer "6.0.1" 100 | cross-fetch "^3.1.4" 101 | jayson "^3.4.4" 102 | js-sha3 "^0.8.0" 103 | rpc-websockets "^7.4.2" 104 | secp256k1 "^4.0.2" 105 | superstruct "^0.14.2" 106 | tweetnacl "^1.0.0" 107 | 108 | "@types/connect@^3.4.33": 109 | version "3.4.35" 110 | resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" 111 | integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== 112 | dependencies: 113 | "@types/node" "*" 114 | 115 | "@types/express-serve-static-core@^4.17.9": 116 | version "4.17.28" 117 | resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz#c47def9f34ec81dc6328d0b1b5303d1ec98d86b8" 118 | integrity sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig== 119 | dependencies: 120 | "@types/node" "*" 121 | "@types/qs" "*" 122 | "@types/range-parser" "*" 123 | 124 | "@types/lodash@^4.14.159": 125 | version "4.14.178" 126 | resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.178.tgz#341f6d2247db528d4a13ddbb374bcdc80406f4f8" 127 | integrity sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw== 128 | 129 | "@types/node@*": 130 | version "17.0.17" 131 | resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.17.tgz#a8ddf6e0c2341718d74ee3dc413a13a042c45a0c" 132 | integrity sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw== 133 | 134 | "@types/node@^12.12.54": 135 | version "12.20.45" 136 | resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.45.tgz#f4980d177999299d99cd4b290f7f39366509a44f" 137 | integrity sha512-1Jg2Qv5tuxBqgQV04+wO5u+wmSHbHgpORCJdeCLM+E+YdPElpdHhgywU+M1V1InL8rfOtpqtOjswk+uXTKwx7w== 138 | 139 | "@types/qs@*": 140 | version "6.9.7" 141 | resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" 142 | integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== 143 | 144 | "@types/range-parser@*": 145 | version "1.2.4" 146 | resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" 147 | integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== 148 | 149 | "@types/ws@^7.4.4": 150 | version "7.4.7" 151 | resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" 152 | integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== 153 | dependencies: 154 | "@types/node" "*" 155 | 156 | JSONStream@^1.3.5: 157 | version "1.3.5" 158 | resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" 159 | integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== 160 | dependencies: 161 | jsonparse "^1.2.0" 162 | through ">=2.2.7 <3" 163 | 164 | async@^3.2.3: 165 | version "3.2.3" 166 | resolved "https://registry.yarnpkg.com/async/-/async-3.2.3.tgz#ac53dafd3f4720ee9e8a160628f18ea91df196c9" 167 | integrity sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g== 168 | 169 | balanced-match@^1.0.0: 170 | version "1.0.2" 171 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" 172 | integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== 173 | 174 | base-x@^3.0.2: 175 | version "3.0.9" 176 | resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" 177 | integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== 178 | dependencies: 179 | safe-buffer "^5.0.1" 180 | 181 | base64-js@^1.3.1, base64-js@^1.5.1: 182 | version "1.5.1" 183 | resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" 184 | integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== 185 | 186 | bn.js@^4.11.9: 187 | version "4.12.0" 188 | resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" 189 | integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== 190 | 191 | bn.js@^5.0.0, bn.js@^5.1.2, bn.js@^5.2.0: 192 | version "5.2.0" 193 | resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" 194 | integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== 195 | 196 | borsh@^0.7.0: 197 | version "0.7.0" 198 | resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" 199 | integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== 200 | dependencies: 201 | bn.js "^5.2.0" 202 | bs58 "^4.0.0" 203 | text-encoding-utf-8 "^1.0.2" 204 | 205 | brace-expansion@^1.1.7: 206 | version "1.1.11" 207 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 208 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 209 | dependencies: 210 | balanced-match "^1.0.0" 211 | concat-map "0.0.1" 212 | 213 | brorand@^1.1.0: 214 | version "1.1.0" 215 | resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" 216 | integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= 217 | 218 | bs58@^4.0.0, bs58@^4.0.1: 219 | version "4.0.1" 220 | resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" 221 | integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= 222 | dependencies: 223 | base-x "^3.0.2" 224 | 225 | buffer-layout@^1.2.0, buffer-layout@^1.2.2: 226 | version "1.2.2" 227 | resolved "https://registry.yarnpkg.com/buffer-layout/-/buffer-layout-1.2.2.tgz#b9814e7c7235783085f9ca4966a0cfff112259d5" 228 | integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== 229 | 230 | buffer@6.0.1: 231 | version "6.0.1" 232 | resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.1.tgz#3cbea8c1463e5a0779e30b66d4c88c6ffa182ac2" 233 | integrity sha512-rVAXBwEcEoYtxnHSO5iWyhzV/O1WMtkUYWlfdLS7FjU4PnSJJHEfHXi/uHPI5EwltmOA794gN3bm3/pzuctWjQ== 234 | dependencies: 235 | base64-js "^1.3.1" 236 | ieee754 "^1.2.1" 237 | 238 | buffer@~6.0.3: 239 | version "6.0.3" 240 | resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" 241 | integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== 242 | dependencies: 243 | base64-js "^1.3.1" 244 | ieee754 "^1.2.1" 245 | 246 | bufferutil@^4.0.1: 247 | version "4.0.6" 248 | resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.6.tgz#ebd6c67c7922a0e902f053e5d8be5ec850e48433" 249 | integrity sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw== 250 | dependencies: 251 | node-gyp-build "^4.3.0" 252 | 253 | camelcase@^5.3.1: 254 | version "5.3.1" 255 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" 256 | integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== 257 | 258 | circular-json@^0.5.9: 259 | version "0.5.9" 260 | resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.5.9.tgz#932763ae88f4f7dead7a0d09c8a51a4743a53b1d" 261 | integrity sha512-4ivwqHpIFJZBuhN3g/pEcdbnGUywkBblloGbkglyloVjjR3uT6tieI89MVOfbP2tHX5sgb01FuLgAOzebNlJNQ== 262 | 263 | color-convert@^1.9.3: 264 | version "1.9.3" 265 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 266 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== 267 | dependencies: 268 | color-name "1.1.3" 269 | 270 | color-name@1.1.3: 271 | version "1.1.3" 272 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 273 | integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= 274 | 275 | color-name@^1.0.0: 276 | version "1.1.4" 277 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 278 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 279 | 280 | color-string@^1.6.0: 281 | version "1.9.1" 282 | resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4" 283 | integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== 284 | dependencies: 285 | color-name "^1.0.0" 286 | simple-swizzle "^0.2.2" 287 | 288 | color@^3.1.3: 289 | version "3.2.1" 290 | resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164" 291 | integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA== 292 | dependencies: 293 | color-convert "^1.9.3" 294 | color-string "^1.6.0" 295 | 296 | colorspace@1.1.x: 297 | version "1.1.4" 298 | resolved "https://registry.yarnpkg.com/colorspace/-/colorspace-1.1.4.tgz#8d442d1186152f60453bf8070cd66eb364e59243" 299 | integrity sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w== 300 | dependencies: 301 | color "^3.1.3" 302 | text-hex "1.0.x" 303 | 304 | commander@^2.20.3: 305 | version "2.20.3" 306 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" 307 | integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== 308 | 309 | commander@^9.0.0: 310 | version "9.0.0" 311 | resolved "https://registry.yarnpkg.com/commander/-/commander-9.0.0.tgz#86d58f24ee98126568936bd1d3574e0308a99a40" 312 | integrity sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw== 313 | 314 | concat-map@0.0.1: 315 | version "0.0.1" 316 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 317 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 318 | 319 | cross-fetch@^3.1.4, cross-fetch@^3.1.5: 320 | version "3.1.5" 321 | resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" 322 | integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== 323 | dependencies: 324 | node-fetch "2.6.7" 325 | 326 | crypto-hash@^1.3.0: 327 | version "1.3.0" 328 | resolved "https://registry.yarnpkg.com/crypto-hash/-/crypto-hash-1.3.0.tgz#b402cb08f4529e9f4f09346c3e275942f845e247" 329 | integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== 330 | 331 | delay@^5.0.0: 332 | version "5.0.0" 333 | resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" 334 | integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== 335 | 336 | dot-case@^3.0.4: 337 | version "3.0.4" 338 | resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" 339 | integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== 340 | dependencies: 341 | no-case "^3.0.4" 342 | tslib "^2.0.3" 343 | 344 | elliptic@^6.5.4: 345 | version "6.5.4" 346 | resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" 347 | integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== 348 | dependencies: 349 | bn.js "^4.11.9" 350 | brorand "^1.1.0" 351 | hash.js "^1.0.0" 352 | hmac-drbg "^1.0.1" 353 | inherits "^2.0.4" 354 | minimalistic-assert "^1.0.1" 355 | minimalistic-crypto-utils "^1.0.1" 356 | 357 | enabled@2.0.x: 358 | version "2.0.0" 359 | resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2" 360 | integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ== 361 | 362 | es6-promise@^4.0.3: 363 | version "4.2.8" 364 | resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" 365 | integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== 366 | 367 | es6-promisify@^5.0.0: 368 | version "5.0.0" 369 | resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" 370 | integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= 371 | dependencies: 372 | es6-promise "^4.0.3" 373 | 374 | eventemitter3@^4.0.7: 375 | version "4.0.7" 376 | resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" 377 | integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== 378 | 379 | eyes@^0.1.8: 380 | version "0.1.8" 381 | resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" 382 | integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= 383 | 384 | fecha@^4.2.0: 385 | version "4.2.3" 386 | resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd" 387 | integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw== 388 | 389 | fn.name@1.x.x: 390 | version "1.1.0" 391 | resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" 392 | integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== 393 | 394 | fs.realpath@^1.0.0: 395 | version "1.0.0" 396 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 397 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 398 | 399 | glob@^7.1.3: 400 | version "7.2.0" 401 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" 402 | integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== 403 | dependencies: 404 | fs.realpath "^1.0.0" 405 | inflight "^1.0.4" 406 | inherits "2" 407 | minimatch "^3.0.4" 408 | once "^1.3.0" 409 | path-is-absolute "^1.0.0" 410 | 411 | hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: 412 | version "1.1.7" 413 | resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" 414 | integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== 415 | dependencies: 416 | inherits "^2.0.3" 417 | minimalistic-assert "^1.0.1" 418 | 419 | hmac-drbg@^1.0.1: 420 | version "1.0.1" 421 | resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" 422 | integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= 423 | dependencies: 424 | hash.js "^1.0.3" 425 | minimalistic-assert "^1.0.0" 426 | minimalistic-crypto-utils "^1.0.1" 427 | 428 | ieee754@^1.2.1: 429 | version "1.2.1" 430 | resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" 431 | integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== 432 | 433 | inflight@^1.0.4: 434 | version "1.0.6" 435 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 436 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 437 | dependencies: 438 | once "^1.3.0" 439 | wrappy "1" 440 | 441 | inherits@2, inherits@^2.0.3, inherits@^2.0.4: 442 | version "2.0.4" 443 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 444 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 445 | 446 | is-arrayish@^0.3.1: 447 | version "0.3.2" 448 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" 449 | integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== 450 | 451 | is-stream@^2.0.0: 452 | version "2.0.1" 453 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" 454 | integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== 455 | 456 | isomorphic-ws@^4.0.1: 457 | version "4.0.1" 458 | resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" 459 | integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== 460 | 461 | jayson@^3.4.4: 462 | version "3.6.6" 463 | resolved "https://registry.yarnpkg.com/jayson/-/jayson-3.6.6.tgz#189984f624e398f831bd2be8e8c80eb3abf764a1" 464 | integrity sha512-f71uvrAWTtrwoww6MKcl9phQTC+56AopLyEenWvKVAIMz+q0oVGj6tenLZ7Z6UiPBkJtKLj4kt0tACllFQruGQ== 465 | dependencies: 466 | "@types/connect" "^3.4.33" 467 | "@types/express-serve-static-core" "^4.17.9" 468 | "@types/lodash" "^4.14.159" 469 | "@types/node" "^12.12.54" 470 | "@types/ws" "^7.4.4" 471 | JSONStream "^1.3.5" 472 | commander "^2.20.3" 473 | delay "^5.0.0" 474 | es6-promisify "^5.0.0" 475 | eyes "^0.1.8" 476 | isomorphic-ws "^4.0.1" 477 | json-stringify-safe "^5.0.1" 478 | lodash "^4.17.20" 479 | uuid "^8.3.2" 480 | ws "^7.4.5" 481 | 482 | js-sha256@^0.9.0: 483 | version "0.9.0" 484 | resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966" 485 | integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA== 486 | 487 | js-sha3@^0.8.0: 488 | version "0.8.0" 489 | resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" 490 | integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== 491 | 492 | json-stringify-safe@^5.0.1: 493 | version "5.0.1" 494 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 495 | integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= 496 | 497 | jsonparse@^1.2.0: 498 | version "1.3.1" 499 | resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" 500 | integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= 501 | 502 | kuler@^2.0.0: 503 | version "2.0.0" 504 | resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" 505 | integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== 506 | 507 | lodash@^4.17.20, lodash@^4.17.21: 508 | version "4.17.21" 509 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" 510 | integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== 511 | 512 | logform@^2.3.2, logform@^2.4.0: 513 | version "2.4.0" 514 | resolved "https://registry.yarnpkg.com/logform/-/logform-2.4.0.tgz#131651715a17d50f09c2a2c1a524ff1a4164bcfe" 515 | integrity sha512-CPSJw4ftjf517EhXZGGvTHHkYobo7ZCc0kvwUoOYcjfR2UVrI66RHj8MCrfAdEitdmFqbu2BYdYs8FHHZSb6iw== 516 | dependencies: 517 | "@colors/colors" "1.5.0" 518 | fecha "^4.2.0" 519 | ms "^2.1.1" 520 | safe-stable-stringify "^2.3.1" 521 | triple-beam "^1.3.0" 522 | 523 | lower-case@^2.0.2: 524 | version "2.0.2" 525 | resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" 526 | integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== 527 | dependencies: 528 | tslib "^2.0.3" 529 | 530 | minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: 531 | version "1.0.1" 532 | resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" 533 | integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== 534 | 535 | minimalistic-crypto-utils@^1.0.1: 536 | version "1.0.1" 537 | resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" 538 | integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= 539 | 540 | minimatch@^3.0.4: 541 | version "3.0.5" 542 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.5.tgz#4da8f1290ee0f0f8e83d60ca69f8f134068604a3" 543 | integrity sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw== 544 | dependencies: 545 | brace-expansion "^1.1.7" 546 | 547 | ms@^2.1.1: 548 | version "2.1.3" 549 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" 550 | integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== 551 | 552 | no-case@^3.0.4: 553 | version "3.0.4" 554 | resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" 555 | integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== 556 | dependencies: 557 | lower-case "^2.0.2" 558 | tslib "^2.0.3" 559 | 560 | node-addon-api@^2.0.0: 561 | version "2.0.2" 562 | resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" 563 | integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== 564 | 565 | node-fetch@2.6.7: 566 | version "2.6.7" 567 | resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" 568 | integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== 569 | dependencies: 570 | whatwg-url "^5.0.0" 571 | 572 | node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: 573 | version "4.3.0" 574 | resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3" 575 | integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q== 576 | 577 | once@^1.3.0: 578 | version "1.4.0" 579 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 580 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 581 | dependencies: 582 | wrappy "1" 583 | 584 | one-time@^1.0.0: 585 | version "1.0.0" 586 | resolved "https://registry.yarnpkg.com/one-time/-/one-time-1.0.0.tgz#e06bc174aed214ed58edede573b433bbf827cb45" 587 | integrity sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g== 588 | dependencies: 589 | fn.name "1.x.x" 590 | 591 | pako@^2.0.3: 592 | version "2.0.4" 593 | resolved "https://registry.yarnpkg.com/pako/-/pako-2.0.4.tgz#6cebc4bbb0b6c73b0d5b8d7e8476e2b2fbea576d" 594 | integrity sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg== 595 | 596 | path-is-absolute@^1.0.0: 597 | version "1.0.1" 598 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 599 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 600 | 601 | readable-stream@^3.4.0, readable-stream@^3.6.0: 602 | version "3.6.0" 603 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" 604 | integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== 605 | dependencies: 606 | inherits "^2.0.3" 607 | string_decoder "^1.1.1" 608 | util-deprecate "^1.0.1" 609 | 610 | regenerator-runtime@^0.13.4: 611 | version "0.13.9" 612 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" 613 | integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== 614 | 615 | rimraf@^3.0.2: 616 | version "3.0.2" 617 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" 618 | integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== 619 | dependencies: 620 | glob "^7.1.3" 621 | 622 | rpc-websockets@^7.4.2: 623 | version "7.4.17" 624 | resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.4.17.tgz#f38845dd96db0442bff9e15fba9df781beb44cc0" 625 | integrity sha512-eolVi/qlXS13viIUH9aqrde902wzSLAai0IjmOZSRefp5I3CSG/vCnD0c0fDSYCWuEyUoRL1BHQA8K1baEUyow== 626 | dependencies: 627 | "@babel/runtime" "^7.11.2" 628 | circular-json "^0.5.9" 629 | eventemitter3 "^4.0.7" 630 | uuid "^8.3.0" 631 | ws "^7.4.5" 632 | optionalDependencies: 633 | bufferutil "^4.0.1" 634 | utf-8-validate "^5.0.2" 635 | 636 | safe-buffer@^5.0.1, safe-buffer@~5.2.0: 637 | version "5.2.1" 638 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" 639 | integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== 640 | 641 | safe-stable-stringify@^2.3.1: 642 | version "2.3.1" 643 | resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz#ab67cbe1fe7d40603ca641c5e765cb942d04fc73" 644 | integrity sha512-kYBSfT+troD9cDA85VDnHZ1rpHC50O0g1e6WlGHVCz/g+JS+9WKLj+XwFYyR8UbrZN8ll9HUpDAAddY58MGisg== 645 | 646 | secp256k1@^4.0.2: 647 | version "4.0.3" 648 | resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" 649 | integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== 650 | dependencies: 651 | elliptic "^6.5.4" 652 | node-addon-api "^2.0.0" 653 | node-gyp-build "^4.2.0" 654 | 655 | simple-swizzle@^0.2.2: 656 | version "0.2.2" 657 | resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" 658 | integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= 659 | dependencies: 660 | is-arrayish "^0.3.1" 661 | 662 | snake-case@^3.0.4: 663 | version "3.0.4" 664 | resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" 665 | integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== 666 | dependencies: 667 | dot-case "^3.0.4" 668 | tslib "^2.0.3" 669 | 670 | stack-trace@0.0.x: 671 | version "0.0.10" 672 | resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" 673 | integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= 674 | 675 | string_decoder@^1.1.1: 676 | version "1.3.0" 677 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" 678 | integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== 679 | dependencies: 680 | safe-buffer "~5.2.0" 681 | 682 | superstruct@^0.14.2: 683 | version "0.14.2" 684 | resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.14.2.tgz#0dbcdf3d83676588828f1cf5ed35cda02f59025b" 685 | integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== 686 | 687 | text-encoding-utf-8@^1.0.2: 688 | version "1.0.2" 689 | resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" 690 | integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== 691 | 692 | text-hex@1.0.x: 693 | version "1.0.0" 694 | resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" 695 | integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== 696 | 697 | "through@>=2.2.7 <3": 698 | version "2.3.8" 699 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 700 | integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= 701 | 702 | toml@^3.0.0: 703 | version "3.0.0" 704 | resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" 705 | integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== 706 | 707 | tr46@~0.0.3: 708 | version "0.0.3" 709 | resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" 710 | integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= 711 | 712 | triple-beam@^1.3.0: 713 | version "1.3.0" 714 | resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9" 715 | integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== 716 | 717 | tslib@^2.0.3: 718 | version "2.3.1" 719 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" 720 | integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== 721 | 722 | tweetnacl@^1.0.0: 723 | version "1.0.3" 724 | resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" 725 | integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== 726 | 727 | typescript@^4.5.5: 728 | version "4.5.5" 729 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" 730 | integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== 731 | 732 | utf-8-validate@^5.0.2: 733 | version "5.0.8" 734 | resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.8.tgz#4a735a61661dbb1c59a0868c397d2fe263f14e58" 735 | integrity sha512-k4dW/Qja1BYDl2qD4tOMB9PFVha/UJtxTc1cXYOe3WwA/2m0Yn4qB7wLMpJyLJ/7DR0XnTut3HsCSzDT4ZvKgA== 736 | dependencies: 737 | node-gyp-build "^4.3.0" 738 | 739 | util-deprecate@^1.0.1: 740 | version "1.0.2" 741 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 742 | integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= 743 | 744 | uuid@^8.3.0, uuid@^8.3.2: 745 | version "8.3.2" 746 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" 747 | integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== 748 | 749 | webidl-conversions@^3.0.0: 750 | version "3.0.1" 751 | resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" 752 | integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= 753 | 754 | whatwg-url@^5.0.0: 755 | version "5.0.0" 756 | resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" 757 | integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= 758 | dependencies: 759 | tr46 "~0.0.3" 760 | webidl-conversions "^3.0.0" 761 | 762 | winston-transport@^4.5.0: 763 | version "4.5.0" 764 | resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.5.0.tgz#6e7b0dd04d393171ed5e4e4905db265f7ab384fa" 765 | integrity sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q== 766 | dependencies: 767 | logform "^2.3.2" 768 | readable-stream "^3.6.0" 769 | triple-beam "^1.3.0" 770 | 771 | winston@^3.7.2: 772 | version "3.7.2" 773 | resolved "https://registry.yarnpkg.com/winston/-/winston-3.7.2.tgz#95b4eeddbec902b3db1424932ac634f887c400b1" 774 | integrity sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng== 775 | dependencies: 776 | "@dabh/diagnostics" "^2.0.2" 777 | async "^3.2.3" 778 | is-stream "^2.0.0" 779 | logform "^2.4.0" 780 | one-time "^1.0.0" 781 | readable-stream "^3.4.0" 782 | safe-stable-stringify "^2.3.1" 783 | stack-trace "0.0.x" 784 | triple-beam "^1.3.0" 785 | winston-transport "^4.5.0" 786 | 787 | wrappy@1: 788 | version "1.0.2" 789 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 790 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 791 | 792 | ws@^7.4.5: 793 | version "7.5.7" 794 | resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" 795 | integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== 796 | -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | GNU Affero General Public License 2 | ================================= 3 | 4 | _Version 3, 19 November 2007_ 5 | _Copyright © 2007 Free Software Foundation, Inc. <>_ 6 | 7 | Everyone is permitted to copy and distribute verbatim copies 8 | of this license document, but changing it is not allowed. 9 | 10 | ## Preamble 11 | 12 | The GNU Affero General Public License is a free, copyleft license for 13 | software and other kinds of works, specifically designed to ensure 14 | cooperation with the community in the case of network server software. 15 | 16 | The licenses for most software and other practical works are designed 17 | to take away your freedom to share and change the works. By contrast, 18 | our General Public Licenses are intended to guarantee your freedom to 19 | share and change all versions of a program--to make sure it remains free 20 | software for all its users. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | Developers that use our General Public Licenses protect your rights 30 | with two steps: **(1)** assert copyright on the software, and **(2)** offer 31 | you this License which gives you legal permission to copy, distribute 32 | and/or modify the software. 33 | 34 | A secondary benefit of defending all users' freedom is that 35 | improvements made in alternate versions of the program, if they 36 | receive widespread use, become available for other developers to 37 | incorporate. Many developers of free software are heartened and 38 | encouraged by the resulting cooperation. However, in the case of 39 | software used on network servers, this result may fail to come about. 40 | The GNU General Public License permits making a modified version and 41 | letting the public access it on a server without ever releasing its 42 | source code to the public. 43 | 44 | The GNU Affero General Public License is designed specifically to 45 | ensure that, in such cases, the modified source code becomes available 46 | to the community. It requires the operator of a network server to 47 | provide the source code of the modified version running there to the 48 | users of that server. Therefore, public use of a modified version, on 49 | a publicly accessible server, gives the public access to the source 50 | code of the modified version. 51 | 52 | An older license, called the Affero General Public License and 53 | published by Affero, was designed to accomplish similar goals. This is 54 | a different license, not a version of the Affero GPL, but Affero has 55 | released a new version of the Affero GPL which permits relicensing under 56 | this license. 57 | 58 | The precise terms and conditions for copying, distribution and 59 | modification follow. 60 | 61 | ## TERMS AND CONDITIONS 62 | 63 | ### 0. Definitions 64 | 65 | “This License” refers to version 3 of the GNU Affero General Public License. 66 | 67 | “Copyright” also means copyright-like laws that apply to other kinds of 68 | works, such as semiconductor masks. 69 | 70 | “The Program” refers to any copyrightable work licensed under this 71 | License. Each licensee is addressed as “you”. “Licensees” and 72 | “recipients” may be individuals or organizations. 73 | 74 | To “modify” a work means to copy from or adapt all or part of the work 75 | in a fashion requiring copyright permission, other than the making of an 76 | exact copy. The resulting work is called a “modified version” of the 77 | earlier work or a work “based on” the earlier work. 78 | 79 | A “covered work” means either the unmodified Program or a work based 80 | on the Program. 81 | 82 | To “propagate” a work means to do anything with it that, without 83 | permission, would make you directly or secondarily liable for 84 | infringement under applicable copyright law, except executing it on a 85 | computer or modifying a private copy. Propagation includes copying, 86 | distribution (with or without modification), making available to the 87 | public, and in some countries other activities as well. 88 | 89 | To “convey” a work means any kind of propagation that enables other 90 | parties to make or receive copies. Mere interaction with a user through 91 | a computer network, with no transfer of a copy, is not conveying. 92 | 93 | An interactive user interface displays “Appropriate Legal Notices” 94 | to the extent that it includes a convenient and prominently visible 95 | feature that **(1)** displays an appropriate copyright notice, and **(2)** 96 | tells the user that there is no warranty for the work (except to the 97 | extent that warranties are provided), that licensees may convey the 98 | work under this License, and how to view a copy of this License. If 99 | the interface presents a list of user commands or options, such as a 100 | menu, a prominent item in the list meets this criterion. 101 | 102 | ### 1. Source Code 103 | 104 | The “source code” for a work means the preferred form of the work 105 | for making modifications to it. “Object code” means any non-source 106 | form of a work. 107 | 108 | A “Standard Interface” means an interface that either is an official 109 | standard defined by a recognized standards body, or, in the case of 110 | interfaces specified for a particular programming language, one that 111 | is widely used among developers working in that language. 112 | 113 | The “System Libraries” of an executable work include anything, other 114 | than the work as a whole, that **(a)** is included in the normal form of 115 | packaging a Major Component, but which is not part of that Major 116 | Component, and **(b)** serves only to enable use of the work with that 117 | Major Component, or to implement a Standard Interface for which an 118 | implementation is available to the public in source code form. A 119 | “Major Component”, in this context, means a major essential component 120 | (kernel, window system, and so on) of the specific operating system 121 | (if any) on which the executable work runs, or a compiler used to 122 | produce the work, or an object code interpreter used to run it. 123 | 124 | The “Corresponding Source” for a work in object code form means all 125 | the source code needed to generate, install, and (for an executable 126 | work) run the object code and to modify the work, including scripts to 127 | control those activities. However, it does not include the work's 128 | System Libraries, or general-purpose tools or generally available free 129 | programs which are used unmodified in performing those activities but 130 | which are not part of the work. For example, Corresponding Source 131 | includes interface definition files associated with source files for 132 | the work, and the source code for shared libraries and dynamically 133 | linked subprograms that the work is specifically designed to require, 134 | such as by intimate data communication or control flow between those 135 | subprograms and other parts of the work. 136 | 137 | The Corresponding Source need not include anything that users 138 | can regenerate automatically from other parts of the Corresponding 139 | Source. 140 | 141 | The Corresponding Source for a work in source code form is that 142 | same work. 143 | 144 | ### 2. Basic Permissions 145 | 146 | All rights granted under this License are granted for the term of 147 | copyright on the Program, and are irrevocable provided the stated 148 | conditions are met. This License explicitly affirms your unlimited 149 | permission to run the unmodified Program. The output from running a 150 | covered work is covered by this License only if the output, given its 151 | content, constitutes a covered work. This License acknowledges your 152 | rights of fair use or other equivalent, as provided by copyright law. 153 | 154 | You may make, run and propagate covered works that you do not 155 | convey, without conditions so long as your license otherwise remains 156 | in force. You may convey covered works to others for the sole purpose 157 | of having them make modifications exclusively for you, or provide you 158 | with facilities for running those works, provided that you comply with 159 | the terms of this License in conveying all material for which you do 160 | not control copyright. Those thus making or running the covered works 161 | for you must do so exclusively on your behalf, under your direction 162 | and control, on terms that prohibit them from making any copies of 163 | your copyrighted material outside their relationship with you. 164 | 165 | Conveying under any other circumstances is permitted solely under 166 | the conditions stated below. Sublicensing is not allowed; section 10 167 | makes it unnecessary. 168 | 169 | ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law 170 | 171 | No covered work shall be deemed part of an effective technological 172 | measure under any applicable law fulfilling obligations under article 173 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 174 | similar laws prohibiting or restricting circumvention of such 175 | measures. 176 | 177 | When you convey a covered work, you waive any legal power to forbid 178 | circumvention of technological measures to the extent such circumvention 179 | is effected by exercising rights under this License with respect to 180 | the covered work, and you disclaim any intention to limit operation or 181 | modification of the work as a means of enforcing, against the work's 182 | users, your or third parties' legal rights to forbid circumvention of 183 | technological measures. 184 | 185 | ### 4. Conveying Verbatim Copies 186 | 187 | You may convey verbatim copies of the Program's source code as you 188 | receive it, in any medium, provided that you conspicuously and 189 | appropriately publish on each copy an appropriate copyright notice; 190 | keep intact all notices stating that this License and any 191 | non-permissive terms added in accord with section 7 apply to the code; 192 | keep intact all notices of the absence of any warranty; and give all 193 | recipients a copy of this License along with the Program. 194 | 195 | You may charge any price or no price for each copy that you convey, 196 | and you may offer support or warranty protection for a fee. 197 | 198 | ### 5. Conveying Modified Source Versions 199 | 200 | You may convey a work based on the Program, or the modifications to 201 | produce it from the Program, in the form of source code under the 202 | terms of section 4, provided that you also meet all of these conditions: 203 | 204 | * **a)** The work must carry prominent notices stating that you modified 205 | it, and giving a relevant date. 206 | * **b)** The work must carry prominent notices stating that it is 207 | released under this License and any conditions added under section 7. 208 | This requirement modifies the requirement in section 4 to 209 | “keep intact all notices”. 210 | * **c)** You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | * **d)** If the work has interactive user interfaces, each must display 218 | Appropriate Legal Notices; however, if the Program has interactive 219 | interfaces that do not display Appropriate Legal Notices, your 220 | work need not make them do so. 221 | 222 | A compilation of a covered work with other separate and independent 223 | works, which are not by their nature extensions of the covered work, 224 | and which are not combined with it such as to form a larger program, 225 | in or on a volume of a storage or distribution medium, is called an 226 | “aggregate” if the compilation and its resulting copyright are not 227 | used to limit the access or legal rights of the compilation's users 228 | beyond what the individual works permit. Inclusion of a covered work 229 | in an aggregate does not cause this License to apply to the other 230 | parts of the aggregate. 231 | 232 | ### 6. Conveying Non-Source Forms 233 | 234 | You may convey a covered work in object code form under the terms 235 | of sections 4 and 5, provided that you also convey the 236 | machine-readable Corresponding Source under the terms of this License, 237 | in one of these ways: 238 | 239 | * **a)** Convey the object code in, or embodied in, a physical product 240 | (including a physical distribution medium), accompanied by the 241 | Corresponding Source fixed on a durable physical medium 242 | customarily used for software interchange. 243 | * **b)** Convey the object code in, or embodied in, a physical product 244 | (including a physical distribution medium), accompanied by a 245 | written offer, valid for at least three years and valid for as 246 | long as you offer spare parts or customer support for that product 247 | model, to give anyone who possesses the object code either **(1)** a 248 | copy of the Corresponding Source for all the software in the 249 | product that is covered by this License, on a durable physical 250 | medium customarily used for software interchange, for a price no 251 | more than your reasonable cost of physically performing this 252 | conveying of source, or **(2)** access to copy the 253 | Corresponding Source from a network server at no charge. 254 | * **c)** Convey individual copies of the object code with a copy of the 255 | written offer to provide the Corresponding Source. This 256 | alternative is allowed only occasionally and noncommercially, and 257 | only if you received the object code with such an offer, in accord 258 | with subsection 6b. 259 | * **d)** Convey the object code by offering access from a designated 260 | place (gratis or for a charge), and offer equivalent access to the 261 | Corresponding Source in the same way through the same place at no 262 | further charge. You need not require recipients to copy the 263 | Corresponding Source along with the object code. If the place to 264 | copy the object code is a network server, the Corresponding Source 265 | may be on a different server (operated by you or a third party) 266 | that supports equivalent copying facilities, provided you maintain 267 | clear directions next to the object code saying where to find the 268 | Corresponding Source. Regardless of what server hosts the 269 | Corresponding Source, you remain obligated to ensure that it is 270 | available for as long as needed to satisfy these requirements. 271 | * **e)** Convey the object code using peer-to-peer transmission, provided 272 | you inform other peers where the object code and Corresponding 273 | Source of the work are being offered to the general public at no 274 | charge under subsection 6d. 275 | 276 | A separable portion of the object code, whose source code is excluded 277 | from the Corresponding Source as a System Library, need not be 278 | included in conveying the object code work. 279 | 280 | A “User Product” is either **(1)** a “consumer product”, which means any 281 | tangible personal property which is normally used for personal, family, 282 | or household purposes, or **(2)** anything designed or sold for incorporation 283 | into a dwelling. In determining whether a product is a consumer product, 284 | doubtful cases shall be resolved in favor of coverage. For a particular 285 | product received by a particular user, “normally used” refers to a 286 | typical or common use of that class of product, regardless of the status 287 | of the particular user or of the way in which the particular user 288 | actually uses, or expects or is expected to use, the product. A product 289 | is a consumer product regardless of whether the product has substantial 290 | commercial, industrial or non-consumer uses, unless such uses represent 291 | the only significant mode of use of the product. 292 | 293 | “Installation Information” for a User Product means any methods, 294 | procedures, authorization keys, or other information required to install 295 | and execute modified versions of a covered work in that User Product from 296 | a modified version of its Corresponding Source. The information must 297 | suffice to ensure that the continued functioning of the modified object 298 | code is in no case prevented or interfered with solely because 299 | modification has been made. 300 | 301 | If you convey an object code work under this section in, or with, or 302 | specifically for use in, a User Product, and the conveying occurs as 303 | part of a transaction in which the right of possession and use of the 304 | User Product is transferred to the recipient in perpetuity or for a 305 | fixed term (regardless of how the transaction is characterized), the 306 | Corresponding Source conveyed under this section must be accompanied 307 | by the Installation Information. But this requirement does not apply 308 | if neither you nor any third party retains the ability to install 309 | modified object code on the User Product (for example, the work has 310 | been installed in ROM). 311 | 312 | The requirement to provide Installation Information does not include a 313 | requirement to continue to provide support service, warranty, or updates 314 | for a work that has been modified or installed by the recipient, or for 315 | the User Product in which it has been modified or installed. Access to a 316 | network may be denied when the modification itself materially and 317 | adversely affects the operation of the network or violates the rules and 318 | protocols for communication across the network. 319 | 320 | Corresponding Source conveyed, and Installation Information provided, 321 | in accord with this section must be in a format that is publicly 322 | documented (and with an implementation available to the public in 323 | source code form), and must require no special password or key for 324 | unpacking, reading or copying. 325 | 326 | ### 7. Additional Terms 327 | 328 | “Additional permissions” are terms that supplement the terms of this 329 | License by making exceptions from one or more of its conditions. 330 | Additional permissions that are applicable to the entire Program shall 331 | be treated as though they were included in this License, to the extent 332 | that they are valid under applicable law. If additional permissions 333 | apply only to part of the Program, that part may be used separately 334 | under those permissions, but the entire Program remains governed by 335 | this License without regard to the additional permissions. 336 | 337 | When you convey a copy of a covered work, you may at your option 338 | remove any additional permissions from that copy, or from any part of 339 | it. (Additional permissions may be written to require their own 340 | removal in certain cases when you modify the work.) You may place 341 | additional permissions on material, added by you to a covered work, 342 | for which you have or can give appropriate copyright permission. 343 | 344 | Notwithstanding any other provision of this License, for material you 345 | add to a covered work, you may (if authorized by the copyright holders of 346 | that material) supplement the terms of this License with terms: 347 | 348 | * **a)** Disclaiming warranty or limiting liability differently from the 349 | terms of sections 15 and 16 of this License; or 350 | * **b)** Requiring preservation of specified reasonable legal notices or 351 | author attributions in that material or in the Appropriate Legal 352 | Notices displayed by works containing it; or 353 | * **c)** Prohibiting misrepresentation of the origin of that material, or 354 | requiring that modified versions of such material be marked in 355 | reasonable ways as different from the original version; or 356 | * **d)** Limiting the use for publicity purposes of names of licensors or 357 | authors of the material; or 358 | * **e)** Declining to grant rights under trademark law for use of some 359 | trade names, trademarks, or service marks; or 360 | * **f)** Requiring indemnification of licensors and authors of that 361 | material by anyone who conveys the material (or modified versions of 362 | it) with contractual assumptions of liability to the recipient, for 363 | any liability that these contractual assumptions directly impose on 364 | those licensors and authors. 365 | 366 | All other non-permissive additional terms are considered “further 367 | restrictions” within the meaning of section 10. If the Program as you 368 | received it, or any part of it, contains a notice stating that it is 369 | governed by this License along with a term that is a further 370 | restriction, you may remove that term. If a license document contains 371 | a further restriction but permits relicensing or conveying under this 372 | License, you may add to a covered work material governed by the terms 373 | of that license document, provided that the further restriction does 374 | not survive such relicensing or conveying. 375 | 376 | If you add terms to a covered work in accord with this section, you 377 | must place, in the relevant source files, a statement of the 378 | additional terms that apply to those files, or a notice indicating 379 | where to find the applicable terms. 380 | 381 | Additional terms, permissive or non-permissive, may be stated in the 382 | form of a separately written license, or stated as exceptions; 383 | the above requirements apply either way. 384 | 385 | ### 8. Termination 386 | 387 | You may not propagate or modify a covered work except as expressly 388 | provided under this License. Any attempt otherwise to propagate or 389 | modify it is void, and will automatically terminate your rights under 390 | this License (including any patent licenses granted under the third 391 | paragraph of section 11). 392 | 393 | However, if you cease all violation of this License, then your 394 | license from a particular copyright holder is reinstated **(a)** 395 | provisionally, unless and until the copyright holder explicitly and 396 | finally terminates your license, and **(b)** permanently, if the copyright 397 | holder fails to notify you of the violation by some reasonable means 398 | prior to 60 days after the cessation. 399 | 400 | Moreover, your license from a particular copyright holder is 401 | reinstated permanently if the copyright holder notifies you of the 402 | violation by some reasonable means, this is the first time you have 403 | received notice of violation of this License (for any work) from that 404 | copyright holder, and you cure the violation prior to 30 days after 405 | your receipt of the notice. 406 | 407 | Termination of your rights under this section does not terminate the 408 | licenses of parties who have received copies or rights from you under 409 | this License. If your rights have been terminated and not permanently 410 | reinstated, you do not qualify to receive new licenses for the same 411 | material under section 10. 412 | 413 | ### 9. Acceptance Not Required for Having Copies 414 | 415 | You are not required to accept this License in order to receive or 416 | run a copy of the Program. Ancillary propagation of a covered work 417 | occurring solely as a consequence of using peer-to-peer transmission 418 | to receive a copy likewise does not require acceptance. However, 419 | nothing other than this License grants you permission to propagate or 420 | modify any covered work. These actions infringe copyright if you do 421 | not accept this License. Therefore, by modifying or propagating a 422 | covered work, you indicate your acceptance of this License to do so. 423 | 424 | ### 10. Automatic Licensing of Downstream Recipients 425 | 426 | Each time you convey a covered work, the recipient automatically 427 | receives a license from the original licensors, to run, modify and 428 | propagate that work, subject to this License. You are not responsible 429 | for enforcing compliance by third parties with this License. 430 | 431 | An “entity transaction” is a transaction transferring control of an 432 | organization, or substantially all assets of one, or subdividing an 433 | organization, or merging organizations. If propagation of a covered 434 | work results from an entity transaction, each party to that 435 | transaction who receives a copy of the work also receives whatever 436 | licenses to the work the party's predecessor in interest had or could 437 | give under the previous paragraph, plus a right to possession of the 438 | Corresponding Source of the work from the predecessor in interest, if 439 | the predecessor has it or can get it with reasonable efforts. 440 | 441 | You may not impose any further restrictions on the exercise of the 442 | rights granted or affirmed under this License. For example, you may 443 | not impose a license fee, royalty, or other charge for exercise of 444 | rights granted under this License, and you may not initiate litigation 445 | (including a cross-claim or counterclaim in a lawsuit) alleging that 446 | any patent claim is infringed by making, using, selling, offering for 447 | sale, or importing the Program or any portion of it. 448 | 449 | ### 11. Patents 450 | 451 | A “contributor” is a copyright holder who authorizes use under this 452 | License of the Program or a work on which the Program is based. The 453 | work thus licensed is called the contributor's “contributor version”. 454 | 455 | A contributor's “essential patent claims” are all patent claims 456 | owned or controlled by the contributor, whether already acquired or 457 | hereafter acquired, that would be infringed by some manner, permitted 458 | by this License, of making, using, or selling its contributor version, 459 | but do not include claims that would be infringed only as a 460 | consequence of further modification of the contributor version. For 461 | purposes of this definition, “control” includes the right to grant 462 | patent sublicenses in a manner consistent with the requirements of 463 | this License. 464 | 465 | Each contributor grants you a non-exclusive, worldwide, royalty-free 466 | patent license under the contributor's essential patent claims, to 467 | make, use, sell, offer for sale, import and otherwise run, modify and 468 | propagate the contents of its contributor version. 469 | 470 | In the following three paragraphs, a “patent license” is any express 471 | agreement or commitment, however denominated, not to enforce a patent 472 | (such as an express permission to practice a patent or covenant not to 473 | sue for patent infringement). To “grant” such a patent license to a 474 | party means to make such an agreement or commitment not to enforce a 475 | patent against the party. 476 | 477 | If you convey a covered work, knowingly relying on a patent license, 478 | and the Corresponding Source of the work is not available for anyone 479 | to copy, free of charge and under the terms of this License, through a 480 | publicly available network server or other readily accessible means, 481 | then you must either **(1)** cause the Corresponding Source to be so 482 | available, or **(2)** arrange to deprive yourself of the benefit of the 483 | patent license for this particular work, or **(3)** arrange, in a manner 484 | consistent with the requirements of this License, to extend the patent 485 | license to downstream recipients. “Knowingly relying” means you have 486 | actual knowledge that, but for the patent license, your conveying the 487 | covered work in a country, or your recipient's use of the covered work 488 | in a country, would infringe one or more identifiable patents in that 489 | country that you have reason to believe are valid. 490 | 491 | If, pursuant to or in connection with a single transaction or 492 | arrangement, you convey, or propagate by procuring conveyance of, a 493 | covered work, and grant a patent license to some of the parties 494 | receiving the covered work authorizing them to use, propagate, modify 495 | or convey a specific copy of the covered work, then the patent license 496 | you grant is automatically extended to all recipients of the covered 497 | work and works based on it. 498 | 499 | A patent license is “discriminatory” if it does not include within 500 | the scope of its coverage, prohibits the exercise of, or is 501 | conditioned on the non-exercise of one or more of the rights that are 502 | specifically granted under this License. You may not convey a covered 503 | work if you are a party to an arrangement with a third party that is 504 | in the business of distributing software, under which you make payment 505 | to the third party based on the extent of your activity of conveying 506 | the work, and under which the third party grants, to any of the 507 | parties who would receive the covered work from you, a discriminatory 508 | patent license **(a)** in connection with copies of the covered work 509 | conveyed by you (or copies made from those copies), or **(b)** primarily 510 | for and in connection with specific products or compilations that 511 | contain the covered work, unless you entered into that arrangement, 512 | or that patent license was granted, prior to 28 March 2007. 513 | 514 | Nothing in this License shall be construed as excluding or limiting 515 | any implied license or other defenses to infringement that may 516 | otherwise be available to you under applicable patent law. 517 | 518 | ### 12. No Surrender of Others' Freedom 519 | 520 | If conditions are imposed on you (whether by court order, agreement or 521 | otherwise) that contradict the conditions of this License, they do not 522 | excuse you from the conditions of this License. If you cannot convey a 523 | covered work so as to satisfy simultaneously your obligations under this 524 | License and any other pertinent obligations, then as a consequence you may 525 | not convey it at all. For example, if you agree to terms that obligate you 526 | to collect a royalty for further conveying from those to whom you convey 527 | the Program, the only way you could satisfy both those terms and this 528 | License would be to refrain entirely from conveying the Program. 529 | 530 | ### 13. Remote Network Interaction; Use with the GNU General Public License 531 | 532 | Notwithstanding any other provision of this License, if you modify the 533 | Program, your modified version must prominently offer all users 534 | interacting with it remotely through a computer network (if your version 535 | supports such interaction) an opportunity to receive the Corresponding 536 | Source of your version by providing access to the Corresponding Source 537 | from a network server at no charge, through some standard or customary 538 | means of facilitating copying of software. This Corresponding Source 539 | shall include the Corresponding Source for any work covered by version 3 540 | of the GNU General Public License that is incorporated pursuant to the 541 | following paragraph. 542 | 543 | Notwithstanding any other provision of this License, you have 544 | permission to link or combine any covered work with a work licensed 545 | under version 3 of the GNU General Public License into a single 546 | combined work, and to convey the resulting work. The terms of this 547 | License will continue to apply to the part which is the covered work, 548 | but the work with which it is combined will remain governed by version 549 | 3 of the GNU General Public License. 550 | 551 | ### 14. Revised Versions of this License 552 | 553 | The Free Software Foundation may publish revised and/or new versions of 554 | the GNU Affero General Public License from time to time. Such new versions 555 | will be similar in spirit to the present version, but may differ in detail to 556 | address new problems or concerns. 557 | 558 | Each version is given a distinguishing version number. If the 559 | Program specifies that a certain numbered version of the GNU Affero General 560 | Public License “or any later version” applies to it, you have the 561 | option of following the terms and conditions either of that numbered 562 | version or of any later version published by the Free Software 563 | Foundation. If the Program does not specify a version number of the 564 | GNU Affero General Public License, you may choose any version ever published 565 | by the Free Software Foundation. 566 | 567 | If the Program specifies that a proxy can decide which future 568 | versions of the GNU Affero General Public License can be used, that proxy's 569 | public statement of acceptance of a version permanently authorizes you 570 | to choose that version for the Program. 571 | 572 | Later license versions may give you additional or different 573 | permissions. However, no additional obligations are imposed on any 574 | author or copyright holder as a result of your choosing to follow a 575 | later version. 576 | 577 | ### 15. Disclaimer of Warranty 578 | 579 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 580 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 581 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY 582 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 583 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 584 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 585 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 586 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 587 | 588 | ### 16. Limitation of Liability 589 | 590 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 591 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 592 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 593 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 594 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 595 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 596 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 597 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 598 | SUCH DAMAGES. 599 | 600 | ### 17. Interpretation of Sections 15 and 16 601 | 602 | If the disclaimer of warranty and limitation of liability provided 603 | above cannot be given local legal effect according to their terms, 604 | reviewing courts shall apply local law that most closely approximates 605 | an absolute waiver of all civil liability in connection with the 606 | Program, unless a warranty or assumption of liability accompanies a 607 | copy of the Program in return for a fee. 608 | 609 | _END OF TERMS AND CONDITIONS_ 610 | 611 | ## How to Apply These Terms to Your New Programs 612 | 613 | If you develop a new program, and you want it to be of the greatest 614 | possible use to the public, the best way to achieve this is to make it 615 | free software which everyone can redistribute and change under these terms. 616 | 617 | To do so, attach the following notices to the program. It is safest 618 | to attach them to the start of each source file to most effectively 619 | state the exclusion of warranty; and each file should have at least 620 | the “copyright” line and a pointer to where the full notice is found. 621 | 622 | 623 | Copyright (C) 624 | 625 | This program is free software: you can redistribute it and/or modify 626 | it under the terms of the GNU Affero General Public License as published by 627 | the Free Software Foundation, either version 3 of the License, or 628 | (at your option) any later version. 629 | 630 | This program is distributed in the hope that it will be useful, 631 | but WITHOUT ANY WARRANTY; without even the implied warranty of 632 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 633 | GNU Affero General Public License for more details. 634 | 635 | You should have received a copy of the GNU Affero General Public License 636 | along with this program. If not, see . 637 | 638 | Also add information on how to contact you by electronic and paper mail. 639 | 640 | If your software can interact with users remotely through a computer 641 | network, you should also make sure that it provides a way for users to 642 | get its source. For example, if your program is a web application, its 643 | interface could display a “Source” link that leads users to an archive 644 | of the code. There are many ways you could offer source, and different 645 | solutions will be better for different programs; see section 13 for the 646 | specific requirements. 647 | 648 | You should also get your employer (if you work as a programmer) or school, 649 | if any, to sign a “copyright disclaimer” for the program, if necessary. 650 | For more information on this, and how to apply and follow the GNU AGPL, see 651 | <>. 652 | -------------------------------------------------------------------------------- /migrations/deploy.ts: -------------------------------------------------------------------------------- 1 | // Migrations are an early feature. Currently, they're nothing more than this 2 | // single deploy script that's invoked from the CLI, injecting a provider 3 | // configured from the workspace's Anchor.toml. 4 | 5 | const anchor = require("@project-serum/anchor"); 6 | 7 | module.exports = async function (provider) { 8 | // Configure client to use the provider. 9 | anchor.setProvider(provider); 10 | 11 | // Add your deploy script here. 12 | } 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@project-serum/anchor": "^0.25.0" 4 | }, 5 | "devDependencies": { 6 | "chai": "^4.3.4", 7 | "mocha": "^9.0.3", 8 | "ts-mocha": "^10.0.0", 9 | "@types/mocha": "^9.0.0", 10 | "typescript": "^4.5.5" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /programs/graph_program/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "graph_program" 3 | version = "0.3.0" 4 | description = "Holaplex Directed Graph Program." 5 | edition = "2018" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "graph_program" 10 | 11 | [features] 12 | no-entrypoint = [] 13 | no-idl = [] 14 | no-log-ix-name = [] 15 | cpi = ["no-entrypoint"] 16 | default = [] 17 | 18 | [dependencies] 19 | anchor-lang = {version = "0.25.0", features = ["init-if-needed"] } 20 | -------------------------------------------------------------------------------- /programs/graph_program/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /programs/graph_program/src/constants/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod seeds; 2 | 3 | pub use seeds::*; 4 | -------------------------------------------------------------------------------- /programs/graph_program/src/constants/seeds.rs: -------------------------------------------------------------------------------- 1 | pub const CONNECTION_SEED_V2: [u8; 12] = *b"connectionv2"; 2 | -------------------------------------------------------------------------------- /programs/graph_program/src/errors/graph_error.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[error_code] 4 | pub enum GraphError { 5 | #[msg("Account needs to be disconnected first")] 6 | AccountNeedsToBeDisconnected, 7 | #[msg("Disconnection date must be higher than connection date")] 8 | DisconnectionDateMustBeHigherThanConnectionDate, 9 | #[msg("Clock date must be higher than connection date. Retry in another block.")] 10 | ClockDateMustBeHigherThanConnectionDate, 11 | } -------------------------------------------------------------------------------- /programs/graph_program/src/errors/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod graph_error; 2 | 3 | pub use graph_error::*; 4 | -------------------------------------------------------------------------------- /programs/graph_program/src/instructions/close_connection.rs: -------------------------------------------------------------------------------- 1 | use crate::{constants::*, state::*, errors::*}; 2 | 3 | use anchor_lang::prelude::*; 4 | 5 | #[derive(Accounts)] 6 | #[instruction(bump: u8, to: Pubkey)] 7 | pub struct CloseConnection<'info> { 8 | #[account( 9 | mut, 10 | close = from, 11 | seeds = [CONNECTION_SEED_V2.as_ref(), from.key().as_ref(), to.as_ref()], 12 | bump = bump 13 | )] 14 | pub connection: Account<'info, ConnectionV2>, 15 | #[account( 16 | mut, 17 | constraint = from.key().as_ref() == connection.from.key().as_ref() 18 | )] 19 | pub from: SystemAccount<'info>, 20 | #[account(mut)] 21 | pub signer: Signer<'info>, // Anyone can sign, permissionless call. 22 | } 23 | 24 | pub fn close_connection(ctx: Context) -> Result<()> { 25 | let connection = &mut ctx.accounts.connection; 26 | require!( 27 | connection.disconnected_at.is_some(), 28 | GraphError::AccountNeedsToBeDisconnected 29 | ); 30 | // If connected_at is not set, let's assume beginning of time as it is logically in absolute past (0). 31 | let connected_at = connection.connected_at; 32 | let disconnected_at = connection.disconnected_at.unwrap(); // Safe to unwrap since we check the value is set. 33 | require!( 34 | disconnected_at > connected_at, 35 | GraphError::DisconnectionDateMustBeHigherThanConnectionDate 36 | ); 37 | connection.log_close(); 38 | Ok(()) 39 | } 40 | -------------------------------------------------------------------------------- /programs/graph_program/src/instructions/make_connection.rs: -------------------------------------------------------------------------------- 1 | use crate::{constants::*, state::ConnectionV2}; 2 | 3 | use anchor_lang::prelude::*; 4 | 5 | #[derive(Accounts)] 6 | #[instruction(to: Pubkey)] 7 | pub struct MakeConnection<'info> { 8 | #[account( 9 | init_if_needed, 10 | payer = from, 11 | space = ConnectionV2::calculate_space(), 12 | seeds = [CONNECTION_SEED_V2.as_ref(), from.key().as_ref(), to.as_ref()], 13 | bump, 14 | )] 15 | pub connection: Account<'info, ConnectionV2>, 16 | #[account(mut)] 17 | pub from: Signer<'info>, 18 | pub system_program: Program<'info, System>, 19 | } 20 | 21 | pub fn make_connection(ctx: Context, to: Pubkey) -> Result<()> { 22 | let clock = Clock::get()?; 23 | let connection = &mut ctx.accounts.connection; 24 | connection.set_inner(ConnectionV2 { 25 | from: ctx.accounts.from.key(), 26 | to, 27 | connected_at: clock.unix_timestamp, 28 | disconnected_at: None, 29 | }); 30 | connection.log_make(); 31 | Ok(()) 32 | } 33 | -------------------------------------------------------------------------------- /programs/graph_program/src/instructions/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod make_connection; 2 | pub mod revoke_connection; 3 | pub mod close_connection; 4 | 5 | pub use make_connection::*; 6 | pub use revoke_connection::*; 7 | pub use close_connection::*; 8 | -------------------------------------------------------------------------------- /programs/graph_program/src/instructions/revoke_connection.rs: -------------------------------------------------------------------------------- 1 | use crate::{constants::*, state::*, errors::*}; 2 | 3 | use anchor_lang::prelude::*; 4 | 5 | #[derive(Accounts)] 6 | #[instruction(bump: u8, to: Pubkey)] 7 | pub struct RevokeConnection<'info> { 8 | #[account( 9 | mut, 10 | seeds = [CONNECTION_SEED_V2.as_ref(), from.key().as_ref(), to.as_ref()], 11 | bump = bump, 12 | constraint = from.key().as_ref() == connection.from.key().as_ref(), 13 | )] 14 | pub connection: Account<'info, ConnectionV2>, 15 | #[account(mut)] 16 | pub from: Signer<'info>, 17 | pub system_program: Program<'info, System>, 18 | } 19 | 20 | pub fn revoke_connection(ctx: Context) -> Result<()> { 21 | let clock = Clock::get()?; 22 | let connection = &mut ctx.accounts.connection; 23 | connection.disconnected_at = Some(clock.unix_timestamp); 24 | 25 | // Validates right disconnection time, because someone 26 | // Can mess up account state by sending both a 27 | // make, and a revoke in the same block. 28 | let connected_at = connection.connected_at; 29 | let disconnected_at = connection.disconnected_at.unwrap(); // Safe to unwrap since we check the value is set. 30 | require!( 31 | disconnected_at > connected_at, 32 | GraphError::ClockDateMustBeHigherThanConnectionDate 33 | ); 34 | 35 | connection.log_revoke(); 36 | Ok(()) 37 | } 38 | 39 | -------------------------------------------------------------------------------- /programs/graph_program/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod constants; 2 | pub mod instructions; 3 | pub mod state; 4 | pub mod errors; 5 | 6 | use anchor_lang::prelude::*; 7 | 8 | use instructions::*; 9 | 10 | declare_id!("grphAFGNvCjLKHeEmPNa91eGJChcUhrdaYYharcZCTQ"); 11 | 12 | #[program] 13 | pub mod graph_program { 14 | use super::*; 15 | 16 | pub fn make_connection(ctx: Context, to: Pubkey) -> Result<()> { 17 | instructions::make_connection(ctx, to) 18 | } 19 | 20 | pub fn revoke_connection(ctx: Context, _bump: u8, _to: Pubkey) -> Result<()> { 21 | instructions::revoke_connection(ctx) 22 | } 23 | 24 | pub fn close_connection(ctx: Context, _bump: u8, _to: Pubkey) -> Result<()> { 25 | instructions::close_connection(ctx) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /programs/graph_program/src/state/connection.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::{prelude::*}; 2 | 3 | #[account] 4 | pub struct ConnectionV2 { 5 | pub from: Pubkey, 6 | pub to: Pubkey, 7 | pub connected_at: i64, 8 | pub disconnected_at: Option, 9 | } 10 | 11 | impl ConnectionV2 { 12 | pub fn calculate_space() -> usize { 13 | 8 + // account discriminator 14 | 32 + // from 15 | 32 + // to 16 | 8 + // connected_at 17 | 1 + 8 // disconnected_at 18 | } 19 | pub fn log_make(&self) { 20 | msg!("Connected from {} to {}", self.from, self.to); 21 | } 22 | pub fn log_revoke(&self) { 23 | msg!("Disconnected from {} to {}", self.from, self.to); 24 | } 25 | pub fn log_close(&self) { 26 | msg!("Closed from {} to {}", self.from, self.to); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /programs/graph_program/src/state/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod connection; 2 | 3 | pub use connection::*; 4 | -------------------------------------------------------------------------------- /sdk/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | .npmrc 10 | 11 | # Diagnostic reports (https://nodejs.org/api/report.html) 12 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 13 | 14 | # Runtime data 15 | pids 16 | *.pid 17 | *.seed 18 | *.pid.lock 19 | 20 | # Directory for instrumented libs generated by jscoverage/JSCover 21 | lib-cov 22 | 23 | # Coverage directory used by tools like istanbul 24 | coverage 25 | *.lcov 26 | 27 | # nyc test coverage 28 | .nyc_output 29 | 30 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 31 | .grunt 32 | 33 | # Bower dependency directory (https://bower.io/) 34 | bower_components 35 | 36 | # node-waf configuration 37 | .lock-wscript 38 | 39 | # Compiled binary addons (https://nodejs.org/api/addons.html) 40 | build/Release 41 | 42 | # Dependency directories 43 | node_modules/ 44 | jspm_packages/ 45 | 46 | # Snowpack dependency directory (https://snowpack.dev/) 47 | web_modules/ 48 | 49 | # TypeScript cache 50 | *.tsbuildinfo 51 | 52 | # Optional npm cache directory 53 | .npm 54 | 55 | # Optional eslint cache 56 | .eslintcache 57 | 58 | # Optional stylelint cache 59 | .stylelintcache 60 | 61 | # Microbundle cache 62 | .rpt2_cache/ 63 | .rts2_cache_cjs/ 64 | .rts2_cache_es/ 65 | .rts2_cache_umd/ 66 | 67 | # Optional REPL history 68 | .node_repl_history 69 | 70 | # Output of 'npm pack' 71 | *.tgz 72 | 73 | # Yarn Integrity file 74 | .yarn-integrity 75 | 76 | # dotenv environment variable files 77 | .env 78 | .env.development.local 79 | .env.test.local 80 | .env.production.local 81 | .env.local 82 | 83 | # parcel-bundler cache (https://parceljs.org/) 84 | .cache 85 | .parcel-cache 86 | 87 | # Next.js build output 88 | .next 89 | out 90 | 91 | # Nuxt.js build / generate output 92 | .nuxt 93 | dist 94 | 95 | # Gatsby files 96 | .cache/ 97 | # Comment in the public line in if your project uses Gatsby and not Next.js 98 | # https://nextjs.org/blog/next-9-1#public-directory-support 99 | # public 100 | 101 | # vuepress build output 102 | .vuepress/dist 103 | 104 | # vuepress v2.x temp and cache directory 105 | .temp 106 | .cache 107 | 108 | # Docusaurus cache and generated files 109 | .docusaurus 110 | 111 | # Serverless directories 112 | .serverless/ 113 | 114 | # FuseBox cache 115 | .fusebox/ 116 | 117 | # DynamoDB Local files 118 | .dynamodb/ 119 | 120 | # TernJS port file 121 | .tern-port 122 | 123 | # Stores VSCode versions used for testing VSCode extensions 124 | .vscode-test 125 | 126 | # yarn v2 127 | .yarn/cache 128 | .yarn/unplugged 129 | .yarn/build-state.yml 130 | .yarn/install-state.gz 131 | .pnp.* 132 | 133 | # TS 134 | build/ -------------------------------------------------------------------------------- /sdk/README.md: -------------------------------------------------------------------------------- 1 | # Graph Program TS SDK 2 | 3 | This Typescript SDK is a collection of utilities for interacting with the graph program. 4 | 5 | ## Exported components 6 | 7 | - Program: exposes an anchor program to be used with the SDK. 8 | - Transactions: prebuilt transactions to be used to interact with the program. 9 | - Actions: prebuilt sets of transaction executors that mutate the program. 10 | - Queries: helper queries to read program accounts. 11 | -------------------------------------------------------------------------------- /sdk/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./src"; 2 | -------------------------------------------------------------------------------- /sdk/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@holaplex/graph-program", 3 | "version": "1.3.0", 4 | "description": "A program to connect accounts with public keys that allows for the creation of a very flexible graph structure on the blockchain.", 5 | "repository": { 6 | "type": "git", 7 | "url": "git+https://github.com/holaplex/graph-program.git" 8 | }, 9 | "author": "Holaplex Maintainers ", 10 | "license": "AGPL-3.0-or-later", 11 | "main": "./build/sdk/index.js", 12 | "declarations": "./build/sdk/index.d.ts", 13 | "files": [ 14 | "build" 15 | ], 16 | "scripts": { 17 | "build": "tsc", 18 | "clean": "rimraf ./build", 19 | "prepublish": "yarn build" 20 | }, 21 | "dependencies": { 22 | "@project-serum/anchor": "^0.25.0" 23 | }, 24 | "devDependencies": { 25 | "@types/chai": "^4.3.0", 26 | "rimraf": "^3.0.2", 27 | "typescript": "^4.5.5" 28 | }, 29 | "bugs": { 30 | "url": "https://github.com/holaplex/graph-program/issues" 31 | }, 32 | "homepage": "https://github.com/holaplex/graph-program#readme", 33 | "keywords": [ 34 | "solana", 35 | "holaplex", 36 | "graph", 37 | "follower", 38 | "like" 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /sdk/src/index.ts: -------------------------------------------------------------------------------- 1 | export * as Program from "./program"; 2 | export * as Queries from "./queries"; 3 | export * as Helpers from './lib/helpers'; -------------------------------------------------------------------------------- /sdk/src/lib/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./string"; 2 | export * from "./pda"; 3 | -------------------------------------------------------------------------------- /sdk/src/lib/helpers/pda.ts: -------------------------------------------------------------------------------- 1 | import { web3 } from "@project-serum/anchor"; 2 | import { b } from "./string"; 3 | import { PROGRAM_ID } from "../../program"; 4 | 5 | export const getConnectionPDA = (from: web3.PublicKey, to: web3.PublicKey) => 6 | web3.PublicKey.findProgramAddress( 7 | [b`connectionv2`, from.toBytes(), to.toBytes()], 8 | new web3.PublicKey(PROGRAM_ID) 9 | ); 10 | -------------------------------------------------------------------------------- /sdk/src/lib/helpers/string.ts: -------------------------------------------------------------------------------- 1 | export const b = (input: TemplateStringsArray) => 2 | new TextEncoder().encode(input.join("")); 3 | 4 | export const n = (input: TemplateStringsArray) => [...b(input)]; 5 | -------------------------------------------------------------------------------- /sdk/src/program.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | 3 | import { GraphProgram, IDL } from "../../target/types/graph_program"; 4 | 5 | export const PROGRAM_ID = "grphAFGNvCjLKHeEmPNa91eGJChcUhrdaYYharcZCTQ"; 6 | export { IDL, GraphProgram } from "../../target/types/graph_program"; 7 | 8 | export const getGraphProgram = (provider: anchor.AnchorProvider): anchor.Program => 9 | new anchor.Program(IDL, PROGRAM_ID, provider); 10 | -------------------------------------------------------------------------------- /sdk/src/queries.ts: -------------------------------------------------------------------------------- 1 | import { ACCOUNT_DISCRIMINATOR_SIZE, web3 } from "@project-serum/anchor"; 2 | import * as anchor from "@project-serum/anchor"; 3 | import { GraphProgram } from "../../target/types/graph_program"; 4 | 5 | export const getProgramAccountsFrom = ( 6 | from: web3.PublicKey, 7 | program: anchor.Program 8 | ) => 9 | program.account.connectionV2.all([ 10 | { 11 | memcmp: { 12 | offset: ACCOUNT_DISCRIMINATOR_SIZE, 13 | bytes: from.toBase58(), 14 | }, 15 | }, 16 | ]); 17 | 18 | export const getProgramAccountsTo = ( 19 | to: web3.PublicKey, 20 | program: anchor.Program 21 | ) => 22 | program.account.connectionV2.all([ 23 | { 24 | memcmp: { 25 | offset: ACCOUNT_DISCRIMINATOR_SIZE + 32, 26 | bytes: to.toBase58(), 27 | }, 28 | }, 29 | ]); 30 | -------------------------------------------------------------------------------- /sdk/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "CommonJS", 5 | "outDir": "./build/", 6 | "declaration": true, 7 | "declarationDir": "./build/", 8 | "esModuleInterop": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "strict": true, 11 | "skipLibCheck": true 12 | } 13 | } -------------------------------------------------------------------------------- /sdk/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5": 6 | version "7.17.9" 7 | resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72" 8 | integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg== 9 | dependencies: 10 | regenerator-runtime "^0.13.4" 11 | 12 | "@ethersproject/bytes@^5.6.0": 13 | version "5.6.1" 14 | resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7" 15 | integrity sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g== 16 | dependencies: 17 | "@ethersproject/logger" "^5.6.0" 18 | 19 | "@ethersproject/logger@^5.6.0": 20 | version "5.6.0" 21 | resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a" 22 | integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg== 23 | 24 | "@ethersproject/sha2@^5.5.0": 25 | version "5.6.0" 26 | resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.0.tgz#364c4c11cc753bda36f31f001628706ebadb64d9" 27 | integrity sha512-1tNWCPFLu1n3JM9t4/kytz35DkuF9MxqkGGEHNauEbaARdm2fafnOyw1s0tIQDPKF/7bkP1u3dbrmjpn5CelyA== 28 | dependencies: 29 | "@ethersproject/bytes" "^5.6.0" 30 | "@ethersproject/logger" "^5.6.0" 31 | hash.js "1.1.7" 32 | 33 | "@project-serum/anchor@^0.24.2": 34 | version "0.24.2" 35 | resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.24.2.tgz#a3c52a99605c80735f446ca9b3a4885034731004" 36 | integrity sha512-0/718g8/DnEuwAidUwh5wLYphUYXhUbiClkuRNhvNoa+1Y8a4g2tJyxoae+emV+PG/Gikd/QUBNMkIcimiIRTA== 37 | dependencies: 38 | "@project-serum/borsh" "^0.2.5" 39 | "@solana/web3.js" "^1.36.0" 40 | base64-js "^1.5.1" 41 | bn.js "^5.1.2" 42 | bs58 "^4.0.1" 43 | buffer-layout "^1.2.2" 44 | camelcase "^5.3.1" 45 | cross-fetch "^3.1.5" 46 | crypto-hash "^1.3.0" 47 | eventemitter3 "^4.0.7" 48 | js-sha256 "^0.9.0" 49 | pako "^2.0.3" 50 | snake-case "^3.0.4" 51 | toml "^3.0.0" 52 | 53 | "@project-serum/borsh@^0.2.5": 54 | version "0.2.5" 55 | resolved "https://registry.yarnpkg.com/@project-serum/borsh/-/borsh-0.2.5.tgz#6059287aa624ecebbfc0edd35e4c28ff987d8663" 56 | integrity sha512-UmeUkUoKdQ7rhx6Leve1SssMR/Ghv8qrEiyywyxSWg7ooV7StdpPBhciiy5eB3T0qU1BXvdRNC8TdrkxK7WC5Q== 57 | dependencies: 58 | bn.js "^5.1.2" 59 | buffer-layout "^1.2.0" 60 | 61 | "@solana/buffer-layout@^4.0.0": 62 | version "4.0.0" 63 | resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.0.tgz#75b1b11adc487234821c81dfae3119b73a5fd734" 64 | integrity sha512-lR0EMP2HC3+Mxwd4YcnZb0smnaDw7Bl2IQWZiTevRH5ZZBZn6VRWn3/92E3qdU4SSImJkA6IDHawOHAnx/qUvQ== 65 | dependencies: 66 | buffer "~6.0.3" 67 | 68 | "@solana/web3.js@^1.36.0": 69 | version "1.39.1" 70 | resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.39.1.tgz#858ecd42ff2a5bcba3a4bb642a50194d77e2a578" 71 | integrity sha512-Q7XnWTAiU7n7GcoINDAAMLO7CJHpm5kPK46HKwJi2x0cusHQ3WFa7QEp6aPzH7tuf7yl/Kw1lYitcwTVOvqARA== 72 | dependencies: 73 | "@babel/runtime" "^7.12.5" 74 | "@ethersproject/sha2" "^5.5.0" 75 | "@solana/buffer-layout" "^4.0.0" 76 | bn.js "^5.0.0" 77 | borsh "^0.7.0" 78 | bs58 "^4.0.1" 79 | buffer "6.0.1" 80 | cross-fetch "^3.1.4" 81 | jayson "^3.4.4" 82 | js-sha3 "^0.8.0" 83 | rpc-websockets "^7.4.2" 84 | secp256k1 "^4.0.2" 85 | superstruct "^0.14.2" 86 | tweetnacl "^1.0.0" 87 | 88 | "@types/chai@^4.3.0": 89 | version "4.3.1" 90 | resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.1.tgz#e2c6e73e0bdeb2521d00756d099218e9f5d90a04" 91 | integrity sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ== 92 | 93 | "@types/connect@^3.4.33": 94 | version "3.4.35" 95 | resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" 96 | integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== 97 | dependencies: 98 | "@types/node" "*" 99 | 100 | "@types/express-serve-static-core@^4.17.9": 101 | version "4.17.28" 102 | resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz#c47def9f34ec81dc6328d0b1b5303d1ec98d86b8" 103 | integrity sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig== 104 | dependencies: 105 | "@types/node" "*" 106 | "@types/qs" "*" 107 | "@types/range-parser" "*" 108 | 109 | "@types/lodash@^4.14.159": 110 | version "4.14.182" 111 | resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" 112 | integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== 113 | 114 | "@types/node@*": 115 | version "17.0.25" 116 | resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.25.tgz#527051f3c2f77aa52e5dc74e45a3da5fb2301448" 117 | integrity sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w== 118 | 119 | "@types/node@^12.12.54": 120 | version "12.20.48" 121 | resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.48.tgz#55f70bd432b6515828c0298689776861b90ca4fa" 122 | integrity sha512-4kxzqkrpwYtn6okJUcb2lfUu9ilnb3yhUOH6qX3nug8D2DupZ2drIkff2yJzYcNJVl3begnlcaBJ7tqiTTzjnQ== 123 | 124 | "@types/qs@*": 125 | version "6.9.7" 126 | resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" 127 | integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== 128 | 129 | "@types/range-parser@*": 130 | version "1.2.4" 131 | resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" 132 | integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== 133 | 134 | "@types/ws@^7.4.4": 135 | version "7.4.7" 136 | resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" 137 | integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== 138 | dependencies: 139 | "@types/node" "*" 140 | 141 | JSONStream@^1.3.5: 142 | version "1.3.5" 143 | resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" 144 | integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== 145 | dependencies: 146 | jsonparse "^1.2.0" 147 | through ">=2.2.7 <3" 148 | 149 | balanced-match@^1.0.0: 150 | version "1.0.2" 151 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" 152 | integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== 153 | 154 | base-x@^3.0.2: 155 | version "3.0.9" 156 | resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" 157 | integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== 158 | dependencies: 159 | safe-buffer "^5.0.1" 160 | 161 | base64-js@^1.3.1, base64-js@^1.5.1: 162 | version "1.5.1" 163 | resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" 164 | integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== 165 | 166 | bn.js@^4.11.9: 167 | version "4.12.0" 168 | resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" 169 | integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== 170 | 171 | bn.js@^5.0.0, bn.js@^5.1.2, bn.js@^5.2.0: 172 | version "5.2.0" 173 | resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" 174 | integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== 175 | 176 | borsh@^0.7.0: 177 | version "0.7.0" 178 | resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" 179 | integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== 180 | dependencies: 181 | bn.js "^5.2.0" 182 | bs58 "^4.0.0" 183 | text-encoding-utf-8 "^1.0.2" 184 | 185 | brace-expansion@^1.1.7: 186 | version "1.1.11" 187 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 188 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 189 | dependencies: 190 | balanced-match "^1.0.0" 191 | concat-map "0.0.1" 192 | 193 | brorand@^1.1.0: 194 | version "1.1.0" 195 | resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" 196 | integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= 197 | 198 | bs58@^4.0.0, bs58@^4.0.1: 199 | version "4.0.1" 200 | resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" 201 | integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= 202 | dependencies: 203 | base-x "^3.0.2" 204 | 205 | buffer-layout@^1.2.0, buffer-layout@^1.2.2: 206 | version "1.2.2" 207 | resolved "https://registry.yarnpkg.com/buffer-layout/-/buffer-layout-1.2.2.tgz#b9814e7c7235783085f9ca4966a0cfff112259d5" 208 | integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== 209 | 210 | buffer@6.0.1: 211 | version "6.0.1" 212 | resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.1.tgz#3cbea8c1463e5a0779e30b66d4c88c6ffa182ac2" 213 | integrity sha512-rVAXBwEcEoYtxnHSO5iWyhzV/O1WMtkUYWlfdLS7FjU4PnSJJHEfHXi/uHPI5EwltmOA794gN3bm3/pzuctWjQ== 214 | dependencies: 215 | base64-js "^1.3.1" 216 | ieee754 "^1.2.1" 217 | 218 | buffer@~6.0.3: 219 | version "6.0.3" 220 | resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" 221 | integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== 222 | dependencies: 223 | base64-js "^1.3.1" 224 | ieee754 "^1.2.1" 225 | 226 | bufferutil@^4.0.1: 227 | version "4.0.6" 228 | resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.6.tgz#ebd6c67c7922a0e902f053e5d8be5ec850e48433" 229 | integrity sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw== 230 | dependencies: 231 | node-gyp-build "^4.3.0" 232 | 233 | camelcase@^5.3.1: 234 | version "5.3.1" 235 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" 236 | integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== 237 | 238 | circular-json@^0.5.9: 239 | version "0.5.9" 240 | resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.5.9.tgz#932763ae88f4f7dead7a0d09c8a51a4743a53b1d" 241 | integrity sha512-4ivwqHpIFJZBuhN3g/pEcdbnGUywkBblloGbkglyloVjjR3uT6tieI89MVOfbP2tHX5sgb01FuLgAOzebNlJNQ== 242 | 243 | commander@^2.20.3: 244 | version "2.20.3" 245 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" 246 | integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== 247 | 248 | concat-map@0.0.1: 249 | version "0.0.1" 250 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 251 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 252 | 253 | cross-fetch@^3.1.4, cross-fetch@^3.1.5: 254 | version "3.1.5" 255 | resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" 256 | integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== 257 | dependencies: 258 | node-fetch "2.6.7" 259 | 260 | crypto-hash@^1.3.0: 261 | version "1.3.0" 262 | resolved "https://registry.yarnpkg.com/crypto-hash/-/crypto-hash-1.3.0.tgz#b402cb08f4529e9f4f09346c3e275942f845e247" 263 | integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== 264 | 265 | delay@^5.0.0: 266 | version "5.0.0" 267 | resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" 268 | integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== 269 | 270 | dot-case@^3.0.4: 271 | version "3.0.4" 272 | resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" 273 | integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== 274 | dependencies: 275 | no-case "^3.0.4" 276 | tslib "^2.0.3" 277 | 278 | elliptic@^6.5.4: 279 | version "6.5.4" 280 | resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" 281 | integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== 282 | dependencies: 283 | bn.js "^4.11.9" 284 | brorand "^1.1.0" 285 | hash.js "^1.0.0" 286 | hmac-drbg "^1.0.1" 287 | inherits "^2.0.4" 288 | minimalistic-assert "^1.0.1" 289 | minimalistic-crypto-utils "^1.0.1" 290 | 291 | es6-promise@^4.0.3: 292 | version "4.2.8" 293 | resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" 294 | integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== 295 | 296 | es6-promisify@^5.0.0: 297 | version "5.0.0" 298 | resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" 299 | integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= 300 | dependencies: 301 | es6-promise "^4.0.3" 302 | 303 | eventemitter3@^4.0.7: 304 | version "4.0.7" 305 | resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" 306 | integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== 307 | 308 | eyes@^0.1.8: 309 | version "0.1.8" 310 | resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" 311 | integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= 312 | 313 | fs.realpath@^1.0.0: 314 | version "1.0.0" 315 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 316 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 317 | 318 | glob@^7.1.3: 319 | version "7.2.0" 320 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" 321 | integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== 322 | dependencies: 323 | fs.realpath "^1.0.0" 324 | inflight "^1.0.4" 325 | inherits "2" 326 | minimatch "^3.0.4" 327 | once "^1.3.0" 328 | path-is-absolute "^1.0.0" 329 | 330 | hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: 331 | version "1.1.7" 332 | resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" 333 | integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== 334 | dependencies: 335 | inherits "^2.0.3" 336 | minimalistic-assert "^1.0.1" 337 | 338 | hmac-drbg@^1.0.1: 339 | version "1.0.1" 340 | resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" 341 | integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= 342 | dependencies: 343 | hash.js "^1.0.3" 344 | minimalistic-assert "^1.0.0" 345 | minimalistic-crypto-utils "^1.0.1" 346 | 347 | ieee754@^1.2.1: 348 | version "1.2.1" 349 | resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" 350 | integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== 351 | 352 | inflight@^1.0.4: 353 | version "1.0.6" 354 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 355 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 356 | dependencies: 357 | once "^1.3.0" 358 | wrappy "1" 359 | 360 | inherits@2, inherits@^2.0.3, inherits@^2.0.4: 361 | version "2.0.4" 362 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 363 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 364 | 365 | isomorphic-ws@^4.0.1: 366 | version "4.0.1" 367 | resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" 368 | integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== 369 | 370 | jayson@^3.4.4: 371 | version "3.6.6" 372 | resolved "https://registry.yarnpkg.com/jayson/-/jayson-3.6.6.tgz#189984f624e398f831bd2be8e8c80eb3abf764a1" 373 | integrity sha512-f71uvrAWTtrwoww6MKcl9phQTC+56AopLyEenWvKVAIMz+q0oVGj6tenLZ7Z6UiPBkJtKLj4kt0tACllFQruGQ== 374 | dependencies: 375 | "@types/connect" "^3.4.33" 376 | "@types/express-serve-static-core" "^4.17.9" 377 | "@types/lodash" "^4.14.159" 378 | "@types/node" "^12.12.54" 379 | "@types/ws" "^7.4.4" 380 | JSONStream "^1.3.5" 381 | commander "^2.20.3" 382 | delay "^5.0.0" 383 | es6-promisify "^5.0.0" 384 | eyes "^0.1.8" 385 | isomorphic-ws "^4.0.1" 386 | json-stringify-safe "^5.0.1" 387 | lodash "^4.17.20" 388 | uuid "^8.3.2" 389 | ws "^7.4.5" 390 | 391 | js-sha256@^0.9.0: 392 | version "0.9.0" 393 | resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966" 394 | integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA== 395 | 396 | js-sha3@^0.8.0: 397 | version "0.8.0" 398 | resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" 399 | integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== 400 | 401 | json-stringify-safe@^5.0.1: 402 | version "5.0.1" 403 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 404 | integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= 405 | 406 | jsonparse@^1.2.0: 407 | version "1.3.1" 408 | resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" 409 | integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= 410 | 411 | lodash@^4.17.20: 412 | version "4.17.21" 413 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" 414 | integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== 415 | 416 | lower-case@^2.0.2: 417 | version "2.0.2" 418 | resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" 419 | integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== 420 | dependencies: 421 | tslib "^2.0.3" 422 | 423 | minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: 424 | version "1.0.1" 425 | resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" 426 | integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== 427 | 428 | minimalistic-crypto-utils@^1.0.1: 429 | version "1.0.1" 430 | resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" 431 | integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= 432 | 433 | minimatch@^3.0.4: 434 | version "3.1.2" 435 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" 436 | integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== 437 | dependencies: 438 | brace-expansion "^1.1.7" 439 | 440 | no-case@^3.0.4: 441 | version "3.0.4" 442 | resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" 443 | integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== 444 | dependencies: 445 | lower-case "^2.0.2" 446 | tslib "^2.0.3" 447 | 448 | node-addon-api@^2.0.0: 449 | version "2.0.2" 450 | resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" 451 | integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== 452 | 453 | node-fetch@2.6.7: 454 | version "2.6.7" 455 | resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" 456 | integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== 457 | dependencies: 458 | whatwg-url "^5.0.0" 459 | 460 | node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: 461 | version "4.4.0" 462 | resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.4.0.tgz#42e99687ce87ddeaf3a10b99dc06abc11021f3f4" 463 | integrity sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ== 464 | 465 | once@^1.3.0: 466 | version "1.4.0" 467 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 468 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 469 | dependencies: 470 | wrappy "1" 471 | 472 | pako@^2.0.3: 473 | version "2.0.4" 474 | resolved "https://registry.yarnpkg.com/pako/-/pako-2.0.4.tgz#6cebc4bbb0b6c73b0d5b8d7e8476e2b2fbea576d" 475 | integrity sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg== 476 | 477 | path-is-absolute@^1.0.0: 478 | version "1.0.1" 479 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 480 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 481 | 482 | regenerator-runtime@^0.13.4: 483 | version "0.13.9" 484 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" 485 | integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== 486 | 487 | rimraf@^3.0.2: 488 | version "3.0.2" 489 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" 490 | integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== 491 | dependencies: 492 | glob "^7.1.3" 493 | 494 | rpc-websockets@^7.4.2: 495 | version "7.4.17" 496 | resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.4.17.tgz#f38845dd96db0442bff9e15fba9df781beb44cc0" 497 | integrity sha512-eolVi/qlXS13viIUH9aqrde902wzSLAai0IjmOZSRefp5I3CSG/vCnD0c0fDSYCWuEyUoRL1BHQA8K1baEUyow== 498 | dependencies: 499 | "@babel/runtime" "^7.11.2" 500 | circular-json "^0.5.9" 501 | eventemitter3 "^4.0.7" 502 | uuid "^8.3.0" 503 | ws "^7.4.5" 504 | optionalDependencies: 505 | bufferutil "^4.0.1" 506 | utf-8-validate "^5.0.2" 507 | 508 | safe-buffer@^5.0.1: 509 | version "5.2.1" 510 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" 511 | integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== 512 | 513 | secp256k1@^4.0.2: 514 | version "4.0.3" 515 | resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" 516 | integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== 517 | dependencies: 518 | elliptic "^6.5.4" 519 | node-addon-api "^2.0.0" 520 | node-gyp-build "^4.2.0" 521 | 522 | snake-case@^3.0.4: 523 | version "3.0.4" 524 | resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" 525 | integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== 526 | dependencies: 527 | dot-case "^3.0.4" 528 | tslib "^2.0.3" 529 | 530 | superstruct@^0.14.2: 531 | version "0.14.2" 532 | resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.14.2.tgz#0dbcdf3d83676588828f1cf5ed35cda02f59025b" 533 | integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== 534 | 535 | text-encoding-utf-8@^1.0.2: 536 | version "1.0.2" 537 | resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" 538 | integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== 539 | 540 | "through@>=2.2.7 <3": 541 | version "2.3.8" 542 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 543 | integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= 544 | 545 | toml@^3.0.0: 546 | version "3.0.0" 547 | resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" 548 | integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== 549 | 550 | tr46@~0.0.3: 551 | version "0.0.3" 552 | resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" 553 | integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= 554 | 555 | tslib@^2.0.3: 556 | version "2.4.0" 557 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" 558 | integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== 559 | 560 | tweetnacl@^1.0.0: 561 | version "1.0.3" 562 | resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" 563 | integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== 564 | 565 | typescript@^4.5.5: 566 | version "4.6.3" 567 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c" 568 | integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw== 569 | 570 | utf-8-validate@^5.0.2: 571 | version "5.0.9" 572 | resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.9.tgz#ba16a822fbeedff1a58918f2a6a6b36387493ea3" 573 | integrity sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q== 574 | dependencies: 575 | node-gyp-build "^4.3.0" 576 | 577 | uuid@^8.3.0, uuid@^8.3.2: 578 | version "8.3.2" 579 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" 580 | integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== 581 | 582 | webidl-conversions@^3.0.0: 583 | version "3.0.1" 584 | resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" 585 | integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= 586 | 587 | whatwg-url@^5.0.0: 588 | version "5.0.0" 589 | resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" 590 | integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= 591 | dependencies: 592 | tr46 "~0.0.3" 593 | webidl-conversions "^3.0.0" 594 | 595 | wrappy@1: 596 | version "1.0.2" 597 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 598 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 599 | 600 | ws@^7.4.5: 601 | version "7.5.7" 602 | resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" 603 | integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== 604 | -------------------------------------------------------------------------------- /tests/graph-program.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { Program } from "@project-serum/anchor"; 3 | 4 | import { GraphProgram } from "../target/types/graph_program"; 5 | import { b } from "./helpers/string"; 6 | 7 | const expect = require("chai").expect; 8 | 9 | const sleep = (time: number) => 10 | new Promise((resolve) => setTimeout(resolve, time)); 11 | 12 | const getConnectionV2PDA = ( 13 | from: anchor.web3.PublicKey, 14 | to: anchor.web3.PublicKey, 15 | program: anchor.Program 16 | ) => 17 | anchor.web3.PublicKey.findProgramAddress( 18 | [b`connectionv2`, from.toBytes(), to.toBytes()], 19 | program.programId 20 | ); 21 | 22 | describe("graph-program", () => { 23 | anchor.setProvider(anchor.AnchorProvider.env()); 24 | const program = anchor.workspace.GraphProgram as Program; 25 | 26 | const fromWallet = anchor.Wallet.local(); 27 | const signer = fromWallet.publicKey; 28 | const to = anchor.web3.Keypair.generate().publicKey; 29 | 30 | it("makes_connections", async () => { 31 | // No need to derive PDA here thanks to Seeds feature! 32 | const txId = await program.methods 33 | .makeConnection(to) 34 | .accounts({ from: signer }) 35 | .rpc(); 36 | expect(!!txId).to.be.true; 37 | // Wait for finality so we avoid disconnecting on the same time slot. 38 | await program.provider.connection.confirmTransaction(txId, 'finalized'); 39 | const [pda] = await getConnectionV2PDA(signer, to, program); 40 | const connection = await program.account.connectionV2.fetch(pda); 41 | expect(connection.disconnectedAt).to.be.null; 42 | }); 43 | 44 | it("revokes_connections", async () => { 45 | const [pda, bump] = await getConnectionV2PDA(signer, to, program); 46 | const txId = await program.methods 47 | .revokeConnection(bump, to) 48 | .accounts({ from: signer }) 49 | .rpc(); 50 | expect(!!txId).to.be.true; 51 | const connection = await program.account.connectionV2.fetch(pda); 52 | expect(!!connection.disconnectedAt).to.be.true; 53 | }); 54 | 55 | it("closes_connections", async () => { 56 | const [pda, bump] = await getConnectionV2PDA(signer, to, program); 57 | const wallet = new anchor.Wallet(anchor.web3.Keypair.generate()); 58 | const txId = await program.methods 59 | .closeConnection(bump, to) 60 | .accounts({ 61 | connection: pda, 62 | from: signer, 63 | signer: wallet.publicKey, // Different signer 64 | }) 65 | .signers([wallet.payer]) 66 | .rpc(); 67 | expect(!!txId).to.be.true; 68 | const connection = await program.account.connectionV2.fetchNullable(pda); 69 | expect(connection).to.be.null; 70 | }); 71 | }); 72 | -------------------------------------------------------------------------------- /tests/helpers/string.ts: -------------------------------------------------------------------------------- 1 | import { TextEncoder } from "util"; 2 | 3 | export const b = (input: TemplateStringsArray) => 4 | new TextEncoder().encode(input.join("")); 5 | 6 | export const n = (input: TemplateStringsArray) => [...b(input)]; 7 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "types": ["mocha", "chai"], 4 | "typeRoots": ["./node_modules/@types"], 5 | "lib": ["es2015"], 6 | "module": "commonjs", 7 | "target": "es6", 8 | "esModuleInterop": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /yarn-error.log: -------------------------------------------------------------------------------- 1 | Arguments: 2 | /home/kevin/.nvm/versions/node/v16.14.2/bin/node /home/kevin/.node/corepack/yarn/1.22.15/bin/yarn.js 3 | 4 | PATH: 5 | /home/kevin/.local/share/solana/install/active_release/bin:/home/kevin/.vscode-server/bin/dfd34e8260c270da74b5c2d86d61aee4b6d56977/bin/remote-cli:/home/kevin/.local/share/solana/install/active_release/bin:/home/kevin/.nvm/versions/node/v16.14.2/bin:/home/kevin/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Oculus/Support/oculus-runtime:/mnt/c/Program Files/Microsoft/jdk-11.0.12.7-hotspot/bin:/mnt/c/Python310/Scripts/:/mnt/c/Python310/:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Program Files/Microsoft SQL Server/150/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/ProgramData/nvm:/mnt/c/Program Files/nodejs:/mnt/c/Program Files/Git/cmd:/mnt/c/Users/darkn/.cargo/bin:/mnt/c/Users/darkn/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/darkn/AppData/Local/Programs/oh-my-posh/bin:/mnt/c/Users/darkn/.dotnet/tools 6 | 7 | Yarn version: 8 | 1.22.15 9 | 10 | Node version: 11 | 16.14.2 12 | 13 | Platform: 14 | linux x64 15 | 16 | Trace: 17 | Error: https://registry.yarnpkg.com/@project-serum%2fanchor: ETIMEDOUT 18 | at Timeout._onTimeout (/home/kevin/.node/corepack/yarn/1.22.15/lib/cli.js:141545:19) 19 | at listOnTimeout (node:internal/timers:559:17) 20 | at processTimers (node:internal/timers:502:7) 21 | 22 | npm manifest: 23 | { 24 | "dependencies": { 25 | "@project-serum/anchor": "^0.24.2" 26 | }, 27 | "devDependencies": { 28 | "chai": "^4.3.4", 29 | "mocha": "^9.0.3", 30 | "ts-mocha": "^8.0.0", 31 | "@types/mocha": "^9.0.0", 32 | "typescript": "^4.5.5" 33 | } 34 | } 35 | 36 | yarn manifest: 37 | No manifest 38 | 39 | Lockfile: 40 | No lockfile 41 | --------------------------------------------------------------------------------