Skip to content

Commit d0a57b1

Browse files
committed
feat(sdk-coin-oas): add oas sdk skeleton
Ticket: WIN-3696
1 parent 86bc4ba commit d0a57b1

27 files changed

+384
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ COPY --from=builder /tmp/bitgo/modules/sdk-coin-algo /var/modules/sdk-coin-algo/
5858
COPY --from=builder /tmp/bitgo/modules/sdk-coin-arbeth /var/modules/sdk-coin-arbeth/
5959
COPY --from=builder /tmp/bitgo/modules/abstract-eth /var/modules/abstract-eth/
6060
COPY --from=builder /tmp/bitgo/modules/sdk-coin-atom /var/modules/sdk-coin-atom/
61-
COPY --from=builder /tmp/bitgo/modules/sdk-coin-arbeth /var/modules/sdk-coin-coredao/
61+
COPY --from=builder /tmp/bitgo/modules/sdk-coin-coredao /var/modules/sdk-coin-coredao/
6262
COPY --from=builder /tmp/bitgo/modules/abstract-cosmos /var/modules/abstract-cosmos/
6363
COPY --from=builder /tmp/bitgo/modules/sdk-coin-avaxc /var/modules/sdk-coin-avaxc/
6464
COPY --from=builder /tmp/bitgo/modules/sdk-coin-avaxp /var/modules/sdk-coin-avaxp/
@@ -77,7 +77,7 @@ COPY --from=builder /tmp/bitgo/modules/sdk-coin-hbar /var/modules/sdk-coin-hbar/
7777
COPY --from=builder /tmp/bitgo/modules/sdk-coin-injective /var/modules/sdk-coin-injective/
7878
COPY --from=builder /tmp/bitgo/modules/sdk-coin-islm /var/modules/sdk-coin-islm/
7979
COPY --from=builder /tmp/bitgo/modules/sdk-coin-near /var/modules/sdk-coin-near/
80-
COPY --from=builder /tmp/bitgo/modules/sdk-coin-arbeth /var/modules/sdk-coin-oas/
80+
COPY --from=builder /tmp/bitgo/modules/sdk-coin-oas /var/modules/sdk-coin-oas/
8181
COPY --from=builder /tmp/bitgo/modules/sdk-coin-opeth /var/modules/sdk-coin-opeth/
8282
COPY --from=builder /tmp/bitgo/modules/sdk-coin-osmo /var/modules/sdk-coin-osmo/
8383
COPY --from=builder /tmp/bitgo/modules/sdk-coin-polygon /var/modules/sdk-coin-polygon/

modules/bitgo/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"@bitgo/sdk-coin-btc": "^2.3.4",
6565
"@bitgo/sdk-coin-btg": "^2.0.43",
6666
"@bitgo/sdk-coin-celo": "^3.0.35",
67+
"@bitgo/sdk-coin-coredao": "^1.0.0",
6768
"@bitgo/sdk-coin-coreum": "^21.0.12",
6869
"@bitgo/sdk-coin-cspr": "^2.0.43",
6970
"@bitgo/sdk-coin-dash": "^2.0.43",

modules/bitgo/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383
{
8484
"path": "../sdk-coin-celo"
8585
},
86+
{
87+
"path": "../sdk-coin-coredao"
88+
},
8689
{
8790
"path": "../sdk-coin-coreum"
8891
},
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.idea
3+
public
4+
dist
5+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
.idea/
3+
dist/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require: 'ts-node/register'
2+
timeout: '60000'
3+
reporter: 'min'
4+
reporter-option:
5+
- 'cdn=true'
6+
- 'json=false'
7+
exit: true
8+
spec: ['test/unit/**/*.ts']
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
!dist/
2+
dist/test/
3+
dist/tsconfig.tsbuildinfo
4+
.idea/
5+
.prettierrc.yml
6+
tsconfig.json
7+
src/
8+
test/
9+
scripts/
10+
.nyc_output
11+
CODEOWNERS
12+
node_modules/
13+
.prettierignore
14+
.mocharc.js
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.nyc_output/
2+
dist/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
printWidth: 120
2+
singleQuote: true
3+
trailingComma: 'es5'

modules/sdk-coin-coredao/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# BitGo sdk-coin-coredao
2+
3+
SDK coins provide a modular approach to a monolithic architecture. This and all BitGoJS SDK coins allow developers to use only the coins needed for a given project.
4+
5+
## Installation
6+
7+
All coins are loaded traditionally through the `bitgo` package. If you are using coins individually, you will be accessing the coin via the `@bitgo/sdk-api` package.
8+
9+
In your project install both `@bitgo/sdk-api` and `@bitgo/sdk-coin-coredao`.
10+
11+
```shell
12+
npm i @bitgo/sdk-api @bitgo/sdk-coin-coredao
13+
```
14+
15+
Next, you will be able to initialize an instance of "bitgo" through `@bitgo/sdk-api` instead of `bitgo`.
16+
17+
```javascript
18+
import { BitGoAPI } from '@bitgo/sdk-api';
19+
import { Coredao } from '@bitgo/sdk-coin-coredao';
20+
21+
const sdk = new BitGoAPI();
22+
23+
sdk.register('coredao', Coredao.createInstance);
24+
```
25+
26+
## Development
27+
28+
Most of the coin implementations are derived from `@bitgo/sdk-core`, `@bitgo/statics`, and coin specific packages. These implementations are used to interact with the BitGo API and BitGo platform services.
29+
30+
You will notice that the basic version of common class extensions have been provided to you and must be resolved before the package build will succeed. Upon initiation of a given SDK coin, you will need to verify that your coin has been included in the root `tsconfig.packages.json` and that the linting, formatting, and testing succeeds when run both within the coin and from the root of BitGoJS.

0 commit comments

Comments
 (0)